Slashdot Mirror


Knuth Releases Another Part of Volume 4

junge_m writes "Donald Knuth has released another of his by now famous pre-fascicles to Volume 4 of his epic: Pre-fascicle 2c is all about 'Generating all Combinations' supplementing his pre-fascicles 2a and 2b. Furthermore he challenges us all to do more of his daunting exercises and report our success. He thinks we are way too lazy in this respect! So come on slashdot crowd: Do your homework and get the credit from the grandmaster himself!"

10 of 248 comments (clear)

  1. A series of books like this for higher lvl coding? by ovapositor · · Score: 5, Interesting

    The main reason that I have been hesitant to purchase and slog through these books has been the fact that they are written with an outdated assembly language for a non existant processor. I realize that the point is to learn these algorithms, however, since I rarely if ever code on that level any longer, is there an alternative? Something using a language like Java, Python, or even, ack! , 'C' would be more to my liking.

    No flames please. This is just an honest question.
    Thanks

  2. Re:A series of books like this for higher lvl codi by biglig2 · · Score: 5, Insightful

    Knuth's own reply to this question can be seen at http://www-cs-faculty.stanford.edu/~knuth/mmix.htm l.

    To quote:

    "Many readers are no doubt thinking, 'Why does Knuth replace MIX by another machine instead of just sticking to a high-level programming language? Hardly anybody uses assemblers these days.'

    Such people are entitled to their opinions, and they need not bother reading the machine-language parts of my books. But the reasons for machine language that I gave in the preface to Volume 1, written in the early 1960s, remain valid today:

    One of the principal goals of my books is to show how high-level constructions are actually implemented in machines, not simply to show how they are applied. I explain coroutine linkage, tree structures, random number generation, high-precision arithmetic, radix conversion, packing of data, combinatorial searching, recursion, etc., from the ground up.
    The programs needed in my books are generally so short that their main points can be grasped easily.
    People who are more than casually interested in computers should have at least some idea of what the underlying hardware is like. Otherwise the programs they write will be pretty weird.
    Machine language is necessary in any case, as output of many of the software programs I describe.
    Expressing basic methods like algorithms for sorting and searching in machine language makes it possible to carry out meaningful studies of the effects of cache and RAM size and other hardware characteristics (memory speed, pipelining, multiple issue, lookaside buffers, the size of cache blocks, etc.) when comparing different schemes.
    Moreover, if I did use a high-level language, what language should it be? In the 1960s I would probably have chosen Algol W; in the 1970s, I would then have had to rewrite my books using Pascal; in the 1980s, I would surely have changed everything to C; in the 1990s, I would have had to switch to C++ and then probably to Java. In the 2000s, yet another language will no doubt be de rigueur. I cannot afford the time to rewrite my books as languages go in and out of fashion; languages aren't the point of my books, the point is rather what you can do in your favorite language. My books focus on timeless truths. "

    --
    ~~~~~ BigLig2? You mean there's another one of me?
  3. use GCC by johnjones · · Score: 5, Informative

    just code it in C and then use gcc targeted at mmix to see the assembly and compare them with what he wrote(some of the time it wont be the same if ever because of register alocation but you get the point)

    regards

    john 'mips64' jones

  4. Re:A series of books like this for higher lvl codi by gripdamage · · Score: 5, Informative

    It's still probably helpful to know where you can obtain and learn to use a MIPS VM. Check out the GNU MDK manual Contains the MIX instruction set and a programming tutorial, as well as documentation on using the VM itself.

    For the intro:

    In his book series The Art of Computer Programming (published by Addison Wesley), D. Knuth uses an imaginary computer, the MIX, and its associated machine-code and assembly languages to ilustrate the concepts and algorithms as they are presented.

    The MIX's architecture is a simplified version of those found in real CISC CPUs, and the MIX assembly language (MIXAL) provides a set of primitives that will be very familiar to any person with a minimum experience in assembly programming. The MIX/MIXAL definition is powerful and complete enough to provide a virtual development platform for writing quite complex programs, and close enough to real computers to be worth using when learning programming techniques. At any rate, if you want to learn or improve your programming skills, a MIX development environment would come in handy.

    The MDK package aims at providing such virtual development environment on a GNU box. Thus, MDK offers you a set of utilities to simulate the MIX computer and to write, compile, run and debug MIXAL programs.

  5. rats! by cowtamer · · Score: 5, Funny

    I was actually hoping for this.

  6. Re:This guy is hard core by Mr+Guy · · Score: 5, Insightful

    He is beyond hardcore. To explain Donald Knuth's relevance to computing (and geeks should all know who he is) is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.

    Reading the Art of Computer Programing is like translating the Bible from the original greek. You know there is something profound there, but until you've done it a few times and looked back on it, you are more concerned with trying to figure out each word.

    I'm a little awestruck by him.

    By the way, the Paul reference is not a flippant one, check out his other books,Things a Computer Scientist Rarely Talks About , and 3: 16: Bible Texts Illuminated, for explanations of why not every christian is a fool.

  7. TeX by mikeee · · Score: 5, Interesting

    My favorite Knuth quote, when he gave a class a snippet of code to use in their program (not verbatim, sorry):

    "Be careful with this code; I have only proven it correct, not tested it."

    A demonstration of Hacker Nature:

    He wasn't happy with the typesetting on his first book, and decided this should be done by computer, so he wrote a markup language for typesetting.

    Of course, he wanted to do it right, so this took him... well... about a decade. And when he was done, he had written TeX. He was very pleased; his publishers thought this was odd, as the new typesetting looked worse than the old.

    A few years later, high-resolution laser printers became available; TeX already suppported them, and lo and behold, the new version did look better.

    TeX is a huge monster of a programming language/application. Knuth offered a cash prize of $(2^N) for the Nth unique bug report. TeX is now, like, 20 years old, and that system cost him under $1K.

    If programmers were Jedi, he would be Yoda.
    If programmers were wizards, he was be Gandalf.

    He is the serious, friendly grandfather who can kick the butts of all us whippersnapers. So pay attention!

    1. Re:TeX by crsm · · Score: 5, Interesting

      TeX is a huge monster of a programming language/application. Knuth offered a cash prize of $(2^N) for the Nth unique bug report. TeX is now, like, 20 years old, and that system cost him under $1K.

      Take a look at the version number of TeX: 3.14159 ('tex --version'). Each release adds a new digit towards Pi and someday when he dies the release number will be bumped to be exactly Pi. After that every new bug will be declared a feature :-) Another program of his (the name escapes me) progress the in the same way towards the base of the natural logarithm e.

    2. Re:TeX by red_crayon · · Score: 5, Informative

      Another program of his (the name escapes me) progress the in the same way towards the base of the natural logarithm e.

      That would be METAFONT. It's a companion program to TeX, for making fonts.

      --
      "Never bullshit a bullshitter" All That Jazz
  8. Re:A series of books like this for higher lvl codi by Reality+Master+101 · · Score: 5, Funny

    A friend of mine suggested printing post-it notes with Java code to paste over MIX code in the tAoCP.

    Suggesting that Knuth should implement his algorithms in Java is the strongest argument for MIX I've ever heard.

    --
    Sometimes it's best to just let stupid people be stupid.