TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Donald Knuth – The Patron Saint of Yak Shaves (2017)

431 pointsby rdpintqogeogsaaover 3 years ago

24 comments

drfuchsover 3 years ago
This and more. The Sail version of TeX is mentioned, but everything else had a usable prototype, too: An early version of Metafont in Sail, an early version of Web (called Doc, though I don’t recall what the names of the Tangle and Weave equivalents were), and an early version of Computer Modern fonts in the early Metafont language.<p>Though fully documented and available via anonymous FTP on the Arpanet, all of these prototypes were experimental proofs-of-concept and were completely discarded, along with the languages they implemented, with the “real” versions rewritten from scratch by Knuth (each first by hand on legal pads, then typed in and debugged as a whole.)<p>And you missed one more obscure but instructive example: To get the camera-ready copy for ACP Vol 2, Knuth purchased an Alphatype CRS phototypesetter. And, unhappy with the manufacturer’s firmware, he rewrote the 8080 code that drives the thing. Eight simultaneous levels of interrupts coming from various subsystem: the horizontal and vertical step-motors that you had to accelerate just right, while keeping synchronized with four S100 boards that generated slices of each character in realtime from a proprietary outline format, to be flashed into the lens just as it was passing the right spot on the photo paper. (Four identical boards, since you had to fill the second while the first one did its processing; times two for two characters that might overlap due to kerning). Oh, and you had to handle memory management of the font character data since there wasn’t enough RAM for even one job’s worth (see our joint paper).<p>Fun times. I did the driver on the mainframe side, so got to be there for the intense debugging sessions that used only the CRS’s 4x4 hex keypad and 12-character dot-matrix display.<p>Thanks for the DVI shout-out, btw.
评论 #29862652 未加载
评论 #29862534 未加载
评论 #29867116 未加载
评论 #29862569 未加载
projektfuover 3 years ago
I think, though, that there was nothing preventing him from developing TeX in Fortran or something, and leaving it at that. He is just somewhat easily distracted. He nerd-snipes himself possibly.<p>Yak Shaving is the frustrating work we do because of impedance mismatch in the system. Libtool is a huge yak shave, for example. But so is writing a custom CSV parser because an input file is just not quite accessible by the standard, and you could just use python to make the translation, but your environment won&#x27;t let you use python in that spot, etc. Days later nothing is really accomplished, you hate programming, and you can finally start work on the real problem after losing the motivation you had when you started.<p>But I like the idea of a patron saint for this, and Knuth is as good as any. Perhaps Dijkstra could be the patron saint of Unused Better Solutions. I&#x27;m sure there&#x27;s a litany of things that could use saints in this field.
评论 #29871319 未加载
评论 #29864879 未加载
kamranjonover 3 years ago
I follow the folks over at 100 rabbits (<a href="https:&#x2F;&#x2F;100r.co" rel="nofollow">https:&#x2F;&#x2F;100r.co</a>) and I think they’ve sort of developed yak shaving into a lifestyle.<p>I don’t want to go too far into it cause the website is a treasure trove and exciting to explore on your own but if you follow some of their latest stuff, they’ve built a stack based virtual machine, and a whole set of software around it and it truly feels like they are just exploring every avenue that interests them without rushing themselves. Truly the embodiment of my grow a beard and learn Haskell dreams.
评论 #29872243 未加载
qnttyover 3 years ago
The Art of Computer Programming itself is a yak shave. Knuth was originally going to write a book on compilers, but he realized that he needed to cover some prerequisites first, and that became TAOCP.
评论 #29865437 未加载
PaulDavisThe1stover 3 years ago
Granted, there is a substantial degree to which font design has a strong subjective element (even though there are some non-subjective metrics that must be met too). However, the font that emerged in &quot;Yak shave #4&quot;, Computer Modern, manages (for me) to pull off a somewhat exceptional double feat. On the one hand, it is to my eyes one of the ugliest fonts designed during the 20th century; on the other, my experience of it as a reader (hence again, my eyes) is that it is one of the easiest to read fonts ever created. I assume that DK found CM to be both beautiful and readable, which is fine, but I think it&#x27;s even more remarkable that he could have created a font that someone with a modicum of interest in font design and typesetting could find both ugly and very readable.
评论 #29865870 未加载
评论 #29866534 未加载
评论 #29865511 未加载
评论 #29866507 未加载
评论 #29867089 未加载
chubotover 3 years ago
Great post! I just dug up this informative comment by @svat from 3 years ago on the Pascal to C conversion, for anyone who&#x27;s interested:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16526151" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16526151</a><p><i>Today, major TeX distributions have their own Pascal(WEB)-to-C converters, written specifically for the TeX (and METAFONT) program. For example, TeX Live uses web2c[5], MiKTeX uses its own “C4P”[6], and even the more obscure distributions like KerTeX[7] have their own WEB&#x2F;Pascal-to-C translators. One interesting project is web2w[8,9], which translates the TeX program from WEB (the Pascal-based literate programming system) to CWEB (the C-based literate programming system).</i><p><i>The only exception I&#x27;m aware of (that does not translate WEB or Pascal to C) is the TeX-GPC distribution [10,11,12], which makes only the changes needed to get the TeX program running with a modern Pascal compiler (GPC, GNU Pascal).</i><p>...<p>I may write a blog post on this since it&#x27;s relevant to how <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;</a> is written in a set of Python-based DSLs and translated to C++.
评论 #29866876 未加载
yannisover 3 years ago
It is an entertaining article, but I am not too sure if I agree that Knuth was yak shaving. However by luck, inspiration, conviction or observation he understood what makes a program last. You focus on one thing and you do it well. On the way you resolve all the problems. He famously said that at first he had one user: himself but then things were different when he had 1000 users. At that stage you need to remove bugs and hence his famous checks rewarding people that reported bugs. When your user base grows allow them to extend the program through their own code. I also think that the program adapted well, throughout the four decades of its usage due to the well thought level of abstraction. Nearing my three score and ten years, and using TeX&#x2F;LaTeX for all these decades, I can with confidence state, that the only people yak shaving was us all the early adopters, learning typography rather than focusing on our studies. The same can of course be said for current users.
评论 #29862825 未加载
评论 #29862662 未加载
评论 #29862653 未加载
civilizedover 3 years ago
There&#x27;s a certain kind of computer science paper from the 90s, very frequently encountered if you&#x27;re familiar with the research. The typesetting is incredibly ugly, and they&#x27;re all ugly in the same characteristic way. See for example [1] (just the first one I found, some are quite a bit worse). I want to know the story behind this.<p>In the case of my example, note that when you load this paper in a browser, the tab will say &quot;main.dvi&quot;. So I&#x27;m guessing the paper was typeset in LaTeX, published as DVI, and when PDF came along they converted it, but the DVI -&gt; PDF conversion algorithm was really bad.<p>[1] <a href="https:&#x2F;&#x2F;courses.cs.duke.edu&#x2F;spring02&#x2F;cps296.1&#x2F;papers&#x2F;H-SIGMOD1999.pdf" rel="nofollow">https:&#x2F;&#x2F;courses.cs.duke.edu&#x2F;spring02&#x2F;cps296.1&#x2F;papers&#x2F;H-SIGMO...</a>
评论 #29868574 未加载
评论 #29865775 未加载
评论 #29864274 未加载
rcarmoover 3 years ago
“It’s just that the yak happened to stand close.”<p>I’m still giggling at this one. Amazing write-up.
tzsover 3 years ago
MIX was not yak shaving.<p>In 1968 a book like TAOCP needed to cover assembly programming. Using an existing assembly language for an existing machine would not work well unless you wanted the book to be &quot;TAOCP for CDC 6600 Programmers&quot; or &quot;TAOCP for Burroughs B5500 Programmers&quot; or &quot;TAOCP for IBM&#x2F;360 Programmers&quot; or similar. There were a lot of significant differences between different machines, and so if your book used any particular one for its implementations it would be harder to use for readers who used a different machine.<p>MIX allowed Knuth to capture the important points that you needed to learn about assembly programming, without getting you tied to any particular machine.
GnarfGnarfover 3 years ago
I wrote a DVI converter for the Xerox 9700 laser printer and the Autologic APS-5 typesetter in the early 1980&#x27;s. Ran on an Apollo Domain node. Fun times.<p>I took a 1-week summer class at Stanford with Knuth. At lunch, he told us the story of a Chinese restaurant that served food in the style of the province of Hunan. They had chopsticks made with a typo, said &quot;Human cuisine&quot;.
wodenokotoover 3 years ago
After googling around, as far as I can tell the word yak shaving come from a ren and stimpy cartoon episode from the early nineteens.<p>But how did it go from preparing for yaksmas to the current meaning?
评论 #29865071 未加载
davidgerardover 3 years ago
I dunno, that time Ken and Dennis wanted to port their video game so they wrote a small operating system. How did that OS end up going?
评论 #29865114 未加载
thepete2over 3 years ago
Besides Tex there is also git. Written only as a SCM for the linux kernel it went on to be used basically anywhere.
评论 #29864849 未加载
svatover 3 years ago
Incidentally, while this is a great post, the <i>order</i> of yak-shaving is actually pretty close to the opposite described in the post.<p>He <i>started</i> with wanting a digital version of Monotype Modern 8A (what became Computer Modern). His first idea was to go to Xerox and use their scanning equipment to digitize the font, but they would only let him use it if they would have copyright on the resulting fonts, so he started looking deeper at the fonts himself. That gave him the idea of <i>describing</i> the font shapes from scratch (with equations) instead of simply scanning them, so he came up with METAFONT. To use his own digital fonts, he would need a typesetting system: TeX. He did implement TeX in SAIL, but when it became clear he would need to rewrite it in a portable way (Pascal), and Hoare suggested publishing the program as a book, he came up with literate programming and WEB.<p>And as mentioned in another thread (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29862858" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29862858</a>), TAOCP is itself a &quot;yak shave&quot;, Knuth&#x27;s response to being asked to write a book about compilers, in his first year of grad school in 1960 (given his compiler exploits earlier, like <a href="http:&#x2F;&#x2F;ed-thelen.org&#x2F;comp-hist&#x2F;B5000-AlgolRWaychoff.html#7" rel="nofollow">http:&#x2F;&#x2F;ed-thelen.org&#x2F;comp-hist&#x2F;B5000-AlgolRWaychoff.html#7</a>). The publishers who were hoping to sell a book to aspiring early-1960s machine-language compiler-writers never got their wish, but they got something much more.
ameliusover 3 years ago
&gt; But “The Art of Computer Programming” is an impressive book in its own right: it is still unfinished, currently spanning 3.5 volumes (yes, the fourth is unfinished, but the first chapters are released).<p>I wish he would update his volume on Searching and Sorting with modern search engine techniques.
评论 #29865416 未加载
lstamourover 3 years ago
Still a fun read. Previous HN comments (from a submission a few years back): <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15733381" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15733381</a>
mathattackover 3 years ago
From his point of view, this certainly seems like a continuation of a life passion. Wouldn’t we all just love to follow our curiosity? Highlights a life well lived.<p>I’m curious on if this helped or hindered AoCP? Did it improve the work because the great theorist is also practicing on the side? Or did it slow down creation of AoCP? If the answer is “both”, which effect is stronger?<p>This is written with all due respect to this great polymath.
评论 #29868731 未加载
graycatover 3 years ago
&gt; TeX is also not a programming language.<p>I wrote some macros in TeX, over 100 of them, and in them used programming language constructs including if-then-else, do-while, dynamically allocated typed variables, and file reading and writing. Sounds like a &quot;programming language&quot; to me.<p>Sorry, TeX was not written primarily for programmers or computer scientists. Instead the target audience was people who use a lot of mathematical notation. In my opinion, the main glory of TeX is how it helps position the mathematical symbols in mathematical expressions, including some really complicated ones.<p>I know a guy, a good mathematician, who had a really tough time understanding the purpose of TeX. He kept evaluating TeX in terms of what it did for the future of <i>word processing</i> taken very generally, maybe all the way to video as in some Hollywood movies. E.g., TeX is not promising for generating video of a Darth Vader light saber battle. Then he noticed that TeX is not really that future. I finally explained to him that TeX was not trying to be the future of some generalized word processing, thus, was not <i>looking ahead</i>, and instead was <i>looking back</i> and at something he knew well -- the literature of advanced math as in math journals such as published by the AMS (American Mathematical Society or some such). So, TeX was to ease the word processing needed for pages of mathematics as in the math journals and textbooks.<p>That friend kept asking me to write a converter that would convert a file of TeX to a file of HTML. I kept telling him that such a converter was impossible because TeX was a programming language and HTML was not. I did explain that at least in principle could write a converter to convert TeX output, that is, a DVI (device independent) file to HTML. There are converters, heavily used, to convert DVI to PDF (portable document format or some such).<p>I like TeX; it is one of my favorite things, and I use it for all my higher quality word processing, the core, original math for my startup, business cards, even business letters. My last published paper (in some mathematical statistics) was in TeX, and using TeX was liberating because I could just go ahead and do the math and not worry about how I was going to get the word processing done, did not have to bend the math and reduce the content to make the word processing easier.<p>Future of TeX? The fraction of the population that wants to typeset complicated math expressions seems to be tiny, and there are lots of alternatives for others. So, my guess is that TeX will be like, say, a violin -- won&#x27;t change much in hundreds of years.<p>The OP mentioned LaTeX: For people new to TeX, no, you don&#x27;t have to learn LaTeX. The approach of LaTeX is different. In an analogy, LaTeX wants you to state if you are building a bicycle, motorcycle, car, truck, boat, or airplane, and then lots of lower level details are handled for you. With TeX, never decide what vehicle type are building and, instead, work with the parts and pieces -- yes, with a lot of help.<p>There is Knuth&#x27;s book on TeX, <i>The TeXbook</i>, and also the books on LaTeX. In comparison, Knuth&#x27;s book is a lot shorter than the books on LaTeX. So, I got the books on LaTeX, looked at them, and decided that it was easier just to stay with TeX and the macros I could write for TeX. So, for people new to TeX, don&#x27;t really have to get and read the books on LaTeX.<p>Getting math typeset was a big problem. TeX is a good solution. Problem solved. We can move on!<p>The collection of TeX macros I wrote has over 100 macros
评论 #29878520 未加载
评论 #29864722 未加载
zquestzover 3 years ago
Enjoyable read for sure. Must have missed this the first time it went around.
rramadassover 3 years ago
This is Great! Articles like these are Inspiring; the Cleverness&#x2F;Brilliance on display is just staggering and makes you really appreciate what is meant by the word &quot;Genius&quot;.
no-such-addressover 3 years ago
Wasn&#x27;t DEK giving a talk entitled, &quot;The Letter S&quot; in connection with the invention of Metafont? Nothing but admiration!
评论 #29872298 未加载
xwdvover 3 years ago
Some Buddhists who are vegetarian will justify eating Yaks because one yak can provide food for many people and only requires one life to be lost, as opposed to chickens or fish. The same can be true for computer science.
评论 #29862682 未加载
评论 #29862862 未加载
IThoughtYouGNUover 3 years ago
Sometimes being a pioneer means you have to shave a few yaks
评论 #29862387 未加载