Implementation Roundup: Ruby 1.8.x update, JRuby on .NET, MacRuby and MagLev Progress
New patch levels of Ruby 1.8.6 (p368) and Ruby 1.8.7 (p160) have been released. See the Changelogs for changes to Ruby 1.8.6-p368 and Ruby 1.8.7-p160.
While these are bug fix releases, at least one behavioral change snuck into the 1.8.x updates in the
StringIO#ungetc, which now behaves the same as in 1.9.x (the post has details).
In JRuby, Charles Nutter is experimenting with running JRuby on IKVM.NET. IKVM.NET is an implementation of Java that runs on .NET (both the open source Mono and Microsoft's .NET). JRuby seems to run fine, eg. this Gist shows Rails running on JRuby on the IKVM. Another Gist shows some trivial performance benchmarks, with the IKVM's performance being somewhere between Sun's JVM and MRI (important: these are results for a microbenchmark).
Finally, the MacRuby team continues the work on the experimental branch for the 0.5 release. Laurent Sansonetti gives an update on the progress on the MacRuby mailing list. One change is the support of ruby-ffi:
A RubyFFI-compatible API is under development. It uses the new C dispatcher functionality under the covers. Currently most types are supported except :pointer, structures (and maybe more). The cool thing about this API is that it's implemented in different versions of Ruby, so we should be able to reuse existing Ruby libraries based on it, until we support MRI C extensions.
Ruby-ffi is an alternative to Ruby/DL, and is supported on JRuby, Rubinius, MRI 1.8.x and 1.9.
Another speed improvement comes from using LLVM for C/Objective-C interaction (from the same mail):
A new C/Objective-C dispatcher has been written. The idea is to use LLVM to compile stubs instead of using libffi. The previous libffi- based implementation is no longer used (yay for performance!) and we are able to run most of the C/Objective-C APIs. According to some early benchmarks, the new dispatcher is about 8 times faster than trunk, and about 3 times slower than pure Objective-C, so it's very promising. Getting rid of libffi was the goal, because it's very slow.
Finally: a tweet from the MagLev team says:
Uploaded MagLev 21583 for Alpha users. RubyGems now installs: maglev-ruby setup.rb --no-rdoc --no-ri; maglev-gem install rake
Randy Shoup Jul 03, 2015