5 ms·
> without CPU portability, the latter seeming not that big of a deal these days anyway as cross compilers have got quite good and there are only two CPU archs i
by mwcampbell 4y ago
> without CPU portability, the latter seeming not that big of a deal these days anyway as cross compilers have got quite good and there are only two CPU archs in wide usage anyway
Do we really want to surrender to the dominance of two proprietary ISAs? To me, the insistence on something like wasm bytecode is a kind of optimism, a hope that the current duopoly won't be permanent.
- mike_hearn 4y agoWell, Apple have proven several times now that you don't need a bytecode abstraction to allow CPU architecture transitions. They went from PowerPC to Intel to ARM whilst preserving the benefits of native code each time, using relatively simple stuff that stayed out of developers way and didn't require buyin to entirely new ways of coding or APIs. Rosetta 2 is just an ordinary AOT transpiler with a few magic flags in their ARM fork that lets them optionally match Intel semantics for code that needs it, other people should be able to match that. So bytecode is useful for lots of other reasons when paired with good runtimes, but it doesn't seem to be necessary to let you switch CPU ISAs or vendors. Meanwhile the costs are super high. WASM doesn't and isn't going to expose the real capabilities of the hardware any time soon, so it'll always lag behind in performance. The web has an unfortunate design goal of killing all the incentives OS and hardware makers have to add new features, because browser makers are these days pretty averse to allowing web pages to have special capabilities on specific underlying platforms, so features only get exposed to the web if every (major) OS and CPU combination supports them. But why add new features if apps will only start to use them if all your competitors also ship the same feature - there's no competitive advantage to be had there, which in turn means there's no point in investing in R&D. In turn that means that there's actually no point in designing or deploying a new ISA if everything is WASM. Why bother if it can't add any unique capabilities or nothing would use them? RISC-V says licensing is a good enough reason, but not many competitive design houses seem to care: making a high performance CPU is so expensive that ARM licensing costs just aren't a big deal in the grand scheme of things and in practice silicon OEMs seem fine with outsourcing ISA development to them. Leaning in to native code fixes the incentive problem, and software is constantly being updated these days anyway. If CPU portability was all that mattered it'd be cheaper and quicker to invest in better cross-compilation toolchains, like a standard file format for expressing all the URLs to all the different OS/CPU specific binaries for a program and build servers that could incrementally build and upload binaries for less popular ISAs in the background. I outline a proposal for an alternative web-like thing that works this way here (whilst also supporting wasm and other bytecodes): https://docs.google.com/document/d/1oDBw4fWyRNug3_f5mXWdlgDI4J5AbxVWKEeYr6hscT8/edit?usp=sharing https://docs.google.com/document/d/1oDBw4fWyRNug3_f5mXWdlgDI...
- kevingadd 4y ago> Rosetta 2 is just an ordinary AOT transpiler with a few magic flags in their ARM fork that lets them optionally match Intel semantics for code that needs it, This really understates how significant it is that Apple customized their CPUs in order to give their emulator good performance. Ordinary emulator developers can't do this.
- mike_hearn 4y agoNo, but that's fundamental. You have to pick a memory model the moment you support shared memory multi-threading, and then either you'll be incompatible with existing code or you'll have to implement that stricter memory model on ARM. WASM just punts on shared memory multi-threading, or does it?
- eternalban 4y agoI just skimmed this. Somewhat seems like a lightweight federated overlay OS. The shell bit is nice, like that. It's like finger for apps.
- mike_hearn 4y agoYeah that's an interesting way to put it - lightweight federated overlay OS. Nice! I like it. Perhaps that can be the origin of a name. Lofos - lightweight overlay federated operating system.
- eternalban 4y agolofos doesn't roll off the tongue. was going to suggest N-OS but that's taken. (same for 'app-nexus', that would have been perfectly descriptive)
- mike_hearn 4y agoLifos? LIghteweight Federated OS?