Sunday, June 10, 2007

JRuby 1.0 Released!

We have finally released JRuby 1.0, based on the last release candidate, RC3. And what more is there to say? Not really a whole lot...It's almost entirely RC3, with one or two minor fixes added in. But it's really turned out to be an outstanding release, and already reports are coming in of folks trying it out en masse. We're very happy.

So I'll do a little recap here. JRuby 1.0 was focused almost entirely on one goal: Ruby 1.8.x compatibility. To that end, we are now the only alternative Ruby implementation that can reasonably claim we're "compatible". It's no longer a question of whether we can run Ruby applications or not...we've proven that again and again. The issues people run into now are those requiring minor behavioral tweaks, minor parser tweaks, and occasionally exploration of some peculiar threading or memory concerns. It's been a long time coming, but the compatibility issue is largely answered.

Now we start looking toward the future. Once you have a working Ruby implementation, what next? I believe we've shown that the correct way to approach Ruby is to get it right first. The next step is making it run as well as possible. Ok, so we've cheated a bit along the way, introducing interpreter optimizations and a JIT compiler, but that's all fun stuff. The heavy lifting for performance and scalability are coming up, and there's a lot of low-hanging fruit we can start to tackle with 1.0 safely behind us. So action item #1 for the future of JRuby is plucking that low-hanging performance fruit.

