News for hackers. Stuff that matters.
Re:Why WebAssembly Is Faster Than Asm.js by genjipress on Wednesday March 15, 2017 @09:32PM (#13881614)
What seems most important about WebAssembly is that it is essentially a universal language runtime. It's not that what it brings to the web is unimportant, just that it seems like we're also getting a way to do truly cross-platform language deployment as a bonus. Am I wrong about this?
Re:Why WebAssembly Is Faster Than Asm.js by munificent on Thursday March 16, 2017 @12:32AM (#13882517)
Every Turing complete language is a universe language runtime.

The interesting question is whether it's a good universal language runtime, and what kind of languages it's best for.

Today, WASM doesn't support GC, which means it's unlikely to be a good runtime for any language that wants to automatically manage memory and interact with the DOM (which needs to have its own GC).

Re:Why WebAssembly Is Faster Than Asm.js by grondilu on Thursday March 16, 2017 @06:49AM (#13883978)
> Today, WASM doesn't support GC,

Is that really a problem considering most languages already implement a VM with GC?

Re:Why WebAssembly Is Faster Than Asm.js by munificent on Thursday March 16, 2017 @02:26PM (#13887543)
Yes, because it means shipping the language's own VM down with your application. It also means that VM's GC has to interact with the browser's own GC for DOM nodes if you want to be able to touch the DOM.
Re:Why WebAssembly Is Faster Than Asm.js by runeks on Thursday March 16, 2017 @02:38AM (#13883023)
What about Haskell, which compiles everything - including the garbage collector - into a static binary? Or is it not possible to have GC-thread running with WebAssembly?
Re:Why WebAssembly Is Faster Than Asm.js by izym on Thursday March 16, 2017 @04:47AM (#13883492)
I can't remember if threading support is in yet, but it should be possible. The downside is that it will be a rather hefty binary the user has to download.
Re:Why WebAssembly Is Faster Than Asm.js by markdog12 on Thursday March 16, 2017 @09:39AM (#13884878)
No threads yet, they're coming though: http://webassembly.org/docs/future-features/
Re:Why WebAssembly Is Faster Than Asm.js by douche on Thursday March 16, 2017 @08:01AM (#13884284)
Eh, cut one tracking script or bloated PNG and you've saved a lot of download size.
Re:Why WebAssembly Is Faster Than Asm.js by munificent on Thursday March 16, 2017 @02:27PM (#13887563)
That's doable, but it means your application needs to include the runtime and GC. That's a lot of code to push down the wire.
Re:Why WebAssembly Is Faster Than Asm.js by Ajedi32 on Thursday March 16, 2017 @10:21AM (#13885201)
> Today, WASM doesn't support GC

That's true for now, but they're [planning][1] on adding support for that in the near future.

[1]: https://github.com/WebAssembly/design/blob/master/GC.md

Re:Why WebAssembly Is Faster Than Asm.js by munificent on Thursday March 16, 2017 @02:26PM (#13887545)
That page has been there for quite some time. :)
Re:Why WebAssembly Is Faster Than Asm.js by Ajedi32 on Thursday March 16, 2017 @04:09PM (#13888700)
Yep, GC support has been part of WASM's long-term goals since almost the beginning. April 30, 2015: https://github.com/WebAssembly/design/commit/16687d30a0859b2...
Re:Why WebAssembly Is Faster Than Asm.js by munificent on Friday March 17, 2017 @12:20PM (#13895201)
...and no progress yet.
Re:Why WebAssembly Is Faster Than Asm.js by Ajedi32 on Friday March 17, 2017 @01:49PM (#13896185)
GC was not part of [the MVP][1], and the MVP itself was only finished around 2 weeks ago, so of course not. They haven't even had an opportunity to work on it yet. Like I said, "long-term goals".

If you want to get an idea of where GC is on the priorities list, have a look at the [roadmap][2]. There are still other things they have to deal with before they start working on GC support, but it's coming.

[1]: http://webassembly.org/docs/mvp/

[2]: http://webassembly.org/roadmap/

Re:Why WebAssembly Is Faster Than Asm.js by throwawaysbdi on Thursday March 16, 2017 @12:38AM (#13882541)
So wasm is a bytecode format like Java or C#'s IL except it basically has no runtime?

Why don't we just use an existing bytecode format and skip all the pointless design? LLVM? Android DEX? Java Class or C# IL formats aren't enough? Hell if we use one of those bytecode formats we could reuse the runtime too!

I'm sure there's probably 20+ bytecode formats and I'm rolling my eyes that we need yet another for the web....

Re:Why WebAssembly Is Faster Than Asm.js by legulere on Thursday March 16, 2017 @04:38AM (#13883457)
Java (including dex) and IL bytecodes are too high level. They assume that everything is laid out in garbage collected classes.

This basically means that programming languages usually have to be specially designed for them. There's ironpython, but it's not fully compatible with python for instance.

LLVM IR is designed as a compiler IR and hardly useful for this usecase, as it is unstable, target-specific and has a complicated largely undocumented bitcode format (I don't know any reimplementations). It has been tried with PNaCl and the original SPIR, but both projects abandoned LLVM-IR/ were abandoned.

Re:Why WebAssembly Is Faster Than Asm.js by Rusky on Thursday March 16, 2017 @12:44AM (#13882571)
This has been brought up several times in this thread, but none of those bytecodes is sufficient. LLVM is not platform-agnostic, JVM/IL are sub-optimal for languages like C++.

None of those platforms' security models are as good as the web's, either, nor are their runtimes able to work well in that context.

Re:Why WebAssembly Is Faster Than Asm.js by coldtea on Thursday March 16, 2017 @05:08AM (#13883576)
>Why don't we just use an existing bytecode format and skip all the pointless design? LLVM? Android DEX? Java Class or C# IL formats aren't enough?

Because the major browser devs that designed WebAssembly are not smart enough to have thought this

/s

Re:Why WebAssembly Is Faster Than Asm.js by fmap on Thursday March 16, 2017 @11:05AM (#13885561)
As others have already pointed out, this has been tried before. Turns out that some people are opposed to shipping LLVM with the browser, or any other large existing codebase.

The reality is that WASM has to target the existing JavaScript backends in every popular browser. And now you can't use LLVM, because the backends in question typically only handle reducible control flow, etc. Conversion from LLVM to a form that your JavaScript backend supports is relatively expensive and not something you want to do on every load.

Re:Why WebAssembly Is Faster Than Asm.js by rocqua on Thursday March 16, 2017 @05:49AM (#13883748)
We had Java in the browser for a while.

It sucked.

Re:Why WebAssembly Is Faster Than Asm.js by muizelaar on Wednesday March 15, 2017 @10:20PM (#13881864)
WebAssembly is not a universal language runtime. Currently it really only handles C style Ahead-Of-Time compiled languages. e.g. if you wanted to implement a JS JIT or really any other kind of JIT on top of WebAssembly you're going to have a really bad time.
Re:Why WebAssembly Is Faster Than Asm.js by cm2187 on Thursday March 16, 2017 @12:19AM (#13882445)
What's the problem with running a CLR within webassembly?
Re:Why WebAssembly Is Faster Than Asm.js by jeswin on Thursday March 16, 2017 @12:38AM (#13882538)
I don't think it has GC at the moment. It might be alright if the GC doesn't show up for a few years; languages like Rust can demonstrate bare-metal, stutter-free performance on the Web.
Re:Why WebAssembly Is Faster Than Asm.js by cm2187 on Thursday March 16, 2017 @12:47AM (#13882592)
But wouldn't the CLR run its own GC?
Re:Why WebAssembly Is Faster Than Asm.js by cormacrelf on Thursday March 16, 2017 @03:02AM (#13883104)
You'd have to compile the CLR itself into wasm first, which I'm guessing wouldn't necessarily run that well. Language runtimes often provide stuff like os-independent threading or green threads, which have to be implemented all over again for wasm's threading model (I'm not sure it even exists yet). Some CLR features would be redundant, like the security model or the profiling API... and then you'd need to compile your C#/VB/F# down to managed CLR code without using the .NET Framework at all, since so much of .NET depends on having stuff wasm can't provide (not even .NET Core has few enough features to run on wasm). Either you make '.NET Core Core Web Edition Preview 3' and make library developers explicitly target this new framework subset so you can use it, or you just give up and recognise that without most of .NET it's not that worthwhile having C# in the browser.

The difficulties for language developers are on two fronts really. #1 is producing WASM in a compiler backend, instead of LLVM IR / Java bytecode / bare machine code. #2 is getting the language small enough to be possible and not wasteful to implement in wasm. You don't have a filesystem, or really anything a regular OS provides, so you have to be able to strip those language / stdlib features away.

Rust is often cited as a go-to because it can already do #2 easily: #![no_std] strips out the os-dependendent standard library and essentially all of the already tiny stack-unwinding 'runtime'. #1 can be done with an LLVM backend, though it's still a bit of a hack and Rust would prefer to skip LLVM and that whole redundant optimisation phase entirely.

Most importantly, CLR and .NET are just too heavyweight for anyone to bother writing any wasm code in. What are the uses for wasm as it stands? There's basically no DOM interaction yet, so just really fast optimised code that has no OS interaction for crypto and other CPU-heavy tasks. You can't write a game targeting wasm, but you could outsource your ray-tracer there. Plain C++ and Rust are good at that. CLR/.NET is pretty quick when JITing x86 but wouldn't be worth the tremendous effort to port to wasm when you already have C++ and Rust, and they'd still be quicker in the end anyway.

Lastly there's the question of how to run a JIT at all within wasm. I don't think there is a way of creating executable memory regions (ie x86) within wasm, because wasm is independent of who's running it. You would have to instead generate executable wasm regions, which would need to be parsed again... all of which sounds fairly impossible too, as far as I know.

Re:Why WebAssembly Is Faster Than Asm.js by cm2187 on Thursday March 16, 2017 @03:34AM (#13883213)
Thanks for this detailed answer.

But is WASM set in stone already? I would have thought there would be a strong interest in seeing higher level languages made available through the browser. Are there fundamental reasons why WASM would never implement the features required to run a CLR (not necessarily a file system but for instance the threading model you mentioned).

The case for using c#/vb/java in WASM is I think strong.

First this would allow developers to write truly cross platform apps, using a lot less hacks than a solution like Xamarin.

The UI could be HTML but I would think that a CLR would ship with a version of WPF (think silverlight).

In a intranet/corporate environment, it would make the deployment of internal applications trivial.

You could have webapps with the same code base that run on mobile and desktop. The download time is not necessarily relevant. The code would be stored on the machine like any other webapp.

I think there is a reason why c#, python or java are so widely used over c++ outside of performance critical code. It is a lot easier, faster and safer to develop. I don't think c++ is a reasonable alternative to c# or java. As for rust, I don't have an opinion on its merit as I am not familiar enough with it, but its developer base is a small fraction of each of the vb/c#/java developer base.

Re:Why WebAssembly Is Faster Than Asm.js by cormacrelf on Thursday March 16, 2017 @04:51AM (#13883502)
WASM isn't set in stone, in fact it is constantly evolving. But I doubt it will ever really let you do JIT compilation. WASM itself can be JIT compiled if you want to implement it that way, but executing memory just doesn't seem feasible given that the security model simply has to forbid executing machine code directly. I don't think the JIT>WASM>JIT again is the best way to go about things.

If you tried to implement a new WASM backend for Roslyn or javac or something, it would be impossible simply because of how much the behaviour of these languages depends on their VM. Stuff like `synchronized` and introspection (esp in CLR managed classes / reflection APIs). You need the VM for that. Projects like Scala Native work because you still have an entire OS to work with on the target platforms.

You would have to implement very low level virtual-machine-like features in WASM to support something like that. And even if you did, the scope of WASM isn't big enough to support all the features of something like Silverlight running in it. I don't think they will ever support a graphics API you could do that in, for example.

At a higher level, trying to run a heavy framework on top of WASM is just silly. You already have a heavy framework, in the DOM and other browser APIs. They are essentially all you could possibly need to do anything useful in a browser. They are the only way to display anything to the user. You can't run an HTTP server inside WASM, but you wouldn't want to. You can't implement a custom interface technology in WASM, because you can't draw anything, but you can do all that with the DOM APIs or WebGL/canvas/etc so why would you want to? All these things you would need to hack together a Silverlight are already available, and your wasm would need to include an implementation of all of them. These are all things you kinda want to dynamically link against... which wasm doesn't support...

The focus for WASM (after it properly nails down the spec on a whole lot of basics) will be memory management and enabling access to GC'd JS objects. Then using JS APIs would follow. We're a long way off both of those, let alone providing VM-like features you could target a managed language at, or enough native-like APIs to allow building something like Silverlight on top of it.

I say we, but it's definitely not me working on this stuff, and it's not half the engineering talent from Microsoft either.

Re:Why WebAssembly Is Faster Than Asm.js by readittwice on Thursday March 16, 2017 @07:24AM (#13884116)
JIT-Support is listed as a possible future feature for WASM: http://webassembly.org/docs/future-features/. Why shouldn't a WASM program not be able to generate WASM bytecode at runtime? The runtime-generated bytecode can be verified and then compiled by the WASM compiler, just like it is done for AOT-generated WASM bytecode. That said, I am not sure if WASM should support jitting. But if there is demand for it, then it will probably get done.

What I would really like to see is GC support in WASM. That would make it possible to AOT-compile managed languages like C#/Java to WASM. You wouldn't need to port the whole VM, "just" translate e.g. *.class-files to WASM which would seem a lot more feasible for the moment. That would sure only allow a subset of C#/Java, but since the web environment is distinct enough and the subset is large enough that would IMHO be acceptable.

Re:Why WebAssembly Is Faster Than Asm.js by cm2187 on Thursday March 16, 2017 @09:25AM (#13884770)
Also JIT isn't necessary. You could have platform specific compilations. The important part is to have the same code base.
Re:Why WebAssembly Is Faster Than Asm.js by jtth on Wednesday March 15, 2017 @10:44PM (#13882005)
We are hurtling faster and faster towards this talk every day https://www.destroyallsoftware.com/talks/the-birth-and-death...
Re:Why WebAssembly Is Faster Than Asm.js by Ajedi32 on Thursday March 16, 2017 @10:25AM (#13885236)
I kinda see the future in that talk as that as a worthwhile goal. If we could get all the security and interoperability advantages of the web but with native-level performance, support for multiple languages, and backwards-compatibility with legacy software that'd be huge.
Re:Why WebAssembly Is Faster Than Asm.js by randiantech on Wednesday March 15, 2017 @09:40PM (#13881648)
Well, Java bytecode already does that. The cool thing about WebAssembly is that runs (or will run) on any browser.
Re:Why WebAssembly Is Faster Than Asm.js by throwawaysbdi on Thursday March 16, 2017 @12:33AM (#13882520)
Is it just me or do Java applets seem like they were way the hell ahead of their time?

If the sandbox didn't have so many holes in it Java applets were arguably better for webapps than the unholy mess we've cobbled together over the last ten years to replace them.

It's sad to me that Java fell out of the browser and was replaced with a slow non standardized single threaded shit language for almost ten years just because Java didn't have DOM access.

JavaScript is just nearing Java feature parity and still not anywhere close for performance.

And I'll tell you what Java didn't have. A unfathomable clusterfuck of module systems, transpilers, shit build tools and IDE support, crazy syntax gotchas, unholy and inconsistent exception handling systems. God dammit what have we done.

Shakes cane at neighborhood kids

Re:Why WebAssembly Is Faster Than Asm.js by tdeck on Thursday March 16, 2017 @01:08AM (#13882688)
I remember Java applets, and reading this thread it's hard to square the revisionist nostalgia with those experiences. The Java applets I remember absolutely sucked as a user. They took forever to load, had weird clunky UIs that were out of place in the host OS and the browser, constantly broke due to compatibility issues, and had no concept of graceful degradation. There's a reason Java applets lie in the dustbin of history - good riddance to them, it's where they belong!
Re:Why WebAssembly Is Faster Than Asm.js by throwawaysbdi on Thursday March 16, 2017 @01:27AM (#13882757)
The rose tinting of HTML should also be taken into account. Java was maybe 10x slower in those days, but more importantly internet was 100x slower and computers 500x slower.

Java ran pretty damn good for what it pulled off back then. It would have been orders of magnitude easier to make Java into what we have today than it was to bastardize HTML and JS to be usable.

Java these days uses native UI which looks nicer and is much faster than in-browser rending. Graceful degredation is only needed because some browsers are such crap. This was never a big problem in Java and still isn't. If a JVM supports JDK 8 you can expect it to run java 8 apps reliably

Java seems like a resource hog because it will use spare ram when you've got it, but most apps run fine on around 15mb of ram. Less if you use AOT compilation. Modern webapps use around 50-100.

Re:Why WebAssembly Is Faster Than Asm.js by flukus on Thursday March 16, 2017 @01:36AM (#13882790)
Yes they were slow and clunky, but they ran on computers with 100Mhz processors and 8/16MB of RAM. I doubt you could load a chrome tab on that.

> had weird clunky UIs that were out of place in the host OS and the browser

Just like web apps, the may be prettier, but they look just as out of plus with custom widgets everywhere and complete disregard for the desktop theme. Hell, for some reason chrome added that shitty task bar color attribute that allows a web page to alter the desktop (well mobile top) theme.

Re:Why WebAssembly Is Faster Than Asm.js by beagle3 on Thursday March 16, 2017 @02:34AM (#13883011)
Yes, but the competition at the time was HTML (slowly getting interactive with time, and mostly ugly, but fast and dependable), and Flash -- and Flash was way faster, way more compact, and way more prevalent than Java.

So, Java wasn't ahead of its time, and it was much much worse than Flash (which, despite numerous efforts to kill it, is still alive, unlike Java Applets which have essentially been dead for years).

Re:Why WebAssembly Is Faster Than Asm.js by flukus on Thursday March 16, 2017 @02:46AM (#13883057)
I don't think flash was much better at anything interactive, or at least animated. On the same hardware as above I remember "frog in a blender" could render well south of 1FPS, on a 486/686 (outdated but still in common use) it was more like 0.1FPS.

Too be fair though, it's a hard comparison, applets were generally apps while flash was fancy graphics.

Re:Why WebAssembly Is Faster Than Asm.js by bjbXXX on Thursday March 16, 2017 @02:01AM (#13882867)
Java could have worked fine in the browser. All feature phones (which are/were almost universally less powerful than a desktop PC) were able to run Java ME applications just fine.

My memory from the mid/late nineties is that Microsoft wanted to balkanise Java with J++ (or was it J# ?) and got into a big argument with Sun, and because of this and the fact they eventually came to own the browser market there was no way they'd embed a JVM in the browser.

Re:Why WebAssembly Is Faster Than Asm.js by douche on Thursday March 16, 2017 @08:13AM (#13884349)
Sun/Oracle also took about a five year hiatus after Java 6, and let the platform languish during a critical period.
Re:Why WebAssembly Is Faster Than Asm.js by tannhaeuser on Thursday March 16, 2017 @02:38AM (#13883028)
Ironically, MS browsers remain the only ones to support Applets today.
Re:Why WebAssembly Is Faster Than Asm.js by kbutler on Thursday March 16, 2017 @12:30PM (#13886356)
firefox extended support release has NPAPI support for another year: https://www.mozilla.org/en-US/firefox/52.0esr/releasenotes/
Re:Why WebAssembly Is Faster Than Asm.js by pjmlp on Thursday March 16, 2017 @05:26AM (#13883654)
EDGE does not.
Re:Why WebAssembly Is Faster Than Asm.js by orangecat on Thursday March 16, 2017 @12:49AM (#13882602)
do Java applets seem like they were way the hell ahead of their time?

Pretty much. If Sun had made a decent plugin instead of expecting every browser to roll their own VM, and if AWT had been a lot less buggy, it could have worked.

A unfathomable clusterfuck of module systems, transpilers, shit build tools and IDE support, crazy syntax gotchas, unholy and inconsistent exception handling systems.

Amen. It's ridiculous how many millions of engineer-hours have been spent trying to turn JS into a usable environment.

Re:Why WebAssembly Is Faster Than Asm.js by wybiral on Thursday March 16, 2017 @12:53AM (#13882621)
> Amen. It's ridiculous how many millions of engineer-hours have been spent trying to turn JS into a usable environment.

It's not just JS: https://en.wikipedia.org/wiki/List_of_JVM_languages

Re:Why WebAssembly Is Faster Than Asm.js by throwawaysbdi on Thursday March 16, 2017 @12:59AM (#13882648)
:) if you'll notice maybe half of those are other languages adapted to the JVM to make them more usable, which should say something is redeeming about the JVM at least.
Re:Why WebAssembly Is Faster Than Asm.js by rocqua on Thursday March 16, 2017 @05:59AM (#13883785)
Java applets never had, and never were planned to, have access to the DOM. Without access to the DOM, they had to implement their own GUI from scratch. The Java UI experience has always suffered from it's platform-agnostic look that never fits in (and is just ugly).

Webasm still can't manipulate the DOM, so it's still not very useful as a replacement for JS, but it is planned. To really replace JS though, we'd need webasm to support garbage-collected languages for ease of use. Probably, some dynamically typed languages as well.

Re:Why WebAssembly Is Faster Than Asm.js by bzbarsky on Thursday March 16, 2017 @03:19PM (#13888196)
> Java applets never had, and never were planned to, have access to the DOM.

Well... see https://en.wikipedia.org/wiki/NPAPI#LiveConnect

Now it's true that it involved more hoops, especially for someone who just knew Java but not DOM bits, so implementing a GUI using Swing or whatever was a path of least resistance. But it wasn't the only path.

> Webasm still can't manipulate the DOM

Not directly, but via FFI to JS it can.... Pretty similar to LiveConnect in some ways.

Re:Why WebAssembly Is Faster Than Asm.js by HugoDaniel on Thursday March 16, 2017 @03:48AM (#13883265)
Compile time in Java is way bigger than in JS. What do I need to do in order to compile a simple hello world in java ? In JS i only need the browser and a text editor if i'm fancy.

Java is slow on the first run (even if you admit it is just the JVM running your already compiled code). Try running a different java code in every site and you will understand why JS is prefered to it.

Also JS has a foot in functional programming and is much less verbose, it also has evolved to be even leaner. e.g. The current lambda syntax (fat arrows) is a treat

Re:Why WebAssembly Is Faster Than Asm.js by dawidloubser on Thursday March 16, 2017 @05:50AM (#13883750)
As a Java engineer, I'm enjoying ES6/7 development much more these days.

I wanted to point out, however, that Java 8/9 has excellent support for basic functional programming features, with an equally-nice syntax for lambdas, but with a good type system (via Functional interfaces) to boot.

The thing that I get hung up time and again, with ES6/7, is lack of a type system. We write some complex ES6/7 + Immutable JS apps (e.g. in the financial services domain), and haven't managed to extract full value from Flow or TypeScript just yet, due to library constraints etc.

Re:Why WebAssembly Is Faster Than Asm.js by HugoDaniel on Thursday March 16, 2017 @07:35AM (#13884169)
Indeed, coming from a Haskell background I also have some problems with Flow. I spend more time struggling with it than with reaping the benefits it brings. Perhaps this will change in a near future.

I would like to look into the Java functional approach. Is there any reference you recommend ?

Re:Why WebAssembly Is Faster Than Asm.js by dawidloubser on Thursday March 16, 2017 @10:52AM (#13885459)
Java's type system and FP features are really weak compared to Haskell's :-) But it compares favourably with ES6's, until you start using ImmutableJS, and ES6 currying. Then Java lags far behind...

I've always been deeply into it, and using it for years at work, so no good off-hand reference. I'd be picking one as random as any web search that you'd perform, sorry!

I should never have learnt Haskell. It messes with your mind [1] whenever you write in any other programming language, yet you can hardly ever use it in practice. Well, certainly here in South Africa.

[1] Obligatory link: http://www.xent.com/pipermail/fork/Week-of-Mon-20070219/0441...

Re:Why WebAssembly Is Faster Than Asm.js by douche on Thursday March 16, 2017 @08:16AM (#13884374)
Running babel is consistently slower than running MSBuild or javac in any of my projects. Not to mention all the other linting, uglifying, minifying, bundling and copying bullshit the gulp script is doing.
Re:Why WebAssembly Is Faster Than Asm.js by HugoDaniel on Thursday March 16, 2017 @09:05AM (#13884651)
The same could be said about Netbeans or other specific optional parts of Java development. JS devs that target anything after the iphone 5S (2013, almost 4 years ago, before 64bit processors even arrived in android land) don't need to use babel, and arguably http2 takes most of the benefits from minifying and bundling.

It is amazing the amount of stuff that JS does if you don't follow the trends blindly and think a bit about your usage and tools.

Re:Why WebAssembly Is Faster Than Asm.js by wybiral on Thursday March 16, 2017 @12:49AM (#13882598)
The performance of JS these days, for such a dynamic language, is actually very impressive.

If Java were our only option I assure you we'd have come up with all kinds of crazy alternative systems of doing things.

Plus, targeting the JVM for weird transpiled language was what all of the cool kids did before doing it in JS became cool. This isn't unique to JS. It's probably unique to any language with that much adoption.

Re:Why WebAssembly Is Faster Than Asm.js by Tloewald on Thursday March 16, 2017 @10:45AM (#13885406)
I was a very early adopter of java in the browser and we compared shockwave (Macromedia/Adobe Director) with java and despite java being so allegedly ahead of its time, shockwave was far better in all respects (speed, functionality, size, spinup time, user experience). And shockwave was awful (it was rendered irrelevant by Flash, which rose on its coat tails (SWF stands for "shockwave flash", although the two had nothing in common).
Re:Why WebAssembly Is Faster Than Asm.js by Rusky on Thursday March 16, 2017 @12:49AM (#13882605)
WebAssembly also lacks Javascript's problems with its tool ecosystem, syntax, and exception handling system.
Re:Why WebAssembly Is Faster Than Asm.js by douche on Thursday March 16, 2017 @08:10AM (#13884335)
Or Flash, for that matter. We keep trying to rebuild what we used to have, using shittier tools.
Re:Why WebAssembly Is Faster Than Asm.js by ajross on Wednesday March 15, 2017 @10:04PM (#13881784)
Java bytecode already did that too. The cool thing about WebAssembly is that we all think it might actually happen this time.
Re:Why WebAssembly Is Faster Than Asm.js by q3r3qr3q on Wednesday March 15, 2017 @10:00PM (#13881755)
Like how Java used to?
Re:Why WebAssembly Is Faster Than Asm.js by kuschku on Wednesday March 15, 2017 @09:46PM (#13881680)
Maybe they should have just used Java bytecode as WASM format? Then we’d have an entire existing ecosystem available.
Re:Why WebAssembly Is Faster Than Asm.js by futurix on Wednesday March 15, 2017 @10:19PM (#13881854)
Not with Oracle being litigious pricks.
Re:Why WebAssembly Is Faster Than Asm.js by dawidloubser on Thursday March 16, 2017 @05:56AM (#13883778)
Hear hear! Java was on a great trajectory before being stagnated by corporations and politics. Such a pity, because now we have to re-invent it.

The silver lining, is that many things usually get better the second time around. Let's see what WASM hold - it's pretty limited in its current form.

Re:Why WebAssembly Is Faster Than Asm.js by kuschku on Thursday March 16, 2017 @07:11AM (#13884072)
*The third time around

FTFY.

The second time around is usually so troubled by politics that there's an entire Wikipedia page about the topic of the second-version syndrome.

And WebASM is in every way inferior to Java still.

Re:Why WebAssembly Is Faster Than Asm.js by dawidloubser on Thursday March 16, 2017 @05:32AM (#13883675)
Kinda like the Java VM, 20 years ago :-)