#1855 Fan over LLVM question

Xan Sat 24 Mar 2012

Hi,

I'm a newbee. I know there are efforts to porting Fantom code to LLVM like this, but why don't use VMKit?

In theory is for that, isn't?

KevinKelley Sat 24 Mar 2012

Question is, why? If all you want is a JVM to run fantom on, there's already solid ones, that don't have to be built. If you really do need to re-do the java runtime, look at Avian -- it's small, easy to use, and has an really good maintainer.

(this turned into a rant. It's not directed at the fan-llvm project; I think that's a really cool thing, hope it continues.)

If you're trying to compile an app down to native, probably it'd be a lot easier to go thru GCJ -- emit fantom to java, then compile the whole thing. But that's not especially exciting either.

I've got bindings to LLVM, I'm trying to go somewhere useful with it. But I don't think it's a good bet to just dump the whole JVM onto it; I don't see how that path could possibly compete with years and mega-dollars of JVM development.

Definitely there's some good research and development in MMTK, Java taught everybody a lot about how to do good GC, and it's all there ready for stealing. But it's not the only thing -- Haskell's got a really fast runtime that has a lot of the latest stuff and fits in like 500K; python's got a whole progression of ever-more-refined GC's you can play with; there's all kinds of possibilities. Lua's got a nice small, embeddable runtime, worth a look...

Thing is that a system, to be more than a toy, needs to be more than just some bolted-together parts. If you want to be a nicer way to use the JVM, which is a really good idea in itself, then focus on that -- don't try to do a bad re-implementation of what the JVM already does.

(Ceylon, btw, is looking like an interesting new way to live on the JVM -- but still too new to be sure where they'll end up. Groovy's got boatloads of sugar and really easy interop. Or do Clojure, and know you're one of the chosen ones... :-).

If you want to run on devices... my phone is bigger than the whole university time-share was, where I went to college. Counting GPU I've got more processors on my desk than my whole graduating class had access to. I can tell you all the digits of pi, but I still can't get anything done.

Everybody wants to "fight the last war", instead of the next one. Some of the things we need, call for something completely different. I want my email app to follow me, when I leave work -- I run 3 different email clients all the time, that all duplicate the same work, and that don't really talk to each other -- so my sent folders are scattered. Sure I could fix that with webmail, but... webmail. (Who thought that was a good idea? It's slower than that time-share from wayback; plus I then don't actually have my mail.)

Things like that don't call for another JVM; but maybe something like transportable code -- like the ideas from Spoon (on squeak smalltalk) of a really tiny set of objects that can serialize themselves across a network to run where-ever you go. And some decent use of virtualization tech (Xen, PNaCl stuff) to make it safe.

So anyway. Doing another JVM would probably be fun. But not nearly as much fun as doing something new.

What was the question again? Gimme a good idea involving fantom and llvm -- I be all over it.

Xan Sun 25 Mar 2012

Question is, why? If all you want is a JVM to run fantom on, there's already solid ones, that don't have to be built. If you really do need to re-do the java runtime, look at Avian -- it's small, easy to use, and has an really good maintainer.

(this turned into a rant. It's not directed at the fan-llvm project; I think that's a really cool thing, hope it continues.)

If you're trying to compile an app down to native, probably it'd be a lot easier to go thru GCJ -- emit fantom to java, then compile the whole thing. But that's not especially exciting either.

It's. I want to compile Fantom to native. And I thought VMkit does Sorry for confusion.

Is there any way for compiling Fantom to native? Or LLVM Virtual

machine code (I ear that it's faster than GCC)

Login or Signup to reply.