3 ms·
> Correct me if I'm wrong but WASM still needs CSS since it generates HTML Yes, you are a bit wrong. Wasm can also mostly sidestep html and css and write to th
by bigato 8y ago
> Correct me if I'm wrong but WASM still needs CSS since it generates HTML
Yes, you are a bit wrong. Wasm can also mostly sidestep html and css and write to the canvas directly. Some games compiled to wasm do this. You can imagine that in a near future, it will be possible to use the browser merely as the wasm vm which will run and render your crud written in, say, tcl/tk
- roryisok 8y agoFair enough. I was going off the linked article in which he generates html in Go. Tcl/tk is cool, but wouldn't you have to import it just like bootstrap?
- bigato 8y agoI used tcl/tk just as an example and because i love it :) But you could say the same about gtk, qt, etc. Or flutter. And yes, you would have to import the libs and some libs are not small, right? But this is also a problem that we face nowadays already, where the stack in a typical "modern" website requires the download of css and js frameworks that often weigh more than one megabyte of code. Maybe once wasm is popular enough, the web browser will start shipping common stuff like libc when you install it? And then it would start resembling an OS instead of a VM. I don't know if I like this idea, but it seems to be the direction we're heading to. We started with the browser being a system to access documents that can link to each other, and at some point a scripting language was introduced. Over time, it started being used as a application distribution plataform. Then people realized that maybe bending the scripting language to achieve that was becoming too much, and wasm was born. Now the browser is a VM. Soon we'll find out that we don't need a VM, but a distributed OS instead. And maybe we will look again at what Plan9 already did in the 80's.
- roryisok 8y agoJS and CSS libraries can be cached so that in theory you only need to download it once for several apps. The large file size with Js apps is more commonly the app itself, transpiled for older browsers using Babel. That makes for some massive code. But changes are coming. Webpack can compile separate versions for es6 compatible and incompatible browsers so only IE need download the monster Js file and chrome and Firefox can have light code of just a few hundred kb