[squeak-dev] Re: [ANN] Squeak on Android

Andreas Raab andreas.raab at gmx.de
Tue Jan 19 04:02:32 UTC 2010


Göran Krampe wrote:
> Andreas, I *love* you! :) This made my day.

Heh, heh, you're welcome. It's still a long way to go though.

> We are focusing hard on Android here at MSC and having Squeak on it is 
> extremely interesting.

Great! Think you can spare some resources to move things forward? :)

> Now, the absolutely coolest thing would be if we somehow can "tap into" 
> all that java code. Have you given that any though? I even looked at the 
> Dalvik source code to play with the thought of merging a Squeak VM with 
> a Dalvik VM...

There are two approaches here, with different tradeoffs:

1) Write generic bridge to Java (using JNI). That's a sizable chunk of 
initial work, but once it's done you will be able to interact seamlessly 
between Squeak and Java. I've built a similar bridge (to Python) and it 
works extremely well.

2) Build an AndroidPlugin that abstracts the relevant functionality and 
implement whatever needs to be done from the plugin via JNI. This 
doesn't require you to implement a generic bridge but rather only the 
pieces that you really need in your app. Plus, you can have proper 
fallback code if the plugin is absent.

Personally, I'll follow the approach #2 for several reasons. Most of 
all, it's easier to do in the hobbyist mode that I'm working on this 
project. I can add one function at a time, test it, commit it, get on to 
the next. The Java bridge would be intellectually challenging but is 
just not doable with the amount of time it would require (about a month 
of full time work for me - translated into weekends and evenings that's 
roughly 6 months or so). Plus, it's not all that much fun compared with 
the alternatives that I could spend time on. I *could*, however, give a 
good bit of advice on how such a bridge would need to be designed if 
someone were to take this on (it's actually rather simple - the trick is 
in transparently mapping oops so that you can pass objects back and 
forth without them being "accidentally" collected).

Cheers,
   - Andreas



More information about the Squeak-dev mailing list