From: Antoine
Subject: Which Lisp is this ?
Date: 
Message-ID: <cvg83vshiin0v387gb58h8gkl1f9j3qg9f@4ax.com>
Hello

I've just borrowed a book about Lisp, but the author tries to stay as
general as possible. I don't know which Lisp he uses. Here is an
example of a function found in this book:

(dls fac ( f n ) (if (= 0 n) 1 (* n (f (1- n)))))


-- 
> Apprends des maths dignes de ce nom... Ca s'appelle UNE permutation.
Non cela s'apelle PLUSIEURS PERMUTATIONS eff�ctu�es � la suite les
unes des autres.
-+- Lheureuxph in fr.misc.cryptologie - Les maths c'est pour les cons -+-

From: Gareth McCaughan
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <slrnb38o5r.2ufg.Gareth.McCaughan@g.local>
Antoine wrote:
>  Hello
>  
>  I've just borrowed a book about Lisp, but the author tries to stay as
>  general as possible. I don't know which Lisp he uses. Here is an
>  example of a function found in this book:
>  
>  (dls fac ( f n ) (if (= 0 n) 1 (* n (f (1- n)))))

http://dmn.schneider.free.fr/lisp1.html is a page describing
a Lisp interpreter called "Lisp1" written in Autolisp (why???),
which uses "dls" to mean something like "define lambda self".
The page includes an example more or less identical to yours.
According to http://dmn.schneider.free.fr/autolisp.html , this
Lisp implementation is inspired by one described in Emmanuel
Saint James's book called "La programmation applicative".

Does that help at all?

The definition you quote certainly isn't in any of { Common Lisp,
Scheme, Emacs Lisp, ISLISP }. The variety of Lisp defined on
that "lisp1.html" page looks very old-fashioned (FSUBRs, only
lists as data structures), and glancing at the implementation
is seems to be dynamically scoped. You might do better with a
more modern variety of Lisp...

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: Antoine
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <kst93vcjipnlcdich3rdn06qaeq8rst0nf@4ax.com>
On Sun, 26 Jan 2003 22:27:07 +0000, Gareth McCaughan
<················@pobox.com> wrote:

>Antoine wrote:
>>  Hello
>>  
>>  I've just borrowed a book about Lisp, but the author tries to stay as
>>  general as possible. I don't know which Lisp he uses. Here is an
>>  example of a function found in this book:
>>  
>>  (dls fac ( f n ) (if (= 0 n) 1 (* n (f (1- n)))))

>http://dmn.schneider.free.fr/lisp1.html is a page describing
>a Lisp interpreter called "Lisp1" written in Autolisp (why???),
>which uses "dls" to mean something like "define lambda self".
>The page includes an example more or less identical to yours.
>According to http://dmn.schneider.free.fr/autolisp.html , this
>Lisp implementation is inspired by one described in Emmanuel
>Saint James's book called "La programmation applicative".

ok. This is the book I've borrowed. 

>Does that help at all?
 yes it does

>The definition you quote certainly isn't in any of { Common Lisp,
>Scheme, Emacs Lisp, ISLISP }. The variety of Lisp defined on
>that "lisp1.html" page looks very old-fashioned (FSUBRs, only
>lists as data structures), and glancing at the implementation
>is seems to be dynamically scoped. You might do better with a
>more modern variety of Lisp...

I think I'll borrow anoter Lisp book, for an actual Lisp. Maybe Common
Lisp ? 
-- 
> Apprends des maths dignes de ce nom... Ca s'appelle UNE permutation.
Non cela s'apelle PLUSIEURS PERMUTATIONS eff�ctu�es � la suite les
unes des autres.
-+- Lheureuxph in fr.misc.cryptologie - Les maths c'est pour les cons -+-
From: Bruce Hoult
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <bruce-F0D093.22301727012003@copper.ipg.tsnz.net>
In article <··································@4ax.com>,
 Antoine <······@wanadoo.fr> wrote:

> I think I'll borrow anoter Lisp book, for an actual Lisp. Maybe Common
> Lisp ? 

