[comp.text.tex] why do we need initex.exe AND tex.exe?

xiaofei@acsu.buffalo.edu (Xiaofei Wang) (02/27/91)

why do we need initex.exe AND tex.exe? for example, both are supplied with
sb30tex distribution while tex.exe's job can be done by ``initex &plain foo''? 
I think we just need initex.exe.
-- 
xiaofei@acsu.buffalo.edu / rutgers!ub!xiaofei / v118raqa@ubvms.bitnet

HAN@FRECP12.BITNET (Jay Thierry HAN) (02/28/91)

In article <62097@eerie.acsu.Buffalo.EDU>, xiaofei@acsu.buffalo.edu (Xiaofei
Wang) says:
>
>why do we need initex.exe AND tex.exe? for example, both are supplied with
>sb30tex distribution while tex.exe's job can be done by ``initex &plain foo''?

I think sb30TeX's executables differ. TEX.EXE is designed to conform to the
TeXbook's specs about interactivity, memory management, etc. INITEX is
optimized for format generation. I've had lots of memory problems when using
initex with the French GUT distribution diskettes (needs 570k for LaTeX!).
Surprisingly, emTeX has only one executable, TEX.EXE, that can do both
normal TeX compilation and initex format generation (command line switch).

                                                       J.T.H.

dhosek@euler.claremont.edu (Don Hosek) (02/28/91)

In article <62097@eerie.acsu.Buffalo.EDU>, xiaofei@acsu.buffalo.edu (Xiaofei Wang) writes:
> why do we need initex.exe AND tex.exe? for example, both are supplied with
> sb30tex distribution while tex.exe's job can be done by ``initex &plain foo''? 
> I think we just need initex.exe.

You know what? You're right. In most implementations, IniTeX is
nearly as fast as VirTeX (that is, TeX with no format preloaded).

When TeX was developed, (over ten years ago, remember), it was
designed to fit into the existing machinery and still has some of
those assumptions built into it (thus the 64K limit on main mem,
for example). The larger executable for IniTeX would take
substantially longer to load than VirTeX. Preloading was created
because loading the larger executable was faster than loading
VirTeX & then the format file. These assumptions are no longer
necessarily valid. With the advent of BigTeX, for example, under
some undump systems, a preloaded executable can be downright huge
(ugh).

But as for IniTeX, it is slightly slower, will not preload a
format by default (which VirTeX will), and it may not be
desirable to allow users access to the \dump command in standard
TeX. On the other hand, one of the big mistakes Knuth made in TeX
3.0 was not allowing hyphenation patterns to be loaded in VirTeX
(it makes more sense now that there can be more than one) so
IniTeX has a little more flexibility in that respect.

An interesting note: when I talked to Knuth at the Stanford TUG
meeting back in 89, I commented that I was thinking of making TeX
and iniTeX into a single executable under VMS. He responded by
telling me that on his personal system, he hasn't even compiled
TeX and uses IniTeX for everything!

-dh

---
Don Hosek   To retrieve files from ymir via the    | dhosek@ymir.claremont.edu
            mailserver, send a message to          | Quixote TeX Consulting
            mailserv@ymir.claremont.edu with a     | 714-625-0147
            line saying send [DIRECTORY]FILENAME 
            where DIRECTORY is the FTP directory (sans "anonymous") and 
            FILENAME is the filename, e.g. "send [tex]00readme.txt". There is
            a list of files in each directory under the name 00files.txt
            Binary files are not available by this technique.

mattes@azu.informatik.uni-stuttgart.de (Eberhard Mattes) (02/28/91)

In article <62097@eerie.acsu.Buffalo.EDU>, xiaofei@acsu.buffalo.edu (Xiaofei
Wang) says:
>
>why do we need initex.exe AND tex.exe? for example, both are supplied with
>sb30tex distribution while tex.exe's job can be done by ``initex &plain foo''?
initex requires more memory. An initex without virtual memory (sbTeX's,
for instance) has serious memory problems under MS-DOS, you can use it
only for dumping a fmt file. emTeX implements virtual memory, but tex /i
is slower than tex, because there is less memory for buffers. If you're
short of memory, initex doesn't work at all (especially big initex!).

Jan Therry HAN wrote:
> Surprisingly, emTeX has only one executable, TEX.EXE, that can do both
> normal TeX compilation and initex format generation (command line switch).
...because the code specific to initex is in a overlay and memory
used for initex is only allocated if /i is specified.

--
    Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de)

eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) (02/28/91)

dhosek@euler.claremont.edu (Don Hosek) writes:

>In article <62097@eerie.acsu.Buffalo.EDU>, xiaofei@acsu.buffalo.edu (Xiaofei Wang) writes:

>> I think we just need initex.exe.

>You know what? You're right. In most implementations, IniTeX is
>nearly as fast as VirTeX (that is, TeX with no format preloaded).

The speed is not the question. IniTeX has lots of temporary
data structures for building the hyphenation patterns.
And in terms of the original memory sizes (suggested
main mem for TeX in 'the program': 30k words!)
this was very important.

But in these days of unix-boxes where we run big-TeXs
with 250k words of main mem it all doesn't matter anymore.

>An interesting note: when I talked to Knuth at the Stanford TUG
>meeting back in 89, I commented that I was thinking of making TeX
>and iniTeX into a single executable under VMS. He responded by
>telling me that on his personal system, he hasn't even compiled
>TeX and uses IniTeX for everything!

Nice story.

Victor.

amanda@visix.com (Amanda Walker) (03/01/91)

dhosek@euler.claremont.edu (Don Hosek) writes:
>An interesting note: when I talked to Knuth at the Stanford TUG
>meeting back in 89, I commented that I was thinking of making TeX
>and iniTeX into a single executable under VMS. He responded by
>telling me that on his personal system, he hasn't even compiled
>TeX and uses IniTeX for everything!

One thing I did to save space under UNIX was to make the IniTeX/VirTeX
distinction a runtime flag (basically, I compiled the C version with
all of the #ifdef's changed to 'ifs'), and then made the default value
of the flag depend on the name the program was invoked with.  Worked
like a charm.  Since web2c by default puts all of the IniTeX-specific
routines together anyway, they just won't get paged in if they aren't
used.

Also, on some machines, you even get pretty acceptable performance by
reading in lplain.tex directly...

-- 
Amanda Walker						      amanda@visix.com
Visix Software Inc.					...!uunet!visix!amanda
--
"The map is not the territory."		--Alan E. van Vogt