From: J.C. Roberts
Subject: History of Comment Style & Names
Date: 
Message-ID: <0go5o1hqdvgvd69op0281nd6fjhtur0fmb@4ax.com>
I'm curious about Lisp/CL history on a couple things. The first is line
comments in CL code. Though a single semi-colon works, in just about all
the CL source I've read, least two if not three or four semi-colons are
used for line comments.

Even more strange, I can't recall ever seeing the #| and |# block
comments actually used in any of the source I've read.

Is there any particular reasoning or history? (i.e. like it was easier
to see/notice in the good/bad old days before the prevalence of syntax
highlighting)

Though I recall the explanation given in Cadence SKILL docs (another
lisp variant) that the function name SETQ is basically derived from "Set
Quoted," I am yet to figure out what the "F" is for in SETF and GETF
-And yes, I'm almost afraid to ask. ;-)

BTW, Is it safe to assume CL is similar to SKILL in that using property
lists is more flexible but less efficient than using structures?

Call me odd, but learning the history and/or meanings just helps me
remember stuff.

Thanks,
JCR

From: Marco Antoniotti
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <C7Ggf.88$pa3.28671@typhoon.nyu.edu>
J.C. Roberts wrote:
> I'm curious about Lisp/CL history on a couple things. The first is line
> comments in CL code. Though a single semi-colon works, in just about all
> the CL source I've read, least two if not three or four semi-colons are
> used for line comments.
 >
 > Is there any particular reasoning or history? (i.e. like it was easier
 > to see/notice in the good/bad old days before the prevalence of syntax
 > highlighting)
 >

There are arcane parts of Emacs and related editors that use the number 
of semicolons to do indentation and other thingies.

The rules are

;;;; "Section" headers.

;;; Large comments

(defun foo (x)
    ;; This function returns the number...
    42 ; forty-two.
    )

Emacs and surrogates recognize these kind of comments.

> 
> Even more strange, I can't recall ever seeing the #| and |# block
> comments actually used in any of the source I've read.
> 

That is because balanced comments (and note that CL #|...|# balance 
properly, unlike C/C++ /* ... */) are usually used to just comment out 
large chunks of code or of small inline snippets.  As an aside, font 
lock under most Emacsen usually gets #| ... |# wrong.

> Though I recall the explanation given in Cadence SKILL docs (another
> lisp variant) that the function name SETQ is basically derived from "Set
> Quoted," I am yet to figure out what the "F" is for in SETF and GETF
> -And yes, I'm almost afraid to ask. ;-)
> 
> BTW, Is it safe to assume CL is similar to SKILL in that using property
> lists is more flexible but less efficient than using structures?

Generally yes.  Although using property lists is something to be handled 
with care in any case.  Also, AFAIK SKILL is a Scheme derivative.

Cheers
--
Marco
From: J.C. Roberts
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <lbj6o19ajlhnuoshvrtrqoahdgftknfp4k@4ax.com>
On Tue, 22 Nov 2005 09:42:41 -0500, Marco Antoniotti
<·······@cs.nyu.edu> wrote:


>J.C. Roberts wrote:
>> 
>> BTW, Is it safe to assume CL is similar to SKILL in that using property
>> lists is more flexible but less efficient than using structures?
>
>Generally yes.  Although using property lists is something to be handled 
>with care in any case.  Also, AFAIK SKILL is a Scheme derivative.
>

Cadence itself occasionally uses SKILL plists with reckless abandon in
their products but I tend to avoid plists when feasible. I'm still
reading through my stack of CL books and online docs, but hopefully the
correct care and feeding of CL plists will be covered someplace...

I noticed how you used defsystem for the configuration/ and environment/
portions of CLOCC/PORT. Would asking "why defsystem rather than
packages" open up yet another old-and-tired-debate of the CL world? 

I'm still trying to grasp the when/why for the two different approaches
and the "Successful Lisp" book didn't really cover that aspect.

Kind Regards,
JCR
From: Thomas F. Burdick
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <xcvy83gqxjm.fsf@conquest.OCF.Berkeley.EDU>
J.C. Roberts <···············@abac.com> writes:

