Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Being German, I think rather differently (probably this is a different culture; US citizens might think differently) about this. Consider

    Sortix is a small self-hosting Unix-like operating system developed since 2011 aiming 
    to be a clean and modern POSIX implementation.
vs.

    Sortix is a clean and modern POSIX implementation.
If it isn't yet a clean POSIX implementation, the second one is a blatant lie to a potential user (which they will and should not forgive). On the other hand, the first one is quite honest in that is clearly tells what is there and the clear commitment to reach a clean and modern POSIX implementation - sounds fair and honest.


sort by: page size:

Author here. I'll probably omit the word 'modern' in the next release. Not for the reasons listed here, but because a bunch of stuff purports to be modern while forgetting the lessons of the past.

I implement POSIX not for the sake implementing POSIX, but because it allows me to port a lot of the software that's already written. The core POSIX specification is fairly alright and not that intrusive in my design, the worst parts of POSIX are in optional sections like XSI that I simply omit implementing. I implement a lot of extensions found in Linux and BSD that enhance upon POSIX, while also providing a few of my own. POSIX doesn't say anything about the ABI and doesn't prevent other languages. Atomic file operations are dear to my heart and something I'd like to extend upon in Sortix. Note that POSIX does specify rename(2) is atomic. I implement POSIX when it's convenient and omit doing so when not.

I'm happy to acknowledge the limitations of Sortix up front. It's important to establish this level of honesty early on to set the right expectations and establish trust. I warn up front about the security problems in Sortix (that exist at this time). If you follow the documentation, you should get predictable results with no nasty surprises.

I think Sortix is suitable for education projects. There's some more clean ups that can make it better. But it's of a reasonable size, it doesn't have that many dirty hacks, and it's fairly well organized.


POSIX is a legacy “formal standard”. The two biggest players by far of the Unix branch (Linux and MacOS) both implement it losely.

The POSIX strictness battle have been lost more than two decades ago. Behaving as if it did not, is overly pedantic.


> "POSIX is not Unix."

"This is just one example of where the old ways aren't necessarily the best."


This is kind of an odd take because POSIX is purposed to make application development across Linux and Unix easier by providing reliable behavior. Saying, "my OS is better than the high level standard because it does more" makes me go, "Okay".

Also, I'm not sure the author has ever actually read POSIX?


It's quite true! It is worth noting that many systems people call unix are not POSIX compliant, but most try!

Good catch. I haven't found a proper source other than a quotation from some HN comment, so I'm not sure if it actually is POSIX valid or not, just that many people seem to think it is.

Back when I cared about POSIX (early 2000's) the difference between what POSIX stated and what UNIX systems offered wasn't always the same.

I guess the situation might have improved.


POSIX and Linux are generally believed to be different entities.

It is however useful to know the difference, and in some cases you actually need to write POSIX (code meant to be sourced for example).

Sortix aims to be a "clean and modern POSIX implementation". POSIX mandates, say, ed[1]. Xv6 does not implement ed; it's absolutely spartan.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ed...


"UNIX-like/POSIX-compliant operating systems"

So what would that not be?


While correct, POSIX is supposed to mirror UNIX, but only does so partially and like ANSI C, leaves room for implementation specific behaviours and extensions.

So in the end, the situation isn't much better, if the goal is to reach as much UNIX like systems as possible.


Linux and POSIX are not the same thing.

There is a big difference between being a UNIX and just supporting POSIX syscalls, regarding OS architecture.

That's not the same thing though, is it? Even desktop Linux is not technically POSIX compliant.

>POSIX, although somewhat dated, has provided a good enough abstraction layer for filesystems and OSs.

First of all, POSIX semantics are not what Windows support. Second, even where available, POSIX is a tiny part of the possible issues. Adequate for naive apps that need to open or write some files, not for a reliable sync tool.

https://danluu.com/deconstruct-files/


> Where is POSIX actually useful today?

Defining a stable API to code against?

> And with many things being Linux (or Linux-like like WSL) the need for this might be less?

Define "being Linux". RHEL? Ubuntu? Other? Is /bin/sh linked to Bash or something?

* https://mywiki.wooledge.org/Bashism

* https://linux.die.net/man/1/checkbashisms

> Are Android and/or iOS fully POSIX compliant?

UNIX® Certified Products include macOS:

* https://www.opengroup.org/openbrand/register/

POSIX:

* https://posix.opengroup.org/register.html


Posix is not Unix.

Isn't POSIX just a specification?
next

Legal | privacy