Javascript isn't a monoculture because all the tools are bad.
Javascript isn't a monoculture because all the tools are bad.
The web's no longer an open platform. Yeah you can put up a blog on your own server using only FOSS. But if you want to drive traffic to it, you're using a huge corporate ad network or some SEO company. If you want to scale it, you're using a huge corporate cloud. If you want to make money on it, you're using a huge corporate ad network.
It looks like to get such a thing working we would need an OS running on top of JS. But maybe I'm missing something.
no
- operating systems
- hardware drivers
- a networking stack
- trading algorithms
- fighter jet firmware
- ultra low latency DSP
- processing data from LHC collisions or imaging satellites.
- etc
- etc
- etc
just because webgl enables fast gpu processing (by basically writing a small subset of C that is shader code) doesnt now mean the web platform can be used for evetything.
- operating systems
Ironically Linux was one of the first things to ever be compiled to run in the browser using empscripten.
- hardware drivers
Linux doesn't run without hardware drivers. In this case, the hardware drivers were wrapping JS FFIs.
- a networking stack
Yes you can.
- trading algorithms
Why not?
- fighter jet firmware
It's not a fighter jet, but the SpaceX Dragon 2 space capsule's UI is built using Chromium.
- ultra low latency DSP
Why not?
- processing data from LHC collisions or imaging satellites.
Why not?
Trading algorithms, ultra low latency DSP, "processing data from LHC collisions or imaging satellites" are I think references to performance limitations. WebAssembly requires a fair bit of runtime checks (though some can be pawned off to the hardware if you're clever), and has a number of other quirks that hurt performance, like the fact that most languages end up needing two stacks when compiled for wasm.
The issue is even clearer when you move to processing large data sets because WebAssembly only allows a 32-bit address space at the moment. Add to that the lack of concurrency or native SIMD, and it's pretty clear it is way too early to dance on the graves of native executables.
Also, unless you definition of "can run a game" includes "can run a game at 3fps" I'm pretty skeptical that the entire repitoire of games for those engines can make the jump to WebAssembly today.
any language (high or low level) that allows you to write and execute deterministic assembly or machine code can be used to implement whatever you want. whether WASM ever reaches this type of broad security-sensitive wild-west remains to be seen, but my money is on "never".
wasm will certainly expand into additional areas, but they will all be security-gated and will not have unfettered, raw access to all hardware (even with some additional user-grokkable permission model), because it has to run on the web: "W"asm
Nobody was trying to make a claim about web assembly drivers. Just applications.
If you're looking for an intro, I wrote a series of posts on WebAssembly (there are 5 links at the bottom of this intro): https://hacks.mozilla.org/2017/02/a-cartoon-intro-to-webasse...
You're not missing anything, that's exactly what's happening. WebGL/VR, WebCL, WebRTC, Filesystem API... the browser is becoming a simple feature-rich client OS for the cloud, and WebAssembly is the machine language.