News for hackers. Stuff that matters.
Re:Partial WebAssembly backend for the GNU toolchain by oblio on Saturday March 04, 2017 @05:22PM (#13793219)
I don't get why people are so excited about WebAssembly, at least on the whole "replace Javascript"/"remove web bloat" aspect.

Right now we have Javascript and its assorted libraries, which, as bad as they are, come with the browser or at least are generally reused/cached very frequently.

People seem to fail to realize that everyone and their mother will dump their runtimes and their VMs on top of WebAssembly as soon as they will be able to. Java Applets 1, 2, ..., 100.

Yes, they will present it in a very fancy and attractive way, but fundamentally that's what will happen, cause who wants to rewrite everything for Javascript-land when they're not forced to? Competitive pressure will always push towards bloat, just look at Facebook and they Android-runtime busting app for an example.

I, for one, am looking forward to the day where, besides the 500MB of Javascript my 40 tabs are loading, I'll also load 1.5 GB of WebAssemblied formerly native runtimes.

Re:Partial WebAssembly backend for the GNU toolchain by Someone on Saturday March 04, 2017 @07:21PM (#13793810)
JavaScript got at least part of its popularity because it was the only thing that ran in all clients (Flash and Java were close, but had the disadvantage of being owned by a single big player)

Similarly, node.js got at least part of its popularity because it was the only thing that used _the_ language you can also run in the client.

This levels that playing field at least a bit (completely, if it can manipulate the DOM with little friction)

I expect to see many server-side languages will fairly soon compile to WebAssembly, so that they can position themeselves as an alternative to node (For example, I think Apple would be stupid if it wasn't working on a Swift-to-WebAssembly compiler).

In my book, that is good; competition in that field will improve all tools.

Re:Partial WebAssembly backend for the GNU toolchain by s369610 on Saturday March 04, 2017 @05:50PM (#13793337)
I doubt it will be for average brochure sites, but I have used it in two situations, one to encode a series of captured canvas frames into ogg video on the client using ffmpeg to save bandwidth on a telehealth web application, and another to embed a mobile game engine in with samples so users can interact in the browser without having to download build and run http://moaiforge.com/samples/sample-browser/player/index.htm...
Re:Partial WebAssembly backend for the GNU toolchain by danjoc on Saturday March 04, 2017 @09:53PM (#13794318)
As I understand it, wasm is not asm, but an AST format for the JS VM. You're essentially compiling your c, rust, whatever, directly into the same thing JS is compiled to on the fly. But you do it in advance, so no parse time needed. Also, no GC, so good luck getting Java code on there for now.

https://hacks.mozilla.org/2017/02/what-makes-webassembly-fas...

Re:Partial WebAssembly backend for the GNU toolchain by tromp on Saturday March 04, 2017 @07:02PM (#13793710)
I'm excited at the prospect of 64-bit integer support, which will significantly speed up many applications, making even web-based proof-of-work mining feasible.
Re:Partial WebAssembly backend for the GNU toolchain by rspeer on Saturday March 04, 2017 @08:06PM (#13793982)
Wait. Why would you want web-based proof-of-work mining? Does this have a legitimate purpose, or is it all about forcing unsuspecting visitors to mine Bitcoin for you?
Re:Partial WebAssembly backend for the GNU toolchain by tromp on Saturday March 04, 2017 @11:31PM (#13794612)
The web page should only start the miner if the user is well informed and clicks a button to start it.

Legitimate purposes include spam-proofing message boxes, as well as cryptocurrencies whose PoW is somewhat CPU friendly, such as those bottlenecked by DRAM latency.

Re:Partial WebAssembly backend for the GNU toolchain by drchickensalad on Saturday March 04, 2017 @08:41PM (#13794132)
For things that are DOS-sensitive