4 ms·
TeX78 was also highly sophisticated though. See https://www.saildart.org/TEXDR.AFT%5B1,DEK%5D1 https://www.saildart.org/TEXDR.AFT%5B1,DEK%5D1 from 1977, where c
by jhpriestley 8y ago
TeX78 was also highly sophisticated though. See https://www.saildart.org/TEXDR.AFT%5B1,DEK%5D1 https://www.saildart.org/TEXDR.AFT%5B1,DEK%5D1 from 1977, where core features like macros, horizontal and vertical boxes, boxes and glue, badness scores are all discussed in quite some detail. TeX underwent a lot of evolution but it was recognizably TeX, and had the sophisticated and coherent core features of TeX, from the start.
- mturmon 8y agoOne would expect that Knuth's first cut would be a good one. My point is that the thing we know as TeX is not the first implementation, and that TeX is not a counterexample. Even in the tech note you reference, at the end, Knuth is referring to improving the initial system by following related work in math parsing (by Kernighan among others). And AFAICT the final Knuth-Plass line-breaking algorithm is an extension of the original approach described in that tech note. And hyphenation also changed. According to http://walden-family.com/ieee/dtp-tex-part-1.pdf http://walden-family.com/ieee/dtp-tex-part-1.pdf, the two implementations (TeX78, TeX82 = TeX) are in different languages (admittedly, both Algol family): "...Over the period 1977–1984, Knuth himself wrote two completely different implementations of [...] TEX (called TEX78, written in SAIL, and TEX82, written in WEB)" Here is how Knuth described the rewrite from SAIL to WEB: "I needed to work out a better 'endgame strategy', and it soon became clear what ought to be done: the original versions of TEX and METAFONT should be scrapped, once they had served their purpose of accumulating enough user experience to indicate what such languages ought to be. New versions of TEX and METAFONT should be written, designed to last a long time and to be highly portable between computers and typesetting devices of all kinds." * Here's the kicker: These two implementations are separate from the older proof-of-concept implementation that Knuth asked his grad students to do while he went away, back in 1977: "Knuth then left town for the better part of two months, leaving his students Frank Liang and Michael Plass to do a prototype implementation of TEX. Plass remembers that they managed to implement enough of TEX to process “a subset of TEX input all the way to XGP [Xerox graphics printer] output. . . . Knuth . . . seemed pleased with our efforts, and proceeded to re-code TEX himself.” Knuth later noted that Plass and Liang had prototyped only a fraction of the full TEX and that it was important that he code the complete program because he learned so much from doing the coding." So, even the prototype TeX77 was implemented twice.
- svat 8y agoTEXDR.AFT is the document Knuth wrote in May 1977 for TEX[1], before a single line of code was written. This was the first thing he typed up into a computer, after about two months of thinking about the problem. About a month later it was refined to TEX.ONE (both since republished in Digital Typography, along with some of Knuth's diary entries from the time). This is the specification that his two students, Plass and Liang, tried to implement from, while he was in China. Then he came back and decided to implement it himself, which he did over the next year; the SAIL program now known as TeX78. His Pascal (WEB) rewrite was started in 1980 and finished in 1982. So the person you're replying to is correct that TeX had its sophisticated features (as in those present in TEXDR.AFT) in its design, right from the start. Of course the current TeX82 is indeed a rewrite with thousands of changes, but much of the core features of TeX were present in the initial design. Of course one could explain this "counterexample" with the observation that Knuth is not exactly a typical programmer, as he prefers to code on paper (https://news.ycombinator.com/item?id=10172924 https://news.ycombinator.com/item?id=10172924) and spent two months writing a detailed spec, and at least one month getting feedback, before any code was written. Perhaps his initial (hand-written) design was indeed simpler. [1]: Aside: TEX was his original name for it, before the name conflict with Honeywell's TEX https://en.wikipedia.org/wiki/Text_Executive_Programming_Language https://en.wikipedia.org/wiki/Text_Executive_Programming_Lan... forced/inspired him to come up with the Greek letters idea and rename to Tau-Epsilon-Chi properly typeset with the E going below the baseline, in turn represented in ASCII as TeX.)
- mturmon 8y agoI appreciate your sources and depth of knowledge. Thanks for the reply. Perhaps it would also be worthwhile to go in the opposite direction: because of the design limitations of TeX, LaTeX has almost completely replaced TeX as the input language. In that sense, even TeX82 proved to be just a step on the way to a usable-by-people document system.
- nostrademons 8y agoTeX evolved out of manual typesetting. All of the ideas of horizontal & vertical boxes, glue, badness scores are computer formalizations of the work that typesetters have been doing for centuries. Knuth's first order of business when he wrote TeX was to learn how printers did this stuff; he drew on 500 years of "simple solutions" going back to Gutenberg to write it.