Live data from Hacker News

Goodbye PNaCl, Hello WebAssembly

blog.chromium.org

321–330 of 352 posts

Re: Goodbye PNaCl, Hello WebAssembly

#321

Earlier quoted context omitted.

Project Mortar is different in the fact that it is PDFium and Adobe Flash being allowed via Pepper API — basically it's for sandboxing those current native plugins. This would not be a public web use case. PNaCl vs WebAssembly was all about letting everybody run sandboxed native code in the browser without any extensions or prompts. Native Client (the portable version known as PNaCl) was an open source project by goo…

Yeah, AFAIK PDFium doesn't use PNaCI and Flash will only be around as long as absolutely necessary. The only reason they aren't using PDF.js is because the PDf spec is ~12K pages long and they don't want to throw engineer resources at it anymore.

> they don't want to throw engineer resources at it anymore.

"As I mentioned elsewhere, there haven't been any full time mozilla devs on PDF.js for quite awhile. I'm not sure I actually see the whole maintenance cost savings argument since PDF.js has practically cost Mozllia nothing the last few years. A lot of bug fixes have come from unpaid contributors in that time. Initially, PDFium was pitched as a freebie if we added support for chromium's flash and then we'd also get improved PDF printing and form support. However, the amount of effort that has gone into supporting PDFium is already far beyond what it would have taken to improve PDF.js form support and help improve Firefox's printing (which would have benefited the web in general). Though, this is my very biased opinion as I was tech lead of PDF.js."[1]

And this has been borne out--Project Mortar was announced about 9 months ago, and if you look at the relevant bugs in bugzilla, they are still pretty far away from getting it into production. They could have used a fraction of those resources to get pdf.js at parity with pdfium.

[1] https://news.ycombinator.com/item?id=12615559

Re: Goodbye PNaCl, Hello WebAssembly

#322

Earlier quoted context omitted.

WASM is aiming to be fast enough to actually be capable of running a rendering engine. No more DOM for adblockers to look at, the pages may finally become canvases. I just cannot see this not happening.

If you run your own rendering engine you lose accessibility. If you add aria tags to stuff in order to make it accessible, adblockers will be able to read them as well.

I don't think advertisers care about accessibility. Not the same companies that want auto-starting video clips in your browser.

As for the site owners - unless it's someone large enough to care, I think the usual choice between "letting a few disabled persons access the site" and "getting a few more bucks from advertising" would be quite obvious. If that question would even arise.

Re: Goodbye PNaCl, Hello WebAssembly

#323
post #285

Can somebody ELI 5 what is the benefit of WebAssembly vs Asm.js?

It's a format designed to be a target for static languages that do manual memory management (like C/C++) instead of JavaScript that some engines know how to recognize and optimize. The binaries are smaller and much faster to parse and the sandbox model results in much less overhead. For a concrete example, at least two JavaScript engines (those of Chrome and Firefox) need to emit almost no range checks on regular mem…

    target for static languages that do manual
    memory management
So I will have to do all the garbage collection myself? Isn't that a huge burdon on the programmer? And will this lead to lots of apps with memory leaks that needlessly eat up my resources?

Re: Goodbye PNaCl, Hello WebAssembly

#324
We used PNaCl to port some games to a Smart TV. It was a painful experience. Debugging chrome from a custom gdb, breaking changes from release to release, and some very subtle bugs in pepper API. But the final results were surprisingly not so awful.

Re: Goodbye PNaCl, Hello WebAssembly

#325

Earlier quoted context omitted.

Doesn't WASM need GC support before Go can be used? It'll need to be fully managed languages until then, I think. With that said I'm just parroting some other comments I've seen on this topic in other contexts, so I'm asking the question genuinely.

> Doesn't WASM need GC support before Go can be used? Why can't the Go implementation can have its own GC, the same as the Go implementation for, say, x86 does?

It's possible but will run much slower with some of the restrictions in webasm.

Re: Goodbye PNaCl, Hello WebAssembly

#326
post #299

Earlier quoted context omitted.

Without unsigned types you have to use the next larger type and mask. It's ugly, a pain, and slower. You run into this problem a lot when dealing with binary data.

You're begging the question, assuming you have to represent a particular unsigned type to start with. What's the problem that you're trying to solve? I appreciate that e.g. particular image formats are defined in terms of unsigned integers of particular sizes, but parsing binary formats seems like a specialized use case that's not worth distorting the whole language over (and it already involves fiddling with endiann…

I don't think this is a "begging the question" fallacy. General purpose programming language often need to deal with binary data. This can be anything from documents, compressed files, images, audio, video, network data, a video framebuffer, and so on. Dealing with binary is in no way a "specialized use case" of programming; I'm honestly a little incredulous at your insinuation.

Further, this "distortion" amounts to adding 4 types and defining bitwise behavior, and since unsigned shifts are easier than signed shifts, no problem. I wouldn't call that a distortion, especially not compared to things like for-in and lambdas.

But really, can you explain your disdain for unsigned numbers? I've never heard someone argue for their exclusion from Java -- I thought we all accepted it was a mistake.

Re: Goodbye PNaCl, Hello WebAssembly

#327

Earlier quoted context omitted.

On windows, you no longer need either with bash for windows you can have a near complete linux experience while running inside windows natively.

If you can assure me that is the case, fantastic! Do you know of a way to test the UX of ssh from bash for windows for less than $5 ?

I..should have clarified that I don't have easy access to a windows machine and don't have access at all to one that I can install stuff on.

Re: Goodbye PNaCl, Hello WebAssembly

#328

Earlier quoted context omitted.

That won't be platform independent though I think. WebAsm can run on ARM as well as x86 and even PPC.

The p in pNaCL stands for "portable". The basic tech behind it is LLVM IR, which is the same tech Apple Store now uses to target the Watch and future devices.

So if I understand correct, they didn't like LLVM because it wasn't really designed for this purpose. Webasm has some advantages over it like being designed from the ground up to be a secure sandbox and fit in with existing javascript JITs. LLVM also isn't a fixed open standard and doesn't guarantee backwards compatibility (I think.) You can also compile LLVM code to webasm even today, so it isn't that much of an issue.

But this is just my impression to listening to some talks by the developers of webasm.

Re: Goodbye PNaCl, Hello WebAssembly

#329

Earlier quoted context omitted.

Yes, but the existence of ssh on chrome makes it much much easier to teach a windows user how to try out the linux command line. PuTTY is annoying as hell to help a new person get working and they might not have enough space for vagrant+virtualbox.

Just curious - why do you think PuTTY is annoying?

I wish I'd done a UI critique of it back when I was doing the relevant teaching.

Re: Goodbye PNaCl, Hello WebAssembly

#330
post #276

Earlier quoted context omitted.

You must have been working with at least quite young people or something. My experience goes the other way. I've seen people who bought a new computer because their fans were running at max and the reason for that was that they were full with dust and dog hair.

I "fixed" someone's computer that would regularly crash a few minutes after starting it by vacuuming the dust out. :)

Pure magic!
Post reply on HN