unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: pukkamustard <pukkamustard@posteo.net>
To: "Linus Björnstam" <linus.bjornstam@veryfast.biz>
Cc: "Thompson, David" <dthompson2@worcester.edu>,
	Jessica Tallon <tsyesika@tsyesika.se>,
	guile-devel <guile-devel@gnu.org>
Subject: Re: Functional datatypes in Guile
Date: Tue, 07 Mar 2023 15:02:35 +0000	[thread overview]
Message-ID: <864jqwmwmu.fsf@posteo.net> (raw)
In-Reply-To: <1bb3eac7-fe3c-43f7-b009-a99c7d31a89c@app.fastmail.com>


Linus Björnstam <linus.bjornstam@veryfast.biz> writes:

> On Sat, 4 Mar 2023, at 17:38, pukkamustard wrote:
>> Hi Dave,
>>
>> Makes me wonder, are Andy Wingo's fash/fector purely functional? Why do
>> they need atomic boxes? Aren't they only necessary for destructive
>> updates?
>
> This is to make sure that transient-fectors/flashes (in-place mutation
> with some copying going on to not break the other copies of the sector
> being mutated) thread safe. They should only be mutated by the current
> thread.
>
> It is a nice trade off , since you get a lot less copying if you
> mutate many values in the same leaf. This is especially good when
> building a fector meaning you can fill every tail by just using
> vector-set! without copying. Let's just say that it becomes a lot
> faster:)

Thank you for explaining. That makes a lot of sense!

-pukkamustard



  reply	other threads:[~2023-03-07 15:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 13:17 Functional datatypes in Guile Jessica Tallon
2023-02-28  7:47 ` Maxime Devos
2023-02-28  8:22 ` pukkamustard
2023-02-28 16:04   ` Thompson, David
2023-02-28 16:54     ` Philip McGrath
2023-03-04 16:38     ` pukkamustard
2023-03-05 12:58       ` Linus Björnstam
2023-03-07 15:02         ` pukkamustard [this message]
2023-06-10 16:47   ` Ludovic Courtès
2023-06-10 18:28     ` Dr. Arne Babenhauserheide
2023-06-16  5:15     ` pukkamustard
2023-06-21 21:53       ` Ludovic Courtès
2023-02-28 17:03 ` Clojure support Lassi Kortela
2023-03-04 10:28   ` Linus Björnstam
2023-03-04 11:22     ` Philip McGrath
2023-05-07 15:36       ` Linus Björnstam
2023-05-13 22:10   ` Rob Browning
2023-05-20  9:36     ` Maxime Devos
2023-05-21  2:29       ` Rob Browning

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=864jqwmwmu.fsf@posteo.net \
    --to=pukkamustard@posteo.net \
    --cc=dthompson2@worcester.edu \
    --cc=guile-devel@gnu.org \
    --cc=linus.bjornstam@veryfast.biz \
    --cc=tsyesika@tsyesika.se \
    /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).