Live data from Hacker News

Emscripten and asm.js: C++'s role in the modern web

kripken.github.io

41–50 of 100 posts

Re: Emscripten and asm.js: C++'s role in the modern web

#41

Very interested in this technology, would like to see some examples created with this technology, more than games. Are there any cpu/gpu heavy applications out there that compile from C++ to asm.js ? Or any good examples of writing the whole webpage with C++ somehow? All the current examples I've seen utilize webgl canvas and handle the interaction there. How about interaction with a regular HTML interface ?

There are examples of python and lua interpreters being compiled, a pdf renderer, graphviz, a 2d physics engine, and a speech synthesizer. you just need to google it.

I myself have modified an emulator to run aswell.

Re: Emscripten and asm.js: C++'s role in the modern web

#43

Very interested in this technology, would like to see some examples created with this technology, more than games. Are there any cpu/gpu heavy applications out there that compile from C++ to asm.js ? Or any good examples of writing the whole webpage with C++ somehow? All the current examples I've seen utilize webgl canvas and handle the interaction there. How about interaction with a regular HTML interface ?

ffmpeg - http://bgrins.github.io/videoconverter.js/

Re: Emscripten and asm.js: C++'s role in the modern web

#44
post #22

I like how he says 'compiled c++ (to javascript) is immune to buffer overflows' yet completely sidesteps the real issue at hand: Every major javascript virtual machine is riddled with security holes. In Firefox case (no sandbox, no process-per-tab, one of the worst C++ codebases I've ever seen security-wise, _infested_ with memory leaks and UAFs) these holes can effortlessly lead to system compromise. In Chrome case,…

> _infested_ with memory leaks and UAFs

Really? That doesn't match my experience -- the full Firefox test suite is run through ASAN on every check-in. (See the "Linux x64 ASAN" results at https://tbpl.mozilla.org/?tree=Mozilla-Inbound, for example).

So I'd be interested to know what you base this claim on.

Re: Emscripten and asm.js: C++'s role in the modern web

#46
post #36

I really wish we had a proper 'web assembly' instruction set to compile to. JavaScript has proved itself to be a surprisingly adequate language over the years, but there is only so much optimization you can do with its language specification.

In the 90ies we thought it would be Java.

Re: Emscripten and asm.js: C++'s role in the modern web

#47
post #35

This just feels wrong. I am really betting on Apps, for setting the web straight for interactive documents.

And I kill you if you replace Office 2013 with an app like Prezi!

Office is an App. I just went into the new fad of calling App to what used to be called native applications.

As for Prezi, I had to search for it. No idea it existed.

No thanks, I rather use Powerpoint as well.

Re: Emscripten and asm.js: C++'s role in the modern web

#48

Very interested in this technology, would like to see some examples created with this technology, more than games. Are there any cpu/gpu heavy applications out there that compile from C++ to asm.js ? Or any good examples of writing the whole webpage with C++ somehow? All the current examples I've seen utilize webgl canvas and handle the interaction there. How about interaction with a regular HTML interface ?

I wrote this in C++: http://suprsede.com/ Go easy on it!

Re: Emscripten and asm.js: C++'s role in the modern web

#49
post #36

I really wish we had a proper 'web assembly' instruction set to compile to. JavaScript has proved itself to be a surprisingly adequate language over the years, but there is only so much optimization you can do with its language specification.

There is a proper 'web assembly' instruction set. It's Google 's Portable Native Client [1]. The problem with this solution is that Google is the only one supporting it. But there other players in the web. Creating such a standard making all of the vendors happy might be impossible. ASM.js might not be the perfect solution, but it has the huge advantage of being compatible with all major browsers. Practicality beatin…

The sandboxing provided by NaCl is nice, but I'm not sure binary portability is really a worthwhile goal -- I think we really want cross-compilation, native binaries and the OS providing most of the sandbox.

That way we get maximum performance on the hardware we're targeting (not the "lowest common denominator" of common bytecodes), an ability to run self-modifying code if we want to send a JIT down the wire...

Re: Emscripten and asm.js: C++'s role in the modern web

#50
post #36

I really wish we had a proper 'web assembly' instruction set to compile to. JavaScript has proved itself to be a surprisingly adequate language over the years, but there is only so much optimization you can do with its language specification.

In the 90ies we thought it would be Java.

And it looks like that in the future we will have something like JVM and its classloaders. Just with different names (LLVM? v8? RequireJS? JS AMD?) and a lot more kludges. And without Gosling, Joy and Steele.
Post reply on HN