Re:NW.js based operating system
by BrendanEich on Friday October 06, 2017 @08:53PM
(#15421598)
https://asmjs.org/
It's a statically typed subset of JS that uses typed arrays for machine-typed memory and JS's bitwise operators for int32 and uint32 casts, and + for to-IEEE754-double, etc.
It is as fast as memory-safe C-like variants already, see
https://arewefastyet.com/#machine=29&view=breakdown&suite=as...
https://arewefastyet.com/#machine=29&view=breakdown&suite=as...
I'm not sure why the native C++ (clang) gray line stops over a year ago. Perhaps @azakai can say.
If things keep going the way they are someday JavaScript is gonna be optimized enough to get pretty close to C; specially functional scripts/parts (those with no side effects).
Re:NW.js based operating system
by FridgeSeal on Saturday September 30, 2017 @09:21PM
(#15375911)
Right sure, then you'll have something that (supposedly) goes as fast as C and has even more issues! This is going to be great!
/s
Re:NW.js based operating system
by paulddraper on Saturday September 30, 2017 @10:20PM
(#15376051)
Close to C for perf, in some things.
Very, very far from C in memory, for all things.
He isn't trying to rethink the desktop/workstation OS. If he's found a way of improving upon existing desktop environments, it should be clear what improvements he's made and how he has made them.
It seems it's written in Node Webkit (NW.js), which - if I understand correctly - allows you to build desktop applications in the same way node.js allows you to build applications which run in the browser. He appears to have used this to prototype a desktop environment. Rewriting a desktop environment, for efficiency, in C and using Xlib would itself be a major undertaking.