K&R for Ruby?

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.

On Thu, Oct 05, 2006 at 09:15:05PM +0900, Esmail B. wrote:

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.

On 10/5/06, Logan C. [email protected] wrote:

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.

Richard C. wrote:

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 B.

“If you don’t write it down, it never happened.”

  • (Unknown)

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

Thanks!

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.com/book/).
-tim

On 2006.10.06 15:08, Tim B. 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.com/book/).

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

Wow, nobody has recommended “Programming Ruby”?
First edition is free at:
Programming Ruby: The Pragmatic Programmer's Guide
The second edition is available at all your favorite bookstores.

For the antithesis of a professional, and yet still very informative
book:
http://poignantguide.net/ruby/
_why may be the single most devestatingly odd yet brilliant rubyist we
have.

Anyways, those are just general suggestions which I would recommend to
anyone looking at ruby.
.adam

On 10/6/06, Tim B. [email protected] 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.com/book/).

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

Hi Adam,

Adam S. wrote:

Wow, nobody has recommended “Programming Ruby”?
First edition is free at:
Programming Ruby: The Pragmatic Programmer's Guide
The second edition is available at all your favorite bookstores.

Yes, I have been looking at both of these …

For the antithesis of a professional, and yet still very informative
book:
http://poignantguide.net/ruby/
_why may be the single most devestatingly odd yet brilliant rubyist we
have.

Hmm … different strokes for different folks, just not for me, the
style was way too roundabout. I wanted relevant info w/o all the
extras :wink:

I know some people who really like it though.

Cheers,
Esmail