From: ·········@gmail.com
Subject: A question makes me coufused
Date: 
Message-ID: <1183169804.178589.86770@x35g2000prf.googlegroups.com>
>From the lecture of SICP and the book, i found this dialect of LISP
named scheme has the ability to choose whether referring to a funtion
or evaluating the function  just by whether using '(' and ')' to
bracket the function...For example, the procedure -- SUM-SQ in the
lecture.

  (define (SUM term a next b)
    (if (> a b)
        0
        (+ (term a)
            (sum term (next a) next b))))

  (define (SUM-SQ a b)
     (SUM SQUARE a (lambda (x) (+ 1 x)) b))

  (define SQUARE (x) (* x x))

However, In CLisp, this do not work. As my thought, This fellowing
change is neccessary:

  (define (SUM term a next b)
    (if (> a b)
       0
       (+ (funcall term a)
           (sum term (funcall next a) next b))))

  (define (SUM-SQ a b)
    (SUM 'SQUARE a (lambda (x) (+ 1 x) b))

And i often got myself confused in when i should use the single quotes
or not in
some more complex situations....

So i have a question, is there another easier way to implement the
procedure
SUM in CLisp? Or, if this is already the best way, so why common Lisp
get rid of
this attributes?

From: Don Geddis
Subject: Re: A question makes me coufused
Date: 
Message-ID: <878xa2yu34.fsf@geddis.org>
··········@gmail.com" <·········@gmail.com> wrote on Fri, 29 Jun 2007:
> From the lecture of SICP and the book, i found this dialect of LISP
> named scheme has the ability to choose whether referring to a funtion
> or evaluating the function  just by whether using '(' and ')' to
> bracket the function

OK...

> However, In CLisp, this do not work.

By "CLisp", do you mean this specific implementation of ANSI Common Lisp:
        http://clisp.cons.org/
or do you mean ANSI Common Lisp in general, or something else?

In any case, Common Lisp is not Scheme.  They had similar origins long ago,
but you're due for no end of confusion if you're using a Scheme book, and
trying to do the exercises in a Common Lisp implementation.  You've
encountered only the first of what will be many, many, many differences and
incompatibilities.

If you want to use SICP, then get a Scheme implementation to work with.

If you want to use ANSI Common Lisp (e.g. CLisp), then get an introductory
textbook that uses and explains the language, like

        Practical Common Lisp
        http://www.gigamonkeys.com/book/

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

        ANSI Common Lisp
        http://www.paulgraham.com/acl.html

> Or, if this is already the best way, so why common Lisp get rid of this
> attributes?

You've touched on a long-standing topic, generally referred to as "Lisp-1"
vs. "Lisp-2".  You can search for Lisp-2 on the web or in the archives of this
newsgroup to learn more.  Kent Pitman also has an extensive analysis here:
        http://www.nhplace.com/kent/Papers/Technical-Issues.html

In any case, regardless of the merits of each approach, the historical
situation is that Lisp-2 was the first approach, and Scheme's Lisp-1 was a
later variant.  Hence, Common Lisp did not "get rid of this attributes", as
you asked.  It merely continued the same approach taken by the dialects that
inspired it.

        -- Don
_______________________________________________________________________________
Don Geddis                  http://don.geddis.org/               ···@geddis.org
If at first you don't succeed, skydiving is not for you.
From: ·········@gmail.com
Subject: Re: A question makes me coufused
Date: 
Message-ID: <1183191012.212929.222450@o11g2000prd.googlegroups.com>
On Jun 30, 11:55 am, Don Geddis <····@geddis.org> wrote:
> ··········@gmail.com" <·········@gmail.com> wrote on Fri, 29 Jun 2007:
>
> > From the lecture of SICP and the book, i found this dialect of LISP
> > named scheme has the ability to choose whether referring to a funtion
> > or evaluating the function  just by whether using '(' and ')' to
> > bracket the function
>
> OK...
>
> > However, In CLisp, this do not work.
>
> By "CLisp", do you mean this specific implementation of ANSI Common Lisp:
>        http://clisp.cons.org/
> or do you mean ANSI Common Lisp in general, or something else?
>
> In any case, Common Lisp is not Scheme.  They had similar origins long ago,
> but you're due for no end of confusion if you're using a Scheme book, and
> trying to do the exercises in a Common Lisp implementation.  You've
> encountered only the first of what will be many, many, many differences and
> incompatibilities.
>
> If you want to use SICP, then get a Scheme implementation to work with.
>
> If you want to use ANSI Common Lisp (e.g. CLisp), then get an introductory
> textbook that uses and explains the language, like
>
>         Practical Common Lisp
>        http://www.gigamonkeys.com/book/
>
>         On Lisp
>        http://www.paulgraham.com/onlisp.html
>
>         ANSI Common Lisp
>        http://www.paulgraham.com/acl.html
>

I do use the Scheme and  Ansi Common Lisp interpretaters separately.
What i was curious about is why that difference exists...

> > Or, if this is already the best way, so why common Lisp get rid of this
> > attributes?
>
> You've touched on a long-standing topic, generally referred to as "Lisp-1"
> vs. "Lisp-2".  You can search for Lisp-2 on the web or in the archives of this
> newsgroup to learn more.  Kent Pitman also has an extensive analysis here:
>        http://www.nhplace.com/kent/Papers/Technical-Issues.html
>
> In any case, regardless of the merits of each approach, the historical
> situation is that Lisp-2 was the first approach, and Scheme's Lisp-1 was a
> later variant.  Hence, Common Lisp did not "get rid of this attributes", as
> you asked.  It merely continued the same approach taken by the dialects that
> inspired it.
>
>         -- Don
> ___________________________________________________________________________�____
> Don Geddis                  http://don.geddis.org/              ····@geddis.org
> If at first you don't succeed, skydiving is not for you.

After searching "Lisp-1 Lisp-2" on the group, i noticed i had asked a
debatable question which once led to big discussion. Although i do not
quite understand all these discussions, i got an answer myself to my
question: May not are there specific reasons in the vanishing of this
attributes in Ansi Common Lisp, except some historical reasons.

Thanks for your reply. It helps.
From: Don Geddis
Subject: Re: A question makes me coufused
Date: 
Message-ID: <877iply15n.fsf@geddis.org>
··········@gmail.com" <·········@gmail.com> wrote on Sat, 30 Jun 2007:
> I do use the Scheme and  Ansi Common Lisp interpretaters separately.
> What i was curious about is why that difference exists...

Because they are different languages, of course.  Much like there are
differences between Scheme and C, or Scheme and Perl, or Scheme and Java.
There are thousands of differences.

Of course, Scheme and ANSI CL "look" more similar, at first glance.  But
they were really designed based on very different criteria.  It shouldn't be
a surprise that many of the details come out differently.

> After searching "Lisp-1 Lisp-2" on the group, i noticed i had asked a
> debatable question which once led to big discussion. Although i do not
> quite understand all these discussions, i got an answer myself to my
> question: May not are there specific reasons in the vanishing of this
> attributes in Ansi Common Lisp, except some historical reasons.

I'm not sure that I understand your last sentence there, but I gave you the
link to Kent Pitman's paper last time:
        http://www.nhplace.com/kent/Papers/Technical-Issues.html
That provides the pros and cons to BOTH approaches.

Just as a quick example: Schemers like to do functional programming all the
time, and want that to be syntactically simple.
        ((choose-a-func 3) 'a 'b)
Common Lispers do this more rarely, and appreciate a syntactic marker that
is kind of a warning ("something unusual is happening here!"):
        (funcall (choose-a-func 3) 'a 'b)

But at the same time, Schemers are forced to choose unique names
        (define (count lst)
          ... (list ... lst ...) ...)
whereas Common Lispers much prefer to reuse similar spellings for different
parts of speech
        (defun count (list)
           ... (list ... list ...) ...)

It's true that the #1 reason why Common Lisp is a Lisp-2, is because of
historical compatibility with previous dialects that inspired it, and those
dialects in turn were Lisp-2s perhaps for accidental reasons, rather than
carefully chosen theoretical ones.

But at the same time, even if backward compatibility were NOT important to
Common Lispers, it is still unlikely that they would chose to transform
ANSI CL into a Lisp-1.  There yet remain reasons to prefer Lisp-2s.

        -- Don
_______________________________________________________________________________
Don Geddis                  http://don.geddis.org/               ···@geddis.org
DEAR MISS MANNERS -- When someone brings sweet rolls to work for a treat,
  is it proper for people to cut them up and leave halves, quarters or
  eighths on the plate?
GENTLE READER -- Those who bring sweet rolls to work should not be quartered,
  much less eighthed.  They are only being nice.
From: Kent M Pitman
Subject: Re: A question makes me coufused
Date: 
Message-ID: <uejjte7rh.fsf@nhplace.com>
Don Geddis <···@geddis.org> writes:

> It's true that the #1 reason why Common Lisp is a Lisp-2, is because of
> historical compatibility with previous dialects that inspired it, and those
> dialects in turn were Lisp-2s perhaps for accidental reasons, rather than
> carefully chosen theoretical ones.

I doubt the reason was accidental.  It's a hard thing to do accidentally.
I suspect the original issue was either speed or aesthetics or both.

Speaking of history, the history of this discussion is that it's very
hard for people in the Scheme community to understand that Lisp2 could
be an aesthetic choice, and I think that's because the Scheme
community explicitly selects for people who think "implementational
simplicity" is synonymous with "aesthetic", and in part too because of
"accidents" of the kinds of abstraction featured in S&ICP.  But, in
fact, the Scheme sense of aesthetic is not the only possible one.  If
a theory of aesthetics could be said to be so single-dimensional, we
wouldn't need both watercolors and oil painting, we wouldn't need both
guitar and trumpet, etc.  We wouldn't need more than one human
language.  We are enriched by multiple points of view, not
impoverished by the presence of stubborn people refusing to see our
point of view.

> But at the same time, even if backward compatibility were NOT
> important to Common Lispers, it is still unlikely that they would
> chose to transform ANSI CL into a Lisp-1.  There yet remain reasons
> to prefer Lisp-2s.

Indeed.

- - - - 
Advanced reading follows, not really an answer to the above, just related
- - - -

Lisp2 is, in my mind, a metaphor for institutionalized pluralism.
That is, there is an inherent desire in the community for a diversity
of expression.  It's great for people to like and promote Lisp1 and
Scheme aesthetics as a possible way to view the world, but only as
long as they don't spend their time saying that people who think
otherwise are nothing other than confused.

Incidentally, I'm convinced that there's a syntactic space where the
two could meet and play even more happily.  I started once on a quest
to find that space, and ended up not quite finding it, but I felt like
I was getting close.  My attempts at this are in a half-written system
called Spiel, which was intended to be a Lisp-Omega that would accommodate
Lisp1 and Lisp2 compatibly within.  I puzzled out some of it, then just
ran out of time and left it unfinished at
 http://www.nhplace.com/kent/Half-Baked/index-spiel.html

Maybe someone inspired can make sense of what I wrote, though there's
a STRONG disclaimer at http://www.nhplace.com/kent/Half-Baked/ because
I wanted to note clearly that this isn't publication-quality stuff and
is called Half-Baked for a reason ... it's probably not for the faint
of heart to try to sort through.

If someone ever gets excited about following up on this, or doing
something similar, I'd personally think it was a worthy endeavor.
What I put there is not a working system, it was just a dump of a
bunch of code I had after a bunch of exploratory fiddling around.  But
if it could be made to work, it would seem like it could begin to
bridge the two communities in some important syntactic ways.  It
wouldn't address all the differences, but syntax is something that is
often a pretty extreme barrier.

So far no one's gotten that interested.  I wondered when I looked just
now if I designed the site badly so maybe the code was hard to find.
I simplified the link structure a bit just now, so maybe that will
improve things.
From: Frank Buss
Subject: Re: A question makes me coufused
Date: 
Message-ID: <1cd4ylhlqbyfs.1fs59h670x4z9.dlg@40tude.net>
·········@gmail.com wrote:

> I do use the Scheme and  Ansi Common Lisp interpretaters separately.
> What i was curious about is why that difference exists...

I don't know who wrote it the first time, but maybe this quote helps you:

Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."

Scheme was invented as an attempt to create a small and clean new Lisp.
Common Lisp is a large and good mix of multiple previous Lisp
implementations.

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Kent M Pitman
Subject: Re: A question makes me coufused
Date: 
Message-ID: <uk5tle9cf.fsf@nhplace.com>
··········@gmail.com" <·········@gmail.com> writes:

> After searching "Lisp-1 Lisp-2" on the group, i noticed i had asked a
> debatable question which once led to big discussion. Although i do not
> quite understand all these discussions, i got an answer myself to my
> question: May not are there specific reasons in the vanishing of this
> attributes in Ansi Common Lisp, except some historical reasons.

The answer to this is somewhat in the paper that Gabriel and I wrote about
this topic:
        http://www.nhplace.com/kent/Papers/Technical-Issues.html
That paper is a distillation of a longer paper that did not have the word
"Technical" in its title, and that went into additional issues that were
not restricted to the technical, including compatibility with tradition.
The difficulty in writing the paper was that he and I disagreed on many
issues in it, which is why we were tasked to write the paper together
for the X3J13 committee, and consequently if you're clever, you can read it
like a geologist reads fault lines as a conversation between two people (even
though it is not presented that way).  We were separated by distance, working
over email and never in person while writing it, and we only did two passes
each over the paper before we published it.  So when we disagreed, we often
just opened up space in the paper near where we disagreed and wrote 
counterpoint to what had just been said.  

It's worth knowing that like a political debate, where most people watch and
afterward think their candidate won, most people seem to read the paper 
and come out with either "so if it's that obvious, why don't people see that
it's reasonable for there to be the separation?" or else "so if it's that 
obvious, why did they leave it that way?" ... from which I interpret that
people intently read the parts they agree with and largely ignore the parts
they disagree with.  

But the issues you want to look for in the paper which are the primary
reasons that dominated the real decision are:

 - Ease of efficient implementation.
 - Difference in personal style.
 - Compatibility.
 - Aesthetics are not Canonical.
 
If the paper doesn't lay any of those out clearly enough (I didn't go back
to check), ask again and maybe I or someone else can expand.  But I might
as well not repeat myself if it's not needed.
From: Jeronimo Pellegrini
Subject: Re: A question makes me coufused
Date: 
Message-ID: <f6591b$m93$1@aioe.org>
On 2007-06-30, Don Geddis <···@geddis.org> wrote:
> If you want to use ANSI Common Lisp (e.g. CLisp), then get an introductory
> textbook that uses and explains the language, like
>
> (...)
>
>         On Lisp
>         http://www.paulgraham.com/onlisp.html

"On Lisp" isn't introductory at all, although it's an excellent book.

Anyway, besides the other two introductory books, there are also

Common Lisp: A Gentle Introduction to Symbolic Computation
http://www-2.cs.cmu.edu/~dst/LispBook/

Successful Lisp
http://psg.com/~dlamkins/sl/cover.html

And several other good books on Lisp:

http://www.cliki.net/Lisp%20books

J.