litany against fear

coding with spice ¤ by nick quaranto

JRuby: Who What Now? Notes

published 18 Nov 2008

Part of my series of notes from the Professional Ruby Conference. See them all here.

Talk from Tom Enebo from Sun Microsystems. He’s the co-lead of JRuby.

You don’t have to be a Java programmer to use it. It’s just Ruby! Compatible with Ruby 1.8.6. Proving compatability…passing against tons of Ruby/Rails tests. On target to put our 6 releases a year, 15000 bug fixes, ~3100 changesets. Performance is great and improving.

They’re working on Ruby 1.9 support and Java interop. They just released 1.1.5 two weeks ago. Added some caches, supposedly 5-20% faster.

Some issues:


  • Native-threaded. Not a big deal.

  • No native C-extensions. Ported over some libraries that use it, work to do them

  • No Continuations. (What the heck are they?)

Foreign Function Interface: call C functions directly form Ruby. Joint API, started with Rubinius. It’s now a gem. (This reminds me of dropping down to interop/pinvoke in Windowsland). Going over an example use of the FFI gem.

1.9 support done by christmas, hopefully. They want to put 1.8.6 and 1.9.1 support in the same binary. JRuby makes Java fun again! Tom is starting to go over a neat 3D pong game that he rewrote in JRuby. It’s Ruby code, not Java.

Why Java? Fantastic VM…500 man-years total on it. (Jebus.) Other typical pro-Java arguments. Going over how JRuby optimizes loops. Garbage collector is better, native threads, more tools (debuggers, IDE, profilers), more libraries.

Why use JRuby on the web? Once again, it’s EVERYWHERE. Less political resistance too. Other options: Warbler, Glassfish. JRuby lets you put in parts of Java where you need it.

Why people are using JRuby: No new software to install, Java libraries fill a void in Ruby (like Swing), works on Windows. Code obfuscation works well since JRuby generates Java bytecode in a way that no decompiler can understand it yet.



code (2) gaming (3) git (9) internet (5) prorubyconf (25) railsconf (17) ruby (10) windows (3)