Live data from Hacker News

The Rule of Silence (2006)

linfo.org

221–230 of 318 posts

Re: The Rule of Silence (2006)

#221

Earlier quoted context omitted.

Well, I'm advocating for structured text , not binary . Mostly because I haven't seen a future-proof binary format yet, and editing binary formats indeed would require special tooling. I think - for a data exchange protocol meant to be used between many applications - going structured text instead of binary is a worthwhile tradeoff of little lower efficiency vs. much better accessibility. EDIT: Some comments here are…

Can you name me a single UNIX configuration file whose format is not "structured"?

Config files are less of a problem. The issue is with programs, which you want to use with pipes. Each has its own undocumented, arbitrary pseudo-structure with often inconsistent semantics, optimized for viewing by user.

Re: The Rule of Silence (2006)

#222
post #213

Earlier quoted context omitted.

Here's mine: examples () { man $1 | less +/^EXAMPLES } Usage: $ examples su EXAMPLES su -m man -c catman Starts a shell as user man, and runs the command catman. You will be asked for man's password unless your real UID is 0. Note that the -m option is required since user “man” does not have a valid shell by default. In this example, -c is passed to the shell of the user “man”, and is not interpreted as an argument t…

You probably still want the MAN_KEEP_FORMATTING=1 part, to keep colorization and bolding etc. in the manual page. Also, your solution does not respect the user’s pager preference; the user might prefer to read man pages in “w3m”, for instance.

>You probably still want the MAN_KEEP_FORMATTING=1 part, to keep colorization and bolding etc. in the manual page

Underlining is the only formatting I care about and that works without MAN_KEEP_FORMATTING on FreeBSD.

I don't have colorization enabled in man pages on my laptop, and also I don't have bolding enabled either. I like it this way.

>your solution does not respect the user’s pager preference; the user might prefer to read man pages in “w3m”, for instance.

The pager preference of the user in this case is `less`. I know because the user happens to be myself :^)

Re: The Rule of Silence (2006)

#223
post #171

Earlier quoted context omitted.

> ...So you're talking about having text-serialized key-value objects (or any other kind of object), with standard deserializers and tools for manipulation? Yes, basically. Someone in power should just pick any format - modified JSON (without the integers are really IEEE754 floats stupidity), s-expressions, whatever - and make standard deserializers part of the system library.

Heh heh, "someone in power." Who would that be? There's no authority to complain to about all this... Structured text formats come and go: S-expressions, SGML, XML, JSON, "modified JSON", etc etc etc... Fortunately the Unix tools work the same with any byte stream, pretty much, so they've survived gloriously since the 1970s. That's kind of the whole deal with "worse is better."

> There's no authority to complain to about all this...

Whoever accepts patches to base UNIX system libraries would be a good start.

> Fortunately the Unix tools work the same with any byte stream, pretty much, so they've survived gloriously since the 1970s.

So would a structured text format, except you wouldn't be discarding and then recreating semantic information at every junction of a pipe.

Re: The Rule of Silence (2006)

#224

Earlier quoted context omitted.

In 1993, someone made exactly your argument a in Redmond board room, and so many people agreed that what you describe could be adequately called "The Windows Philosophy". All settings in a database and not text files (the registry); a command-line that pipes data, not text (PowerShell). Tailored UIs to change settings, not magic invocations and obsure text file syntaxes. I guess most developers on HN are also aware o…

The windows registry is not too bad. You can easily store this stuff in a SQLite file though: https://www.sqlite.org/appfileformat.html PowerShell' object-oriented nature is great btw!

Yep, it's really ground breaking stuff[1]

It actually is really good, but I do find it interesting that the first and last loser of the desktop wars got there a good long time ago.

[1] https://en.wikipedia.org/wiki/Workplace_Shell , https://en.wikipedia.org/wiki/Object_REXX

Re: The Rule of Silence (2006)

#225
post #74

To play devil's advocate, part of the reason things like The Rule of Silence are talked about is because of the messy unix philosophy of treating everything like plain text. If structured data was embraced we would have developed appropriate tooling to interact with it in the way that we prefer. This runs very deep in unix and a lot of people are too "brainwashed" to think of other ways. Instead they develop other ex…

I was on Windows for about 20 years and moved to Linux about a year ago. One thing I happen to like the most in Linux is file-based configuration. If you add a settings-database to Linux you would end up with the same mess that you find in Windows. In Windows you have the Registry (a giant database for OS and app settings) AND you have the config files. Great... settings are spread over a gigantic db AND the file-sys…

Don't forget group policies (2 or 3 layers of those, iirc)!

Re: The Rule of Silence (2006)

#226
post #24

