From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 30 09:50:55 2015 Received: (at submit) by debbugs.gnu.org; 30 Jun 2015 13:50:55 +0000 Received: from localhost ([127.0.0.1]:33810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9vw5-0003to-To for submit@debbugs.gnu.org; Tue, 30 Jun 2015 09:50:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43949) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9vw2-0003ta-Uh for submit@debbugs.gnu.org; Tue, 30 Jun 2015 09:50:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9vvw-0003QX-Cy for submit@debbugs.gnu.org; Tue, 30 Jun 2015 09:50:45 -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 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9vvw-0003QS-9G for submit@debbugs.gnu.org; Tue, 30 Jun 2015 09:50:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9vvv-0000UF-42 for bug-guile@gnu.org; Tue, 30 Jun 2015 09:50:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9vvq-0003OL-MY for bug-guile@gnu.org; Tue, 30 Jun 2015 09:50:43 -0400 Received: from primfilat.com ([71.19.154.166]:59226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9vvq-0003Nh-Gq for bug-guile@gnu.org; Tue, 30 Jun 2015 09:50:38 -0400 Received: from [192.168.0.104] (unknown [46.18.40.205]) by primfilat.com (Postfix) with ESMTPSA id BEA7B7BA98 for ; Tue, 30 Jun 2015 15:50:35 +0200 (CEST) Message-ID: <55929EA6.6090404@primfilat.com> Date: Tue, 30 Jun 2015 15:50:30 +0200 From: Josep Portella Florit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: bug-guile@gnu.org Subject: make-dynamic-state, with-dynamic-state & exceptions Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] 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: -4.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: -4.0 (----) This code crashes Guile 2.0.11: (define x (make-dynamic-state)) (with-dynamic-state x (lambda () (/ 1 0))) For now I'm using this workaround: (let ((w-d-s with-dynamic-state)) (set! with-dynamic-state (lambda (s p) (let ((e #f)) (w-d-s s (lambda () (catch #t p (lambda x (set! e x))))) (when e (apply throw e)))))) From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 02:49:31 2015 Received: (at 20938) by debbugs.gnu.org; 1 Jul 2015 06:49:31 +0000 Received: from localhost ([127.0.0.1]:35076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZABpk-0002Tw-PD for submit@debbugs.gnu.org; Wed, 01 Jul 2015 02:49:31 -0400 Received: from primfilat.com ([71.19.154.166]:39187) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZABpc-0002Tb-Fj for 20938@debbugs.gnu.org; Wed, 01 Jul 2015 02:49:23 -0400 Received: from [192.168.0.104] (unknown [46.18.40.205]) by primfilat.com (Postfix) with ESMTPSA id 9DB297BAFB for <20938@debbugs.gnu.org>; Wed, 1 Jul 2015 08:49:09 +0200 (CEST) Message-ID: <55938D60.5050406@primfilat.com> Date: Wed, 01 Jul 2015 08:49:04 +0200 From: Josep Portella Florit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: 20938@debbugs.gnu.org Subject: Improved workaround Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 20938 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: -0.6 (/) The workaround in my other message discards the return value of `with-dynamic-state'. I've improved it: (let ((w-d-s with-dynamic-state)) (set! with-dynamic-state (lambda (s p) (let* ((e #f) (r (w-d-s s (lambda () (catch #t p (lambda x (set! e x))))))) (if e (apply throw e) r))))) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 13 10:57:31 2016 Received: (at 20938) by debbugs.gnu.org; 13 Mar 2016 14:57:31 +0000 Received: from localhost ([127.0.0.1]:47104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1af7SU-0005WR-Un for submit@debbugs.gnu.org; Sun, 13 Mar 2016 10:57:31 -0400 Received: from primfilat.com ([71.19.154.166]:41650) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1af7SS-0005WD-PW for 20938@debbugs.gnu.org; Sun, 13 Mar 2016 10:57:29 -0400 Received: from [192.168.0.4] (unknown [46.18.40.24]) by primfilat.com (Postfix) with ESMTPSA id 81B0D7BB5F for <20938@debbugs.gnu.org>; Sun, 13 Mar 2016 15:57:22 +0100 (CET) To: 20938@debbugs.gnu.org From: Josep Portella Florit Subject: More information Message-ID: <56E57FCD.2060404@primfilat.com> Date: Sun, 13 Mar 2016 15:57:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20938 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 (/) It doesn't crash Guile 1.8.8, but it does crash Guile 2.1.2, and this version outputs the following message about 2150 times: "Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler." From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 03:11:58 2016 Received: (at 20938) by debbugs.gnu.org; 24 Jun 2016 07:11:58 +0000 Received: from localhost ([127.0.0.1]:53280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGLHS-0008GJ-EE for submit@debbugs.gnu.org; Fri, 24 Jun 2016 03:11:58 -0400 Received: from pb-sasl2.pobox.com ([64.147.108.67]:52985 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGLHQ-0008GA-5z for 20938@debbugs.gnu.org; Fri, 24 Jun 2016 03:11:56 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id BCDFC204C4; Fri, 24 Jun 2016 03:11:53 -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; s=sasl; bh=Y1huWWl+687w4V2WFgA1bFON/yc=; b=GxZ7Rb ENykQ952KhqrjjbRa90b9aYdGN1StDpPWND943GvXCb4srz2dm6dZqnEis3yXa15 RgTeRzYl5AEwmcPJGVIaxWkEYPL14F+NnHuIFwCOf4P+nvnIEIrs5AX0y44o1YDC YiyNqJ4b3pSK9BUBQQ2qYmeG7UN85E0/pGOpk= 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; q=dns; s=sasl; b=LqzlnWrECwfBDwXNd43jcMu0SGoTQEjh OLk0KMRJECS8WGHdVO/sUL8Ex/dJT4VcdwcpOXp5OMhQsPtFLKfExnli4/VtFEpw uxaWnzTBaLWT3h9MgYMpBXRcO0nOTzqx4R55GDx7hZoEjA0dLLUerwLiNknz84IY HJzMzrM8uYE= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id A51ED204C1; Fri, 24 Jun 2016 03:11:53 -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-sasl2.pobox.com (Postfix) with ESMTPSA id E526C204C0; Fri, 24 Jun 2016 03:11:52 -0400 (EDT) From: Andy Wingo To: Josep Portella Florit Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions References: <55929EA6.6090404@primfilat.com> Date: Fri, 24 Jun 2016 09:11:45 +0200 In-Reply-To: <55929EA6.6090404@primfilat.com> (Josep Portella Florit's message of "Tue, 30 Jun 2015 15:50:30 +0200") Message-ID: <87wplfhxhq.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: ED70E196-39DA-11E6-B3F0-28A6F1301B6D-02397024!pb-sasl2.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20938 Cc: 20938@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: -1.4 (-) On Tue 30 Jun 2015 15:50, Josep Portella Florit writes: > This code crashes Guile 2.0.11: > > (define x (make-dynamic-state)) > (with-dynamic-state x (lambda () (/ 1 0))) Related: http://thread.gmane.org/gmane.lisp.guile.devel/16953 How are you using dynamic states? Andy From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 10:59:05 2016 Received: (at 20938) by debbugs.gnu.org; 24 Jun 2016 14:59:05 +0000 Received: from localhost ([127.0.0.1]:54450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGSZU-0005EO-U7 for submit@debbugs.gnu.org; Fri, 24 Jun 2016 10:59:05 -0400 Received: from primfilat.com ([71.19.148.100]:44181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGSZT-0005EH-Iu for 20938@debbugs.gnu.org; Fri, 24 Jun 2016 10:59:04 -0400 Received: from [192.168.0.4] (unknown [46.18.40.171]) by primfilat.com (Postfix) with ESMTPSA id ED4C957CD1; Fri, 24 Jun 2016 16:59:01 +0200 (CEST) Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions To: Andy Wingo References: <55929EA6.6090404@primfilat.com> <87wplfhxhq.fsf@pobox.com> From: Josep Portella Florit Message-ID: <47514354-2dc0-b945-a1b5-048aa1fe8ef6@primfilat.com> Date: Fri, 24 Jun 2016 16:58:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <87wplfhxhq.fsf@pobox.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20938 Cc: 20938@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: -1.4 (-) El 24/06/16 a les 09:11, Andy Wingo ha escrit: > On Tue 30 Jun 2015 15:50, Josep Portella Florit writes: > >> This code crashes Guile 2.0.11: >> >> (define x (make-dynamic-state)) >> (with-dynamic-state x (lambda () (/ 1 0))) > > Related: http://thread.gmane.org/gmane.lisp.guile.devel/16953 > > How are you using dynamic states? I have code[1] written in Racket which uses what I think are the equivalent to Guile's dynamic states: parameterizations. My code raises exceptions that contain the result of `(current-parameterization)`[2]. It later handles those exceptions and passes the parameterization to `call-with-parameterization`[3] in order to access the value several parameters had before the exception was raised. It also accumulates different results of `(current-parameterization)`, reorders them and for each one it passes the parameterization to `call-with-parameterization` and calls other code[4]. 1: 2: File `pinaret/runtime.rkt`, procedure `raise-error/params`. 3: File `pinaret/system.rkt`, procedure `generate`. File `pinaret/runtime.rkt`, procedure `print-error/params`. 4: File `pinaret/base.rkt`, there are many examples here, look for `(current-parameterization)`. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 09:17:40 2017 Received: (at 20938-done) by debbugs.gnu.org; 28 Feb 2017 14:17:40 +0000 Received: from localhost ([127.0.0.1]:59240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciiay-0007xv-0U for submit@debbugs.gnu.org; Tue, 28 Feb 2017 09:17:40 -0500 Received: from pb-sasl2.pobox.com ([64.147.108.67]:62829 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciiav-0007xn-So for 20938-done@debbugs.gnu.org; Tue, 28 Feb 2017 09:17:38 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id A42505F29B; Tue, 28 Feb 2017 09:17:37 -0500 (EST) 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; s=sasl; bh=4DukKHyWECzJIN2MgsWB0gKoCA8=; b=gXzIIZ cyJFOXG1E3Vpy9iEE8XmuxN8MxmLDn4rggH2TRGu4djO6+Wuu7/H+Y9fF5jQyzuk 5FPxG+Dk4eD95SqFPmQBv0XLAAB6N0ZeDJ8vwJbKtgb79lVisjNG6S5Meq0us1wt xw8O1c81Tz5yz+hLMvMLR/ViAkQ0Rzha70QpM= 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; q=dns; s=sasl; b=qY89/OTR4CToABM48g+OT1H0FdWExAVd VHqwLTlvIRjV8oYeHswhMHpbjX2YqDa6yRUnQKoopZSxIZaeBftpdco8Oe21uWGS Wsi+OPef8WOTeNMLVnGcSK7JNZAl1Qa4SHEESBJnNQERpyPsz3LR9AHGM6KMFT5D 5/6GOOKKGZQ= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 9D0055F29A; Tue, 28 Feb 2017 09:17:37 -0500 (EST) 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-sasl2.pobox.com (Postfix) with ESMTPSA id ADE425F299; Tue, 28 Feb 2017 09:17:36 -0500 (EST) From: Andy Wingo To: Josep Portella Florit Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions References: <55929EA6.6090404@primfilat.com> Date: Tue, 28 Feb 2017 15:17:29 +0100 In-Reply-To: <55929EA6.6090404@primfilat.com> (Josep Portella Florit's message of "Tue, 30 Jun 2015 15:50:30 +0200") Message-ID: <87tw7emmbq.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: A7ABCEAA-FDC0-11E6-A55D-6141F2301B6D-02397024!pb-sasl2.pobox.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20938-done Cc: 20938-done@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 (/) On Tue 30 Jun 2015 15:50, Josep Portella Florit writes: > This code crashes Guile 2.0.11: > > (define x (make-dynamic-state)) > (with-dynamic-state x (lambda () (/ 1 0))) Sad :/ Fixed in 2.2 though, finally. I don't really know how to fix it in 2.0 though. Marking as closed given that we will have a shiny new 2.2.0 soon. Andy From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 12:30:21 2017 Received: (at 20938) by debbugs.gnu.org; 1 Mar 2017 17:30:21 +0000 Received: from localhost ([127.0.0.1]:34717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj84z-0005Mj-16 for submit@debbugs.gnu.org; Wed, 01 Mar 2017 12:30:21 -0500 Received: from pb-sasl1.pobox.com ([64.147.108.66]:51923 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj84w-0005Mb-UZ for 20938@debbugs.gnu.org; Wed, 01 Mar 2017 12:30:19 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id ABC16603E1; Wed, 1 Mar 2017 12:30:17 -0500 (EST) 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; s=sasl; bh=GzJ3VLI58ZOGRucNuLM+cbR6F3I=; b=J+Z6YA bjuXI3JAGKVdJPHYYXsQluwEYbz7FObU9f+ks8+aPSWbpbOgUXDZ0+mgp9HpUaj9 DrgI7KYhw9YxDeC0qNAivK1bixcJUrI2yyxRDnfanCMotzciyxSaTAWXuQ71CpJU ykitSigHc8Bb2evFB8AlD5tARp/a0OnkOZhAY= 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; q=dns; s=sasl; b=sqZC4iHzQ7PALQ0BmyHss2iJONMmyDvJ jNoty0t7w25dvpob0htcQBNpfwPc1J2FsvoRlzMKX0yLZeQMX9Fqbc9Lu54Pry8c KZMcz6B1W4ba6Vw+FXXv4GM6yolHi+WqgjBkqaraDhlt+svAmVsA3oZwFXxi2XX6 3pJD7DprKU4= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id A3441603E0; Wed, 1 Mar 2017 12:30:17 -0500 (EST) 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 97DBD603DF; Wed, 1 Mar 2017 12:30:16 -0500 (EST) From: Andy Wingo To: Josep Portella Florit Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions References: <55929EA6.6090404@primfilat.com> <87tw7emmbq.fsf@pobox.com> <1b66634b-9e69-da86-116a-088eafb383e7@primfilat.com> Date: Wed, 01 Mar 2017 18:30:09 +0100 In-Reply-To: <1b66634b-9e69-da86-116a-088eafb383e7@primfilat.com> (Josep Portella Florit's message of "Wed, 1 Mar 2017 16:11:03 +0100") Message-ID: <87wpc8dhwe.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: BC3BEFA0-FEA4-11E6-8224-B667064AB293-02397024!pb-sasl1.pobox.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20938 Cc: 20938@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 (/) On Wed 01 Mar 2017 16:11, Josep Portella Florit writes: > Hi Andy, > > On 02/28/2017 03:17 PM, Andy Wingo wrote: >> On Tue 30 Jun 2015 15:50, Josep Portella Florit writes: >> >>> This code crashes Guile 2.0.11: >>> >>> (define x (make-dynamic-state)) >>> (with-dynamic-state x (lambda () (/ 1 0))) >> >> Sad :/ Fixed in 2.2 though, finally. I don't really know how to fix it >> in 2.0 though. Marking as closed given that we will have a shiny new >> 2.2.0 soon. > > Good work! Do I have to wait until you release 2.2.0 to test it? > (Today I've tested it with 2.1.7.22-fcebf and it still crashed.) Ack, I didn't actually test it! I thought a related fix in 2.1.7 would have caught it. I will have a look. > BTW, did you change your mind on deprecating dynamic states? > Yes, with a caveat. Having captured dynamic states also be mutable places was untenable, as you could have multiple threads mutating the same place at one time. However dynamic states work well as a way to transport a parameterization from one part of the code to another. I rely on them in Fibers for this purpose. What do you think? :) See NEWS: ** Fix too-broad capture of dynamic stack by delimited continuations Guile was using explicit stacks to represent, for example, the chain of current exception handlers. This means that a delimited continuation that captured a "catch" expression would capture the whole stack of exception handlers, not just the exception handler added by the "catch". This led to strangeness when resuming the continuation in some other context like other threads; "throw" could see an invalid stack of exception handlers. This has been fixed by the addition of the new "fluid-ref*" procedure that can access older values of fluids; in this way the exception handler stack is now implicit. See "Fluids and Dynamic States" in the manual, for more on fluid-ref*. And: ** Dynamic states capture values, not locations Dynamic states used to capture the locations of fluid-value associations. Capturing the current dynamic state then setting a fluid would result in a mutation of that captured state. Now capturing a dynamic state simply captures the current values, and calling `with-dynamic-state' copies those values into the Guile virtual machine instead of aliasing them in a way that could allow them to be mutated in place. This change allows Guile's fluid variables to be thread-safe. To capture the locations of a dynamic state, capture a `with-dynamic-state' invocation using partial continuations instead. Andy From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 17:15:48 2017 Received: (at 20938) by debbugs.gnu.org; 3 Mar 2017 22:15:48 +0000 Received: from localhost ([127.0.0.1]:38875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjvUK-0004Os-D7 for submit@debbugs.gnu.org; Fri, 03 Mar 2017 17:15:48 -0500 Received: from primfilat.com ([71.19.148.100]:45943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjvUJ-0004Oj-9N for 20938@debbugs.gnu.org; Fri, 03 Mar 2017 17:15:47 -0500 Received: from [192.168.0.4] (unknown [46.18.40.188]) by primfilat.com (Postfix) with ESMTPSA id 8BE8857D5D; Fri, 3 Mar 2017 23:15:45 +0100 (CET) Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions References: <55929EA6.6090404@primfilat.com> <87tw7emmbq.fsf@pobox.com> <1b66634b-9e69-da86-116a-088eafb383e7@primfilat.com> <87wpc8dhwe.fsf@pobox.com> From: Josep Portella Florit To: Andy Wingo Message-ID: Date: Fri, 3 Mar 2017 23:15:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <87wpc8dhwe.fsf@pobox.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20938 Cc: 20938@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 (/) On 03/01/2017 06:30 PM, Andy Wingo wrote: > On Wed 01 Mar 2017 16:11, Josep Portella Florit writes: >> (Today I've tested it with 2.1.7.22-fcebf and it still crashed.) > > Ack, I didn't actually test it! I thought a related fix in 2.1.7 would > have caught it. I will have a look. OK, can you reopen the bug? >> BTW, did you change your mind on deprecating dynamic states? >> > > Yes, with a caveat. Having captured dynamic states also be mutable > places was untenable, as you could have multiple threads mutating the > same place at one time. However dynamic states work well as a way to > transport a parameterization from one part of the code to another. I > rely on them in Fibers for this purpose. What do you think? :) Your use of `current-dynamic-state` in Fibers confused me, until I realized it works like `make-dynamic-state` in Guile 2.1. Good, now dynamic states are more analogous to Racket's parameterizations :-) From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 06 14:55:30 2017 Received: (at 20938) by debbugs.gnu.org; 6 Mar 2017 19:55:30 +0000 Received: from localhost ([127.0.0.1]:43212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckyjC-0001W6-Kc for submit@debbugs.gnu.org; Mon, 06 Mar 2017 14:55:30 -0500 Received: from pb-sasl2.pobox.com ([64.147.108.67]:60474 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckyjA-0001Vy-J7 for 20938@debbugs.gnu.org; Mon, 06 Mar 2017 14:55:29 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 4CA7F7689E; Mon, 6 Mar 2017 14:55:27 -0500 (EST) 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; s=sasl; bh=/z88JZUs1K3jranLrrmA8kLGC9s=; b=P3VHlH WvK6aImf5iElWQ43BAvXvSKMlBiZN3GN3KMfwRGGNnVG7JDAkp3RSJY48vD7O0Tc ePizdEeHDiJK7N385Nvc4IBmYTXRZEl0U+HMFyOhXRImDE18nEw+QjCu3edwSCx9 0zIVirNRmgLGl/h/6s7KCpRQzB+v84JLGuU0k= 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; q=dns; s=sasl; b=NcPrjBsGKkBuLj+pIeoSjQqyvqlA+qg9 8VgOQCmDvuCu2LmD4mA/VlkcBgPbhOFa7wRcTmpfdDhotRp4XEtn1Ge4pLAXYJZG wNUBgIjVuOmOhtxMSipCAyFTh2F3jAaAHymD4L6YJmMKdh93SiBSjaQvoHZoquYJ 6rb+oeQgt28= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 4671E7689D; Mon, 6 Mar 2017 14:55:27 -0500 (EST) 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-sasl2.pobox.com (Postfix) with ESMTPSA id 3F1097689C; Mon, 6 Mar 2017 14:55:26 -0500 (EST) From: Andy Wingo To: Josep Portella Florit Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions References: <55929EA6.6090404@primfilat.com> <87tw7emmbq.fsf@pobox.com> <1b66634b-9e69-da86-116a-088eafb383e7@primfilat.com> <87wpc8dhwe.fsf@pobox.com> Date: Mon, 06 Mar 2017 20:55:18 +0100 In-Reply-To: (Josep Portella Florit's message of "Fri, 3 Mar 2017 23:15:42 +0100") Message-ID: <87zigy9o49.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: D7D3D150-02A6-11E7-BD8B-85AB91A0D1B0-02397024!pb-sasl2.pobox.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20938 Cc: 20938@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 (/) reopen thanks (Hopefully the above commands will reopen the bug, if not I will do it via the other address; I am not very good with debbugs :) On Fri 03 Mar 2017 23:15, Josep Portella Florit writes: > On 03/01/2017 06:30 PM, Andy Wingo wrote: >> On Wed 01 Mar 2017 16:11, Josep Portella Florit writes: >>> (Today I've tested it with 2.1.7.22-fcebf and it still crashed.) >> >> Ack, I didn't actually test it! I thought a related fix in 2.1.7 would >> have caught it. I will have a look. > > OK, can you reopen the bug? From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 07 15:36:55 2017 Received: (at 20938-done) by debbugs.gnu.org; 7 Mar 2017 20:36:55 +0000 Received: from localhost ([127.0.0.1]:45064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clLqp-0004zn-8m for submit@debbugs.gnu.org; Tue, 07 Mar 2017 15:36:55 -0500 Received: from pb-sasl2.pobox.com ([64.147.108.67]:64556 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clLqn-0004zd-Mg for 20938-done@debbugs.gnu.org; Tue, 07 Mar 2017 15:36:53 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 1B3DB7A30D; Tue, 7 Mar 2017 15:36:52 -0500 (EST) 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; s=sasl; bh=9w4KwEQUhiUpoiaUbfKKomsRhxg=; b=ZN7C4f /xT+Oc6/jgLEV3b9mU7d6I1Rcv7VoAca/ub5BWgJVtZ5DNfn3tX1AY8vFJYNfG7E 4OK0zmiDgzJL/YicZrulqMmc53frM2ZJr0w67n+uh7RMIeSBjWaulMrhjQC2epzL cgywNYnMd7XfP49v+T7DnCWAsCOWgZUy9kVCk= 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; q=dns; s=sasl; b=e2vN3HwldmBAkLVdmcIYftArWHowkdlN JbYgje9jgQCyvri6JpCom8SvI7gnw3gO7SDv2Xz8ydOpuPhbQ2S9vu7s1TsRq1bM /UQAcjwcsbVNFFyOn2umsG9blVnDMOqqoxEnECVJMq4/sH+VVPgSbMBInigHGCnN gKtM0J1CTM0= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 137177A30C; Tue, 7 Mar 2017 15:36:52 -0500 (EST) 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-sasl2.pobox.com (Postfix) with ESMTPSA id EF8277A30B; Tue, 7 Mar 2017 15:36:50 -0500 (EST) From: Andy Wingo To: Josep Portella Florit Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions References: <55929EA6.6090404@primfilat.com> <87tw7emmbq.fsf@pobox.com> <1b66634b-9e69-da86-116a-088eafb383e7@primfilat.com> <87wpc8dhwe.fsf@pobox.com> Date: Tue, 07 Mar 2017 21:36:42 +0100 In-Reply-To: (Josep Portella Florit's message of "Fri, 3 Mar 2017 23:15:42 +0100") Message-ID: <87a88w963p.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: CB3C0762-0375-11E7-97CC-85AB91A0D1B0-02397024!pb-sasl2.pobox.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20938-done Cc: 20938-done@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 (/) On Fri 03 Mar 2017 23:15, Josep Portella Florit writes: > On 03/01/2017 06:30 PM, Andy Wingo wrote: >> On Wed 01 Mar 2017 16:11, Josep Portella Florit writes: >>> (Today I've tested it with 2.1.7.22-fcebf and it still crashed.) >> >> Ack, I didn't actually test it! I thought a related fix in 2.1.7 would >> have caught it. I will have a look. > > OK, can you reopen the bug? Fixed in master now. Thanks again for the report :) Andy From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 10 17:00:54 2017 Received: (at 20938-done) by debbugs.gnu.org; 10 Mar 2017 22:00:55 +0000 Received: from localhost ([127.0.0.1]:50077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmSak-0002xm-OM for submit@debbugs.gnu.org; Fri, 10 Mar 2017 17:00:54 -0500 Received: from primfilat.com ([71.19.148.100]:51875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmSai-0002xd-JU for 20938-done@debbugs.gnu.org; Fri, 10 Mar 2017 17:00:52 -0500 Received: from [192.168.0.4] (unknown [46.18.41.76]) by primfilat.com (Postfix) with ESMTPSA id B3AEE57C0E; Fri, 10 Mar 2017 23:00:50 +0100 (CET) Subject: Re: bug#20938: make-dynamic-state, with-dynamic-state & exceptions To: Andy Wingo References: <55929EA6.6090404@primfilat.com> <87tw7emmbq.fsf@pobox.com> <1b66634b-9e69-da86-116a-088eafb383e7@primfilat.com> <87wpc8dhwe.fsf@pobox.com> <87a88w963p.fsf@pobox.com> From: Josep Portella Florit Message-ID: <4055b60d-18d8-861a-1b47-bd651237e401@primfilat.com> Date: Fri, 10 Mar 2017 23:00:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <87a88w963p.fsf@pobox.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20938-done Cc: 20938-done@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 (/) On 03/07/2017 09:36 PM, Andy Wingo wrote: > Fixed in master now. Thanks again for the report :) I've just tested it; good work! From unknown Tue Aug 19 02:51:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 08 Apr 2017 11:24:04 +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