Re: Reinventing Unix is not my problem
Posted: Thu Apr 01, 2021 3:20 am
You misunderstood. I wasn't talking about binary compatibility, I was talking about source compatibility. One reason why SkyOS was discontinued is that Robert got fed up rewriting each new Firefox release to his interface.rdos wrote:I think that is a pretty poor argument. The problem is that if you are not exceptionally compatible with Linux or Windows
Depends how much you support the standard. For an application which is strictly POSIX (at source level), not much ifdefs needed (like porting between Linux and BSDs, many applications don't need any ifdefs at all). On the other hand, an application which should compile for both POSIX and WIN32 API needs hell a lot of ifdefs. So what you say is true, but it does matter how much work porting needs.rdos wrote:you will not be able to compile a majority of these even if you have a full libc with Posix. Most of these projects are full of ifdefs and typically require autoconf to even generate makefiles.
And have you updated your SSL to the latest? There's a huge security hole in OpenSSL, reported a few days ago. Porting once isn't enough, you also must keep them up-to-date, ideally with automated patching.rdos wrote:For the projects I've ported, like JPG, PNG and SSL, I've added them to my own SVN repository and then only update them quite seldom.
It's called the Mach-O kernel, and it is so POSIX compatible, that MacOS actually ships FreeBSD userland (all the basic applications, like bash, awk, tar, cut, tr, etc. came from FreeBSD unchanged).nullplan wrote:Isn't MacOS running atop a kernel called XNU, which is very Unix-like?
No, that's the truth. NT kernel doesn't have different concepts than UNIX. Nothing at all. It operates with shared libraries (called DLLs in NT parlance), files, directory hierarchy, etc. With NTFS they have even copied symlinks (called reparse points) and many other things. Processes use separate address spaces and use syscalls to access the kernel. Different implementation, different API, but exactly the same concepts.zaval wrote:Given David Cutler's dislike to UNIX, that's hardly a more, than far fetched, wishful thinking.
Think of C as a "portable Assembly", and you'll see right away how brilliant it is. Assembly isn't portable, and C++ is a terrible monster that 99% programmers don't know how to use correctly. Are you familiar with Ted Tso's quote "handing C++ to the average programmer seems roughly comparable to handing a loaded .45 to a chimpanzee"? (You can use any language you want of course, but it might worth thinking about why all C++ kernels have failed so far. Most notably GNU/Hurd (a kernel written in C++) was replaced by Linux (a kernel written in C) ASAP the latter got mature enough, for a good reason. Haiku, which is C++ all over, doesn't use any C++ features in its kernel, just pure C. C++ is limited to the user interface API only. Take a look at it's source, for example elf.cpp, no namespace, no classes, no "new" keyword, all is pure C. C++ is only used on the parts which userspace can access, but not below.)rdos wrote:Kind of, and I have to disagree with C being something good too. I don't use C anywhere (except for in some complicated device-drivers), as my view is that either you use assembler or C++. C is a kind of middle-of-the-road alternative that is poor at both low-level stuff and object-oriented programming, and so has no place in my design
This is completely wrong, for several reasons. You're confusing implementation and concept.rdos wrote:In short, Unix is a design of the 70s, and as such is pretty poor in the 2020s when the hardware is quite different.
a) new hardware does not introduce new concepts at all (maybe memristor will one day, but a new peripheral won't for sure)
b) all OS in 2020 use exactly the same concepts as UNIX did in the '70s.
Cheers,
bzt