From unknown Sat Jun 21 03:27:44 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#21894 <21894@debbugs.gnu.org> To: bug#21894 <21894@debbugs.gnu.org> Subject: Status: escape continuation doc wrong about reinvokability Reply-To: bug#21894 <21894@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:27:44 +0000 retitle 21894 escape continuation doc wrong about reinvokability reassign 21894 guile submitter 21894 Zefram severity 21894 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 12 18:27:53 2015 Received: (at submit) by debbugs.gnu.org; 12 Nov 2015 23:27:53 +0000 Received: from localhost ([127.0.0.1]:35229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zx1HU-0003y9-Ix for submit@debbugs.gnu.org; Thu, 12 Nov 2015 18:27:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59028) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zx1HS-0003y1-AH for submit@debbugs.gnu.org; Thu, 12 Nov 2015 18:27:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx1HR-0008Uc-23 for submit@debbugs.gnu.org; Thu, 12 Nov 2015 18:27:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx1HQ-0008UY-Vi for submit@debbugs.gnu.org; Thu, 12 Nov 2015 18:27:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx1HP-00082C-Q3 for bug-guile@gnu.org; Thu, 12 Nov 2015 18:27:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx1HO-0008U1-Mk for bug-guile@gnu.org; Thu, 12 Nov 2015 18:27:47 -0500 Received: from river6.fysh.org ([2001:41d0:d:20da::2]:50350 helo=river.fysh.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx1HO-0008Su-Gm for bug-guile@gnu.org; Thu, 12 Nov 2015 18:27:46 -0500 Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1Zx1HK-0005w1-GJ; Thu, 12 Nov 2015 23:27:42 +0000 Date: Thu, 12 Nov 2015 23:27:42 +0000 From: Zefram To: bug-guile@gnu.org Subject: escape continuation doc wrong about reinvokability Message-ID: <20151112232742.GA19689@fysh.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: -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 (----) The manual says # Escape continuations are delimited continuations whose # only use is to make a non-local exit--i.e., to escape from the current # continuation. Such continuations are invoked only once, and for this # reason they are sometimes called "one-shot continuations". O RLY? scheme@(guile-user)> (use-modules (ice-9 control)) scheme@(guile-user)> (define cc #f) scheme@(guile-user)> (list 'a (let/ec e (list 'b (e (call-with-current-continuation (lambda (c) (set! cc c) 0)))))) $1 = (a 0) scheme@(guile-user)> (cc 1) $2 = (a 1) scheme@(guile-user)> (cc 2) $3 = (a 2) Clearly I have invoked this escape continuation, successfully, more than once. The semantics here are perfectly sensible, it's just the documentation that's off the mark, because it ignores how escape continuations interact with other kinds of continuation. I suggest changing "Such continuations are invoked only once" sentence to something like Such continuations can only be invoked from within the dynamic extent of the call to which they will jump. Because the jump ends that extent, if escape continuations are the only kind of continuations being used it is only possible to invoke an escape continuation at most once. For this reason they are sometimes called "one-shot continuations", but that is a misnomer when other kinds of continuations are also in use. Most kinds can reinstate a dynamic extent that has been exited, and if the extent of an escape continuation is reinstated then it can be invoked again to exit that extent again. Conversely, an escape continuation cannot be invoked from a separate thread that has its own dynamic state not including the continuation's extent, even if the continuation's extent is still in progress in its original thread and the continuation has never been invoked. -zefram From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 12:21:12 2016 Received: (at 21894-done) by debbugs.gnu.org; 24 Jun 2016 16:21:12 +0000 Received: from localhost ([127.0.0.1]:54542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGTqy-0007W0-Eq for submit@debbugs.gnu.org; Fri, 24 Jun 2016 12:21:12 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:56273 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGTqu-0007Vq-Qp for 21894-done@debbugs.gnu.org; Fri, 24 Jun 2016 12:21:11 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 21C741F919; Fri, 24 Jun 2016 12:21:07 -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=Vtq3IX9qEcv1gL2ChJSewjQCgTc=; b=HtgyVe eolctsBgqMIo+HaMO7JEUZ7zdQ7fXpTkJdCgmkQlXAl+B5SycEfr9syVq7tgBGWR ezuQdJodR/9Bv2coZSybROhIlfbEYRO6ffyJLu+/y98HI0sA8yqGDxmerUpDMaSk 72Tl5C4P0XsL7RlJ4cvoMiqAnakZ/7NtOa8ss= 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=H36UsdYF770KaXlHiof8NKaDvxKZjtU2 cWalGCUtkpx4mXKrKgT8RX3WCqpFTPjc655iau44GLSDj39dc2ys/e2HGQGdOVNB lXq4HROIbU4EEAiBv7tPG6cbFH398Dx5pFE8K6QoNcVT1JLLf/O6SElpqyldLqOU ZK1kyhwUHR4= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 007D91F916; Fri, 24 Jun 2016 12:21:07 -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 413471F915; Fri, 24 Jun 2016 12:21:06 -0400 (EDT) From: Andy Wingo To: Zefram Subject: Re: bug#21894: escape continuation doc wrong about reinvokability References: <20151112232742.GA19689@fysh.org> Date: Fri, 24 Jun 2016 18:20:59 +0200 In-Reply-To: <20151112232742.GA19689@fysh.org> (zefram@fysh.org's message of "Thu, 12 Nov 2015 23:27:42 +0000") Message-ID: <87a8iaeexg.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: A72B724E-3A27-11E6-B090-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 21894-done Cc: 21894-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: -1.4 (-) On Fri 13 Nov 2015 00:27, Zefram writes: > # Escape continuations are delimited continuations whose > # only use is to make a non-local exit--i.e., to escape from the current > # continuation. Such continuations are invoked only once, and for this > # reason they are sometimes called "one-shot continuations". > > O RLY? :) I removed that last sentence. By saying less it will be less possible to enter into this kind of error :) Thanks for the report, Andy BTW: You have submitted some really nice reports! If you would like to assign copyright to the FSF so that you can get patches into Guile, let me know and I can send you the docs. Cheers :) From unknown Sat Jun 21 03:27:44 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, 23 Jul 2016 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