Live data from Hacker News

Clang runs in the browser and compiles C++ to WebAssembly

tbfleming.github.io

131–140 of 318 posts

Re: Clang runs in the browser and compiles C++ to WebAssembly

#131
post #41

Earlier quoted context omitted.

I have been thinking about why we have ended up here, and why not just native apps. The obvious answer is that it makes applications portable, which is great. The other key component I think is delivery. You don't ever install anything, it just exists when you ask for it. That is something native applications have never done, and not even something like JVM has done even though it addresses portability too. It is als…

It also makes it hard to pirate your software. Cracking native software is relatively trivial which is why legitimate licenses cost insane amounts. Contrast soundtrap charging $15 a month for their web based DAW to Ableton having to charge $750 to make up for piracy costs.

1. Ableton is a great DAW with a long history used by many well-known producers. They can and deserve to charge more than 15 bucks. It's laughable to think that anything other than a todo app would cost so little.

2. It's not $750, there are multiple editions available, the more expensive ones include more plugins, instruments, loops, etc.

3. Cloud-based startups are nice until they reach the end of their wonderful journey, sell out and you're out of a tool.

Soundtrap is charging $15 because that's what it's worth. Although if the cloud is mandatory it's worth zero in my opinion.

Re: Clang runs in the browser and compiles C++ to WebAssembly

#132
post #128

Earlier quoted context omitted.

Replace “WebAssembly VM” with “JVM” and you will see how it’s already available, and why it won’t catch on.

The big difference is that the "Browser VM" has well defined permissions to access resources on the host machine. Just like phone OSes do today. Bluetooth API, Files API, Location API, etc.

At which point you have an OS... except adding the word ‘webassembly’ somehow imbues it with properties OS’s don’t already because somehow web assembly compiles to assembly with extra security with no performance reduction.

Re: Clang runs in the browser and compiles C++ to WebAssembly

#133

Next we'll get to a webassembly-only VM that will replace the OS. All 'apps' will run on this VM instead of being native, and most will be cross platform. They'll talk to each other via messaging (using Javascript semantics) instead of bytes-over-pipes as they do today. An integrated globally available, namespaced data store API might replace the filesystem. Each app+version will be accessible by a distinct URL. 'My…

Replace “WebAssembly VM” with “JVM” and you will see how it’s already available, and why it won’t catch on.

[deleted]

Re: Clang runs in the browser and compiles C++ to WebAssembly

#134
post #127

Earlier quoted context omitted.

Or directly into the cpu. Since there already is a web server in the cpu [1], adding a browser might enable us to run and use web applications without even installing an operating system. [1] https://www.networkworld.com/article/3236064

The METAL (proposed by Gary Bernhardt) is not about running in CPU, but running all software in byte code and render native code obsolete, by implementing software process isolation and save the overhead of syscalls, memory mapping and protection rings.

IBM’s AS/400=eServer is basically implemented this way since 1988 years (some of it going back to 1979). Everything old is new again.

(It has 128 but pointers, btw - so it’s future proof for at least 20 more years)

Re: Clang runs in the browser and compiles C++ to WebAssembly

#135
post #102
post #99

Earlier quoted context omitted.

Private mode is about hiding a trail from yourself rather than the websites you visit. They still get all your request logs.

When you launch private mode (save for browser fingerprinting and other super cookies), you are a new user to the website. When you close it, anything the website attempted to store on your machine is gone. Of course it can track you during that session but not before or after.

Unfortunately techniques like browser fingerprinting[0] still work in private browsing and can be used to link your private browsing to your normal browsing.

[0]: https://en.wikipedia.org/wiki/Device_fingerprint

Re: Clang runs in the browser and compiles C++ to WebAssembly

#136

Next we'll get to a webassembly-only VM that will replace the OS. All 'apps' will run on this VM instead of being native, and most will be cross platform. They'll talk to each other via messaging (using Javascript semantics) instead of bytes-over-pipes as they do today. An integrated globally available, namespaced data store API might replace the filesystem. Each app+version will be accessible by a distinct URL. 'My…

Add metrics and advertising obsessed companies into the mix and the only result could be a complete clusterfuck.

The major issue with web apps is that the customer (or depending on the company bag of meat that watches the ads) has no control over the app or the data. They will be abused by the company in all sorts of creative ways.

And yes, those VMs could be local-only, but why would Google, MS or Mozilla want that? The former two are heavy in the cloud+ads business, the latter was pushing FirefoxOS. Why would web developers want that? All the stuff they write is online-first.

Re: Clang runs in the browser and compiles C++ to WebAssembly

#137
post #41

So the web browser is pretty much a mini operating system. Firefox and Chromium seriously feel like they have the longest compile time out of any package in Gentoo, except maybe Libreoffice. It has tons of embedded packages that it doesn't pull from the system/native (jpeg and png decoders and such). So with a lot of these neat things where we compile stuff or run a Linux kernel in the browser, we've pretty much come…

I have been thinking about why we have ended up here, and why not just native apps. The obvious answer is that it makes applications portable, which is great. The other key component I think is delivery. You don't ever install anything, it just exists when you ask for it. That is something native applications have never done, and not even something like JVM has done even though it addresses portability too. It is als…

> not even something like JVM has done

Not counting applets and Web Start?

Re: Clang runs in the browser and compiles C++ to WebAssembly

#139
post #41

Earlier quoted context omitted.

I have been thinking about why we have ended up here, and why not just native apps. The obvious answer is that it makes applications portable, which is great. The other key component I think is delivery. You don't ever install anything, it just exists when you ask for it. That is something native applications have never done, and not even something like JVM has done even though it addresses portability too. It is als…

The answer is that browsers provide something that users desperately need and no operating system has ever provided: a sandbox strong enough to run completely untrusted code. The success of browsers is an indictment of the entire field of operating systems research. They have either failed to recognize the need or simply failed to deliver that kind of security. For one example take WebGL. For decades OpenGL had been…

> a sandbox strong enough to run completely untrusted code

No browser has provided that either. In fact, browsers are by definition a security anti-feature because they are always connected to the network and the customer/user data lives on the network.

Even if they manage to solve the problem of computers getting hacked when visiting websites they are very unlikely to solve the problems of tracking and private data vacuuming.

Re: Clang runs in the browser and compiles C++ to WebAssembly

#140

Next we'll get to a webassembly-only VM that will replace the OS. All 'apps' will run on this VM instead of being native, and most will be cross platform. They'll talk to each other via messaging (using Javascript semantics) instead of bytes-over-pipes as they do today. An integrated globally available, namespaced data store API might replace the filesystem. Each app+version will be accessible by a distinct URL. 'My…

Ah yes. The fall and rise of JavaScript.

https://www.destroyallsoftware.com/talks/the-birth-and-death...

Post reply on HN