3 ms·
The story, as a dialogue: Knuth: I've come up with an idea I like, called literate programming, and a system called WEB. I wrote TeX in WEB. Bentley: I took a
by svat 3y ago
The story, as a dialogue:
Knuth: I've come up with an idea I like, called literate programming, and a system called WEB. I wrote TeX in WEB.
Bentley: I took a look, and I love it! But TeX is 600 pages long; could you give me a WEB example of a few pages, that I can publish in my magazine column?
Knuth: Sure, but that would be too easy: why don't YOU tell me what program to write in WEB?
Bentley: Ok, write me a WEB program to find the top K most common words in a text file.
Knuth: Sure, here's a WEB program for the problem, as you asked. It's long enough that your readers can see the main features of WEB, and I also came up with a new data structure so that everyone learns something.
Apparently, according to many commentators (such as the linked post), Knuth ought to have instead replied with something like:
Knuth: Ok, well, you asked me to write a program to illustrate WEB, but actually… Most of your readers won't know this, because it's still 1986, but if they go to a place like Bell Labs they can find the Unix operating system, where Doug McIlroy has come up with a system for combining programs called Unix pipelines, and other people have already written text-processing programs with names like 'tr', 'sort' and 'uniq' (you can look up what they do). So, if any of your readers is using such a system, they can just use those pre-existing programs with an appropriate pipeline. Ta-da! Even though this solution is much slower, I'm sure you won't mind that I didn't give you a WEB program for your column as you asked.
This reply would make no sense! Only with a game of telephone/whispers does the story become cast as a "competition". Anyway, for completeness, the rest of the story was:
Bentley: Thank you for your program. I've asked Doug McIlroy to write a review.
McIlroy: (After writing the review.) BTW, our Unix land is awesome, we have this thing called pipes; we could solve this problem with just…
A couple of previous discussions (there have been many):
https://news.ycombinator.com/item?id=31301777 https://news.ycombinator.com/item?id=31301777 - Donald Knuth was framed (2020)
| May 2022 | 137 comments
https://news.ycombinator.com/item?id=30017311 https://news.ycombinator.com/item?id=30017311 - More shell, less egg (2011) | Jan 2022 | 24 comments
https://news.ycombinator.com/item?id=22406070 https://news.ycombinator.com/item?id=22406070 - Donald Knuth was framed | Feb 2020 | 183 comments