Live data from Hacker News

Operating System in 1,000 Lines – Intro

operating-system-in-1000-lines.vercel.app

11–20 of 129 posts

Re: Operating System in 1,000 Lines – Intro

#11
Very cool! I just started to dvelve into RISC-V, and the book I'm reading (not in English) offers their own emulator[1], which, at a glance, is much simpler than QEMU, and comes with a weird license[2]. I wonder if people actually used it, since it looks like an academic project. Maybe I can also follow this tutorial and test it out.

[1] https://github.com/NJU-ProjectN/nemu/tree/master

[2] https://github.com/NJU-ProjectN/nemu/blob/master/LICENSE

Edit: wrong link

Re: Operating System in 1,000 Lines – Intro

#12
Ah yes, I have a few (too many as always, but I think that's good, especially when getting older; need to not get complacent) resolutions for 2025, one of them is to write a OS/DB with a development environment. Just to see how far I can take it. So these kind of tutorials are great. I was already going to make it RISC-V first because i'm interested.

Re: Operating System in 1,000 Lines – Intro

#13
post #3

I’m interested in the use of things like virtio instead of real hardware. Are there other virtualisation-driven designs for hardware devices out there rather than the qemu stuff?

you can try plain KVM its a bit more pain to get a system up tho compared to qemu which does a lot for you (--enable-kvm)

Re: Operating System in 1,000 Lines – Intro

#15
post #14

Just a small typo in the RISC-V 101 chapter. It says "it's a trending CPU (ISA) recent years." I believe it should read "in recent years."

Don't hesitate to send the author an email, open a ticket or a PR to make sure they see this, it seems more appropriate than HN comments for this kind of things :-)

https://operating-system-in-1000-lines.vercel.app/en/17-outr...

Re: Operating System in 1,000 Lines – Intro

#17
A noble idea, but Github is literally littered with hobbyist home-grown Unix-like kernels in C.

As an industry are we not supposed to be trying to move away from hoary old unsafe C?

Could we not have a hobbyist educational OSes in more of the C replacements?

Drew DeVault wrote Bunnix in Hare, in one month. There's the proof of concept.

How about tiny toy Unix-likes in Zig, Nim, Crystal, Odin, D, Rust, Circle, Carbon, Austral?

How about ones that aren't ostensibly suitable for such tasks, such as Go or Ada?

Yes I know Ada is not a good fit, but there has already been a Unix-like OS entirely implemented in a derivative of Pascal: TUNIS.

https://en.wikipedia.org/wiki/TUNIS

This might need work from skilled expert practitioners first. That's good. That's what experts are for: teaching, and uplifting newbies.

There was a project to do C# on the bare metal.

https://migeel.sk/blog/2023/12/08/building-bare-metal-bootab...

How about a Unix-like in C#? Get the Unix and .NET folks interested in this stuff.

Even if the OS never leads to anything, maybe the tooling might prove useful. I am sure someone somewhere would have uses for bare-metal GoLang.

Saying that, I really don't think we need any more Unix-like OSes. There are far far too many of those already. There is a huge problem space to be explored here, and there used to be fascinating OSes that did things no Unix-like ever did.

OSes that are by modern standards tiny and simple but explored interesting areas of OS design, and are FOSS, with code out there under permissive licenses:

* Plan 9 https://github.com/plan9foundation/plan9

* Inferno https://github.com/inferno-os/inferno-os

* Symbian https://github.com/SymbianSource

* Parhelion HeliOS https://archive.org/details/Heliosukernel

There is already an effort at Plan 9 in Rust:

https://github.com/dancrossnyc/r9

Why not Plan 9 in Zig, or Hare, or even D?

Plan 9 imposes and enforces considerably more simplicity on C as it is: you can't #include stuff that already has #include statements of its own. The result is a compilation speedup of around 3 orders of magnitude. That would be a benefit to the would-be C replacements too, wouldn't it?

Re: Operating System in 1,000 Lines – Intro

#18
post #15
post #14

Just a small typo in the RISC-V 101 chapter. It says "it's a trending CPU (ISA) recent years." I believe it should read "in recent years."

Don't hesitate to send the author an email, open a ticket or a PR to make sure they see this, it seems more appropriate than HN comments for this kind of things :-) https://operating-system-in-1000-lines.vercel.app/en/17-outr...

I'm sure they know that those things were possible. Perhaps you could have done it instead?

They bothered to stop and suggest improvements here. That's enough work for them. They don't need to go elsewhere and do more, any more than you did.

Re: Operating System in 1,000 Lines – Intro

#19

This looks nice! I would love to have an ebook version to read on my ereader. I wonder how much effort it would take to use the markdown files in the GH repo and convert those. [0] https://github.com/nuta/operating-system-in-1000-lines

You can clone the repo and install pandoc. Then run "pandoc index.md *.md -o operating-system-in-1000-lines.epub" in "website/en/" folder and you will have a fully working ebook.

Re: Operating System in 1,000 Lines – Intro

#20
post #17

A noble idea, but Github is literally littered with hobbyist home-grown Unix-like kernels in C. As an industry are we not supposed to be trying to move away from hoary old unsafe C? Could we not have a hobbyist educational OSes in more of the C replacements? Drew DeVault wrote Bunnix in Hare, in one month. There's the proof of concept. How about tiny toy Unix-likes in Zig, Nim, Crystal, Odin, D, Rust, Circle, Carbon,…

Symbian is anything but simple!
Post reply on HN