Discussion:
Is gensym used for anything except alpha-conversion in macros?
Kazimir Majorinc
2011-07-10 08:40:19 UTC
Permalink
Content preview: Is gensym used for anything except alpha-conversion in macros?
pro mailing list pro-***@public.gmane.org http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro
[...]

Content analysis details: (0.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no
trust
[195.29.150.135 listed in list.dnswl.org]
0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral)
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/511>

Is gensym used for anything except alpha-conversion in macros?
Pascal Costanza
2011-07-10 09:06:10 UTC
Permalink
Content preview: Yes. On 10 Jul 2011, at 10:40, Kazimir Majorinc wrote: > Is
gensym used for anything except alpha-conversion in macros? > > > pro mailing
list > pro-***@public.gmane.org > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro
[...]

Content analysis details: (-102.3 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-100 USER_IN_WHITELIST From: address is in the user's white-list
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[134.184.129.112 listed in list.dnswl.org]
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/512>

Yes.
Post by Kazimir Majorinc
Is gensym used for anything except alpha-conversion in macros?
_______________________________________________
pro mailing list
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro
--
Pascal Costanza
Kazimir Majorinc
2011-07-10 09:36:35 UTC
Permalink
Content preview: On 10.7.2011. 11:06, Pascal Costanza wrote: > Yes. Ok. For
what? [...]

Content analysis details: (0.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no
trust
[195.29.150.135 listed in list.dnswl.org]
0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral)
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/514>
Yes.
Ok. For what?
Pascal Costanza
2011-07-10 16:05:04 UTC
Permalink
Content preview: On 10 Jul 2011, at 11:36, Kazimir Majorinc wrote: > On 10.7.2011.
11:06, Pascal Costanza wrote: > >> Yes. > > Ok. For what? According to http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro
this mailing list is intended for people who use Common Lisp on a regular
basis. I find it hard to imagine that somebody who indeed uses Common Lisp
regularly wouldn't know. [...]

Content analysis details: (-102.3 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-100 USER_IN_WHITELIST From: address is in the user's white-list
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[134.184.129.112 listed in list.dnswl.org]
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/517>
Post by Kazimir Majorinc
Yes.
Ok. For what?
According to http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro this mailing list is intended for people who use Common Lisp on a regular basis. I find it hard to imagine that somebody who indeed uses Common Lisp regularly wouldn't know.

Best,
Pascal

--
Pascal Costanza
The views expressed in this email are my own, and not those of my employer.
David McClain
2011-07-10 08:54:15 UTC
Permalink
Gensym can also be used to produce globally (session wide) unique objects.
Post by Kazimir Majorinc
Is gensym used for anything except alpha-conversion in macros?
_______________________________________________
pro mailing list
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro
Dr. David McClain
dbm-h9Lvq2qNYxl8mnqqp10EyDJtdDapTP/***@public.gmane.org
Kazimir Majorinc
2011-07-10 09:38:53 UTC
Permalink
Content preview: On 10.7.2011. 10:54, David McClain wrote: > Gensym can also
be used to produce globally (session wide) unique objects. Could you give
me some example, or pointer to example? [...]

Content analysis details: (0.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no
trust
[195.29.150.135 listed in list.dnswl.org]
0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral)
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/515>
Post by David McClain
Gensym can also be used to produce globally (session wide) unique objects.
Could you give me some example, or pointer to example?
Hans Hübner
2011-07-10 09:43:23 UTC
Permalink
On 10.7.2011. 10:54, David McClain wrote: > >> Gensym can also be used to
produce globally (session wide) unique objects. > > Could you give me some
example, or pointer to example? [...]

Content analysis details: (-100.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-100 USER_IN_WHITELIST From: address is in the user's white-list
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(hans.huebner[at]gmail.com)
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
trust
[209.85.210.179 listed in list.dnswl.org]
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/516>
Post by David McClain
Gensym can also be used to produce globally (session wide) unique objects.
Could you give me some example, or pointer to example?
http://codesearch.google.com/#search/&q=gensym%20lang:%5Elisp$&type=cs
Steve Haflich
2011-07-10 18:29:23 UTC
Permalink
Post by David McClain
Gensym can also be used to produce globally (session wide) unique objects.
But this is no different from other objects, such as a cons or array.

The primary difference between an uninterned symbol and any other object
that has settable "slots" is its behavior as a form under evaluation.
Arrays and most other objects self evaluate; a cons has complex
interpretation as a form; but a symbol evaluates to its its current special
or lexical value binding. That's why gensyms are mostly use as hygienic
names in macro expansions.

There are other ways of doing whar a ge.sym does. Maybe later when I'm not
typing on a tiny phone keyboad i'll show one.
Ken Tilton
2011-07-11 13:04:41 UTC
Permalink
Content preview: On 7/10/2011 4:40 AM, Kazimir Majorinc wrote: > Is gensym
used for anything except alpha-conversion in macros? I like to link them using
properties 'parent and 'kids to form a lightweight tree, then hang other
properties of each gensym/node to form a dag/database to support interesting
algorithms. [...]

Content analysis details: (-100.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-100 USER_IN_WHITELIST From: address is in the user's white-list
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(kentilton[at]gmail.com)
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
trust
[209.85.161.179 listed in list.dnswl.org]
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/519>
Post by Kazimir Majorinc
Is gensym used for anything except alpha-conversion in macros?
I like to link them using properties 'parent and 'kids to form a
lightweight tree, then hang other properties of each gensym/node to form
a dag/database to support interesting algorithms.

kt
Kazimir Majorinc
2011-07-11 13:53:43 UTC
Permalink
Content preview: On 11.7.2011. 15:04, Ken Tilton wrote: > On 7/10/2011 4:40
AM, Kazimir Majorinc wrote: >> Is gensym used for anything except alpha-conversion
in macros? > I like to link them using properties 'parent and 'kids to form
a > lightweight tree, then hang other properties of each gensym/node to form
a dag/database to support interesting algorithms. [...]
Content analysis details: (0.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no
trust
[195.29.150.135 listed in list.dnswl.org]
0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral)
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/520>
Post by Kazimir Majorinc
Is gensym used for anything except alpha-conversion in macros?
I like to link them using properties 'parent and 'kids to form a
lightweight tree, then hang other properties of each gensym/node to form
a dag/database to support interesting algorithms.
That's exactly kind of use I'm interested in. What's advantage over
using lists for trees?

Do you have some code to share?
Ken Tilton
2011-07-11 14:02:33 UTC
Permalink
Content preview: On 7/11/2011 9:53 AM, Kazimir Majorinc wrote: > On 11.7.2011.
Post by Kazimir Majorinc
Post by Ken Tilton
Is gensym used for anything except alpha-conversion in macros? >> I like
to link them using properties 'parent and 'kids to form a >> lightweight
tree, then hang other properties of each gensym/node to form >> a dag/database
to support interesting algorithms. > > That's exactly kind of use I'm interested
in. What's advantage over > using lists for trees? [...]

Content analysis details: (-100.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-100 USER_IN_WHITELIST From: address is in the user's white-list
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(kentilton[at]gmail.com)
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
trust
[209.85.213.51 listed in list.dnswl.org]
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/521>
Post by Kazimir Majorinc
Post by Ken Tilton
Is gensym used for anything except alpha-conversion in macros?
I like to link them using properties 'parent and 'kids to form a
lightweight tree, then hang other properties of each gensym/node to form
a dag/database to support interesting algorithms.
That's exactly kind of use I'm interested in. What's advantage over
using lists for trees?
With a property list each value gets a name.

What advantage do gensyms/property-lists have over structs?
Metaprogramming: the data can define new "slots" when the object is a
property list.
Post by Kazimir Majorinc
Do you have some code to share?
Sorry, proprietary stuff over here. But I think I have already described
how the whole thing works.

kt

Loading...