News for hackers. Stuff that matters.
Re:Fiwix: Unix-like kernel for the i386 architecture by rurban on Friday July 05, 2024 @03:37PM (#40885382)
I wonder why you want POSIX compatibility when you start a new OS from scratch. All this broken and weird stuff, like signals, buffered synchronous IO, strings, locale, ... can be written in a functional, safe and modern way, enabling safety and performance, which is just not possible with POSIX.
Re:Fiwix: Unix-like kernel for the i386 architecture by dlachausse on Friday July 05, 2024 @03:45PM (#40885429)
I think a lot of it is availability of software. If you support enough POSIX things compile with minimal patches.
Re:Fiwix: Unix-like kernel for the i386 architecture by rurban on Friday July 05, 2024 @03:48PM (#40885447)
It's better to write everything from scratch when the foundation is broken. Look at the lisp machine or Concurrent PASCAL. These systems were insanely small
Re:Fiwix: Unix-like kernel for the i386 architecture by dmitrygr on Friday July 05, 2024 @05:20PM (#40886109)
I look forward to the kernel, user space, compilers, and web browser you will author from scratch
Re:Fiwix: Unix-like kernel for the i386 architecture by kragen on Saturday July 06, 2024 @09:13AM (#40890260)
you're about halfway there yourself, as i recall

it's an appealing project, and i think there's potential to do better than posix, but it's easier to do worse

Re:Fiwix: Unix-like kernel for the i386 architecture by dmitrygr on Tuesday July 09, 2024 @02:03PM (#40919062)
> it's easier to do worse

Bingo. Personally, i always disliked POSIX and preferred NT's way of doing things. Synchronous IO by default is silly.

Re:Fiwix: Unix-like kernel for the i386 architecture by kragen on Tuesday July 09, 2024 @10:53PM (#40923305)
blocking i/o makes simple things simpler, but it also makes hard things harder. having only blocking i/o can make hard things much harder. maybe it would make more sense to put blocking i/o in a library instead of the system call interface?
Re:Fiwix: Unix-like kernel for the i386 architecture by hnlmorg on Friday July 05, 2024 @08:04PM (#40887166)
They’re also insanely old. Plus the entire reason for Unix was because it was smaller and simpler than Multics.

I do get your sentiment though. But it’s an unrealistic ask. Particularly for a hobby project.

Re:Fiwix: Unix-like kernel for the i386 architecture by kelnos on Saturday July 06, 2024 @03:44AM (#40888825)
Better is subjective. And if I were to take on a hobby kernel project, I might not have the time or energy to also write my own compiler, shell, basic utilities, windowing system, browser, etc. from scratch.
Re:Fiwix: Unix-like kernel for the i386 architecture by kragen on Saturday July 06, 2024 @09:11AM (#40890248)
genera is kind of big actually (fiwix is only 50kloc, and some of that is the fault of the hardware), but there were a lot of different lisp machines. which ones do you mean? do you have one running (presumably in emulation)?
Re:Fiwix: Unix-like kernel for the i386 architecture by kragen on Saturday July 06, 2024 @12:01PM (#40891256)
(admittedly newlib is about 350kloc)
Re:Fiwix: Unix-like kernel for the i386 architecture by amszmidt on Sunday July 07, 2024 @01:45AM (#40895527)
Genera is quite a bit larger than that, the rel-8-5 tree is 1.2 MLOC (though this includes other things, like Pascal, Fortran and a C compiler).

But even if we take the MIT Lisp Machine system, which is smaller, it is still 450 KLOC. Just the microcode that implements the Lisp Machine on the CADR around 25 KLOC.

The Lisp Machine system is also _very_ complicated under the hood when it comes to the core system, and one of the reasons why Unix succeeded.

It is also a system that is a total PITA to modify in incompatible ways, since you are always modifying the running system. There is no such thing as an executable file in the same sense as on Unix that you can copy and keep around, e.g. if you modify the compiler on Unix you can easily keep a backup copy of 'cc' and keep running that when you screw up.

On the Lisp Machine you can't keep two compilers around at the same time without essentially creating a fork of it with all new names (and even then it might not work).

Re:Fiwix: Unix-like kernel for the i386 architecture by kragen on Sunday July 07, 2024 @06:36AM (#40896544)
i greatly appreciate your very informed opinion!
Re:Fiwix: Unix-like kernel for the i386 architecture by userbinator on Friday July 05, 2024 @11:13PM (#40887937)
If you're going purely for availability of software, then the Win32 API would probably be a good target, but it's much bigger than POSIX (largely due to including GUI features.)
Re:Fiwix: Unix-like kernel for the i386 architecture by shiomiru on Saturday July 06, 2024 @06:08AM (#40889394)
Wouldn't you need ABI compatibility too? POSIX stuff is normally available in a source form, but that's much more rare in Win32 stuff.

The good thing about POSIX is that you can theoretically port wine too at some point, and then you get both. (Though I am aware that this is not very easy either, would be interested in the opinion of somebody with wine porting experience.)

Re:Fiwix: Unix-like kernel for the i386 architecture by jeroenhd on Saturday July 06, 2024 @08:07AM (#40889920)
With how little even projects like Wine cover, I don't think full coverage of the Windows API is happening. You could target an older subset (3.1, 9x) but then you'd probably also need to implement fake DOS behaviour and weird hardware to get many applications to run.
Re:Fiwix: Unix-like kernel for the i386 architecture by alganet on Friday July 05, 2024 @11:04PM (#40887902)

  1. You want to run POSIX-compatible software in a context that existing kernels won't support.
  2. You want to understand how POSIX works.
  3. You want to write a kernel but not design it, and POSIX offers plenty of references.
  4. You want to optimize something about POSIX implementations and needs a bottom-up approach.
There are plenty of valid reasons.
Re:Fiwix: Unix-like kernel for the i386 architecture by screcth on Saturday July 06, 2024 @09:06AM (#40890229)
Because an OS is useless without applications that run on it and POSIX compatibility means that existing software can be ported to it with minimal changes.

If it had a custom interface, then porting large projects would be an enormous undertaking.

Re:Fiwix: Unix-like kernel for the i386 architecture by kragen on Saturday July 06, 2024 @09:09AM (#40890241)
this is relevant to my interests! where can i read about the design you favor?
Re:Fiwix: Unix-like kernel for the i386 architecture by benchloftbrunch on Sunday July 07, 2024 @11:32AM (#40898344)
I too am curious about the, imo, overemphasis on Unix clones in research and hobbyist OS development.

All the shenanigans with modern Windows aside, I am genuinely a fan of NT's design, think it does several things better than POSIX and Linux in particular (notably, the things you mentioned, plus anything to do with device drivers) and wish the open source OS world took more inspiration from it.

Yeah I know ReactOS exists, but it's held back by its lofty goal of being a complete, bug for bug compatible Windows clone with full Win32 userland, when I'd be happy with just an open source NT-like kernel.