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…
Clang runs in the browser and compiles C++ to WebAssembly
201–210 of 318 posts
Re: Clang runs in the browser and compiles C++ to WebAssembly
#202I guess this just means we’re one step closer to Gary Bernhardt’s vision: https://www.destroyallsoftware.com/talks/the-birth-and-death...
Every time something like this is posted, I always think of that video. As ridiculous and played-for-laughs as it is, it's looking more and more accurate (in one form or another) every day.
Re: Clang runs in the browser and compiles C++ to WebAssembly
#203Earlier quoted context omitted.
It's definitely possible but we went through all of this a decade ago with Adobe Air, Microsoft Silverlight, and JavaFX. Nearly a decade before that, in the early 2000s, we went through this with Macromedia Flash, Java Applets, and Microsoft ActiveX. Trying to replace native applications with runs-in-the-browser RIAs is nothing new, but we're at least finally agreeing on the language/implementation, so maybe this tim…
in addition, each had an separate graphics api. Which was imperative, not as stable nor backward compatible nor as battlefield-tested as html. Each keyword is a difference between all previous approaches versus html. And sometimes/often regarded as better. Every programmer knows html though not the frameworks. But these are seperate.
Re: Clang runs in the browser and compiles C++ to WebAssembly
#204Earlier quoted context omitted.
I disagree. When people start using native languages like C++ for the Web, they will quickly realize they could have just used C++ to begin with.
You get several things with with Web Assembly that you don't get with a straight application: * Easy distribution without installation * No worries about dependencies for end users * Much more consistent, and in most cases, better security * Cross platform * No walled gardens
* Only Linux end users have to care much about dependencies
* You're kidding right?
* Sure, if you only target one browser your code will probably work more or less the same on that one browser on at least some of the OSs it runs on
* There aren't any walled gardens in PC Destkop land worth talking about, other than maybe the package repositories of Linux distributions.
Re: Clang runs in the browser and compiles C++ to WebAssembly
#205Earlier quoted context omitted.
It is that simple. And a bummer because I think HTML is a pain for things that aren't documents. And JS UI frameworks feel like hacks too. Unity already supports the web, but I don't think that'll matter for AAA games. People who buy computers specifically to play them will care about the slight performance hit and not want to keep the games they bought and spend a lot of time with as bookmarks to web pages. Non-perf…
> HTML is a pain for things that aren't documents. Indeed it is but there seem to be no relevant alternative. The only thing that is better [for apps] is XAML (WPF) but it is Windows-only.
Re: Clang runs in the browser and compiles C++ to WebAssembly
#206Earlier quoted context omitted.
> Trying to replace native applications with runs-in-the-browser RIAs is nothing new There is one thing that is new: the users do not need to install a separate piece of software, and it's kept up to date by the browser vendor - which means for enterprise users one less piece of software to certify/test for updates/compatibility, and for private users one software less which installed adware on each update (Java IIRC…
Flash Player had something like 97% penetration, so for all intents and purposes it was something that you could always consider as being "there" - and users didn't mind having to install it. I think a lot of techies underestimate people's willingness to install stuff on their PCs, especially when that stuff is needed to do tasks they really want and are a couple of clicks away.
Re: Clang runs in the browser and compiles C++ to WebAssembly
#207Having some random thoughts about the comments here, some of which talk about having a "browser" drive large parts of what we consider today an "operating system". I agree that certain aspects of what most modern operating systems do today can be abstracted away behind a unified, convenient (and perhaps browser-accessible) API. The entire user-experience stack comes to mind immediately, but there are counter examples…
Well, what would you have replace it? Like most things that become very popular, the web is becoming an os-like platform because it solves a problem. Putting your application at a URL is hugely more accessible than asking someone to download something. Maybe not to us HN readers, but to my mom, who's skeptical to a fault of anything that says download, it's huge. HTML+CSS+JS is everywhere and complete in a way that l…
Re: Clang runs in the browser and compiles C++ to WebAssembly
#208Earlier quoted context omitted.
It is that simple. And a bummer because I think HTML is a pain for things that aren't documents. And JS UI frameworks feel like hacks too. Unity already supports the web, but I don't think that'll matter for AAA games. People who buy computers specifically to play them will care about the slight performance hit and not want to keep the games they bought and spend a lot of time with as bookmarks to web pages. Non-perf…
Unity also has the slight delivery hitch of needing the browser plugin to run games in the browser. I tinker with Unity and I still didn't install the browser plugin. That is the same hitch the JVM had. For a non-technical user, that extra step feels risky and unintuitive. "Why doesn't it just work?" feels a bit unfair when you know what's going on, but to a normal user I think it's a fair question. We are the profes…
The plugin has been deprecated for quite a while now. Unity compiles to WebGL/Javascript.
Re: Clang runs in the browser and compiles C++ to WebAssembly
#209Earlier 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…
Rob Pike wrote in the year 2000 that systems software research was irrelevant (http://herpolhode.com/rob/utah2000.pdf), and it seems to me that not much has changed since then. How many ideas from the last few decades of operating systems research have actually been put into practice?
The real problem is more fundamental: people want their software to keep working. As Rob Pike put it in the talk linked above, "to be a viable computer system, one must honor a huge list of large, and often changing, standards: TCP/IP, HTTP, HTML, XML, CORBA, Unicode, POSIX, NFS, SMB, MIME, POP, IMAP, X, ... With so much externally imposed structure, there’s little slop left for novelty."
For example, I'm sure some software out there is using the OpenGL API in a fundamentally insecure way. Changing the API to be safe would break this software. And maybe that would be a good tradeoff, if reworking OpenGL were the only thing you needed to do to safely run untrusted code. But almost every part of the system would have to change. You'd be left with a system which breaks or degrades pretty much everything you try to run on it.
Re: Clang runs in the browser and compiles C++ to WebAssembly
#210Earlier quoted context omitted.
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…
Native apps had a head start: they don't load every asset from a potentially untrusted source. I would say that the browser most certainly has the biggest attack surface of any software in regular use. Your average browser is insanely complex. In fact, it is the only piece of software on my computer that scares me. Multiple JITs, font rendering, parsing, layouts, compression, image handling, sound and of course about…
The whole native app is "untrusted" at the point of install. Even an app store offers a fairly thin guarantee about what apps are actually doing. It's far easier and less risky to open a web page and start doing something than install a native app.