From: ·········@yahoo.com
Subject: Interested in learning LISP
Date: 
Message-ID: <1124648391.153039.310380@g44g2000cwa.googlegroups.com>
I would like to learn to program LISP. I have been
programming for 20 years more or less (C, Perl, Java,
Python, lots of Bash shell scripting). What is a good
book to learn for someone who already know how to
program?

If possible I am interested in a book that tackles the
more advanced material in detail (macros, lexical closures,
that kind of stuff). The book I got from the
library spent 5 chapters or so explaining what
a computer does (book was printed in 1982), then another
5 chapters explaining what variables are, and ended up
showing how to program the factorial function. Not good.
Are there LISP books for people who already know what
a computer does and what a variable is?

Finally: do you need 7 years at MIT to learn LISP, or
is it something doable for someone with a day job?

Thanks,

Fredegard

From: Pedro Kröger
Subject: Re: Interested in learning LISP
Date: 
Message-ID: <1124649306.634772.271080@g47g2000cwa.googlegroups.com>
·········@yahoo.com wrote:
> I would like to learn to program LISP. I have been
> programming for 20 years more or less (C, Perl, Java,
> Python, lots of Bash shell scripting). What is a good
> book to learn for someone who already know how to
> program?

Yes, Practical Common Lisp (PCL) is a book just for guys like you:

http://www.gigamonkeys.com/book/

It's freely available on the internet, but it's also available in
paper. *Highly* recommended.

> is it something doable for someone with a day job?

yes.
From: John
Subject: Re: Interested in learning LISP
Date: 
Message-ID: <slrndghkrb.25up.vsIJHKv2@mailinator.com>
On 2005-08-21, Pedro Kr�ger <············@gmail.com> wrote:
>  Yes, Practical Common Lisp (PCL) is a book just for guys like you:
> 
>  http://www.gigamonkeys.com/book/
> 
>  It's freely available on the internet, but it's also available in
>  paper. *Highly* recommended.

I was going to say the same thing. I'd start with that book.
From: JP Massar
Subject: Re: Interested in learning LISP
Date: 
Message-ID: <bdmhg19e92pfiacsbbrh7f4gpk6kq3jmnk@4ax.com>
On 21 Aug 2005 11:19:51 -0700, ·········@yahoo.com wrote:

 
>
>Finally: do you need 7 years at MIT to learn LISP, or
>is it something doable for someone with a day job?
>
 
It was five years back in 1978.  But with the  ANSI Standard circa
1995 they increased it to eight.

I think the president of MIT has proposed increasing it to 10 at the
latest faculty meeting, but the motion was referred to the Turing
committee for an  opinion on whether this silliness would ever stop. 
From: Nathan Baum
Subject: Re: Interested in learning LISP
Date: 
Message-ID: <deamv0$rfg$1@news7.svr.pol.co.uk>
·········@yahoo.com wrote:
> I would like to learn to program LISP. I have been
> programming for 20 years more or less (C, Perl, Java,
> Python, lots of Bash shell scripting). What is a good
> book to learn for someone who already know how to
> program?

PCL -- http://www.gigamonkeys.com/book/

You'll be recommended this time and again. There's a good reason. This 
covers many of those advanced topics other books will ignore. (Thanks to 
PCL, I finally grok restarts) Read it. Now.

SICP -- http://mitpress.mit.edu/sicp/

This isn't about Common Lisp, but still covers many concepts you won't 
have experienced in the language's you're used to.

On Lisp -- http://www.paulgraham.com/onlisp.html

More advanced techniques. Leave this 'till last.

Pascal's Guide -- http://p-cos.net/lisp/guide.html

A concise overview of everything with links to more detailed stuff. 
Looks nifty.

> 
> If possible I am interested in a book that tackles the
> more advanced material in detail (macros, lexical closures,
> that kind of stuff). The book I got from the
> library spent 5 chapters or so explaining what
> a computer does (book was printed in 1982), then another
> 5 chapters explaining what variables are, and ended up
> showing how to program the factorial function. Not good.
> Are there LISP books for people who already know what
> a computer does and what a variable is?
> 
> Finally: do you need 7 years at MIT to learn LISP, or
> is it something doable for someone with a day job?

