[TUHS] dmr note on BSD's sins

Random832 random832 at fastmail.com
Sat May 6 00:01:55 AEST 2017


On Thu, May 4, 2017, at 19:14, Larry McVoy wrote:
> On Thu, May 04, 2017 at 03:59:22PM +0100, Tim Bradshaw wrote:
> > On 3 May 2017, at 14:41, Nemo <cym224 at gmail.com> wrote:
> > > 
> > > Along these lines, who said "Cat went to Berkely, came back waving flags."
> > 
> > And anyone who lived through the SunOS 4 -- SunOS 5 transition will know that some of those Berkeley flags (not specifically for cat, but almost certainly including those for cat) were really quite useful.  I remember spending really a long time finding and building BSD/GNU versions of utilities which actually had the options you needed on early SunOS 5 machines: later on Sun themselves put some of them back.

I mean, there's a legitimate argument that some of them would have been
just as useful or more as separate utilities than as flags. But to some
extent the fully generalized version seems questionable.

I mean, to apply the design philosophy to, say, ls -t (nevermind that
this particular flag has in fact existed since Unix V1, it's exactly the
*kind* of thing that should prompt someone who is consistently applying
Pike's idea of the unix philosophy to say "sorting should be the sort
tool"), you would have to have A) a basic "ls" command which does all
the filesystem-accessing work and prints timestamps and all other
relevant output in a format that can be sorted lexicographically, B) run
it through sort(1), C) a command [or maybe an awk script] that will pare
it back down to the usual human-readable formats (names only, ls -l, or
maybe a timestamp-and-name format, with human-friendly timestamps). And
then D) another tool to sort it into columns.

And you'd have to type in all of those every time you want a directory
listing, or maybe have it packaged up in a script (which would then need
a name, and unique names for every combination of behaviors you might
want to use).

At that point, who gets to decide that ls -t is useful enough to be
"proper unix" but cat -v is "some ridiculous idea from berkeley"?



Anyway, on the original subject of unlimited symbol name and filename
lengths - ultimately there's a tradeoff - your symbols or filenames
probably don't have to get very large before it makes more sense to use
a variable-length format to save space, and the smallest reasonable
limit for a variable-length format is 255.


More information about the TUHS mailing list