> On Tue, 22 Nov 2005 09:42:41 -0500, Marco Antoniotti
> <·······@cs.nyu.edu> wrote:
> 
> 
> >J.C. Roberts wrote:
> >> 
> >> BTW, Is it safe to assume CL is similar to SKILL in that using property
> >> lists is more flexible but less efficient than using structures?
> >
> >Generally yes.  Although using property lists is something to be handled 
> >with care in any case.  Also, AFAIK SKILL is a Scheme derivative.

It has two dialects: one is a dynamically scoped Lisp-2, a sort of
MACLISP offshoot, with some random INTERLISPisms thrown in; the other
is a lexically scoped Lisp-1, which is an unambiguously Lispy Scheme.

> Cadence itself occasionally uses SKILL plists with reckless abandon in
> their products but I tend to avoid plists when feasible. I'm still
> reading through my stack of CL books and online docs, but hopefully the
> correct care and feeding of CL plists will be covered someplace...

CL has alists, plists, defstruct, and defclass.  plists are plists,
not dpls, so if a plist is empty, it's just (), not (nil).  Because of
this, it would be painful to use them like SKILL uses dpls, as
lightweight untyped objects.  In general, if something is an object
with object identity, use a STANDARD-OBJECT (from defclass) or a
STRUCTURE-OBJECT (from defstruct).  If it's just a collection of
key->value mappings, use alists or hash tables.  Or plists.  But in
general, Common Lispers use alists much much more often than plists.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | Free Mumia Abu-Jamal! |
     ,--'    _,'   | Abolish the racist    |
    /       /      | death penalty!        |
   (   -.  |       `-----------------------'
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: ··············@hotmail.com
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <1132689715.856284.312040@f14g2000cwb.googlegroups.com>
J.C. Roberts wrote:
> On Tue, 22 Nov 2005 09:42:41 -0500, Marco Antoniotti
> <·······@cs.nyu.edu> wrote:

>
> I noticed how you used defsystem for the configuration/ and environment/
> portions of CLOCC/PORT. Would asking "why defsystem rather than
> packages" open up yet another old-and-tired-debate of the CL world?
>
> I'm still trying to grasp the when/why for the two different approaches
> and the "Successful Lisp" book didn't really cover that aspect.

I'm not Marco, but to answer your question about defsystem vs. packages

Packages are collections of names. They are used to ensure that
different components of one or more systems use distinct names without
collision.

Defsystem is a way to describe the components that make up a system and
how they depend on each other. I.e., to describe in one place what
files need to get loaded/compiled in what order to bring the complete
system in working order into a Lisp image.

The analogous concepts in C++ are "namespaces" and "Makefiles"
From: Marco Antoniotti
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <MSIgf.91$pa3.27663@typhoon.nyu.edu>
J.C. Roberts wrote:

> I noticed how you used defsystem for the configuration/ and environment/
> portions of CLOCC/PORT. Would asking "why defsystem rather than
> packages" open up yet another old-and-tired-debate of the CL world? 

Packages and DEFSYSTEM are orthogonal concepts in CL Lisp.

I use Packages with DEFSYTEM all the time.  Actually you must.

Cheers
--
Marco
From: Ulrich Hobelmann
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <3ug8fbF10p9icU1@individual.net>
J.C. Roberts wrote:
> I'm curious about Lisp/CL history on a couple things. The first is line
> comments in CL code. Though a single semi-colon works, in just about all
> the CL source I've read, least two if not three or four semi-colons are
> used for line comments.
> 
> Even more strange, I can't recall ever seeing the #| and |# block
> comments actually used in any of the source I've read.

Good question.  I'm also never sure how many ;s to use.  AFAIK for 
one-liners it's just one ; and for block comments sometimes two, 
sometimes three, sometimes four ;s.

IMHO something else would make more sense than having a wall of ;;;;;;;; 
at the left margin.  Block comment syntax might be an alternative, but 
harder to read without highlighting the whole comment.  Of course, if 
you, like me, think that source code files are obsolete, that's not bad.

> Is there any particular reasoning or history? (i.e. like it was easier
> to see/notice in the good/bad old days before the prevalence of syntax
> highlighting)
> 
> Though I recall the explanation given in Cadence SKILL docs (another
> lisp variant) that the function name SETQ is basically derived from "Set
> Quoted," I am yet to figure out what the "F" is for in SETF and GETF
> -And yes, I'm almost afraid to ask. ;-)

My prejudice is that SETF means "set form", but I'm sure that some Lisp 
veterans can educate us :)

-- 
The road to hell is paved with good intentions.
From: Rob Warnock
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <zYSdnQusJvL9ZB_enZ2dnUVZ_tydnZ2d@speakeasy.net>
Ingvar  <······@hexapodia.net> wrote:
+---------------
| Ulrich Hobelmann <···········@web.de> writes:
| > Good question.  I'm also never sure how many ;s to use.  AFAIK for
| > one-liners it's just one ; and for block comments sometimes two,
| > sometimes three, sometimes four ;s.
| 
| Somewhen, somewhere, I read that the following should be used:
|  ; is for short comments tabbed towards the right from end-of-code
|  ;; is for short comments indented as the shource they refer to
|  ;;; is for comments starting on the beginning of the line
|  ;;;; is for comments at the top of a file, covering the whole file
+---------------

Well, one such "somewhere" is the CLHS itself:  ;-}

    http://www.lispworks.com/documentation/HyperSpec/Body/02_ddb.htm
    2.4.4.2 Notes about Style for Semicolon

    http://www.lispworks.com/documentation/HyperSpec/Body/02_ddbe.htm
    2.4.4.2.5 Examples of Style for Semicolon

These pretty much agree with what Ingvar said, except that in
code I've read the quadruple semicolon is often also used for
major section headings, especially in a large file...


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Edi Weitz
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <ubr0dkn1u.fsf@agharta.de>
On Tue, 22 Nov 2005 10:59:06 +0100, Ulrich Hobelmann <···········@web.de> wrote:

> I'm also never sure how many ;s to use.

  <http://www.lisp.org/table/style.htm#doc>

> My prejudice is that SETF means "set form", but I'm sure that some
> Lisp veterans can educate us :)

See this thread:

  <http://groups.google.de/group/comp.lang.lisp/browse_frm/thread/d4e1118d87d22aa7/ffad99a26dfa6b2e#ffad99a26dfa6b2e>

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: J.C. Roberts
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <i6s5o19pcd5u9vbs5laj9686f14g2bagsn@4ax.com>
On Tue, 22 Nov 2005 11:13:33 +0100, Edi Weitz <········@agharta.de>
wrote:

>See this thread:
>
>  <http://groups.google.de/group/comp.lang.lisp/browse_frm/thread/d4e1118d87d22aa7/ffad99a26dfa6b2e#ffad99a26dfa6b2e>
>
>Cheers,
>Edi.

Thanks Edi!

The irony is I was actually reading Chapter 3 of Peter's book when I
remembered that in all these years I had never figured out what the "F"
stands for in the SETF of SKILL. ;-)

JCR
From: Thomas F. Burdick
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <xcv3bloscm8.fsf@conquest.OCF.Berkeley.EDU>
J.C. Roberts <···············@abac.com> writes:

> On Tue, 22 Nov 2005 11:13:33 +0100, Edi Weitz <········@agharta.de>
> wrote:
> 
> >See this thread:
> >
> >  <http://groups.google.de/group/comp.lang.lisp/browse_frm/thread/d4e1118d87d22aa7/ffad99a26dfa6b2e#ffad99a26dfa6b2e>
> >
> >Cheers,
> >Edi.
> 
> Thanks Edi!
> 
> The irony is I was actually reading Chapter 3 of Peter's book when I
> remembered that in all these years I had never figured out what the "F"
> stands for in the SETF of SKILL. ;-)

Would that it were so, a setf in SKILL!

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | Free Mumia Abu-Jamal! |
     ,--'    _,'   | Abolish the racist    |
    /       /      | death penalty!        |
   (   -.  |       `-----------------------'
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: J.C. Roberts
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <goh7o1lvj17etjb8h8kr3sl377bt51c4fo@4ax.com>
On 22 Nov 2005 11:31:43 -0800, ···@conquest.OCF.Berkeley.EDU (Thomas F.
Burdick) wrote:

>> The irony is I was actually reading Chapter 3 of Peter's book when I
>> remembered that in all these years I had never figured out what the "F"
>> stands for in the SETF of SKILL. ;-)
>
>Would that it were so, a setf in SKILL!