I have a day job, I've been learning Common Lisp in my spare time for 
about three months, and I can already do things in hours that I couldn't 
do in days in C++ after several years of experience.

> Thanks,
> 
> Fredegard
> 
From: fireblade
Subject: Question re SICP & Scheme
Date: 
Message-ID: <1124693600.275222.241360@g49g2000cwa.googlegroups.com>
Nathan Baum wrote:
> SICP -- http://mitpress.mit.edu/sicp/
>
> This isn't about Common Lisp, but still covers many concepts you won't
> have experienced in the language's you're used to.


Isn't this book coded in Scheme ?
(define (prime-sum-pair list1 list2)
  (let ((a (an-element-of list1))
        (b (an-element-of list2)))
    (require (prime? (+ a b)))
    (list a b)))
Is this book worth it for somebody interested only
in Common Lisp (and why?) , as there is many good CL book only
and my time is scarce?
And if true how hard is to go through examples written in Scheme
for a CL-er as i'm not interested in learning another language.

thanks
bobi
From: Pedro Kröger
Subject: Re: Question re SICP & Scheme
Date: 
Message-ID: <1124704674.346429.279540@g44g2000cwa.googlegroups.com>
fireblade wrote:
> Nathan Baum wrote:
> > SICP -- http://mitpress.mit.edu/sicp/

> Isn't this book coded in Scheme ?

yes.

> Is this book worth it for somebody interested only in Common Lisp
> (and why?)

yes. because it has to do with ideas, abstractions and process, not
with languages.

I recommend you take a look at the 2 first reviews at amazon. They are
written by Peter Norvig and Paul Graham, two "common lispers":

http://www.amazon.com/exec/obidos/tg/detail/-/0262011530/002-7801386-1776069

> And if true how hard is to go through examples written in Scheme
> for a CL-er as i'm not interested in learning another language.

Some examples are very easy (trivial) to convert but I suppose others
will be more difficult (because of continuations, etc).

You may be interested also in the SICP video lectures:

http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures

Cheers,

Pedro Kröger
From: jayessay
Subject: Re: Question re SICP & Scheme
Date: 
Message-ID: <m3slx26nd8.fsf@rigel.goldenthreadtech.com>
"Pedro Kr�ger" <············@gmail.com> writes:

> fireblade wrote:

> > And if true how hard is to go through examples written in Scheme
> > for a CL-er as i'm not interested in learning another language.
> 
> Some examples are very easy (trivial) to convert but I suppose others
> will be more difficult (because of continuations, etc).

IMO, that actually makes them more interesting from the CL POV.
Educating along another line by drawing attention to tradeoffs.


/Jon

-- 
'j' - a n t h o n y at romeo/charley/november com
From: Tord Kallqvist Romstad
Subject: Re: Question re SICP & Scheme
Date: 
Message-ID: <gqkbr3oomoc.fsf@europa.uio.no>
"Pedro Kr�ger" <············@gmail.com> writes:

> Some examples are very easy (trivial) to convert but I suppose others
> will be more difficult (because of continuations, etc).

Are you sure?  I haven't opened my copy of SICP since several years,
but as far as I can remember continuations are not even mentioned in
the book.

-- 
Tord Romstad
From: Tayssir John Gabbour
Subject: Re: Question re SICP & Scheme
Date: 
Message-ID: <1124725760.908077.246150@f14g2000cwb.googlegroups.com>
fireblade wrote:
> Nathan Baum wrote:
> > SICP -- http://mitpress.mit.edu/sicp/
> >
> > This isn't about Common Lisp, but still covers many concepts you won't
> > have experienced in the language's you're used to.
>
>
> Isn't this book coded in Scheme ?
> (define (prime-sum-pair list1 list2)
>   (let ((a (an-element-of list1))
>         (b (an-element-of list2)))
>     (require (prime? (+ a b)))
>     (list a b)))
> Is this book worth it for somebody interested only
> in Common Lisp (and why?) , as there is many good CL book only
> and my time is scarce?
> And if true how hard is to go through examples written in Scheme
> for a CL-er as i'm not interested in learning another language.

