[Top][All Lists]

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

Re: [Axiom-developer] Re: learning Lisp

From: William Sit
Subject: Re: [Axiom-developer] Re: learning Lisp
Date: Mon, 05 Dec 2005 04:01:28 -0500

Dear Bill, Jens, Ed and Tim:

Thanks for your pointers. 
More naive questions:

Bill Page wrote:
> The simplist way to "get into lisp" from within Axiom is the
> ')fin' command. See page 1018 of the Axiom book (book2.pdf):
> 1.10 )fin

Ok, that gets me into Boot. I was able to type a lisp expression and it got
evaluated. Now what? How do I read in a lisp file to evaluate a list of Lisp
expressions? Can I create a separate name-space (without having to prefix each
name with something like myname- )? (something like with prefix myname-?)

I downloaded lispbox, as recommended by you all, and installed the Windows
version. After some tries, I got it to start runemacs.exe (there was some
problem with paths, the usual trouble), and to a *scratch* buffer where it says:

; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

I am not interested in editing in emacs (as a last resort, I can cut and paste
into an emacs buffer), but rather how to run a process (lisp).  As far as I
know, it is only an edit buffer. Supposedly, lisp is already running? There is
no "prompt" to enter a lisp expression and everything I entered was treated like

I did spend some time reading help and Emacs manual, but they are all for
editing and I got lost quickly. I tried the compile under tools and it says

make -k test.l
make: Nothing to be done for `test.l'.

Compilation finished at Mon Dec 05 02:39:29

test.l has one line:
(defun f (x) (car x))

Can someone point me to the key-strokes for compile REPL (see below)?

Tim wrote:
> to run a lisp command you can use )lisp.
> if you want to run a lot of them from the command line do:
>  --> )lisp (setq $dalymode t)
> $dalymode says:
>   if the first character is a '('
>     then it is lisp
>     else it is axiom

That is nice. Your instructions are exactly what I was looking for. I can read
in a file (on Linux, but on Windows, there is the path problems). Is there any
danger I overwrite any system definitions? The functions defined survive after
(setq $dalymode nil) and another (setq $dalymode t), which is nice also. Are
these functions then available in Axiom somehow?

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.

That is a very good idea, especially the connection between lisp and Axiom.

I think I may be a very bad example since I am very clumsy with Linux, Emacs. I
prefer to learn by trial and error once I know the mechanics of the REPL. I do
not worry about the programming aspect or the editing aspect, only the
interface. So, for me, I think a brief description of how the interactive loop
goes is most important to get me started. (So under the Axiom environment, Tim's
secret mode instructions is already enough for me.) Specifically: I suggest the
page for learning lisp to include:

 The lisp environment you recommend, and why you recommend it
 how to start the lisp environment (including installation if not Axiom)
 how to quit the lisp environment
 how to interactively enter a lisp expression to get it evaluated
 how to read in a file of lisp expressions and get them evaluated
 how to save a session and if possible, reload a saved one to continue
(recomputing is ok)
 how to compile lisp libraries and have them loaded at start
 how to learn about lisp built-in functions

I think these are not specific to lisp at all and people should not have to read
a lot to start having some fun to experiment with a language. It should be like
a new "game": Easy to start playing, harder to master. As to learning lisp,
there are many books and good references and the page may list a recommended
few, but this is not as important as information on the environment to run lisp.
It would be nice to have the above available for each lisp environment



reply via email to

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