On Thu, Jul 15, 2021 at 6:00 PM Douglas McIlroy <
douglas.mcilroy(a)dartmouth.edu> wrote:
I'm showing my age. tail -f antedated select(2)
and was implemented
by alternately sleeping and reading. select(2) indeed overcomes that
clumsiness.
A fd at EOF is considered by select and friends to be ready, as it is
possible to read from it without hanging.
-r came from Bell Labs. This reinforces the point that
the ancients
had their imperfections.
A Unix zealot, having heard that Master Foo was wise in the Great Way, came
to him for instruction. Master Foo said to him:
“When the Patriarch Thompson invented Unix, he did not understand it. Then
he gained in understanding, and no longer invented it.”
“When the Patriarch McIlroy invented the pipe, he knew that it would
transform software, but did not know that it would transform mind.”
“When the Patriarch Ritchie invented C, he condemned programmers to a
thousand hells of buffer overruns, heap corruption, and stale-pointer bugs.”
“Truly, the Patriarchs were blind and foolish!”
The zealot was greatly angered by the Master's words.
“These enlightened ones,” he protested, “gave us the Great Way of Unix.
Surely, if we mock them we will lose merit and be reborn as beasts or
MCSEs.”
“Is your code ever completely without stain and flaw?” demanded Master Foo.
“No,” admitted the zealot, “no man's is.”
“The wisdom of the Patriarchs” said Master Foo, “was that they *knew* they
were fools.”
Upon hearing this, the zealot was enlightened.