Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does GNU Common Lisp include the complete "loop" facility?

20 views
Skip to first unread message

Dave Stallard

unread,
Nov 3, 1995, 3:00:00 AM11/3/95
to
Hello,

Does anyone know if GCL 2.1 include the complete "loop" facility of
Common Lisp? I mean the real magilla with all the keywords ("when",
"collect", "thereis" etc. etc.) that wasn't present in the first (c.
1984) edition of the language. I ask because the GCL build I made
didn't seem to know about it, and the documentation only refers to
"loop" in its original incarnation as a simple repeat mechanism from
which an explicit return is required.

The hardcopy "GNU's Bulletin" of June 1995 says that GCL "supports the
CLtL1 specification but is moving towards the proposed ANSI definition".
If "CLtL1" means "1984" I suppose I am out of luck for the time being.

thanks, Dave

Jin S. Choi

unread,
Nov 4, 1995, 3:00:00 AM11/4/95
to
Common Music Notation (ftp-ccrma.stanford.edu:pub/Lisp/cmn.tar.gz)
comes with a loop implementation.

(As a side note, CMN itself doesn't run under the latest gcl 2.x,
although it did work successfully under gcl 1. Actually, I've found
that running it under CLISP is the best of all, as its lower memory
requirements save me from paging so I can run it faster than I ever
could under gcl. go fig.)


Erik Naggum

unread,
Nov 4, 1995, 3:00:00 AM11/4/95
to
[Dave Stallard]

| Does anyone know if GCL 2.1 include the complete "loop" facility of
| Common Lisp? I mean the real magilla with all the keywords ("when",
| "collect", "thereis" etc. etc.) that wasn't present in the first (c.
| 1984) edition of the language. I ask because the GCL build I made
| didn't seem to know about it, and the documentation only refers to
| "loop" in its original incarnation as a simple repeat mechanism from
| which an explicit return is required.

it's called "sloop" in GCL. (use-package :sloop) then (sloop ...).
I don't know how complete it is, but it seems somewhat different.

| The hardcopy "GNU's Bulletin" of June 1995 says that GCL "supports the
| CLtL1 specification but is moving towards the proposed ANSI definition".
| If "CLtL1" means "1984" I suppose I am out of luck for the time being.

"CLtL1" and "CLtL2" stand for Guy Steele's Common Lisp the Language,
editions 1 (published 1984) and 2 (published 1990), respectively.

ANSI Common Lisp was published in January 1995.

#<Erik 3024484076>
--
a good picture may well be worth a thousand words, but on the WWW,
even bad imagemaps cost tens of thousands of words.

Robert Sanders

unread,
Nov 4, 1995, 3:00:00 AM11/4/95
to
On 3 Nov 95 17:10:21, stal...@bbn.com (Dave Stallard) said:

> Does anyone know if GCL 2.1 include the complete "loop" facility of
> Common Lisp?

The version I'm running (2.0) has an sloop:sloop macro that seems
similar to CLtL2's loop. If that's not quite what you want, you can
probably find a few versions of CLtL2 loop in the Lisp repository. I
think I remember one being included with Bruno Haible et al's CLISP,
and GCL 2.1 may very well include one, too.

-- Robert
--
MindSpring: use us and nobody gets hurt.

Ingemar Hulthage

unread,
Nov 5, 1995, 3:00:00 AM11/5/95
to hulthage

The sloop macro in GCL is very unsatisfactory, in my opinion. (And so
is the loop facility in CLisp, for that matter.) I solve this problem
by loading the MIT-loop implementation into both GCL and Clisp. The
MIT-loop code can be downloaded from MIT and probably from many other
places, unfortunately I don't remember the exact path.

Good Luck,

Ingemar Hulthage

16920 Dulce Ynez Ln.
Pacific Palisades, CA 90272
(310) 459-3089 (voice & fax)
Email: hult...@usc.edu or
hult...@cinenet.net

Thomas Katzlberger

unread,
Nov 5, 1995, 3:00:00 AM11/5/95
to
Dave Stallard (stal...@bbn.com) wrote:
: Hello,

: Does anyone know if GCL 2.1 include the complete "loop" facility of
: Common Lisp? I mean the real magilla with all the keywords ("when",


: "collect", "thereis" etc. etc.) that wasn't present in the first (c.
: 1984) edition of the language. I ask because the GCL build I made
: didn't seem to know about it, and the documentation only refers to
: "loop" in its original incarnation as a simple repeat mechanism from
: which an explicit return is required.

I installed gcl-2.2beta last week and (loop for ...)
was not included then.

However the book:
Paradigms of Artificial Intelligence Programming:
Case Studies in Common Lisp
Copyright (c) 1991 Peter Norvig
supplies downloadable code that includes the missing
loop definitions.

Cat.
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/ _/_/
_/_/ Thomas Katzlberger _/_/
_/_/ kat...@vuse.vanderbilt.edu _/_/
_/_/ @aBlackNeXT.called.garfield _/_/
_/_/ http://www.vuse.vanderbilt.edu/~katzlbt/ _/_/
_/_/ _/_/
_/_/ "You can tune a file system, but you can't tune a fish." _/_/
_/_/ UNIX man page for tunefs. _/_/
_/_/ _/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Raymond Toy

