News for hackers. Stuff that matters.
Re:In protest of the web{*} bulldozer, a response to websock... by TazeTSchnitzel on Wednesday May 20, 2020 @05:48PM (#23252292)
> Web{Assembly}: Enables binary executables to run in your browser

“Binary executables” makes it sound like it's machine code, but WebAssembly is more like a bytecode for JavaScript.

Re:In protest of the web{*} bulldozer, a response to websock... by TeMPOraL on Wednesday May 20, 2020 @06:21PM (#23252655)
I'm of two minds about it. On the one hand, JS should've been compiled in the first place; that we spent some two decades making computers parse increasingly complex scripts repeatedly is a sad waste, and it spawned what's probably the biggest hack ever to become a standard practice: minifying code. On the other hand, WebASM webapps will be an order of magnitude less inspectable.
Re:In protest of the web{*} bulldozer, a response to websock... by TazeTSchnitzel on Wednesday May 20, 2020 @06:25PM (#23252696)
Why will WebAssembly applications be less inspectable? JS applications are already aggressively minified multi-megabyte blobs.
Re:In protest of the web{*} bulldozer, a response to websock... by TeMPOraL on Wednesday May 20, 2020 @06:39PM (#23252832)
I can take a look at a minified piece of JS after reformatting, and quickly guess what many of the functions do just by their shape. I won't be able to do that anywhere as easily with a piece of decompiled bytecode, especially if it went through an optimization pass.
Re:In protest of the web{*} bulldozer, a response to websock... by derefr on Wednesday May 20, 2020 @09:09PM (#23253869)
The re-prettification of the minified code doesn't have identifiers, except for the calls to the browser runtime. Unless you use a source map, in which case it does.

The decompiled WASM doesn't have identifiers, except for the calls to the browser runtime. Unless you use a source map, in which case it does.

Not really seeing the difference.

Minified/"uglified" JS—and especially obfuscated JS (where "minification" and "obfuscation" are frequently aligned interests, so most libraries incidentally do both)—is already "a bytecode for the browser virtual machine", just a highly-redundant encoding of one.

Re:In protest of the web{*} bulldozer, a response to websock... by qeternity on Wednesday May 20, 2020 @06:57PM (#23252988)
On the other hand, V8 is the most widely run, heavily invested and thus optimized JIT compiler in history. So I think most of the interpreted vs compiled mistakes have been Google’d out at this point.
Re:In protest of the web{*} bulldozer, a response to websock... by default-kramer on Wednesday May 20, 2020 @09:38PM (#23254031)
In my opinion, the "sad waste" has nothing to do with CPU clock cycles and everything to do with the uncountable hours humans have spent trying to make javascript tolerable. If we had bytecode from the start, it would have enabled a huge reduction in human labor.
Re:In protest of the web{*} bulldozer, a response to websock... by drran on Thursday May 21, 2020 @04:26AM (#23256058)
Flash implemented using bytecode.
Re:In protest of the web{*} bulldozer, a response to websock... by TeMPOraL on Wednesday May 20, 2020 @07:00PM (#23253013)
It helps with execution speed, but not with the speed of parsing the plaintext code and interpreting (or compiling) it.