Live data from Hacker News

The Art of Computer Programming by Donald E. Knuth

www-cs-faculty.stanford.edu

41–50 of 64 posts

Re: The Art of Computer Programming by Donald E. Knuth

#41
post #21

After years of dipping into random chapters for reference I read through the first 2.5 volumes sequentially until life got too busy. I plan on gifting the current full set to myself this xmas- but even if you just dip into it like a coffee table book it’s a wonderful read that breaks up tough sections with humor.

For a fun joke, check the index entry for "Royalties, use of" --- it points to a graph which is evocative of the layout of the pipe organ in his home which was funded by TAoCP book sales.

Re: The Art of Computer Programming by Donald E. Knuth

#42
post #32

Latest Knuth preprint: "Fillomino Densities", dated 2026-07-01 From a previous preprint titled "Claude’s Cycle", dated 2026-02-28 [2]: It seems that I’ll have to revise my opinions about “generative AI” one of these days. What a joy it is to learn not only that my conjecture has a nice solution but also to celebrate this dramatic advance in automatic deduction and creative problem solving. I’ll try to tell the story…

And he closes [2] with “May the force be with you”

Very interesting that he seems to be in the camp of “It’s ok if the machines prove it as long as we can understand and formally verify it after.”

Re: The Art of Computer Programming by Donald E. Knuth

#43
post #30

From Future Plans... > And after Volumes 1--5 are done, God willing, I plan to publish Volume 6 (the theory of context-free languages) and Volume 7 (Compiler techniques), but only if the things I want to say about those topics are still relevant and still haven't been said. Volumes 1--5 represent the central core of computer programming for sequential machines; the subjects of Volumes 6 and 7 are important but more s…

Not to forget he was asked specifically to write a book about compilers (= "Volume 7") by Addison Wesley in the 1960s.

Now, half a century later, he is chickening out...

Re: The Art of Computer Programming by Donald E. Knuth

#44
post #20

The valuable prose aside, I never liked that code examples were in a pseudo assembly language.

I agree with that opinion. He started writing TAOCP in 1968, and could have switched to Pascal in 1972.

Pascal is simple and clear, and can be translated easily to anything from LISP, Fortran, Python to C or C++ (in fact, subsets of Pascal are often used as sample language in books about compilers, including in Pascal inventor N. Wirth's own compiler book (which, unlike Knuth's, was completed timely):

Wirth, Niklaus, Compilers (1996), 101pp., 2rd revision, 2017, online: https://people.inf.ethz.ch/wirth/CompilerConstruction/Compil..., last accessed 2026-07-07).

It does not matter that Pascal is not much in use anymore, because due to its readability, it's timeless. It nearly reads like English prose, yet is automatically executable. It has also been standardized, and there is a book-sized language description available, as are several -- commercial and open source -- implementations.

In contrast, his pseudo-assembler is arcane. Whenever I wanted to implement an algorithm following Knuth TACOP, I had to work off his English pseudo-code description rather than the associated pseudo-assembler code.

Re: The Art of Computer Programming by Donald E. Knuth

#45

Earlier quoted context omitted.

Well, even as-is, it turns out that the kind of assembly language that Knuth originally wrote it in itself had a very short lifespan. MIX assumes a single accumulator register for arithmetic, which hasn't been a common processor architecture since around the 1980s. MMIX is redesigned to be more RISC, but it also uses a dynamic register window concept (which itself I think was only used on Itanium, and we all know how…

Sparc and Xtensa also have register windows, although each has a slightly different implementation. They were all the rage for a while, because they make procedure calls fast but turn out to have subtle issues in highly-multithreaded scenarios.

The Sparc and Xtensa register windows are fixed-size, not dynamic like Itanium's.

Re: The Art of Computer Programming by Donald E. Knuth

#47
post #46

Receiving one of Don's cheques ("Bank of San Serif" ;-) a few months after pointing out an error has been many a computer scientist's career highlight!

Congrats! I have two, both for the much easier task of doing bibliographic work for the books.

Re: The Art of Computer Programming by Donald E. Knuth

#49

Earlier quoted context omitted.

consider the alternatives. it could have been written in PL-1 and rapidly become dated. or it could have been written in a slightly higher level custom language and that would also have to be taught and would be less clear about what was going on under the hood. or a kind of pseudo-code that would also admit ambiguity. or it could have been rewritten in pascal, and then java, and then javascript and then rust. given…

Well, even as-is, it turns out that the kind of assembly language that Knuth originally wrote it in itself had a very short lifespan. MIX assumes a single accumulator register for arithmetic, which hasn't been a common processor architecture since around the 1980s. MMIX is redesigned to be more RISC, but it also uses a dynamic register window concept (which itself I think was only used on Itanium, and we all know how…

MMIX uses register windows to make stack frame pointer offsets unnecessary when referring to PUSHed arguments. Don is trying to make the algorithms understandable and correct, and by hiding some details that are handled efficiently by compilers (keeping track of FP and offsets), it benefits the human reader.

Don's first computer was the IBM 650 https://en.wikipedia.org/wiki/IBM_650?useskin=vector see also http://ed-thelen.org/comp-hist/KnuthIBM650Appreciation.pdf so MIX was a simplified version of the 650 because, well, it's well-defined and simple -- and Don knew a popular IBM machine very well. And there's this, in Vol 1:

This series of books is affectionately dedicated to the Type 650 computer once installed at Case Institute of Technology, in remembrance of many pleasant evenings.

MMIX is for all you youngsters who think RISC is all the rage ;-) and I think he does an admirable job creating a fully-defined machine that does use more modern hardware techniques. The fact that he fully defines his underlying machine is exactly correct, because it lays the foundation for precisely expressing the algorithms, and for giving Time and Space (runtime) estimates.

I believe it's fundamentally incorrect to think of these abstract machines as 'assembly language' but rather, I think, they define a stable foundation onto which accurately described algorithms can be expressed. You're supposed to 'play computer' and follow along -- step by step -- to understand the deep details of the algorithms.

Re: The Art of Computer Programming by Donald E. Knuth

#50
post #20

The valuable prose aside, I never liked that code examples were in a pseudo assembly language.

It's the only thing he could've done if he wanted the books to stand the test of time

No, a useful language can be just as understandable in the far away future, but also way more approachable in the now/near future
Post reply on HN