From: sto.mar@... Date: 2013-06-26T01:45:08+09:00 Subject: Re: Running wordlist.rb code from "why's (poignant) Guide to Ruby" Am 25.06.2013 07:52, schrieb Arslan Farooq: > Dave Aronson wrote in post #1113422: > [...] >> The space makes the parser think that the next >> thing isn't a parameter *list*, but a *single* parameter, as a >> paranthesized expression. (Possibly to be followed by a comma and >> more parameters.) So it tries to parse it as that, and when it runs >> into the comma, it doesn't know what to do, because a comma-separated >> set of expressions is not a valid expression itself in Ruby. > > Thank you Dave! This makes sense now to me. > > [...] >> for a simpler example. Check out the rest of the slides while you're >> there; they're from my Ruby Gotchas presentation. :-) > > I did... and I'm not sure what to think of these gotchas. I don't know > whether these are things "need fixing" or whether these are just they > way Ruby is. > > Walton Hoops wrote in post #1113433: > [...] >> Just to hopefully clear this one up a bit, The Poignant Guide is >> starting to show it's age a bit. In Ruby 1.8.* require used to search >> the current directory for files to include when using require, which is >> the behavior the book was relying on. > [...] >> In 1.9.x require was changed to no longer search the >> current directory, and require_relative (which is what you want to use >> here) was introduced to require a file relative the the current one. > > Thank you Walton! This helps. > >> With Why gone, I don't think anyone is maintaining the Guide, which is >> too bad. It's one of my favorite programming books. > > I have been wondering since yesterday which book(s) I should pick for my > journey... a book written by an expert, for beginners, but not written > like a manual. > > The Well-Grounded Rubyist by David Blank looks interesting (from > reviews). And the Learn to Program by Chris Pine also looks good. > Although I'm not sure which one should I start with. "Learn to Program" is a really nice book, but more addressed to complete programming newbies. When you have some experience you can browse through it rather quickly. I do not know "The Well-Grounded Rubyist". When you already have a basic knowledge and understanding then you might have a look at "Eloquent Ruby" by Russ Olsen. IMO a great book for getting a feeling for the language. Regards, Marcus --