Hacker News new | past | comments | ask | show | jobs | submit login
LLVM to JS compiler- kripken/emscripten (github.com/kripken)
23 points by United857 on May 31, 2011 | hide | past | favorite | 12 comments



Cool idea. They are taking the LLVM and making more back ends. It would be cool if they could support as many back-ends as Haxe. I've developed in Haxe before and I can say I much prefer it to writing in javascript directly.

I hope these projects can continue. I look forward to the day when I can compile in any language to any platform. Different languages have different strengths. It is unfortunate that these days our choice of language is tethered to the platform we wish to deploy on.

Haxe: http://haxe.org


I'm converting a N64 emulator (mupen64plus) to JS and I find it to be very challenging and fun! I would love to get it to a point of running an actual game instead of just demos. Hopefully, I'm not far from it.

I surely hope to be able to create a post here titled 'Show HN: etc...'

For the heck of it, I'm also attempting to translate a N64 emulator (Jario64) from Java to C# and then JS with Script#

Its crazy that we've gotten to this point, and I intent to enjoy every single thing about it and help moving this forward.

Edit: formatting



The main update since then is this demo of Doom in JS:

https://developer.mozilla.org/en-US/demos/detail/doom-on-the...


Cool, didn't realize that was emscripten. Here's the post discussing this demo by emscripten's author http://syntensity.blogspot.com/2011/05/emscripten-12-doom-on...


It's not really clear to me how graphics are being displayed. I assume they're not converting SDL/OpenGL to Javascript. Is there a Canvas library you can link, or something?


The link that wahnfrieden posted talks about an SDL/JavaScript port, so presumably yes that's how they are doing it. OpenGL wouldn't be involved, though, Doom is old-school 2.5D raycasting to a simple framebuffer.

Unfortunately in keeping with the recent theme of cool web demos not actually working for most web users, none of the browsers I tried even run the demo. Tried it on IE9, Chrome and Firefox (obviously Firefox is supported, but it seems like you need a bleeding edge Nightly version).


> Tried it on IE9, Chrome and Firefox (obviously Firefox is supported, but it seems like you need a bleeding edge Nightly version).

I tested on Firefox 4 and 7 and both worked, so there must be something else wrong. Are there any JS errors?

Also, any idea why it doesn't work in IE9? I was hoping it would.


I've since manually updated to Firefox 4.0.1 and it is working now, not sure what the issue was previously, could have been a local config thing.

On IE9 it reports:

SCRIPT1028: Expected identifier, string or number index.html, line 7 character 7

SCRIPT438: Object doesn't support property or method 'indexOf' doom.cc.js, line 20 character 63

SCRIPT5007: The value of the property 'clearConsole' is null or undefined, not a Function object index.html, line 73 character 9


Thanks for the IE9 info!


Emscripten implements SDL in JavaScript, rendering to a Canvas element. It supports both RGB and fixed palettes.

There is also some experimental work to translate (a subset of) OpenGL to WebGL.


That's pretty awesome then! I'll have to try it on some of my stuff.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: