4 ms·
Without a GC WASM is very hard to use for regular web development tasks. When GC infrastructure lands lots of mind-blowing stuff will happen. Things like JVM an
by msoad 10y ago
Without a GC WASM is very hard to use for regular web development tasks. When GC infrastructure lands lots of mind-blowing stuff will happen. Things like JVM and .NET running in WASM.
A lot of web people don't realize magnitude of impact WASM will have on the web.
- Touche 10y agoWhat's the benefit of JVM in wasm over compiling JVM langs to js?
- dawidloubser 10y agoI think you're missing the core use-case of WASM. It's not for general app development, which will stay with JS. It's meant to provide plug-able, high-performance functions for heavy computational tasks - crypto, game rendering, heavy in-browser data analysis, etc etc. I double JVM in WASM makes sense at all - though somebody will probably do it in anyway. WASM is not meant to be good at Garbage Collection, etc. It's not a design goal at all.
- Touche 10y agoWhat's the benefit of JVM in wasm over compiling JVM langs to js?
- jagger27 10y agoThe web and desktop computing.
- hackcasual 10y agoI would think of WASM the same way you'd think about JNI. It provides a way to have processor intensive integrate with a broader system.
- paulddraper 10y agoIsn't that JS?
- muizelaar 10y agoTo get good performance on running JVM or .NET WASM will probably need more than just GC support. JVM/.NET JITs rely on inline-caches that aren't currently expressible in WASM. There are ideas about ways to make this work, but it will be a while. The other thing preventing the use of JVM or .NET is that porting the runtimes over isn't easy. i.e. You can already run this bytecode in a browser but it isn't widely used. (http://jsil.org/ http://jsil.org/, https://github.com/decatur/j2js-compiler https://github.com/decatur/j2js-compiler, https://github.com/plasma-umass/doppio https://github.com/plasma-umass/doppio, https://github.com/mozilla/pluotsorbet https://github.com/mozilla/pluotsorbet etc)
- voidlogic 10y agoPersonally, I am more excited about the possibility of Go supporting WASM as a target: https://github.com/golang/go/issues/18892 https://github.com/golang/go/issues/18892 I already write backends in Go, the hope of writing frontend code in Go is really exciting. All the JS people are going to say, "with node JS is already there", but this misses that I (and a vast number of other developers) hate JS with a burning fiery passion.
- throwawaysbdi 10y agoYes! Go has a really small runtime I think a lot of us can't wait till Go is usable in browser. Every developer I know hates JavaScript. I think the only ones that like it are honestly people that haven't used much else. Literally everything about the language including tooling and module systems around it is a garbage fire. I tried to use Node and it gives stupid shitty error messages all the time and blows up if anything hangs for 200ms because it only supports a single thread. It's honestly pretty crap compared to more mature runtimes in C#, Java, Go, Python etc... I think what's happened is that a bunch of front end HTML guys that only use JS have been introduced to fire water and they're going nuts about it
- skybrian 10y agoGo has a small runtime? It says here [1] that "hello world" in Go 1.7 is about a megabyte. That's huge by web standards. Even if they cut it in half. GopherJS apparently struggles with binary size too [2] (though that's not WebAssembly). [1] https://blog.golang.org/go1.7-binary-size https://blog.golang.org/go1.7-binary-size [2] https://github.com/gopherjs/gopherjs/issues/136 https://github.com/gopherjs/gopherjs/issues/136
- dualogy 10y ago> Without a GC WASM is very hard to use for regular web development tasks Well yeah.. it's an assembly language, the sort you inline in your C (or some other) programs to squeeze critical code paths. Doing your virtualdom or form validation in assembly probably wasn't a core design goal, no matter all the scripters that get so easily hyped about wasm. But consider usecases such as real-time interactively adjustable filters on currently-playing page-embedded media objects, 3d editors that let the user run (non-shader) algos on the current model such as geometry simplification.. all kinds of use-cases come to mind where wasm can really drive richer, faster, more powerful browserbased apps than were possible without it.
- Ajedi32 10y ago> Doing your virtualdom or form validation in assembly probably wasn't a core design goal It wasn't part of the MVP, but it most definitely is a design goal for future iterations. See: https://github.com/WebAssembly/design/blob/master/GC.md https://github.com/WebAssembly/design/blob/master/GC.md
- flukus 10y ago.Net has adopted the go approach, the GC is compiled into a real executable, pretty sure there have been way's to do this for years with java too.
- Ace17 10y ago> Without a GC WASM is very hard to use for regular web development tasks. I don't get it. If you're going to target the web and need a GC, why not use hand-written Javascript? (or any variant like Typescript/Purescript if you want additional compile-time checks like type-safety/immutability).
- runeks 10y agoI don't get it. Why not just write the GC in WebAssembly?
- skybrian 10y agoThen you have to download it as part of the web page. It's hard to beat shipping the runtime with the browser.
- Ericson2314 10y agoAlso for code composition it's great if everyone is using the same VM primitives
- Ajedi32 10y agoI wonder if this could be solved with a better caching system for dependencies shared between multiple sites. Maybe some kind of content-addressable cache? If your users only have to download the language runtime once, the idea of using a runtime for a popular language on your site doesn't seem like such a bad idea. Popular runtimes could even be pre-cached and shipped with the browser.