by devwastaken · 7y ago · 0 comments
At least in python you can use other versions and it's a very similiar environment. But if you want to use mozillas spidermonkey without Firefox, it's hoops and bounds worse experience. I'd argue that v8 is far less of a lock in by comparison.
Given all that, why are we still creating entirely separate engines that are made differently, yet do the same.
V8/Blink/Chromium are not independent community projects, but firmly in the hands of Google. Chromium being the only viable implementation would put too much control in the hands of a single company (regardless of which company that is, Firefox being the only implementation would be just as bad).
It's redundant effort, but it also enforces consensus building and exchange of ideas.
EG Google would have happily stuck with PNacl, but (afaik) Mozilla pretty much forced their hand - with the result being Webassembly, a much better design.
It's nothing fundamental about WASM; in fact they state that the actual computations are slightly faster.
Wasm was not what was promised. Mozilla and the other vendors just translated the wasm bytecode to js bytecode. All it did was skip a few steps. Yet the actual requirements for performance, simd, was ignored in its proposal. It has been a significant under delivery overall.
It does, so it’s necessary. Performance is not the only one result we care about.
To name one reason: would we have asm.js/Wasm instead of (P)NaCl without Mozilla's work on asm.js optimizations in SpiderMonkey?
Did this somehow change?
JSC is even better in that regard - it’s API and ABI stable so you can just link to the[1] system install and use it [2].
[1] on Linux there are multiple (although technically it could be made to have a single lib for qt,gtk,wx...
[2] ok, actually using the C API is very very clunky :-/
The most (in)famous consumer of that is polkit :) but also GJS
Eg you’d ideally have
* libjavascriptcore - the actual engine, runtim, and c-api, etc
* libjavascriptcore-qt (only the bindings, it would link the root jsc lib)
* libjavascriptcore-gtk (same)
* etc
The problem is that because they talk directly to internal interfaces they need to update in lockstep.
On Mac the only frameworks that do that are the core webkit frameworks. Nothing else on the system can talk to the internals (Mac and iOS have fairly comprehensive support for distinct internal/project/public APIs). But the system webkit, webcore, jsc, etc all have to update and build in lockstep.
In an ideal world all the alternate language bindings would be built on top of the stable C API, but alas (as I said before) the C API is fairly clunky and also out of date wrt to modern JS features. Also there are fun performance things a given binding can achieve if it doesn’t need to go through some layer of abi stability limitations.
Of course the git monoculture is bad. Have you seen how many people complain about git on Twitter?
assuming you know about Windows and OS X and are just talking about servers, there's still the BSDs and Solaris and AIX. a good deal of software is written to just assume a reasonably POSIX-compliant environment, precisely because linux is not the only server OS.
unix-like operating systems are something of a monoculture and that IS very bad, because OS design is basically stuck in 1973
>Is git bad?
yes and anyone who says otherwise is numb to the pain