From: Christine Lemmer-Webber <cwebber@dustycloud.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: Andy Wingo <wingo@pobox.com>, guile-devel@gnu.org
Subject: Re: Ephemerons, self-referentality in weak hashtables
Date: Wed, 08 Sep 2021 16:50:56 -0400 [thread overview]
Message-ID: <877dfqaj0k.fsf@dustycloud.org> (raw)
In-Reply-To: <dc6e1aa2f689839ffe472847d9aa8d6beedd2f93.camel@telenet.be>
Maxime Devos <maximedevos@telenet.be> writes:
> [[PGP Signed Part:Undecided]]
> Christine Lemmer-Webber schreef op wo 08-09-2021 om 12:18 [-0400]:
>> Maxime Devos <maximedevos@telenet.be> writes:
>>
>> > [[PGP Signed Part:Undecided]]
>> > Maxime Devos schreef op zo 20-06-2021 om 17:01 [+0200]:
>> > > Christopher Lemmer Webber schreef op di 18-05-2021 om 11:46 [-0400]:
>> > > > Hello,
>> > > >
>> > > > I'm finally taking some time to port Goblins to Guile, in-between other
>> > > > tasks anyway. In Goblins there is a weak hashtable that maps current
>> > > > actor references to their current behavior. I found that for
>> > > > self-referential actors, I needed ephemerons for GC stuff to work right.
>> > >
>> > > [bla bla on how this could be implemented in Guile]
>> >
>> > This doesn't work because there is nothing preventing the
>> > 'value' from being freed. Trying to fix that now, using
>> > the example implementation of "weak maps" in libgc.
>> >
>> > Greetings,
>> > Maxime.
>>
>> I fell off the radar on replying to this, but did path turn out to work?
>
> The example implementation was a bit complicated and not well-documented.
> The ‘disclaimer’ support is disabled by default, a configuration flag
> needs to be set while compiling libgc to use disclaimers. Guix (the distro I
> use) doesn't set it. I needed to be careful in libguile/weak-table.c to not
> protect too much (otherwise it wouldn't be an ephemeral weak hash table) or
> too little (otherwise ‘freed’ objects would be re-used).
>
> I think it can be made to work, but I didn't succeed, and moved on to other
> things. If someone would like to implement this, I would recommend starting
> with something like ‘ephemeral pairs’ before moving to ephemeral hash tables.
>
> Greetings,
> Maxime.
Okay... thank you for the work you put into it! :)
prev parent reply other threads:[~2021-09-08 20:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 10:10 Mark procedures Andy Wingo
2015-11-04 12:01 ` Stefan Israelsson Tampe
2015-11-04 17:01 ` Mark procedures, LilyPond, and backward compatibility Mark H Weaver
2015-11-05 10:16 ` Foreign object API Ludovic Courtès
2016-02-01 22:50 ` Foreign objects removed from ‘stable-2.0’ Ludovic Courtès
2015-11-05 14:46 ` Mark procedures, LilyPond, and backward compatibility Andy Wingo
2015-11-05 10:29 ` Mark procedures Ludovic Courtès
2015-11-05 13:11 ` Andy Wingo
2015-11-05 14:17 ` Ludovic Courtès
2015-11-06 12:32 ` Mark procedures and LilyPond Mark H Weaver
2015-11-06 13:50 ` Ludovic Courtès
2015-11-06 15:05 ` Stefan Monnier
2016-01-24 8:58 ` Hans Åberg
2016-06-20 10:34 ` Mark procedures Andy Wingo
2016-06-20 12:15 ` Ludovic Courtès
2021-05-18 15:46 ` Ephemerons, self-referentality in weak hashtables Christopher Lemmer Webber
2021-06-20 15:01 ` Maxime Devos
2021-06-21 17:15 ` Maxime Devos
2021-09-08 16:18 ` Christine Lemmer-Webber
2021-09-08 20:11 ` Maxime Devos
2021-09-08 20:50 ` Christine Lemmer-Webber [this message]
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dfqaj0k.fsf@dustycloud.org \
--to=cwebber@dustycloud.org \
--cc=guile-devel@gnu.org \
--cc=maximedevos@telenet.be \
--cc=wingo@pobox.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).