Hacker News new | ask | show | jobs
by mlatu 1302 days ago
hm, im a little unhappy about the author comparing Knuth's solution to a handfull of shell utilities.

for one, the author says knuths program written in WEB was 10 pages long, discounting the fact that these 10 pages are HEAVILY annotated.

my other point is:

tr has 1917 LOC,

sort has 4856,

uniq has 663

and sed is in its own package at around 10 MB

all including comments and docs for sed

it's fine and good that you can use composition with shell utilities, but come on, write that example program in C99 and you'll be a not very happy coder at all. in general i find the comparison rather rude. Knuth was supposed to show ?his? programming language WEB and as a "critique" McIlroy farts out a shellscript like "lmao first".

indeed, you do not often need to count word frequencies.

but what was this article supposed to be really about? software engineering 101 aka dont-reinvent-the-wheel/DRY?

or perhaps literate programming?

1 comments

Related: https://buttondown.email/hillelwayne/archive/donald-knuth-wa...

As you say, Knuth was asked to demonstrate his literate programming... In some ways this is a direct request for the non-pithy, articulated, first principles answer. I would more say Knuth was set up than that he was framed, but tomato-tomato. :)