InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Ruby 1.8.8 and the Road to Ruby 1.9.1

Posted by Werner Schuster on Feb 24, 2009

Sections
Development
Topics
Runtimes ,
Language ,
Ruby
Tags
JRuby ,
Ruby1.9

With Ruby 1.9.1, the stable version of Ruby 1.9 is now available, yet many are still reluctant to switch, be it for lack of 1.9 compatible libraries or uneven tool support.

Ruby 1.8.6 will be maintained for the near future, despite the fact that Ruby 1.8.7 has been available for quite some time. Ruby 1.8.7 caused some debate because it backported some features from 1.9 and also had some breaking changes (compared to 1.8.6), which also prompted the JRuby team to skip Ruby 1.8.7 support for the moment (although that might change).

The debates about the future of the 1.8.x branch  was restarted recently, partly because Ruby 1.8.8 is supposed to be released later this year.

In this discussion, the maintainer of Ruby 1.8.7+, Akinori MUSHA, posted a rationale for the plans for 1.8.8:

1.9 is the only future and 1.8.6 or prior is the ancient past for you. 1.8.7 is the past too, but you might as well support ruby 1.8.7+ as an extra gift for not-ready-to-move users only if you feel it's not too hard. In ruby 1.8.8, syntactic compatibility will be added to make it even easier to write code for both 1.9 and 1.8.8+ in a single source file without compromising optimizations for 1.9.

If you still need to write code for 1.8.6 but have some intention to support 1.9 in future, then try running your program under ruby 1.8.7 and the forthcoming ruby 1.8.8 with a warning option (-w) as a start.

While the official 1.8.7 has a few backported features from Ruby 1.9.1, there are other ways to make use of 1.9.1 features. Very useful are Fibers in 1.9.1, which have been used for some significant scalability improvements to Ruby database adapters. NeverBlock added 1.8.x support with "Poor Man's Fibers" to its library.

Now this port is available in the form of patches against 1.8.6_p287 and 1.8.7_72 :

At Kickball Labs, Aman Gupta (http://github.com/tmm1) and I (http://github.com/ice799) [Joe Damato] have been working on an implementation of Fibers for Ruby 1.8.{6,7}. It is API compatible to Fibers in Ruby 1.9, except for the "transfer" method, which is currently unimplemented. This patch will allow you to use fibers with mysqlplus and neverblock.

No comments

Watch Thread Reply

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.