[Openmcl-devel] (equal '#:G34159 '#:G34159) -> NIL

Taoufik Dachraoui dachraoui.taoufik at gmail.com
Wed Aug 1 13:00:51 PDT 2012


I understood the problem

What happened is I run a function that printed a list containing a
generated symbol, then I copied
that list and called another function and it failed

but when I combine the calls it works fine

Thank you for the help

Kind regards
Taoufik

On Wed, Aug 1, 2012 at 9:49 PM, Ron Garret <ron at flownet.com> wrote:

> Try STRING= or STRING-EQUAL.  (They work on symbols too, not just strings.)
>
> On Aug 1, 2012, at 12:41 PM, Taoufik Dachraoui wrote:
>
> > But what to do then? I want to generate *fresh* symbols and in the same
> time
> > I need to compare the symbol names
> >
> > Kind regards
> > Taoufik
> >
> >
> > On Wed, Aug 1, 2012 at 9:31 PM, Joshua TAYLOR <joshuaaaron at gmail.com>
> wrote:
> > On Wed, Aug 1, 2012 at 3:22 PM, Taoufik Dachraoui
> > <dachraoui.taoufik at gmail.com> wrote:
> > > Ok thanks
> > >
> > > I solved the problem by doing using (intern (symbol-name (gensym)))
> instead
> > > of (gensym)
> >
> > The purpose of gensym is to produce *fresh* symbols. If you do
> > something like what you've proposed though, though, you're not
> > guaranteed to get fresh (not eq to any existing symbol) symbols (this
> > example is under SBCL, but similar things will work in other lisps):
> >
> > * (gensym)
> > #:G737
> >
> > * (let ((x 'g738))
> >     (eq x (intern (symbol-name (gensym)))))
> > T
> >
> > //JT
> > --
> > Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
> > _______________________________________________
> > Openmcl-devel mailing list
> > Openmcl-devel at clozure.com
> > http://clozure.com/mailman/listinfo/openmcl-devel
> >
> > _______________________________________________
> > Openmcl-devel mailing list
> > Openmcl-devel at clozure.com
> > http://clozure.com/mailman/listinfo/openmcl-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20120801/0d2a3b56/attachment.htm>


More information about the Openmcl-devel mailing list