Umm...?  -I think you're saying there is no SETF in SKILL and if so,
then yes, you are correct. I typed the wrong language name; I wrote
SKILL rather than CL.

JCR
From: Juho Snellman
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <slrndo5u19.mc1.jsnell@sbz-30.cs.Helsinki.FI>
<········@agharta.de> wrote:
> On Tue, 22 Nov 2005 10:59:06 +0100, Ulrich Hobelmann <···········@web.de> wrote:
>> My prejudice is that SETF means "set form", but I'm sure that some
>> Lisp veterans can educate us :)
> 
> See this thread:
> 
>  <http://groups.google.de/group/comp.lang.lisp/browse_frm/thread/d4e1118d87d22aa7/ffad99a26dfa6b2e#ffad99a26dfa6b2e>

The thread suggests both FORM and FIELD, but the original meaning was
FUNCTION :-) When the construct was first suggested it was called
SETFQ for "set with function quoted, everything else evaluated", and
only later abbreviated to SETF. (Source: the Gabriel/Steele "Evolution
of Lisp" paper in HOPL-II).

-- 
Juho Snellman
From: J.C. Roberts
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <tpk6o1h8n4f6fpfrbuv3qs9m57cmuhuqln@4ax.com>
On 22 Nov 2005 10:51:22 GMT, Juho Snellman <······@iki.fi> wrote:

><········@agharta.de> wrote:
>> On Tue, 22 Nov 2005 10:59:06 +0100, Ulrich Hobelmann <···········@web.de> wrote:
>>> My prejudice is that SETF means "set form", but I'm sure that some
>>> Lisp veterans can educate us :)
>> 
>> See this thread:
>> 
>>  <http://groups.google.de/group/comp.lang.lisp/browse_frm/thread/d4e1118d87d22aa7/ffad99a26dfa6b2e#ffad99a26dfa6b2e>
>
>The thread suggests both FORM and FIELD, but the original meaning was
>FUNCTION :-) When the construct was first suggested it was called
>SETFQ for "set with function quoted, everything else evaluated", and
>only later abbreviated to SETF. (Source: the Gabriel/Steele "Evolution
>of Lisp" paper in HOPL-II).

Thanks! I'm probably not the only one to find it odd to see Guy Steele
(CLTL) and Kent Pitman (CLHS) disagree on that one. ;-)