The second item for any working implementation would have to be platform integration. Our platform is Java (and of course we've cheated a bit here by doing additional work to make Java integration really useful and usable), so integration involves making Ruby a better citizen of the Java platform. In this area, expect to see us further reduce the disconnect between Ruby and Java, allowing you to construct Ruby objects directly from Java code, define real Java classes using Ruby (classes you can then compile Java code to call), and minimizing to as large an extent possible the performance impact of calling from dynamically typed Ruby code into statically typed Java code. Java integration is action item #2.

And then what? Well, there are many options, all very attractive. I personally would like to see time spent implementing potential Ruby 1.9/2.0 features, to provide a second testbed where people can try those features out. I would like to find ways to share code with Rubinius (beyond tests), either by implementing just enough Rubinius logic to run its pure-Ruby core-class implementations or by implementing a full Rubinius kernel on the JVM. I would like to see JRuby expand to the rest of the Java world, bringing the Ruby Way to Java EE. But most importantly, I want to reach out to the Ruby community and find ways for them to be a part of the JRuby process.

Up to now, JRuby has really existed in its own, separate world. There was the Ruby community and also the JRuby community, and although members might identify themselves with both, there was always this perceived boundary.

We need to break that boundary down...not only for JRuby but for the other Ruby implementations as well.

Ruby is coming of age. Multiple implementations shows that Ruby has really matured as a language...and also shows it has a lot of maturing left to do. Ask Evan (of Rubinius) or me how we feel about retry behavior or block argument processing or thread event processing or SAFE levels and tainting and you'll start to understand some of the ugly, hidden bits of Ruby. We need to make sure that Ruby development proceeds as a whole...not necessarily as a single project or a single codebase, but as an open, direct exchange of concerns, complaints, solutions and ideas. We need to start treating the Rubinius community and the JRuby community and any other implementations' communities as part of the whole...different facets of the same gem.

If you have never tried an alternative implementation of Ruby: do it today. Pick out your favorite app, library, or framework and build your next app using something other than Matz's Ruby. Start running your continuous integration tests against JRuby trunk (or Rubinius trunk, if it runs your code ok; those guys sorely need more CI hits). Make sure your gem releases work on JRuby too, and if you have native (i.e. C) code, explore what it would take to do a JRuby port. Show that you welcome diversity into the Ruby world...that you recognize that diversity is an essential part of language evolution.

JRuby has always been a community project, and only by absorbing the JRuby community into the Ruby community will JRuby continue to be successful. If we can make that happen, I see wonderful things in Ruby's future...regardless of which implementation you use.

19 comments:

Anonymous said...

Good job for the team's work. However, I think I will not try JRuby until it supports for 'win32ole'. I am always program in Windows platform and I use quite a lot of window's ActiveX dll. If I want to port my current application to JRuby, supporting'win32ole' is a must for me. I heard about the Java JACOB before, but never explore how it could use in JRuby.

Nap said...

Thanks so much to the entire team for the hard work. This is great, and the future sounds hugely exciting!

Karl von Laudermann said...

What should you work on now that you've reached 1.0? I think you should polish up the user experience of downloading, learning, and getting started with JRuby. Specifically:

1. Documentation. I've only poked at JRuby once or twice, and it took a while to figure out how to get started. The only good "getting started" info I've found was this tutorial by Ola Bini: http://jruby.codehaus.org/The+JRuby+Tutorial+Part+1+-+Getting+Started
And I think it's out of date by now, at least with respect to how to include Java classes, if not other stuff.

The docs folder of the JRuby distribution contains no info about the basics; you'd think something like that tutorial (an updated version) would be included with the distribution itself. (And BTW, some of the files in the docs folder contain HTML, but have a .txt extension, which makes them render as plain text and thus are hard to read with all the markup.)

There needs to be a "getting started" tutorial that covers all the basics, such as: how to run a JRuby program, how to include Java classes, how to sublclass Java classes and implement Java interfaces, and how to distribute a JRuby program as a .jar, possibly using jruby-complete.jar (see item 3 below). And it should come in the distribution, or have a more prominent link of the web site.

2. Better downloads page. Right now the JRuby download page is just a directory listing. Which download do I want? Do I want src or bin? I assume I'd only want src if I plan to hack JRuby itself, so I downloaded the bin distribution. Is there anything in the src distribution that's missing from the bin one that an ordinary user might want? A nice pretty downloads page, showing only the latest version files, but with a link to older versions, and with an explanation of who would want which one (src or bin, gz or zip, etc.), would be helpful.

3. This isn't really a separate "task" per se, but I remember in an old blog post you mentioned something called jruby-complete.jar, which makes it easier to distribute JRuby programs to people who don't have Ruby or JRuby because it's completely self-contained. What ever happened to it? I don't see it in the bin distribution of JRuby 1.0. Is it something I have to build myself, meaning I need the src distribution instead? If jruby-complete.jar is the cleanest way for someone to distribute a JRuby program to end users with the least hassle on their part, it should be part of the default distribution, and it should be documented.

4. Lower the barrier to entry for reporting bugs. The first time I tried out JRuby, I found a bug, and wanted to report it. The process for doing so was so burdensome that I gave up and just emailed you directly (and you never responded, so I don't know if you even got it). The current procedure, to the best of my knowledge, is:
- Sign up for a login account to CodeHaus, so you can actually submit a bug to the tracker
- Ensure the bug does not still exist in the latest nightly build, which itself involves:
-- Install Subversion, if you don't already have it
-- Learn to use Subversion if you don't already know how
-- Figure out how to access the JRuby repository from Subversion; I couldn't even find info on how to do this, as the only link I found goes to the web-browsable repository listing
- Finally, report the bug!

I just wanted to give JRuby a quick try out of curiosity; I don't want to become a contributor to the JRuby project itself, at least not yet. It is currently impossible for such a person to report a bug. Why not just have a bug submission form that's easily accessible from the JRuby front page, and which anyone can use without having to log in or sign up for anything?

So, in summary, I think that, now that 1.0 has been released, some work should be done on improving the presentation. I know that this is an open source project, but since it is actually backed by Sun, I think it should have a more polished and professional presentation overall, both in terms of the web site and the user experience. It should be made easier for new users, who know little to nothing about JRuby, to learn about it, download it, and get started using it.

Well, that's my 2 cents anyway.

Guillaume Laforge said...

Congratulations, Charles, and all the team! I know how it feels when we eventually release a 1.0!

Fabio Akita, PMP said...

Congratulations Charles, Thomas and all JRuby Core Team. This is indeed an important milestone for all Ruby communities. And I totally agree on having Rubinius more on the spotlights. Their efforts can't go on unnoticed any further. I guess the future of JRuby + Rubinius opens up big doors!

Anonymous said...

Congrats Charles !

As a Ruby Nuby I've had a lot of use of JRuby combined with the work of Tor Norbye delivering the best Ruby IDE to date.

The Netbeans Ruby download with integrated JRuby has been the most complete and easy to use start for someone like me, even though it's all been heavily beta up til now.

I agree documentation could be of great use for Nubies,since I almost lost my source to open a generic JDBC link (with some nifty extensions of the JDBC connection class) and could not rebuild it because the forum threads I based it upon were lost.

But otherwise its been a great ride, and indispensible for the stuff I do at work now.

Morampudi Bhanu said...

Congratulations to the entire JRuby team. A great job indeed!

Thank you for not "embracing and extending" Ruby and for being a good member of the community!

Anonymous said...

to further success jruby release needs:

1) better documentation about the differences between cruby and jruby. specific functions will not return what you expect.

2) better examples. previous releases weak on examples of how to integrate java and ruby, which is important since it is an evolving solution space.

