[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

K&R for Ruby?

Esmail Bonakdarian

10/5/2006 12:12:00 PM

Hello,

Is there a concise introduction/coverage of Ruby similar to how
Kernighan & Ritchie did for C?

I am quite comfortable with programming, and I am currently reading
"Programming Ruby" which I like, but it seems too much. Ie it makes
Ruby seem like a very big language, perhaps it actually is?

I don't just want a simple reference, but something with a concise
tutorial along the lines of K&R. Is there such a book?

Thanks,
Esmail

ps: Ruby in a Nutshell seems a bit outdated and hasn't gotten very
good reviews.
9 Answers

Paul Battley

10/5/2006 12:22:00 PM

0

On 05/10/06, Esmail Bonakdarian <ebonakDUH@hotmail.com> wrote:
> Is there a concise introduction/coverage of Ruby similar to how
> Kernighan & Ritchie did for C?

Maybe the Ruby QuickRef might be closer to the kind of thing you're looking for:

http://www.zenspider.com/Languages/Ruby/Qui...

Paul.

Tom Pollard

10/5/2006 1:19:00 PM

0


On Oct 5, 2006, at 8:22 AM, Paul Battley wrote:

> On 05/10/06, Esmail Bonakdarian <ebonakDUH@hotmail.com> wrote:
>> Is there a concise introduction/coverage of Ruby similar to how
>> Kernighan & Ritchie did for C?
>
> Maybe the Ruby QuickRef might be closer to the kind of thing you're
> looking for:
>
> http://www.zenspider.com/Languages/Ruby/Qui...

That's a good reference card, but not intended to be an introduction
to the language. I think Mark Slagell's "Ruby User's Guide" is
probably closer to the level at which Kernighan and Ritchie was
written (concise, but still readable, and reasonably complete.)

Ruby User's Guide
http://www.rubyist.net/~sla...

Tom


Logan Capaldo

10/5/2006 1:21:00 PM

0

On Thu, Oct 05, 2006 at 09:15:05PM +0900, Esmail Bonakdarian wrote:
> Hello,
>
> Is there a concise introduction/coverage of Ruby similar to how
> Kernighan & Ritchie did for C?
>
> I am quite comfortable with programming, and I am currently reading
> "Programming Ruby" which I like, but it seems too much. Ie it makes
> Ruby seem like a very big language, perhaps it actually is?
>
> I don't just want a simple reference, but something with a concise
> tutorial along the lines of K&R. Is there such a book?
If you don't mind a rails project being the example project, Ruby for
Rails by David Black is an excellent introduction to Ruby as a language.
>
> Thanks,
> Esmail
>
> ps: Ruby in a Nutshell seems a bit outdated and hasn't gotten very
> good reviews.

Richard Conroy

10/5/2006 1:37:00 PM

0

On 10/5/06, Logan Capaldo <logancapaldo@gmail.com> wrote:
> On Thu, Oct 05, 2006 at 09:15:05PM +0900, Esmail Bonakdarian wrote:
> > Hello,
> >
> > Is there a concise introduction/coverage of Ruby similar to how
> > Kernighan & Ritchie did for C?
> >
> > I am quite comfortable with programming, and I am currently reading
> > "Programming Ruby" which I like, but it seems too much. Ie it makes
> > Ruby seem like a very big language, perhaps it actually is?
> >
> > I don't just want a simple reference, but something with a concise
> > tutorial along the lines of K&R. Is there such a book?

> If you don't mind a rails project being the example project, Ruby for
> Rails by David Black is an excellent introduction to Ruby as a language.

Actually I have to second this. *Ruby for Rails* has an excellent
introduction to Ruby (about the first 4 chapters have to be read
fairly linearly, after that the chapters become very domain
specific).

Just because its 4 chapters, don't assume that it is a lightweight
introduction either.

James Britt

10/5/2006 2:04:00 PM

0

Richard Conroy wrote:
> On 10/5/06, Logan Capaldo <logancapaldo@gmail.com> wrote:
>
>> If you don't mind a rails project being the example project, Ruby for
>> Rails by David Black is an excellent introduction to Ruby as a language.
>
>
> Actually I have to second this. *Ruby for Rails* has an excellent
> introduction to Ruby (about the first 4 chapters have to be read
> fairly linearly, after that the chapters become very domain
> specific).
>
> Just because its 4 chapters, don't assume that it is a lightweight
> introduction either.

But, good as the book is (i.e., very good), it is not (nor does it
contain) a K&R-style coverage of Ruby.



--
James Britt

"If you don't write it down, it never happened."
- (Unknown)

Esmail Bonakdarian

10/5/2006 8:27:00 PM

0

Thanks everyone for the recommendations so far, if there are
others, please keep them coming.

Thanks!

Tim Becker

10/6/2006 6:08:00 AM

0

> I am quite comfortable with programming, and I am currently reading
> "Programming Ruby" which I like, but it seems too much. Ie it makes
> Ruby seem like a very big language, perhaps it actually is?

You're reading the second edition. It turned out bloated, lost focus
and treats too many libraries and tools. The first edition was much
more concise, along the lines of K&R. It's the version that's
available online (http://www.rubycentral...).
-tim

Eero Saynatkari

10/6/2006 8:08:00 AM

0

On 2006.10.06 15:08, Tim Becker wrote:
> >I am quite comfortable with programming, and I am currently reading
> >"Programming Ruby" which I like, but it seems too much. Ie it makes
> >Ruby seem like a very big language, perhaps it actually is?
>
> You're reading the second edition. It turned out bloated, lost focus
> and treats too many libraries and tools. The first edition was much
> more concise, along the lines of K&R. It's the version that's
> available online (http://www.rubycentral...).

There is always "Ruby in a Nutshell" by matz himself. Very concise.

Martin Coxall

10/6/2006 9:06:00 AM

0

On 10/6/06, Tim Becker <a2800276@gmail.com> wrote:
> > I am quite comfortable with programming, and I am currently reading
> > "Programming Ruby" which I like, but it seems too much. Ie it makes
> > Ruby seem like a very big language, perhaps it actually is?
>
> You're reading the second edition. It turned out bloated, lost focus
> and treats too many libraries and tools. The first edition was much
> more concise, along the lines of K&R. It's the version that's
> available online (http://www.rubycentral...).
>

I think that's slightly unfair. The first half is concise and
well-written. The second half is a library reference, and is mostly
unnecessary since more up-to-date stuff can be gotten through ri and
rdoc.

Even though you'll only read the first half, and occasionally dip in
to the second to look something up, it's still a fine book.

Its big drawback, is that it doesn't go to far into some more
advanced, but still idiomatically Ruby ways of using the language.

For example, there's little discussion on the use of metaprogramming,
using things like instance_eval and define_method, for example.
There's nothing on using continuations. Plus common Ruby idioms go
unmentioned.

After reading it, for example, I still had no idea what

klass = class <<self; self; end

Would do.

Martin

Martin

Martin