axiom-developer
[Top][All Lists]
Advanced

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

RE: [Axiom-developer] Re: learning Lisp


From: Bill Page
Subject: RE: [Axiom-developer] Re: learning Lisp
Date: Mon, 5 Dec 2005 21:44:42 -0500

William,

On December 5, 2005 9:39 AM I wrote:
> ... 
> >
> > Bill Page wrote:
> > > I have been thinking about adding a section to the MathAction
> > > web site specifically about lisp, learning lisp, lisp as
> > > used in Axiom etc. If you have any ideas about this as someone
> > > who knows Axiom and wants to learn more about lisp, I would
> > > be very interested.
> William Sit wrote:
> >
> > That is a very good idea, especially the connection between
> > lisp and Axiom.
> 
> Good. Then perhaps with your help (This email is already the
> right kind of help.) then let's do it.
> ...

I tried this on MathAction:

\begin{axiom}
)lisp (setq $dalymode 't)
(defun foo (x y) (+ x y))
(foo 2 3)
\end{axiom}

but it doesn't work because what comes between the \begin{axiom}
and the \end{axiom} on MathAction is saved in a file, e.g.
called 'section_n.input' and then executed via the command
')read section_n.input'. Unfortunately it seems the 'dalymode'
does not apply to the ')read' command.

In order to illustrate "live" use of lisp on MathAction I think
I need to invent a new enviroment like this:

\begin{lisp}
(defun foo (x y)
  (+ x y))
(foo 2 3)
\end{lisp}

The text between \begin{lisp} and \end{lisp} would be saved to
a file called, e.g. 'section_n.lisp' and then executed with the
command ')lisp (load section_n.lisp)'. This would allow Axiom
interpreter commands, spad/aldor compiles and full multi-line
lisp expressions to appear on the same web page.

Comments?

Regards,
Bill Page.






reply via email to

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