[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Your recent note on MacLisp errors

Your questions (1) and (2) arise from misunderstanding how and
when macros are applied (both readmacros and interpreter/compiler

  1) Macros are never "called" in the sense that we think of calling
    a funciton -- they are "expanded" by the interpreter and compiler,
    but of course if they are not available to the compiler when compiling
    some file, then no expansion can be done, and the compiler will defaultly
    assume that the unknown name stands for a function call (rather than for
    some macro to be expanded).
 2) when READing a file, the s-expressions are stored as ascii text, and
    the readmacro characters are invoked when such character is encountered
    by the READer;  FASL files, on the contrary, store either the
    compiled versions of programs, or a special internal-format for other
    s-exressions.  Perhaps a reasonable approach is for the tilde macro
    merely to append to some global list, which is then output near the end of
    your file.  Thus both ascii files being READ and compile dFASL files would
    have a consistent representation of what is wanted in the HELP system (namely,
    the list of goodies which was produced by READing the ffile in the first place).

As for deletion of the echo, it will depend on what kind of system you are using
TOPS10 or TOPS20.  If the latter, you can turn of echoing by an appropriate STATUS
call which sets the bits in the TOPS20 echocontrol words;  There may be some explanation
of this (i.e., the extended STATUS calls for TOPS20) in the note which I used to
attach to the distributed MacLisp tapes.

As for the GCDAEMON reported errors, it sounds like you have a copy of the STRING
package from early to mid 1980.  Many bugs in it were fixed in late 1980 and
very early 1981, so these problems should go away if you can get the current
distribution (which was supposed to have taken place just as I was leaving MIT
in mid March of this year.)

More hints on problems (1) and (2)
  Thus usual procedure for using "compiled" macros is to seperate them out
into a file by themselves, and have them loaded into the compiler each time
you compile some file which might use some of them.  Admittedly this is not quite
as nice as defining the macros where they might "naturally" occur, but . . .
  Suppose you have your tilede macro collect some data into TILDELIST.  Then at the
end of the file you could put a form
this wouold be one way of insureing that DATASTUFF would have the save value after
loading the FASL file as when loading thee source file.