5 ms·
I hope wasm becomes the first class citizen and JavaScript becomes just one out of many languages that compiles to it. JavaScript is not bad at the high level,
by partycoder 9y ago
I hope wasm becomes the first class citizen and JavaScript becomes just one out of many languages that compiles to it.
JavaScript is not bad at the high level, but at the low level it has been hell for engineers to implement a fast VM. A wasm VM is way easier to implement than a JavaScript VM.
- tyingq 9y agoI do like the upside, but coupled with DRM support, it's going to be used to obfuscate, hide and control things. I'm expecting a much less open web coming.
- jfbastien 9y agoWebAssembly is as Turing-complete as JavaScript is, and has fewer APIs. The only API it has JS doesn't really is grow_memory, and even that can kinda be done with ArrayBuffer. I'm not sure what you think makes it the harbinger of closed web. As the WebAssembly CG chair, I'd be interested in understanding that.
- tyingq 9y agoI don't see it as THE harbinger, but one of many. Some people will use it for the same reasons that they obfuscate things today. See, for example, the dropbox client. It's python, but they go to great lengths to keep you from peeking behind the kimono. I understand WASM isn't reverse engineering proof, but it certainly raises the bar. Especially sans source maps.
- jfbastien 9y agoSource map is totally optional! It provides zero help in understanding asm.js or minified JS. I see what you're saying about binaries being opaque blobs, but I just don't see how that's different from asm.js or minified JS. Kinda sounds like you're trolling pcwalton TBH: https://twitter.com/pcwalton/status/872151997473972224 https://twitter.com/pcwalton/status/872151997473972224 I approve ;-)
- tyingq 9y agoI understand source maps are optional...not getting the exclamation point. That's exactly my point, it's optional and therefore not much help. Minified js isn't (so far) a barrier for me. Prettify and a short bit of debug clears things up. Chrome even helps[1]. I have not yet run into asm.js used for anything in my field. [1] https://developers.google.com/web/tools/chrome-devtools/javascript/pretty-print https://developers.google.com/web/tools/chrome-devtools/java...
- pcwalton 9y agoI don't think it raises the bar at all. You could already do everything you can do in wasm today with Emscripten, and any harebrained attempts at DRM schemes shipped over the wire would almost certainly be using Emscripten. Wasm is easier to read than Emscripten'd code because of types.
- partycoder 9y agoWell, while true, today many things are being hidden from browsers by doing them server-side.
- k__ 9y agoHas it? The fastest VMs on the planet are JS VMs right now.
- stevedonovan 9y agoWell, there's a smart fellow called Mike Pall who would like to race Lua against JavaScript for you. Plus, the very best VMs are Java.
- k__ 9y agoI thought he stopped because he couldn't keep up ;)