8 ms·
Unix is both a technology and an idea
- RcouF1uZ4gsC 3y agoI would argue that while Unix the technology is helpful, Unix the idea is now actively harmful. The Unix idea just doesn’t scale well or have the necessary security. It seems we are more and more going to an idea that is even older than Unix - the mainframe. From fault tolerance to distributed computing to security to memory channels our modern architectures are more resembling mainframes than Unix and that is good. Everything is a file is a very, very leaky abstraction. There are all sorts of issues with latency, cost, atomicity, security, persistence. I feel at this point, that this constant looking back to Unix “purity” is holding us back and closing our mind to new solutions.
- chargingmarmot 3y agoThere's a book I like called "Design Rules: The Power of Modularity"; it was written by some business professors in 2000 and is loosely about the industrial organization and the history of IBM's System/360 (the first "modular computer family") and more generally about how modularity enables innovation and growth. They enumerate what they call "modular operators" which are basic ways a system can be changed: * "splitting" a design into modules * "substituting" one module design for another * "augmenting" adding a new module to the system * "excluding" a module from the system * "inverting" to create new design rules * "porting" a module to another system It doesn't matter here whether the modules are functions, computer programs, hardware components, business units, 2 pizza teams, or companies in an industry (Intel, AMD, RAM manufacturers...). Modularity is a core part of the Unix philosophy. Unix itself is an operating system and involves some particular concepts (pipes, files, processes). It seems obvious that the concepts for an operating system (pipes, files) will be less relevant in a different domain (say, web programming). While I agree that maybe the Unix abstractions aren't appropriate for new problems in different domains, I think some parts of the Unix philosophy (i.e. modularity, minimalism, and compositionality) still deserve consideration.
- bmitc 3y agoThanks for the reference to that book. I need to check it out now.
- shrubble 3y agoHave you ever used a mainframe OS like MVS, or the z/OS or earlier versions of it?
- galaxyLogic 3y ago> “purity” is holding us back and closing our mind to new solutions. Maybe. But consider shebang. It means that any program (/script) written in any language known by the system can call any other program written in any other language. That keeps open the option of which laguage should we use for our next module. Right?
- coldtea 3y agoThat's an constrained example of the general concept of a file-association (having a file plus the info of what application executes that file). As such, it predates UNIX, exist in other OSes as well, and can be even more dynamic (as shebangs are hardcoded into the file, where file + executable associations could be external). Linux offers another way anyway: linux_binfmt If I'm not mistaken that's also how jar files can be executed by themselves without calling java on them.
- galaxyLogic 3y agoIt is nifty and mind-blowing. It basically means there is a way to "call" a program-file and let it decide who should interpret the program. It is not too different from the way in which html-pages can declare what is the character-set that should be used to interpret the binary contents of the file. The deep thing to me is that programs can not only encode instructions for the computer, they can also encode how to do the decoding. Obviously you then need some common convention (like shebang) to say how you can interpret the part that tells how to interpret the content.
- coldtea 3y agoThere would be a step anyway between the user selecting even a regular binary executable (via pressing enter after writing its name on the shell, by double-clicking on it in a desktop file manager, by running a shell script which on some line invokes it, etc) and it starting to execute (the shell or GUI would have to interpret the action and tell the OS to execute the binary). So adding an intermediary to do a choice of executor and/or handover in between (whereas at the shell/file-manager level, or at the OS call level), but still before execution, is quite easy.
- chubot 3y agoAndroid is a great NEGATIVE example of the Unix philosophy! The code is based on the Linux kernel, which might make you think it's Unix, but isn't Unix [1] An OS is where 3 things meet: code, data, and people. AKA apps, files, and users. AKA CPU, storage, and networking when viewed from hardware (in the old days, you'd have terminals and serial ports, not Internet) I'd argue that (if you take away the historical "hairs"), Unix is a minimal and efficient implementation of those ideas. It's efficient enough to build heterogeneous "platforms" on top -- Lisp, JVM, JavaScript, Python, etc. Databases, hardware virtual machines, the entire modern cloud The shebang line is basically "polymorphism" for those runtimes -- everything looks like ./foo arg1 arg2 The args are often unstructured files that you share between different programs -- Android breaks from that design in many, many ways - Applications are written to the Java runtime, not to the OS - They written in Java or Kotlin. Escaping to C++ is a "special" thing, you use the "NDK" for that - It doesn't expose raw files to applications, or at least it seems apps can't really share files. It uses its own security model, not Unix security (which was almost certainly necessary!) Hm I clicked on the original link, and Rob Pike said it better: The very idea of a "Files app" is high on my list of world-defeating idiocies perpetrated by technology. - It doesn't use Unix IPC, it has its own "binder" mechanism between apps. Although most modern Unixes don't find it enough either - https://roxanageambasu.github.io/publications/eurosys2016posix.pdf https://roxanageambasu.github.io/publications/eurosys2016pos... So Android is more like a "monoglot" operating system on top of Unix. It's just using Linux as a bunch of device drivers basically (Makes me think of the quote from the 90's regarding browser/JVM: "Windows should just be a bunch of poorly debugged device drivers", and that rhymes a bit with how Android turned out.) --- I think the cloud is missing the "Unix" layer, i.e. a good factoring of mechanism and policy, C and shell, which you can build other platforms on top of. I'll refer to my own post: Kubernetes is our generation's Multics https://news.ycombinator.com/item?id=27903720 https://news.ycombinator.com/item?id=27903720 The cloud is kind of an incoherent architectural mess -- it doesn't really have the code / data / users model. It basically has the incoherent "Files app" architecture, as Pike says What's code in the cloud? How do I invoke it? What are files? What are users? There's a million answers, and it causes a lot of work for us programmers. Most app code seems to be papering over the differences between different representations of these fundamental things, which ultimately makes them slow and unreliable [1] Incidentally, Android is also not GNU/Linux -- it's the Linux kernel, without GNU at the platform layer
- kgr 3y agoIf we analyze the computational complexity of software architectures the way we do regular algorithms, we see that UNIX was much more efficient than previous OSes/approaches. It's demonstrated in this short video: https://www.youtube.com/watch?v=3Ea3pkTCYx4 https://www.youtube.com/watch?v=3Ea3pkTCYx4
- chubot 3y agoYup, I cited that Unix vs Google video in my post The Internet Was Designed With a Narrow Waist https://www.oilshell.org/blog/2022/02/diagrams.html https://www.oilshell.org/blog/2022/02/diagrams.html A narrow waist is an idea or interface that gives you O(M x N) functionality for O(M + N) code. It's a way to reuse code and data by interoperating. If you can't interoperate, you end up writing bad versions of the same application code, over and over again. More concretely, I remember there was this whole "re-architect google3" idea >10 years ago, which seemed to get brushed aside for the cloud. I think they were trying to have more of a narrow waist, not 10 different distributed databases made by 10 competing teams, 10 different auth libraries, etc. The management's perception then was that product dev was extremely slow, and had poor quality results That video is about the application side of Google (e.g. docs and maps), but the internal side had similar architectural problems. --- As another example, it seems like the dev tools group at Google wanted this article to be published, and I have no idea why: Google Is 2 Billion Lines of Code—And It's All in One Place https://www.wired.com/2015/09/google-2-billion-lines-codeand-one-place/ https://www.wired.com/2015/09/google-2-billion-lines-codeand... It's saying Microsoft Windows has 50 M lines of code, while Google has 2 B lines of code. There are all sorts of problems with those numbers, but in any case, it's not a flattering comparison -- not something you want to brag about I think they wanted to emphasize the scalability of the source control system, and ended up saying that Google has a lot of bad code that doesn't work well
- dmoy 3y agoIs there a linux OS (or two?) in google3? google3 vs windows might not be a reasonable comparison, than say google3 vs windows + office + azure + dozens of other Microsoft products.
- deleted 3y ago[deleted]
- ForOldHack 3y agoUnix was a couple of guys in an attic. Hack was one guy. Unix was collaborative, personally collaborative between some extraordinary intelligent people. If you read Kernighan's memoir, it talks about the second version problem. Unix solved a problem. GNU solved a problem. Linux solved a problem, and WSL2 solved a problem. Using a hammer to rid your house of ants is a solution, that does not fit the problem. I do not consider a hammer harmful in itself, if its used to drive nails. Everything needs a tersely named tool is outdated, useful for trouble shooting but outdated UX/UI. We need to continue with our tools, and develop them further, but not with extraneous bells and whistles. ( This bit of wisdom came from a 5th grader, who now has a degree in Political Economics, and I do not understand a single thing he says. ) Read Kernighan's memoir.
- safety1st 3y agoWhat's often lost in a simple review of the history is that in modern times certain elements of the Unix philosophy [1] have become more important than ever. In fact as technology becomes more pervasive I would argue that the ideas it encapsulates are no longer only relevant to computer architecture, they're now relevant to the survival of a free and open society. This isn't just about how to build the best widget anymore (though I still think the Unix philosophy is a great contender for that). In particular I'm referring to the principles of composability and universal interfaces. These principles make the Unix philosophy inherently democratizing - when you apply it you're producing something that's intended to interoperate with other agents in a diverse ecosystem beyond your control. This is in stark contrast to the monoliths that tend to emerge from proprietary software development where the socioeconomic goals are to control everything strictly and limit interoperability because there's commercial value in having a "moat" or a "walled garden" which people can't escape. As computers become interwoven with our lives and our society the general purpose computer has become a tool like the printing press. The printing press was a precursor for democracy as we know it because it enabled the dissemination of information on a scale that was previously impossible. What sort of social progress we might ultimately achieve through the general purpose computer is yet to be fully determined. But in the modern era we have many examples of what the competing philosophy of proprietary monoliths looks like - it's a hellscape where more your time and attention are harnessed by the monolith's owner, to serve his own ends, even at the detriment of your health and well-being [2]. Facebook and Instagram wouldn't be killing our children if they had been designed around the Unix principles of composability and a universal interface. How many people have lamented their inability to take their data, content and relationships away from Meta's silo? It's a constant refrain in our industry that people wish they could get away from a service that started out great and gradually "enshittified" - had these services been designed with the Unix philosophy in mind, it would be possible. Either way, the Unix philosophy is now just as much about your human freedom and well-being, as it is about whether your code works well. Stallman of course saw this coming decades ago and predicted with disturbing prescience - that "either the user would control the program, or the program would control the user." [1] https://en.wikipedia.org/wiki/Unix_philosophy https://en.wikipedia.org/wiki/Unix_philosophy [2] https://jonathanhaidt.substack.com/p/social-media-mental-illness-epidemic https://jonathanhaidt.substack.com/p/social-media-mental-ill...
- pjmlp 3y agoThose that keep trying to make a point of Android being UNIX, never really shipped anything on the Play Store. Yes, it uses the Linux kernel, and several components born on the Linux world and that is about it. Only Google and OEM partners get to see that layer, and those that root their devices. Nothing on the Android userspace, the Java and Kotlin frameworks, or the NDK official APIs have anything to do with Linux in any kind, form and fashion. As for putting UNIX in a pedestal, most of the so called culture, is mostly circled around nerd circles, hardly ever noticed in big iron commercial UNIXes, and now that most of them faded away, gets passed by as a kind of old culture myth told during cold nights around the fire. As for the technology, the UNIX haters book exists for a reason, had AT&T been allowed to sell UNIX from the get go, and most likely it wouldn't have picked up steam on the market. Being source tapes available for symbolic prices, when compared with the real cost of a commercial OS on the 1970's, is of course a different matter. I find great that at least the mobile OSes, and cloud infrastructure nowadays focus on other stacks, instead of being yet another UNIX clone, no need for OS monoculture stuck in the past. Signed, a recovered UNIX zealot.
- flohofwoe 3y agoiOS is also a UNIX btw ;)
- pjmlp 3y agoNow try to ship an app using only UNIX apis.
- artimaeis 3y agoI don't believe that's correct. MacOS has been a certified UNIX for ages, but to my knowledge Apple have never claimed nor sought to have their "smaller" operating systems certified as UNIX. https://www.opengroup.org/openbrand/register/ https://www.opengroup.org/openbrand/register/
- flohofwoe 3y agoBy that definition most Linux distros aren't UNIX either though - which is a bit silly.
- coldtea 3y agoYeah, and specifically, a bad idea: https://web.mit.edu/~simsong/www/ugh.pdf https://web.mit.edu/~simsong/www/ugh.pdf
- bmitc 3y agoWhat an interesting book and read. Although, I worry about the tbought that Macs are elegant. At least nowadays, macOS is such an amalgam of technologies, it is a mess.
- bmitc 3y agoThis article just keeps repeating the two concepts of Unix technology and Unix ideas but doesn't clarify what they mean by either. The links, seemingly complaining about iOS or Android, don't really seem to clarify. It seems many want Unix technology or ideas to be about what Unix meant in the 70s and 80s and don't have much interest in moving things forward from that plateau. (To be clear, I think all the major operating systems of today leave a lot to be desired, but each one has their own pros and cons.) Aside from the file system parts, my understanding of the idea of Unix is that it is a bunch of small utilities interacting with each other. I think almost anyone agrees with that idea, see functional programming and node based tools that link up data between dedicated functions and nodes, respectively. This idea is quite pervasive, and I don't think it was necessarily Unix that conceived of it. But in reality, the implementation of this idea in Unix leaves a lot to be desired. The collection of utilities that have very few standards in interfacing, documentation, naming, usability, and more importantly, data structures leaves one wanting. The idea that everything should be text is implicit and highly limiting. This is why programming languages that are somewhat OS-like and have their own scripting are so well liked, becuase it removes the need to worry about the various OSes' implementation of these ideas, leaving one to stay at a virtual machine level. For example, Elixir and the BEAM. It's typically viewed as blasphamous, but I think the PowerShell model is the more powerful one if we're just considering OS-level provided interactions. But even then, restricting oneself to the terminal is limiting. I find the ideas in Smalltalk to be much more powerful and forward thinking, despite being as old as Unix itself.
- bluetomcat 3y agoThe communal spirit of Unix as described by Ritchie back in the day revolves around minicomputers (aka PDP-11) shared in a single organisation, accessible via multiple terminals. A close community of users would log into the system and would eventually come up with their own small tools for a particular purpose. Those oddly-named tools would be adopted by the small community without need for extensive documentation. This is the "Unix spirit" of the 1970s that everyone seems to be referring to.
- dale_glass 3y agoI agree, PowerShell does the same thing better. And I'm disappointed that things have stagnated so much. I mean, cool, a commandline is an useful concept that sometimes fits a given task excellently well. But why in the hell are we still emulating a VT100? How is a modern Linux console sticking to a 50 year old level of functionality? And why are we scripting in something as painful as Bash?
- amelius 3y agoAnd ioctl is the hack that made that idea work.
- mettamage 3y agoIMO, all technology in the computer space are ideas. Unix is one that is intentional about it. I view creating a different software program as a "technological argument". Ultimately, almost everything a computer is is a set of agreements (or a standard, a special type of agreement). A programming language is one, the ISAs of the popular CPU companies are one (and the fact that they are popular), all the way to the interfaces of software.
- nologic01 3y agoThe issue with "Unix", both as a technology and as an idea, is that has remained substantially incomplete. It never developed the next layer(s) that would help embrace all users, not just the technical ones. The fact that the project/ideology/mindset is old does not mean it is rounded, finished and fulfilled. "Unix" missed the popularization of compute not once but twice, first with the infamous "linux desktop", then with the mobile revolution. There does not seem to be a technical reason why this "completion" has not happened. The history of computing is idiosyncratic, very far from exploring the phase space of possibilities, let alone converging on optimal ones. Random economic and regulatory/political constructs helped fill the gap in all the abominable ways that dominate today's landscape. Yet Unix 2.0 - the human-centered version is just a finite number of keystrokes away...
- jjav 3y ago> There does not seem to be a technical reason why this "completion" has not happened. I'd say there is. Unix is a wonderful toolkit of tools that all work together in the most wonderful way. You can build your own perfectly custom anything by piecing tools together exactly how you want. I can't think of a more satisfying playground for a technical person. Thing is, the nontechnical users don't want that. So building something on top of Unix that can "embrace all users, not just the technical ones" will by definition hide or remove nearly all the interesting lego-like interlocking tool functionality. So at that level, the Unix desktop is an impossible contradiction. Sure you can built plenty of desktops on top of Unix and plenty have been written. But at that point it isn't quite Unix anymore, unless you ignore the desktop and open xterm.
- nologic01 3y ago> will by definition hide or remove I am not sure that follows. Maybe the "hiding" part in some sense, but without any negative impact. One approach is to pre-package a set of components for the tasks people use frequently and for which they expect to have a simple interface. Such an arrangement does not prevent power users from clicking on the proverbial "developer" option and unlocking the components, creating new mashups. For sure such a natural and intuitive higher level interface is non-trivial to design. It would be as important an innovation as the underlying unix itself.
- tibbydudeza 3y agoDo one thing correctly and do it well - like everything is a file OS and clib and the C language. Sigh the same cannot be said of the terrible wonky state of the web - JS is just so shit and anything that followed it as just a new mess on top the existing pile of messes.
- lincpa 3y ago[dead]
- jasoneckert 3y agoI agree with many of the sage points here, however, I think Unix is more of a general philosophy as well as a set of related operating systems that are loosely based on the original UNIX. My recent KW-LUG presentation revolved around this, specifically: https://archive.org/details/kwlug_meeting_2023-07-10/KWLUG+2023-07-10+talk-1+UNIX+Philosophy.webm https://archive.org/details/kwlug_meeting_2023-07-10/KWLUG+2...