Ruby 1.8 vs. Ruby 1.9

Hi,

Does anyone here think it’s a good idea for a beginner to learn Ruby
1.8 and then learn Ruby 1.9? If it’s better to just learn 1.9 and not
worry about what 1.8 was like, I would appreciate any and all
responses to this post.

Thanks for your time,

Calvin Stephens

On May 20, 2009, at 10:40 AM, Calvin wrote:

IMHO, if you are just starting, then start with 1.9. That is the
direction of ruby.

Cheers–

Charles

Charles J.
Advanced Computing Center for Research and Education
Vanderbilt University

I think ,as a beginnner, to learn Ruby 1.8 is a good way,there are so
many lib .
and also, if he has learned 1.8 ,then to learn Ruby 1.9 will be easy
for him.

ps: sorry for my poor English.

I was wondering the exact same thing!

Before I knew 1.9 was coming out I got a 1.8 book, and I have gone
through
it. However, I am wondering if I should get a 1.9 book now and learn it.

I have not started any major projects using Ruby just yet, and am
curious if
I should practice with 1.8 some before I learn 1.9 or just jump into 1.9
and
start using it for projects?

My only concern is the lack of Gem support 1.9 might have right now. Is
it
something a new comer should worry with? Or, should I just forget the
lack
of Gem support and know that Gem’s will eventually update to 1.9 and new
Gems will be made for 1.9.

Anyhow, I know that I will want to learn 1.9 at some point. I just do
not
want to jump in and be a bad position to progress in my learning because
of
1.9 set backs because it is so new.

What about ‘Programming Ruby 1.9: The Pragmatic Programmers’ Guide’ ?

I know they have a 1.8 version of the book as well, but does the 1.9
version
of the book go over 1.8 and 1.9 both?

I also saw a book promoted here on the list called, ‘The Well-Grounded
Rubyist’. It mainly covers 1.9 as well.

Have any of you read these two as well?

I will take a look at that O’Reilly’s book … I have not seen that one
yet.

On Wed, May 20, 2009 at 1:13 PM, Michael J. I. Jackson
<[email protected]

If you’re looking for a good book that covers both 1.8 and 1.9, I
highly recommend O’Reilly’s “The Ruby P.ming Language”. It’s the
most comprehensive and concise reference that I’ve found, and it
bridges the gap between 1.8 and 1.9 nicely, explaining the differences
between the two as you go.

Michael

2009/5/21 Joshua C. [email protected]

bridges the gap between 1.8 and 1.9 nicely, explaining the differences

it. However, I am wondering if I should get a 1.9 book now and learn
My only concern is the lack of Gem support 1.9 might have right now. Is
because

ps: sorry for my poor English.

I don’t want to buy any books but I want to learn Ruby 1.9 as well.

Just remember that there are really three distinct Ruby versions now:
1.8.6, 1.8.7 (which has a number of 1.9 features, but not all), and
1.9.x

Joshua C. wrote:

I will take a look at that O’Reilly’s book … I have not seen that one yet.

bridges the gap between 1.8 and 1.9 nicely, explaining the differences
through

of Gem support and know that Gem’s will eventually update to 1.9 and new

Another perspective on this: I’m developing a major personal project
(into my 4th month on it), and have been unable to use 1.9 due to key
gems still not working in 1.9. However, due to moderate level of Ruby
knowledge, I must rather often consult a reference. The one I have is
Thomas’ 3rd edition of “Programming Ruby”. It focuses on 1.9, but seems
to distinctly point out where 1.9 is different from 1.8.x.

What I want to emphasize is two things:

  1. depending upon the gems you need, 1.9 may or may not be usable by
    you. For me, it’s not yet.
  2. my principal reference, nevertheless, is a book devoted to 1.9. I
    have yet to get in trouble using this book. Most of the time I don’t
    worry at all about version differences, and my code just works (well,
    usually…er…eventually).

So, get a good, up-to-date reference book, and there are several I’d
personally be happy with, and just start coding. As has been said before
on this list, many times, the differences between 1.8 and 1.9 are
meaningful but not earthshaking, at least not to me.

t.

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)

Thanks Tom, that makes a lot of sense! :slight_smile:

Brian C. wrote:

