X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["3203" "Wed" "1" "July" "1998" "17:00:07" "+0100" "Robin Fairbairns" "Robin.Fairbairns@CL.CAM.AC.UK" nil "69" "Re: Optimizing LaTeX" "^Date:" nil nil "7" nil nil nil nil nil] nil) Received: from listserv.gmd.de (listserv.gmd.de [192.88.97.1]) by mail.Uni-Mainz.DE (8.8.8/8.8.8) with ESMTP id SAA11514; Wed, 1 Jul 1998 18:00:18 +0200 (MET DST) Received: from lsv1.listserv.gmd.de (192.88.97.2) by listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <8.917715BA@listserv.gmd.de>; Wed, 1 Jul 1998 18:00:17 +0200 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 376587 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Wed, 1 Jul 1998 18:00:12 +0200 Received: from heaton.cl.cam.ac.uk (exim@heaton.cl.cam.ac.uk [128.232.32.11]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with SMTP id SAA24043 for ; Wed, 1 Jul 1998 18:00:10 +0200 (MET DST) Received: from dorceus.cl.cam.ac.uk (cl.cam.ac.uk) [128.232.1.34] (rf) by heaton.cl.cam.ac.uk with esmtp (Exim 1.82 #1) id 0yrPIm-0000XN-00; Wed, 1 Jul 1998 17:00:08 +0100 Message-ID: Reply-To: Mailing list for the LaTeX3 project In-Reply-To: Your message of "Wed, 01 Jul 1998 14:52:52 +0200." Date: Wed, 1 Jul 1998 17:00:07 +0100 From: Robin Fairbairns Sender: Mailing list for the LaTeX3 project To: Multiple recipients of list LATEX-L Subject: Re: Optimizing LaTeX Status: R X-Status: X-Keywords: X-UID: 2630 i wrote: > >and of course, what's appropriate for an interpreter isn't necessarily > >equally sensible for a compiled language. we simply cannot hope to > >compile tex without a major effort *outside* tex: an optimising > >compiler written in tex is surely a nono -- one couldn't possibly > >afford a pass of something (presumably) even slower than docstrip on > >documents, and class and package files aren't really the problematic > >issue as far as optimisation goes. and hans aberg responded: > To give the optimizer another name than docstrip then, so it may be used > at will. the name of the program doesn't affect its speed at all (though i suppose if you painted go-faster stripes down the side...) the essence of my remark was that any useful optimiser is either ridiculously difficult to write (on a par with tex itself, since it has to parse tex input) or desperately slow. > The thing is that I wonder if it is so difficult to provide a compiler > within TeX. Let's focus on \newcommand{\foo}[5]{def}; then LaTeX already > expands this to a \define\foo#1#2#3#4#5{def} kind of definition. So one > needs a way to write this expansion down in a file as a command. *why* do we need this? executing the \newcommand does indeed ultimately lead to execution of a \def statement, as you suppose. and the \newcommand is slightly slower to execute than is the \def on its own, but so what? that command is only going to be executed once in a tex run, after which the (tokenised) command definition is hashed away somewhere and is executed as fast as one can hope. > I merely play around with this idea, to see where it leads. as you may guess, i don't think it leads anywhere terribly useful. i don't think an optimiser that operates on classes and packages helps much, and i don't believe an optimiser that works on documents is feasible. > >..i've done a fair > >bit of research since into naming systems (it's a topic that has > >direct relevance to my research group), and i think i know how i would > >structure a naming system within tex. what i _don't_ know (after > >several months of thinking about it) is how to implement such a > >system. > > With modules, I think if it should ever become more than a naming system, > it is rather abstract as concept and hard to focus without a great deal of > practical programming experience, and just thinking about it will not > resolve that issue. I did some limited programming with the idea of > modules, and I merely try to indicate some of the deeper aspects that I > found suitable. But for developing the concepts of modules a great deal of > more programming experience with the concept is needed, giving it a context. it seems you're saying "we need to program these things before we've got a coherent idea of how to name them". this way (to my mind) leads to madness, which was why i was re-reading the standard texts on naming. > By the way, I put up a doc, "modules/ModuleConventions.txt", on my home > page, with contains some of the ideas I had that might be used to define > modules. you quote two home pages, but afaict this file isn't in either of them (i tried conventional html suffixes too). robin