News for hackers. Stuff that matters.
Re:Web Assembly now supported across all browsers by inDigiNeous on Monday December 04, 2017 @06:11AM (#15843068)
Any good example projects already using WebAssembly ? Some list with multiple examples would be nice.
Re:Web Assembly now supported across all browsers by send_computers on Monday December 04, 2017 @07:23AM (#15843323)
Re:Web Assembly now supported across all browsers by pjmlp on Monday December 04, 2017 @06:44AM (#15843184)
There are already ongoing efforts to port JVM and CLR to WebAssembly.

Someone is porting TypeScript to WASM, named AssemblyScript.

It won't surprise me to see a WebAssembly backend for Flash.

Re:Web Assembly now supported across all browsers by whatever_dude on Monday December 04, 2017 @10:01AM (#15844291)
> It won't surprise me to see a WebAssembly backend for Flash.

If Adobe was smart, they'd have started working on am asmjs (later WebAssembly) + webgl output for Flash a long time ago.

Alas they're not exactly forward-planning and let the platform die, and its tools fizzle. Today there's already better alternatives that do things more cleanly/natively (like Pixijs). If you use TypeScript with Pixijs, it's like having a much more advanced ActionScript, better development tools (your browser's devtools), and better performance. You lose a "stage" for free drawing, but that was more often than not a misused feature anyway (and one that has good alternatives in the DOM/JS world anyway).

Re:Web Assembly now supported across all browsers by pjmlp on Monday December 04, 2017 @11:55AM (#15845305)
When the whole story with Apple happened, Adobe eventually created a native code backend for Flash.

And for a while they even had a C/C++ compiler for the Flash VM.

So if they really cared, it isn't something that should be too hard for them.

Failing that, it might be an interesting project for a compiler hacker without ideas.

In any case, I see it more like preserving many of the games written in Flash.

Re:Web Assembly now supported across all browsers by frik on Monday December 04, 2017 @08:32AM (#15843614)
We should sometimes pause, and think about the disadvantages a new technique will bring to the web.

I am completely fine with asm.js.

Though WebASM is a like a wet dream for big corp with mass of legacy code in C++. We will see Office running on WebASM and other closed binary blobs in near future. It's very contrary to the concept of the open web - do you want to live in AOL-land again, were everything is closed off? No? Anyway great you helped them. I fear WebASM has several downsides that will harm young startups a lot in near future - only unicorns and big corps will benefit, it will be a win-win, less competition, because of harder entry to market, and they can ship their decades old C++ blobs as a service. It's time to wake up, and stop WebASM or severe limit it's functionality. Where is Mozilla foundation? Or is the new Mozilla just another startup, backed 90% by Google money.

Re:Web Assembly now supported across all browsers by ankitpati on Monday December 04, 2017 @08:53AM (#15843773)
I am a C coder, and I cannot wait to have my code on the web, decimating inferior languages like JavaScript. If a startup relies on JavaScript to keep out competition from C coders, well, too bad. They will be decimated in terms of performance. The web will be ruled by the best performing apps written in the language of the Linux kernel.
Re:Web Assembly now supported across all browsers by whatever_dude on Monday December 04, 2017 @10:05AM (#15844326)
Performance in web apps is not a goalpost for everybody. While there's certainly web apps that are problematic in terms of performance, you're unlikely to be running at 100% CPU the whole time, so it's not like using C will be the right solution.

I can see how C/C++ (and, well, more likely Rust) will become a de-facto solution for when you need performance or some type of robustness to your apps (ie probably the right thing for Figma). But the potential performance improvement might be negligible on most makes, and unlikely to offset the fact that you'd be working off a completely different stack making things like debugging and inspecting much harder.

What I think is likely is that using WebAssembly will allow new types of web apps to become popular. Things like video encoders, image editors, etc. Things that you just wouldn't do with JS anyway, at least not in the heavy parts. Thing of a standard web app that uses ffmpeg on the background.

Re:Web Assembly now supported across all browsers by flavio81 on Monday December 04, 2017 @10:12AM (#15844377)
>Performance in web apps is not a goalpost for everybody.

But in 2017 startup and companies are starting to understand how fast response times (on a website/web-app) are of critical importance for gaining a good user base.

Re:Web Assembly now supported across all browsers by whatever_dude on Monday December 04, 2017 @01:25PM (#15846174)
True, but in my experience bad UI response times are more related to something goddamned dumb like running a series of super expensive scroll events or watching DOM changes for some idiotic reason, more than about raw processing power.

A C solution might make the former faster, but it'd still be a dumb architecture. A cheaper solution than migrating your whole codebase to a separate language and build process is knowing how to deal with events and how to parallelize (or delegate) stuff correctly.

Re:Web Assembly now supported across all browsers by flavio81 on Monday December 04, 2017 @10:14AM (#15844404)
>I am a C coder, and I cannot wait to have my code on the web, decimating inferior languages like JavaScript.

Not only you but many, many programmers out there in other languages, wishing for more performance, or for a higher level of abstraction. I will brace myself for the amazing applications that will be built now for the web.

Re:Web Assembly now supported across all browsers by kayoone on Monday December 04, 2017 @08:44AM (#15843698)
afaik you can not just take a C++ blob, compile to WebASM and be done. Your business logic can be there, but the User Interface would still need to be JS and HTML in the end, unless you want your app to just draw to a canvas, but even that would only work if you rewrote the rendering as webasm has no access to OS level libraries
Re:Web Assembly now supported across all browsers by flavio81 on Monday December 04, 2017 @10:16AM (#15844421)
>unless you want your app to just draw to a canvas,

Don't count this out; there opens up the opportunity for creating new, good looking toolkits that are faster to use than coping with html + css' limitations.

Re:Web Assembly now supported across all browsers by kayoone on Monday December 04, 2017 @11:01AM (#15844828)
not sure if that's a viable alternative for the web. It will most likely consume more computing resources which makes it hard on mobile and the responsive web goes out of the window. It can make sense for certain interactive elements though.
Re:Web Assembly now supported across all browsers by flavio81 on Monday December 04, 2017 @12:23PM (#15845552)
The rendering of (html+css) to the screen already uses resources on regular web browsing. This wouldn't be needed (if using a GUI toolkit under Webassembly) and could probably run much faster.
Re:Web Assembly now supported across all browsers by arithma on Monday December 04, 2017 @08:39AM (#15843668)
The open web should be most concerned with users. If big corporate products is what they want on the web, then so be it!