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: William Sit
Subject: Re: [Axiom-developer] Re: learning Lisp
Date: Tue, 06 Dec 2005 02:22:41 -0500

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

> > William Sit wrote:
> > Ok, that gets me into Boot.
> 
> No, that is not quite correct. )fin *does* get you into lisp.
> You are in the boot 'package' by default. [snipped]

Thanks for explaining that. Sorry I was lazy to look things up. Honestly, I try
to avoid learning BOOT! (It's not yet time to learn it; lisp comes first).

> > I was able to type a lisp expression and it got evaluated.
> > Now what?
> 
> :) well, the rest of lisp, of course! I really strongly
> recommend [snipped]

Will bear these in mind. Thanks.

> > How do I read in a lisp file to evaluate a list of Lisp
> > expressions?
> 
> A good place to start reading is here:
> 
> http://www.gigamonkeys.com/book/lather-rinse-repeat-a-tour-of-the-repl.html
> 
> You need to find out about the lisp command
> 
>   (load "hello.lisp")
> 
> > Can I create a separate name-space (without having to prefix
> > each name with something like myname- )? (something like with
> > prefix myname-?)
> >
> 
> Yes, certainly. See the stuff about packages above.

This is good. Thanks.
 
> >
> > 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.

That much I know. I actually had "learned" emacs commands many times, but they
never stick because I do not use emacs often enough. My favorite editor is PE2
(very old fashioned), combined with a Gateway2000 programmable keyboard.

[snipped]

> It is much better to use a reference that has a
> specific purpose like Seibel's book.

Will look at that.

> > Are these [lisp] functions then available in Axiom somehow?
> 
> Yes but function names in Axiom always have the syntax |name|
> with vertical bars on each side.

Ah, I noticed that, of course (it just didn't ring a bell).

[snipped]

> I really "hate" that this is a "secret mode". I do not think
> there should be any secret modes like this hidden in Axiom. If
> it is desirable to be able to input lisp expressions in the
> Axiom interpreter, then there should be a simple and open way
> to achieve this. For example:
> 
>   )set input mode lisp
> 
> or something like that.

If by this command we drop actually into lisp environment (like BOOT) that would
be more robust then passing through the Interpreter. May be a LISP) lisp package
(probably there already)?
What is the simplest way to create a lisp package? (OK, I should read ...)
 
> > 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
> 
> Because we are talking specifically about lisp in the context
> of Axiom and at present there is no recommended way to use "modern"
> tools like SLIME in Axiom, I would be content to discuss just the
> use of ')fin' and ')set input mode lisp'.

No, I meant things like lispbox environment, outside Axiom, since it was
recommended.
 
> >  how to interactively enter a lisp expression to get it evaluated
> 
> Page 1 of any lisp book usually has
> 
> (+ 1 1)

No, I don't mean lisp syntax. I mean how to get to something like a prompt where
you can begin to enter a lisp expression and then what key (for example ctrl-j
under emacs? I still have not get through that!) combo to get it evaluated.
 
[snipped]

> > It would be nice to have the above available for each lisp
> > environment recommended.
> >
> 
> Unless you really want to learn "modern" lisp, then I think
> the lisp modes in Axiom are enough.

Yes, I probably would start with just the Axiom environment once I learned the
REPL mechanics. Then depending on what I find lisp to be useful for, I may
explore other development environments.

Actually what gets me into Lisp is not the dicussions here (of course, it has
influence, but I know about that long ago and never has the incentive to learn
lisp). I came upon Gregory Chaitin's Algorithmic Information Theory by chance
(actually through a joke, attached below) who had written a lisp program to
compute Omega which he ran on a similated Lisp Interpreter written in
Mathematica (probably version 2 or 3). It seems his Lisp Interpreter code does
not work without modification and I have not yet figured out how to upgrade
(port) it.  I would like to learn something about AIT, lisp, Mathematica, and
Axiom at the same time with this study.

And now, for the joke that led me into this.

William
---
Enjoy this... 
  
Queen Elizabeth and Dolly Parton 
die on the same day and they both go
before an Angel to find out if they'll be admitted to Heaven. 

Unfortunately, there's only one space left that day, 
so the Angel must decide which of them gets in. 
The Angel asks Dolly if there's some particular  reason why she
should go to Heaven.

Dolly takes off her top and  says, 
 "Look at these, they're the most perfect breasts 
God ever created, and  I'm sure it will please God to 
be able to see them every day, for  eternity."

The Angel thanks Dolly, and asks Her Majesty the same  question. 
The Queen takes a bottle of Perrier out of her purse, 
shakes it up, and gargles. Then, she spits into a toilet and pulls the lever. 

The Angel says, "OK, your Majesty, you may go in." 

Dolly is outraged and asks, "What was that all about? 
I show you two of God's own perfect creations and you turn me down. 
She spits into a commode and she gets in! 
Would you explain that to  me?"

"Sorry, Dolly," says the Angel, "but even in Heaven, 






a royal flush beats a pair ...





no matter how big they are."




reply via email to

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