Hacker News new | past | comments | ask | show | jobs | submit login

Can we just drop the JS VM and embed some nicer VM (JVM, DartVM) instead?



Yes, once you convince everyone to drop the thing we have that works and implement the thing we don't have that doesn't work. In short: you complain as though it were an easy change to make.


He/she is right though, just wait when WebAssembly gets more mature.

I bet all those plugins will be back.


Shipping an entire Java/ruby/python/whatever VM with your code doesn't make much sense (not to mention, wasm doesn't have a good GC story). Then there's the DOM API issue.

If you aren't making games or crunching big numbers, wasm isn't for you yet.

Even so, let's assume wasm added all those features today. History shows it would still be a decade before you could ship to all your users. That may not matter for fancy startup X, but it certainly matters for the biggest and most important businesses.

I love the potential of wasm, but I think it's way too soon to be preaching about it being the end-all be-all of the web.


I don't remeber ARM, MIPS, x86 or x64 having a good GC history either.

If WebAssembly is good enough as C and C++ target, it is good enough as any of those processors.

As for the potencial of WebAssembly, there are already ongoing efforts to port .NET and Java runtimes to it, and I am looking forward to Adobe porting Flash to it as well.

So it will come, WebAssembly + Canvas + WebGL is already quite usable.


> I don't remeber ARM, MIPS, x86 or x64 having a good GC history either.

Typical client programs intended to run on nascent versions of those architectures were not intended to be delivered and installed very often. In contrast, web pages might get changes deployed to production multiple times a day. Needing to deliver a compiled runtime solely in order to run your client side code is going to be a nonstarter for the overwhelming majority of developers.

Now, at best, we can hope that many developers will collaborate to make caching easier by agreeing to only use one specific version of each runtime, delivered from a single well-known source (though experience with e.g. jQuery means that we shouldn't hold our breath). In the meantime, extending WASM to obviate the need for delivered runtimes will even the field between Javascript and every other managed language.


Runtimes are already being delivered by the majority of languages that compile to JavaScript.

A GC runtime for a language with like Oberon semantics is just a few hundred KB, way less than sonething like minified jQuery.


Those ISAs are much lower-level than wasm. If you want to keep things secure, you have to restrict things. For example, wasm is going to optimize a lot of things and isn't necessarily going to treat your pointers the way you expect. Good garbage collectors need pretty fine-grained control. LLVM has been the bane of GC creators for the same kinds of reasons.


Only from those that want to rely on LLVM for their compiler backends.

Using LLVM to target WebAssembly is not a requirement.

Also the point isn't implementing the best GC algorithm, rather a good enough one.


WebAssembly has no good story for the DOM.


We have canvas and WebGL.

And just because it isn't there today, it doesn't mean it won't be there tomorrow.


i feel like that's on purpose...we can engineer all these crazy things, but getting good DOM access? naw not possible


wasm is an MVP, they fully intend to add DOM support: http://webassembly.org/docs/future-features

Its just that implementing the DOM requires a lot of other (complex) things 1. Stable JS object ABI 2. Integration with the GC garbage collector 3. Better integration with modules

Personally, I'm hoping that we actually get a lower-level subset of the DOM apis that doesn't rely on as many OO features so we can bind to it easier, and avoid more DOM manipulation overhead (though I have no idea what this would look like).


Personally I'd like to see an experimental mode in Quantum/Servo with an RPC interface to render directly to the display list, possibly with an intermediary like a vector of VDOM operations.


WebAssembly has a lot of potential. It would be nice to write web apps in a language other than JavaScript that can compile down to WebAssembly and run in the browser.

Will there be a day where we can make desktop class apps that can run in the browser and not have to wade through the insanity of what is out there now...Should I use ReactJS, VueJs, Flow, Svelte, AngularJS, EmberJs, nextJS, on and on and on.

Pick an approach and standardize? Or just let people ship large WebAssembly binarys with their own runtimes and UI frameworks.


Thanks to WebAssembly there are already porting attempts for quite a few runtimes, just let it mature a bit more and we will get the revenge of plugins.


I agree this would be better, but backward compatibility constraint makes it impossible. WebAssembly is an attempt to add a nicer VM in addition to JS VM.


I thought one of the points of WebAssembly was to not create a second VM. https://developer.mozilla.org/en-US/docs/WebAssembly/Concept...

> With the advent of WebAssembly appearing in browsers, the virtual machine that we talked about earlier will now load and run two types of code — JavaScript AND WebAssembly.


Sure! But do you still want a backwards compatible web browser wrapped around that? Seems like a good opportunity for a clean break from that too.


I know! All this work for Javascript. How many precious developer hours have been committed to this crappy language???




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: