public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Duncan Mak <duncanmak@gmail.com>
To: Andrea Bernardini <andrebask@gmail.com>
Cc: Per Bothner <per@bothner.com>, kawa mailing list <kawa@sourceware.org>
Subject: Re: First-class continuations in Kawa
Date: Sat, 1 May 2021 12:15:06 -0400	[thread overview]
Message-ID: <CABgWrqq5UcxarUNQO2Ag0_O5Y4K1C07iEx_oMQh4S5xrwNjYGA@mail.gmail.com> (raw)
In-Reply-To: <CABgWrqovJ_oLaM1Vmd505RL8q3ahKRJJx6+XTu3h8ZvMEPGcAA@mail.gmail.com>

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 <duncanmak@gmail.com> 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 <andrebask@gmail.com>
> 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 <andrebask@gmail.com>
> 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 <duncanmak@gmail.com> 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 <per@bothner.com> 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.

  reply	other threads:[~2021-05-01 16:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-20  0:49 Duncan Mak
2018-01-20  6:47 ` Per Bothner
2018-01-20 16:07   ` Duncan Mak
2018-01-20 23:20     ` Andrea Bernardini
2018-02-21  0:21       ` Andrea Bernardini
2018-02-22  0:38         ` Duncan Mak
2021-05-01 16:15           ` Duncan Mak [this message]
2021-05-01 18:45             ` Arvydas Silanskas
2021-05-01 19:06               ` Sudarshan S Chawathe
2021-05-01 20:38                 ` Per Bothner
2021-06-09  9:04                   ` Arvydas Silanskas
2021-06-09 23:27                     ` Per Bothner
2021-08-08 14:29                       ` Arvydas Silanskas
2021-08-08 15:53                         ` Andrea Bernardini
2021-08-08 23:52                         ` Per Bothner
2021-08-09 19:41                           ` Per Bothner
2022-12-07 23:42                             ` Duncan Mak
2022-12-09 10:53                               ` Arvydas Silanskas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABgWrqq5UcxarUNQO2Ag0_O5Y4K1C07iEx_oMQh4S5xrwNjYGA@mail.gmail.com \
    --to=duncanmak@gmail.com \
    --cc=andrebask@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).