Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!tank.news.pipex.net!pipex!dish.news.pipex.net!pipex!dircon!rheged!simon
From: simon@rheged.dircon.co.uk (Simon Brooke)
Subject: Re: Lisp and AI:  Newbie Question
Message-ID: <DDLq76.uu@rheged.dircon.co.uk>
Organization: none. Disorganization: total.
References: <40il8r$8r7@geraldo.cc.utexas.edu>
Date: Sun, 20 Aug 1995 08:57:05 GMT
Lines: 86

Jason's article got a lot of responses but they didn't seem to me to
answer the question he posed. Seeing I was in exactly the same
position ten years ago, I've tried to address it more directly. I'm
posting my response because there may be others out there in a similar
position.

In article <40il8r$8r7@geraldo.cc.utexas.edu>,
Jason Fossen <jason.f@mail.utexas.edu> wrote:
>I'm a grad student in philosophy interested in AI.  I was considering
>taking a course in either Lisp or Prolog.  Now, even though I'm asking
>this in comp.lang.lisp, which should I learn and why?  

I don't know to what extent you are a logician. Prolog claims to be an
implementation of First Order Predicate Calculus, but of course FOPC
isn't computable (Turing). So it is FOPC with a 'closed world
assumption' -- which is to say 'anything I don't know to be true, and
can't infer from other things I already know, is false'. Furthermore,
the resolution algorithm used to implement Prolog isn't very
efficient.  Consequently, most real-world Prolog programs make heavy
use of the 'cut' operator, which defeats the concept both of a logic
language and of declarative coding.

In other words, for a logician Prolog is an ugly abortion. I *hate* it
-- not really because it's bad as because it's such a disappointment.
However, if you want to learn it, try:

Gibbins, P: _Logic with Prolog_: Oxford University Press, Oxford,
1988. ISBN: 0-19-859659-6

Lisp on the other hand I love. The first two or three weeks of
learning Lisp will probably tie your head in knots, and then it will
suddenly become clear. Lisp is a beautiful language for expressing and
exploring philosophico-logical problems. It is very clean and clear
and elegant.

It also keeps out of your way when you are working. You can
effectively ignore all the undergrowth of making the machine run, and
just describe the problem. You can work top down or bottom up. You can
run unfinished bits of code while you work out what the bits you
haven't tackled yet will do.

However, having said all that, Common LISP is a bit of an ugly
monster. <quavery voice on> Back in the good old days when I were a
young 'un we used to have a standing joke that InterLISP was like a
1950's Cadillac -- covered with chrome and glitz and with more bells
and whistles than you could shake a stick at, but if you wanted
something it was sure to be there; while Portable Standard LISP was
more like a vintage Bugatti -- clean and elegant, if a little spartan,
but by God it would get you there.

The modern comparison would be between Common LISP and Scheme. Scheme
is in my opinion the cleanest, most elegant Lisp yet (although it
doesn't support programming idioms which are dear to my antediluvian
heart), and it's where I would advise you to start.

For books, there's lots of good Lisp books, and for Scheme you must
not miss the classic

Abelman, H and Sussman, G J: _Structure and Interpretation of Computer
Programs_ : MIT Press, Cambridge, Massachusetts, 1985. ISBN: 0-262-01077-1

However that's a bit daunting for beginners, and I'd start with much
simpler things if I were you. Try:

Friedman, D P & Felleisen, M: _The Little LISPer_: MIT Press,
Cambridge, Massachusetts, 1987. ISBN: 0-262-56038-0

(which is very much an introductory text, but great fun) and

Coxhead, P: _Starting LISP for AI_: Blackwell Scientific Publications,
Oxford, 1987. ISBN: 0-632-01544-6

(also a beginners text, with good clear style, but takes you up to
the beginnings of knowledge representation, inference, and language
parsing. Also, usefully, explains how to use it's example programs
with many non-standard LISP variants)

Have fun! Remember, computers are only toys. Computers (and languages)
which are not fun to work with are only unsuccessful toys.


-- 
------- simon@rheged.dircon.co.uk (Simon Brooke)

			-- mens vacua in medio vacuo --

