News for hackers. Stuff that matters.
Re:Using WebAssembly threads from C, C++ and Rust by incrudible on Wednesday July 21, 2021 @09:54AM (#27906286)
Unpopular opinion: We would've been better off keeping web plugins and isolating those in a "click to play"-container rather than turning the web browser into an operating system.
Re:Using WebAssembly threads from C, C++ and Rust by staticassertion on Wednesday July 21, 2021 @11:01AM (#27907225)
The problem is that the current state of operating systems is terrible. There's almost no isolation, tons of complexity, tons of attack surface, lock-in, etc.

Browsers are a massive improvement as a platform for developing code, or at least they have the potential to be.

Re:Using WebAssembly threads from C, C++ and Rust by kllrnohj on Wednesday July 21, 2021 @05:53PM (#27912680)
Only if you define operating systems as "Windows, MacOS, and desktop Linux"

Otherwise mobile operating systems have had isolation and a robust native platform for years. It's kinda why mobile apps absolutely exploded and browsers have been desperately trying to keep up for almost a decade now.

Re:Using WebAssembly threads from C, C++ and Rust by staticassertion on Wednesday July 21, 2021 @05:58PM (#27912726)
Yeah, mobile platforms are moderately better.
Re:Using WebAssembly threads from C, C++ and Rust by pjmlp on Thursday July 22, 2021 @01:56AM (#27915856)
They also have proper graphical APIs, instead of trying to use an API that targets 2012 hardware in 2021.
Re:Using WebAssembly threads from C, C++ and Rust by andrewmcwatters on Wednesday July 21, 2021 @12:17PM (#27908225)
It’s almost like operating systems should keep up or something.
Re:Using WebAssembly threads from C, C++ and Rust by TillE on Wednesday July 21, 2021 @12:38PM (#27908507)
It's really unfortunate that multiple attempts at capability-based microkernels have basically failed to come to fruition.

There should be a FOSS OS with powerful OS-level security features, but it just hasn't happened.

Re:Using WebAssembly threads from C, C++ and Rust by TazeTSchnitzel on Wednesday July 21, 2021 @02:08PM (#27909845)
I think every major OS kernel (Windows NT, Linux, Darwin) actually has optional sophisticated security capabilities these days. I think the problem is that it's really hard to make these work nicely with legacy software? The whole classic UNIX-ish model sort of falls apart.
Re:Using WebAssembly threads from C, C++ and Rust by staticassertion on Wednesday July 21, 2021 @04:05PM (#27911411)
I assume by capabilities they mean specifically a capabilities-based security model.
Re:Using WebAssembly threads from C, C++ and Rust by colonwqbang on Wednesday July 21, 2021 @05:20PM (#27912368)
Well, doesn't Linux have that? Maybe you could go into more detail about what you feel is missing today.
Re:Using WebAssembly threads from C, C++ and Rust by staticassertion on Wednesday July 21, 2021 @05:45PM (#27912606)
What linux calls capabilities is a misnomer that isn't particularly effective - it's sort of splitting root up into smaller pieces.

This is totally different from the actual capabilities security model, which is closer to a "if you can name a resource you can access that resource". So, for example, imagine every file on your system has a path with a uuid, and there is no "ls" - you'd only be able to access files whose names had been told to you/ that you created yourself.

That's a capabilities model, and Linux does not have that.

Re:Using WebAssembly threads from C, C++ and Rust by nnamtr on Wednesday July 21, 2021 @12:48PM (#27908685)
I always thought that's what Fuchsia is about?
Re:Using WebAssembly threads from C, C++ and Rust by grishka on Wednesday July 21, 2021 @11:33AM (#27907664)
Writing JavaScript and making sure my web UI gets laid out exactly as I intend makes me feel like I'm making a UI in a word processor that has a very advanced macro system — but it's still a word processor at its core.

Flash on the other hand felt more like a proper programming environment. A shame it was proprietary. And a big shame Adobe didn't open-source Flash Player after discontinuing it.

Re:Using WebAssembly threads from C, C++ and Rust by ducktective on Wednesday July 21, 2021 @10:04AM (#27906444)
I mean what is the use of a "Web Browser" anyway? Couldn't each OS app communicate with its server over TCP/IP?

At what point people decided HTML/CSS/JS is the epitome of user interaction for dynamic applications such as document editing, mapping and routing, media playing, chatting...?

Re:Using WebAssembly threads from C, C++ and Rust by vbezhenar on Wednesday July 21, 2021 @10:40AM (#27906924)
Navigating to a web page is so much easier than installing an application. Even with modern operating systems like iOS. Despite the fact that web pages are getting more and more bloated, applications are like 10x bloated. And it's even officially supported. Modern Android application require embedding something like megabyte of various "compat" libraries. I don't know how iOS state of things is, but in the past Swift runtime was required to embed as well (you could avoid it with Objective C, but that's so out of fashion).

Another factor is cross-platform apps. Web app is still the most cross-platform solution. Also you can create and update web apps without gatekeepers approval.

Re:Using WebAssembly threads from C, C++ and Rust by incrudible on Wednesday July 21, 2021 @01:18PM (#27909147)
> Navigating to a web page is so much easier than installing an application.

Perhaps, but I don't spend a lot of time installing applications, nor am I concerned about megabytes of disk usage. None of the web applications I use do anything particularly interesting - all of the interesting applications I use are not web apps.

Web apps give maximum convenience to developers and sysadmins and in some cases, this is a worthwhile tradeoff, but often enough it just makes for an inferior product.

Re:Using WebAssembly threads from C, C++ and Rust by saurik on Wednesday July 21, 2021 @04:17PM (#27911576)
But the problem is that the premise of web falls apart if you have to install a separate app for every kind of content. I want to be able to have a hyperlink on my website to a TikTok video or an Instagram post and have people actually see it rather than go "ugh I have to install an app to see the content you are linking to". I want to be able to just click around the web without having to ever think about the boundaries between "apps". This is also why a lot of us hate authwalls: "oh god another account I need to set up"... it doesn't take much time to set up an account, but in a world where every single damned website would want an account you will never be done with it. The dual reasons then why you don't spend much time installing apps is because on the one side the web works well enough that people just link to stuff on the web and it works most of the time... and yet on the other side you also see people choose to centralize things into places that are easier to link stuff from, including apps people are more likely to have installed, which is a background force of centralization.

The world people (like you) seem to want is one where the web is essentially dead and everyone just sits around in some subset of waller gardens that they don't really leave, with some minimal amount of hyperlinks available to get content in and out of other products. I have a link to a map, well, you better have Google Maps installed or it won't work. That just seems like a depressing failure of vision to me: the goal should be to get the web to the point where it replaces all of these stupid apps we have to have, so no one ever has to decide if an app is "installed or uninstalled" ever again: all content is immediately consumable at all times with nothing other than a URL. And we could be there if people with vested interests--like Apple--didn't stop actively trying to hobble web standards so people were forced to install more apps constantly.

Re:Using WebAssembly threads from C, C++ and Rust by incrudible on Wednesday July 21, 2021 @07:04PM (#27913285)
> I want to be able to have a hyperlink on my website to a TikTok video or an Instagram post and...

To me, that's not an interesting application. If you want to use the web to share images or videos, that's fine.

If you want to create such content however, why not have a native application that can actually take advantage of the hardware?

> The world people (like you) seem to want is one where the web is essentially dead and everyone just sits around in some subset of waller gardens that they don't really leave, with some minimal amount of hyperlinks available to get content in and out of other products.

Hyperlinks don't necessarily make my life easier. Let's say I want to get <large file> from application A and into application B: The web would just get in the way. I have a file system and all (native) applications can read/write/mmap it. Import/Export workflows exist. It's a solved problem, the web doesn't need to eat everything.

Re:Using WebAssembly threads from C, C++ and Rust by heavyset_go on Thursday July 22, 2021 @01:48PM (#27922027)
> That just seems like a depressing failure of vision to me: the goal should be to get the web to the point where it replaces all of these stupid apps we have to have, so no one ever has to decide if an app is "installed or uninstalled" ever again: all content is immediately consumable at all times with nothing other than a URL.

But then how would the largest companies in the world excise a 15% to 30% tax on the entirety of the mobile app market, and soon the desktop app market, as well?

Re:Using WebAssembly threads from C, C++ and Rust by marcellus23 on Wednesday July 21, 2021 @04:22PM (#27911637)
> I don't know how iOS state of things is, but in the past Swift runtime was required to embed as well (you could avoid it with Objective C, but that's so out of fashion).

This is no longer true on iOS and hasn't been for at least a couple years.

Re:Using WebAssembly threads from C, C++ and Rust by ducktective on Wednesday July 21, 2021 @11:58AM (#27907972)
So essentially, it was a race between sand-boxing environments like JVM, .NET and browsers? I think there was a big potential for JVM to dominate this sector...
Re:Using WebAssembly threads from C, C++ and Rust by vbezhenar on Wednesday July 21, 2021 @12:07PM (#27908079)
Sandbox for JVM was mostly an afterthought IMO. There were lot of vulnerabilities to escape sandbox, much more compared to browsers.

But nail in the coffin IMO was Steve Jobs, who decided not to adopt nor Flash, nor JVM in mobile Safari.

Re:Using WebAssembly threads from C, C++ and Rust by ducktective on Wednesday July 21, 2021 @12:19PM (#27908250)
It's amazing how much our everyday experiences are resulted from decisions of few people or completely random coincidences.
Re:Using WebAssembly threads from C, C++ and Rust by ncmncm on Wednesday July 21, 2021 @05:10PM (#27912234)
There were earnest early attempts at making Java and .NET the language to run webapps, that all failed. For reasons.

So, it wasn't for lack of trying. Javascript won by default, just by being slightly less nasty. Many of us run (selective) Javascript blockers to keep it from being too nasty. They don't always succeed.

Re:Using WebAssembly threads from C, C++ and Rust by nextaccountic on Wednesday July 21, 2021 @11:24AM (#27907552)
The point of sandboxing and ease of deployment. I don't want to run a separate program for each random site I visit.
Re:Using WebAssembly threads from C, C++ and Rust by Santosh83 on Wednesday July 21, 2021 @10:24AM (#27906680)
I think because the document centric web was already there, the infrastructure was there, and it was much more easier to extend it than to come up with a million NIH solutions. Each app can communicate over its own protocol but the web allows interoperability and that is its greatest strength IMO.
Re:Using WebAssembly threads from C, C++ and Rust by gmueckl on Wednesday July 21, 2021 @10:22AM (#27906663)
I think goes as far back as the dot com bubble when managers started to realize that it's easy to earn money by doing X, but on a website.
Re:Using WebAssembly threads from C, C++ and Rust by jacob019 on Wednesday July 21, 2021 @11:29AM (#27907615)
While I share your nostalgia for the web of yore, it depends on the use case. The web browser is and has been an execution environment, long before WASM. Giving developers better low level tools unlocks more possibilities. I'm not really seeing the connection with applets/activex/flash. Sure you can do some things with WASM that you could do with those old tools, and much more.
Re:Using WebAssembly threads from C, C++ and Rust by afavour on Wednesday July 21, 2021 @11:36AM (#27907703)
“isolation” in that context is a little misleading - Flash had countless security vulnerabilities that blew open any isolation you might have hoped to achieve.
Re:Using WebAssembly threads from C, C++ and Rust by paulgb on Wednesday July 21, 2021 @10:52AM (#27907100)
When you say “we”, do you mean web users or developers? As a user, I'm sure happier that I don't have to deal with needy plugin installers (“what do you mean you don't want Bonzi Buddy?”).
Re:Using WebAssembly threads from C, C++ and Rust by pjmlp on Wednesday July 21, 2021 @11:07AM (#27907321)
An opinion that I agree with, despite doing a lot of web development, but since Google basically wants to turn the Web into ChromeOS, with Microsoft's help, that is what it is.
Re:Using WebAssembly threads from C, C++ and Rust by nobody0 on Wednesday July 21, 2021 @09:55AM (#27906310)
This idea is not unpopular in hn I guess.
Re:Using WebAssembly threads from C, C++ and Rust by txdv on Thursday July 22, 2021 @01:35AM (#27915728)
Web Assembly is the secure web plugin
Re:Using WebAssembly threads from C, C++ and Rust by pjmlp on Thursday July 22, 2021 @02:33AM (#27916080)
Hardly when linear memory segments don't have protection against internal corruption.
Re:Using WebAssembly threads from C, C++ and Rust by txdv on Friday July 23, 2021 @02:32AM (#27927836)
Do you have some resource to read up on that?