← Back to context

Comment by stackghost

8 months ago

Honest question: Can someone explain to me why people are excited about WebGPU and WASM and similar technologies?

To me, one of the greatest things about the web is that the DOM is malleable in that you can right click -> view source -> change things. This is dead in an era where the server just sends you a compiled WASM dll.

It seems to me that the inevitable result of things like WASM and WebGPU will be "rich media web 4.0 applications" that are just DRM, crypto miners, and spyware compiled so that they're more difficult to circumvent, and delivered via the browser. An excuse to write web apps with poor performance because "well the user just needs a stronger GPU". It seems like an express train back to the bad old days of every website being written in flash.

I honestly cannot see the upsides of these technologies. Is it gaming? Why would I want to play a 3D game in my fucking browser of all places? That's a strict downgrade in almost every way I can think of. Why would anyone want that? Is it "AI"? Why would I want to run an LLM in the browser, I could just run it natively for better performance?

All I can see and have seen over the last several years is a steady parade of new technologies that will make the internet (and in some cases the lives of every day people) objectively worse while enriching a handful of big tech douchebags.

Why are we going down this path? Who is asking for this stuff? Why the fuck would I want to expose my GPU to a website?

> Why would I want to play a 3D game in my fucking browser of all places?

To provide users a way to instantly play a game without having to download all assets at once. Give developers a potential way to avoid app store royalties of up to 30% on desktop or mobile. With wgpu in rust, you can also target WebGPU as a shared 3d runtime that will run across OS's natively rather than having to target Vulkan, Metal, and DirectX.

> Why would I want to run an LLM in the browser, I could just run it natively for better performance?

What about users who don't know how to download a model and run it locally? I would argue this is the vast majority of users in the world. Also, this specific use case is probably not going to be generalized with WebGPU yet due to model sizes, but rather other APIs like the Prompt API in Chrome which will use Gemini Nano embedded into the browser (assume it will eventually get standardized). https://developer.chrome.com/docs/ai/built-in-apis

I agree with you that WASM and WebGPU will be used for adware, targeting, and spyware - but if you don't want to use them, you should disable them in your browser settings - there's definitely value add for other users even if you can't see any benefits.

  • Browsers will never run games that aren't toys or use very simple assets in a way that doesn't completely suck. High quality assets need gigabytes of data. You either require users to download all the assets upfront (the thing we're trying to avoid) or streaming the assets dynamically.

    You end up having to re-implement steam to keep a local copy of the assets on the client device yourself, expect browsers to do the same to manage caching the gigabytes of data transparently, or design your game around a very slow storage device or use tiny assets.

    Flash games worked because they fit very nicely into the 'tiny assets' category.

  • >To provide users a way to instantly play a game without having to download all assets at once

    There's a reason QuakeLive didn't catch on and it's because streaming resources to the player makes for awful UX.

    >What about users who don't know how to download a model and run it locally?

    Those users also don't know how to compile MS Word from source but they have been getting along just fine with installers.

    • The ability to paste a URL into a browser and have that be everything you need to do to play a game is pretty compelling for many kinds of games.

      That’s what made flash games so big back in the day.

      5 replies →

  • > To provide users a way to instantly play a game without having to download all assets at once

    No need for the web in that case, which is inefficient. You can do with like those 1MB installers and stream those assets.

    > but if you don't want to use them, you should disable them in your browser settings

    Which the majority won't. People don't even go in their phone settings, apart from connecting to WiFi and changing their wallpaper.

  • Application streaming sorts that out, with much better tooling for 3D development.

> Can someone explain to me why people are excited about WebGPU and WASM and similar technologies?

WebAssembly brings all languages to the browser. Why shouldn't I be able to use C#, Rust, Go, Dart, Python, or whatever else in browser?

WebAssembly brings better performance. That's what Webamp found: https://jordaneldredge.com/blog/speeding-up-winamps-music-vi...

And what Amazon found: https://www.amazon.science/blog/how-prime-video-updates-its-...

And what Google found: https://web.dev/case-studies/google-sheets-wasmgc

Why make things perform worse when they can perform better?

Why shouldn't I be able to make an application that compiles to the Windows, macOS, and Linux desktops and also to the browser? This one does: https://bandysc.github.io/AvaloniaVisualBasic6/

  • > WebAssembly brings all languages to the browser. Why shouldn't I be able to use C#, Rust, Go, Dart, Python, or whatever else in browser?

    This has zero end-user benefit. While having the end-user drawbacks gp mentioned (reduced ability to inspect and modify content).

    > WebAssembly brings better performance.

    Wirth's law says "hold my beer".

For that matter, why would you expose your CPU to a website? Or your monitor? It could show you anything! ;)

