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

Re: readtable within fasl

My problem was a bit simplier then the general case you mention. In MRS
a 'variable' is really a reader-macro ($) that at read time assigns a special
value to each variable-base-name. Basically it does a
	(set (implode `(|$| . ,(explodec name))) 'bl).
for side-effects of marking the symbol as a variable.  When compiling files
containing MRS code the compiler would execute the call inside its environment,
placing the *unbound* literals (as .asciz) in the object file to be READ
in at load time... so MRS would get the symbols and treat them as symbols
not variables.

The only reason i mention this is that the workaround used might be useful
for others seeking side effects within macros etc.
My workaround (h.a.c.k) was to use a special variable
as a queue of the above SET forms and to provide a different macro expansion
for compile-time.  So

(setsyntax '|$| 'macro
  #'(lambda nil (let ((varname (implode `(|$| ,@(explodec (read))))))
		     (addq `(setq ,varname 'bl) liszt-eof-forms)
		     varname)))		;; return variable name to liszt!

[where ADDQ does the correct thing if the variable has already been seen],
adds the following to the object file
	.asciz "$xyz"
	.asciz "(setq $xyz 'bl)"
which basically works (don't gag!)
					steve white

YAP -- (yet another problem) : does anyone at MIT have a list of fixes
to franz 38.91 to make the zeta-lisp environment work :-) I started fixing
a few things but it looks like something that might MIT may have already
done. ((or any plans to put NIL under UNIX? 8-) ))