3 ms·
> Ergo all the over-promising and hype-cycles and what not. I don't want to descend into nihilism, but I think we need more criticism to balance it out. And th
by steve1977 3y ago
> Ergo all the over-promising and hype-cycles and what not. I don't want to descend into nihilism, but I think we need more criticism to balance it out.
And then you continue with “ But file descriptors are good.”
Which arguably could be one of the points against UNIX IMHO. As opposed to object-oriented interfaces
like for example Windows NT, which allows for elegant shells like PowerShell.
Now let the downvotes flow in… ;)
- Ericson2314 3y agoWhen I say "but file descriptors are good" I mean https://en.wikipedia.org/wiki/Object-capability_model https://en.wikipedia.org/wiki/Object-capability_model is the goal. I don't believe "object-oriented" has any concrete meaning, so I have a hard time interpreting what you mean by that. Window's HANDLE * is good though, and I recall in some cases NT made some things handle-based ahead of Linux / BSDs doing so. (e.g. is `NtCreateFile` older than `openat`? Maybe?) Powershell is nicer than bash, but doesn't PowerShell run on linux? I would think the integration with a proper standard library and language runtime (C#'s, CLR) is more important than what the system calls look like. No downvote from me :)
- steve1977 3y agoWhat I mean with “object-oriented” vs “file-oriented” is more the philosophical approach of the systems. I think the “everything is a file” approach of UNIX has its strengths but it also breaks down at some point. So with the example of PowerShell (on Windows), I like that I can actually pass around objects which I then can query for details if I want to, but which can also hide their details if they’re not needed. In contrast to files (or rather text), where details are always exposed. This is often seen as an advantage as it’s directly “human readable”, but in my experience it often makes for more complex command lines. As said, both philosophies have their pros and cons, I just don’t see the UNIX one as the one and only truth. But I generally try to be pragmatic and will happily use Windows or some UNIX derived system (or something else) depending on the use case.
- Ericson2314 3y agoI think Unix fails at "everything is a file" but that's actually good. When you say "pass around", what do you mean? Is this some userland struct future syscalls will inspect manipulate? Or are you passing HANDLE * references to an opaque resource? I very much agree text is bad. :)
- steve1977 3y agoI mean (for example) that in the shell I can pipe the output of one command to another, like on UNIX. But what gets passed is not text, but an object.
- BarbaryCoast 3y agoThe difference between Windows and Unix is the design of the OS. Unix famously handles "everything as a file". In Windows, everything is an "object" of some sort. This means that to be efficient in Unix, you need to be focused on files and text. But in Windows, you need to understand the OS objects, and how to work with them. Powershell excels at that. Someone ported Bash to Windows, but I'm still not sure why. It's a better shell than "CMD", but neither are well-matched to the Windows abstractions. I've never tried Powershell on Unix, but I suspect it'd suffer from the same "impedance mismatch" as Bash on Windows; it's just not designed to work on the right abstractions.
- steve1977 3y agoI’ve tried PowerShell on macOS, and yes, it feels a bit like Bash on Windows
- deafpolygon 3y ago> elegant shells like PowerShell Microsoft really should push that harder and create some sort of standardized /usr/bin-alike so people can install CLI tools (both local user equivalent to ~/bin and globally requiring admin) in a controlled manner. PowerShell is an awesome shell.
- cald0s 3y agoShame about the language
- deafpolygon 3y agoCan you explain?
- delta_p_delta_x 3y ago> /usr/bin-alike This is called C:\Program Files. > ~/bin This is called %LOCALAPPDATA%, which lives in C:\Users\<Username>\AppData\Local. There are exact equivalents to Unixisms on Windows; it's just that Unix developers don't want to use these equivalents.
- deafpolygon 3y agoSo, putting executables in C:\Program Files will work to make them available to you on the shell?
- delta_p_delta_x 3y agoNo; to make an executable available on the shell, you add its directory to PATH, same as on *nix.
- delta_p_delta_x 3y ago> As opposed to object-oriented interfaces like for example Windows NT, which allows for elegant shells like PowerShell. Now let the downvotes flow in… No downvote from me! I always found UNIX's everything-is-a-bag-of-bytes to be a huge pain, and file descriptors even worse. This is a hard pill to swallow for many *nix die-hards, but I would say that objectively speaking, Windows NT has a better core OS model than Unix-like OSs, including the driver model, the filesystem API, the process management API[1], and the overall plug-and-play-ness of NT. [1]: The OP article mentions this paper by Microsoft Research, but claims it doesn't offer alternatives—it does. It explicitly mentions posix_spawn and CreateProcess. https://dx.doi.org/10.1145/3317550.3321435 https://dx.doi.org/10.1145/3317550.3321435
- Dalewyn 3y agoI've found delving into the structure of Windows NT (and Windows in general) is an endless stream of fascination after another. Almost 30 years of being a Windows wizard and I'm still like a kid in a toy store any time I go through it. On the surface it seems like madness, but taking a proper look quickly shows there were and are very smart and wise people behind Windows's core.