Hacker News new | past | comments | ask | show | jobs | submit login

> Here's what I don't understand: why is there any focus on alternative VMs for specific languages? Surely all this effort should be going into a VM for some kind of highish-level intermediate representation that's trivial to generate from any source language? That way no language has a monopoly and there can be peace on Earth.

I've always wondered: why not LLVM? It's low-level, so the speed is there, and I think should be trivial to compile as it arrives at the browser. Tons of stuff already compiles to it. You can compile it to JS. Of course, you'd need to make sure it doesn't make a syscall that's not allowed (and I'm not sure how hard that is), and that it has bindings into JS APIs and/or the DOM, but aside from that…

I'm sure some people will suggest things like the JVM or the .Net CLR, but I feel like those have certain qualities (e.g., GC) that don't appeal to all languages.




> I've always wondered: why not LLVM?

Because LLVM is not hardware independent.


Also, LLVM IR has undefined behavior and was not designed as a network format (it's large).

LLVM is simply not a good starting point for the problem here, nice as LLVM is for what it does do well.


That didn't stop PNaCl. (Which has its share of problems, of course, but I think it makes the hardware dependence meme pretty moot.)


PNaCL is probably closest to what you want.


I have been wondering the same thing. JS might be a good language. But we should still have a choice to choose other languages.

I'm seeing efforts with asm.js turning JS into a byte code language aka. LLVM IR. I'm not sure if turning JS into a byte code language is the best way either. It is still too high-level language. And it seems like a ugly hack.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: