Wednesday, November 08, 2006

JRuby - Saving programmers from their Java-only prisons!


Charles Nutter, Sun Microsystems

Ruby is basically Smalltalk for Perl programmers. However, it is getting more interesting for Java programmers. Sun has hired Charles Nutter and others to build the next generation JRuby interpreter which will run on the JVM to save "Java developers anxious to escape from their Java-only prisons."

I first got excited about Ruby at the Agile Manifesto meeting in 2001, after dining and drinking with pragmatic programmers David Thomas and Andy Hunt, authors of "Programming in Ruby." Ever since, I've done my best to avoid programming in anything else. Some of my Scrum clients have moved to Ruby for mainstream product development, and a few of the senior engineers at my company would move to Ruby in a nanosecond if it made business sense.

JRuby will allow us to run Ruby programs on the Java JVM which is essentially the core strategy I recommended to the Smalltalk community years ago to save Smalltalk.

Sutherland, Jeff. The Smalltalk Manifesto: Avoiding RoadKill on the InfoBahn. Object Magazine 9.96

Alas, they were not quick to respond. Fortunately, Ruby has come to rescue former Smalltalkers. It's definitely a survivor.

JRuby Now and Into the Future by Charles Nutter

So where has all this led? JRuby has been getting more and more attention from folks within Sun, Rubyists around the world, and especially from Java developers anxious to escape from their Java-only prisons. Our compatibility is increasing faster than before; we've had over a hundred new bugs reported in the past few weeks...almost all of them with community-contributed patches. We have added our first non-Sun team member Ola Bini, a star of the JRuby community who has proven his dedication to making Ruby on the JVM succeed. And we have started to solidify our short-term goals for the project.

The primary goal remains the same: JRuby should be as close to 100% compatible with Ruby 1.8 as possible. Today, we are doing extremely well in this department. Rails generally works without issues, and most pure Ruby applications run without modification. There's still plenty of edge cases to iron out, but we're moving very rapidly now. Getting Rails to work as well as it does is already a major achievement.

We have also started to iron out what a JRuby 1.0 release should look like. A few major points come up again and again:
  • Compatibility should be such that we can safely claim "Rails is supported"
  • Java integration should look like we want it to look for the future, and should be performant, lightweight, and seamless
  • All major codebase refactorings should be complete; this includes a solid design for wiring up Java-based method implementations, external extensions, and IO channels
  • Unicode should be supported out-of-the-box, giving Ruby code access to everything Java is capable of
  • Threading should work perfectly, both for JRuby-launched threads and for "adopted" threads from outside the runtime
  • Performance should be markedly improved

3 Comments:

Blogger ruby guy said...

Dude, blue text on a blue background, not exactly the easiest thing to read.

3:08 PM  
Blogger Jeff Sutherland said...

I agree and changed it to white.

8:11 PM  
Blogger Aman said...

What do you think of Scala, a Ruby-like language? http://scala.epfl.ch/

I only recently heard about it. If I'm not wrong, it actually compiles directly to Java classes! So it doesn't need something like JRuby for Ruby.

2:22 PM  

Post a Comment

<< Home