From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105267 invoked by alias); 22 Feb 2018 00:38:12 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 105258 invoked by uid 89); 22 Feb 2018 00:38:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-it0-f53.google.com Received: from mail-it0-f53.google.com (HELO mail-it0-f53.google.com) (209.85.214.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Feb 2018 00:38:09 +0000 Received: by mail-it0-f53.google.com with SMTP id q4so121332itc.0 for ; Wed, 21 Feb 2018 16:38:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=epgujfkwx0EqmFk1eICvnm4bbzS6lLgov41iyvJclCo=; b=R47LuMdgtsoXV8mO38YaTP3P3aADbe9k8EixVBu51WLk3rxA4+PnXb0X8gZIYgeidA 5pw+8XAwPOCafC0kJF5AS/Y8txzwGygUjFk5B7sT6FCiBTDUagDFTn0OGMz17CABW5W2 sYl3JEgMZnS2R48RsTHnIQsp3eGa1uFA7DbwSwwLEfs2VYcA4INP0V1BCuQl4PWGJRbS 5qpK8H8r4rysXpgS8WSltvPXgY7URxnXJ9yJFV6lnBnuFH9MpQkoUKnqippM+rmz2nwo lbcLSmfBklIO3wGlGsa+zXfmkobZPWwL6T8ecMt6s2u4Ce7bA+xl06sHtj/M+szAdXTR FtGQ== X-Gm-Message-State: APf1xPBhPFNB3b16xmAT2LSMm8fjQ6c8F/p899GHmpRfo7fnoaJeFsif VXCqnnkgSPY5+6Y9afuW1mb4pP0p9umru4uPTHaVd9CR X-Google-Smtp-Source: AH8x227By+mib1bHzD78YZWMRgvh35gdtWDRLsbb3CDpPw0JNKHB83cVDUERNyqHdv3aPszKT8VilOmwQBFUJWXCPtw= X-Received: by 10.36.172.105 with SMTP id m41mr5697560iti.22.1519259887787; Wed, 21 Feb 2018 16:38:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.36.196 with HTTP; Wed, 21 Feb 2018 16:37:27 -0800 (PST) In-Reply-To: References: From: Duncan Mak Date: Thu, 22 Feb 2018 00:38:00 -0000 Message-ID: Subject: Re: First-class continuations in Kawa To: Andrea Bernardini Cc: Per Bothner , kawa mailing list Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00023.txt.bz2 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.