next up previous contents
Next: Vendors-Publishers Up: Thursday August 19, 1999 Previous: Managing TEX Software Development

  
JAVA and TEX


TIMOTHY MURPHY
Trinity College Dublin, Ireland
tim@maths.tcd.ie



Abstract:  TEX and METAFONT, translated into JAVA and compiled with TYA, a public-domain JIT compiler, run about 10 times more slowly than the same programs in C (without TYA, they are 20 times slower). A year ago, they ran 50 times more slowly. In a year's time, perhaps using Sun's new JIT compiler, it is reasonable to assume that the factor will be down to 2 or 3.

At that point--bearing in mind the speed with which the speed of computers is increasing--TEX-in-JAVA will be a perfectly plausible alternative to TEX-in-C; and then we shall have to weigh its lack of pace against the several advantages that JAVA has to offer, such as:

Portability:
in principle, exactly the same JAVA programs should run under every OS;

Netability:
Java was designed with the Internet in mind, and its adoption must allow TEX to be integrated more easily into the Web.

Modularity:
Although TEX and METAFONT are large monolithic programs, they are actually written in a modular style--almost as though Knuth had JAVA in mind!--and it should be simple to `hive off' font routines, for example, as a separate TeXFont class, without modifying the essential code in any way. Breaking up TEX (or METAFONT) in this way into a number of co-operating classes might mean that variations like pdfTEX and METAPOST could be implemented as relatively small `extensions' of one or more of these classes.

Threads:
By running TEX and friends as `threads', last-minute changes can be implemented before the thread starts; as well, the program can pause while some intermediate task is performed, before resuming where it left off.

Graphics:
JAVA offers a graphical alternative to the perhaps old-fashioned text-based interface traditional to TEX.


next up previous contents
Next: Vendors-Publishers Up: Thursday August 19, 1999 Previous: Managing TEX Software Development
Page last modified on 1999-09-14