Live data from Hacker News

WebAssembly Playground

observablehq.com

41–50 of 99 posts

Re: WebAssembly Playground

#41

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

> what stops mass adoption of WebAssembly

It solves a problem that most web developers don't have: running performant code in the browser. It cant manipulate the DOM natively and so most developers have no use for it.

Additionally, the kind of developers who would like to be able to write C/C++ or other compiled languages in the browser are not usually web developers; most of the frontend developers I know are highly specialized in their frameworks or fields. They rarely, if ever, venture outside of frontend development and the kinds of technologies they need are not high performance WASM code but type safe and runtime negligible typescript code

WASM is a technology for software engineers to be able to target their programs for running in the browser, not a technology meant to make frontend developer lives easier

Re: WebAssembly Playground

#42

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

I'm developing a wasm game, and currently I am targeting WebGL2 in order to run in iOS Safari.

Me (and others, I'm sure) are currently waiting for WebGPU [1] to land in Safari so it will make sense to target it.

WebGPU allows for simplified porting of desktop games to the web, such as WGSL shaders [2]

WebGPU will be the next big thing [3], and currently it is enabled on Chrome Windows/macOS, and can be enabled in Firefox Nightly with a config setting.

There's also an issue with limited language support. For example golang still has some stuff left to stabilize around the WASI, and the resulting binaries are rather large.

In rust, things look better. I can compile a release of my game to about 8MB .wasm file, which gzipped sits at around 3MB. Most other tooling I have looked at produces far larger wasm binaries, which makes it a no-go for mobile apps.

Hopefully, 2024 will be the year of WebGPU!

1: https://caniuse.com/?search=webgpu

2: https://www.w3.org/TR/WGSL/

3: https://github.com/gpuweb/gpuweb/wiki/Implementation-Status

Re: WebAssembly Playground

#43
post #22

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

No direct DOM access means it will continue to remain a second class citizen on the web

Yeah the problems it is meant to solve are not problems that most frontend developers have. Frontend developers are often constrained by development time and maintainability, not performance. Frontend developers care about expressing their code in the most succinct and maintainable way: how can I do something with the least amount of boilerplate possible? That's why we have frameworks: to standardize common patterns in web development and cut down on the amount of time required to build an application. Most frontend developers are not working on performance-heavy applications that require WASM, they're working on forms which get POST'd directly to an API somewhere that does all the real heavy lifting (or just serves as a CRUD interface to a database)

Re: WebAssembly Playground

#44

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

shrug It finds its uses. It's just not that overstated. sandspiel is quite popular and is built using WASM: https://sandspiel.club/ Google Earth - https://blog.chromium.org/2019/06/webassembly-brings-google-... Ruffle (the "make Flash run safely" tool) - https://ruffle.rs/ Ableton's Learning Synths - https://learningsynths.ableton.com/ etc etc. It's just hard to tell when something is using WASM when it "just works"…

Figma, Adobe. And (on the wasm server-side of things) Docker, Nginx.

Re: WebAssembly Playground

#45

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

Super Mario 64: https://probablykam.github.io/Mario64webgl/

Re: WebAssembly Playground

#46
post #22

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

No direct DOM access means it will continue to remain a second class citizen on the web

It's possible. See https://github.com/thi-ng/umbrella/tree/develop/packages/was... for example.

Re: WebAssembly Playground

#47
post #22

Earlier quoted context omitted.

No direct DOM access means it will continue to remain a second class citizen on the web

It's possible. See https://github.com/thi-ng/umbrella/tree/develop/packages/was... for example.

Not really. From that very page:

"Since only numeric values can be exchanged between the WASM module and the JS host, any JS native objects the WASM side might want to be working with must be managed manually in JS. "

Re: WebAssembly Playground

#48
post #21
post #18

Earlier quoted context omitted.

Yeah, we took a bet that writing our compiler, simulator, etc. in Rust and architecting correctly so it could compile to native and WASM would let us run native and in the browser too, and we’re pretty thrilled with how it turned out. We just shipped 1.0, but this slightly older blog post goes into the architecture a bit more: https://devblogs.microsoft.com/qsharp/introducing-the-azure-...

I'm currently taking the same route with my compiler. It's written with extreme efficiency in mind, so I'm planning to expose a client-side WASM binary on the main site, that will let you interactively explore the language with low latency.

This is a great use case of WASM, I think. Language compilers/interpreters/runtimes to be compiled to WASM so they can run on the web, enabling interactive code blocks, playgrounds, or integration with web-based code editor and IDE. That lowers the barrier to entry, so a beginner (or seasoned user) can simply visit a web page and start playing with running code - instead of having to install anything on their local machine.

Re: WebAssembly Playground

#49

Earlier quoted context omitted.

shrug It finds its uses. It's just not that overstated. sandspiel is quite popular and is built using WASM: https://sandspiel.club/ Google Earth - https://blog.chromium.org/2019/06/webassembly-brings-google-... Ruffle (the "make Flash run safely" tool) - https://ruffle.rs/ Ableton's Learning Synths - https://learningsynths.ableton.com/ etc etc. It's just hard to tell when something is using WASM when it "just works"…

The official Windows video editor Microsoft Clipchamp[1] also extensively uses WASM for it's video export process. [1]: https://clipchamp.com/en/windows-video-editor/

A Windows only WASM program? But…

Re: WebAssembly Playground

#50

Earlier quoted context omitted.

The official Windows video editor Microsoft Clipchamp[1] also extensively uses WASM for it's video export process. [1]: https://clipchamp.com/en/windows-video-editor/

A Windows only WASM program? But…

Reminds me of the commercial of the old auntie using her wall for offline Facebook with her friend pointing and confusedly declaring "That's not how any of this works!"
Post reply on HN