Here's a link where many people chime in with factoids about what language it's written in: What language is TeX implemented in? <https://tex.stackexchange.com/questions/95369/what-language-is-tex-implemented-in> As to unit tests, I wouldn't be too confident about that!
On Friday, October 15, 2021 at 8:38:53 AM UTC-4 jkn wrote: > Hi Edward > ah, so you are talking about the literate programming aspects of TeX. > Fair enough. I came to Leo via that side of things (as did you, I know) but > I can't remember what I ever knew about Knuth's tangle and weave etc. > > FWIW, although TeX was originally written in Pascal (or SAIL, some sort of > derived language IIRC), I think nowadays there is a C version which pretty > much everyone uses. I would think that this impliest hat there are plenty > of unit tests for the implementation, presumably written after the fact. > But I don't know too much about that. > > Regards, J^n > > > On Friday, October 15, 2021 at 1:12:28 PM UTC+1 Edward K. Ream wrote: > >> On Fri, Oct 15, 2021 at 3:25 AM jkn <[email protected]> wrote: >> >> > I'm curious as to what you mean by this. Are you referring to the >> design of the TeX language? >> >> The short answer: no, but this is an interesting question! >> >> The most important things to know about TeX: >> >> 1. It's never going to change. >> 2. It does what it was intended to do. >> 3. It is an important de facto standard. >> 4. LaTex hides the horrendous details. >> >> However, I was referring to the web language, which imo is a horror show. >> I think I am entitled to this opinion since I have spent about 40 years >> trying to do better :-) >> >> > I have more than once wondered what would have happened if 'TeX' had >> been written in something like Python (which came much later, of >> course)... >> >> The question I have been asking myself lately is whether there are unit >> tests for TeX that would allow re-implementations in other languages. Unit >> testing as a concept did not exist when Knuth created TeX, but such tests >> should be completely feasible. After all the tests would check that, given >> a TeX input, the *text *output matches expected output in one of several >> forms: dvi, svg, pdf, postscript. >> >> These kinds of text-to-text checks are the easiest form of unit tests. >> However, it would likely take at least a year to create tests that fully >> cover TeX. But is that a big deal? I think not, given the importance of >> TeX in the world. There may be such tests, but I haven't (yet) found >> evidence of them. >> >> Absent such tests, we are stuck with precompiled versions of the original >> TeX (in pascal!) program. But I could be mistaken about that. >> >> vs-code has a textab extension that's written in rust! I am busy >> installing lyx (and tex live) so I can see in what language lyx is written. >> And then there is the whole mathjax tool chain, which I'm guessing is built >> on top of TeX/LaTex. There are several LaTeX extensions for vs-code. >> >> *Summary* >> >> There has been *tremendous* progress in all areas since ca 1980, so >> without more research it's too early to say how easy it would be to make >> sense of tex.web :-) And let me emphasize that everything I have said here >> could be mistaken, in small or large ways! >> >> Edward >> > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/b9255bdb-39c9-42f3-9342-c3205a53a072n%40googlegroups.com.
