logoalt Hacker News

xyzzy_plughyesterday at 2:58 PM8 repliesview on HN

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

What's worse is that we should all be running our untrustworthy AI tools and their outputs in precisely such a sandbox, and companies are selling the reverse: hosted sandboxes, hosted JS-based VMs.

I guess that was always the problem: there was never any money in a client-side sandbox.


Replies

burntcaramelyesterday at 10:32 PM

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 URL input that gets turned into a QR code. Again the interface is simple, here converted a URL into SVG markup. As you type in the input we call the WebAssembly render function again.

https://qip.dev/qr

show 2 replies
projektfuyesterday at 5:50 PM

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

https://www.cs.cornell.edu/talc/icfp99-contest/solution.htm

show 2 replies
alex7oyesterday at 3:56 PM

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.

kettlecornyesterday at 6:02 PM

What do you feel is immature in the WASM ecosystem right now?

show 4 replies
mmastracyesterday at 9:00 PM

PNaCl was a terrible idea. It was as bad of an idea as shipping the raw sqlite interface in the browser.

I feel like some of the Google-sourced standards are the laziest, least-webby ones out there. There are some good ones that come from the Chrome team, but man the real stinkers are _always_ a lazy Google engineer trying to ship a half-baked clone of something native in the browser because they need it for something or other internally.

hopppyesterday at 4:27 PM

Its like natural selection, maybe not the best traits win overall but one that is the most popular choice because everyone is a webdev.

tardedmemeyesterday at 3:12 PM

What are the key differences between PNaCl and WASM?

show 1 reply
doctorpanglossyesterday at 6:17 PM

> we should all be running our untrustworthy AI tools and their outputs in precisely such a sandbox

The DevOps infrastructure Kubernetes runbook AI inference router API people (DIK-AROUnders for short) always want an abstract technical solution that increases both their budget and their distance from the end user's actual application. Like the more money they get to dick around with meaningless technical cathedrals, the better. They're only bent out of shape that they couldn't parlay that into a sweet crypto scheme. In the real world, the line between what users actually want and what DIK-AROUnders call inauthentic activity is quite blurred.

To me, the fact that AI agents can browse websites and make payments and read my email and pretend to be me or other people is a huge part of their value proposition. People want to get out of the sandbox! There are many meanings to the words security and privacy.