On Tue, Feb 23, 2021 at 01:58:16AM -0700, arn...@skeeve.com wrote: > tlaro...@polynum.com wrote: > > > On Mon, Feb 22, 2021 at 09:44:54PM +0000, Charles Forsyth wrote: > > > I'm fairly sure Thompson wrote it on sabbatical in Berkeley. I think he > > > also wrote the first version of a Pascal compiler. > > > Pascal isn't a difficult language but I remember that compiler having an > > > unusual style. I think others reworked it significantly later, > > > so if it's there at all it's worth looking at the earliest possible one. > > > > > > > The Pascal compiler rings a bell... It would be fun indeed to derived a > > version from it so that, finally, TeX and al. could be "natively" > > compiled instead of converting the (pseudo) Pascal to C (this is web2c > > purpose or, as I have named it, pp2rc---Pseudo Pascal to Raw C). > > There was an interpreter for P-code and (I think later) a compiler > for the Vax. You'd have to port it to current architectures, and > compiling TeX would probably make TeX run more slowly than the C version. > > The Berkeley Pascals were some of the compilers used for "Software Tools > in Pascal".
The Pascal version would probably be a bit slower. And it would be more an alternative to verify the code than a primary way, since in fact D.E.K. has not written the program in some Pascal but in Algol, a high level abstract description, the wizardry being in the data structures. And, indeed, only the control flows are being translated from pseudo Pascal to C, the core---the data structures---being handled by ad-hoc code. And for the architectures, like other compilers, the aim would be to convert to some intermediate language (perhaps assembly) and to borrow the back-ends. But it is all vaporware: I have to implement supplementary primitives for the new version of LaTeX and I'm already late (not started yet)... -- Thierry Laronde <tlaronde +AT+ polynum +dot+ com> http://www.kergis.com/ http://kertex.kergis.com/ http://www.sbfa.fr/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T476a1d7b83269775-Me5e205d80b9776ae87385457 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription