• 0 Posts
  • 8 Comments
Joined 1 year ago
cake
Cake day: August 20th, 2023

help-circle
  • Parts of it are. The kernel is derived from a Mach microkernel (an experimental kernel in the 80s, which was theoretically supposed to allow different OS personalities to coexist in the same system, sharing resources; macOS’ Darwin/XNU kernel doesn’t implement this capability in full, but you do get the Mach Ports interprocess communication mechanism, and a BSD UNIX personality permanently attached).





  • Drew DeVault recently wrote a simple but functional UNIX kernel in a new systems programming language named Hare in about a month, which suggests that doing something similar in Rust would be equally feasible. One or two motivated individuals could get something up which is semi-useful (runs on a common x86 PC, has a console, a filesystem, functional if not necessarily high-performance scheduling and enough of the POSIX API to compile userspace programs for), upon which, what remained would be a lot of finishing work (device drivers, networking, and such), though not all of it necessary for all users. Doing this and keeping the goal of making it a drop-in replacement for the Linux kernel (as in, you can have both and select the one you boot into in your GRUB menu; eventually the new one will do enough well enough to replace Linux) sounds entirely feasible, and a new kernel codebase, implemented in a more structured, safer language sounds like it could deliver a good value proposition over the incumbent.



  • “Hand-written assembly” is not more powerful than any other Turing-complete language (including Perl and Python), just more painfully slow and prone to human error to write. (Perhaps if you have a special case requiring speed (such as the processing being done in a tight loop in a financial trading app and the results needing to beat rival trading systems by milliseconds or something equally esoteric), it’d make sense, but in that case, a modern compiler (for, say, C/C++/Rust or similar) would yield comparable results, and if a lot is riding on those milliseconds, you’d eschew code and build a FPGA that pulls the data out of memory buffers in hardware or similar.)

    So these days, the only use case for hand-writing assembly language (other than low-level OS/firmware programming or compiler development) is performative Feats Of Strength, where the challenge is the point. And in that case, you’d be trying to do something heroically challenging, like writing an Atari 2600 demake of Baldur’s Gate or something.