Live data from Hacker News

The Collapse of the Unix Philosophy

kukuruku.co

281–290 of 616 posts

Re: The Collapse of the Unix Philosophy

#281
post #271

Earlier quoted context omitted.

"Doctor, it hurts when I do this." "So don't do it." The problem with filenames is just a symptom of the biggest problem of UNIX conventions - passing around unstructured text. Filenames should have one well-defined format (AFAIR kernel allows pretty much anything but the NULL character). That's it. For most applications, filenames should be opaque data blobs compared for binary equality. But because we're passing ar…

Of note for folks who don't know it, Common Lisp treats pathnames as structured objects. It's pretty nice, although it'd have been even nicer had they more-fully-specified them with respect to e.g. POSIX filename conventions (e.g. is /foo/bar a directory or a file?). UIOP basically fixes all this, and it works.

Yeah. CL's pathnames are a bit confusing to people though, because they came about as a way to handle several different types of file paths from various operating systems which preceded UNIX / POSIX.

For those who're interested, there's a pretty good overview of them in Practical Common Lisp[0]. I'll quote the first paragraph of the subchapter "How Pathnames Represent Filenames", which serves as a decent TL;DR:

"A pathname is a structured object that represents a filename using six components: host, device, directory, name, type, and version. Most of these components take on atomic values, usually strings; only the directory component is further structured, containing a list of directory names (as strings) prefaced with the keyword :absolute or :relative. However, not all pathname components are needed on all platforms--this is one of the reasons pathnames strike many new Lispers as gratuitously complex. On the other hand, you don't really need to worry about which components may or may not be used to represent names on a particular file system unless you need to create a new pathname object from scratch, which you'll almost never need to do. Instead, you'll usually get hold of pathname objects either by letting the implementation parse a file system-specific namestring into a pathname object or by creating a new pathname that takes most of its components from an existing pathname."

[0] - http://www.gigamonkeys.com/book/files-and-file-io.html

Re: The Collapse of the Unix Philosophy

#282

Some of my primary beefs with Unix, stated more concisely than the rambling article: 1) Text is for humans, and is generally incomprehensible to machines. Encodings, arbitrary config file formats, terminals, etc, are all piles of thoughtless one-off hacks. It's a horrible substrate for compositing software functionality, through either pipes or files. 2) Hierarchical directory structures quickly become insufficient.…

1. Binary formats are great, until they break. I would take plain strings configuration over Win95 registry any day. Actually, I'd take plain text conf over Win10 registry any day also. How do you transfer your (arbitrary) program settings from one computer to another? I can tell you how on Unix. How would you on windows? 2. / based filesystems are head and shoulders better than Windows. Why should moving a directory…

> Actually, I'd take plain text conf over Win10 registry any day also. How do you transfer your (arbitrary) program settings from one computer to another? I can tell you how on Unix. How would you on windows?

Your personal registry settings are stored in %USERPROFILE%\ntuser.dat, and global registry trees are various files under %SystemRoot\System32\Config.

Actually, in many ways, Windows makes its organization system much easier to find profile data to copy than Unix-based systems. Most programs install configurations either in their install folder (C:\Program Files\) or in per-user data (C:\Users\\Application Data\). In Unix, you might have a mix between dot folders (with some things choosing to use . while others might settle for .config/), as well as having to guess if various config files are under /etc/, /usr/lib/, /usr/share/, or maybe even weird places like somewhere under /var or /opt.

> On Unix I can keep my home directory (or Program Files) on a NFS share, SMB share or SSD harddrive. Can I do the same on Windows?

Yep, you can remap where your user's home profile is. You can even distinguish between files that should be replicated across network shares and files that should not be replicated in per-user storage (AppData\Roaming versus AppData\Local).

Re: The Collapse of the Unix Philosophy

#283

Earlier quoted context omitted.

> When the design was made, no one was considering pathology. We were all too invested in the wonder of making it all work to worry about people screwing around in crazy ways, let alone purposeful attacks. I could buy this if not for the fact that back when UNIX was created, there were already better operating systems and sane solutions to those issues existed. It's more like that those aspects simply weren't really…

"But no, in both the worlds of programming and operating systems, there already were better thought-out solutions." There were differently thought-out solutions, but not necessarily better or worse. Perhaps the issues they thought out didn't matter as much at the time and very unlikely to matter even a little bit today, and who knows how much they got wrong and much worse. It's very hard to speculate. But one thing I…

Sure, but we're not talking about niche systems. There was a whole flourishing world of computing before Unix and C came to be. In fact, a lot of significant theoretical and practical advancements came from that age.

Our industry does seem to be stuck in circles, continuously forgetting the ideas of past cycles and reinventing them, only for them to be forgotten again. To see that phenomenon in action, one does not have to look much further than the last 10-15 years of history of JavaScript to see how the web ecosystem basically slowly reinvented already long established practices from desktop operating systems and GUI toolkits...

Re: The Collapse of the Unix Philosophy

#284

Earlier quoted context omitted.

Evolution does what evolution does. The problem is that selection pressure is too weak, and things that should die off survive and flourish.

Isn't that contradictory? If you start with the assumption that it's evolutionary, how does it make sense to judge whether selection pressure is "too weak" and that things "should die off?" Selection pressure is what it is.

