[Top][All Lists]

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

Re: [Axiom-developer] Re: Boot, Virtual Machine

From: Gabriel Dos Reis
Subject: Re: [Axiom-developer] Re: Boot, Virtual Machine
Date: 22 May 2007 20:42:33 -0500

Stephen Wilson <address@hidden> writes:

| Greetings all,
| Its been a while since I posted to the list, The following has me
| curious.
| Gabriel Dos Reis <address@hidden> writes:
| > On Tue, 22 May 2007, address@hidden wrote:
| > 
| > | Using Boot means that we lose the macro capability of lisp,
| > 
| > No, you don't.  You can define macros at Boot level.  They get 
| > translated as macros at Lisp level.  It looks to me that most of your
| > objections stem from insufficient familairity with Boot than informed
| > assessment. 
| Gaby. Could you, please, give an informative example of how Boot
| macros translate into Lisp?  Perhaps an interesting example of how a
| Lisp macro could be translated into Boot?  Unfortunately, I do not
| understand Boot particularly well.  In my readings of the extant Boot
| code I have not noticed heavy use of macros.  However, I do understand
| Lisp.

Hi Stephen,

   The Boot macro system was there before I got interested in Boot.
Basically you define Boot macros the same way you define Boot
functions except that you replace the "==" token with "==>"
For example, if you can write the memeq macro as:

   memeq(e,l) ==>
     MEMBER(a,l, KEYWORD::TEST, function EQ)

that gets translated as:

   ; memeq(e,l) ==>
   ;   MEMBER(e,l, KEYWORD::TEST, function EQ)

   (DEFMACRO |memeq| (|bfVar#2| |bfVar#1|)
     (PROG ()
         (SUBLIS (LIST (CONS '|bfVar#2| |bfVar#2|)
                       (CONS '|bfVar#1| |bfVar#1|))
                 '(MEMBER |bfVar#2| |bfVar#1| :TEST #'EQ)))))

At some point, I had a patch to clean up the translation but:
  (1) there seems to be no use of macros in Boot codes
  (2) Given (1), it did not seem to be a pressing issue
  (3) Nobody raised the issue of not knowing how to write macros
      int Boot.

Note also that one always have the escape character (!) to 
insert raw Lisp code if one really wants to.

Is there any contrived used of macros in Axiom that is not covered by
the above scheme?

Eventually, I'll document Boot from user perspective and improve the
Boot translator in a way that helps people use it with confidence.

-- Gaby

reply via email to

[Prev in Thread] Current Thread [Next in Thread]