Jun 222008
 

There’s a concept in systems theory called, in the popular vernacular, “life on the edge of chaos”. I’m sure a Google search for that phrase will turn up plenty of speculation and perhaps even some valid math. :-)

Ruby seems to me to be very close to life on the edge of chaos at the moment. It started a few weeks ago when some of the implementations other than the mainstream Ruby (aka MRI) started running Rails. If my count is correct, in addition to MRI, the John Lam/Microsoft IronRuby and Rubinius now run Rails, and Sun’s jRuby has been running Rails for quite a while. I don’t remember if Ruby 1.9 runs Rails or not — perhaps someone can fill me in on that in a comment.

Another indication of life on the edge of chaos is the fact that the main Ruby implementation teams have started having regular IRC meetings to make sure there is some kind of communication about the syntax and semantics of the language, test suites, benchmark suites, and other trappings. There is a Ruby benchmark suite being built (http://antoniocangiano.com/2008/06/01/help-me-create-the-ruby-benchmark-suite/). I’ve contributed my MatrixBenchmark to it, and will probably also be doing some of the statistical work as well.

Then there’s Ruby 1.8.7. I haven’t had a chance to experiment with it yet, but my understanding is that some of the syntax and semantics of 1.9 have been backported to the 1.8 MRI implementation. I think there are also some performance patches.

Then there’s Maglev. (http://headius.blogspot.com/2008/06/maglev.html) Then there’s the recent discovery of a security issue that affects all know MRI and KRI versions (http://www.rubyinside.com/june-2008-ruby-security-vulnerabilities-927.html) and the subsequent discovery that the patched versions segfault under some circumstances.

Finally, there is the continued brouhaha about whether Twitter scales or not. And if it doesn’t, is it Rails’ fault? I don’t know enough about either Twitter’s architecture or Rails to be able to join the debate, and given the fact that I’m a performance engineer for a living, it’s unlikely anybody will tell me enough to even make an informed guess without an NDA. :-)

So … if this is indeed, as I think it is, “life on the edge of chaos”, what does that mean? Well, for openers, let’s look at the “chaos” part. A lot of people are doing a lot of work that in the end will be discarded. That’s how this chaos thing works. I was very glad to hear that both IronRuby and Rubinius now run Rails, because if they couldn’t do that, there was no hope that they’d survive. None. Zero. Zip. Nada. Now at least there’s a chance that the work of those two teams won’t be discarded.

And if the claims of the Maglev team are true, I think the Ruby 1.9 and Ruby 2.0 efforts are in great peril. Dave Thomas is still hacking away at Pickaxe 3, and I think there are probably a couple more Ruby 1.9 books in the works, but I just don’t see the “industrial strength” support building for that branch of the Ruby evolutionary tree.

So what about the “life” part? Well, I think you will end up seeing Rails becoming a language itself, with its own “virtual machine”, independent of Ruby. Sure, it has a Ruby core, but it doesn’t use all of Ruby. There’s no reason on Earth why someone couldn’t take the internal domain-specific language(s) in Rails and turn them into external domain-specific languages — build compilers and run-times to run those languages an order of magnitude faster by eliminating the MRI/jRuby/Rubinius/IronRuby layer. The only question in my mind is whether such a project will be open-source or not.

 Posted by at 09:55