Maybe you are not be aware of the number of good web apps that use some WebGL under the hood? You might be using office applications in your browser already that use WebGL when it’s available, and the reason is it makes things faster, more responsive, more scalable, and more efficient. Same would go for WebGPU.

There’s no reason to imagine that the web will do bad things with your resources that you didn’t ask for and don’t have control over. There have been hiccups in the past, but they got fixed. Awareness is higher now, and if there are hiccups, they’ll get fixed.

  • >There’s no reason to imagine that the web will do bad things with your resources that you didn’t ask for and don’t have control over.

    The web is like this right now. Why would things magically become a utopia?

  • > There’s no reason to imagine that the web will do bad things with your resources that you didn’t ask for and don’t have control over.

    Read some security update news from browser vendors and vulnerability researcher posts. There's some weak signals about vendors acknowledging the difficulty of securing the enormous attack surface of browsers built on unsafe foundations, eg MS "enhanced security mode" and Apple "lockdown mode".

  • I don't mind the browser using the GPU to speed up graphical operations. But I do mind random sites and apps going further than that. Native apps have better access, but there's an higher selection criteria than just opening a URL.

It's interesting to me you don't like any WebGL websites. I remember first trying Minecraft Java in the browser and it was awesome.

Runescape! I grew up playing Runescape! How could anyone not want games like Runescape to exist?!?

  • Last time I checked Runescape switched to a native client, too. And even in the browser back in the day it used to run absolutely terribly, so I hope we're not trying to replicate that experience.

  • > How could anyone not want games like Runescape to exist?!?

    I mean, I wouldn't say I don't want it to exist. But Runescape is one of the shittiest, most boring games I've ever played. It's not exactly a strong argument for why we should run stuff in the browser

I agree. Trying to shove everything into the browser is absolutely stupid. Native apps are better than doing things in the browser in almost all cases. But that's not trendy, so people don't chase after it.

  • > Native apps are better

    Native operating systems are garbage at maintaining user privacy and become maintenance burdens when too many applications have been installed and even uninstalled on the machine.

    While not perfect, a browser tab is a stronger sandbox than you can easily get in any other context.

Why do you think wasm is harder to circumvent? The only way to instantiate a wasm module in the browser is through (drum roll) javascript. Install noscript if you're worried. The days of view source -> edit are basically over anyway due to every site's 1MB+ minified JS blobs.

> Why would I want to run an LLM in the browser, I could just run it natively for better performance?

Why would you try out a new app in a sandboxed browser, when instead you could give it complete access to your entire computer?

You should try Chillin(https://chillin.online), browser-based video editor. Powered by WebGL, WASM, and WebCodecs, Chillin provides a full suite of video editing capabilities on the web. Trust me, Chillin is smoother than most native video editors, even on mobile. I believe Chillin can leverage WebGPU to bring even more powerful rendering features.

Yes, running LLMs on the web may not have significant advantages due to the speed limitations, but other models, such as those for bg removal, speech-to-subtitles, and translation, could become practical and efficient thanks to WebGPU.

Users wanted an app sandbox.

HTML documents were sort-of like an app sandbox.

Evolution is now adding an app sandbox to HTML.

There is little we can do to resist it. I don't like it either - I hate HTML.