4 ms·
> things are going to change with the introduction of wasm people have been saying this for years already and nothing seems to have come of it :(
by raziel2p 5y ago
> things are going to change with the introduction of wasm
people have been saying this for years already and nothing seems to have come of it :(
- tambourine_man 5y agoYeah. Turns out, having an interpreted runtime in the browser is quite useful and sending bytecode across the wire not as practical. We've been forgetting and relearning that for the past two decades.
- hsn915 5y ago"turns out"? How did it turn out so? Actually it turns out that having an interpreted runtime causes a stream of endless problem. We keep try to patch them over but new problems keep coming up. It turns out that a standarized low level byte code is the right way to ship cross platform applications. We already knew that. It just took a long time to go through the standarization process and be implemented by browsers. If it seems like it's not in use today, it's largely because JavaScript has momentum and the majority of web programmers don't yet know how to take advantage of wasm (or maybe don't think they need it).
- tambourine_man 5y ago> It turns out that a standarized low level byte code is the right way to ship cross platform applications So why hasn’t it taken over the world with Java and now with wasm? > If it seems like it's not in use today, it's largely because JavaScript has momentum and the majority of web programmers don't yet know how to take advantage of wasm (or maybe don't think they need it). There’s another possible reason. I’m sure you can come up with the answer yourself.
- hsn915 5y agoJavascript never really had a chance to "take over the world" before Google released Chrome and the V8 engine. Before that it was just too slow. Java applets really sucked. They took a long time to load and initialize. They all looked ugly (probably because of the default libraries?). Also Java itself as a language was really bad and the development experience was awful. I want to say that no one wants to program in Java but in reality many people do (I don't understand those people). The important lesson here is the implementation is more important than the idea. Good idea with bad implementation -> goes no where. wasm is not java. The important quality about wasm is that it's not garbage collected. It's pretty close to just good old assembly.
- tambourine_man 5y ago>Javascript never really had a chance to "take over the world" before Google released Chrome and the V8 engine. Chrome was released at the end of 2008, JavaScript was thriving way before that. We had Gmail since 2004, jQuery since 2006. WebApps were the “sweet solution” considered for iPhone apps at first in 2007. Chrome exists because of the healthy ecosystem that Firefox and Safari provided, not the other way around. >It's pretty close to just good old assembly. Precisely, and it's yet to be proven that's the best solution for the Web. I love it from the computer science perpective, but historically that idea hasn't struck a chord.
- steve_adams_86 5y agoIs that true though? Aren’t people using it for in-browser image and video editing? Doesn’t Google use it for drawing to Sheets and crunching numbers? I thought that was the case but I can’t recall where I read it. If that’s not true then I should probably reconsider my thinking about wasm
- heavyset_go 5y agoYes, WASM is a good target for CPU bound number crunching. I'm not sure if it's used in Sheets, though.
- heavyset_go 5y agoI've seen some pretty interesting things like the use of Rust for front end development, like yew[1] and Seed[2]. There aren't many languages that are practical for WASM output. Scripting and managed languages need to ship their interpreters and runtimes with their WASM blobs, and can end up relatively large. JavaScript's interpreter and runtime are baked into every browser already. That leaves only compiled and unmanaged languages for potentially good WASM targets. As mentioned before, Rust is seeing a lot development in that space. If LLVM can compile it, then Emscripten can output it to WASM. [1] https://github.com/yewstack/yew https://github.com/yewstack/yew [2] https://github.com/seed-rs/seed https://github.com/seed-rs/seed
- hsn915 5y agoAre you sure nothing came of it? Figma for example seems to be largely powered by WASM and the core of the product seems to be written in C++ https://www.figma.com/blog/webassembly-cut-figmas-load-time-by-3x/ https://www.figma.com/blog/webassembly-cut-figmas-load-time-... https://www.figma.com/blog/building-a-professional-design-tool-on-the-web/ https://www.figma.com/blog/building-a-professional-design-to... I think the majority of web developers are just slow at catching up with this new things.
- copperx 5y agoWASM DOM manipulation will probably come soon, and that will place other languages in the exact same playing field as Javascript. For now, manipulating the DOM still requires calling Javascript.
- twox2 5y agoWasm isn't really going to change the front-end / browser side of javascript for the better, but it's great for graphics and anything else cpu intensive.