5 ms·
He's making a sales pitch rather than a factual statement. Linux is file-orientated but it is also API-orientated too. You cannot make syscalls via file descrip
by hnlmorg 5y ago
He's making a sales pitch rather than a factual statement. Linux is file-orientated but it is also API-orientated too. You cannot make syscalls via file descriptors, nor call shared objects via a fd. And most REST APIs in the world are running on top of Linux anyway.
I also think it is disingenuous to talk about HTTP APIs when talking about shell scripting as if it's something that needs to be built into the fabric of the shells design when HTTP APIs can be an abstraction that bolts on top. In fact that's exactly how a lot of CLI tools work (awscli, Terraform, even Powershell scripts will make those API calls in composed functions rather than natively from shell).
- kaba0 5y agoBut even on a syscall level, Linux calls are way more barebones with not too user-friendly struct passings, etc. And due to their obsession with C, it is the same way in user space as well.
- hnlmorg 5y agoThere is more 20 years of lessons learned between UNIX and NT though. Yeah Linux is a distinct OS but it was written to be a UNIX-clone whereas NT was designed to be a new OS from the ground up. However if you look at NT's spiritual godfather, VMS, that primarily written in C as well. Plus C++ doesn't magically fix the complaints you're making anyway. It's also worth noting that Linux does have plenty of services that support RPCs too (X11, dbus, etc). I'm not try to argue that Linux and Windows are equivalent though. Just that it's a little silly to argue that Linux can't do APIs.
- blibble 5y agoI don't think I've ever come across a Windows API that was pleasant to use CreateProcess is probably my favourite example NT didn't inherit the problems of fork() with unix, but it's still a disaster of giant nested structures, combined with several different ways of creating lists of parameters (some params need quoting in weird ways, others need manual construction of arrays of null terminated strings) whereas the POSIX APIs tend to be small, clean and simple
- kaba0 5y agoOther than creating a struct with shitty abbreviations and int values from god damn where. Don’t get me wrong, I really like linux. But I don’t think that posix syscalls are that simple.