remi wrote:
> Is there an official resource out there, somewhere ... maybe a ticket
> on the wishlist of an Android bugtracker ... with the status of
> updating Dalvik to be able to run dynamic JVM languages, such as
> Jython/JRuby/etc?

You assume the problems, where they may exist, lie with Dalvik. That's 
not necessarily the case.

> I'm a professional Ruby coder, and I get questions *all the time*
> about whether or not Android applications can be coded in Ruby.

I'm a professional Ruby coder as well (when I'm not coding up 'droids), 
and I happened to do some light poking on this earlier today, thinking I 
might give it a shot and write it up in a chapter in my 
yet-to-be-announced Advanced Android book.

Which, apparently, I just announced. Ahem.

Anyway...

The JRuby runtime is 7MB, not counting any generated code. That right 
there is a show-stopper, at least for me for the T-Mobile G1, as that's 
one heckuva pudgy runtime. Until there are Android devices out there 
with a lot more application storage space, I can't recommend building an 
app with that big of a footprint.

I also anticipate that JIT mode (running a JRuby script on the device) 
won't work, because JRuby generates JavaVM bytecodes, not DalvikVM 
bytecodes. For AOT mode (jrubyc converting a JRuby script into a .class 
file), that's not an issue because the Android toolchain should be able 
to convert the bytecodes as part of packaging up an Android APK.

To get any JVM language that applies JIT techniques to run on Dalvik, 
one of two things needs to happen:

1. The language in question supports a mode that generates DalvikVM 
bytecode instead of JavaVM bytecode

2. The JavaVM->Dalvik VM bytecode conversion logic gets put in silicon 
as part of the Android OS

If you want the former, contact the developers of the language in 
question. If you want the latter, enter a feature request on the Android 
issue tracker, if there isn't one there already.

Languages that do not use JIT to run scripts, like Beanshell, work quite 
nicely on Android.

I may still run some experiments, first to test AOT mode and confirm 
that it can work, and then to see if there is a way to run JRuby 
JIT-less while still interpreting scripts on the fly.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to