“Ruby, Ruby, when will you be mine?”
Thats a line from “Ruby Baby,” a song written by song-writing duo Jerry Leiber and Mike Stoller in the 50s. The Drifters were first to record it, but later, among others, Dion, Billy “Crash” Craddock, Del Shannon, The Beach Boys, Bjork and my favorite, Donald Fagen of Steely Dan fame, all did renditions of the song.
And just as those artists made the Ruby Baby song theirs and spun it for their audience, software development artists are spinning the Ruby language to make it “theirs” so it can appeal to their constituents. Theyre taking the core code and building on it, branching it out and launching their efforts on .Net, the Java platform and elsewhere.
Already this year theres been a lot of movement on the Ruby front. February, in particular, has been a busy month for Ruby and its offshoots.
JRuby, the project aimed at creating an implementation of Ruby on JVM (Java Virtual Machine), is nearing a 1.0 release and is expected to drop a new release some time next week (early March), leaders of the project said.
Core developers Charles Nutter, Thomas Enebo, Ola Bini and Nick Sieger are working on the JRuby project and will deliver a release, which will “probably” be called Version 0.9.8 to signify that there will only be one more release before JRuby goes to 1.0, Nutter said. He said to expect JRuby 0.9.9 in a couple of months.
Ive developed something of a fascination with dynamic languages and how theyre being used. Both Microsoft and Sun have been working to add support for dynamic languages on their respective platforms.
In a blog post following Suns hire of Nutter and Enebo last September, Tim Bray, Suns director of Web technologies, said, “Wed like to ensure that the Ruby programming language, in its JRuby form, is available to the community of Java developers. … There is a possibility that the Java platform may prove to be an attractive deployment option for existing Ruby applications in certain scenarios.”
Meanwhile, Nutter said the JRuby project will announce, possibly as soon as this week, that JRuby supports the popular Ruby on Rails Web development framework. Ruby on Rails is sometimes referred to as RoR or simply Rails.
“Were trying to finish off the last few test cases so we can claim that more than 95 percent of core Rails tests passed across the board,” Nutter said.
Moreover, the JRuby team is inviting Rails developers to try out real-world usage of JRuby and help them find any Rails issues the unit tests do not cover, or any remaining failures that are crucial for real applications, Nutter said.
Support for Ruby on Rails is important because “once Rails can run on JVM alongside other Java apps, existing Java shops will have a vector to bringing Rails apps into their organizations. They wont have to toss out the existing investment in servers and software to go with the new kid on the block,” Nutter said.
In addition, Ruby on Rails applications running on JVM will be able to access existing services and libraries without any translation or remoting layer.
“More and more Web developers want to use Rails and may have trouble finding work because its such a new area,” Nutter said. “But if Rails can run on the predominant server platform, theyll have many more opportunities.”
Indeed, Ruby on Rails has already helped change the face of Web development, as evidenced by frameworks like Grails—an open-source Web framework that uses the Groovy language. “Making [RoR] a first-class citizen of the Java Web family will continue that revolution, since the original innovator will now stand shoulder to shoulder with the giants of Java Web development,” Nutter said.
However, Nutter says, there is another issue that is only recently coming to light: Rails on JVM will bring Java developers to Ruby, he said.
“I believe that although Rails is a great framework, full of really innovative ideas, its not the end for Ruby,” Nutter said. “Its Rubys power and flexibility that have made Rails possible, and were just seeing the first wave of remarkable software to come from the Ruby world. I want to see Ruby everywhere, especially on the Java platform, so that the second wave empowers as many developers as possible. And I think that second wave is coming soon.”
Also, NetBeans 6.0 Milestone 7 features Ruby support, and the next release of JRuby will include more bug fixes, more performance work and more improvements overall, Bini said.
Nutters desire to see Ruby everywhere is hastened by efforts like the Gardens Point Ruby.Net Compiler—an effort to create a compiler for the Ruby language that targets the .Net CLR (Common Language Runtime), Microsofts equivalent to JVM.
The Ruby.Net project, headed by professors John Gough and Wayne Kelly at Queensland University of Technology in Brisbane, Australia, announced a new beta, Version 0.6, earlier this month.
Like the JRuby effort, the Ruby.Net team is going after support for RoR. “We have just started work on getting Ruby on Rails to run on Ruby.Net and have started work on adding interoperability features to allow .Net programs written in other languages to conveniently use Ruby components and vice versa,” the Ruby.Net team said in a statement. “We hope to include some of these features in the next public release.”
The Queensland team announced an earlier beta last June, but they have pledged to deliver public releases more frequently from now on, possibly monthly.
John Gough, speaking at Microsofts Lang.Net symposium last July, said Ruby.Net consists of two main parts: the compiler and a runtime library.
In another show of activity around Ruby, the Ruby on Rails project reached Version 1.2 in January and is now on Version 1.2.2 as of early this month.
“Rails 1.2 is a significant release thats the result of some eight months of work since Version 1.1 premiered,” said David Heinemeier Hansson, creator of RoR. “Its packed with hundreds of fixes, features and tweaks.”
The three hottest things in the new (1.2) release are REST (Representational State Transfer) APIs, multiple representations of the same resources and better 8-bit Unicode Transformation Format (UTF-8) support, Hansson said.
“Im definitely the most proud about our support for the REST style and multiple representations of resources,” Hansson said. “The Web community has entered a renaissance of HTTP appreciation, and Ruby on Rails is right at the forefront of that. Just like we were when AJAX entered the scene.”
Ruby was created by Yukihiro “Matz” Matsumoto, who is said to have been influenced by his favorite languages—Perl, Smalltalk, Eiffel, Ada and Lisp. The language hit the streets in 1995.
Of course Ruby has nothing to do with the song with the similar name. Matsumoto got the name from the birthstone of a colleague. Because he was influenced by Perl, he is said to have wanted to name the language after a gem. Also, ruby follows pearl in the birthstone sequence, as pearl is the birthstone for June and ruby for July.
Ruby enjoys a great deal of popularity in the developer community. TIOBE Software, a Netherlands software firm that hosts the TIOBE (The Importance of Being Earnest) Programming Community Index, ranks Ruby as No. 10 among programming languages worldwide. Much of that popularity can be attributed to RoR, which is based on Ruby.
“For me personally, the best thing about Ruby is the combination of it being pragmatic and very useful, and at the same time include much of the power from Lisp,” Bini said. “I like the way you can compress code, shriveling it DRY [a design pattern meaning Dont Repeat Yourself], if you want to. But you can also create very readable and maintainable code that is still less verbose than the mainstream languages.”
Meanwhile, Bray said Nutter and Enebo will have a mandate to think about developer tools. “Right now, developers who use dynamic languages like Python and Ruby are poorly served, compared to what Java developers have,” Bray said.
Helping to fill that void, Sapphire Steel Software, of Hartland, U.K., last month shipped Ruby In Steel Developer, a Ruby IDE (integrated development environment) for Microsofts Visual Studio 2005.
Also, JetBrains offers a plug-in for its IntelliJ Idea development platform that supports Ruby on Rails.
And, not to be outdone, Microsoft is looking at support for Ruby developers and broader uses of Ruby, including having it run on the CLR. Microsoft hired John Lam, creator of the RubyCLR high-performance bridge between Ruby and the CLR, in October. Hes now a program manager on the CLR team. Microsoft also hired Jim Hugunin, author of IronPython, and soon after the company had an implementation of Python running on .Net. One can only suspect that the hiring of Lam could lead to something similar regarding Ruby.
Lam said that as dynamic languages gain popularity, it becomes more important that they play well with others.
Both Suns Bray and Microsofts Hugunin said their companies forays into the world of dynamic languages are opportunities to learn what works and what doesnt.
“We hope to learn from this experience,” Bray said of JRuby.
“As I think about where we go beyond IronPython, what we really want to do next is try to generalize what weve learned,” Hugunin said in a prior interview about what lessons they might use for other dynamic languages that they learned porting Python. “So if we could combine the best of what everybodys learned and tell people, Here is how you do it, then Ruby becomes easy.”
Ruby is obviously on the march. Do you see it as ultimately eclipsing other dynamic languages? Write me at firstname.lastname@example.org.