logoalt Hacker News

Saying Goodbye to Asm.js

102 pointsby eqriontoday at 12:01 PM53 commentsview on HN

Comments

rudi-ctoday at 2:38 PM

That's sad but sensical. Fun fact, Figma originally started as a fully C++ codebase, and Asm.js was key in proving that it would be possible to run a design tool in the browser. The switch to WebAssembly didn't happen until after there were paying customers, and provided nice improvements to load time (Asm.js is still JS which the bundle size is bigger and requires the code to be parsed into an AST, unlike WASM).

pjmlptoday at 2:35 PM

> asm.js was Mozilla’s response to the question posed by NaCl and PNaCl: how can the web run code at native speeds?

Had it been today, Chrome would have just pushed NaCl and PNaCl no matter what, and then everyone would complain why Safari and Firefox aren't keeping up with "Web" standards.

show 2 replies
futunetoday at 2:06 PM

So the death of asm.js is upon us? We are drifting away from the timeline of the prophecy:

https://www.destroyallsoftware.com/talks/the-birth-and-death...

(And to those who haven't encountered this before, I strongly recommend a watch. It may be the greatest tech talk of all time, for certain values of greatest.)

show 4 replies
looneysquashtoday at 2:09 PM

I personally think this is a mistake. But I'm not sure how much it matters. It's not like a lot of people were using asm.js still AFAIK.

But wasm is too isolated from javascript. From my limited use of it, I was considering trying to compile to asmjs instead.

But I wasn't sure that emscripten still fully supported it.

You can't call most web apis from wasm.

But more important for what i was trying to do, you can't zero copy buffers from js to wasm.

Everything is a trade off. The isolation is a good thing, but also a bad thing.

show 3 replies
metmactoday at 1:58 PM

I’ll never forget watching Gary Bernhardt give his talk on JavaScript.[0] Was my introduction to asm.js, and the rabbithole associated with compiling code to run in the browser.

12 years on, it’s shocking how much of his fiction became reality.

[0] https://www.destroyallsoftware.com/talks/the-birth-and-death...

show 1 reply
sehuggtoday at 2:12 PM

Hmmm, need a asm.js -> WASM transpiler maybe.

(compiling legacy code with legacy versions of Emscripten is quite frustrating, almost as bad as updating your JS code to be compatible with accumulated changes in the Emscripten ABI)

show 1 reply
EdwardDiegotoday at 2:38 PM

We'll drink again in Valhalla (not the JDK project, the one with much carousing).

drob518today at 1:39 PM

Asm.js is dead! Long live WebAssembly!

show 2 replies
stkdumptoday at 1:30 PM

There goes my plan to use js code generation at runtime to make my algorithms faster. Doing this with wasm will be much harder.

show 5 replies
koolalatoday at 1:11 PM

Never saw those monkey prints before

https://monkeyink.com/ink/blog/archives/2016/08/_this_is_a_f...

"The image is a collage of antique open source art reflecting the open source code."

oneshteintoday at 2:19 PM

asm.js is faster than WASM, and it can do everything that JS can do.

show 5 replies
theultdevtoday at 1:09 PM

Sad day. I have a sha256 hasher in asm.js that's faster than any wasm solution.

show 3 replies
unconedtoday at 2:07 PM

Asm.js was never needed as a legacy mechanism, as it was just a compilation target for native code. There was nothing that it needed to remain backwards compatible with, all asm.js code was new code.

https://acko.net/blog/on-asmjs/

css_apologisttoday at 1:20 PM

o7