News for hackers. Stuff that matters.
Re:Following the Unix philosophy without getting left-pad by Teongot on Thursday November 10, 2022 @02:39PM (#33551944)
What was the origin of the idea that the Unix philosophy is "do one thing and do it well"?

If anything, the UNIX philosophy is more like "do one thing, and do it to a text file".

Re:Following the Unix philosophy without getting left-pad by dementis on Thursday November 10, 2022 @03:01PM (#33552338)
If you look at the wiki on the UNIX philosophy it does say "Store data in flat text files" and "Write programs to handle text streams, because that is a universal interface."

You can do a surprising amount with flat files. For decades HP / HPE has been using flat files for Serviceguard / SGLX which is a high-availability cluster software that gets used in some very large Enterprise environments.

Re:Following the Unix philosophy without getting left-pad by a1369209993 on Thursday November 10, 2022 @04:22PM (#33553582)
> You can do a surprising amount with flat files.

For example, tables in relational databases like sqlite are representationally isomorphic to tabular files like the output ls -al. Sqlite has a lot of useful performance optimizations (including eg, not having to encode strings as "\x20" or the like if you want arbitrary bytes), but those come at the cost of a data format that you can't easily (not even notice that you needed to and did) reverse engineer when writing new software to consume or emit it, or even just visually inspecting it in a editor that doesn't already speak that format.

Re:Following the Unix philosophy without getting left-pad by Avshalom on Thursday November 10, 2022 @07:25PM (#33555754)
you can do anything with (flat|text) files, they are after all just an often inefficient binary encoding the same as any other binary blob.

The main thing you can do with them though, is tell yourself that you don't really need a spec or documentation because you can just eyeball the output, and not having to follow a spec makes things feel simple.

Re:Following the Unix philosophy without getting left-pad by TylerE on Thursday November 10, 2022 @03:24PM (#33552746)
do one thing, and do it with a file handle.
Re:Following the Unix philosophy without getting left-pad by jbverschoor on Thursday November 10, 2022 @04:17PM (#33553505)
aka functional
Re:Following the Unix philosophy without getting left-pad by marginalia_nu on Friday November 11, 2022 @12:47AM (#33557691)
Really though?
Re:Following the Unix philosophy without getting left-pad by dctoedt on Thursday November 10, 2022 @03:55PM (#33553213)
> What was the origin of the idea that the Unix philosophy is "do one thing and do it well"?

Relatedly: Brian Kernighan's Unix: A History and a Memoir was an enjoyable read.

https://www.amazon.com/UNIX-History-Memoir-Brian-Kernighan/d... (not an affiliate link).