Live data from Hacker News

Saying goodbye to asm.js

spidermonkey.dev

81–90 of 164 posts

Re: Saying goodbye to asm.js

#82
post #77

Earlier quoted context omitted.

> (Flascc/Alchemy(?) I forgot all the names this went through) Crossbridge was its third and most recent name. Pepper.js is another interesting project from around this time that didn't pan out. https://github.com/google/pepper.js/

Wasn't pepper the P in PNaCl?

The P in PNaCl is Portable.

Pepper was a pun on Native Client (since NaCl = salt). Pepper Plugin API (PPAPI) was Google's more secure version of NPAPI (Netscape Plugin API). Flash Player was essentially the only thing using NPAPI/PPAPI by the end of its life.

Re: Saying goodbye to asm.js

#83
post #54

Earlier quoted context omitted.

And if not for the rise of AI it's possible that WASM as a machine-level compilation target for all languages might have happened. As much as Gary predicted he didn't see AI coming.

wait how did AI impede wasm?

I believe the idea is that you don't care what language is being used if you aren't going to look at it anyway. Given that premise, the AI can write JavaScript instead of something you need to compile separately.

Re: Saying goodbye to asm.js

#84

Isn't Asm.js better just for the fact that I can call web apis directly without shims? Or moving data in and out? I'd love to commit totally to webassembly but still seems very limited, am I wrong?

Wasm can also call web apis directly. The overhead you hear about is in translating complex types like nested dicts etc between formats. But wasm runs inside the js runtime

Re: Saying goodbye to asm.js

#85
A long time ago, I wrote a small chapter in a WebGL book on asm.js.

https://webglinsights.github.io/

It was fun to see the rise of asm.js, which was a precursor to Web Assembly. Some of the early demos were so cool to see; Unreal Engine running in the browser. :) Bitter sweet to see the sun set here, but it did lead to much better things.

Re: Saying goodbye to asm.js

#86
post #31

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).

What's so sad about it? It was just a compilation target that made sense at one point in time. Its like being sad about i386-unknown-freebsd1 being dropped.

Re: Saying goodbye to asm.js

#87

Isn't Asm.js better just for the fact that I can call web apis directly without shims? Or moving data in and out? I'd love to commit totally to webassembly but still seems very limited, am I wrong?

Depends on what do you mean about by web apis. Fetch API for example is not part of asm.js subset of JavaScript. You going to need a javascript shim on both cases. However, like the siblings comment says: overhead comes from conversion between big structures.

Re: Saying goodbye to asm.js

#88
post #77

Earlier quoted context omitted.

Wasn't pepper the P in PNaCl?

The P in PNaCl is Portable. Pepper was a pun on Native Client (since NaCl = salt). Pepper Plugin API (PPAPI) was Google's more secure version of NPAPI (Netscape Plugin API). Flash Player was essentially the only thing using NPAPI/PPAPI by the end of its life.

The most common plugins were Flash, Silverlight, Adobe Reader, and the Java applet plugin, and I think all of those were in mildly common use when plugins were on their last legs.

Re: Saying goodbye to asm.js

#89
post #31

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).

What’s sad about that is we could have had a clean, native, desktop Figma application.

Re: Saying goodbye to asm.js

#90

Earlier quoted context omitted.

WASM wont improve if no one adopts it. Its a chicken and egg issue

WASM has been adopted and it has improved massively since 2017 though.

Yes, but GC is still useless for languages with interior pointers, some features require gimmicks with server configuration, and for most languages we aren't any way closer to -march=wasm and that's all.

We still need to download half Internet for emscripten, plus whatever tools are being used on top. Although it is somewhat simpler for those that build on top of binaren.

Post reply on HN