From: budden
Subject: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <c4ff25a0-8a63-4eb1-85fa-382bd3558af8@40g2000prx.googlegroups.com>
Hi group!
  Just the subject.
  CLHS says it is ok. Is it really ok in implementations?
  It is needed to fix iterate's conflict to other packages defining
'for macro.
  It if is ok, I'll do

(in-package :iterate)
(defsynonym :for for)
(defsynonym :in in)
(defsynonym :collect collect)
....
(in-package :my-package)
(import iter::iter)
(iter (:for i :in '(1 2 3)) (:collect i))

Synonym mechanism in iterate relies upon setting a property of a
symbol which we want to become a synonym. I want this synonym to be
from keyword package. So I need put a property on a keyword.

This works in lispworks, clisp and sbcl and this should work in any cl
implementation.
Are there some advices if it does really work?

With best regards,
Budden

From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <60641c2e-d779-4754-aa31-183b21cf0264@1g2000prd.googlegroups.com>
Additionally, is it ok to
(defun :foo () 1)
This works in those three cl implementation and I found nothing in a
standard which would forbid that.

It is required for allow iterate special clauses like "finally" to be
keywords too.
From: John Thingstad
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <op.ujz4bulzut4oq5@pandora.alfanett.no>
P� Sun, 02 Nov 2008 17:36:03 +0100, skrev budden <········@mtu-net.ru>:

> Additionally, is it ok to
> (defun :foo () 1)
> This works in those three cl implementation and I found nothing in a
> standard which would forbid that.
>
> It is required for allow iterate special clauses like "finally" to be
> keywords too.

No, that is not OK. Keywords are exported to all packages. This if OK if  
ONLY symbol-name is defined. Think of it. Keywords are just stand in for a  
string so it is parsed more efficeintly. So even if it is used in  
diffenent context's it doesn't matter. But if you start defining  
symbol-function or symbol-value as well then it becomes context dependent  
and all sorts of conflicts can occur. So let variables and functions  
belong to a package and only use :notation for keywords.

-------------
John Thingstad
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <d68d842b-cf85-4918-852e-73ce01bdcd0d@p31g2000prf.googlegroups.com>
Thanks John. I was not talking about a symbol-value.

Finally I found a way to fix iterate so that symbol-function is not
required to bind. Only property lists of several keywords are altered.
This patch allows co-existance of iterate with such macros as for,
collecting, etc. which can be found in misc libraries. No import from
iterate package (except iter:iter maybe) is required now to make
iterate work peacefully in any package.
If someone is interested, I might publish it.

Definitely, iterate can be altered more deeply to avoid putting even a
properties on a :keyword, but I'm too lazy to do that.

I think no-one would ever use a property list of keyword, and if one
would, he would put/get one's own properties, not that defined by
iterate package. So, property conflict seem to be unlikely.

Though this seem to be a bit messy... I didn't expect CL allows any
bindings to a constants, but it does.
From: John Thingstad
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <op.uj146cjyut4oq5@pandora.alfanett.no>
P� Mon, 03 Nov 2008 13:58:43 +0100, skrev budden <········@mtu-net.ru>:

> Thanks John. I was not talking about a symbol-value.
>
> Finally I found a way to fix iterate so that symbol-function is not
> required to bind. Only property lists of several keywords are altered.
> This patch allows co-existance of iterate with such macros as for,
> collecting, etc. which can be found in misc libraries. No import from
> iterate package (except iter:iter maybe) is required now to make
> iterate work peacefully in any package.
> If someone is interested, I might publish it.
>
> Definitely, iterate can be altered more deeply to avoid putting even a
> properties on a :keyword, but I'm too lazy to do that.
>
> I think no-one would ever use a property list of keyword, and if one
> would, he would put/get one's own properties, not that defined by
> iterate package. So, property conflict seem to be unlikely.
>
> Though this seem to be a bit messy... I didn't expect CL allows any
> bindings to a constants, but it does.

I think you missed my point completely. I thought you knew how keywords  
worked, but apparently you don't.
I can try to explain what I meant. When you enter :name it is captured by  
the reader. The reader translates that to something like (intern "name"  
"KEYWORD").
KEYWORD is a separate package. Intern means if it doesn't exist a symbol  
is created, otherwise the pointer to the existing one is returned. So each  
symbol with a : is front of it gets allocated in the keyword package. This  
is convenient as you need a place to store then. Byound that look up  
SYMBOL. (apropos "SYMBOL") You have symbol-name, symbol-function,  
symbol-variable, symbol-plist and others. When you write (defun :foo  
(...)) it translates to something along the lines as
(setf (symbol-function (intern "FOO" "KEYWORD)) (compile '(...)))
I hope in ligt of this my previous post makes more sense.

--------------
John Thingstad
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <8bc0dfad-eda4-4476-bd56-68f07200310b@t39g2000prh.googlegroups.com>
John, I think I understood well what you said. No need to explain how
lisp works. I know it rather well. The question was more about style/
caveats/portability.

I don't like to make any bindings to keywords too, but iterate
( http://common-lisp.net/project/iterate/doc/
 ) uses "clause indexing" which makes it is not so easy to modify it.
Whan defining a synonym for iterate clause, iterate adds a property to
a symbol. Iterate is a common use utility. I don't want to
write
(iter:iter (iter:for i in '(1 2 3)) (iter:collecting x))


But when I try to (use-package :iterate), it conflicts with, say, cl-
utilities.
The best way to avoid a conflict seem to make keywords behave as a
heads of
iterate clauses:

(iter:iter (:for i :in '(1 2 3)) (:collecting i))
vs loopy
(loop :for i :in '(1 2 3) :collect i)

And now I have that done with an expence of:
i) modifying couple lines in iterate
ii) putting a property 'iter::synonym to that
keywords :for , :collecting, etc.
It is not good to add even a properties to constants (I know it), but
for me it is an acceptable price for that convinience.
From: Tamas K Papp
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <6n9ap4Fk2vebU1@mid.individual.net>
On Mon, 03 Nov 2008 13:08:47 -0800, budden wrote:

> But when I try to (use-package :iterate), it conflicts with, say, cl-
> utilities.

(defpackage my-lisp-project
  (:use :common-lisp :iter :cl-utilities)
  (:shadowing-import-from :iterate :collecting :collect))

You get the idea.

HTH,

Tamas
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <6b4f13d4-0ea5-48d1-97ba-4f5c1d9c9379@b38g2000prf.googlegroups.com>
> (defpackage my-lisp-project
>   (:use :common-lisp :iter :cl-utilities)
>   (:shadowing-import-from :iterate :collecting :collect))

I first faced to this problem while playing to Symbolicweb. This
package was previously like this:

(defpackage symbolicweb
  (:use :common-lisp :cl-utilities)
or maybe
  (:import-from :cl-utilities :collecting))

To fix that, I'd need either modify all Lars's code. I.e., change
`collecting' to `cl-utilities:collecting' everywhere and so on. It was
impossible, of course for me as a new developer with very limited
"responsibility area". Making new, second package for me was not an
option too. Currently I'm not participating in Symbolicweb, and Lars
ain't using iterate still. Would he like to have this inconvinience?

What goes to style, loop uses :keywords, iterate is promoted as a
substitute for loop. Why should iterate be less convinient than loop?
From: Tamas K Papp
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <6n9p22Fjtd7aU1@mid.individual.net>
On Mon, 03 Nov 2008 14:18:19 -0800, budden wrote:

>> (defpackage my-lisp-project
>>   (:use :common-lisp :iter :cl-utilities) (:shadowing-import-from
>>   :iterate :collecting :collect))
> 
> I first faced to this problem while playing to Symbolicweb. This package
> was previously like this:
> 
> (defpackage symbolicweb
>   (:use :common-lisp :cl-utilities)
> or maybe
>   (:import-from :cl-utilities :collecting))

I am baffled by what you are trying to do or what your problems are.  
What does "playing to Symbolicweb" mean?  If you are experimenting with 
something, define your own package, import what you need, and resolve 
conflicts to your liking.

> To fix that, I'd need either modify all Lars's code. I.e., change
> `collecting' to `cl-utilities:collecting' everywhere and so on. It was

I never had to modify anyone's packages because of symbol name clashes.  
Either your import them or you don't, in the latter case if symbols 
clash, you shadow some of them, end of the story.

> "responsibility area". Making new, second package for me was not an
> option too.

Why not?

> What goes to style, loop uses :keywords, iterate is promoted as a
> substitute for loop. Why should iterate be less convinient than loop?

Iterate is very convenient to use.  You just don't grok packages.  Please

1) read the appropriate chapter in PCL,
2) if you still don't get it, give up on Lisp.  Seriously.  It will save 
a lot of frustration for you in the long run.

HTH,

Tamas
From: John Thingstad
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <op.uj29tufxut4oq5@pandora.alfanett.no>
P� Tue, 04 Nov 2008 03:06:58 +0100, skrev Tamas K Papp <······@gmail.com>:

>
> Iterate is very convenient to use.  You just don't grok packages.  Please
>
> 1) read the appropriate chapter in PCL,
> 2) if you still don't get it, give up on Lisp.  Seriously.  It will save
> a lot of frustration for you in the long run.
>
> HTH,
>
> Tamas

This is a better descripion of packages:
www.flownet.com/gat/packages.pdf

--------------
John Thingstad
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <a3e6046b-16e2-45e8-9ef6-36ab2e470b92@v16g2000prc.googlegroups.com>
I intended to take a part in a symbolicweb development and so I needed
iterate imported in an :sw package itself.
From: John Thingstad
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <op.uj3rfyzout4oq5@pandora.alfanett.no>
P� Tue, 04 Nov 2008 16:57:23 +0100, skrev budden <········@mtu-net.ru>:

> I intended to take a part in a symbolicweb development and so I needed
> iterate imported in an :sw package itself.

Am I guessing right in that you want to rename symbols?
as in alias

--------------
John Thingstad
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <ccdde8cb-8e63-4c0d-a213-c19a266080eb@b38g2000prf.googlegroups.com>
No, you still have two tries :)

Maybe it would be useful to read this first

http://common-lisp.net/project/iterate/doc/Extensibility-Aids.html#index-defsynonym-126

(read about defsynonym only).
From: John Thingstad
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <op.uj3v29feut4oq5@pandora.alfanett.no>
P� Tue, 04 Nov 2008 18:09:59 +0100, skrev budden <········@mtu-net.ru>:

> No, you still have two tries :)
>
> Maybe it would be useful to read this first
>
> http://common-lisp.net/project/iterate/doc/Extensibility-Aids.html#index-defsynonym-126
>
> (read about defsynonym only).
>

Actually I use iterate on a daily basis.
I just don't seem to have a problem with it.
And I have never used defsynonym.

--------------
John Thingstad
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <d8222860-cc7f-4e56-a3c9-fa0588952e7e@x16g2000prn.googlegroups.com>
Well, I wrote it before, but I'll repeat:

I'd like to use both cl-utilities and iterate.
cl-utilities define collecting macro. iterate defines collecting
clause. It is a conflict.

Besides this,
(iter (:for x :in-package :iterate :external-only t) (:counting x)) =>
54

There are also such clauses as with, for, sum, repeat, multiply which
very likely to cause symbol clashes to any general purpose library.

Shadowing-importing is not always possible (e.g. it was not possible
for me with Symbolicweb) and it does not fit my taste. Maybe someone
likes to waste one's time and introduce a mess into one's code by
copypasting defpackage forms for using libraries every time he starts
a new package, I dislike that and I would never like that. It's easier
for me to fix it and forget about it. It is just "keep it simple"
principle.

Also I find inconvinient this:
(iter:iter (iter:for x in-package :iterate external-only t)
(iter:counting x))
; nothing is imported from iterate

And even less convinient is
(iter (for x in-package :iterate external-only t)
      (iter:collect x))
; that is, only some of iterate symbols are imported to my-package. It
especially bad if list of imported
symbols changes from my-package to another-my-package.

I found it possible to make iterate to use keywords
http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_k.htm#keyword

for clauses instead of exported symbols from iterate package via
defining synonyms and altering iterate itself. This is can be done in
a rather clean way, but it costs putting a property on keywords which
identify a clauses. All this is done and may be shared (if someone is
interested). So I import only iter:iter which is not that
conflicting.

Yes, I know what a keyword is, and I have revisited that section of
CLHS and read it thoroughly before posting. Please don't give me an
advice to read CLHS (or some other manual) again. If you don't
understand me it might mean you didn't read a topic carefully.

Also, please do not tell me it is a bad style to use keywords instead
of ordinary symbols: I think it is a good style.

What I ask is: what are the pitfalls of putting a property on a
keyword? I find no problems to it in a CLHS and in the three
implementation I tested, but I suppose there may be the following
ones:
i) incorrect CL implementation which do not allow that at all, as
keywords are implemented in a special way (e.g. I've heard somewhere
about "weak"
ii) incorrect implementations which do not keep keyword properties
iii) maybe some popular hackish library which might use keyword plists
( http://www.lispworks.com/documentation/HyperSpec/Body/f_symb_4.htm )
as a whole and would fail if it contains something initially.

With best regards,
Budden
From: John Thingstad
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <op.uj34plxaut4oq5@pandora.alfanett.no>
P� Tue, 04 Nov 2008 21:21:53 +0100, skrev budden <········@mtu-net.ru>:

> Well, I wrote it before, but I'll repeat:
>
> I'd like to use both cl-utilities and iterate.
> cl-utilities define collecting macro. iterate defines collecting
> clause. It is a conflict.

(import-from ...)


(cl-utillities:collect ...)

--------------
John Thingstad
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <07e00819-8fd5-4111-ac70-4eac8dd01210@a3g2000prm.googlegroups.com>
Johns, thanks for your assistance.

Before giving up my trials to explain why it does not fit, I'll try to
explain this one more time.

I participated in a symbolicweb project. This project had
(defpackage :symbolicweb (:use :cl-utilities)) And it had already a
lot of references to collecting.

It is not good (and I didn't had an authority to) go over code and
change collecting to cl-utilities:collecting everywhere. Making a
second package is evidently not an option too. The rest of it is
described above.

And (as I wrote before, now repeating), iterate exports too many
symbols with very general names. Today I'll fix cl-utilities, tomorrow
the conflict would occur again with some other library. Using a
keywords allows not to improt anything from iterate. So no conflicts.

And, again, no one answers the questions I ask.
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <8799d9c3-906a-4e25-a672-8db7c734a06a@i24g2000prf.googlegroups.com>
Hmm, I noticed that I didn't explain one detail rather explicitly. I
planned to _join_ Symbolicweb development. So, there was a large
amount of code already at the moment I tried to introduce an iterate.
It is a significant circumstance and may be this was a main reason of
misunderstanding.
From: Tamas K Papp
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <6ne4pkFl7ahnU1@mid.individual.net>
On Wed, 05 Nov 2008 09:07:40 -0800, budden wrote:

> And, again, no one answers the questions I ask.

That should be a clue.

Tamas
From: Kaz Kylheku
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <20081105114439.346@gmail.com>
On 2008-11-05, Tamas K Papp <······@gmail.com> wrote:
> On Wed, 05 Nov 2008 09:07:40 -0800, budden wrote:
>
>> And, again, no one answers the questions I ask.
>
> That should be a clue.

He has a point in that if you're using some package that defines a COLLECTING
symbol, oft-used in your code, then using iterate's COLLECTING throughout the
same codebase will be a pain in the butt.

Looking at the iterate source, it appears it would be very easy to hack it to
provide keyword synonyms for all of the clauses, allowing for :COLLECTING to be
used instead of ITERATE:COLLECTING.
From: Tamas K Papp
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <6necrpFl335hU1@mid.individual.net>
On Wed, 05 Nov 2008 19:51:10 +0000, Kaz Kylheku wrote:

> On 2008-11-05, Tamas K Papp <······@gmail.com> wrote:
>> On Wed, 05 Nov 2008 09:07:40 -0800, budden wrote:
>>
>>> And, again, no one answers the questions I ask.
>>
>> That should be a clue.
> 
> He has a point in that if you're using some package that defines a
> COLLECTING symbol, oft-used in your code, then using iterate's
> COLLECTING throughout the same codebase will be a pain in the butt.

My impression was that he is not trying to modify iterate, but overhaul 
the Lisp package mechanism because of minor difficulties he encountered 
using iterate.  Certainly an interesting approach.

> Looking at the iterate source, it appears it would be very easy to hack
> it to provide keyword synonyms for all of the clauses, allowing for
> :COLLECTING to be used instead of ITERATE:COLLECTING.

You can already use keywords everywhere else but the clause name, eg

(iter
  (for i :from 2 :to 5)
  (summing i))

I always do this, at it also plays nice with Emacs's syntax highlighting. 
A modification of iterate which only used keywords would be nice.  So why 
doesn't budden fix that instead of redesigning CL?

Tamas
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <38d29db0-4e28-40c4-a217-f6e9885a741e@i20g2000prf.googlegroups.com>
Greetings, Kaz!
  You seem to be the second person after Lars who understood me.
  And I found one analogy in addition to loop. Why does cl-who
suggests
(:a (:href ...)) instead of (a (href ...))? It is due to the same
clearness of that: you'll never get symbol conflicts, your html
pseudocode looks just the same in any package. This is the same thing
that I have already done to iterate.

> So why doesn't budden fix that instead of redesigning CL?
Hmmm is my English really so poor? I have this done already and I
reported this fact three of for times in the topic. Or is this a
prejudice?

Didn't tested, but
(iter (:for i :from 1 :to 10) (:collect i))
works on a Lispworks personal for windows and on an sbcl 1.0.20. Some
more iterate constructs worked too. Iterate was loaded with asdf-
install/asdf in both cases. Original file iterate.lisp has version
1.4.3.

I took a more look at a source now. I found I use what actually is a
named function in an iterate and it is called keywordize. Maybe what I
did is not that correct and a simple approach is possible. But that is
enough for me. Maybe someone more smarter would do it.

>>>>>>>>>>>>>>>>>>>patch follows
*** iterate-orig.lisp	2008-11-06 00:41:31.000000000 +0300
--- iterate.lisp	2008-11-06 01:11:42.000000000 +0300
***************
*** 797,807 ****
    ;; example.  Plus, we want to catch Iterate special clauses.
    (assoc symbol *special-form-alist*))

  (defun walk-special-form (form)
    (let ((*clause* form)
! 	(func (cdr (assoc (car form) *special-form-alist*))))
      (if (null func)    ; there's nothing to transform
  	(list form)
  	(apply func form))))

  #+nil
--- 797,810 ----
    ;; example.  Plus, we want to catch Iterate special clauses.
    (assoc symbol *special-form-alist*))

  (defun walk-special-form (form)
    (let ((*clause* form)
! 	(func (cdr (assoc (if (keywordp (car form))
!                               (find-symbol (string (car
form)) :iterate)
!                               (car form))
!                           *special-form-alist*))))
      (if (null func)    ; there's nothing to transform
  	(list form)
  	(apply func form))))

  #+nil
