Live data from Hacker News

The Unix Philosophy

catb.org

31–40 of 269 posts

Re: The Unix Philosophy

#31
> The ‘Unix philosophy’ originated with Ken Thompson's early meditations on how to design a small but capable operating system with a clean service interface.

Except that a program-to-program interface based on formatting and parsing text is anything but clean.

Re: The Unix Philosophy

#32
I keep wondering about what seems to be the most important component of Unix philosophy: write many small programs that do one thing well and interface using text streams!

Yes, modularity is important. However, in some cases, this philosophy has resulted in the "tangled mess held together by duct tape" kind of systems architecture that no one dares to touch for fear of breaking things.

I think Unix philosophy is struggling with a fundamental dilemma:

On one hand, creating systems from programs written by different people requires stronger formal guarantees in order to make interfaces more reliable, stronger guarantees than interfaces within one large program written by one person or a small team would require.

On the other hand, creating systems from programms written by different people requires more flexibile interfaces that can deal with versioning, backward and forward compatibility, etc, something that is extremely difficult to do across programming languages without heaping on massive complexity (CORBA, WS-deathstar, ...)

I think HTTP has shown that it can be done. But HTTP is also quite heavy weight. It doesn't exactly favor very small programs. Handling HTTP error codes is not something you'd want to do on every other function call.

In any event, I think Unix philosophy is a good place to start but needs a refresh in light of a couple of decades worth of experience.

Re: The Unix Philosophy

#33
post #13

This should be taught in any programming class. > Rule of Diversity: Distrust all claims for “one true way”. Although, does the python rule "There should be one-- and preferably only one --obvious way to do it." contradict this one ? > Rule 5. Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are ce…

> does the python rule "There should be one-- and preferably only one --obvious way to do it." contradict this one ? The irony is that Python has more ways of doing things in general and often the choice is very much non-obvious, compared to a language like Ruby which is supposedly embracing TIMTOWTDI. In other words, that Python rule doesn't match reality and I've always found it funny.

I thought the opposite for Ruby, for instance all those aliased methods on classes.

Re: The Unix Philosophy

#34
post #11
post #9

Earlier quoted context omitted.

Out of interest, what are these political views that are so terrible that they should influence our views of his thoughts on operating system design? Edit: I really don't have any idea what they are...

Among other unpopular opinions, ESR denies AGW, believes that race and IQ are correlated, and was strongly in favor of the Iraq war.

The first two are scientific, rather than political questions, aren't they?

Re: The Unix Philosophy

#35

the rule of separation makes me wonder if the long term legacy of Wayland will be as a hardware accelerated backend for X.

X as a protocol is long gone. Direct memory access, kernel drivers etc are not really compatible with network protocol. Wayland is just streamlining and formalizing current situation.

Re: The Unix Philosophy

#37
post #31

> The ‘Unix philosophy’ originated with Ken Thompson's early meditations on how to design a small but capable operating system with a clean service interface. Except that a program-to-program interface based on formatting and parsing text is anything but clean.

What do you mean by "text"?

Re: The Unix Philosophy

#38
post #11

Earlier quoted context omitted.

Among other unpopular opinions, ESR denies AGW, believes that race and IQ are correlated, and was strongly in favor of the Iraq war.

The first two are scientific, rather than political questions, aren't they?

Political in the sense that they have been politicized. And in the sense that a lot of people seem to believe the questions are Settled For Good, and anyone who disagrees with them is Just Plain Ignorant and/or Lying For Personal Benefit.

Re: The Unix Philosophy

#39

I wonder how relevant is it nowadays. Many good things we can't have, like systemd, if we have to follow strictly to the unix philosophy.

The principle stands just as it always has.

The Single responsibility Principle (SRP), interfaces, cohesion and coupling are all relevant patterns and techniques that also describe the same design ideas.

The UNIX philosophy is simply one example of the above principles implemented at a user interface level, but they apply equally well in low-level embedded code, and device drivers just as well as in desktop and server land.

Software complexity grows exponentially with the number of internal interactions. by reducing the scope of any given module, you greatly simplify it. Thinking about, designing and implementing fixed interfaces between small cohesive modules helps this process and you get much more simple (as in the Rich Hickey sense) software as a result.

These same principles pop up all over the place in software, the Unix Philosophy, SRP, Microservices... they're all manifestations of the same thing.

Re: The Unix Philosophy

#40

I keep wondering about what seems to be the most important component of Unix philosophy: write many small programs that do one thing well and interface using text streams! Yes, modularity is important. However, in some cases, this philosophy has resulted in the "tangled mess held together by duct tape" kind of systems architecture that no one dares to touch for fear of breaking things. I think Unix philosophy is stru…

The big problem I've found is serialization of sum types. thrift (or protobuf or any number of similar systems) is very good at serializing most of the data one tends to work with, with declarations that are suitably strict but easy to write. But it doesn't have a good way to represent "this field is an A or a B".
Post reply on HN