It's often a stupid rule. If you have a process that is stuck, you type "kill " to kill it. But kill doesn't tell you if the process was killed or not, so you have to double-check with "ps " to see if it is still alive. If it is, you try again with "kill -9 ". I suspect the reason is that for most signals, kill can't determine if the signal was acted upon or not. But for KILL and TERM it could wait a few milliseconds…

> "those who are saying that I can write a wrapper script is missing the point" No, it is exactly the point. Unix gives you Lego pieces to build things from. A bunch of small Lego pieces you can join however you like is way more useful than a giant chunk of Lego that someone has glued together into whatever lump they happened to need that day. When you ask why your Lego bucket didn't ship with pieces preglued into ex…

I use computer to get shit done (tm). If I wanted to play with Lego, I'd go play with Lego instead. Yes I know I can write a wrapper, but why should I? Those who are bothered by kill spewing extra messages can also write a wrapper or use the damn C compiler and write their own kill utility.

That way, everybody wins. Both those who don't like Lego playing (me) and those who do (you).

> If that wasn't what you wanted, perhaps consider a different kind of toy?

I'd switch from GNU/Linux to something with a more sane design in a heartbeat! Unfortunately for me, the only free operating system began life as a Unix-clone. Thanks to an historical artifact more than a testament to the greatness of the "Unix philosophy".

Fortunately for me, there are a lot of people who have understood that thinking of an operating system as a jumbled bag of Lego bricks doesn't lead to good system design and are doing something about it (systemd and many more projects).

Re: The Rule of Silence (2006)

#227
post #74

To play devil's advocate, part of the reason things like The Rule of Silence are talked about is because of the messy unix philosophy of treating everything like plain text. If structured data was embraced we would have developed appropriate tooling to interact with it in the way that we prefer. This runs very deep in unix and a lot of people are too "brainwashed" to think of other ways. Instead they develop other ex…

The thing about today's Unix Philosophy, epitomized by both the BSDs and Linux is that it's backward-looking. There's a Garden of Eden myth and everything. Look at the reaction to systemd. I remember getting fairly excited when Apple OSX first came out and quite a few of the configuration files were XML-based. Finally, a consistent format, but it wasn't pervasive enough. Even Apple couldn't see fit to break with the…

I would be so excited to see new operating systems which depart from POSIX completely and introduce new abstractions to replace the dated notions of hierarchical filesystems, terminals, shells, shared libraries, IPC, etc. The sad truth is that everyone targets POSIX because there is so much software that can be ported in order to make the system usable.

Re: The Rule of Silence (2006)

#228

Earlier quoted context omitted.

In 1993, someone made exactly your argument a in Redmond board room, and so many people agreed that what you describe could be adequately called "The Windows Philosophy". All settings in a database and not text files (the registry); a command-line that pipes data, not text (PowerShell). Tailored UIs to change settings, not magic invocations and obsure text file syntaxes. I guess most developers on HN are also aware o…

The philosophy sounds great. Maybe the downsides are because of the execution?

Yeah, the registry has been solid for years now, which pretty clearly shows that the troubles were in implementation and not the philosophy. And powershell's object-passing has been pretty great from the start, so I'm not even sure how that's an argument against.

Re: The Rule of Silence (2006)

#229
post #57
post #24

It's often a stupid rule. If you have a process that is stuck, you type "kill " to kill it. But kill doesn't tell you if the process was killed or not, so you have to double-check with "ps " to see if it is still alive. If it is, you try again with "kill -9 ". I suspect the reason is that for most signals, kill can't determine if the signal was acted upon or not. But for KILL and TERM it could wait a few milliseconds…

> It's often a stupid rule. By the way, I haven't down-voted you, but I think I understand why others did. Before calling stupid a pillar of a (programming) philosophy with decades of useful outcomes, you should stop and ask yourself whether it's just a matter of taste on your side or, even more likely, of ignorance.

I think it's great that someone is questioning the way things have always been done, even it's just by calling it stupid. The hard part is coming up with something better. Unix at its core is still a product of the computing environment of the early 1970s. Not only that, it was a reaction to the complexity of Multics. What gave Unix an advantage at the time was how relatively easy it was to port to other architectures and how few resources it required. Universities and businesses could run it on cheap $50,000 minicomputers. It eventually outgrew a lot of its origins, but still. The rule of silence makes the most sense on a slow terminal or a teletype. Verbosity is wasteful and time-consuming in that environment.

Re: The Rule of Silence (2006)

#230

Earlier quoted context omitted.

Can you name me a single UNIX configuration file whose format is not "structured"?

Config files are less of a problem. The issue is with programs, which you want to use with pipes. Each has its own undocumented, arbitrary pseudo-structure with often inconsistent semantics, optimized for viewing by user.

What programs are you thinking of? Maybe this is my sysadmin bias but about 90% of my UNIX tools usage is on config files...
Post reply on HN