You're right that it never meant 'everything is a disk file', but generally the implication of the unix philosophy was that everything could be accessed from the filesystem.
Have a look at Plan9, which is essentially directly descended from 7th edition UNIX and IIRC was built from what was going to be 8th edition UNIX. It has a HTTP interface from the filesystem -- one can literally do GET requests on documents from the internet just by opening a file on the filesystem.
In the Plan9 model, each and everything is represented by an individual file system entry. In Rio (Plan9's windowing system) every window is represented by a directory in a 9p tree, and you draw to it by opening a framebuffer file inside the window directory and manipulating that.
Furthermore, terminals know about their windows, and can hand it over to whatever is started inside them, which essentially makes it possible to open windows "inside" a shell environment.
It's kind of a unified screen/tmux environment, and you can stack, mix and match how you desire.
As mentioned earlier, Plan9 is what UNIX research edition 8 grew into (as I understand it), it's possibly one of the best examples of the UNIX philosophy.
It's important to note that UNIX the actual implementation is a moving target because of the many versions, just because the designers didn't see something could be achieved in UNIX (resources, time, effort, etc.) or just plain didn't think about it, doesn't mean that it doesn't embody the UNIX philosophy :)
Yeah, and shouldn’t that (theoretically) file systems with very small delay? (For example, RAM based file systems for inter-process communication.)
I thought that it isn’t the slow storage that is blocking use of files, but more of a software problem that has significant overhead to use files as a communication method. (I’m not an expert here; please correct if I’m wrong.)
- UNIX itself has no inotify/kqueue/etc. feature, blocking reads are via pipes or sockets, not regular files (plain UNIX tail -f polls the file every fraction of a second)
- you're appending to the end of the file for a message that's going to get read once, and the file model of UNIX doesn't let you truncate a file from the beginning, so it will just grow indefinitely for no reason
- one benefit of the open socket/pipe approach is you get notified if the other side exits/crashes, you can't detect that from a disk file
Was it ever alive? As far as I know lo0, eth0 and others where never accessible as a file interface and we still rely on them. Is there something to gain to give them a name on the filesystem?
ls /sys/class/net
You can't read and write packets via the interface, but there are configuration knobs and statistics you can access.I think it's quite messy and inconsistent that some network interface attributes are only in sysfs, and others are only accessible via AF_NETLINK (usually via the "ip" tool). But it's there.
And that makes me think about scoped file systems... (gotten the idea from global & scoped variables)
Since the biggest advantage of ‘everything is a file’ is that it allows a consistent API for manipulating data, why didn’t this happen?
Brings back memories of the old days of the late 1990s trying out so many workstations running obscure Linux distros to actual UNIX OSes like IRIX, Solaris and HP-UX.
They all ran some variant of X11 which was part of the UNIX philosophy which I found interesting (X11 forwarding, startx, etc) but as the requirements of the desktop kept evolving over time, X11 just kept on showing its age.
Nowadays, Wayland is showing promise as a successor but I really don't have time to be messing around with these .xinitrc, .Xresources or dotfiles to get HDPI working on my MacBook these days.
It's basically all the fun we had with X11 back in 2003, just to get an environment that's about as dependable (though admittedly much faster) as X11 back in 1993.
It's one of those cases where the "release early, release often" mantra kindda seems to work against us. I'm sure ten years from now Wayland will be just as solid as X11 was back in 2013, aka "good enough", but there's a different kind of crowd looking at this stuff today.
Unfortunately, the anti-Wayland buzz propagates easily because the community response is inevitably unsympathetic. Mention things like "I tried Wayland for an afternoon, applications kept crashing" and you'll inevitably get a dozen answers, all of them along the lines of nah bro I'm running Gnome Wayland which is the default in Fedora 67 on my ThinkPad X1 Carbon and I'm not getting any crashes. Well, yeah, 90% of the projects that failed to get traction and adoption in the field of graphical systems did so because they couldn't make the transition from "running on its developers' and fans' computers" to "running on everyone's computer". I can run Wayland on my system just fine, too, but I'm the only one in my immediate circle of nerds who can.
Truth is, a lot of the reason why X11 works so well today is that a bunch of us put up with a lot of X11 crap back in the day. E.g. things like xdotool haven't existed forever, either, and it took a lot of itches (and imperfect way of scratching them) before someone wrote that. X11 wasn't exactly hassle-free for a very long time. And you get to fiddle with config files with Wayland, too, but none of these files are as long as a small section in XF86Config.
That's how free software matures -- in the open. If you want to contribute towards hiring a team of testers, you're welcome, because no one does that as a hobby. And all this is in a context were fewer and fewer developers are interested in desktop development, and fewer and fewer companies are interested in investing in desktop development.
Which could make X11 the last linux/unix desktop thing. Anything new would have to come with the whole desktop paradigm shift.
I believe file systems could have a more formal method to query the file’s format, and has less latency so that applications could use files as an inter communication format.
That doesn't preclude having more advanced interfaces, too.
As "dead" as Android (which is based on Linux, a Unix clone) and OSX (a BSD Unix) and iOS (child of OSX)? Why does Microsoft vibrantly support Linux in Windows 10 (an abomination to Ex-CEO Steve Ballmer) if Unix is "dead"?
I think the very opposite is true. Some developers realized that the KISS principle (including the Unix philosophy where everything is a stream of bytes) is not a bad idea after all.
https://blog.pragmaticengineer.com/software-architecture-is-...
Lennart Poettering, who is the mind behind Systemd, Pulseaudio, and a lot of major new technologies explicitly disavows the UNIX philosophy.
Every time I see the X11 protocol, I realize that the UNIX philosophy (everything is a file) is dead.
It’s a pity that instead of improving the speed of the file system, everyone started to ignore it, hence making it’s speed even less important, and on and on...
And now nobody uses the file system for these purposes.