That's a good idea.  Try Paul Graham's books.  You can read the first 
two chapters of his _ANSI Common Lisp_ on his web site at:

  http://www.paulgraham.com

There is also all of _On Lisp_, but that's a bit more advanced.

-- Bruce
From: Gareth McCaughan
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <slrnb3bl50.2ufg.Gareth.McCaughan@g.local>
Antoine wrote:

>  I think I'll borrow anoter Lisp book, for an actual Lisp. Maybe Common
>  Lisp ? 

That sounds like a good idea. Someone else recommended Paul Graham's
"ANSI Common Lisp", which is said to be good. There's a book called
"Successful Lisp" available for free on the web. Its author is David
Lamkins.

If reading one of these makes you want to learn more, an excellent
next book is Peter Norvig's "Paradigms of Artificial Intelligence
Programming: case studies in Common Lisp". (It's excellent even if
you're not interested in artificial intelligence.)

When you've learned a lot more about Lisp, you may want to read
Christian Queinnec's "Les langages Lisp", which is (1) very good,
(2) about Lisp and (3) written in French. It describes how
Lisp-like languages can be implemented, and contains a lot of
insight. Unfortunately (but inevitably) it's also quite difficult.

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: Michael Livshin
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <s3bs22ukmr.fsf@laredo.verisity.com.cmm>
Gareth McCaughan <················@pobox.com> writes:

> When you've learned a lot more about Lisp, you may want to read
> Christian Queinnec's "Les langages Lisp", which is (1) very good,
> (2) about Lisp and (3) written in French. It describes how
> Lisp-like languages can be implemented, and contains a lot of
> insight. Unfortunately (but inevitably) it's also quite difficult.

there's also an English translation, called "Lisp in Small Pieces".
the language it is translated into is almost, but not entirely,
unlike French; nevertheless it is quite readable.

-- 
Computer Science is embarrassed by the computer.
                -- Alan Perlis
From: Gareth McCaughan
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <slrnb3gk6p.2ufg.Gareth.McCaughan@g.local>
Michael Livshin wrote:

>  Gareth McCaughan <················@pobox.com> writes:
>  
> > When you've learned a lot more about Lisp, you may want to read
> > Christian Queinnec's "Les langages Lisp", which is (1) very good,
> > (2) about Lisp and (3) written in French. It describes how
> > Lisp-like languages can be implemented, and contains a lot of
> > insight. Unfortunately (but inevitably) it's also quite difficult.
>  
>  there's also an English translation, called "Lisp in Small Pieces".
>  the language it is translated into is almost, but not entirely,
>  unlike French; nevertheless it is quite readable.

Indeed. However, the person I was replying to happens to be French,
or at any rate francophile. I've read the book only in its English
translation, as it happens.

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: Michael Hudson
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <7h31y2x2wqe.fsf@pc150.maths.bris.ac.uk>
Gareth McCaughan <················@pobox.com> writes:

> If reading one of these makes you want to learn more, an excellent
> next book is Peter Norvig's "Paradigms of Artificial Intelligence
> Programming: case studies in Common Lisp". (It's excellent even if
> you're not interested in artificial intelligence.)

Or Common Lisp, I'd say :)

Cheers,
M.

-- 
  I believe C++ instills fear in programmers, fear that the
  interaction of some details causes unpredictable results.
                                        -- Erik Naggum, comp.lang.lisp
From: Gareth McCaughan
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <slrnb3gk87.2ufg.Gareth.McCaughan@g.local>
Michael Hudson wrote:

>  Gareth McCaughan <················@pobox.com> writes:
>  
> > If reading one of these makes you want to learn more, an excellent
> > next book is Peter Norvig's "Paradigms of Artificial Intelligence
> > Programming: case studies in Common Lisp". (It's excellent even if
> > you're not interested in artificial intelligence.)
>  
>  Or Common Lisp, I'd say :)