3) better community of how-to's. blogs are great, but they require lots of searching and an inherit understanding of the language and vocabulary. seems like jruby is different enough to warrant it's own community board for posting tips (eg. how to install jruby get rails running and deploy to glassfish). the value proposition is ther, is it time to move up a level of knowledge accretion?

4) mongrel.. i could never get it to work under rc2, yet it is arguably the most recommended web server environment used by rails (not jruby, but ruby's largest application base by far). should it be supported out of the box?

keep up the good work guys :)

Justin said...

Well done everyone - thank you all, and thank you especially, Charles, for your even-handed support for other languages (dynamic or not) on the JVM.

Justin said...

P.S. Don't forget to put the news on the JRuby site!

Nick said...

Congrats! And thanks...

Anonymous said...

---------------------------------
undefined method `require_gem' for main:Object (NoMethodError)
---------------------------------
It was a dissaponting first try for me due to above error message which is caused by the following line:

require_gem "activerecord"

Is it me or JRuby?

And also congratulations for the whole team for such an achievement.

Anonymous said...

C:\jruby-1.0\bin>jirb.bat
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require_gem 'activerecord'
(irb):2:Warning: require_gem is obsolete. Use gem instead.
=> true

It is all ok!

Anonymous said...

After you have installed rails,Your jruby's bin(eg:C:\jruby-1.0\bin) does not contain a file call rails.cmd
your should create a file named rails.cmd.
it contains the following contents:
@jruby "C:/jruby-1.0/bin/rails" %*

Anonymous said...

I know this isn’t exactly JRuby, but any support/bug-fixes to facilitate the Eclipse plugin RDT working well with JRuby would be very appreciated.

Atif Khan said...

Here are my impressions. I downloaded JRuby 1.0 and the WAR sample from sourceforge.
Deployed the war on Resin. The home page for app shows up, but no image. I click on "About your application’s environment" link and I get an error page that no route mapping found.

Deployed the war on Tomcat. The home page shows with image this time. I click on the same link and I get the same error about route map, but in a div this time with AJAX behavior.

Gettting frustrated with this, I switch back to regular ruby interpreter and launch the Webrick server and my application works completely fine. It even works orders of magnitude faster than what JRuby was giving me. Just to emphasize this is again with Webrick, Apache or Ligttpd will work even faster.

The morale of the story is that JRuby is not ready for use yet. In fact it should still be in beta. See you guys around 2.0 release.

Anonymous said...

Atif Khan: have you seen regular Ruby 1.0 ? I remember that 1.4 was 50x times slower at IO than it is now. JRuby 1.0 is in *much* better shape than MRI was not that long ago.

Atif Khan said...

All I am saying is that stop touting the performance and stability when it does not display that behavior currently. Unfortunately JRuby right now will be compared against the latest Ruby release, not with some old release.
JRuby is a very interesting project and hopefully it will have a major impact in the Java world. I was hoping with Sun's open support to JRuby (compared to Groovy) things will move a lot faster.

Martin said...

Should Ruby facets work with JRuby? I installed the gem, but doing:

require 'facets' fails. Any suggestions?