4 ms·
Being a binary format is the worst part of WebAssembly... for the open web.
by awqrre 10y ago
Being a binary format is the worst part of WebAssembly... for the open web.
- ajnin 10y agoWhy would that be a problem ? The open web needs standards that are well defined and used by everyone, and WebAssembly seems to bring just that with the simultaneous announcements by several browser vendors. PNG is binary too and it's arguably one of the assets of the open web.
- haberman 10y agoThere is this weird belief that being a text format automatically means open, reusable, interoperable and being a binary format automatically means closed, proprietary, opaque. As counterexamples, here are several binary formats that are very open: ELF, DWARF, PNG, tar, gzip, Ogg and all its subformats, FLAC, JPEG2000. On the other hand, you have something like OOXML, which while technically open/standardized, is so incredibly complicated that it is extremely difficult to implement well. Just because something is text-based does not make it simple.
- z3t4 10y agoI think Wasm will be more advanced then PNG. And if there are code execution exploits in PNG, I can only imagine how many exploits there will be in Wasm.
- haberman 10y agoAnd how many have there been in HTML, JavaScript, and CSS? https://en.wikipedia.org/wiki/Pwn2Own https://en.wikipedia.org/wiki/Pwn2Own
- awqrre 10y agoI was saying this because in many binary formats, lots of information is lost in the code to binary conversion (.c to binary, for example) ... and with current connection and processor speeds, I don't think that binary will help that much or be worth the trade-off. But I get your point and I know that html, js, etc can be highly obfuscated but I did extract some features from gmail before and it was not quite as bad as with ASM extracted from a binary...
- Klathmon 10y agoJs minification already removes all the "extra" info you would get over a binary format (like variable names, dead code removed, loops optimized, etc...) Webasm will be almost identical to minification when it comes to decompiling. And minification is already extremely common. And you can be a skeptic, but one of the biggest reasons for webasm was to reduce parsing overhead which is currently the bottleneck (in terms of startup time) to most JavaScript heavy applications. Plus needing to keep the original source around bloats memory. IIRC some of their test applications would take 30+ seconds JUST TO PARSE on mobile devices. That's a HUGE amount of overhead that this will cut out.
- awqrre 10y agominification is not quite as bad as obfuscation...
- Klathmon 10y agoMinification does things like rename variables to single characters, remove dead code, optimize code in a number of ways, inline constants, shorten if statements, unroll loops, hoist variables, rewrite comparisons, and more. It is compilation in just about every sense of the word (especially when combined with a compiler like babel or typescript) Yes, it's not obfuscation, but neither is webasm.
- awqrre 10y agoCan you please link to the test that took 30+ seconds to parse? It just seems that the way computers are evolving that we will never see that in practice even if we avoid the binary web...
- Klathmon 10y agoIt's in the FAQ for web assembly[0]. First section. I may have misspoken there as I don't know if they actually have real "tests" that show that, or if it's just that some know applications take that long. FWIW, the "demo" from that site takes about 40 seconds to load on my mobile device when using the asm.js version. [0] http://webassembly.org/docs/faq/ http://webassembly.org/docs/faq/