summaryrefslogtreecommitdiff
path: root/macros/generic/occam/occam.pub
blob: 1fef5aee33269d8ebd8ef1d5fa771d890a11cb57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
 Part of the Occam utility. Laurent Siebenmann
<lcs@topo.math.u-psud.fr>
 Master posting 1994, ftp ftp.math.u-psud.fr

Title: Occam.pub (1994--)
This Text file has beem assimilated in a longer article
corresponding to a talk at EuroTeX 95, Papendal, Netherlands.
The extended article is posted ".dvi" form as
Occam95.dvi.

 ****************************************************
 ******    OCCAM'S RAZOR AND MACRO MANAGEMENT
 ******      (a text abstract)
 ******    Laurent  Siebenmann
 ******    lcs@topo.math.u-psud.fr
 ****************************************************

THE APHORISM: 
 

  entia non sunt multiplicanda praeter necessitudinem

  entities should not be multiplied beyond necessity

 William of Occam 1285-1349(?)

Occam's Razor is the aphorism quoted!
Experts believe that Occam did not formulate it in
exactly these famous words, but rather as

   What can be done with fewer assumptions    is done in
   vain with more.

or

   Plurality is not to be assumed without necessity.

The term Principle of Parcimony is also used for the
Razor. At this European congress, let me remind you that
Occam worked successively in Cambridge, Avignon, and
M"unich.} 

 THE SOFTWARE: 
 --- occam.pub
 --- auditor.tex
 --- DefStrip-QUEDM-Cmds (Macintosh only)
 --- defstrip.hlp  help file for above
 --- occam.spc  specifications for source macro files to be minimized
 --- defstrip.tex (is mere wishful thinking in summer 1995)

MASTER POSTING in 1994: 
 --- ftp ftp.math.u-psud.fr
directory pub/TeX/defstrip.dir/ }

      Have you ever felt guilty about burdening a friend
with macros that are not really necessary for composing
your typescript?  I certainly have; and would ideally
like to follow Knuth's example of using macro files
which define exactly what is necessary for a document
and nothing more.

       However, pruning a macro file that has served for
another purpose is a pain.  Most of us respond to this
pain by adopting a rather messy maximalist approach in
which all the macros that have a geneology related to
the necessary macros are transmitted.

       But there is another approach!  One can seek
efficient mechanisms to ease the task of weeding out
unnecessary macros.

       One such mechanism is auditor.tex, which sets up
a list of names of those macros of macro file that turn
out to be *unnecessary* in a given typescript.

     A complementary tool is the utility DefStrip which
combines a specially arranged version of the macro file
to be "cleaned up" with the list of unused macros
provided by auditor.tex to delete the unneeded macros
listed together with some related material.

     Ultimately, DefStrip will hopefully be a ".tex"
program "defstrip.tex" resembling the "docstrip.cmd"
utility of LaTeX fame. At the present time, there exists
instead a QUEDM script called DefStrip-QUEDM-Macros;
QUEDM is a editor with convenient "macro" (=composite
command) capabilities that is available on Macintosh
computers.

     DefStrip and Auditor together make up  a system
called "Occam".

     Let us consider two plausible examples of use of
the Occam system.  Only the first has proved genuinely
useful thus far.

  (A)  Weeding out one's personal macro files

Many TeX users build up a cumulative personal macro file
through composing many articles with TeX.  A time
inevitably comes when it is embarrassing, cumbersome, or
confusing to submit the whole macro file along with the
article. The Occam system makes the pruning of the macro
file painless.  It is advisable to tidy up the total
macro file and maintain it in "Occam" format\footnote{
The extension distinguishing this format is usually
".occ" for "audit".}  as explained in "occam.spc"; then
and only then will "auditor.tex" and DefStrip collaborate
to *automatically* produce a minimal version of the
macro file suitable for the article at hand.

  (B)  Autonomous and archival electronic ".tex"
postings.

    Suppose that one proposes to post in electronic
".tex" form an article prepared using a more or less
standard package such as the "harvmac.tex" macro package
of Paul Ginsparg for Plain TeX. (The alternative ".dvi"
form undeniably convenient, but also less flexible; for
instance the ".tex" version can be reformatted to be read
in comfort on any computer screen whereas a ".dvi"
version often does not have an small enough text width.)
Such a macro package is not immune to alteration with
time, and unfortunately the principles of upward
compatibility are just pious hopes, not laws.
Consequently, one is well-advised to post, along with
the article the macros necessary to compile it ---
especially if modifications to the macros have been
used. Unfortunately, the "harvmac.tex" macros are as
voluminous as a 10 page article. This is an unfortunate
obstacle to electronic posting of ".tex" typescripts.

    The solution proposed is to have a version
