🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.lisp
Article #707

Re: Franz Lisp compiler problems

#707
From: Dana S. Nau
Date: Tue, 14 Oct 1986 15:31
56 lines
2759 bytes
In article <3542@umcp-cs.UUCP>, I asked how one could get Franz Lisp to
compile macros without putting
	(declare (macros t))
into the file being compiled.  The reason for this was that the code
needed to be intelligible to Lisps other than just Franz Lisp, and
"(declare (macros t))" is unintelligible to other Lisps.

Several people sent me proposed solutions, and others wrote asking to see
these solutions.  My attempts at sending direct responses haven't worked, so
I'm posting a summary to the net:

----------------

The following suggestion came from three different people:

	ricks@cad.berkeley.edu (Rick L Spickelmier)
	seismo!ihnp4!ihuxf!dunk (Tom Duncan)
	seismo!mcvax!botter.vu44.uucp!fons (Fons Botman)

The suggestion is to use something like

	#+franz (declare (macros t))

This only works in Lisps which recognize the #+ readmacro.  However, this
includes all of the Lisp systems I'm using (Franz Lisp, Symbolics Zeta Lisp,
and TI Zeta Lisp).  Thus, this is the solution I decided to use.

----------------

Botman also made two other suggestions.
The first suggestion was to invoke the compiler as

	liszt -e '(declare (macros t))' source-file

On Opus 42.16.3, this doesn't work--the declaration is ignored.  The second
suggestion was to put all the system-dependent code (including the "(declare
(macros t))" statement into a file called sysdep.l, and put

	(include sysdep.l)

into the source file.  This works in Franz Lisp, but not in other Lisps,
because the meaning of "include" is Franz-dependent.

----------------

topaz!think!mit-eddie!mit-athena!yba@trillian.arpa suggested that I create a
makefile which invoked "liszt < control-file" rather than "liszt
source-file".  "control-file" could then include all sorts of
Franz-dependent stuff, followed by the s-expression (liszt source-file).
This approach would less be convenient than the #+franz readmacro, but it
would be more general, in the sense that it would work with Lisps which
don't recognize the #+franz readmacro.
-- 

Dana S. Nau,  Comp. Sci. Dept.,  U. of Maryland,  College Park,  MD 20742
dsn@maryland		seismo!umcp-cs!dsn		(301) 454-7932
Technical Details
Message-ID: <3844@umcp-cs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!husc6!seismo!umcp-cs!dsn
References: <3542@umcp-cs.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!husc6!seismo!umcp-cs!dsn
From: dsn@umcp-cs.UUCP (Dana S. Nau)
Newsgroups: net.lang.lisp
Subject: Re: Franz Lisp compiler problems
Message-ID: <3844@umcp-cs.UUCP>
Date: Tue, 14-Oct-86 11:31:25 EDT
Article-I.D.: umcp-cs.3844
Posted: Tue Oct 14 11:31:25 1986
Date-Received: Mon, 20-Oct-86 22:12:01 EDT
References: <3542@umcp-cs.UUCP>
Organization: Computer Sci. Dept, U of Maryland, College Park, MD
Lines: 56
Keywords: macros
Summary: summary of proposed solutions