Live data from Hacker News

A completely-from-scratch hobby operating system

github.com

51–60 of 79 posts

Re: A completely-from-scratch hobby operating system

#51
post #33

Earlier quoted context omitted.

Just curious how hard it would be to forego POSIX entirely if you were building an OS. I know TempleOS is entirely from scratch. I'd like to implement a small LISP like SectorLISP [1] (see yesterday's posts too on HN). I don't know much about building my own OS, so I'd like to start with something like MenuetOS (my first PL was asm), SerenityOS, TempleOS, or this one. I'd like it to be completely an 'island', i.e. PO…

Someone who would make a new OS, should define a completely new system call interface, as it is likely that now it is possible to conceive a better interface than 50 years ago and anyway if it would not be different there would be no reason to make a new OS, instead of modifying an existing one. Nevertheless, the first thing after defining a new OS interface must be writing a POSIX API translation layer, to be able t…

> Nevertheless, the first thing after defining a new OS interface must be writing a POSIX API translation layer, to be able to use without modifications the huge number of already existing programs.

I disagree. POSIX sucks. Build a hypervisor so people can run their applications in a VM and insist that native programs use the non-garbage API. It's the only way you'll ever unshackle yourself.

Re: A completely-from-scratch hobby operating system

#52
post #33

Earlier quoted context omitted.

Just curious how hard it would be to forego POSIX entirely if you were building an OS. I know TempleOS is entirely from scratch. I'd like to implement a small LISP like SectorLISP [1] (see yesterday's posts too on HN). I don't know much about building my own OS, so I'd like to start with something like MenuetOS (my first PL was asm), SerenityOS, TempleOS, or this one. I'd like it to be completely an 'island', i.e. PO…

Someone who would make a new OS, should define a completely new system call interface, as it is likely that now it is possible to conceive a better interface than 50 years ago and anyway if it would not be different there would be no reason to make a new OS, instead of modifying an existing one. Nevertheless, the first thing after defining a new OS interface must be writing a POSIX API translation layer, to be able t…

> Someone who would make a new OS, should define a completely new system call interface, as it is likely that now it is possible to conceive a better interface than 50 years ago and anyway if it would not be different there would be no reason to make a new OS, instead of modifying an existing one.

For an example of how things like this can be done incrementally, you can look at io_uring on linux.

Re: A completely-from-scratch hobby operating system

#53
post #7

Then why in the heck is he going for POSIX compatibility, when he can afford the luxury of not having to deal with blocking syscalls and all this crap? Much easier and safer multithreading. Also faster. And why we are there, why not a safer microkernel, keeping everything in userspace? Questions over questions.

When I started the project a decade ago, my aim was specifically to understand POSIX/Unix and to "learn by doing", so of course there's some POSIX-like elements underpinning the design. Back before I decided that literally anything can be in scope and was using third-party components, this aided in porting software, as other commenters have pointed out. These days, it gives more purpose to things I build for the OS if they can also reasonably be built for Linux or macOS - things like my editor (which I wrote for the OS and now use as my daily driver in Linux), or my Python knock-off.

As for the microkernel bit, this might sound like circular reasoning but I didn't go for a microkernel because no one really uses microkernels. It's not that I think microkernels are a bad idea, ToaruOS does push plenty of stuff into userspace. Rather, my main goal at the moment is to provide an educational resource that more accurately models the way "real" OSes work than the typical academic OS projects.

Re: A completely-from-scratch hobby operating system

#54
post #34

This is by Klange, the owner of the #osdev channel on Libera chat, associated with osdev.org. Super nice individual and always posts updates and interesting tidbits about ToaruOS. Strange, but welcome, to see it on the frontpage! :)

I wouldn't say I "own" that channel in any respect, I'm just responsible for dragging it over from Freenode during the exodus... we've got the same same staff as we did before the move and I'm not even the "founder" according to ChanServ.

Re: A completely-from-scratch hobby operating system

#55
post #23
post #5

Under features, the first bullet point is "Dynamically linked userspace." Can someone say what this means? How is this different than a userspace made up of dynamically linked utilities and shell?

Libraries are shared by programs and refrences to library routines are automatically resolved at program load time.

How is this different than regular "dynamic linking" where ld-linux.so resolves symbols and loads the shared objects?

Re: A completely-from-scratch hobby operating system

#56
post #5

Under features, the first bullet point is "Dynamically linked userspace." Can someone say what this means? How is this different than a userspace made up of dynamically linked utilities and shell?

It’s not different, but it’s a feature that this is included vs only supporting static linking.

That makes sense. I misinterpreted that point. That is indeed an important feature and one that's easy to take for granted. Cheers.

Re: A completely-from-scratch hobby operating system

#58
post #54
post #34

This is by Klange, the owner of the #osdev channel on Libera chat, associated with osdev.org. Super nice individual and always posts updates and interesting tidbits about ToaruOS. Strange, but welcome, to see it on the frontpage! :)

I wouldn't say I "own" that channel in any respect, I'm just responsible for dragging it over from Freenode during the exodus... we've got the same same staff as we did before the move and I'm not even the "founder" according to ChanServ.

Just to clarify: are you active/a mod in that channel? Now I’m curious how the GP got the idea you own it.

Re: A completely-from-scratch hobby operating system

#59
post #58
post #54

Earlier quoted context omitted.

I wouldn't say I "own" that channel in any respect, I'm just responsible for dragging it over from Freenode during the exodus... we've got the same same staff as we did before the move and I'm not even the "founder" according to ChanServ.

Just to clarify: are you active/a mod in that channel? Now I’m curious how the GP got the idea you own it.

I am one of the more active channel ops, so it's not an unreasonable mistake to make.

Re: A completely-from-scratch hobby operating system

#60
post #38

Earlier quoted context omitted.

> microkernels aren't necessarily better than hybrid, they're slower, harder to debug and process management can be complicated I was basically on board, but how are they harder to debug? I'd think being able to run components in userspace would make debugging way easier.

You are now debugging a distributed system.

fun fact: you already are in linux. being a monolith doesn't change the nature of the problem.
Post reply on HN