unread,
Nov 7, 1995, 3:00:00 AM11/7/95
to
>>>>> "Thomas" == Thomas Katzlberger <kat...@vuse.vanderbilt.edu> writes:

Thomas> Dave Stallard (stal...@bbn.com) wrote: : Hello,

Thomas> I installed gcl-2.2beta last week and (loop for ...) was
Thomas> not included then.

Thomas> However the book: Paradigms of Artificial Intelligence
Thomas> Programming: Case Studies in Common Lisp Copyright (c)
Thomas> 1991 Peter Norvig supplies downloadable code that includes
Thomas> the missing loop definitions.

As an alternative, you can also get ansi-loop, a complete ANSI loop.
You do need to make one minor change for it to work:
special-operator-p should be changed to special-form-p (I think).

See the CMU Lisp archives.

Ray
--
----> Raymond Toy
----> Ericsson Inc.

Marco Antoniotti

unread,
Nov 7, 1995, 3:00:00 AM11/7/95
to
In article <4nbuqo3...@rcur7.rtp.ericsson.se> t...@rtp.ericsson.se (Raymond Toy) writes:


From: t...@rtp.ericsson.se (Raymond Toy)
Newsgroups: comp.lang.lisp
Date: 07 Nov 1995 09:24:44 -0500
Organization: Ericsson Inc., RTP, NC
Lines: 22
Sender: t...@rcur7.rtp.ericsson.se
References: <STALLARD.9...@mariano.bbn.com>
<47hbms$b...@news.vanderbilt.edu>
NNTP-Posting-Host: rcur7.rtp.ericsson.se
X-Newsreader: Gnus v5.0.7

>>>>> "Thomas" == Thomas Katzlberger <kat...@vuse.vanderbilt.edu> writes:

Thomas> Dave Stallard (stal...@bbn.com) wrote: : Hello,

Thomas> I installed gcl-2.2beta last week and (loop for ...) was
Thomas> not included then.

Thomas> However the book: Paradigms of Artificial Intelligence
Thomas> Programming: Case Studies in Common Lisp Copyright (c)
Thomas> 1991 Peter Norvig supplies downloadable code that includes
Thomas> the missing loop definitions.

As an alternative, you can also get ansi-loop, a complete ANSI loop.
You do need to make one minor change for it to work:
special-operator-p should be changed to special-form-p (I think).

The ansi-loop (which can be found in the AI.Repository of CMU) is
probably what gets closest to the standard. However I found that is
contains a couple of annoying type-checking warnings which do not seem
to make that much sense. I switched to the cmu-loop which can be
found in the same place.

The main problem with older GCL implementations is that they do not
support WITH-HASH-TABLE iterator yet. The advanced loop macros require
it.

As for the SPECIAL-FORM-P/SPECIAL-OPERATOR-P mess, do not change the
LOOP code. Instead add a

(setf (symbol-function 'special-operator-p) #'special-form-p)

(or whatever you deem appropriate in your Lisp) in the proper package
at startup.

Cheers
--
Marco Antoniotti - Resistente Umano
===============================================================================
International Computer Science Institute | mar...@icsi.berkeley.edu
1947 Center STR, Suite 600 |
Berkeley, CA, 94704-1198, USA | tel. +1 (510) 643 9153
===============================================================================
...it is simplicity that is difficult to make.
...e` la semplicita` che e` difficile a farsi.
Bertholdt Brecht

Raymond Toy

unread,
Nov 9, 1995, 3:00:00 AM11/9/95
to
>>>>> "Marco" == Marco Antoniotti <mar...@lox.icsi.berkeley.edu> writes:
Marco> The ansi-loop (which can be found in the AI.Repository of
Marco> CMU) is probably what gets closest to the standard.
Marco> However I found that is contains a couple of annoying
Marco> type-checking warnings which do not seem to make that much
Marco> sense. I switched to the cmu-loop which can be found in
Marco> the same place.

The type-checking warnings are due to bugs in gcl implementation of
subtypep and typep, I think. (subtypep 'fixnum 'real) is NIL instead
of T, and (typep 1 'real) is also NIL instead of T. These bugs should
be fixed in gcl 2.2.

Marco> The main problem with older GCL implementations is that
Marco> they do not support WITH-HASH-TABLE iterator yet. The
Marco> advanced loop macros require it.

This should also be fixed in gcl 2.2.

Marco> As for the SPECIAL-FORM-P/SPECIAL-OPERATOR-P mess, do not
Marco> change the LOOP code. Instead add a

Marco> (setf (symbol-function 'special-operator-p)
Marco> #'special-form-p)

Marco> (or whatever you deem appropriate in your Lisp) in the
Marco> proper package at startup.

Good idea. I'm a novice, so I just did something that made
it work without really thinking about the right way to do it.

0 new messages