Selection pressure may or may not be in a feedback loop with the evolutionary process, but you can still view it as a separate component. In case of computing, the (broadly understood) market is the selection pressure. As for the notion of what should happen, this comes from humans who are capable of thinking about the evolutionary process and who value some goals over others. In particular, those humans tend to notice that the selection pressures in software industry do not promote good, efficient, and well thought-out solutions.

Re: The Collapse of the Unix Philosophy

#285
post #125

Earlier quoted context omitted.

As an hobbyist blogger, I can perfectly empathise with why the author wrote that. People love to crap all over a blogger who dares to post his thoughts on a private blog, without first subjecting it to PhD-thesis-level scrutiny. This really gets on my nerves for the same reasons that engineers get pissed off when they decide to open source a pet project and suddenly start getting "URGENT ASAP" feature requests from e…

> "If you're not happy with the level of rigor, then don't read it, don't share it, and don't believe it." What I don't like about that attitude is that it suggests that the blogpost should be excused from criticism of its rigor. But any assertion and opinion by anyone can and should be considered open to criticism. > "But no, the author has no responsibility to provide you with a comprehensive list of citations and…

> A better way than "This article was written hastily, and I don’t want to further improve it. You’re lucky I wrote it." without the unnecessary rudeness and ego boosting could be more along your lines: "This article was written hastily and shouldn't be subject to PhD-thesis-level scrutiny, so I've posted without any expectation that I will improve it or respond to criticism."

Sounds to me like you agree with the substance of what the author said, and just happen to disagree with the delivery. Keep in mind that different people have different writing styles, and people often post things like what you quoted in a tongue-in-cheek manner. Some people prefer a formal, humble style of writing. Others like a more humorous style, and others yet enjoy a Steven Colbert faux-braggadocious style. It would be unfortunate if we browbeat anyone who dares to inject some quirky humor into their writing.

Re: The Collapse of the Unix Philosophy

#287

IMHO, a lot of the Unix philosophy boils down to: we do it this way because the neckbeard of my father and the neckbeard of his father and all the neckbeards before him unto the beginning of Unix on January 1, 1970 did it that way and if you want to do it differently, well, you better have a stronger neckbeard, because then we'll have two problems instead of just one.

pretty much, yes.

i'm still to see any complainer grown an adecuate amount of facial hair, though. (incompetently) reinventing some bad idea from before you were born does not cut it, you know?

Re: The Collapse of the Unix Philosophy

#288
post #243

Earlier quoted context omitted.

The capability model is much more flexible. See Combex's desktop or "PowerBox's" for how simple it can be gor users to maintain POLA. Older system doing it was KeyKOS on IBM mainframes. KeyKOS + KeySAFE was strong architecture.

Is there a description/examples of these anywhere? Combex doesn't provide a lot of info and I couldn't find anything on PowerBox. From the description of Combex ( http://www.skyhunter.com/marcs/capabilityIntro/ ): > Suppose you were running a capability-secure operation system, or that your mail system was written in a capability-secure programming language. In either case, each time an executable program in your ema…

They thought about that. Claim it isn't as bad as you'd guess. Plus there's cheats like File Boxes.

https://www.combex.com/tech/edesk.html

Re: The Collapse of the Unix Philosophy

#289
post #218

Earlier quoted context omitted.

This demands the question - why allow control characters in file names at all? Non-printing characters?

There simply is no good reason. I have had this discussion, and there is a group of people who consider it "unclean" to rule out any characters. There is an excellent discussion of the topic[0]. I find it utterly definitive in the way it relentlessly shows how you can't "fix" this issue completely any other way than by ruling out the bad characters by making the kernel disallow them. [0] https://www.dwheeler.com/essa…

Ruling out "bad" characters is bound to affect internationalization negatively.

IMO the best approach would be to separate between file name and the file object. When I edit a file with vim, should vim really need to know the name of the file? No. Likewise for a lot of other utilities as well. If instead of being so focused on file names and paths everywhere and we operated instead mainly on inodes then I think much would have been won. Now in some instances the file name is of interest to the program itself, for example if you attach a file to an e-mail, upload it with a web browser, tar a directory, etc. but in all of these instances I think that the file name should be more separate and even for most programs that want the file name they should just treat the file name as a collection of bytes that have close to no meaning.

In other words, I would want to translate paths and file names into inodes in just a very select few places and then keep them separate.

This is what I am going to do in my Unix-derived operating system. I will get around to implementing said system probably never but you know, one can dream.

Re: The Collapse of the Unix Philosophy

#290

This whole article is a bunch of strawman arguments. It points out historical mistakes by unix developers, but those mistakes aren't inherent to or a result of the Unix Philosophy: (1) Write programs that do one thing and do it well. (2) Write programs to work together. (3) Write programs to handle text streams, because that is a universal interface.

The arguments in the article indeed don't have much to say about Unix Philosophy per se - they're just a list of various fuckups and idiocies Unix accumulated for some reasons or others. As for Unix Philosophy, the point (3) in your summary is something that's a) dumb, and b) back when it was created, they already had better solutions. Passing text streams around is a horrible idea because now each program has to hav…

> (3) makes you programming with a dynamic, completely untyped language which forces each function to accept and return a single parameter that's just a string blob. No other data structures allowed.

I think this is great. There's slightly more principled ways to do it, but having to convert everything to one single format at the end of the day keeps you humble.

Let's go back to the previous decade's Hacker News:

http://wiki.c2.com/?AlternateHardAndSoftLayers

Post reply on HN