From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 2885B383D8EE for ; Fri, 9 Dec 2022 10:53:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2885B383D8EE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x436.google.com with SMTP id g1so3421103pfk.2 for ; Fri, 09 Dec 2022 02:53:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7DY0eoTnbP4Tlnp004HDEdnutHH6I5iLGRjzJKUhnqg=; b=QnIQyMrRT7JI9DB9X5RC5JtPTbhBLTGRPFuxDEd9nHouf6be/UePpT9fN+rkVoV+Fi Lc6+XUVlpy3LYkt9mswe9Bu5zxb1sYHfrcUzD5WK5NlXWBFETxcPX8BiW2aWPT1ZNXS4 aaizZX1g7toRloktFpS8ieY+5sVVR8wbGMUJZq+Gg3oJLpilRMNv/q52idn+Wc6WbsTR 8Xr24FjrBLIjykbZmGi8sYW4zEwqg1LAJSEvYcBQBVN41A5IvRdkrBat8q9sX1DA425U qN9RP00+MwNpRTAMCNqW06tLX8uVjk6ntWKi6ViHMs6xeg9AYprtoCaXgA5IqxoBGPyj 0tkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7DY0eoTnbP4Tlnp004HDEdnutHH6I5iLGRjzJKUhnqg=; b=uTev45ldvHeNVIgqH7MdmCV2WdsxDOcqcMhtWKCHjezCUNbDcu/HHy75ZpAFeRo6fw 1bfFUTBOZa98VUvGWASbexhR4v3UQUmzUesspPpWx8lt9lktZ/DeazYAtt3flyuYK7cr 4qNB+tm60BIylfpdDYXpk9ahZs0xc6HpEgCV4gJppA9mCB8nLJwHvqoDs39JNE7CTvAm O4Vf7UkrDAvbZKrG/QUGx287zKYAR9mXquxAXYvlKZQrfJmO4lDBoAj3R486i+VT8Bsn 6Kfyl1UQBvB1+4YE93dI5Dr0yopCfFx5PiqxIiSv3b51cAdn7S3s0gv0rfsb2lzh0V+H rMcA== X-Gm-Message-State: ANoB5pnLNTgJIWQnI5fIsXaYhY3bdXZORgR1/1XYd3GszsUIaLwVSPdo WWVSxkXSI2vTpaJtg5TJHfk3KrXMRg+G2+zKn3aMk87g X-Google-Smtp-Source: AA0mqf670vpxD96DSlhUF839LqN8wfsbm+egYNn7rVR1G3WwWxjPyqRbLVaoaMcalkM6/4j7JF1utcLDM5tsCPsmm80= X-Received: by 2002:a62:3084:0:b0:56d:dd2a:c494 with SMTP id w126-20020a623084000000b0056ddd2ac494mr77762369pfw.76.1670583232011; Fri, 09 Dec 2022 02:53:52 -0800 (PST) MIME-Version: 1.0 References: <23585.1619896007@localhost> <11feb74b-49fa-3fbd-213d-7d939dccfb1a@bothner.com> <666b9a7d-156b-0ee7-e1a1-9409cf0d376f@bothner.com> <45e812cb-0060-5905-8c2f-c2567d53a5b0@bothner.com> In-Reply-To: From: Arvydas Silanskas Date: Fri, 9 Dec 2022 12:53:40 +0200 Message-ID: Subject: Re: First-class continuations in Kawa To: Duncan Mak Cc: Per Bothner , kawa@sourceware.org Content-Type: multipart/alternative; boundary="0000000000001cb95905ef62f873" X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000001cb95905ef62f873 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Continuations are indeed interesting, but hard to implement unfortunately. As a recap of my merging attempts; base call/cc worked, but I got stuck at figuring how to get dynamic-wind and other extent-aware features working, and unfortunately had to stash it 2022-12-08, kt, 01:43 Duncan Mak via Kawa ra=C5=A1=C4= =97: > There's a new SRFI effort on refining the continuation API: > > SRFI 226: Control Features (schemers.org) > > > It'd be interesting to look into implementing this SRFI for Kawa Scheme. > > On Mon, Aug 9, 2021 at 3:42 PM Per Bothner wrote: > > > A suggestion: Polish and check in the code in the calcc branch. > > Then change the interface so it is compatible that the tail-call API. > > Specifically change the generated "fragments" so each looks like: > > > > static Object stubNN(Procedure proc, CallContext ctx) throws > Throwable) > > { ... } > > > > and call each fragment using MethodHandle#invokeExact. > > > > Of course this is not trivial: The person(s) doing this have to > understand > > not just logic of callcc changes but also how applyToConsumerMethod and > > CallContext etc work, before they can synthesize them. > > -- > > --Per Bothner > > per@bothner.com http://per.bothner.com/ > > > > > -- > Duncan. > --0000000000001cb95905ef62f873--