I often think that the Ruby world would be a more productive place if the original implementation had leveraged the JVM.
I often think that the Ruby world would be a more productive place if the original implementation had leveraged the JVM.
http://erik.debill.org/2011/02/03/ruby-performance-in-the-ra... http://erik.debill.org/2011/02/19/ruby-start-up-times
And the Torquebox team (Torquebox being a JRuby Rack app server using JBoss) also did some benchmarks and discovered (surprise, surprise) that Torquebox on JRuby significantly outperforms the alternatives on 1.9.2:
http://torquebox.org/news/2011/02/23/benchmarking-torquebox/ http://torquebox.org/news/2011/03/14/benchmarking-torquebox-...
(Disclaimer: Of course, benchmarks aren't authority figures so it's always worth running them for yourself..)
Then there's algorithms, support for just about any protocol under the sun. And the Java standard library is surprisingly complete as well - what you need might even be installed with your JVM.
Try googling for a Java library next time you think of something you want to do.
This kind of turned in to a spreadsheet gem rant, but if you step back, it's typical of a greater problem. The Ruby community is relatively small when compared with the Java community. It's also significantly less "enterprisey". This means that you'll see a lot of effort put in to things that developers like -- clever libraries, syntactic "sugar", etc -- but you're less likely to see mature libraries like Apache POI. Who the hell wants to sit around and figure out BIFF8, anyway? A lot of the enterprise stuff just isn't fun, but there are plenty of Java devs who get paid to do it for their day jobs.
By using JRuby, you can benefit from both worlds.
... if the original implementation had leveraged the JVM
I think that's a horrible idea. The JVM is an awful platform for any kind of language research & development, unless the type-system of that language is basically the same as in Java. I'm actually pretty upset that they've taken continuations out from 1.9 - most likely JRuby bares some blame.Not to mention I would prefer to keep Oracle(TM) tainted stuff out of my lawn, as at this point I consider Mono/.NET to be more safe than Java.
What I really want and what is needed - a reference implementation written in 80% Ruby (or more). That's like Rubinius or Pypy, but adoption isn't great even though these virtual machines have shown better performance than the reference implementation for computational-heavy tasks.
And adoption isn't great because remarkable libraries written in native code won't run reliably or at all on top of them (e.g. Python's Scipy).
And JRuby shares the same problem, although it has the advantage of being able to use JVM-alternatives. But then you're stepping out of the Ruby ecosystem, which makes it a fork.
And to get back to "JRuby as reference implementation" ... it would be an even greater pain in the ass for alternative implementations, because C is more portable than Java.
Also, native libraries are becoming less of a problem now that libffi has a bit of momentum.