News for hackers. Stuff that matters.
Re:W3C recommends WebAssembly by EvanAnderson on Friday December 06, 2019 @12:01PM (#21723673)
Even if we don't lose the HTML-centered model, we are probably going to lose control of our browsers. Eventually somebody is going to ship a product that's nothing more than a browser implemented in WASM that runs inside your browser. The "inner browser" won't have content filtering, privacy controls, DOM inspector, or a Javascript debugger (for the Javascript engine running on the "inner browser") that you can interact with. You'll have to agree to let them run arbitrary code on your machine to even view the "website". There will be no "browse w/o Javascript" option in that future.

The kind of jerks who liked adding Javascript to block right-clicking, blocking "Paste" into password fields, etc, are going to absolutely love using the browser-in-a-browser product to deliver their "website".

For the inevitable replies: Yes-- you can already do this with minified Javascript. WASM, being targeted for performance, is just going to make this kind of asshattery faster.

Re:W3C recommends WebAssembly by mahidhar on Friday December 06, 2019 @01:25PM (#21724591)
Unfortunately, I must agree with you that there are definitely some very troubling implications to how WebAssembly might be used to build more effective walled gardens on the web.

I can easily imagine a "platform" WASM module which acts as a runtime for other WASM modules built by "app" developers. This Platform module can be easily cached by FAANG or other big commercial interests, similar to AMP by Google (maybe even be pre-bundled into the browser?). The only way to discover, download and run these other apps is through this curated Platform module. All this could be rendered through something like the Canvas API instead of the DOM, which again is managed on a low level by the Platform and in turn exposes higher level API's for the Apps. The Platform also has built in support for Ad networks, tracking, etc., which cannot be disabled without disabling the whole ecosystem of apps. And of course, like any good play/app store, it is completely incompatible with anything else, leading to new levels of Balkanization of the web.

I hope that this isn't the case, and I'm completely wrong about this. But I just can't shake the feeling that as a community, we are championing WebAssembly as purely a performance win, without considering how big commercial interests might seek to exploit this new technology.

Edit: typo with AMP

Re:W3C recommends WebAssembly by oaiey on Friday December 06, 2019 @03:06PM (#21725471)
This platform wasm will come. And it does not You do not need to be evil, especially in the beginning. Java or .NET Runtime and Libraries are a bit heavy for a small web page.

And from there it is just the next step to run a base platform like Android user space or a simple runtime like blazor.

In the end wasm is a runtime. There were physical Java Processors and I am pretty sure there will be webassembly processors.

Re:W3C recommends WebAssembly by lightgreen on Saturday December 07, 2019 @02:08AM (#21728941)
There were not physical Java processors, because it’s too hard to emulate jvm in hardware. But there were processors with instructions optimized for interpreting jvm bytecode. These would be pretty useless nowadays (for either jvm or wasm) because baseline compiler which translates vm bytecode to native bytecode is easy and more efficient than direct vm support in hardware.
Re:W3C recommends WebAssembly by salawat on Friday December 06, 2019 @05:40PM (#21726740)
Delete this!!!

Thanks for dooming us all, hombre. I'm holding you personally responsible when it happens.

In fact I think it may already have. Took a look at a web based learning portal for my niece the other day, and after poking around in devtoolsfound it was pretty similar to what you described.

Re:W3C recommends WebAssembly by api on Friday December 06, 2019 @09:20PM (#21728026)
This would be no different from an app, just delivered via web. So not really anything new.
Re:W3C recommends WebAssembly by IvanK_net on Friday December 06, 2019 @12:42PM (#21724129)
It makes no sense to me. You are saying, that instead a 5 kB webpage, you would load 50 MB code, which emulates a browser, just to show you the same webpage?

Every webpage pays for the traffic in some way, and everybody tries to save web traffic as much as possible (optimizing images, videos, minifying JS, CSS ...). It makes no sense to expect, that websites would turn the opposite way just for fun.

I would be very glad, if you can emulate a computer in a browser, so you can e.g. use VirtualBox or VMWare comfortably in your browser. Still, it will be sandboxed (it can not turn off your computer, or clear your hard drive, etc.).

I think the web is the most open, independent, secure and versatile platform today. And I hope it will become even better and more powerful in the future.

Re:W3C recommends WebAssembly by EvanAnderson on Friday December 06, 2019 @12:50PM (#21724218)
Yes. I am saying that some website operators would like to load an entire browser into your client just so they can control the presentation (make sure you're not able to block their ads, control their scripts, etc).

I'm not talking about the sandboxed browser being able to "clear your hard drive", etc. I'm talking about users having no real agency when it comes to controlling the presentation of websites. (Sure, it's code running on your computer. You're free to attach a debugger to step thru native code that runs a VM that runs a nested VM that's ultimately running the code you'd actually like to influence. Let me know how that goes for you.)

Have you seen JSLinux[1]?

[1] - https://bellard.org/jslinux/

Re:W3C recommends WebAssembly by IvanK_net on Saturday December 07, 2019 @07:23AM (#21729899)
I don't think it is necessary to make websites extremely complex, to prevent you from blocking ads.

I think blocking ads is a game you can never win. If you are able to block ads on some websites today, it is just because the site owners allow you to do so (they could easily prevent you from doing so). Ads technologies can evolve to a point when you as a human can not distinguish between ads and the rest of the content.

Re:W3C recommends WebAssembly by int_19h on Friday December 06, 2019 @06:33PM (#21727157)
It would make content control more complicated, but it can't make it impossible.

If the embedded browser uses the host's HTTP implementation, then you can filter and edit content there.

If it implements HTTP itself on top of raw sockets, then you can intercept traffic on socket level (although you'd need to MITM any SSL connection).

Re:W3C recommends WebAssembly by gmueckl on Friday December 06, 2019 @08:06PM (#21727724)
If the inner browser has its own client certificate or simply checks for a set of known server certificates, MITM won't get you anywhere. Done right, this could well be game over.
Re:W3C recommends WebAssembly by int_19h on Sunday December 08, 2019 @05:04PM (#21738694)
For it to be truly game over, the wasm implementation it's running on must also protect the wasm payload itself, otherwise it would be trivial to patch that to MITM it.

So, on something like iOS, it could be game over (but I'm also curious what Apple is going to do with wasm there, given that it goes contrary to their strategy of being the gatekeeper for all code running on the platform). But not for the rest.

Re:W3C recommends WebAssembly by gmueckl on Thursday December 12, 2019 @07:01AM (#21771110)
Adding a ton of obfuscation will do the trick. Patching wasm requires reverse engineering and that is very cumbersome. For Blu-Ray it took months to reverse engineer the copy protection VM and that was with a mechanism that took a lot of attention. If it's your average website, it's far easier to stay ahead of the game.
Re:W3C recommends WebAssembly by jononor on Friday December 06, 2019 @02:09PM (#21724980)
Instagram, Facebook, Pintrest, Youtube apps are already this thing. Tens of megabytes embedding a browser to view web content. Their traffic covers a significant portion of the entire web. All of these have a lot to gain from rendering ad blocking impossible. And for keeping people on their "platform", inside their walled garden. Right now they are shipped as native apps, which the web version will nag you about until you install it. I don't think it is so farfetched that they will try to use WebAssembly for the same.
Re:W3C recommends WebAssembly by Quarrelsome on Friday December 06, 2019 @12:49PM (#21724206)
> It makes no sense to me. You are saying, that instead a 5 kB webpage, you would load 50 MB code, which emulates a browser, just to show you the same webpage?

Have you not worked in tech long? One of my 'favourite' things about one tech stack I once worked on was that someone decided to implement a file-system inside the a database that is stored on the file system. Even better, the database itself effectively just reimplements the features of a database.

So we have a file-system storing a database that exposes a completely different database that holds a file system.

Re:W3C recommends WebAssembly by golemotron on Friday December 06, 2019 @06:57PM (#21727332)
Re:W3C recommends WebAssembly by sjy on Friday December 06, 2019 @03:55PM (#21725893)
I wouldn’t be surprised if 50 MB was a more common webpage size than 5 KB these days.
Re:W3C recommends WebAssembly by shadowgovt on Friday December 06, 2019 @02:30PM (#21725177)
Well, someone attempting that will have a long row to hoe to get the thing working with the needs of networks with different performance standards, useragents with different screen structures, and users with different accessibility requirements.

Browsers are large and complicated software packages for a reason. Best of luck to whoever tries to compete with it in a browser in a browser.

Re:W3C recommends WebAssembly by EvanAnderson on Friday December 06, 2019 @02:51PM (#21725338)
The inner browser doesn't need to be a general purpose browser. It just needs to render the site-owner's content, run their scripts, etc. Once there's an API for WASM to manipulate the DOM accessibility becomes easier.
Re:W3C recommends WebAssembly by TomMarius on Friday December 06, 2019 @03:12PM (#21725518)
So react native?
Re:W3C recommends WebAssembly by cercatrova on Friday December 06, 2019 @12:19PM (#21723868)
This already happens. See Figma: https://www.figma.com/blog/webassembly-cut-figmas-load-time-...

To be honest, it's a unique property of the web for you to be able to easily read the source; however, users of other platforms such as Qt are not expected to read the source. The web is simply moving in the direction of all other UI platforms, so I don't quite understand the outrage. Yes, it sucks, but it'll make apps faster than the Electron mess we have now.

Re:W3C recommends WebAssembly by feanaro on Tuesday December 10, 2019 @08:58AM (#21752425)
The outrage is because the web isn't simply a "UI platform". That's only one use of it. It's also a document platform.

Also, arguments of the form of "X is unique, all others are doing the bad thing" are suspicious to me. This would mean we should cherish and preserve X, bringing the good aspect to other platforms, not devolving it into mediocrity or worse.

Re:W3C recommends WebAssembly by marcosdumay on Friday December 06, 2019 @06:40PM (#21727221)
Yes, and for games it will be great. And a mixed bless for web applications.

What won't be great are sites that do this to enforce ad viewing. But if it becomes common enough, you can expect ad-blockers to act on the frame-buffer of that virtual browser.

Anyway, the most annoying will be the stupid people that do that just because "Even Google does it!" "It's webscale!", or whatever people will be saying 5 years from now.

Re:W3C recommends WebAssembly by thosakwe on Friday December 06, 2019 @02:30PM (#21725181)
> Eventually somebody is going to ship a product that's nothing more than a browser implemented in WASM that runs inside your browser

Sounds like a slippery slope to me. What makes you think users will be satisfied with load times for something like that, which also probably will have a frustrating-to-use interface?

Re:W3C recommends WebAssembly by sjy on Friday December 06, 2019 @04:02PM (#21725947)
Users seem pretty satisfied with single-page apps. They are slow to load and have frustrating-to-use (inconsistent) interfaces, at least compared to my memory of 1990s desktop software. If users actually cared about performance then software would get faster over time.
Re:W3C recommends WebAssembly by Someone on Friday December 06, 2019 @06:55PM (#21727318)
Consider some company running some web application for their employees that “works best in” IE 6 or, for example, Chrome, but the 2018 version.

A third party that offers a way to run that on their iPad at the cost of a one-time 100MB download will find customers.

archive.org also might find something like it useful. How else are you going to show old sites in 20 year’s time?

Re:W3C recommends WebAssembly by linuxftw on Friday December 06, 2019 @12:09PM (#21723759)
Smart phone apps already do this.
Re:W3C recommends WebAssembly by jhallenworld on Friday December 06, 2019 @01:46PM (#21724773)
Emulate Android or IOS in the browser- that way you only have to write an app, and not bother with a website..

All it will take is for ADK to a have button that produces a wasm version of your app.

Re:W3C recommends WebAssembly by gmueckl on Friday December 06, 2019 @08:13PM (#21727764)
Unity and UE4 are very close to having exactly this today. There's no big reason why this shouldn't work for apps targetting a readonable subset of Android.