Rubinius 1.0 (Fabius) Released
rubini.us
rubini.us
I've had ruby aliased to rbx on my own personal laptop and run all of my development on rbx, I only have to bust out MRI every once in a while, like once a month. I write lots of code with event machine, redis, amqp and many other complex parts of ruby ecosystem and for the most part they all just work on rbx.
Huge congrats to rubinius team again, I predict this will be the default ruby for most people inside of a year if not 6 months.
Rubinius is ruby done right IMHO.
EE is simply a patched MRI, so it will be faster on strings (known issues with rbx), but rbx has generation GC and JIT which can only improve.
Right now in my limited testing the performance is a wash, but if your app is memory hungry the improved GC is worth it alone. If your app is CPU heavy the JIT becomes your friend. The only way to be sure its to test it (how about running your test suite on it?), but I suspect rbx is going to get very fast as soon as a few big players shift on to it and the sweet spots for the tuning knobs are discovered.
The code is pure ruby, it creates a decent sized trie then walks it once to set data in each node (a sequential forward index, etc).
I'll release the code once my library is ready for public consumption, but the numbers were (in seconds):
rubinius ~ 4.85
jruby 1.5 ~ 5.45
mri 1.8.7 ~ 9.35
ree 1.8.7 ~ 9.35
and Yes, I did a warm up.
1. It's a Ruby implementation.
2. It's mostly compatible w/ Ruby & its components (Rails, gems, etc.) but not completely.
3. ... ?
An About page would be nice - answer these questions, among others:
1. What is Rubinious?
2. What differentiates it from Ruby?
3. What problems does it solve?
4. Why would Ruby programmers want to use it?
5. Why would non-Ruby programmers want to use it?
From http://rubini.us you can read "An environment for Ruby, the programming language that provides performance balanced with accessibility, focusing on improving programming productivity"
The thing is, in this context, what is "an environment for ruby"?
Rubinius is a ruby interpreter written in C++ using many advanced techniques and technologies such as LLVM, a "precise, compacting, generational garbage collector", a compatible C extension api to standard MRI Ruby and many other awesome ideas that will give any language nut a huge nerdon.
From http://rubini.us :
Wherever possible Rubinius is written in Ruby. Where not possible (yet), it's C++.
And further down:
The Rubinius bytecode virtual machine is written in C++, incorporating LLVM to compile bytecode to machine code at runtime. The bytecode compiler and vast majority of the core classes are written in pure Ruby.
So, it's the VM that's C++. The bytecode compiler (which is technically what's meant by "interpreter" in this case) is ruby.
Now that 1.0 is out, how about adding a blog and a mailing list?
I'd love to see Rubinius pick up a large following. IRC-only makes it a challenge to build a thriving community.
Blog wise, what would you like to see on a Rubinius blog?
Blog wise: Bubble up some of the great activity going on behind the scenes. Design decisions, great implementation debates, calls for help on hard/easy problems, new releases, beta releases, testing calls, etc. The posts don't have to be more than a paragraph or two. Just enough so we can see where you guys are steering the ship and if there's something we can do to help.
I'm sure there are more than a handful of potential up and coming language implementers that Rubinius could help inspire and recruit. All it takes is an easy to find/read active conversation to get them engaged.
Also, I'm sure you're thinking about a 'the long road to 1.0' post. That would be great first post to talk about all the decisions and direction changes that lead up to the current design.
Given that people think this is a good idea, I think we'll go ahead and do it!
Also, RVM installs RC2, not the 1.0 release. Maybe someone can give them a poke...
UPDATE: Nevermind, http://rubini.us clearly states that 1.9 compatibility will happen post-1.0. Can't wait, even if it's just to know that my code is compatible with what may be a very real option in the years to come.
AND: I should probably run "rvm update" first, to get the 1.0 release...
1. It can't tell the difference between a number on the heap that happens to look like a reference to some active data, and an actual reference to some active data. Hence it has to be conservative, and assume anything that looks like a reference, is one. Rubinius has a precise GC, and so doesn't suffer from this problem, which can lead to dead objects never being collected.
2. The GC has to stop the VM while it's running. This is probably also the case with Rubinius, however:
3. It has to walk over every object in the VM in one go, so it gets progressively slower the more objects you have. Rubinius has a generational GC, where objects are split into pools based on how long they've been alive for, and these can be scanned individually and at different rates appropriate to their age (i.e. long-lived objects probably aren't worth checking very often).
4. It can't move objects around; when it frees something, it leaves a gap where the object used to be. If a new object doesn't fit there, it has to go somewhere else, wasting that space. In the long run this can lead to memory fragmentation. Rubinius has a compacting GC, allowing it to fill in these holes and make better use of memory, and also better use of CPU caches.
Yes, 1.9 compiles to bytecode, and yes in theory a JIT could be added to it, but that's a pretty big project.
Ruby is still in infancy stages, Python is quite old. Hell Python was the inspiration for Ruby.
I mean look at what is happening in the Javascript space. If Ruby and JRuby implementations get really f-ing fast, we will get some major backings. The problem is that instead of improving Ruby, Twitter decided to ditch it. Maybe they really didn't have the people Google has when it comes to language builders. Since google app engine runs python it is in direct google interest to make it fast. Once it starts running ruby, vuala! So don't worry, they'll get to it.
I'm not sure exactly what you mean by this, but Rails 3 will still be a full stack framework. Something will be chosen for everything by default.
You'll be able to fully switch out ActiveRecord for DataMapper if you wish.
> Hell Python was the inspiration for Ruby.
I've never seen this before, usually I've heard Matz saying that it's Perl. Maybe a typo?
He's also referred to Ruby as "Matz Lisp."
So when does the "enlightenment experience" Eric Raymond promised come ? Or did Matz take it all :-D
I'm excited that rubinius is out, but I'm not sure at the moment what it's advantages are versus MRI in terms of practical use.
This is perhaps a silly question, but now that you have a solid base of ruby-in-ruby is there any room to re-optimize certain critical sections (hashes, sockets...) in C? Perhaps using a custom API that preserves most or all of the flexibility that is Rubinius's hallmark?
I presume that since you still support most compiled gems that linking to C code is still possible. Just wondering if there might be a best-of-both-worlds solution out there.
We support as subset of the MRI extension API, mainly we don't support anything using RBASIC(), RHASH(), or RREGXP() because those expose raw C data structures and we don't use the same data structures as MRI.
Still awesome though!
The reason for this is that core things like Hash and String and Array are written in pure ruby. And they are only like 1.5 times slower then the C impls in the other rubies. This means that it is optimized for running ruby code really fast, this means that once the edge cases are gone, rubinius will smoke all the other rubies hands down.