Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

261–270 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#261

Earlier quoted context omitted.

What kinds of security issues? I really can't think of any besides some issues with too many threads spawned (that can be trivially blocked).

Could be a new source of undefined behavior and memory exploits, if threaded code is allowed to access collections that allocate memory without taking all the locks they should?

Inside the VM, yes. But not a security threat for the host.

The VM should be sandboxing the pages from each other, so those are potential security threats against targets on the same pages only. Not something to be too concerned about.

Re: WebAssembly support now shipping in all major browsers

#262
post #167
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…

I'm more excited about the prospects of running V8 inside ChakraCore inside Quantum.

I'm more exited about the prospect of running all of FF or Chromium inside of Edge so I can cut my workload down by 50%

Re: WebAssembly support now shipping in all major browsers

#263

Earlier quoted context omitted.

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…

JS is not particularly accessible to beginners and makes it easy to write bad/dangerous code. A good programmer can write in anything, but it's the not-so-good programmers that you have to worry about.

Agreed.

To be a strong candidate for a web scripting language you need three things:

* native lexical scope. This is how all web technologies work.

* Minimal reliance on white space as syntax. The language needs to be portable. Overloading white space as syntax makes a language more brittle, particularly in distribution.

* Immediate interpretation without a prior static compile step. This keeps the code open to examination and minimizes compile time delays.

Find another language that doesn't have all the stupid crap that JavaScript has and yet still excels in those three points and I will agree upon a replacement.

Re: WebAssembly support now shipping in all major browsers

#264
post #21

Earlier quoted context omitted.

>> Seriously JS should not be the lingua franca of the web But neither should this. Really, keep your code off my computer as much as possible.

I think it's darkly humorous that I have to install browser plugins to stop sites from mining monero in my browser. It's like websites are those creepy spider things in the Matrix, except instead of sticking humans in pods to harvest their biochemical energy, they're just running up our home electricity bills by maxing our CPUs.

What's the difference in using your electricity to mine crypto-currencies and using it to advertise to you?

I don't really see what's dark about it.

Re: WebAssembly support now shipping in all major browsers

#265
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…

IE/Edge heritage goes back to Spyglass Mosaic.

Re: WebAssembly support now shipping in all major browsers

#266

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

> get away from JS on frontend

Yes, it's just about time for another generation to be old enough to think that we need to rewrite everything in a new language.

Re: WebAssembly support now shipping in all major browsers

#267
post #185
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…

My CS background is a bit weak... is the hypothetical Metal architecture he describes supposed to be satire or actually a good idea?

Implement a WASM JIT in kernelspace & you don't have to have a userspace while still having hot code hopefully optimized to remove bounds checking. Now all your programs are WASM modules & we can replace your CPU with some random architecture that doesn't have to care about supporting more than ring0. Oh why not implement a nearly-WASM CPU? Probably just change branches to GOTO. Now the only program people care about, their browser, can have a dead simple JIT for this architecture, with WASM-in-the-browser being nearly as fast as any other program

Re: WebAssembly support now shipping in all major browsers

#268

Earlier quoted context omitted.

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…

JS is not particularly accessible to beginners and makes it easy to write bad/dangerous code. A good programmer can write in anything, but it's the not-so-good programmers that you have to worry about.

> JS is not particularly accessible to beginners and makes it easy to write bad/dangerous code

That describes just about every programming language ever.

Re: WebAssembly support now shipping in all major browsers

#269

WebAssembly is not worth the effort unless it finally is supported by the LINK tag. Seriously, using JS to load a JS alternative is ridiculous.

I can't agree more...but I believe the issue is that WASM sold a lie. Right now if you read between the lines it is argued that WASM is there just to help JS do more not to replace it.

> WASM sold a lie

What? The original WebAssembly announcement[1], which can be viewed as the manifesto for how WASM was envisioned, it clearly says "once browsers support the WebAssembly syntax natively, JS and wasm can diverge". Eich's goal with WebAssembly is not replacing JS, it's providing a better compilation target for other languages. WebAssembly is a replacement for asm.js, not JavaScript. No one is selling a lie here.

[1]: https://brendaneich.com/2015/06/from-asm-js-to-webassembly/

Re: WebAssembly support now shipping in all major browsers

#270
post #241

Earlier quoted context omitted.

I think Blink's LayoutNG project and Servo both show that you can rewrite your layout implementation (and Servo also having a new style implementation, now in Firefox as Stylo). I think both of those serve as an existence proof that it's doable.

It's doable if you already have a large team of experienced web engine development experts, a multi-million budget and years to spend on just planning. Implementing an open standard shouldn't be like this. Even proprietary formats like PDF are much simpler to implement than CSS.

It's not doable, part from when it is.

'Open standard' has nothing about something being simple and straight forward. What CSS is trying to do is complicated because of a whole bunch of pragmatic reasons.

Last time a browser tried to 'move things forward', ngate aptly summed it up as

    Google breaks shit instead of doing anything right, as usual.
    Hackernews is instantly pissed off that it is even possible to
    question their heroes, and calls for the public execution of
    anyone who second-guesses the Chrome team
Post reply on HN