JRuby

Given my recent tinkering with Ruby and Rails, Tim Bray's mention of JRuby made me check it out. Its supposedly compatible with Ruby 1.8.2 and supports most builtin classes and BSF (Java world's common scripting language harness).

There are some interesting experiments going on in the JRuby world such as integrating Spring Framework into JRuby which allows Ruby objects to be weaved together using Spring configuration. There weren't many references to Rails on JRuby though.

While searching, I also ran into an article comparing the latest crop of Java-based scripting languages.

Choosing a Java scripting languange: Round two

<

p dir=”ltr”>Here is a performance comparison chart from the article which I found interesting:

As you can see, current implementation of JRuby is really slow. But I think its performance should increase to be comparable to Jython after a few round of optimization.

What surprised me was how fast Rhino has gotten. Rhino smoked all other languages on the chart except Java! I haven't looked at Rhino since version 1.5 but I got another good news when I looked up this morning: Rhino 1.6R2 (latest stable version released ten days ago) supports ECMAScript for XML (see Jon Udell's Introduction to E4X) which makes XML first class citizen in JavaScript language. Very nice.

Mid-experience comment on Ruby syntax: so far it feels better than Perl but worse than Python. I am finding Ruby code difficult to read and focus on. Endless jutting ends and seemingly frivolous abuse of special characters annoying too. Expressions like:

class Dog < Animal

creates conflicting echos in my head because meaning of '<' in general conflicts with it's meaning in Ruby. Differences can be explained away but I think the designer of Ruby language don't realize that logic does not dance on eyelids. Damn. I am slipping into poetic zen mode again. Help!

Advertisements