Hacker News new | ask | show | jobs
by chii 5141 days ago
I think that NaCl is more geared towards being a target of a port for an existing application thats been written (like the supreme commander game that google managed to coerce a studio to port to NaCl).

I htink the pie is big enough for both NaCl and javascript apps.

1 comments

> I think that NaCl is more geared towards being a target of a port for an existing application thats been written

It is, but you can also port existing applications to JS.

> I htink the pie is big enough for both NaCl and javascript apps.

It's a different pie. NaCl is chrome-only (and just enabled in the chrome store, in fact), while JS runs in all browsers.

> It is, but you can also port existing applications to JS.

You can't just port things to JavaScript the same way. JavaScript is a very different sort of language. "porting" something to JavaScript pretty much always means remaking the whole thing from ground up and hoping that your pixel pushing in canvas runs at an acceptable speed.

Actually Emscripten allows you to port an existing native application to JS, and the development effort is comparable to using NaCl.
Yup. They've ported all sorts of things with Emscripten, including, I believe, Ruby, Python and Perl.
Yes. But it's a POC thing that's also some orders of magnitude slower...
It's not orders of magnitude slower, most benchmarks have it 2x-6x slower. It's rarely slower than 10x (one order of magnitude). And that is before JS engines even start to optimize for it.
You might want to read http://mozakai.blogspot.com/2012/05/emscripten-opengl-webgl-... for some eye-opening about what one can do with porting to JS in a _modern_ browser.