Yes. In fact, it's probably worth reading even for people who are
interested neither in artificial intelligence nor in Common Lisp.
However, the chances are that few such people will read it. :-)

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: Michael Hudson
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <7h3el6uygdn.fsf@pc150.maths.bris.ac.uk>
Gareth McCaughan <················@pobox.com> writes:

> Michael Hudson wrote:
> 
> >  Gareth McCaughan <················@pobox.com> writes:
> >  
> > > If reading one of these makes you want to learn more, an excellent
> > > next book is Peter Norvig's "Paradigms of Artificial Intelligence
> > > Programming: case studies in Common Lisp". (It's excellent even if
> > > you're not interested in artificial intelligence.)
> >  
> >  Or Common Lisp, I'd say :)
> 
> Yes. In fact, it's probably worth reading even for people who are
> interested neither in artificial intelligence nor in Common Lisp.

Oh, I meant to include that case as well.  Being interested in
programming is /probably/ helpful; anything more is unnecessary.

> However, the chances are that few such people will read it. :-)

True.  What should it be called instead?  "That bloke from Google
teaches you how to program"?

Cheers,
M.

-- 
112. Computer Science is embarrassed by the computer.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html
From: ilya
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <newscache$zm8f9h$e57$1@lnews.actcom.co.il>
Antoine wrote:
[snip]
> I think I'll borrow anoter Lisp book, for an actual Lisp. Maybe Common
> Lisp ? 

May be mpeg/divx lectures ? I think thise are very good :
http://www.swiss.ai.mit.edu/classes/6.001/abelson-sussman-lectures/
From: Pascal Bourguignon
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <87d6mj5zul.fsf@thalassa.informatimago.com>
Antoine <······@wanadoo.fr> writes:

> Hello
> 
> I've just borrowed a book about Lisp, but the author tries to stay as
> general as possible. I don't know which Lisp he uses. Here is an
> example of a function found in this book:
> 
> (dls fac ( f n ) (if (= 0 n) 1 (* n (f (1- n)))))

No idea.  It's even possible that  there remains no  system where that
lisp could run.  But in anycase you could use this macro to work it in
Common-Lisp (or emacs):

(defmacro dls (fname args &body body)
    `(defun ,fname ,args ,@body))


-- 
__Pascal_Bourguignon__                   http://www.informatimago.com/
----------------------------------------------------------------------
There is a fault in reality. Do not adjust your minds. -- Salman Rushdie
From: Matthew Danish
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <20030126174550.J27240@lain.cheme.cmu.edu>
On Sun, Jan 26, 2003 at 11:08:02PM +0100, Pascal Bourguignon wrote:
> Antoine <······@wanadoo.fr> writes:
> 
> > Hello
> > 
> > I've just borrowed a book about Lisp, but the author tries to stay as
> > general as possible. I don't know which Lisp he uses. Here is an
> > example of a function found in this book:
> > 
> > (dls fac ( f n ) (if (= 0 n) 1 (* n (f (1- n)))))
> 
> No idea.  It's even possible that  there remains no  system where that
> lisp could run.  But in anycase you could use this macro to work it in
> Common-Lisp (or emacs):
> 
> (defmacro dls (fname args &body body)
>     `(defun ,fname ,args ,@body))
> 

It won't work in Common Lisp, or at least it probably won't have the
desired effect, since it attempts to call the argument `f' as a
function, Lisp-1 style.

-- 
; Matthew Danish <·······@andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."
From: Kalle Olavi Niemitalo
Subject: Re: Which Lisp is this ?
Date: 
Message-ID: <87vg0ao1eg.fsf@Astalo.y2000.kon.iki.fi>
Matthew Danish <·······@andrew.cmu.edu> writes:

> It won't work in Common Lisp, or at least it probably won't have the
> desired effect, since it attempts to call the argument `f' as a
> function, Lisp-1 style.

  (defmacro dls (outer-name (inner-name &rest args) &body body)
    `(labels ((,inner-name (,@args)
  	       ,@body))
       (setf (fdefinition ',outer-name) #',inner-name)))