From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id 88CA3385800A for ; Sat, 1 May 2021 16:15:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 88CA3385800A Received: by mail-pj1-x1031.google.com with SMTP id h14-20020a17090aea8eb02901553e1cc649so3369331pjz.0 for ; Sat, 01 May 2021 09:15:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jlhemWs1toQM0MDTrEFVsRnooyQdzSXdEk78fehqV0k=; b=EMmBTLLGRHCH/gRg72Qpt0MqC+m8uttMLDGxXn9zWcUp5ZjfCR3MxzDddMvuJhw4OH cJ2kjrJKmOmlBSvksgq4G/rQDB7xYfMyVcPUgiXKeY2+Jigwa29TBgfEs5uAyIpo9H+R CEX/E3066l8PKkkD2I9rjlVktahCXGIFKlS2cZf9nvJANRSZq9npatv60Xw3/MwAnlG1 ZBTM8+slbTjfpGm73LA7bSwL8f018vPNZyJhOSSmkEfeaYzAlmgOCxgemv/Zm0GDWmV9 kxmUXoRmFxq8U+FkawpYTaFtSrmTiDX6gUKBLTLztkA7nqrbT0v3koFWBBZ0f2VaSgy9 XyOA== X-Gm-Message-State: AOAM533dyN6hDcuQocUrMFbEFPSOX1TjBcf6KTcvanZok6UodvE0CU3w oSvu8bsWEQKF5jnFL95C+9tiKpwpVyge2IYWbyU= X-Google-Smtp-Source: ABdhPJzbxwaeSzRFJfKpwYKsh6Og++8yZbXT1HOpzESJzKEEAn3p0uP4/YpxNWMw12/CcwtBQYXlMmYqiHz8EEBtFN4= X-Received: by 2002:a17:90a:5a08:: with SMTP id b8mr21654770pjd.124.1619885742374; Sat, 01 May 2021 09:15:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Duncan Mak Date: Sat, 1 May 2021 12:15:06 -0400 Message-ID: Subject: Re: First-class continuations in Kawa To: Andrea Bernardini Cc: Per Bothner , kawa mailing list 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2021 16:15:47 -0000 Hello all, I thought of this work last night and was reminded that the PR is still left hanging after 3 years. I wonder if it makes any sense to try to get this merged into the master branch after all this time. There's also the ongoing work from Project Loom at the JDK level: http://cr.openjdk.java.net/~rpressler/loom/loom/sol1_part1.html and I wonder how that influences how continuations will be represented in Kawa in the future. Thoughts? Duncan. On Wed, Feb 21, 2018 at 7:37 PM Duncan Mak wrote: > Hello Per, > > https://gitlab.com/kashell/Kawa/merge_requests/22 should be ready for > review now. > > You mentioned in your first reply that we should "test, evaluate, and > benchmark it. If it's useful, it should be merged in." - do you have > any suggestions for how I should proceed to get this merged in? > > You also mentioned that there's an idea on an alternative > implementation technique based on switch statements - could we post > the notes on https://gitlab.com/kashell/Kawa/issues, and perhaps > someone else could tackle that? > > > Duncan. > > On Tue, Feb 20, 2018 at 7:21 PM, Andrea Bernardini > wrote: > > Hi All, > > Regarding delimited continuations, you can see the needed changes here > > > https://gitlab.com/andrebask/Kawa/compare/callcc...delimited-continuations > > > > Let me know if you are interested in this at all, shouldn't be > > difficult to add this once Duncan's pull request is merged in. > > > > In the same fork there's also a branch with the debugger > > implementation, however I'm not sure how useful that could be, it was > > quite experimental > > > > Thanks, > > Andrea > > > > On 20 January 2018 at 23:20, Andrea Bernardini > wrote: > >> Yep, that's it. The whole work was originally submitted as patch. > >> > >> It is also my fault If this was never merged into master. I remember > >> that I started working on a switch-based variant of my work after > >> getting some high level suggestions from Per. That turned out to be a > >> fair amount of work and I didn't have much time, so I didn't manage to > >> put together anything working. > >> > >> I also have some working code that I mentioned in my thesis but didn't > >> end up in that patch, as it wasn't well tested. This was mainly for > >> delimited continuations and for the debugger. I'll share this soon in > >> a GitLab fork so it doesn't get lost. > >> > >> Andrea > >> > >> On 20 January 2018 at 16:06, Duncan Mak wrote: > >>> Looks interesting. > >>> > >>> Is the work contained in only these two commits? > >>> > >>> > https://gitlab.com/kashell/Kawa/commit/a8e678ebf7216e9fad9238e0b1c2442ea371c63c > >>> > https://gitlab.com/kashell/Kawa/commit/f4228b57936de5a84dba0afcfac54196bec86fa4 > >>> > >>> > >>> Duncan. > >>> > >>> > >>> On Sat, Jan 20, 2018 at 1:46 AM, Per Bothner wrote: > >>>> On 01/19/2018 04:48 PM, Duncan Mak wrote: > >>>>> > >>>>> Hello, > >>>>> > >>>>> I came across Andrea Bernardini's thesis called First-Class > >>>>> Continuations on the Java Virtual Machine: An Implementation within > >>>>> the Kawa Scheme Compiler just the other day. > >>>>> > >>>>> > >>>>> > https://www.politesi.polimi.it/bitstream/10589/108685/3/2015_07_Bernardini.pdf > >>>>> > >>>>> What happened to that work, was it integrated into the mainline > release of > >>>>> Kawa? > >>>> > >>>> > >>>> Sorry, no. Andrea's work is available in the 'callcc' branch, but it > has not > >>>> been merged into master. Worse, updates to master have not been > merged > >>>> into the callcc branch. > >>>> > >>>> It would be useful to at least update the callcc branch with recent > changes, > >>>> and then test, evaluate, and benchmark it. If it is useful, it should > be > >>>> merged in. > >>>> Even if it is slow, as long as it doesn't hurt the default behavior. > It is > >>>> my fault > >>>> that hasn't been done, but there were always other things to do. > >>>> > >>>> Long time ago, I started on another implementation of continuations > based on > >>>> switch statements. (Each continuation point would be associated with > an > >>>> index, > >>>> and each function would start with a switch statement with jumps to > the > >>>> continuation points. Capturing a continuation would essentially be > saving > >>>> the > >>>> corresponding switch index.) Some of that code is still in Kawa, but > >>>> commented out. Following up on that idea might be more efficient. > Which > >>>> isn't really a good excuse for not merging in Andrea's work. > >>>> > >>>> If someone is interested in following up on this work, that would be > great. > >>>> -- > >>>> --Per Bothner > >>>> per@bothner.com http://per.bothner.com/ > >>> > >>> > >>> > >>> -- > >>> Duncan. > > > > -- > Duncan. > -- Duncan.