From unknown Tue Aug 19 06:31:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20087 <20087@debbugs.gnu.org> To: bug#20087 <20087@debbugs.gnu.org> Subject: Status: 'gensym' is not guaranteed to return a fresh symbol Reply-To: bug#20087 <20087@debbugs.gnu.org> Date: Tue, 19 Aug 2025 13:31:20 +0000 retitle 20087 'gensym' is not guaranteed to return a fresh symbol reassign 20087 guile submitter 20087 ludo@gnu.org (Ludovic Court=C3=A8s) severity 20087 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 11 13:15:22 2015 Received: (at submit) by debbugs.gnu.org; 11 Mar 2015 17:15:22 +0000 Received: from localhost ([127.0.0.1]:43030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVkE5-0004Vq-FJ for submit@debbugs.gnu.org; Wed, 11 Mar 2015 13:15:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57500) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVkE4-0004Ve-It for submit@debbugs.gnu.org; Wed, 11 Mar 2015 13:15:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVkDy-00031K-Im for submit@debbugs.gnu.org; Wed, 11 Mar 2015 13:15:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVkDy-00031A-GX for submit@debbugs.gnu.org; Wed, 11 Mar 2015 13:15:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVkDx-0001rj-LW for bug-guile@gnu.org; Wed, 11 Mar 2015 13:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVkDu-0002zw-Cp for bug-guile@gnu.org; Wed, 11 Mar 2015 13:15:13 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVkDu-0002zr-As for bug-guile@gnu.org; Wed, 11 Mar 2015 13:15:10 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:47174 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YVkDt-0005Qb-Q3 for bug-guile@gnu.org; Wed, 11 Mar 2015 13:15:10 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: bug-guile@gnu.org Subject: 'gensym' is not guaranteed to return a fresh symbol X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 =?utf-8?Q?Vent=C3=B4se?= an 223 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Wed, 11 Mar 2015 18:15:02 +0100 Message-ID: <87a8zjxxpl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) =E2=80=98gensym=E2=80=99 returns interned symbols, but the algorithm to det= ermine the new symbol is simplistic and predictable. Thus, one can arrange to produce a symbol before =E2=80=98gensym=E2=80=99 d= oes, leading =E2=80=98gensym=E2=80=99 to return a symbol that=E2=80=99s not fresh (in te= rms of =E2=80=98eq?=E2=80=99), as is the case with the second call to =E2=80=98gensym=E2=80=99 here: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (gensym "x") $1 =3D x379 scheme@(guile-user)> 'x405 $2 =3D x405 scheme@(guile-user)> (gensym "x") $3 =3D x405 --8<---------------cut here---------------end--------------->8--- Should we worry about it? I think it may have hard to anticipate security implications. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 18 14:09:47 2016 Received: (at 20087) by debbugs.gnu.org; 18 Mar 2016 18:09:47 +0000 Received: from localhost ([127.0.0.1]:52926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agyqJ-0007gk-5g for submit@debbugs.gnu.org; Fri, 18 Mar 2016 14:09:47 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:52559) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agxoA-00064J-Fj for 20087@debbugs.gnu.org; Fri, 18 Mar 2016 13:03:30 -0400 Received: by mail2.openmailbox.org (Postfix, from userid 1004) id AA7152ACA037; Fri, 18 Mar 2016 18:03:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1458320609; bh=dWVvuftrCjpWsqOJFV46BsrHlgLnJxG0oisTokn+nJU=; h=Date:From:To:Subject:From; b=JaJuN18Ucv2LcLY6YcFQoac9X7dYGJst4hmKuZzLdGkoYMxIbbyxOmpKjz2oYmPDp LSb16mpcFi/4WNuhrN11XUnqAZUqbr/D8Fq9AQ+3ZCKha+jBIqcGQW6KyJ4tCPXoMn cMFUXtGRUQrDIILi1e6XtlvzFYlrN3nq8R6NcO1w= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on openmailbox-b2 X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=ALL_TRUSTED,BAYES_50, DKIM_ADSP_ALL autolearn=no autolearn_force=no version=3.4.0 Received: from www.openmailbox.org (openmailbox-b1 [10.91.69.218]) by mail2.openmailbox.org (Postfix) with ESMTP id 743D32AC6E69 for <20087@debbugs.gnu.org>; Fri, 18 Mar 2016 18:03:28 +0100 (CET) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_22828f8a7bb09d47194f8199789c9720" Date: Fri, 18 Mar 2016 17:03:27 +0000 From: rain1@openmailbox.org To: 20087@debbugs.gnu.org Subject: gensym Message-ID: X-Sender: rain1@openmailbox.org User-Agent: Roundcube Webmail/1.0.6 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20087 X-Mailman-Approved-At: Fri, 18 Mar 2016 14:09:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=_22828f8a7bb09d47194f8199789c9720 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed 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. --=_22828f8a7bb09d47194f8199789c9720 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=guile-gensym-fix.diff Content-Disposition: attachment; filename=guile-gensym-fix.diff; size=1396 ZGlmZiAtLWdpdCBhL2xpYmd1aWxlL3N5bWJvbHMuYyBiL2xpYmd1aWxlL3N5bWJvbHMuYwppbmRl eCA3MWQ5ODI3Li4yZGY3NDMzIDEwMDY0NAotLS0gYS9saWJndWlsZS9zeW1ib2xzLmMKKysrIGIv bGliZ3VpbGUvc3ltYm9scy5jCkBAIC0zOTQsMTkgKzM5NCwzMSBAQCBTQ01fREVGSU5FIChzY21f Z2Vuc3ltLCAiZ2Vuc3ltIiwgMCwgMSwgMCwKICAgU0NNIHN1ZmZpeCwgbmFtZTsKICAgaW50IG4s IG5fZGlnaXRzOwogICBjaGFyIGJ1ZltTQ01fSU5UQlVGTEVOXTsKLQorICBTQ00gc3ltYm9sOwor ICAKICAgaWYgKFNDTV9VTkJORFAgKHByZWZpeCkpCiAgICAgcHJlZml4ID0gZGVmYXVsdF9nZW5z eW1fcHJlZml4OwogCi0gIC8qIG11dGV4IGluIGNhc2UgYW5vdGhlciB0aHJlYWQgbG9va3MgYW5k IGluY3MgYXQgdGhlIGV4YWN0IHNhbWUgbW9tZW50ICovCi0gIHNjbV9pX3NjbV9wdGhyZWFkX211 dGV4X2xvY2sgKCZzY21faV9taXNjX211dGV4KTsKLSAgbiA9IGdlbnN5bV9jb3VudGVyKys7Ci0g IHNjbV9pX3B0aHJlYWRfbXV0ZXhfdW5sb2NrICgmc2NtX2lfbWlzY19tdXRleCk7Ci0KLSAgbl9k aWdpdHMgPSBzY21faWludDJzdHIgKG4sIDEwLCBidWYpOwotICBzdWZmaXggPSBzY21fZnJvbV9s YXRpbjFfc3RyaW5nbiAoYnVmLCBuX2RpZ2l0cyk7Ci0gIG5hbWUgPSBzY21fc3RyaW5nX2FwcGVu ZCAoc2NtX2xpc3RfMiAocHJlZml4LCBzdWZmaXgpKTsKLSAgcmV0dXJuIHNjbV9zdHJpbmdfdG9f c3ltYm9sIChuYW1lKTsKKyAgd2hpbGUoMSkgeworICAgIC8qIG11dGV4IGluIGNhc2UgYW5vdGhl ciB0aHJlYWQgbG9va3MgYW5kIGluY3MgYXQgdGhlIGV4YWN0IHNhbWUgbW9tZW50ICovCisgICAg c2NtX2lfc2NtX3B0aHJlYWRfbXV0ZXhfbG9jayAoJnNjbV9pX21pc2NfbXV0ZXgpOworICAgIG4g PSBnZW5zeW1fY291bnRlcisrOworICAgIHNjbV9pX3B0aHJlYWRfbXV0ZXhfdW5sb2NrICgmc2Nt X2lfbWlzY19tdXRleCk7CisgICAgCisgICAgbl9kaWdpdHMgPSBzY21faWludDJzdHIgKG4sIDEw LCBidWYpOworICAgIHN1ZmZpeCA9IHNjbV9mcm9tX2xhdGluMV9zdHJpbmduIChidWYsIG5fZGln aXRzKTsKKyAgICBuYW1lID0gc2NtX3N0cmluZ19hcHBlbmQgKHNjbV9saXN0XzIgKHByZWZpeCwg c3VmZml4KSk7CisgICAgCisgICAgc3ltYm9sID0gbG9va3VwX2ludGVybmVkX3N5bWJvbCAobmFt ZSwgc2NtX2lfc3RyaW5nX2hhc2ggKG5hbWUpKTsKKyAgICBpZiAoc2NtX2lzX3RydWUgKHN5bWJv bCkpCisgICAgICB7CisgICAgICAgIGNvbnRpbnVlOworICAgICAgfQorICAgIGVsc2UKKyAgICAg IHsKKyAgICAgICAgcmV0dXJuIHNjbV9zdHJpbmdfdG9fc3ltYm9sIChuYW1lKTsKKyAgICAgIH0K KyAgfQogfQogI3VuZGVmIEZVTkNfTkFNRQogCg== --=_22828f8a7bb09d47194f8199789c9720-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 22 01:24:47 2016 Received: (at 20087) by debbugs.gnu.org; 22 Mar 2016 05:24:47 +0000 Received: from localhost ([127.0.0.1]:57622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiEoA-0004Ak-SA for submit@debbugs.gnu.org; Tue, 22 Mar 2016 01:24:47 -0400 Received: from world.peace.net ([50.252.239.5]:53874 ident=hope2) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiEo8-0004Ab-O1 for 20087@debbugs.gnu.org; Tue, 22 Mar 2016 01:24:45 -0400 Received: from [10.1.10.68] (helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aiEnx-0006Mu-Uy; Tue, 22 Mar 2016 01:24:34 -0400 From: Mark H Weaver To: rain1@openmailbox.org Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> Date: Tue, 22 Mar 2016 01:24:26 -0400 In-Reply-To: (rain1@openmailbox.org's message of "Fri, 18 Mar 2016 17:03:27 +0000") Message-ID: <87twjzytit.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20087 Cc: 20087@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) ludo@gnu.org (Ludovic Court=C3=A8s) writes: > =E2=80=98gensym=E2=80=99 returns interned symbols, but the algorithm to d= etermine the > new symbol is simplistic and predictable. >=20 > Thus, one can arrange to produce a symbol before =E2=80=98gensym=E2=80=99= does, leading > =E2=80=98gensym=E2=80=99 to return a symbol that=E2=80=99s not fresh (in = terms of =E2=80=98eq?=E2=80=99), as is > the case with the second call to =E2=80=98gensym=E2=80=99 here: rain1@openmailbox.org writes: > 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. 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 collisions. Therefore, we must unfortunately live with the possibility of collisions. Furthermore, if we add a requirement for deterministic behavior (which I think we must), then we must live with the fact that intentional collisions can be trivially achieved. With this in mind, I'm not sure it makes sense to add code that attempts, but fails, to eliminate the possibility of collisions. If we cannot eliminate the possibility of collisions, and we cannot avoid intentional collisions, what can we do? I think the best we can hope for is to significantly reduce the probability of _unintentional_ collisions, perhaps by starting the gensym counter at a large number. The other thing we can do is to clearly document these inherent problems with gensym, so that they will not be misused for jobs for which they are not appropriate. What do you think? Mark From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 22 03:58:40 2016 Received: (at 20087) by debbugs.gnu.org; 22 Mar 2016 07:58:40 +0000 Received: from localhost ([127.0.0.1]:57666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiHD6-0007qY-MD for submit@debbugs.gnu.org; Tue, 22 Mar 2016 03:58:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiHD5-0007qM-K2 for 20087@debbugs.gnu.org; Tue, 22 Mar 2016 03:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiHCx-0004kx-9W for 20087@debbugs.gnu.org; Tue, 22 Mar 2016 03:58:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiHCx-0004kt-5r; Tue, 22 Mar 2016 03:58:31 -0400 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:60502 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aiHCw-0000Id-Fi; Tue, 22 Mar 2016 03:58:30 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mark H Weaver Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 Germinal an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 22 Mar 2016 08:58:27 +0100 In-Reply-To: <87twjzytit.fsf@netris.org> (Mark H. Weaver's message of "Tue, 22 Mar 2016 01:24:26 -0400") Message-ID: <87wpovueos.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 20087 Cc: rain1@openmailbox.org, 20087@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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 collisions. Yeah, good point. > If we cannot eliminate the possibility of collisions, and we cannot > avoid intentional collisions, what can we do? I think the best we can > hope for is to significantly reduce the probability of _unintentional_ > collisions, perhaps by starting the gensym counter at a large number. I=E2=80=99m 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 "x") =3D> #{x 123}# (This is already the case when called with no arguments.) > The other thing we can do is to clearly document these inherent problems > with gensym, so that they will not be misused for jobs for which they > are not appropriate. I think we should add a sentence to that effect in the manual. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 22 07:29:05 2016 Received: (at 20087) by debbugs.gnu.org; 22 Mar 2016 11:29:05 +0000 Received: from localhost ([127.0.0.1]:57789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiKUj-0006C9-7b for submit@debbugs.gnu.org; Tue, 22 Mar 2016 07:29:05 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:59256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiKNA-00061G-1Z for 20087@debbugs.gnu.org; Tue, 22 Mar 2016 07:21:16 -0400 Received: by mail2.openmailbox.org (Postfix, from userid 1004) id 2D7D82AC7E67; Tue, 22 Mar 2016 12:21:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1458645674; bh=McV3Pt2cVcKV774UMIQjNTT1H+QpBCdB6T+V2EmNAyI=; h=Date:From:To:Subject:In-Reply-To:References:From; b=o4jnPPSfvZVwkdO0xWTAxgJxz1DwqrkGvtBqtx/KG/CWyWcrvSOc+XK7xqo1WW3n7 BLiv0ojvtqjOSSJaPsLzvmdR9ut3Xb6BdvtzhoF8KnG7JLG5N0a0RjdTunhya1wIhP v9lIkn9R0CGaCsk28zmJLSzA3KLkIejMTfEW3cRw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on openmailbox-b2 X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=ALL_TRUSTED,BAYES_50, DKIM_ADSP_ALL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from www.openmailbox.org (openmailbox-b1 [10.91.69.218]) by mail2.openmailbox.org (Postfix) with ESMTP id CB2B72ACD4F5 for <20087@debbugs.gnu.org>; Tue, 22 Mar 2016 12:21:05 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 22 Mar 2016 11:21:05 +0000 From: rain1@openmailbox.org To: 20087@debbugs.gnu.org Subject: Re: bug#20087: gensym In-Reply-To: <87twjzytit.fsf@netris.org> References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> Message-ID: X-Sender: rain1@openmailbox.org User-Agent: Roundcube Webmail/1.0.6 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20087 X-Mailman-Approved-At: Tue, 22 Mar 2016 07:29:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-03-22 05:24, Mark H Weaver wrote: > ludo@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 (in terms of ‘eq?’), as >> is >> the case with the second call to ‘gensym’ here: > > rain1@openmailbox.org writes: >> 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. > > 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 collisions. Thanks for looking over the patch I sent! One expects of gensym to create a fresh symbol, something not EQ? to any symbol that already exists. It is an important property to be able to rely on and this patch achieves that. About symbols interned after, would that refer to something like this: ------------------------ scheme@(guile-user)> (define a (gensym "x")) scheme@(guile-user)> a $1 = x280 scheme@(guile-user)> (eq? a (string->symbol "x280")) $2 = #t ------------------------ In most lisps gensym creates an uninterned symbol. I think that would stop the previous giving #t. I could write a patch for this if wanted. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 22 14:07:06 2016 Received: (at 20087) by debbugs.gnu.org; 22 Mar 2016 18:07:06 +0000 Received: from localhost ([127.0.0.1]:60308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiQhu-0004bl-Cy for submit@debbugs.gnu.org; Tue, 22 Mar 2016 14:07:06 -0400 Received: from world.peace.net ([50.252.239.5]:55171 ident=hope4) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiQhs-0004bc-Os for 20087@debbugs.gnu.org; Tue, 22 Mar 2016 14:07:05 -0400 Received: from [10.1.10.68] (helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aiQhC-0002Ep-3h; Tue, 22 Mar 2016 14:06:22 -0400 From: Mark H Weaver To: rain1@openmailbox.org Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> Date: Tue, 22 Mar 2016 14:06:13 -0400 In-Reply-To: (rain1@openmailbox.org's message of "Tue, 22 Mar 2016 11:21:05 +0000") Message-ID: <87bn66wfoq.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20087 Cc: 20087@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) rain1@openmailbox.org writes: > On 2016-03-22 05:24, Mark H Weaver wrote: >> ludo@gnu.org (Ludovic Court=C3=A8s) writes: >>> =E2=80=98gensym=E2=80=99 returns interned symbols, but the algorithm to= determine the >>> new symbol is simplistic and predictable. >>> >>> Thus, one can arrange to produce a symbol before =E2=80=98gensym=E2=80= =99 does, >>> leading >>> =E2=80=98gensym=E2=80=99 to return a symbol that=E2=80=99s not fresh (i= n terms of =E2=80=98eq?=E2=80=99), >>> as is >>> the case with the second call to =E2=80=98gensym=E2=80=99 here: >> >> rain1@openmailbox.org writes: >>> 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. >> >> 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 collisions. > > Thanks for looking over the patch I sent! > > One expects of gensym to create a fresh symbol, something not EQ? to > any symbol that already exists. It is an important property to be able > to rely on and this patch achieves that. Can you give a (non-contrived) example of an application that requires the property you stated above, but does not rely on avoiding collisions with symbols interned after the gensym? I=E2=80=99m open to the idea that such applications exist, but at the momen= t I cannot think of one :) > About symbols interned after, would that refer to something like this: > > ------------------------ > scheme@(guile-user)> (define a (gensym "x")) > scheme@(guile-user)> a > $1 =3D x280 > scheme@(guile-user)> (eq? a (string->symbol "x280")) > $2 =3D #t > ------------------------ Right. Another example would be using =E2=80=98read=E2=80=99 after the gen= sym, on input that contains a symbol of the same name. > In most lisps gensym creates an uninterned symbol. I think that would > stop the previous giving #t. Indeed, it would solve this problem, but we cannot change the behavior of Guile's =E2=80=98gensym=E2=80=99 in this way, since it would break a lot= of existing code. By the way, I looked at our manual entry for =E2=80=98gensym=E2=80=99, and = it includes the following text: The symbols generated by =E2=80=98gensym=E2=80=99 are _likely_ to be u= nique, since their names begin with a space and it is only otherwise possible to generate such symbols if a programmer goes out of their way to do so. Uniqueness can be guaranteed by instead using uninterned symbols (*noteSymbol Uninterned::), though they can=E2=80=99t be usefully written= out and read back in. We have =E2=80=98make-symbol=E2=80=99 for creating uninterned symbols, alth= ough you must provide the exact name of the returned symbol. > I could write a patch for this if wanted. It would be nice to have another procedure, maybe =E2=80=98uninterned-gensy= m=E2=80=99 (I=E2=80=99m not sure what to call it, names are hard :) which would be like =E2=80=98gensym=E2=80=99 but would return an uninterned symbol, and thus re= liably avoid collisions. If you=E2=80=99d like to contribute such a procedure, that would be welcome. It is our policy to ask contributors to assign copyright to the Free Software Foundation. Would you be willing to do this? Mark From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 23 13:55:24 2016 Received: (at 20087) by debbugs.gnu.org; 23 Mar 2016 17:55:24 +0000 Received: from localhost ([127.0.0.1]:34691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ain08-0005lP-79 for submit@debbugs.gnu.org; Wed, 23 Mar 2016 13:55:24 -0400 Received: from world.peace.net ([50.252.239.5]:57847 ident=hope9) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ain06-0005lH-TS for 20087@debbugs.gnu.org; Wed, 23 Mar 2016 13:55:23 -0400 Received: from [10.1.10.78] (helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aimzz-0008EH-DJ; Wed, 23 Mar 2016 13:55:15 -0400 From: Mark H Weaver To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> <87wpovueos.fsf@gnu.org> Date: Wed, 23 Mar 2016 13:55:13 -0400 In-Reply-To: <87wpovueos.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 22 Mar 2016 08:58:27 +0100") Message-ID: <87twjxqdtq.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20087 Cc: rain1@openmailbox.org, 20087@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver skribis: > >> If we cannot eliminate the possibility of collisions, and we cannot >> avoid intentional collisions, what can we do? I think the best we can >> hope for is to significantly reduce the probability of _unintentional_ >> collisions, perhaps by starting the gensym counter at a large number. > > I=E2=80=99m 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 "x") =3D> #{x 123}# I think this is a good idea. >> The other thing we can do is to clearly document these inherent problems >> with gensym, so that they will not be misused for jobs for which they >> are not appropriate. > > I think we should add a sentence to that effect in the manual. It turns out the manual already has the following text in the =E2=80=98gens= ym=E2=80=99 entry, which I think is sufficient. The symbols generated by =E2=80=98gensym=E2=80=99 are _likely_ to be u= nique, since their names begin with a space and it is only otherwise possible to generate such symbols if a programmer goes out of their way to do so. Uniqueness can be guaranteed by instead using uninterned symbols (*noteSymbol Uninterned::), though they can=E2=80=99t be usefully written= out and read back in. What do you think? Mark From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 24 04:45:55 2016 Received: (at 20087) by debbugs.gnu.org; 24 Mar 2016 08:45:55 +0000 Received: from localhost ([127.0.0.1]:35051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj0tv-00028N-9p for submit@debbugs.gnu.org; Thu, 24 Mar 2016 04:45:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj0tt-000289-9P for 20087@debbugs.gnu.org; Thu, 24 Mar 2016 04:45:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj0ti-00053P-OB for 20087@debbugs.gnu.org; Thu, 24 Mar 2016 04:45:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj0ti-00053L-KT; Thu, 24 Mar 2016 04:45:42 -0400 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:33924 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aj0th-0006uh-Vf; Thu, 24 Mar 2016 04:45:42 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mark H Weaver Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> <87wpovueos.fsf@gnu.org> <87twjxqdtq.fsf@netris.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Germinal an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Thu, 24 Mar 2016 09:45:38 +0100 In-Reply-To: <87twjxqdtq.fsf@netris.org> (Mark H. Weaver's message of "Wed, 23 Mar 2016 13:55:13 -0400") Message-ID: <87r3f04631.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 20087 Cc: rain1@openmailbox.org, 20087@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Mark H Weaver skribis: >> >>> If we cannot eliminate the possibility of collisions, and we cannot >>> avoid intentional collisions, what can we do? I think the best we can >>> hope for is to significantly reduce the probability of _unintentional_ >>> collisions, perhaps by starting the gensym counter at a large number. >> >> I=E2=80=99m 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 "x") =3D> #{x 123}# > > I think this is a good idea. > >>> The other thing we can do is to clearly document these inherent problems >>> with gensym, so that they will not be misused for jobs for which they >>> are not appropriate. >> >> I think we should add a sentence to that effect in the manual. > > It turns out the manual already has the following text in the =E2=80=98ge= nsym=E2=80=99 > entry, which I think is sufficient. > > The symbols generated by =E2=80=98gensym=E2=80=99 are _likely_ to be= unique, since > their names begin with a space and it is only otherwise possible to > generate such symbols if a programmer goes out of their way to do so. > Uniqueness can be guaranteed by instead using uninterned symbols > (*noteSymbol Uninterned::), though they can=E2=80=99t be usefully writt= en out > and read back in. > > What do you think? Oh indeed, I guess I had overlooked that. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 23 09:49:10 2016 Received: (at 20087) by debbugs.gnu.org; 23 Jun 2016 13:49:11 +0000 Received: from localhost ([127.0.0.1]:51949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG50I-0002Bx-Jg for submit@debbugs.gnu.org; Thu, 23 Jun 2016 09:49:10 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:65043 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG507-00029G-W1 for 20087@debbugs.gnu.org; Thu, 23 Jun 2016 09:49:09 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 6DCD9234F1; Thu, 23 Jun 2016 09:48:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=PYBLYJ61D3qJ mZbO/PlR05LfNQY=; b=NJSAsuOqlUpHolx+qw36kUNz3GcpytzNzMray2aEJ7ft 8fTWyPEji7TOC9zOrPe45IDnnXH9WpZZrxkO7mufMRtX3bUx6PcBE9Xjgm/9p3c3 HP6nzuzx6UspVWoJKvQh9h/VgHhY+twqaACjzAKMZxTv1iCRYvCV8chN06D9keU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=I0QpCw arUQY0fhTrh2G/fWtEGGvNmVTtYV8vqYZFUEXhBbYmrimNRbvDzANfBzjAya6y9p 2Zipz9GXZ2DDU2BE3KQ1CardIQFxvhwztZ11ashP5sahAgJV6nlJKaJ2UA5cEifF u4ESognkR/tyjx/HvqOTLzivUByXTekKkGSxA= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 67955234EE; Thu, 23 Jun 2016 09:48:57 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 89726234EB; Thu, 23 Jun 2016 09:48:56 -0400 (EDT) From: Andy Wingo To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> <87wpovueos.fsf@gnu.org> <87twjxqdtq.fsf@netris.org> <87r3f04631.fsf@gnu.org> Date: Thu, 23 Jun 2016 15:48:49 +0200 In-Reply-To: <87r3f04631.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 24 Mar 2016 09:45:38 +0100") Message-ID: <87oa6snhha.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 3B1CAFE8-3949-11E6-A23B-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20087 Cc: Mark H Weaver , 20087@debbugs.gnu.org, rain1@openmailbox.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Thu 24 Mar 2016 09:45, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver skribis: > >> It turns out the manual already has the following text in the =E2=80=98g= ensym=E2=80=99 >> entry, which I think is sufficient. >> >> The symbols generated by =E2=80=98gensym=E2=80=99 are _likely_ to b= e unique, since >> their names begin with a space and it is only otherwise possible to >> generate such symbols if a programmer goes out of their way to do so. >> Uniqueness can be guaranteed by instead using uninterned symbols >> (*noteSymbol Uninterned::), though they can=E2=80=99t be usefully writ= ten out >> and read back in. >> >> What do you think? > > Oh indeed, I guess I had overlooked that. 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 though as who knows, maybe someone is compiling something with symbols made with make-symbol. WDYT? If you agree we can close this bug. Andy From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 23 10:14:17 2016 Received: (at 20087) by debbugs.gnu.org; 23 Jun 2016 14:14:17 +0000 Received: from localhost ([127.0.0.1]:52752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG5Oa-000307-O8 for submit@debbugs.gnu.org; Thu, 23 Jun 2016 10:14:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG5OZ-0002zv-IG for 20087@debbugs.gnu.org; Thu, 23 Jun 2016 10:14:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG5OT-0003wV-AT for 20087@debbugs.gnu.org; Thu, 23 Jun 2016 10:14:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG5OM-0003uS-WE; Thu, 23 Jun 2016 10:14:03 -0400 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:52504 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bG5OK-0001HK-B6; Thu, 23 Jun 2016 10:14:01 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Andy Wingo Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> <87wpovueos.fsf@gnu.org> <87twjxqdtq.fsf@netris.org> <87r3f04631.fsf@gnu.org> <87oa6snhha.fsf@pobox.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Messidor an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Thu, 23 Jun 2016 16:13:57 +0200 In-Reply-To: <87oa6snhha.fsf@pobox.com> (Andy Wingo's message of "Thu, 23 Jun 2016 15:48:49 +0200") Message-ID: <87shw4ngbe.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 20087 Cc: Mark H Weaver , 20087@debbugs.gnu.org, rain1@openmailbox.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) Andy Wingo skribis: > On Thu 24 Mar 2016 09:45, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Mark H Weaver skribis: >> >>> It turns out the manual already has the following text in the =E2=80=98= gensym=E2=80=99 >>> entry, which I think is sufficient. >>> >>> The symbols generated by =E2=80=98gensym=E2=80=99 are _likely_ to = be unique, since >>> their names begin with a space and it is only otherwise possible to >>> generate such symbols if a programmer goes out of their way to do so. >>> Uniqueness can be guaranteed by instead using uninterned symbols >>> (*noteSymbol Uninterned::), though they can=E2=80=99t be usefully wri= tten out >>> and read back in. >>> >>> What do you think? >> >> Oh indeed, I guess I had overlooked that. > > 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 though as > who knows, maybe someone is compiling something with symbols made with > make-symbol. WDYT? If you agree we can close this bug. That makes sense to me. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 23 12:05:43 2016 Received: (at 20087-done) by debbugs.gnu.org; 23 Jun 2016 16:05:43 +0000 Received: from localhost ([127.0.0.1]:52855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG78Q-0005uZ-TW for submit@debbugs.gnu.org; Thu, 23 Jun 2016 12:05:43 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:61574 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG78P-0005uR-I5 for 20087-done@debbugs.gnu.org; Thu, 23 Jun 2016 12:05:41 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 6C4BF2429C; Thu, 23 Jun 2016 12:05:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=DlAJUD/fgEl1 HHQ6DuqqlX+ZYLc=; b=YvIvewxeAMMg4zsSgzDkofbhbULFiqdS9Vc9QDWTV+Ju 95x2irCZ+zein8fEO2L7bR3/GOcU6Md0EWGlYLOWrzQ4CcEETrjmSJVl+/Rp/HrP jK4jBH8jRBOev0GIG+UNfDEZNUXVjI6E955QYCkXsUFr62ep2iS6DECBeFkmSGM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=EqQJ6/ +MRHy0T0GltLzV8YYCTikg9uIAdyFUmGy6id2mUa2Tr9hUwzQbUJzt8xrkfxWzdQ C2kb8br6HsiuUePBE3ZRzLJAJOOgrNHsHtoI+2ZSomEvgz5J8F2gogpItCd50kpY x5XEuXse636g5OKmDWZ7pAqpq8f3T1Uz5EKw0= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 652842429B; Thu, 23 Jun 2016 12:05:38 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 81B7A2429A; Thu, 23 Jun 2016 12:05:37 -0400 (EDT) From: Andy Wingo To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#20087: gensym References: <87a8zjxxpl.fsf@gnu.org> <87twjzytit.fsf@netris.org> <87wpovueos.fsf@gnu.org> <87twjxqdtq.fsf@netris.org> <87r3f04631.fsf@gnu.org> <87oa6snhha.fsf@pobox.com> <87shw4ngbe.fsf@gnu.org> Date: Thu, 23 Jun 2016 18:05:30 +0200 In-Reply-To: <87shw4ngbe.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 23 Jun 2016 16:13:57 +0200") Message-ID: <87bn2roppx.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 534264C4-395C-11E6-BE1B-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20087-done Cc: Mark H Weaver , 20087-done@debbugs.gnu.org, rain1@openmailbox.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Thu 23 Jun 2016 16:13, ludo@gnu.org (Ludovic Court=C3=A8s) 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 though as >> who knows, maybe someone is compiling something with symbols made with >> make-symbol. WDYT? If you agree we can close this bug. > > That makes sense to me. Closing then. Thanks for the review :) Andy From unknown Tue Aug 19 06:31:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Jul 2016 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator