Posts Tagged ‘jruby’

MRI: boring, but reliable

July 8, 2013

A year ago, I filed a bug report for JRuby. Unfortunately, the bug is still alive and well today. Its name is JRuby 6763.

I am interested in the idea of Ruby having alternative implementations. Such alternatives have their own advantages, and create their own opportunities, such as bringing Ruby into a Java only shop.

I also like the JRuby team. I’ve met Charles Nutter and Hiro Asari in Australia and Japan, and I like them. Not to mention Yoko Harada, and other people I’ve met who I either forgot their names, or forgot they were JRuby people. JRuby people have also contributed to MRI, which is wonderful news for a world where too many unnecessary divides exist. In addition, the JRuby team fixed a performance issue that I encountered (JRuby 6766).

But my experience with MRI, compared to that of JRuby and other implementations, is that MRI has never produced false information, whereas the alternatives have.

What I mean by this is that I’ve found bugs in MRI that causes it to crash. But I’ve never written a program that successfully executed, but gave me incorrect output. By contrast, both of the major alternatives have done so.

In fairness to the other implementations, some of the Ruby code that I’ve had issues with has been fairly obscure and esoteric. I was the one who complained that Rubinius didn’t implement the flip flop operator. And JRuby 6763 is about trouble when I use a method named … “method”. 

I don’t know why MRI has been more reliable for me. It could be a different culture in the MRI team compared to JRuby or Rubinius. It could be that MRI has more staff and volunteers. Or merely that MRI has more users, which mean bugs are detected earlier.

No doubt, some people have code that works fine on alternative implementations, but has trouble on MRI. I can only talk about what I know.

As to why I haven’t fixed 6763 myself? With regards to fixing it in work hours, the problem is that I’m a bioinformatician, not a programmer. I wouldn’t be able to justify learning Java during work hours to be able to fix this problem. And with regards to spare time, I spend too much of my time staring at a computer screen as it is, and becoming a JRuby patch submitter would make it worse.

Do I feel “entitled” to a bug fix? No I don’t. The only thing I’m entitled to do is write a blog post expressing what I think.

Would I use JRuby if this bug were fixed? Not in production. The first thing I’d do if this bug were fixed would be to run the unit tests failing because of 6763, and try to find another bug or three to complain about! I might also use JRuby to profile my application for CPU usage or object creation.

Do I think the JRuby team doesn’t pay enough attention to bugs? I wouldn’t assume that. This is just speculation, but I assume the core team decided their time is best spent on major tasks that improve JRuby, and that bug fixes that don’t affect many people and are trivial to fix are best handled by casual committers.

Unfortunately, I don’t have the answers for what can be done. Is it more users trying out alternative implementations? More paid staff? Or something else? I don’t know.