When I saw that IronRuby had been released I thought I’d put it through its paces seeing how the language preformed with respect to IronPython and of course F#. Perhaps a little unfair for a number of reasons, firstly this is a pre-alpha release so one can’t really expect much, we need to give it time to mature and two, ruby generally performs slow than python in the “Computer Language Bench Mark Game”,  (http://shootout.alioth.debian.org/) so one wouldn’t really except IronRuby to outperform either IronPython or F#. However I thought what the heck and downloaded the source for the ruby bench marks.

I was a disappointed with what I found, every single one of the programs crashes. And even worse it difficult to tell exactly why they failed. I’ve listed here the command lines that I ran along with abridged versions of the exception I got:

>rbx.exe /run:binarytree.rb

Unhandled exception:

System.NotImplementedException: Statement transformation not implemented

   at Ruby.Compiler.AST.Statement.Transform(AstGenerator gen) in Statement.cs:line 31

 

>rbx.exe /run:fannkuch.rb

Unhandled exception:

System.NotImplementedException: Statement transformation not implemented

   at Ruby.Compiler.AST.Statement.Transform(AstGenerator gen) in Statement.cs:line 31

 

>rbx.exe /run:nbody.rb

Unhandled exception:

System.NotImplementedException: TODO

   at Ruby.Compiler.AST.InstanceVariable.TransformWrite(AstGenerator gen, Expression rightValue) in InstanceVariable.cs:line 31

 

>rbx.exe /run:nsieve.rb

Unhandled exception:

System.NotImplementedException: Statement transformation not implemented

   at Ruby.Compiler.AST.Statement.Transform(AstGenerator gen) in Statement.cs:line 31

 

>rbx.exe /run:partialsums.rb

Unhandled exception:

System.MemberAccessException: uninitialized constant ARGV

   at Ruby.Runtime.RubyOps.GetConstant(CodeContext context, Object target, SymbolId name) in RubyOps.cs:line 349

 

>rbx.exe /run:pidigits.rb

Unhandled exception:

System.NotImplementedException: TODO

   at Ruby.Compiler.AST.InstanceVariable.TransformWrite(AstGenerator gen, Expression rightValue) in InstanceVariable.cs:line 31  

 

>rbx.exe /run:recursive.rb

Unhandled exception:

System.MemberAccessException: uninitialized constant ARGV

   at Ruby.Runtime.RubyOps.GetConstant(CodeContext context, Object target, SymbolId name) in RubyOps.cs:line 349

 

I decided it might be nice to try and fix at least some of the programs, after all I reasoned, the programs are all pretty similar and some of the exceptions are the same, perhaps there all just using some obscure feature of the language that can be easily worked round. I worked out that ARGV was a command for access command line parameters, I replaced this with a hard coded value in both partialsums.rb and recusive.rb that had both failed because of this. Both now failed for other reasons.

>rbx.exe /run:partialsums.rb

Unhandled exception:

System.MissingMethodException: undefined local variable or method `upto' for 1:Fixnum

   at Ruby.Builtins.Kernel.MethodMissing(CodeContext context, Object self, Procproc, SymbolId name, Object[] args) in Kernel.cs:line 169

 

>rbx.exe /run:recursive.rb

Unhandled exception:

System.MissingMethodException: undefined local variable or method `printf' for #

<Object:0000002b>:Object

   at Ruby.Builtins.Kernel.MethodMissing(CodeContext context, Object self, Proc

proc, SymbolId name, Object[] args) in Kernel.cs:line 169

 

At this point I gave up. I although I appreciate this early access we are being given to the IronRuby project, maybe this is a little too early? It seems like this particularly drop of the code is just too raw to be much use.

Don’t get me wrong I don’t want to seem anti-ruby, there are a number of positive things about the release – particularly the very liberal license, the fact it will be hosted on RubyForge and the fact that they will be accepting community contributions for the libraries. In fact I’m so intrigued by Ruby I’ve actually ordered a book Programming Ruby by Dave Thomas, Chad Fowler and Andy Hunt, I’m particularly interested in how creating DSLs in Ruby differs from creating them in an ML style language (i.e. F#). All I’m saying is maybe the IronRuby team would have been better holding off the release a wee bit longer and delivering something a little more complete.

Feedback:

Feedback was imported from my only blog engine, it’s no longer possible to post feedback here.

re: IronRuby PreAlpha1 Release – A Little Disappointing - Aaron Junod

From what I have read, the point of this release was to get the community access to view the underpinnings, not so much for real use. Array and string are the only builtins that have been implemented in any usable form, and even those aren’t done yet.

re: IronRuby PreAlpha1 Release – A Little Disappointing - Robert Pickering

On further reflection I guess what surprises me is that the community would want something so raw, but if they want it, I guess there’s no harm in letting them have it.

re: IronRuby PreAlpha1 Release – A Little Disappointing - Seo Sanghyeon

The thing is that John Lam said in May that the source will be released at OSCON. If he didn’t release “pre-alpha”, he would have been accused of playing Microsoft, not intending to publish source code at all, etc.

re: IronRuby PreAlpha1 Release – A Little Disappointing - Robert Pickering

Isn’t that an admitting that a PreAlpha release is just an exercise in propagranda? :-)