***************
*** 1027,1036 ****
--- 1030,1040 ----
  	   (t
  	    (clause-error "No iterate function for this clause; do ~
    (~S) to see the existing clauses." 'display-iterate-clauses)))))))

  (defun apply-clause-function (func args)
+   (when (keywordp func) (setf func (find-symbol (string
func) :iterate)))
    (let ((*initial* nil)
  	(*decls* nil)
  	(*step* nil)
  	(*final* nil)
  	(*finalp* nil))
***************
*** 2296,2305 ****
--- 2300,2315 ----
  				      ,(if (stringp (car body))
  					   (car body)))))

  (defun install-special-clause-function (symbol &optional doc-string)
    ;; Put it at the end, if not already present.
+   (let* ((key-symbol (intern (string symbol) :keyword))
+          (entry (assoc key-symbol *special-clause-alist*)))
+     (if (null entry)
+ 	(augment *special-clause-alist* (list (cons key-symbol doc-
string)))
+       (setf (cdr entry) doc-string))
+     symbol)
    (let ((entry (assoc symbol *special-clause-alist*)))
      (if (null entry)
  	(augment *special-clause-alist* (list (cons symbol doc-string)))
  	(setf (cdr entry) doc-string))
      symbol))
***************
*** 3577,3586 ****
--- 3587,3601 ----

  (defmacro me (x)
    `(progn (setq *print-pretty* t) (macroexpand-1 ',x)))
  |#

+ (eval-when (:load-toplevel :execute)
+   (dolist (x (cdr *clause-info-index*))
+     (let ((i (car x)))
+       (eval `(defsynonym ,(intern (string i) :keyword) ,i)))))
+

  (eval-when (:compile-toplevel :load-toplevel :execute)
    (when (and (boundp '*old-sharpL-func*) *old-sharpL-func*)
      (set-dispatch-macro-character #\# #\L *old-sharpL-func*)))
>>>>>>>>>>>>>>>>>>>patch ended here
From: Kaz Kylheku
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <20081105112658.275@gmail.com>
On 2008-11-05, budden <········@mtu-net.ru> wrote:
> And (as I wrote before, now repeating), iterate exports too many
> symbols with very general names.

Iterate's interface is badly designed. It should use keywords for its clauses,
or else follow the LOOP design so that symbols from any package whatsoever will
match the clause identifiers using string equality.
From: Pascal J. Bourguignon
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <7cod0tku88.fsf@pbourguignon.anevia.com>
budden <········@mtu-net.ru> writes:
> And, again, no one answers the questions I ask.

Did you miss this: http://groups.google.com/group/comp.lang.lisp/msg/fd93a5635c97f10b  ?


-- 
__Pascal Bourguignon__
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <a09bdf5e-523f-4fac-9cb9-32c5b6f0a35a@p35g2000prm.googlegroups.com>
> Did you miss this:http://groups.google.com/group/comp.lang.lisp/msg/fd93a5635c97f10b ?
>
> --
> __Pascal Bourguignon__
Thanks, no, I read this and accepted this. As you could see from the
rest of the topic, I didn't really intended to
make a property name a constant. Iterate uses 'iterate::synonym for
that.

CL-USER 9 > describe :for

:FOR is a SYMBOL
NAME          "FOR"
VALUE         :FOR
FUNCTION      #<unbound function>
PLIST         (PKG::SYMBOL-NAME-STRING "FOR" ITERATE::SYNONYM
ITERATE:FOR)
PACKAGE       #<PACKAGE KEYWORD>

I mentioned the fact in the topic and I though it was evident that I
accepted what you wrote. But some of my questions are still open.
Anyway, for now I'll use iterate in a modified form, with properties
put on keywords and won't change this until I face a problems
somewhere or until someone makes it better.

Btw, the patch likely won't work as it was auto-wrapped. Is there are
better way to submit it?
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <6aa25eef-4ece-48fa-97d6-ca377fe104b9@o4g2000pra.googlegroups.com>
I found just now that I didn't implement (finish), (terminate) and so
on. Have some more work to do. Not sure it is so easy.
From: Pascal J. Bourguignon
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <7c1vxolqve.fsf@pbourguignon.anevia.com>
budden <········@mtu-net.ru> writes:

>> Did you miss this:http://groups.google.com/group/comp.lang.lisp/msg/fd93a5635c97f10b�?
>>
>> --
>> __Pascal Bourguignon__
> Thanks, no, I read this and accepted this. As you could see from the
> rest of the topic, I didn't really intended to
> make a property name a constant. Iterate uses 'iterate::synonym for
> that.
>
> CL-USER 9 > describe :for
>
> :FOR is a SYMBOL
> NAME          "FOR"
> VALUE         :FOR
> FUNCTION      #<unbound function>
> PLIST         (PKG::SYMBOL-NAME-STRING "FOR" ITERATE::SYNONYM
> ITERATE:FOR)
> PACKAGE       #<PACKAGE KEYWORD>
>
> I mentioned the fact in the topic and I though it was evident that I
> accepted what you wrote. But some of my questions are still open.
> Anyway, for now I'll use iterate in a modified form, with properties
> put on keywords and won't change this until I face a problems
> somewhere or until someone makes it better.
>
> Btw, the patch likely won't work as it was auto-wrapped. Is there are
> better way to submit it?

You may use  http://paste.lisp.org/new
There's a "raw source" option to copy from it as-is.

-- 
__Pascal Bourguignon__
From: budden
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <874e5ba1-80ad-46c5-aa0d-536b98cd4010@z6g2000pre.googlegroups.com>
Now it passed all tests that were supplied with original iterate. I
substituted
(hopefully) all clause heads to keywords and it works.


http://paste.lisp.org/display/69869
From: Kenny
Subject: Amen
Date: 
Message-ID: <49111a80$0$14310$607ed4bc@cv.net>
hth,kxo
From: George Neuner
Subject: Re: Amen
Date: 
Message-ID: <dsp3h4ph9s16vepas7u3v2gvrnkj8eam1p@4ax.com>
Geshundteit.
From: budden
Subject: Re: Amen
Date: 
Message-ID: <f80bc109-0712-4435-b9de-3432e28e8668@l33g2000pri.googlegroups.com>
8SDUxcLRIM7FINDPztHM
From: Kenny
Subject: Re: Amen
Date: 
Message-ID: <49123ed1$0$4899$607ed4bc@cv.net>
George Neuner wrote:
> Geshundteit.

I don't think you noticed the time of the post.

hth,kenny
From: George Neuner
Subject: Re: Amen
Date: 
Message-ID: <nat4h457t4fvgi8dt3ch03as4aj1iqs7qf@4ax.com>
On Wed, 05 Nov 2008 19:47:21 -0500, Kenny <·········@gmail.com> wrote:

>George Neuner wrote:
>> Geshundteit.
>
>I don't think you noticed the time of the post.
>
>hth,kenny

I saw it.  You say your bedtime prayers online?

George
From: Kenny
Subject: Re: Amen
Date: 
Message-ID: <4912a711$0$14308$607ed4bc@cv.net>
George Neuner wrote:
> On Wed, 05 Nov 2008 19:47:21 -0500, Kenny <·········@gmail.com> wrote:
> 
> 
>>George Neuner wrote:
>>
>>>Geshundteit.
>>
>>I don't think you noticed the time of the post.
>>
>>hth,kenny
> 
> 
> I saw it.  You say your bedtime prayers online?

Who could go to bed at a time like...oh, my. Don't tell me you slept 
thru it.

kt
From: George Neuner
Subject: Re: Amen
Date: 
Message-ID: <klv8h49h9atmkrmb3gk2n9ihk4rg14r0hn@4ax.com>
On Thu, 06 Nov 2008 03:13:05 -0500, Kenny <·········@gmail.com> wrote:

>George Neuner wrote:
>> On Wed, 05 Nov 2008 19:47:21 -0500, Kenny <·········@gmail.com> wrote:
>> 
>> 
>>>George Neuner wrote:
>>>
>>>>Geshundteit.
>>>
>>>I don't think you noticed the time of the post.
>>>
>>>hth,kenny
>> 
>> 
>> I saw it.  You say your bedtime prayers online?
>
>Who could go to bed at a time like...oh, my. Don't tell me you slept 
>thru it.
>
>kt

Through what?

George
From: Kenny
Subject: Re: Amen
Date: 
Message-ID: <4914877f$0$4886$607ed4bc@cv.net>
George Neuner wrote:
> On Thu, 06 Nov 2008 03:13:05 -0500, Kenny <·········@gmail.com> wrote:
> 
> 
>>George Neuner wrote:
>>
>>>On Wed, 05 Nov 2008 19:47:21 -0500, Kenny <·········@gmail.com> wrote:
>>>
>>>
>>>
>>>>George Neuner wrote:
>>>>
>>>>
>>>>>Geshundteit.
>>>>
>>>>I don't think you noticed the time of the post.
>>>>
>>>>hth,kenny
>>>
>>>
>>>I saw it.  You say your bedtime prayers online?
>>
>>Who could go to bed at a time like...oh, my. Don't tell me you slept 
>>thru it.
>>
>>kt
> 
> 
> Through what?

11:01PM EST Tuesday is 8:01PM PST Tuesday, one minute after the polls 
closed on the West coast.

hth,kxo
From: George Neuner
Subject: Re: Amen
Date: 
Message-ID: <qk89h4ttr5nceq3s0k9pta78bam25jgjne@4ax.com>
On Fri, 07 Nov 2008 13:21:57 -0500, Kenny <·········@gmail.com> wrote:

>George Neuner wrote:
>> On Thu, 06 Nov 2008 03:13:05 -0500, Kenny <·········@gmail.com> wrote:
>> 
>> 
>>>George Neuner wrote:
>>>
>>>>On Wed, 05 Nov 2008 19:47:21 -0500, Kenny <·········@gmail.com> wrote:
>>>>
>>>>
>>>>
>>>>>George Neuner wrote:
>>>>>
>>>>>
>>>>>>Geshundteit.
>>>>>
>>>>>I don't think you noticed the time of the post.
>>>>>
>>>>>hth,kenny
>>>>
>>>>
>>>>I saw it.  You say your bedtime prayers online?
>>>
>>>Who could go to bed at a time like...oh, my. Don't tell me you slept 
>>>thru it.
>>>
>>>kt
>> 
>> 
>> Through what?
>
>11:01PM EST Tuesday is 8:01PM PST Tuesday, one minute after the polls 
>closed on the West coast.
>
>hth,kxo

And two hours before polls close in Hawaii.  Again, so what?

George
From: Brian Adkins
Subject: Re: Amen
Date: 
Message-ID: <m2ljvvdxs0.fsf@gmail.com>
George Neuner <········@comcast.net> writes:

> On Fri, 07 Nov 2008 13:21:57 -0500, Kenny <·········@gmail.com> wrote:
>>11:01PM EST Tuesday is 8:01PM PST Tuesday, one minute after the polls 
>>closed on the West coast.
>>
> And two hours before polls close in Hawaii.  Again, so what?

What? Hawaiian polls were still open when they announced the new pres? Bummer.
From: budden
Subject: Putting a property on a keyword
Date: 
Message-ID: <9b5ca0db-51fa-401d-af95-3dad60bb6d15@a29g2000pra.googlegroups.com>
Please stop discussing polls here.
From: Raffael Cavallaro
Subject: Re: Amen
Date: 
Message-ID: <gf4987$om1$1@aioe.org>
On 2008-11-07 15:19:41 -0500, George Neuner <········@comcast.net> said:

> And two hours before polls close in Hawaii.  Again, so what?

The results in Hawaii were never in doubt. The networks were merely 
waiting for the west coast poll closings to call the election for Obama.
From: Kenny
Subject: Re: Amen
Date: 
Message-ID: <4915d45e$0$4883$607ed4bc@cv.net>
Raffael Cavallaro wrote:
> On 2008-11-07 15:19:41 -0500, George Neuner <········@comcast.net> said:
> 
>> And two hours before polls close in Hawaii.  Again, so what?
> 
> 
> The results in Hawaii were never in doubt. The networks were merely 
> waiting for the west coast poll closings to call the election for Obama.
> 

I suspect Mr. Neuner's problem is not so much the mechanics of US 
elections as it was the outcome. If it helps, Rush Limbaugh has a 
24-hour hotline for talking fellow-haters in off ledges.

kzo
From: George Neuner
Subject: Re: Amen
Date: 
Message-ID: <burbh41rr7iqudh9kfcb7cslcncsro9adq@4ax.com>
On Sat, 08 Nov 2008 13:02:11 -0500, Kenny <·········@gmail.com> wrote:

>Raffael Cavallaro wrote:
>> On 2008-11-07 15:19:41 -0500, George Neuner <········@comcast.net> said:
>> 
>>> And two hours before polls close in Hawaii.  Again, so what?
>> 
>> 
>> The results in Hawaii were never in doubt. The networks were merely 
>> waiting for the west coast poll closings to call the election for Obama.
>> 
>
>I suspect Mr. Neuner's problem is not so much the mechanics of US 
>elections as it was the outcome. If it helps, Rush Limbaugh has a 
>24-hour hotline for talking fellow-haters in off ledges.
>
>kzo

Actually I am a libertarian and I don't give a shit who won because
the all the choices sucked and I live in Massachusetts where a vote
other than Democrat doesn't count anyway.

I gave up caring long ago.

George
From: budden
Subject: Putting property on a keyword
Date: 
Message-ID: <2be15825-6adb-4189-b3c8-46a83bafd097@40g2000prx.googlegroups.com>
If you don't stop discussing polls here, I'll find your Big Brother
and rat on you.
From: Kenny
Subject: Re: Amen
Date: 
Message-ID: <491627de$0$14314$607ed4bc@cv.net>
George Neuner wrote:
> On Sat, 08 Nov 2008 13:02:11 -0500, Kenny <·········@gmail.com> wrote:
> 
> 
>>Raffael Cavallaro wrote:
>>
>>>On 2008-11-07 15:19:41 -0500, George Neuner <········@comcast.net> said:
>>>
>>>
>>>>And two hours before polls close in Hawaii.  Again, so what?
>>>
>>>
>>>The results in Hawaii were never in doubt. The networks were merely 
>>>waiting for the west coast poll closings to call the election for Obama.
>>>
>>
>>I suspect Mr. Neuner's problem is not so much the mechanics of US 
>>elections as it was the outcome. If it helps, Rush Limbaugh has a 
>>24-hour hotline for talking fellow-haters in off ledges.
>>
>>kzo
> 
> 
> Actually I am a libertarian and I don't give a shit who won because
> the all the choices sucked and I live in Massachusetts where a vote
> other than Democrat doesn't count anyway.

We are not that far apart.

> I gave up caring long ago.

s/caring/hoping/.

Me, too. But I think W made a compelling case that there are degrees of 
suckitude worth differentiating. We will see.

kt
From: George Neuner
Subject: Re: Amen
Date: 
Message-ID: <esbch4dk1h3b4ke43qjjt50pbbqd2kkshs@4ax.com>
On Sat, 08 Nov 2008 18:59:25 -0500, Kenny <·········@gmail.com> wrote:

>George Neuner wrote:
>> On Sat, 08 Nov 2008 13:02:11 -0500, Kenny <·········@gmail.com> wrote:
>> 
>> 
>>>Raffael Cavallaro wrote:
>>>
>>>>On 2008-11-07 15:19:41 -0500, George Neuner <········@comcast.net> said:
>>>>
>>>>
>>>>>And two hours before polls close in Hawaii.  Again, so what?
>>>>
>>>>
>>>>The results in Hawaii were never in doubt. The networks were merely 
>>>>waiting for the west coast poll closings to call the election for Obama.
>>>>
>>>
>>>I suspect Mr. Neuner's problem is not so much the mechanics of US 
>>>elections as it was the outcome. If it helps, Rush Limbaugh has a 
>>>24-hour hotline for talking fellow-haters in off ledges.
>>>
>>>kzo
>> 
>> 
>> Actually I am a libertarian and I don't give a shit who won because
>> the all the choices sucked and I live in Massachusetts where a vote
>> other than Democrat doesn't count anyway.
>
>We are not that far apart.
>
>> I gave up caring long ago.
>
>s/caring/hoping/.
>
>Me, too. But I think W made a compelling case that there are degrees of 
>suckitude worth differentiating. We will see.
>
>kt

I'm not holding my breath.

George
From: budden
Subject: Putting a property on a keyword - keywordizing itertate
Date: 
Message-ID: <4d21cd31-b27c-4498-a393-909c0336ad04@w1g2000prk.googlegroups.com>
Stop offtopics.
From: Kenny
Subject: Re: Putting a property on a keyword - keywordizing itertate
Date: 
Message-ID: <4916bc83$0$20279$607ed4bc@cv.net>
budden wrote:
> Stop offtopics.

Quite a showdown in the AFC East today, eh? I like Buffalo over the Pats 
and the Jets also to move to 6-3. Giants will have their hands full with 
the Eagles and the man Rush Limbaugh said was a lousy QB but he was 
black so people gave him a break, Donovan McNabb. Meanwhile McNabb is 
still winning and Rush is still doing Vicadins. But I digress... where 
were we?
From: Raffael Cavallaro
Subject: Re: Putting a property on a keyword - keywordizing itertate
Date: 
Message-ID: <gf6t47$rc4$1@aioe.org>
On 2008-11-09 05:33:38 -0500, Kenny <·········@gmail.com> said:

> Quite a showdown in the AFC East today, eh? I like Buffalo over the 
> Pats and the Jets also to move to 6-3. Giants will have their hands 
> full with the Eagles and the man Rush Limbaugh said was a lousy QB but 
> he was black so people gave him a break, Donovan McNabb. Meanwhile 
> McNabb is still winning and Rush is still doing Vicadins. But I 
> digress... where were we?

can you ***please*** bring this back on topic?


What does President Elect Obama think of Donovan McNabb?


;^)
From: Kenny
Subject: Re: Putting a property on a keyword - keywordizing itertate
Date: 
Message-ID: <491707f0$0$4919$607ed4bc@cv.net>
Raffael Cavallaro wrote:
> On 2008-11-09 05:33:38 -0500, Kenny <·········@gmail.com> said:
> 
>> Quite a showdown in the AFC East today, eh? I like Buffalo over the 
>> Pats and the Jets also to move to 6-3. Giants will have their hands 
>> full with the Eagles and the man Rush Limbaugh said was a lousy QB but 
>> he was black so people gave him a break, Donovan McNabb. Meanwhile 
>> McNabb is still winning and Rush is still doing Vicadins. But I 
>> digress... where were we?
> 
> 
> can you ***please*** bring this back on topic?
> 
> 
> What does President Elect Obama think of Donovan McNabb?

Oh, sure, take us completely off track. Obama is interested in /college/ 
football, not professional football. In an important policy address at 
halftime on Monday Night Football he called for an eight-team playoff to 
determine a true national college champion.

hth,kxo
From: Raffael Cavallaro
Subject: Re: Putting a property on a keyword - keywordizing itertate
Date: 
Message-ID: <gf78up$m77$1@aioe.org>
On 2008-11-09 10:54:29 -0500, Kenny <·········@gmail.com> said:

> In an important policy address at halftime on Monday Night Football he 
> called for an eight-team playoff to determine a true national college 
> champion.

You do realize that he arrived at this plan only *after* consulting 
with Bo Schembechler in a seance. Hypocrite.
From: Kenny
Subject: Re: Putting a property on a keyword - keywordizing itertate
Date: 
Message-ID: <49174128$0$4879$607ed4bc@cv.net>
Raffael Cavallaro wrote:
> On 2008-11-09 10:54:29 -0500, Kenny <·········@gmail.com> said:
> 
>> In an important policy address at halftime on Monday Night Football he 
>> called for an eight-team playoff to determine a true national college 
>> champion.
> 
> 
> You do realize that he arrived at this plan only *after* consulting with 
> Bo Schembechler in a seance. Hypocrite.
> 

Just when I thought the only and fatal thing wrong with The Man was that 
  he was a stiff he attempts not one but two comedy riffs (the seance 
thing and the mock grave dog selection thing, ending with the incredible 
mutt thing) in one ten-minute press con and yells out au revoir (or was 
it bon jour?) to (I guess) a frog correspondent he spotted walking off. 
This guy is gonna be a pisser in six months, and I swear to god white 
folks are gonna have a hard time following this act. They'll be able to 
bank on Wyoming, tho.

kt
From: Nicolas Neuss
Subject: Re: Amen
Date: 
Message-ID: <87k5bhxnlb.fsf@ma-patru.mathematik.uni-karlsruhe.de>
Kenny <·········@gmail.com> writes:

> George Neuner wrote:
>> Geshundteit.
>
> I don't think you noticed the time of the post.
>
> hth,kenny

Let's try this answer:

Congratulations!  Well done!

Nicolas
From: Kenny
Subject: Re: Amen
Date: 
Message-ID: <4912cae8$0$14314$607ed4bc@cv.net>
Nicolas Neuss wrote:
> Kenny <·········@gmail.com> writes:
> 
> 
>>George Neuner wrote:
>>
>>>Geshundteit.
>>
>>I don't think you noticed the time of the post.
>>
>>hth,kenny
> 
> 
> Let's try this answer:
> 
> Congratulations!  Well done!

Thanks! Sorry 'bout the last eight!

kzo
From: Pascal J. Bourguignon
Subject: Re: is it ok to (setf (get :const :prop) :val)?
Date: 
Message-ID: <7czlkgn6qf.fsf@pbourguignon.anevia.com>
budden <········@mtu-net.ru> writes:

> > (setf (get :const :prop) :val)

If :prop is a global property of :const, then why not.  But most
probably it's something that concerns only your program, so you should
put the property in your own package:

(defpackage "MY-PROPERTIES" (:export "PROP"))

then it's would be ok to do:

    (setf (get :const 'MY-PROPERTIES:PROP) :val)

since it would not imply any collision with other libraries and
programs in the same image.

However, it would still imply a time impact, since property lists are
scanned linearly.  How happy would you be if all the property lists
you use are thousands of elements long just because all libraries had
put their data there?

So it would still be better to use your own symbols:

(defpackage "MY-SYMBOL" (:export "CONST"))

In that case, you can use a keyword as key for the property:

    (setf (get MY-SYMBOL:CONST :prop) :val)



> Additionally, is it ok to
> (defun :foo () 1)
> This works in those three cl implementation and I found nothing in a
> standard which would forbid that.

In this case, technically it's indeed possible to fbind a keyword, but
it is a global namespace so if it was often done, any library could
override your function :foo with their own.  Better to use your own
symbols to name functions.


> It is required for allow iterate special clauses like "finally" to be
> keywords too.

You should find a better way.


-- 
__Pascal Bourguignon__