RE: 300,000 lines of C
Does anyone else have experience with TeX? Knuth wrote it in Pascal (I was there when he was considering whether Pascal or C would be the right choice), but most implementations run as C. Someone wrote a set of support routines plus a translator for the very restricted Pascal that Knuth used. Local modifications to the code are almost all handled by substituting new Pascal code which is incorporated by a preprocessor before being translated into C. Really works pretty well, and some of the same techniques should carry over to pypy. I once started a project to translate TeX to Java, but found the translation to Java more difficult than that to C and ended up abandoning it. --Th
Hickey,Thom wrote:
Does anyone else have experience with TeX? Knuth wrote it in Pascal ...
Yes I remember installing it when it first came out. It consisted of a Pascal bootsrap and two programs called 'tangle' and 'weave'. IIRC they were huge chunks of Pascal, very ugly and unweildy. I have been thinking of an idea where there is a C implementation of a virtual machine code to machine code interpreter. The interpreter is then supplied in the virtual machine code and it is then compiled/interpreted to machine code. From there it would run native. I have been thinking about Inferno's Limbo: http://www.vitanuova.com/inferno/papers/descent.html
participants (2)
-
Boyd Roberts -
Hickey,Thom