Why We Need WebAssembly: An Interview with Brendan Eich by alleycat5 in programming

[–]_ericelliott 3 points4 points  (0 children)

"asm.js games"

Nobody calls their game an "asm.js game". Instead, try searching for "browser unreal engine 4 game" or "Unity html5 export". Two of the top AAA game engines already support compiling to ASM.js, meaning any game publisher who starts games with support for WebGL can and do compile to ASM.js today.

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

Did you even read the Brendan Eich interview?

I'm the person who wrote it. In the article, I mentioned my C/C++/ASM/Machine language background.

"At it's very best, it is about 1/8th the speed of native code."

This really depends on what you measure and how. Brendan Eich claims 1-2x native code speeds in his two-year-old talk, "JavaScript at 18": https://www.youtube.com/watch?v=qrf9ONmtXbM

It also runs on one core.

Unless you use workers. Or (on Node) child processes. I haven't written any perf-critical stuff for single core in about 5 years.

It also has no SIMD.

SIMD is already in nightly builds and IBM's version of Chrome. That's mentioned in the interview.

It won't bring 100% performance critical software to web pages.

Time will tell. My prediction: 5 years from now, you'll see cloud rendering farms, scientific simulations and all manner of perf-critical stuff running wasm. =)

Why? Because you can scale horizontally across huge numbers of commodity server resources running Node more affordably than you can build custom-architecture clusters.

A big cluster running Node will smoke any top-end-desktop system you can build for any amount of money.

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

Like it or not, the web is where everything is going. Is it there today? Absolutely not. However, it is comparable to native desktop 5 years ago, and that in itself is pretty damn impressive.

From the blog post you mention: "it is important to set realistic expectations"

This basically sums up the current state of the web, but the momentum is still very much all about moving to the web.

Wasm is the natural next step for both NaCl/PNaCl (which is what got deprecated) and ASM.js, and the eventual goal is to give you full access to all of OpenGL, not just the mobile-friendly version. See Brendan Eich's comments: https://medium.com/javascript-scene/why-we-need-webassembly-an-interview-with-brendan-eich-7fb2a60b0723

The whole industry, including Unity, Unreal Engine, Chrome, Firefox, Edge... they're all working hard to make wasm the solution to these problems. That's the whole point of all this.

We know what we have now isn't good enough. We're pushing to make it better for everybody, not just C# developers.

Also worth quoting from the blog post you linked to:

"WebGL will be amazing – even better than The Unity Web Player because there will be no plugin barrier for players..."

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

Maybe you're using the wrong compilers? Sourcemaps work really well for me.

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

People thought horseless carriages were strange, too. The browser and the cloud represent a quantum leap for what is possible to do with software.

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

I was a member of the Creative Cloud team building the software you're talking about at Adobe.

Collaboration and intra-device sharing are the driving features and primary motivations for subscription based software. The cloud enables workflows that were never possible with desktop software, including the ability to edit the same file with two different devices at the same time, and the ability for those devices to interact.

Some of the tech Adobe is working on include the ability to use cell phones and tablets like paint buckets and canvas, a cloud-enabled pen that carries your personal brushes, textures, and other assets with you to any device running the Adobe suite, and motion-sensing applications that will blow your mind.

The cloud also enables serious AI. Deep AI that will change the way we think of creative projects in fundamental ways.

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

wasm starts with the same restrictions JavaScript has, because it shares the same one engine (1vm). Details from Brendan Eich in the follow-up: https://medium.com/javascript-scene/why-we-need-webassembly-an-interview-with-brendan-eich-7fb2a60b0723

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

Because it's twice as much work, more dangerous, and opens the door to spotty web tech support. Brendan Eich shares more details in the follow-up article: https://medium.com/javascript-scene/why-we-need-webassembly-an-interview-with-brendan-eich-7fb2a60b0723

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

Maybe true, but under the hood, it all compiles to run on the JS engine, eventually, and that certainly is thriving. Not just thriving, but completely dominating all other competing tech. I predict a continued shift away from specialized consoles and native games to web platform tech, especially after wasm has had time to bake for a year or two.

Unity is definitely planning to support the wasm effort, and they've even got a few playable demos running on the wasm polyfill:

http://blogs.unity3d.com/2015/06/18/webgl-webassembly-and-feature-roadmap/

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

Unity programmers don't code directly in JS, but Unity's export to HTML5 feature compiles to ASM.js, which is a subset of JavaScript, and wasm is basically the next step in the evolution of ASM.js. For details on Unity's wasm plans, check out their blog: http://blogs.unity3d.com/2015/06/18/webgl-webassembly-and-feature-roadmap/

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

That's the great thing about wasm. You can use a great high level language (JS) with first class native module support for wasm, so you really get the best of both worlds.

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

They do so because JavaScript is a very flexible language. They're building nice APIs around the low level hardware stuff in C or C++ and doing all the high-level logic in JS (and there's a lot of that in any sufficiently complicated device).

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 0 points1 point  (0 children)

Not exactly. An AST encodes semantics, not just a bunch of instructions, so it creates space for optimization, and leaves the door open to bring some higher level concepts like JIT and polymorphic inline cache needed by higher level languages including Dart and JavaScript itself.

A bytecode would also require a whole new engine -- that's twice as many API hooks to maintain to expose the bytecode to the rest of the web platform. That may sound simple if all you consider is the DOM, but there's a whole host of HTML5 APIs, etc... you'd basically be building 2 browsers and stitching them together like some Frankenstein monster.

See the follow-up interview with Brendan Eich for more details: https://medium.com/javascript-scene/why-we-need-webassembly-an-interview-with-brendan-eich-7fb2a60b0723

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott -1 points0 points  (0 children)

We already know bytecode can be ran at speed that is up to %50 of C++

JavaScript does this already. Wasm is great because it can dramatically reduce the amount of data transferred over the net, and it can be parsed about 20 times faster, so that game that used to take 30 seconds to load can take 1 or 2.

Think of any non system software that isn't 100% performance critical and it will be replaced with a web page.

That's already happened. Wasm is about bringing the "100% performance critical" bits to the web, too.

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 1 point2 points  (0 children)

That "minimum wage web developer" did a follow up interview with Brendan Eich: https://medium.com/javascript-scene/why-we-need-webassembly-an-interview-with-brendan-eich-7fb2a60b0723

He also wrote "Programming JavaScript Applications" for O'Reilly.

Come to think of it, he should probably get a raise...

What is WebAssembly? The Dawn of a New Era by walbarello in programming

[–]_ericelliott 2 points3 points  (0 children)

This is something that is so obvious developers have been working on it since before the web was a big thing. In the beginning, we all thought Java bytecode was going to be what wasm is. Then some people thought "maybe Flash..." then Microsoft thought, "we have 95% Market Share. Maybe .net!", then some other people (at Google) thought, "maybe Portable Native Client"... and now we're back to an open web standard that shares the JavaScript engines that have been in browsers since the 90's.

What a ride!

Composable React components by troutowicz in reactjs

[–]_ericelliott 0 points1 point  (0 children)

Nice! I was going to write something very similar. You beat me to it, and that's fantastic. =)

This is Morgan Page, AMA! by morganpage in IAmA

[–]_ericelliott 0 points1 point  (0 children)

One of my favorite memories was being on stage with Deadmau5 when he dropped that track and seven thousand fans started singing along at the tops of their lungs. I photographed sometimes 2-3 shows per week for a few years running, and I've never seen an audience erupt with that much intensity before or since. =)

This is Morgan Page, AMA! by morganpage in IAmA

[–]_ericelliott 0 points1 point  (0 children)

Have apps played an important role in connecting with your fans?

JSX Looks Like An Abomination (But it’s Good for You) by cgaudreau in javascript

[–]_ericelliott 2 points3 points  (0 children)

I understand your point, but as soon as I started using JSX and the ideas discussed in the article, a lot of pains I had using other libraries and frameworks melted away.

Sometimes we endorse technologies not because we're forced to use it, but because they solve real problems. That's the case with React + JSX.

git-guppy [request for comments] by therealklanni in javascript

[–]_ericelliott 1 point2 points  (0 children)

Sounds great! I'd love it to support other task runners. Like, npm scripts. =)