It's a dialect of Scheme which doesn't have anything like macros. (They
do mention macros in one or two footnotes, saying they're a bit
unwieldy or dangerous or something. I don't remember exactly what.)
When they want to operate on code, it's by building an interpreter or
compiler.

The book is also biased against normal iteration constructs like DO and
LOOP. They instead teach how to use a recursive style which can be
silently optimized by Scheme to not chew up stack.

People claim (convincingly, I think) that it's useful for teaching
people how to use and understand functions. Helps people resist the
temptation of using macros too much.

Personally, I think people should skim it, maybe download one of the
video lectures, and see if it's the sort of thing which interests them
and is worth their current time. And it's not like people have to read
the whole thing; one can probably grok its perspective in a chapter or
two, and apply what might be useful to Common Lisp, dropping the rest.

One main criticism is that they're overly aesthetics-based. I agree
here too. I don't think they teach programming, but rather expand on a
useful, focussed subset of it. (Where's the arrays, for example?)


Tayssir
From: fireblade
Subject: Re: Question re SICP & Scheme
Date: 
Message-ID: <1124780194.848498.11180@f14g2000cwb.googlegroups.com>
The Norvig and Graham reviews were relly helping
,this books isn't for me .
thanks 2 all
From: Hrvoje Blazevic
Subject: Re: Question re SICP & Scheme
Date: 
Message-ID: <deekr9$mgc$1@ss405.t-com.hr>
fireblade wrote:
> The Norvig and Graham reviews were relly helping
> ,this books isn't for me .
> thanks 2 all
> 

An unfortunate decision. IMHO, everybody--(at least on c.l.s, and c.l.l) 
should read this book.

-- Hrvoje
From: Alan Crowe
Subject: Re: Question re SICP & Scheme
Date: 
Message-ID: <867jedvvp9.fsf@cawtech.freeserve.co.uk>
Tayssir John Gabbour wrote:
> It's a dialect of Scheme which doesn't have anything like
> macros. (They do mention macros in one or two footnotes,
> saying they're a bit unwieldy or dangerous or something. I
> don't remember exactly what.)  When they want to operate
> on code, it's by building an interpreter or compiler.

It is page 373

    Practical Lisp systems provide a mechanism that allows
    user to add new derived expressions and specify their
    implementation as syntactic transformations without
    modifying the evaluator. Such a user-defined
    transformation is called a /macro/. Although it is easy
    to add an elementary mechanism for defining macros, the
    resulting language has subtle name-conflict
    problems. There has been much research on mechnaisms for
    macro definitions that do not cause these
    difficulties. See, for example, Kohlbecker 1986, Clinger
    and Rees 1991, and Hanson 1991.

I stopped reading SICP soon after that.

I think that the biggest gap in my programming skills is
that I've only ever worked on very small programs and am
pretty clueless about the large (or even medium) scale
organisation of code. I thought that SICP was the book to
fill that gap. Page xviii promises 

    ... that students who complete this subject shuld have
    command of the major techniques for controlling
    complexity in a large system. They should be capable of
    reading a 50-page-long program, if it is written in an
    exemplary style.

The book starts very strongly. It emphasises creating
functions to access your data structures in ways that
correspond to the semantics of your domain. Although Scheme
isn't object oriented, they write some code in an object
oriented style. I feel that this has helped me understand
how I ought to be using CLOS. In particular I ought to think
of an object as possessing a protocol, ie a set of methods
that make it go. This is in contrast to thinking of an
object as possessing slots, ie it aggregates various bits of
data.

However I'm not so clueless that I cannot recognise macros
as one of the major techniques for controlling complexity in
a large system. The code earlier in SICP has a lot of boiler
plate that could be tidied up with macros. It would be very
natural at page 373 to introduce macros and go back and show
how to use them to control the complexity of the earlier
code.

Instead the book veers of in a different direction, going
into how a computer works, both how an interpreter works
and how a compiler works. This is a very worthwhile
direction for an undergraduate text. I do want to get back
to the book because it is a fascinating topic.

However I often read advice on c.l.l. that learning how lisp
works inside is a distraction from learning to write
applications, so I've laid SICP to one side.

> People claim (convincingly, I think) that it's useful for
> teaching people how to use and understand functions. Helps
> people resist the temptation of using macros too much.

I was particularly interested in learning to use macros the
right amount, neither too much, not too little, so I found
the SICP approach - we avoid over-use by not using them at
all - unhelpful.

Alan Crowe
Edinburgh
Scotland