What happened was, a few days ago I wanted to try out some fancy language technology on Android. A cat got in the way but the WiFi saved the day.
The way I understand it so far, the Android runtime is the Dalvik VM and the “Harmony+Android” libraries (unless you’re a hardcore gamer who wants to bend metal in C++ with the NDK). So I don’t think I need to be tied to curly braces and semicolons forever.
One obvious option is JRuby; no, there’s no rule saying you can’t have another runtime system on top of Android. JRuby runs on Android but isn’t really fast enough yet.
Duby, the Ruby-flavored statically-typed dynamic language that Charles Nutter has been cooking up, might be a good intermediate step, and Phil Hagelberg had built ohai-android to explore Duby on Android.
So I thought I’d get that running as a first step. Unfortunately, first of all you have to get a recent JRuby and Bitescript and then Duby itself, and figuring it all out took me a little while. During which time the cat snuck onto my lap and went to sleep.
Eventually, Ant built my Android app out of 14 lines of Duby, and I needed the USB cable so I could ship it to the phone. The phone was handy but the USB cable was across the room, and my elderly female cat has earned a few evenings of undisturbed lap time.
Then I remembered that my laptop has a Web server and my phone was on the
same home LAN, so I copied the
.apk over to
/Library/WebServer/Documents/whatever.apk and did an
ifconfig -a | grep 192 to find my address and then pointed the
phone’s browser at
The phone installed the app, I proved to myself that it worked, and did some
further enjoyable tinkering, all while routing round the cat.