Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

The Why, What, and How of Rubinius 1.0′s Release

By Peter Cooper / May 18, 2010

Rubinius or GitHub repo, an alternative Ruby implementation that's built in Ruby itself - as much as possible, has this last weekend hit the coding equivalent of a Bar Mitzvah.. its 1.0 release! Congratulations to the Rubinius team, past and present, and everyone who has helped with its release - I didn't know if you were going to make it for a moment there..

The Why: The History

Back in 2006, Geoffrey Grosenbach (of PeepCode) claimed to have made a bet by donating $1,000 to the then-new Rubinius Ruby implementation project founded by Evan Phoenix. It seemed more like an act of charity at the time, but Geoffrey had the last laugh in securing the naming rights to Rubinius 1.0, also known as Fabius.

Rubinius' goal was inspired by LISP and Smalltalk compilers/interpreters where all (or as much as practically possible) of the implementation was written in the language it aimed to support. The benefits of this are clear; you wouldn't need to be a wizened-old C guru to make significant improvements or changes to the interpreter.. you could just write Ruby.

By the end of 2007, and thanks to a lot of help from Engine Yard, there were 5 full-time staff "solely" working on Rubinius and progress was thick and fast, with Rubinius becoming only the third Ruby implementation to run Rails in May 2008.

In November 2008, disaster struck. Not only was the world plunged into a financial crisis, but Evan had to lay off most of his Rubinius team, leaving just two in-house Rubinius developers. The goal, now, was to get more people involved with Rubinius from the traditional open source world, donating their time for free. Regardless, the future didn't seem particularly bright, and in May 2009, Evan announced that "the rumors of our demise are greatly exaggerated" (in reference to Mark Twain) and that development was continuing (though seemingly at a less industrious pace).

The What: What's It Got?

It's great, then, that Rubinius has made it to the hallowed "version 1.0." Evan's a straight-up guy, and if he's putting the 1.0 seal on it, it must be pretty good to go. Want some bulletpoints on what it's got?

  • Works with both Rails 3.x and 2.3.5
  • Works with Sinatra
  • It has a generational garbage collector
  • Support for popular extensions including sqlite3-ruby, mysql, Nokogiri, yajl-ruby (and the obligatory "much, much more.")
  • Integrated profiler
  • JIT compilation (a la JRuby) for ├╝ber-performance
  • It doesn't work on Windows (yet)

The How: Getting Rubinius 1.0 Running

Sorry to sound like a broken record but.. the best way to get Rubinius 1.0 running is to use Wayne E Seguin's RVM (Ruby Version Manager)! RVM has already been updated to support Rubinius 1.0, so it's very easy to get up and running if you're on OS X or Linux (though you need to make sure you get HEAD first):

# rvm update --head
.. time passes, then you close your terminal and open a new one ..
# rvm install rbx
.. time passes, Rubinius 1.0 gets installed ..
# rvm rbx
# ruby -v
rubinius 1.0.0 (1.8.7 release 2010-05-14 JI) [x86_64-apple-darwin10.3.0]

If you prefer to live life on the wild side, you can hit up the Rubinius GitHub repository, check out the code and perform a manual install (by following the instructions in the README). If you're interested in tinkering, rather than just trying your code on Rubinius, this is the route I'd advise, since you can more easily dig into Rubinius's source code and see just how it's implemented (or, of course, you could just browse the source on GitHub, as I tend to do).

Comments

  1. francescoagati says:

    really compliments. With rubinius will be possible make something similar at the macro in lisp?

  2. Robert says:

    I still don't get the why. Could someone please explain the benefits of a language written in a slow language over the same language written in C? Other than the possibility of extending Ruby using Ruby I don't see the point in this at all. Learn C...its not that difficult

  3. Peter Cooper says:

    Here's why: http://alexgaynor.net/2010/may/15/pypy-future-python/. Just mentally switch Python to Ruby and PyPy to Rubinius. It's one argument, at least.

  4. Shadowfiend says:

    I also don't know what you're thinking saying that C isn't difficult. Learning it might not be. Programming it correctly and with minimal bug infestation is quite tough, though.

    Most importantly, as pointed out in the article, you broaden the pool of potential contributors to the language. More people can fork on github and play with new syntax additions or new internal features or what have you and contribute that back to the community.

  5. Jan Wedekind says:

    That's great. I hope the Ruby extension API [1] works to some extent. It's always a problem especially since the Ruby native interface exposes too much for most garbage collectors.

    [1] http://www.rubyist.net/~nobu/ruby/Ruby_Extension_Manual.html

  6. Beatriz A. Arnaez says:

    Could someone please explain the benefits of a language written in a slow language over the same language written in C? Other than the possibility of extending Ruby using Ruby I don't see the point in this at all. Learn C...its not that difficult

Other Posts to Enjoy

Twitter Mentions