Live data from Hacker News

Operating System in 1,000 Lines – Intro

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

21–30 of 129 posts

Re: Operating System in 1,000 Lines – Intro

#21
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,…

There are very good kernels written in Ada, like Ironclad[1].

Besides, what's the point of this comment? What if people wanted to write a million more Unix-like kernels in C? Do you think this is bad? Why do you care? If you want, just write your own in whatever language you want, with whatever design you want.

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

Because nobody to this point was interested in doing this. It's really that simple.

[1] https://ironclad.nongnu.org/

Re: Operating System in 1,000 Lines – Intro

#24
post #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!

:-) Fair point.

Very very small, compared to Android or iOS or any modern Linux, though.

Re: Operating System in 1,000 Lines – Intro

#25
post #21
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,…

There are very good kernels written in Ada, like Ironclad[1]. Besides, what's the point of this comment? What if people wanted to write a million more Unix-like kernels in C? Do you think this is bad? Why do you care? If you want, just write your own in whatever language you want, with whatever design you want. > Why not Plan 9 in Zig, or Hare, or even D? Because nobody to this point was interested in doing this. It'…

> There are very good kernels written in Ada, like Ironclad[1].

Interesting. Thanks.

> Besides, what's the point of this comment? What if people wanted to write a million more Unix-like kernels in C? Do you think this is bad? Why do you care?

Because it seems to me that modern OS design is caught in a deep deep rut, and the "OS in 1000 lines" article that we are discussing is digging that rut even deeper.

Don't repeat the mistakes of the past. Make interesting new mistakes. It's more fun.

Re: Operating System in 1,000 Lines – Intro

#26
post #15

Earlier quoted context omitted.

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.

[deleted]

Re: Operating System in 1,000 Lines – Intro

#27
post #21
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,…

There are very good kernels written in Ada, like Ironclad[1]. Besides, what's the point of this comment? What if people wanted to write a million more Unix-like kernels in C? Do you think this is bad? Why do you care? If you want, just write your own in whatever language you want, with whatever design you want. > Why not Plan 9 in Zig, or Hare, or even D? Because nobody to this point was interested in doing this. It'…

I agree. the GP's comment has a flavour of "people shouldn't like the things I don't like".

"Make your own kernel" is a thing-in-itself, and "runs on hardware/VM" + "provides -like API for programs" are tangible, concrete goals to aim for, even if you personally don't like the API or the architectural choices it implies.

To give an analogy: https://www.nand2tetris.org/ is an amazing learning experience, even though games other than Tetris should and do exist

Personally, I like the AROS project, aiming to provide an operating system that implements the AmigaOS APIs and runs on many architectures, but lots of users are interested in running it on 680x0 Amigas and spiritually-related PowerPC devices: https://en.wikipedia.org/wiki/AROS_Research_Operating_System

It's OK for programmers to write a thing just for the learning experience. If it gains adoptees, that's a happy accident.

Re: Operating System in 1,000 Lines – Intro

#28

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-Proj…

You can follow the MIT course and use QEMU if so wish.

Re: Operating System in 1,000 Lines – Intro

#29

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-Proj…

It likely doesn't have performance that's good enough for production use. Doesn't look like there's JIT so it's all instruction by instruction interpreting.

Re: Operating System in 1,000 Lines – Intro

#30
post #15

Earlier quoted context omitted.

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.

[deleted]
Post reply on HN