zerosum dirt(nap)

evolution through a series of accidents

zerosum dirt(nap)

Fooling Around with Mirah and Android

December 20, 2010 by nap · Comments

Have you spent any time playing around with Mirah yet? You should. It’s developing into a pretty awesome language. Or maybe just a fantastic Ruby-like syntax for Java, depending on how you look at it. Mirah as a language (err, compiler) is still a work in progress, but it’s very usable as-is and fun to play around with.

If nothing else, it certainly makes writing trivial Android applications more enjoyable. Want to write one yourself? Check out Protoform, a little Mirah Android app generator that I tossed together a few weeks ago. Install it via Rubygems and get your droid on:

gem install protoform
protoform -S ~/android/sdk -T "Hello Android" -P HelloWorld

You’ll want to have JRuby and Mirah installed of course. Get JRuby with RVM and then gem install Mirah.

If you want to do Android work in straight Ruby instead, you can take a look
at Ruboto. However, Ruboto runs on Android
via JRuby, which means the runtime needs to be bundled in to the APK, leading
to large file sizes and slow execution. Mirah, on the other hand, compiles
straight to Java bytecode with no middleman and makes direct use of the Google
Android APIs. Ruboto is under heavy development and coming along nicely though, and the more Ruby-like API wrappers are a welcome alternative.

Both of these projects have the potential to be pretty important stuff. As
does anything else that makes mobile client development less painful
(Appcelerator, Phonegap, Rhomobile, etc).

blog comments powered by Disqus