harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Prepscius <timprepsc...@gmail.com>
Subject harmony as one smallish library, small as possible, postmortem
Date Mon, 07 Jun 2010 06:10:06 GMT
So, I'm writing this really for google/bing and for other developers
who may wish to avoid the pitfalls I fell into.  Perhaps someone
searching for information on small jvms will see this post and be

Here was my situation:

I have written a "big thing."  This "big thing" depends on java for
scripting.  For the longest time, I waited and waited for Sun to get
their * out of their *, as release java as a mini jvm + dynamically
downloadable libraries (I have been working on "thing" for a long
time).  But alas it is still a bloated monster.

Eventually I found their phoneme.  But phoneme was under gpl.  Which
means I can't use it.  I even asked Sun for clarification whether this
was a "gpl, but we really mean lgpl, so don't worry," but they
responded, "no this is gpl gpl. You need to pay us for a commercial
license."  Sigh, I am poor.  So then I looked around for other
possible java implementations, but there were non competent which were
not gpl.  And my "big thing" needs to work on "xbox" + "ps2" +
everything else.

So then I tried using python.  But I can't stand python.  I think it
sucks.  It doesn't suck as much as php.  But it sucks about as much
anyway.  So about that time I said, "ok, if there is still nothing
viable out there, I'll either get dalvik working on win32 or write my
own."   But then I looked at dalvik's code.  At I saw a 60 line
#define.  And I thought, "wow, this is gross."  Also, their developers
seemed unable to contemplate things running on win32.  Blasphemous I

So then I found apache harmony.  Apache harmony is also a bloated
monstrosity, but it is not gpl.  Which makes it a bloated monstrosity
with potential.

Also, there is a hidden gem within harmony.  The intel JIT portion was
written by someone within the tao.  Kudos to you.  You should meet
Eberly.  He is also within the tao.

Anyhow, I spent many many an hour trying to get things to cut out
code.  I am very good at this sort of thing.  But the pieces are so
interwoven it is very very difficult.  (And I was aiming for under 1
meg total.)

And then... (dah d-dah tah!!!!)

I found MikaVM..    MikaVM was awesome.  It isn't gpl.  It is very
very small, but complete.  It didn't run under win32.  Which was a
problem.  So I ported it.  It took 3 weeks.  1 whole week was chasing
down a floating point operation bug, which now I understand more about
floating point returns/registers than before.

It is quite fast.  And I've profiled it extensively and made a few
portions faster.  The JNI code/headers for Sun and Mika turn out to be
almost exactly the same, so interchangeability is easy). I've been
running it for about a half year now with no problems.

So..  If you are writing a "big thing" and are looking for a small
jvm, whose total foot print is about 1.5 megs.  (including single jar
file).  Look at MikaVM.

(June 2010)


View raw message