Forgot your password?
typodupeerror
Programming Ruby

Ruby 2.0.0 Released 121

Posted by Soulskill
from the onward-and-upward dept.
An anonymous reader writes "Today version 2.0.0 of Ruby has been released. This is a stable release, and the Ruby team has done their best to make it compatible with 1.9, making it easier to migrate than it was to switch from 1.8 to 1.9. New core language features include: 'Keyword arguments, which give flexibility to API design; Module#prepend, which is a new way to extend a class; A literal %i, which creates an array of symbols easily; __dir__, which returns the dirname of the file currently being executed; and UTF-8 default encoding, which make many magic comments omissible.' There are also new built-in libraries for lazy stream and for an asynchronous exception handling API. The release includes a number of performance improvements and debug support for DTrace."
This discussion has been archived. No new comments can be posted.

Ruby 2.0.0 Released

Comments Filter:
  • by Anonymous Coward on Sunday February 24, 2013 @12:40PM (#42995665)

    Your message is basically a trap. In order to answer, one has to accept the implied assertion that "Ruby is not something serious".

    If you enjoy Perl, keep using it, man. Lots of ex-perlists are now doing ruby. Ask them why. You might want to control your tone though; ruby is what puts food on their children's table. You might not want to call it "not serious" on their face.

  • by Serious Callers Only (1022605) on Sunday February 24, 2013 @01:46PM (#42996003)

    1. Ruby is not a toy not suitable for 'serious' programs, it's very similar to Python in fact, it's not as strong on science or math though as python because of libraries available in Python, if that's what you mean, say that, it's far more convincing.
    2. Python could easily replace Perl for system admin tasks - come up with specific criticisms if you have met with any roadblocks - you would likely find similar problems with Ruby to Python if you somehow couldn't manage sysadmin or text scripting with Python.
    3. Ruby, Python and Perl are actually quite interchangeable and could all be used for 'serious' tasks, or for short admin or text processing - all 3 are ideally suited to these things, and frankly the differences are not huge, Perl is slightly gnarlier, Python slightly stricter, Ruby slightly more anarchic, all 3 would get the job done easily.
    4. WTF has Rails got to do with any of this? Troll much?
    5. Why should we waste our time trying to convince someone with such trenchant and at the same time wildly inaccurate preconceived ideas?

  • by Concern (819622) on Sunday February 24, 2013 @05:00PM (#42997255) Journal

    Or just don't worry about flattering the ego of people so insecure and unskilled that they require you to pretend that Ruby is a widely used, mature, stable language.

    You want the advice of someone who learns languages effortlessly, and therefore has no insecurity about anyone else's preferences or prejudices. Anyone who needs you to "control your tone" about a language "because it puts food on their children's table" - I fear for those children. And for anyone who gets advice from their parents, who apparently had to struggle a bit too much to pull themselves up to that competency and, fearing criticism of their precious, hard-won skill, give the impression of hanging on by their fingernails.

    Ruby is indeed still at risk of being described as a toy language, and it is not nearly as commonly used as, say Perl, Python, Visual Basic, or even C#, let alone Objective C, C/C++ or Java, (as evidenced here) [tiobe.com] ...and the community is similarly small. Witness the hilarity around the recent Rubygems compromise [ycombinator.com] to see the price of small size and lack of maturity. The language is still young, and messily and poorly specified, relying on a horrifyingly slow, rats-nest reference implementation for its definition, rather than a comprehensive design.

    There is great cleverness in Ruby. It represents a ruthless preference for developer productivity over performance. An interesting experiment, but unfortunately it was done "by feel" rather than with any hard data about speed or defect rates given different design decisions. So, while some things about it are wonderful, other things only appear to be wonderful. On the whole you are unlikely to experience much net gain over Perl or Python, though you may enjoy the novelty of it. It's a fun language. By all means, try, and see for yourself. Just beware that you foreclose the ability to scale your work easily if you use Ruby.

    Although some very clever Ruby runtime implementers have come along to pick up the slack left by the language's founder (who still pretends the global interpreter lock is a virtue, or so I am told), many language features cause meaningful and irretrievable performance impacts that will never be ameliorated by runtime magic. It doesn't matter for many applications, but just something to keep in mind.

  • by Bill_the_Engineer (772575) on Sunday February 24, 2013 @07:27PM (#42998313)

    Perl is way faster. Like twice as fast. Check out my test:
    % time (echo | ruby)
    ( echo | ruby; ) 0.01s user 0.00s system 91% cpu 0.016 total
    % time (echo | perl)
    ( echo | perl; ) 0.00s user 0.00s system 84% cpu 0.007 total

    So if I tolerate an additional 9 ms of startup time, I could write slightly faster interpreted code in a language with enough syntactic sugar to make mixing OO code with functional code less painful? Cool. ;)

It's time to boot, do your boot ROMs know where your disk controllers are?

Working...