"harvmac.occ" of the "harvmac.tex" macros set out in a
form designed for use with Occam. Then the necessary
macros for a given article can quickly be extracted from
the total package to make the total posting both compact
and archival.

   This is illustrated in the Occam distribution for a
famous article of Edward Witten posted electronically in
November 1994. The resulting archival posting (Plain
based) requires only 6 Ko of macros rather than the
original 20 Ko.  The 68 Ko body of the article is
untouched.

   Recently "harvmac.tex" has been enhanced by inputting
the hyper-reference macros "hyperbasics.tex" macros of
Tanmoy Bhattacharya and the new name is "lanlmac.tex".
The example will shortly be enhanced to cover this
development.

   The archival nature of TeX postings minimized using
Occam still depends on Knuth's Plain format being
archival.  Plain probably will be at least upwards
compatible in the best sense. However, the article (or a
book, say) could perhaps be made archival on the scale
of many decades by subjecting the Plain macros to Occam
discipline; this incidentally seems necessary to realize
best economy.  The article would then have its own
format built with initex.  This may seem needlessly
radical to an English speaking user.  But I consider
bootstrapping from initex the best approach for fully
archival ".tex" postings where other languages are
concerned.

   There are many macro packages that might benefit from
being put in Occam format.  The picture macro package of
LaTeX is an example; interestingly these macros run on
Plain. The "amssym.tex" math symbol definition package
for AmS fonts is another; it defines several hundred
control sequences of which precious few are used in any
given article. These two will also be included in ".occ"
form in the Occam distribution.

     Would it be reasonable to convert AmSTeX into a
Plain macro package in ".occ" format, much as it has been
converted by the AmS into a LaTeX package? This
involves `repealing' AmSTeX's status as a full-fledged
format. In particular the AmS-Plain package would have
no influence outside of math mode.

   In the long term, the formatting of a macro package
for use with Occam will be the responsibility of the
author of the package. Clearly this will catch on only
if Occam performs well and becomes very stable.


AFTERTHOUGHTS

    Occam as presently realized does not make much sense
in the LaTeX world. The LaTeX group is building official
macro modules that cover all needs and are universally
available. I suspect this will require continuing
exponential growth of the LaTeX project, of the
computers that run LaTeX, and of the of the time
invested by LaTeX users.

    I may be wrong. Occam is nevertheless to some extent
my remedy for this real or imaginary catastrophic malady
of LaTeX.  Don Knuth seems to have had similar
premonitions. I like to repeat what he said on the
occasion of the 10th anniversary celebration of TeX
82.

  Suppose you were allowed to rewrite all
the  world's literature; should you try to put it all
into the same format? I~doubt it. I~tend to think such
unification is a dream that's not going to work.

        [TUGboat, vol~13 (1992), page 424]

     The happiest outcome would be for both approaches
to work well. If this comes about, I expect the "look
and feel" of Plain and LaTeX to steadily diverge.

     Bootstrapping on initex as mentioned above seems to
have a parallel in classical programming, namely the use
of assembly language --- whereas the LaTeX approach is
parallel to the use of a big and constantly evolving
interpreter.

     Occam's razor was one of the guiding principles of
scientific thought for several hundred years before the
coming of age of computers. I suspect the philosophy of
Aristotle or Descartes is far more likely to appeal to
computer scientists. One might go so far as to say that
Occam's razor has by now been discarded --- indeed,
object oriented programming consciously cultivates the
art of multiplication of entities, and this sort of
thing is to be found in  of LaTeX commands such as
\newheading.  What can the minimalism of Occam's razor
offer TeX users at this late date? Probably just a few
things.

   (a)  Friendliness to human beings.  Unnecessary
entities that cost a microprocessor only a fraction of a
second can cost the human mind a significant amount of
time.

   (b)  Extra storage space and computing power.  Both
are in a period of exponential growth. But so is the
TeX related software we use.   Where performance in a
fixed task is concerned, these growths may even cancel
one another. When this happens, the old-fashioned
minimalism of Occam's razor can help derive pleasure and
profit from progress.

     In summary, Occam is a TeX application offering
possible new direction in programming for Plain TeX,
and an answer to the most debilitating problem of Plain
TeX, namely the confusion and incoherence that come
from continual macro additions. Naturally, for this
weakness, I have a quotation from Leslie Lamport (1995).


       Because Plain TeX is fixed, it seems
likely that the Plain TeX community will fragment into
numerous small islands in a sea of incompatibility.


 Lamport's answer in his LaTeX is to
systematize indefinite growth with constantly improving
infrastructure, whereas  Occam's answer is to prune the
macro collection to restore simplicity to every
document.


       Laurent Siebenmann
         <lcs@topo.math.u-psud.fr>