|
|
Subscribe / Log in / New account

mundane topics...

mundane topics...

Posted Jan 2, 2025 15:22 UTC (Thu) by anselm (subscriber, #2796)
In reply to: mundane topics... by eru
Parent article: An Algol 68 front end for GCC

It was hard to make a portable Pascal program that did something useful.

Donald E. Knuth managed reasonably well with TeX and METAFONT …


to post comments

mundane topics...

Posted Jan 2, 2025 15:43 UTC (Thu) by eru (subscriber, #2753) [Link] (2 responses)

Knuth didn't actually use pure Pascal. The code is in the "Web" language, which combines code and documentation. This is then run through a pre-processor called "Tangle" to produce the compilable code. This can handle variations in compilers.

https://ctan.org/tex-archive/systems/knuth/dist/web

As an another example of workarounds, there is the book "Software Tools in Pascal" by Kernighan and Plauger (1981), where some deficiencies of Pascal are papered over with a m4-like macro processor, source included in the book. I read this decades ago, but have forgotten how it was bootstrapped.

mundane topics...

Posted Jan 2, 2025 18:53 UTC (Thu) by willy (subscriber, #9762) [Link]

mundane topics...

Posted Jan 10, 2025 2:30 UTC (Fri) by jschrod (subscriber, #1646) [Link]

Well, TeX's programming language history is more complicated.

TeX was originally written in SAIL, a local programming language in use at Stanford.

Then, after AMS got interested, it was rewritten in Pascal.

Afterwards, it was rewritten in Web, introducing Literate Programming.

I joined the TeX community at a time when we rewrote our own Pascal compiler (at the Technical University of Darmstadt) to port the Pascal version. In fact, one of my early programming tasks in that project was porting TANGLE to a BS2000 mainframe, when we migrated to the Web version.

I still have all those sources lying somewhere - but you can also find them online on CTAN. (I'm one of the CTAN founders.)

Oh, and you don't need to explain TeX's code base to anselm - he was an early TeX hacker as well, having written one of the first DVI drivers while he was at Darmstadt's math department in the 80s.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds