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.
There's a total comedy of work going on in the unix way of a wc
pipeline versus calling a length function on a list. Nonetheless, the
unix pipeline was and is often magnitude easier for a single user to
get at. This kind of thing is amusing and endearing to me about our
profession in modern day.
Regards,
Kevin
On Sun, Jan 12, 2020 at 9:57 AM Warner Losh <imp(a)bsdimp.com> wrote:
On Sun, Jan 12, 2020 at 6:44 AM Doug McIlroy <doug(a)cs.dartmouth.edu> wrote:
Mention of elevators at Tech Square reminds me of visiting there
to see the Lisp machine. I was struck by cultural differences.
At the time we were using Jerqs, where multiple windows ran
like multiple time-sharing sessions. To me that behavior was a
no-brainer. Surprisingly, Lisp-machine windows didn't work that
way; only the user-selected active window got processor time.
The biggest difference was emacs, which no one used at Bell
Labs. Emacs, of course was native to the Lisp machine and
provided a powerful and smoothly extensible environment. For
example, its reflective ability made it easy to display a
list of its commands. "Call elevator" stood out amng mundane
programmering actions like cut, paste and run.
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.
It should have been something like (list-length (command-list-fn)) but I'll bet
that ? was bound to a complicated function that just displayed the results and didn't
properly abstract out the UI (printing) from the data collection (getting a list), which
is what made it so hard. I've had so many gnu emacs experiences like this over the
years, but to the community's credit, there's fewer and fewer as time goes by.
ObUnix: This shows the power of having the right abstractions and being disciplined to
code to those ideal abstractions any time there might be reuse...
Warner