News for hackers. Stuff that matters.
Re:Ask HN: Is anyone else just tired of JavaScript? by transfire on Wednesday May 23, 2018 @02:44PM (#17136865)
I believe that's why Web Assembly (https://webassembly.org/) has been created. Eventually we will be able to use any language that can compile to Wasm.
Re:Ask HN: Is anyone else just tired of JavaScript? by v_lisivka on Wednesday May 23, 2018 @02:47PM (#17136913)
Right now we can use any language which can be compiled to JavaScript. What will change? Wasm is not faster than JS.
Re:Ask HN: Is anyone else just tired of JavaScript? by tathougies on Wednesday May 23, 2018 @02:55PM (#17137009)
For one thing, web assembly's architecture more closely matches the traditional backends that language designers are familiar with. Compiling to code to a byte code is a pretty much solved problem, and we have compilers that do this. Finally, while web assembly may not be faster than JS (although that really remains to be seen), it is faster to load.
Re:Ask HN: Is anyone else just tired of JavaScript? by v_lisivka on Wednesday May 23, 2018 @05:46PM (#17138640)
AFAIK, today compilers are producing both asm.js code and Webasm binary. Webasm is for tomorrow, asm.js is for actual use, because it's backward compatible with any JS enabled browser.

Webasm is not so compatible. I tried to run random demo and got error message: CompileError: wasm validation error: at offset 8: binary version 0xd does not match expected version 0x1. WTF?

I tested https://webassembly.org/demo/Tanks/ demo, and on my system (Firefox, Fedora Linux 26), asm.js version is a bit faster to load than Webasm version. (Turn off support for Webasm in about:config to test). Asm.js: 1.57s to load from cache, Wasm: 1.82s to load from cache.

So what will happen when webasm finally more closely match traditional backends?

Re:Ask HN: Is anyone else just tired of JavaScript? by williamxd3 on Wednesday May 23, 2018 @03:11PM (#17137156)
Wait till you need to load a hundred binary dependencies and see if will load faster