Live data from Hacker News

Saying goodbye to asm.js

spidermonkey.dev

131–140 of 164 posts

Re: Saying goodbye to asm.js

#131

Earlier quoted context omitted.

I still maintain the notion we're in the wrong timeline, one where PNaCl died and instead of a worthy, timely successor we end up being boiled alive in a soup of Electron apps. I really thought, for a time, that we'd be doing everything in the browser . And in a way that's increasingly true, but it all just feels worse than ever. I like WASM and I want to like WASM but the rate of maturity within the ecosystem is inc…

I’ve found canvas + WebAssembly works great together! Here’s an example of Sudoku running in WebAssembly (it was vibe coded in Zig) and then rendered to canvas. The interface between the wasm module and the browser is function calls for keyboard and mouse events, and then another that renders to a pixel buffer to copy to the canvas. https://qip.dev/play-sudoku And this approach also works for simple forms, such as a…

Do you really think this "works great"?

I'm using a brand-new MacBook Pro with a high-end M5 processor, and this site is extremely unresponsive for me. Huge latency between clicking and getting feedback.

It also breaks accessibility.

The QR code use case seems far more reasonable to me, you're generating a static image.

Re: Saying goodbye to asm.js

#132

Earlier quoted context omitted.

I still maintain the notion we're in the wrong timeline, one where PNaCl died and instead of a worthy, timely successor we end up being boiled alive in a soup of Electron apps. I really thought, for a time, that we'd be doing everything in the browser . And in a way that's increasingly true, but it all just feels worse than ever. I like WASM and I want to like WASM but the rate of maturity within the ecosystem is inc…

I’ve found canvas + WebAssembly works great together! Here’s an example of Sudoku running in WebAssembly (it was vibe coded in Zig) and then rendered to canvas. The interface between the wasm module and the browser is function calls for keyboard and mouse events, and then another that renders to a pixel buffer to copy to the canvas. https://qip.dev/play-sudoku And this approach also works for simple forms, such as a…

The sudoku example has something massively wrong with it's performance. Latency is over a second per click and it halts after a few clicks.

The QR example works fine though

Re: Saying goodbye to asm.js

#133
post #65

Earlier quoted context omitted.

I do understand why NaCL and PNaCL are undesirable and why wasm is much better, but as a student the NaCL ssh app had saved my computer science homeworks more than once, and this is something that still doesn't have an alternative although I rarely would need it nowadays.

https://ssheasy.com/ https://www.google.com/search?q=wasm+ssh+client ...the future is here!

I think the whole NaCL thing was able to do the ssh directly from the browser without any tunneling, but maybe I am misremembering

Re: Saying goodbye to asm.js

#134

Earlier quoted context omitted.

I still maintain the notion we're in the wrong timeline, one where PNaCl died and instead of a worthy, timely successor we end up being boiled alive in a soup of Electron apps. I really thought, for a time, that we'd be doing everything in the browser . And in a way that's increasingly true, but it all just feels worse than ever. I like WASM and I want to like WASM but the rate of maturity within the ecosystem is inc…

I wish we had another alternate timeline. "Our submission is in TALx86, a strongly typed functional language that encourages an explicit continuation-passing style and supports mutually recursive modules. We were encouraged to use this language when we learned that the competition would allow us to run our program on an interpreter implemented in hardware. We are grateful to the Intel Corporation for developing this…

Typed Assembly Language—fascinating. But since the software is "All rights reserved," I don't know if it can be used beyond personal use.

Re: Saying goodbye to asm.js

#135

Earlier quoted context omitted.

I wish we had another alternate timeline. "Our submission is in TALx86, a strongly typed functional language that encourages an explicit continuation-passing style and supports mutually recursive modules. We were encouraged to use this language when we learned that the competition would allow us to run our program on an interpreter implemented in hardware. We are grateful to the Intel Corporation for developing this…

Typed Assembly Language—fascinating. But since the software is "All rights reserved," I don't know if it can be used beyond personal use.

True, it was a dead end perhaps.

Re: Saying goodbye to asm.js

#136
post #27

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

People complain when there are no highly compatible alternatives to something that would be useful to have on the web platform. Asm.js and then Wasm were those alternatives. That's why they didn't complain then but do complain now about things that Safari won't do because it would hurt the App Store. Happily, the EU is now at least trying to whip Apple into shape.

Re: Saying goodbye to asm.js

#137
post #27

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

That's not how I remember it: it was an experiment that was useful at the time but didn't work out. It was useful internally to sandbox Flash player, but the limitations of the LLVM based approach were soon evident to everyone involved.

Re: Saying goodbye to asm.js

#138
post #12

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

The bit about "thick apps" always stuck with me. Partly because the name is funny, partly because it hit close to home. The first time I saw his talk, I was an intern working for a company that had built an entire compiler, IDE, and debugger in-house for their little industrial IO boxes. The compiler was written in C, and we used Emscripten to turn it into some JS that then got "compiled" (see: concatenated) into a giant HTML file with the IDE and debugger bits. Code uploads and debugging happened over ethernet, so all of that just got shoved through Ajax.

This sounds cursed, but customers loved it. Since it wasn't an EXE, it didn't get caught up in their employers' overzealous corporate IT filters. That's why we never switched to Electron. In a sense, we had some of the primeval elements of the thick app.

Re: Saying goodbye to asm.js

#139

Earlier quoted context omitted.

I still maintain the notion we're in the wrong timeline, one where PNaCl died and instead of a worthy, timely successor we end up being boiled alive in a soup of Electron apps. I really thought, for a time, that we'd be doing everything in the browser . And in a way that's increasingly true, but it all just feels worse than ever. I like WASM and I want to like WASM but the rate of maturity within the ecosystem is inc…

I wish we had another alternate timeline. "Our submission is in TALx86, a strongly typed functional language that encourages an explicit continuation-passing style and supports mutually recursive modules. We were encouraged to use this language when we learned that the competition would allow us to run our program on an interpreter implemented in hardware. We are grateful to the Intel Corporation for developing this…

Isn't this approximately just wasm?

Re: Saying goodbye to asm.js

#140
post #51

Earlier quoted context omitted.

Not really: ASM.js became WASM. What killed the possibility of WASM being The One Way to run everything is AI... the one wildcard that Gard Bernhardt didn't predict.

To be honest, with how bad a target WASM is for any existing compiler, I feel like what killed that possibility was WASM itself. Its IR design is horrendeous.

Can you talk more? I've seen people say only good things about wasm
Post reply on HN