From: Thomas Gagne
Subject: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <UNqdnd1dhtY8d8DfRVn-tA@wideopenwest.com>
I'm going through _The Little Lisper_ and thought I'd try some of the 
expressions to see what happens.

(null? ()) complains as does
(atom? 3)

Does CL not define null? and atom? ?

From: Thomas Gagne
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <UNqdndxdhtYZdsDfRVn-tA@wideopenwest.com>
Nevermind.  It looks like the hook (?) isn't needed.  At this point in 
the book (page 10) it isn't clear if the hook was needed in an older 
version of Lisp or is to help the reader understand the function returns 
true/false (T/nil).

Thomas Gagne wrote:
> I'm going through _The Little Lisper_ and thought I'd try some of the 
> expressions to see what happens.
> 
> (null? ()) complains as does
> (atom? 3)
> 
> Does CL not define null? and atom? ?
From: ··············@hotmail.com
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <1113589687.552055.248880@l41g2000cwc.googlegroups.com>
The question-mark/hook `?' is a Scheme naming convention for
predicates, that is, functions that are meant to be true/false in
value. It has a similar naming convention using exclamation-point/bang
`!' for functions which work by `destructive' modification of memory.
From: Wade Humeniuk
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <4_l7e.27717$vt1.20502@edtnps90>
Thomas Gagne wrote:
> I'm going through _The Little Lisper_ and thought I'd try some of the 
> expressions to see what happens.
> 
> (null? ()) complains as does
> (atom? 3)
> 
> Does CL not define null? and atom? ?

Those functions are Scheme variants, not CL.  In CL it is:

CL-USER 1 > (null nil)
T

CL-USER 2 > (atom 3)
T

CL-USER 3 >

Wade
From: Eric Lavigne
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <1113477901.146445.101860@o13g2000cwo.googlegroups.com>
>I'm going through _The Little Lisper_ and thought I'd try some of the
>expressions to see what happens.

>(null? ()) complains as does
>(atom? 3)

>Does CL not define null? and atom? ?

I had the same problem. Trying to use a scheme book to learn common
lisp is not a good idea, but it wasn't obvious to me that it was a
scheme book. The biggest problem I ran into was functions. Use (defun
functionname (arguments) body) instead of (define functionname lambda
(arguments) body). Cond is also a bit different. I don't recall the
details for that one because I never use cond anymore, but I'm pretty
sure the CL version doesn't use square brackets.

If you want to learn scheme (or just a recursive style of defining
functions, which is sometimes useful), the Little Lisper might be a
good way to start. If you're trying to learn CL, consider Practical
Common Lisp:
www.gigamonkeys.com/book

The Little Lisper tries to show you that EVERYTHING can be thought of
as recursive. I've heard that scheme is the same way. Common Lisp, on
the other hand, will support a variety of styles and let you choose
something that is more appropriate for your problem. My first lisp
program, done for a class assignment, was a mess because I turned a
simple iterative problem into a complex recursive problem.
From: Thomas Gagne
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <z4adnSrqG6yU9cPfRVn-3w@wideopenwest.com>
Eric Lavigne wrote:
>>I'm going through _The Little Lisper_ and thought I'd try some of the
>>expressions to see what happens.
> 
> 
>>(null? ()) complains as does
>>(atom? 3)
> 
> 
>>Does CL not define null? and atom? ?
> 
> 
> I had the same problem. Trying to use a scheme book to learn common
> lisp is not a good idea, but it wasn't obvious to me that it was a
> scheme book.

Nor to me.  I guess the title, having "LISP" capitalized and everything 
led me to believe it was a Lisp book.  Silly me.

  The biggest problem I ran into was functions. Use (defun
> functionname (arguments) body) instead of (define functionname lambda
> (arguments) body). Cond is also a bit different. I don't recall the
> details for that one because I never use cond anymore, but I'm pretty
> sure the CL version doesn't use square brackets.

I haven't gotten that far yet.  I suppose I have Dr. Scheme on my laptop 
as well.  Heck.  If I'd know it was a Scheme book I'd have bought _The 
Little Schemer_.

> 
> If you want to learn scheme (or just a recursive style of defining
> functions, which is sometimes useful), the Little Lisper might be a
> good way to start. If you're trying to learn CL, consider Practical
> Common Lisp:
> www.gigamonkeys.com/book

I already have it -- I ordered them together.  I thought I'd try the 
"thin" book first.
From: Jonathan Bartlett
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <425ea392$1@news.tulsaconnect.com>
>> I had the same problem. Trying to use a scheme book to learn common
>> lisp is not a good idea, but it wasn't obvious to me that it was a
>> scheme book.
> 
> 
> Nor to me.  I guess the title, having "LISP" capitalized and everything 
> led me to believe it was a Lisp book.  Silly me.

Scheme is lisp, it just isn't Common Lisp.

Jon
----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017
From: Thomas F. Burdick
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <xcvwtr4a1w0.fsf@conquest.OCF.Berkeley.EDU>
Jonathan Bartlett <·······@eskimo.com> writes:

> >> I had the same problem. Trying to use a scheme book to learn common
> >> lisp is not a good idea, but it wasn't obvious to me that it was a
> >> scheme book.
> > 
> > 
> > Nor to me.  I guess the title, having "LISP" capitalized and everything 
> > led me to believe it was a Lisp book.  Silly me.
> 
> Scheme is lisp, it just isn't Common Lisp.

I don't think Scheme is a Lisp in any terribly useful sense, but it
manifestly *is* a LISP.
From: Christopher C. Stacy
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <upswws6o3.fsf@news.dtpq.com>
···@conquest.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> Jonathan Bartlett <·······@eskimo.com> writes:
> 
> > >> I had the same problem. Trying to use a scheme book to learn common
> > >> lisp is not a good idea, but it wasn't obvious to me that it was a
> > >> scheme book.
> > > 
> > > 
> > > Nor to me.  I guess the title, having "LISP" capitalized and everything 
> > > led me to believe it was a Lisp book.  Silly me.
> > 
> > Scheme is lisp, it just isn't Common Lisp.
> 
> I don't think Scheme is a Lisp in any terribly useful sense, but it
> manifestly *is* a LISP.

Let us suppose that Scheme is "not Lisp".
So what?
From: Tord Kallqvist Romstad
Subject: Re: Little LISPer : (null? ()) complains in LispBox and LispWorks
Date: 
Message-ID: <gqkis2p55n8.fsf@aload.uio.no>
Thomas Gagne <······@wide-open-west.com> writes:

> I haven't gotten that far yet.  I suppose I have Dr. Scheme on my
> laptop as well.  Heck.  If I'd know it was a Scheme book I'd have
> bought _The Little Schemer_.

It's the same book.  "The Little LISPer" is just an older edition.
From the preface of my copy of "The Little Schemer":

    To celebrate the twentieth anniversary of Scheme we revised 
    /The Little LISPer/ a third time, gave it the more accurate title
    /The Little Schemer/, and wrote a sequel: /The Seasoned Schemer/.

-- 
Tord Romstad