JCR
From: Steven M. Haflich
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <Aiakf.25466$dO2.3486@newssvr29.news.prodigy.net>
J.C. Roberts wrote:
> Even more strange, I can't recall ever seeing the #| and |# block
> comments actually used in any of the source I've read.

Of course not.  The reader skips everything inside #|...|# syntax
so how could you possibly remember having read it?

Seriously, this syntax is quite useful when you want to embed some
data in a source file that doesn't consist entirely of Lisp syntax.
I do this often when debugging, saving some previous interaction or
debugging output where it will be available when I next work on the
code.
From: Coby Beck
Subject: Re: History of Comment Style & Names
Date: 
Message-ID: <pslkf.232656$ir4.108158@edtnps90>
"Steven M. Haflich" <···@alum.mit.edu> wrote in message 
·························@newssvr29.news.prodigy.net...
> J.C. Roberts wrote:
>> Even more strange, I can't recall ever seeing the #| and |# block
>> comments actually used in any of the source I've read.
>
> Of course not.  The reader skips everything inside #|...|# syntax
> so how could you possibly remember having read it?

Cute ;)

> Seriously, this syntax is quite useful when you want to embed some
> data in a source file that doesn't consist entirely of Lisp syntax.
> I do this often when debugging, saving some previous interaction or
> debugging output where it will be available when I next work on the
> code.

I think I only use the #||# syntax while a file is under major developement. 
That is, as a temporary measure to remove large blocks, or contain half 
written stuff etc.  Getting rid of those such uses is part of wrapping 
things up if they have persisted a long time.

The final product will always use blocks of lines prefixed by ;;; for large 
comments.

-- 
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")