On Thu 23 Jun 2016 16:13, l...@gnu.org (Ludovic Courtès) writes:
> Andy Wingo skribis:
>
>> I just pushed something to master to error when serializing an
>> uninterned symbol. Otherwise compiling an uninterned symbol effectively
>> interns it! I am not sure that we can apply such a fix in 2.0
Andy Wingo skribis:
> On Thu 24 Mar 2016 09:45, l...@gnu.org (Ludovic Courtès) writes:
>
>> Mark H Weaver skribis:
>>
>>> It turns out the manual already has the following text in the ‘gensym’
>>> entry, which I think is sufficient.
>>>
>>>
On Thu 24 Mar 2016 09:45, l...@gnu.org (Ludovic Courtès) writes:
> Mark H Weaver skribis:
>
>> It turns out the manual already has the following text in the ‘gensym’
>> entry, which I think is sufficient.
>>
>> The symbols generated by ‘gensym’ are _likely_
;> hope for is to significantly reduce the probability of _unintentional_
>>> collisions, perhaps by starting the gensym counter at a large number.
>>
>> I’m not sure if that would help.
>>
>> One thing that could help avoid unintentional collisions is to
>> automa
ility of _unintentional_
>> collisions, perhaps by starting the gensym counter at a large number.
>
> I’m not sure if that would help.
>
> One thing that could help avoid unintentional collisions is to
> automatically add whitespace before the number, such that:
>
> (gensym &quo
ra...@openmailbox.org writes:
> On 2016-03-22 05:24, Mark H Weaver wrote:
>> l...@gnu.org (Ludovic Courtès) writes:
>>> ‘gensym’ returns interned symbols, but the algorithm to determine the
>>> new symbol is simplistic and predictable.
>>>
>>> Thu
On 2016-03-22 05:24, Mark H Weaver wrote:
l...@gnu.org (Ludovic Courtès) writes:
‘gensym’ returns interned symbols, but the algorithm to determine the
new symbol is simplistic and predictable.
Thus, one can arrange to produce a symbol before ‘gensym’ does,
leading
‘gensym’ to return a symbol
Mark H Weaver skribis:
> I've considered this idea in the past, but it only avoids collisions
> with symbols that have been interned before the gensym. It does not
> avoid collisions with symbols interned *after* the gensym. Obviously,
> there's no way to avoid such c
l...@gnu.org (Ludovic Courtès) writes:
> ‘gensym’ returns interned symbols, but the algorithm to determine the
> new symbol is simplistic and predictable.
>
> Thus, one can arrange to produce a symbol before ‘gensym’ does, leading
> ‘gensym’ to return a symbol that’s not fresh (
Hello
I agree, this goes against the main assumption people have about gensym.
I was able to reproduce the bug.
Here's a patch to libguile/symbol.c which fixes this behavior by
incrementing the gensym counter in a loop until it creates a fresh
symbol.
diff --git a/libguile/symbol
‘gensym’ returns interned symbols, but the algorithm to determine the
new symbol is simplistic and predictable.
Thus, one can arrange to produce a symbol before ‘gensym’ does, leading
‘gensym’ to return a symbol that’s not fresh (in terms of ‘eq?’), as is
the case with the second call to ‘gensym
None
Status: Closed
Summary: srfi-11 uses gentemp instead of gensym
Original Submission: This causes a deprecation warning in code that uses
let-values. Fix is trivial (substitute with gensym).
Follow-up Comments
--
---
.gnu.org/bugs/?func=detailitem&item_id=8596>
Project: Guile
Submitted by: Andreas Rottmann
On: Fri 04/16/04 at 18:29
Category: None
Severity: 5 - Average
Item Group: None
Resolution: Fixed
Assigned to: None
Status: Open
Summary: srfi-11 uses gentemp instead of gensym
Original
bmitted by: Andreas Rottmann
On: Fri 04/16/04 at 18:29
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Assigned to: None
Status: Open
Summary: srfi-11 uses gentemp instead of gensym
Original Submission: This causes a deprecation warning in code that uses let-value
bmitted by: Andreas Rottmann
On: Fri 04/16/04 at 18:29
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Assigned to: None
Status: Open
Summary: srfi-11 uses gentemp instead of gensym
Original Submission: This causes a deprecation warning in code that uses let-value
"Dale P. Smith" <[EMAIL PROTECTED]> writes:
> gensym is supposed to be called with a symbol, not a string. It still
> fails.
I apologize for all of these incomplete fixes. I think I've been
trying to do too many things simultaneously lately.
What I should have don
There are a few places where gensym is applied to a string (oooh, that
almost sounds like I know scheme!) Here is a patch.
dsmith@sammy:~/src/guile/guile-core/ice-9$ cvs diff -u
cvs server: Diffing .
Index: boot-9.scm
===
RCS file
"Dale P. Smith" wrote:
>
> I don't thing gensym is right yet.
^ think
>
> There are about a dozen or so places in calling.scm where gensym is used
> with a symbol, I thought recent changes required the first argument to
> be a string. Trying it ou
"Dale P. Smith" wrote:
>
> I don't thing gensym is right yet.
>
> There are about a dozen or so places in calling.scm where gensym is used
> with a symbol, I thought recent changes required the first argument to
> be a string. Trying it out, I find:
>
&g
19 matches
Mail list logo