4 ms·
Do it. Ignore whoever says it's too complicated. You probably won't supplant Linux with your toy OS for your own research, but for a software engineer, writing
by sph 3y ago
Do it. Ignore whoever says it's too complicated.
You probably won't supplant Linux with your toy OS for your own research, but for a software engineer, writing a OS is the closest thing we have to the exhilarating feeling of seeing your code affect real hardware. You haven't lived until a bug of your own causes a triple-fault exception that causes a literal system shutdown.
I started this career writing my own tiny OS in my teens (https://github.com/1player/klesh https://github.com/1player/klesh) and for 20 years I've been wanting to go back, with all the experience I have accumulated.
Just don't make it another UNIX, please. We have enough of those already ;)
- josephg 3y ago> Just don't make it another UNIX, please. We have enough of those already ;) Hah thanks for the encouragement! Don't worry, there's no danger on that front. I'm pretty thoroughly bored of the "everything is a file" motif. I do like unix's idea of making large programs out of small programs that can be composed together. But unix's raw byte streams make a terrible messaging bus.
- sph 3y agoYou're on the right path! My area of interest is actually making messaging (a-la-Smalltalk/Erlang) the root idea everything is built upon, rather than the file stream. The file metaphor made sense in the 1960, not in an ultra-networked world of heterogeneous CPUs. IMO, communication should be the basis of computing. Which also means inventing a language to build this novel paradigm. As Dan Ingalls said, an operating system is everything that doesn't fit in a language. I am looking forward to finding the time for this long and quixotic quest :-)
- tonyg 3y agoYou might enjoy http://synit.org/ http://synit.org/, perhaps. Heavily inspired by both Smalltalk and Erlang. (It's my own wee quixotic project btw)
- sph 3y agoThat looks very interesting, thanks for sharing! Somehow I had never heard of it. Time for a Show HN?
- tonyg 3y agoThanks! And good idea. The ideal time would have been early 2023, because things have drifted into bitrot a little already. I'll tidy up and see about showing it off hopefully in the next few days.
- toast0 3y agoWhy a new language? Why not build an OS around Erlang? I present Crazierl: https://crazierl.org/ https://crazierl.org/ My crazy hobby OS vision of boot to Erlang. I've been working on this for a couple years now, recently made it public as part of a PR to v86 [1] (which is amazing, by the way). 32-bit x86, has drivers for virtio and rtl-8168 (but not ne2k, so no networking in v86, sadly), works with SMP. Probably not better than running beam as init with a FreeBSD kernel, but was more fun? [1] https://copy.sh/v86/ https://copy.sh/v86/
- 0x0203 3y ago> You haven't lived until a bug of your own causes a triple-fault exception that causes a literal system shutdown. On the OS I work on, I deliberately added a triple fault trigger as a fallback method of rebooting the system if the "normal" methods fail, which I have seen before. To anyone looking to play with writing their own OS, definitely just do it. It's a lot of fun, and there's almost no limit to how much you can learn. With QEMU and bochs, and VirtualBox, etc... it's not that hard getting started. If you want to play around without starting from scratch, but find Linux source too complicated, give OpenBSD a look. Not that Linux is that hard, but it takes some getting used to how they do things. I find OpenBSD considerably more approachable.
- thfuran 3y ago>but for a software engineer, writing a OS is the closest thing we have to the exhilarating feeling of seeing your code affect real hardware. Unless you want to muck about with toy robotics or home automation.