Found in 4 comments on Hacker News
sn9 · 2023-12-30 · Original thread
A little known book that many might find interesting is Cristina Lopes's Exercises in Programming Style which takes a single problem and solves it in 40 different ways using Python. [0]

https://www.amazon.com/Exercises-Programming-Style-Cristina-...

taeric · 2023-06-05 · Original thread
Me thinks we see different naive python on the regular. Because I wouldn't be shocked to see many flat out failures.

That said https://www.amazon.com/Exercises-Programming-Style-Cristina-... is a good sized book that is nothing but takes on this program from different styles. It is amusing how far you can take that.

Which... is kind of the point of the Knuth solution here. It was a pedagogical exercise. As much to show how literate programs can be presented as it was to "solve" the stated problem.

Edit: It occurs to me you could be referring to the pipeline version. Which, yeah, I don't think that really changes my post. :D. The final paragraph would be changed to the point of the Milroy's code is to get the answer, not to have a library function that is expected to be used again and again on input.

henrik_w · 2018-12-17 · Original thread
There is also the book "Exercises in Programming Style" that uses the term frequency problem to illustrate 33 different programming paradigms (including a shell solution).

https://www.amazon.com/Exercises-Programming-Style-Cristina-...

Fresh book recommendations delivered straight to your inbox every Thursday.