On Sun, Jan 12, 2020 at 3:26 PM Doug McIlroy <doug(a)cs.dartmouth.edu> wrote:
> After scrolling through the command list, I
wondered how
> long it was and asked to have it counted. Easy, I thought,
> just pass it to a wc-like program. But "just pass it" and
> "wc-like" were not givens as they are in Unix culture.
> It took several minutes for the gurus to do it--without
> leaving emacs, if I remember right.
This is kind of illustrative of the '60s
acid trip that
perpetuates in programming "Everything's a string maaaaan".
The output is seen as truth because the representation is
for some reason too hard to get at or too hard to cascade
through the system.
How did strings get into the discussion? Warner showed how
emacs could be expected to do the job--and more efficiently
than the Unix way, at that: (list-length (command-list-fn)).
The surprise was that this wasn't readily available.
Bakul provided an explanation for the pipeline, the funny cue to me
that I interpreted from Warner's message is just that emacs had the
ability to do it in a coherent way but did not and ISTM that the way
you make a mess of that is by losing the intent of the representation.
I am regularly surprised by how surprising type systems are to
computing professionals. The language and environment may help or
dissuade you from doing that, wasn't really relevant to my original
point.
Larry tells me the message is somehow inflammatory, it wasn't intended
that way I was just trying to make light of the situation and provide
people a launch pad to think for themselves about some fundamentals
because it's worthwhile to do so occasionally.
Back then, in fact, you couldn't ask sh for its
command
list. help|wc couldn't be done because help wasn't there.
Emacs had a different problem. It had a universal internal
interface--lists rather than strings--yet did not have
a way to cause this particular list to "cascade through
the system". (print(command-list-fn)) was provided, while
(command-list-fn) was hidden.
The only response I can come up with to these two points eventually
boils down to a philosophical riddle: does the work matter or does
how the work is done matter? Both, the situation dictates. I execute
innumerable shell pipelines per day and perhaps craft a dozen
ephemerals ones.
Regards,
Kevin