Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

221–230 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#221
post #61

Earlier quoted context omitted.

Lots of nice games to keep alive. Video playback can be done via WebGL shaders, just like rendering video on the good old days with SIMD. And most important, why not? Someone will eventually do it, there are already JVM and CLR ongoing ports.

There is even an ActionScript to Javascript __piler https://as3js.org/

ActionScript is really the easy part of making a Flash player: the hard part is being bug-compatible with almost every version of Flash ever shipped (the Adobe implementation has lots of branches depending on version of Flash that created the file!).

That, as far as I'm aware, is why Shumway died.

Re: WebAssembly support now shipping in all major browsers

#222

Earlier quoted context omitted.

I'm excited for all of the ports of C++ projects the web will get. For example imagine being able to run a full self hosted C++ compiler itself from a browser on any device with a browser.

I don't really understand this. Is a compiler in the browser all that different to a compiler on a server?

yes.

In the browser it can run offline and does not need the server at all. Wheter a c++ compiler really makes sense, I doubt, but it will definitely come ..

Re: WebAssembly support now shipping in all major browsers

#223

Earlier quoted context omitted.

This is wrong. The focus will simply switch to sandbox escapes. On x86, the only real "sandbox" you have is what your MMU gives you. For as long as executable has access to browser's address space, it can do anything a browser can, including reading your webcam, mic, sensors, GPS, etc

>> This is wrong. The focus will simply switch to sandbox escapes. Thank you. We have a winner here! And the people trying to escape them will have the full capability of native code running on your CPU. In the mean time, permissions will be granted for ever increasing parts of the system. Users will not be prompted to "allow" for every site they visit because that will be tedious so browsers will start the enable pe…

How is it insane? It does a lot of things better than our current OSes. As long as we go into it knowing that's what we're doing it's an inherently better application and security model in a lot of ways.

Re: WebAssembly support now shipping in all major browsers

#224

I'm not as excited for this as I used to be. In most user applications JavaScript is good enough or better. If it wasn't then we wouldn't be taking the browser to make desktop applications. Recently I decided to make a desktop app and asked around about the different UI libraries. The answer I keep getting is "just use electron and JavaScript". Why? Because love it or hate it the Dom is fantastic and simple for makin…

JS is enough for most application code. There are libraries that have and always will be in C, C++, or something similar, and it would make the most sense to wrap and expose them for different environments. JS makes no sense for shared libraries.

Re: WebAssembly support now shipping in all major browsers

#225
post #34

A good occasion to watch Gary Bernhardt's talk "The Birth & Death of JavaScript" [0] again, where he talks about the precursor of WebAssembly: asm.js and the future implication it "could" have in the future in a really humorous way. A few years old but still relevant. You want Gimp for Windows running in Firefox for Linux running in Chrome for Mac? Yeah sure. [0] https://www.destroyallsoftware.com/talks/the-birth-and…

There's another reason why I want JavaScript in the browser to die: We haven't had a new browser engine written from scratch since KHTML. Firefox is a descendant of Netscape, Chrome (and Safari) is a descendant of WebKit which is itself a descendant of KHTML, Edge is closed source, but I'm almost sure there's some old IE code in there. Why? It's simply too expensive to create a fast (and compatible) JS engine. If Web…

WebAssembly has nothing to do with JavaScript. When people make this association it is clear they are painfully unaware of what each (or both) technologies are.

WebAssembly is a replacement for Flash, Silverlight, and Java Applets.

Re: WebAssembly support now shipping in all major browsers

#226

Earlier quoted context omitted.

I definitely don't disagree with your statements, but I think OP meant more akin to "the web is not for running other peoples code" . Ie, the web is for content, not applications. This may not be what OP meant.. but it's something I can agree with to a degree. I love web apps, don't get me wrong, but I wish we had meaningful fallbacks for those who want content without features.

> Ie, the web is for content, not applications. Ideally yes, but that horse left the barn years ago. The browser becomes more capable, chalk full of more APIs over time, not less.

The more capable the browser gets the more people will turn off these capabilities. I love JS and the web, yet I have JS off by default! Mostly because it gets rid of a lot of crap, but I also don't trust every single web site I visit.

Re: WebAssembly support now shipping in all major browsers

#227

Earlier quoted context omitted.

There's another reason why I want JavaScript in the browser to die: We haven't had a new browser engine written from scratch since KHTML. Firefox is a descendant of Netscape, Chrome (and Safari) is a descendant of WebKit which is itself a descendant of KHTML, Edge is closed source, but I'm almost sure there's some old IE code in there. Why? It's simply too expensive to create a fast (and compatible) JS engine. If Web…

I completely disagree that the issue is JavaScript here. In my opinion, the issue is the DOM. It's API is massive, there is decades of cruft and backwards compatibility to worry about, and it's codebase is significantly larger in all major open source browsers out there.

Naw, the DOM is fairly small. Go here for a summary http://prettydiff.com/guide/unrelated_dom.xhtml

HTML is far larger than the DOM. Like comparing an ant to Jupiter.

Re: WebAssembly support now shipping in all major browsers

#228
post #63

Earlier quoted context omitted.

> People install or explicitly download code they want to run Not really, explicit installation are not the real difference: you ask for one package in some package manager and you will commonly implicitly get a bunch of other dependencies installed, you will likely never be able to feasibly personally audit all those implicitly installed packages if we are talking about e.g OS repositories... The real differences ar…

The last time that a package I installed proceeded to install code that the vendor didn't know about was never. The last time a web page caused my browser to download and run js that the page owner didn't know about was five minutes ago.

So every package author understands each of their dependencies and all of their respective sub-dependencies, recursively on down?

This is probably the best bit of programming humor I've read all morning.

Re: WebAssembly support now shipping in all major browsers

#229

Earlier quoted context omitted.

> "Red herring. People install or explicitly download code they want to run." When you visit a website, and you have given your browser permission to run JS, you're giving your permission to run JS. If you want to block scripts by default, use an extension like uMatrix: https://addons.mozilla.org/en-GB/firefox/addon/umatrix/

>> When you visit a website, and you have given your browser permission to run JS My browser never asked me about JS. Even if it did, browser developers would switch the preference rather than annoy the user with a prompt every time a site wanted to run some JS. The end result is that whatever is common practice, the users will end up accepting by default. In such cases it is the responsibility of the people setting…

Take some personal responsibility for the tools you use and how you use them. If a tool has some behaviour I don't like, but makes it easy to change it to something I do, there's no point in moaning that the option exists.

Re: WebAssembly support now shipping in all major browsers

#230

Can't wait for DOM interop and get away from JS on frontend. Seriously JS should not be the lingua franca of the web :)

Currently DOM interop is a distant wishlist, so I wouldn't hold my breath. JavaScript isn't a perfect language, but it does have native lexical scope, which makes it a good fit for the architecture of web technologies.

> Seriously JS should not be the lingua franca of the web

What would you recommend for a replacement? When I typically see this it is from people can't figure out JavaScript as opposed to any rational technological reasoning. I cringe at the idea that people would offer forth really bad things that don't fit well merely to satisfy their own insecurities.

Post reply on HN