IRC channel logs

2025-09-14.log

back to list of logs

<ArneBab>old: that sounds very plausible, yes. And a deque could be the solution to that, because it provides amortized O(1) insert at the end. https://srfi.schemers.org/srfi-134/srfi-134.html
<ArneBab>I should really contribute my version to Guile and not just to the SRFI.
<ArneBab>old: adding SRFI 134 to Guile: https://codeberg.org/guile/guile/pulls/15 -- deques were one of the big missing pieces for me from an algorithm perspective.
<ArneBab>I wrote the implementation in the SRFI, so my copyright assignment should suffice.
<old>ArneBab: I wonder how well srfi-134 is performance wise
<old>I've made a deque for guile-parallel a while ago: https://git.sr.ht/~old/guile-parallel/tree/master/item/parallel/unsafe/deque.scm
<old>this is an implementation of deque algorithm presented in the perfbook (https://cdn.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html) from Paul McKenney
<old>it use ice-9 mutex/condition for atomicity between OS threads if you have task stealing in your scheduler
<old>might be worth it to test both implementation at some point
<ArneBab>old: that looks interesting, but doesn’t seem like it implements the full srfi-134 API
<ArneBab>but I’d also be interested in knowing how they are performance-wise.
<ArneBab>My srfi-134 implementation only uses mutation to change the front and back list references, but I did not optimize for performance.
<ArneBab>a third that may be useful to compare are the deques in pfds: https://github.com/ijp/pfds/blob/master/deques.sls
<ArneBab>old: are you planning to package guile-parallel for Guix?
<ArneBab>(to make it trivial to install)
<rlb>(I could imagine that ideally you might end up wanting two flavors, one without built-in sync, and one with it (or persistent), unless we can create a single deque that's good enough "everywhere".)
<ArneBab>On the long run yes. On the short run I firstoff want to have a deque in guile at all. There are currently too many basic datastructures we need to hand-roll or pull from elsewhere.
<rlb>Sure.
<ArneBab>It’s crazy to think that pfds had its last commit 11 years ago …
<rlb>Interesting - had no idea. (That's what I originally used for lokke's maps.)
<rlb>(Now they're wingo's.)
<old>ArneBab: no. I got close to fibers performance wise, but I see no point in continiuing developing it if fibers is meant to be merged in core guile
<old>I have not touch the project for two years I think
<ArneBab>old: I don’t know about plans with fibers. I would like to see them in core so I don’t need to install them separately, but wingo once named reason for not including them (yet?)