7 ms·
counterexamples: git, paxos, TeX
by jhpriestley 8y ago
counterexamples: git, paxos, TeX
- mturmon 8y agoNo, TeX was a second try. From the TeXBook: "The \TeX\ language described in this book is similar to the author's first attempt at a document formatting language, but the new system differs from the old~one in literally thousands of details. Both languages have been called \TeX; but henceforth the old language should be called \TeX78, and its use should rapidly fade away. Let's keep the name \TeX\ for the language described here, since it is so much better, and since it is not going to change any more."
- jhpriestley 8y agoTeX78 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.
- vorotato 8y agogit is remarkably simple in the core premise. I know nothing about paxos and tex though.
- timerol 8y agoI don't think git counts as a counterexample. The initial commit had 1244 lines, including documentation. It now has over 200,000 lines of C. The initial commit didn't include branches, remotes, submodules, or many other git features I use daily. It just had trees, blobs, and changesets. A simple core of what git eventually became.
- jhpriestley 8y agoIf distributed version control is not "complex" then what is? Git has mostly added features on top of a core model that was designed from scratch in one go.
- stefan_ 8y agoNothing in the git core cares about "distributed". It is distributed purely in the sense that it is copied many times. A distributed system then that is not cognizant of it's distributedness does not incur the complexity of that.
- jhpriestley 8y agoLucky break then that git core uses merkle trees and content hashing which require no coordination and make it easy to reject corrupt data
- nostrademons 8y agoGit evolved out of passing around patch files by e-mail, which then evolved into Bitkeeper. By the time Linus wrote git, he had a very good idea of the workflow he needed, the data to be stored, and the OS tools available to him, since he'd been doing it manually for 10 years and had written much of the OS. There's actually a counter to your counterexample - Darcs was a competing DVCS written in Haskell and based on a comprehensive theory of patch algebra. It didn't work - it was too slow to fit into people's workflow, despite being provably correct. Git - as basically the automatic version of emailing patch files around - was much more successful.
- cocochanel 8y agogit is incredibly simple and does not count as a counterexample at all. [1] [1] https://wyag.thb.lt/ https://wyag.thb.lt/