Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News JRuby Roundup: Google App Engine Support, BiteScript, New Compiler

JRuby Roundup: Google App Engine Support, BiteScript, New Compiler

Leia em Português


JRuby 1.2 was released a few weeks ago (InfoQ's coverage of JRuby 1.2RC1 contains an overview of the changes). With this release out of the way, the JRuby team now started exploring some new projects.
Ola Bini has been busy testing JRuby and Ioke on Google's newly announced Java support for Google App Engine (InfoQ's coverage of Java on GAE). Ola's explains the requirements JRuby and Rails on GAE and how to set up a JRuby on Rails app:

You need a fairly new copy of JRuby. Most of the changes needed to JRuby was added to JRuby trunk right after the JRuby 1.2 release, so check out and build something after that. The newest Rails version works fine too.

Since GAE doesn't support an RDBMS, there is no JDBC. Ola provides Bumble, a wrapper around Google's DataStore.

JRuby is just one of the JVM languages supported on GAE, others being Clojure or Rhino (Google maintains a list of language support). Ola also lists some of the GAE restrictions that cause problems for JVM languages; examples are changes in reflection, threading, bytecode verification and others.

Meanwhile, Tom Enebo created JRuby-Parser, which extracts JRuby's parser from JRuby and allows IDEs or other tools to use it without shipping the complete JRuby.

Charles Nutter started work on a new Ruby compiler, which aims to compile Ruby types to Java classes:

* It will use my bytecode DSL "BiteScript", just like Duby does
* It will use the *runtime* definition of a class to generate the Java version

The second point is an important one. Instead of having an offline compiler that inspects a file and generates code from it, the compiler will actually used the runtime class to create a Java version. This means you'll be able to use all the usual metaprogramming facilities, and at whatever point the compiler picks up your class it will see all those methods.

Charles also released a useful tool for generating bytecode with JRuby: BiteScript, an internal DSL for creating bytecode. JVM bytecode mnemonics are mapped onto Ruby methods which generate the bytecodes; methods for creating classes or methods complete the API and provide a compact way to generate class files.
For more information, see Charles' post on the BiteScript release.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Groovy

    by Ali Motaz,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    when I see articles mentioning JVM languages which don't even hint at Groovy, it just makes me wonder.

    what kind of Java developer, doesn't know about Groovy, or is not even interested? what kind of Java developer doesn't know that the current most talked about Java company SpringSource is invested into Groovy and pushed for its support on GAE?

  • Re: Groovy

    by Sebastien Auvray,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Do people have to talk about (J)Groovy each time they mention "JRuby" or scripting languages? The answer is simple: NO.
    So please Ali and all groovy-enthusiats, keep your comments when they are more appropriated and stop your childish daily propaganda. Actually I thought (J)Groovy didn't need such poor propagadvertising anymore but it seems it still does...

  • Re: Groovy

    by J B,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Sebastien, you are dead on. There seems to be some weird fear that increased interest in JRuby means the end of Groovy. And article about JRuby is just that, and need not mention Scala, Clojure, or whatever unless there is some specific pertinent reason.

    Ali: So, what was the missing Groovy content? What essential information relating to Groovy was missing? (BTW, now that the JRuby team has gone to Engine Yard, I think EY is the current most talked about Java company. :) )

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p