Just remember that there are really three distinct Ruby versions now:
1.8.6, 1.8.7 (which has a number of 1.9 features, but not all), and
1.9.x

Absolutely, and that’s probably why my simultaneous use of 1.8.7 AND the
1.9 version of the Pickax goes so smoothly. Makes sense, huh…

t.

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)

“Tom C.” [email protected] wrote in message
news:[email protected]

  1. depending upon the gems you need, 1.9 may or may not be usable by
    you. For me, it’s not yet.
How can you tell which libraries are supported or not?  Is there a

simple repository of which gems have been converted?
I’m still using Ruby 1.8 'cause I’ve been programming in it for a
number
of personal projects and, of course, those projects use a great number
of
libraries. I’m just itching to upgrade to Ruby 1.9 except that I still
need
those libraries. The instant that happens, I’m going for it! Is there
a
simple way to determine this besides looking up the documentation of
each
library hoping that the maintainer mentions it?
Thank you…

Q: “How can you tell which libraries are supported or not? Is there a
simple repository of which gems have been converted?”

A: This may be helpful http://isitruby19.com/

Andrew B. wrote:

Q: “How can you tell which libraries are supported or not? Is there a
simple repository of which gems have been converted?”

A: This may be helpful http://isitruby19.com/

And that’s also about all there is, sadly.

Clearly, some gems work in 1.9 unless you use certain parts of their
functionality, and then they fail.

There be water dragons in that murk!

t.

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)

On Thu, May 28, 2009 at 4:30 AM, Markus F. [email protected]
wrote:

Unfortunately I was not able to test my application: I’m using CommandLine
[1] and using 1.9.1 it just silently exits.

That is: no exception, no warning, nothing. I discovered the -W switch and
was shown a message:

commandline/optionparser/optionparser.rb:341: warning: shadowing outer local
variable - e

Did you report this error to Jim and also file it on isitruby19.com ?

If not, please do. Libraries won’t get better unless users let us
know the problems they’re having.
If you did, thanks! Try back every few months and I think you’ll see
the library scene improve.
As your Ruby skills increase, definitely consider patching your
favorite libraries, it’s often easier than you’d expect.

-greg

Hi,

Gregory B. wrote:

Did you report this error to Jim and also file it on isitruby19.com ?

Yes, I did after I read about in the other thread, it’s here:
http://isitruby19.com/commandline

I couldn’t find anything current about Jim F., all references I
found date back four years ago or so …

It’s alsooften that I’m unsure if I’m the problem due lack of skills and
don’t want to hassle the "pro"s :slight_smile:

but thanks for encouraging,

  • Markus

Hi,

Calvin wrote:

Does anyone here think it’s a good idea for a beginner to learn Ruby
1.8 and then learn Ruby 1.9? If it’s better to just learn 1.9 and not
worry about what 1.8 was like, I would appreciate any and all
responses to this post.

Here is my personal experience: I started to code my first line of ruby
nearly one week ago, I just used what was available on my Debian Lenny,
at that’s 1.8.7 .

I’m parsing text-based script files which are a few MB and I have to
by-character inspect them, I’m not using regex (yet; it’s a straight
C-port for now). Since I’ve heard about 1.9 and saw that 1.9.1 is touted
as stable on ruby-lang I compiled the latest version and wanted to give
it a try, maybe there’s some speed up (current parsing on large file
takes > 15 seconds).

Unfortunately I was not able to test my application: I’m using
CommandLine [1] and using 1.9.1 it just silently exits.

That is: no exception, no warning, nothing. I discovered the -W switch
and was shown a message:

commandline/optionparser/optionparser.rb:341: warning: shadowing outer
local variable - e

but changing the variable name didn’t fix it.

I tried to get into it with the debugger, but I could not find anything
as I’m not that into ruby yet.

For me, I’m not considered 1.9.1 for now. It’s too hard to work with
libraries I still don’t know well when I just try to learn the language
and try to get my small project going on.

If I would not depend on other libs, I would surely jump on the wagon,
but that’s not possible for me (and especially as a beginner you are
just not capable of writing everything yourself, lacking the skills).

  • Markus

[1] http://rubyforge.org/docman/view.php/632/233/posted-docs.index.html