News for hackers. Stuff that matters.
Re:Experimental support for WebAssembly in V8 by omarforgotpwd on Tuesday March 15, 2016 @01:46PM (#11291510)
Once webassembly is widely supported, why would we ever write JavaScript again?
Re:Experimental support for WebAssembly in V8 by jensvdh on Tuesday March 15, 2016 @02:22PM (#11291827)
Because DOM manipulation in C++ sounds like a nightmare to me.
Re:Experimental support for WebAssembly in V8 by geon on Tuesday March 15, 2016 @03:49PM (#11292455)
If you want it to be fast, you probably shouldn't touch the dom.
Re:Experimental support for WebAssembly in V8 by rspeer on Tuesday March 15, 2016 @04:31PM (#11292733)
To the contrary, I think everyone should touch the DOM when they need the DOM. If this is going to be a platform for more than ads and shitty games, it will need to be able to use the browser's exquisitely engineered ability to do text rendering and layout.

Just like Flash or the JS game platforms that are stupid hacks on top of the canvas element, if people have to implement text rendering without the DOM, it'll encourage putting poorly-rendered text in unusable layouts with squirrely scrollbars. We can do better.

Re:Experimental support for WebAssembly in V8 by geon on Tuesday March 15, 2016 @05:06PM (#11292998)
I mean you would do it the react way and only manipulate an abstract representation of the dom.
Re:Experimental support for WebAssembly in V8 by twistedpair on Tuesday March 15, 2016 @04:15PM (#11292630)
C++ speed in the browser... just be sure not to touch the browser.
Re:Experimental support for WebAssembly in V8 by omarforgotpwd on Tuesday March 15, 2016 @02:39PM (#11291958)
I was thinking more about Ruby, Python, or go
Re:Experimental support for WebAssembly in V8 by BuckRogers on Tuesday March 15, 2016 @02:41PM (#11291973)
It probably won't happen in V1 but yes, it's incoming. We'll be able to pretty much use whatever we want. When wasm was first announced Brendan Eich made this clear, and a lot of the JS-All-The-Things folks who bet their careers on it were upset.

I'm not sure why, if you like JS, people can keep on using JS indefinitely. My theory on programming is to use the language that I prefer, and worry about everything else secondary. For me that's Python. I've mostly avoided any deep dives on learning JS so it'll be nice to be a part of a budding Python web frontend community when the time comes.

Re:Experimental support for WebAssembly in V8 by matt4077 on Tuesday March 15, 2016 @04:35PM (#11292777)
I'm getting somewhat excited about swift. It's quite a modern language syntactically and python/ruby-like productivity may not be out of reach. Yet it leaves managed languages in the dust performance-wise (factor 100x plus), on par with C++.

And the memory management is uses should make compilation to WebAssembly rather straightforward. (... I believe – I have little knowledge of that sphere and welcome any corrections).

Re:Experimental support for WebAssembly in V8 by tanlermin on Tuesday March 15, 2016 @03:23PM (#11292277)
Wouldn't you still have to ship the entire python VM? That doesn't sound to feasible for your average web app.
Re:Experimental support for WebAssembly in V8 by geon on Tuesday March 15, 2016 @03:48PM (#11292443)
Once wasm supports some access to the gc (on the roadmap), It should be feasible. You wouldn't reimplement the entire runtime, but reuse functionality (like the gc) from the js runtime.
Re:Experimental support for WebAssembly in V8 by esailija on Tuesday March 15, 2016 @03:32PM (#11292337)
Do you have any reference for that? You can already technically use whatever you want and wasm will not remove the need for high level languages also having to supply a (multi megabyte) runtime as there is no direct mapping to wasm instructions unlike with C++ or C.
Re:Experimental support for WebAssembly in V8 by BuckRogers on Tuesday March 15, 2016 @04:57PM (#11292924)
Eich's comments on HN and on Twitter. It was all discussed when wasm was first announced a while back. I'd dig up the exact source comments from Eich, but at work. You'll probably see enough comments from the wasm folks in this post to verify whatever particular technical specs you're interested in to satisfaction.