From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe Date: Wed, 06 Feb 2019 23:09:23 +0100 Message-ID: <87va1w6030.fsf@gnu.org> References: <87h8vvp1q7.fsf@elephly.net> <87377esu1a.fsf@gnu.org> <87k20nz18u.fsf@igalia.com> <87a81jj5gg.fsf@gnu.org> <87bmlyzxj7.fsf@elephly.net> <87shf44ny0.fsf@elephly.net> <878tfi9x15.fsf@gnu.org> <87h8nstms1.fsf@gnu.org> <874ljstlvq.fsf_-_@gnu.org> <87603x6x1f.fsf@igalia.com> <878t8tyyfk.fsf@gnu.org> <87lgct5e06.fsf@igalia.com> <87lg2t7z1o.fsf@gnu.org> <87o97o99n6.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grVOO-0005Ze-SU for bug-guix@gnu.org; Wed, 06 Feb 2019 17:10:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grVON-00023E-Bw for bug-guix@gnu.org; Wed, 06 Feb 2019 17:10:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36994) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grVOL-00022s-Rg for bug-guix@gnu.org; Wed, 06 Feb 2019 17:10:03 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87o97o99n6.fsf@igalia.com> (Andy Wingo's message of "Wed, 06 Feb 2019 17:14:37 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Andy Wingo Cc: 27476@debbugs.gnu.org Hi! Andy Wingo skribis: > To be clear, here's the series of events. Firstly, know that defining a > syntax parameter is like: Thanks for the clear explanation! >> So I came up with =E2=80=98define-syntax-parameter-once=E2=80=99, which = is like >> =E2=80=98define-once=E2=80=99 but for syntax parameters (note that we ca= n=E2=80=99t use >> =E2=80=98define-once=E2=80=99 in =E2=80=98define-syntax-parameter-once= =E2=80=99 because it expands to a >> reference to NAME, which doesn=E2=80=99t work for a macro): > > Your fix is good! But, it prevents redefinition of syntax parameters. Yes. It=E2=80=99s acceptable in this case, so I=E2=80=99ve pushed it as a = workaround as commit 8245bb74fc7bdcdc2f9d458057cefc9cd982e489 in Guix. > I would like to work on a solution that instead of using this > double-lookup, simply adds an association between P and F* in the > environment, instead of doing the double-lookup thing. Probably that > will be 3.0-only. > > For 2.2, we can probably update the compiler to trampoline through some > kind of "redefine-syntax" or something that will do (set-car! B F**) > instead of (define P (stx-param B*)). I.e. redefinition keeps the > unique key there. Sounds good. Are you taking a look at this? Perhaps that=E2=80=99d be a good excuse to release 2.2.5. Thank you! Ludo=E2=80=99.