
Donald Knuth – The Patron Saint of Yak Shaves - ingve
http://yakshav.es/the-patron-saint-of-yakshaves/
======
nerdponx
The problem with Tex is precisely that it's a yak-shaving project.

I know Knuth thinks it's feature complete, but it produces deeply
incomprehensible error messages and lots of erroneous warnings that look like
errors. Very hard to debug, and that alone turns people off.

~~~
svat
To the contrary, TeX (not LaTeX) has one of the best error-handling and error-
recovery interfaces of any commandline program — if you use TeX as Knuth
intended, that is, if you use plain TeX at the commandline and if you have
read the entertaining chapters in _The TeXbook_ on dealing with errors. Just
try using plain TeX (not LaTeX) for a few months and you'll find that the
behaviour when errors happen is one of its delights, the opposite experience
from when you use LaTeX. (Of course, you may miss many conveniences from
LaTeX, but the error experience is itself almost worth the change.)

Knuth has done a great job that should be the model for all other software
writers: every error is described in two ways, one somewhat formal and one
somewhat informal, and every error is shown with enough context (and this is
configurable too) for you to quickly see what the issue is, and you can even
fix errors without having to abort the compilation. He has a great talk where
he describes how the English language is optimized for dialogue (things like
"I" and "you") and TeX messages are designed in that way.

Unfortunately, LaTeX consists of several layers of complicated macros (all in
the name of making things convenient for, and hiding things from, the user)
and as they (correctly) decide that all these layers won't make sense to the
user, they actually _turn off_ all the context that goes with the error,
leading to error messages that are incomprehensible even to experts. But I
don't think it's right to blame the fact that LaTeX didn't bother to implement
good error-recovery on TeX.

~~~
cup-of-tea
> He has a great talk where he describes how the English language is optimized
> for dialogue (things like "I" and "you") and TeX messages are designed in
> that way.

Is this online? I listen to everything I can from Knuth but haven't heard this
one.

~~~
svat
I have seen it written down in print somewhere more eloquently (probably one
of his interviews or conversations); the thing I was referring to
(incorrectly) was not an entire talk of its own, but a passing brief remark (a
few seconds or a minute) during one of the “Internal Details of TeX82”
lectures about the source code of the TeX program
([https://www.youtube.com/watch?v=bbqY1mTwrj8&list=PL94E35692E...](https://www.youtube.com/watch?v=bbqY1mTwrj8&list=PL94E35692EB9D36F3&index=12)).
Sorry I don't have a more exact reference right now.

------
kstenerud
I also created a typesetting program to produce a book I was writing, because
I was impressed with what was available. I wanted to push a button, and have
it compile a PDF for printing, an EPUB for tablets and phones, a text version
for proofreading, and an html version for debugging. Shockingly, nobody had
done this.

~~~
cturner
Each publishing house and newspaper has a home-grown pipeline to do something
close to this.

With work, you can get something that does most of what you want with a few
stacks. You can cobble it together for markdown. Alternatively, there are
strong plugins to emacs org mode that can go to TeX, then postscript, then
PDF. There is probably a stack centred around docbook as well.

My experience has been that if you care about details, you will need to write
parts yourself, as you have done. Emacs org mode is a good starting point. You
can create your foundation data structures in org-mode trees, and then
transform out to the main render pipelines (TeX, etc).

------
drfuchs
Sounds a bit snarky, but I appreciate the shout-out.

------
underyx
Typo in the last line, 'Lamdba.'

------
farnsworthy
The other kind of hundred-year language (or not).

------
sigjuice
Stopped reading at _It transpiles to PASCAL_.

~~~
lokedhs
Why? It's correct. You run a tool to convert the Web source to Pascal. If you
want to compile TeX on modern computers, you run another conversion step to
convert the Pascal to C, but Knuth used a real Pascal compiler when he made
TeX.

~~~
sigjuice
Sure. All this is absolutely cool. What isn't is using questionable words like
_transpiler_. Citations needed on whether that is an actual meaningful word
(Wikipedia isn't it).

~~~
whiteandnerdy
Can you give more details on why the term is ambiguous or ill-defined? I
thought I knew what it meant, and a brief web search seems to reinforce my
existing understanding (a source-to-source compiler), but I'm probably missing
the subtleties. If you have a couple of minutes to clarify what your objection
is, I'd love to learn more.

~~~
sigjuice
I'd go further and say that it is redundant to even say 'source-to-source'.
Just 'compiler' is enough, IMHO. See the first few pages of any compiler book.

[https://books.google.com/books?id=_tgh4bgQ6PAC&printsec=fron...](https://books.google.com/books?id=_tgh4bgQ6PAC&printsec=frontcover&dq=engineering+a+compiler&hl=en&sa=X&ved=0ahUKEwiM3_aVgMXTAhVD0WMKHd1YDtkQ6AEIJjAA#v=onepage&q=engineering%20a%20compiler&f=false)

 _Compilers are computer programs that translate a program written in one
language into a program written in another language._

