Re: [PATCH] Add atomic-box-update! function to (ice-9 atomic)

2023-06-21 Thread Jean Abou Samra
Le lundi 19 juin 2023 à 16:20 +0400, Andrew Tropin a écrit : > +  (if (eq? old-value (atomic-box-compare-and-swap! box old-value > new-value)) Are you sure eq? is a good idea here? (eq? 5 5) is unspecified, for example. Perhaps eqv? would be more appropriate. signature.asc Description: Th

Re: [PATCH] Add atomic-box-update! function to (ice-9 atomic)

2023-06-21 Thread Jean Abou Samra
Le mercredi 21 juin 2023 à 11:06 +0200, Jean Abou Samra a écrit : > Le lundi 19 juin 2023 à 16:20 +0400, Andrew Tropin a écrit : > > +  (if (eq? old-value (atomic-box-compare-and-swap! box old-value > > new-value)) > > > Are you sure eq? is a good idea here? (eq? 5 5) is unspecified, for exa

Re: [PATCH] Add atomic-box-update! function to (ice-9 atomic)

2023-06-21 Thread Andrew Tropin
On 2023-06-21 11:06, Jean Abou Samra wrote: > Le mercredi 21 juin 2023 à 11:06 +0200, Jean Abou Samra a écrit : >> Le lundi 19 juin 2023 à 16:20 +0400, Andrew Tropin a écrit : >> > +  (if (eq? old-value (atomic-box-compare-and-swap! box old-value >> > new-value)) >> >> >> Are you sure eq? i

Re: [PATCH] Add atomic-box-update! function to (ice-9 atomic)

2023-06-21 Thread Jean Abou Samra
> Le 21 juin 2023 à 18:46, Andrew Tropin a écrit : > > Make sense, but it's hard for me to say something valuable on this > topic. Usually, I don't use eq? and don't have enough knowledge of its > internals. *Currently*, it just checks whether the two C-level SCM values are the same bitwis

Re: Functional datatypes in Guile

2023-06-21 Thread Ludovic Courtès
Hello! pukkamustard skribis: > I'm all for including SRFI-146 in Guile proper! > > If nobody else is up for it, I'll try and prepare some patches. Yay, awesome! Please make sure to add a section to the manual, tests, and then see

Re: [PATCH] Add atomic-box-update! function to (ice-9 atomic)

2023-06-21 Thread Andrew Tropin
On 2023-06-21 18:54, Jean Abou Samra wrote: >> Le 21 juin 2023 à 18:46, Andrew Tropin a écrit : >> >> Make sense, but it's hard for me to say something valuable on this >> topic. Usually, I don't use eq? and don't have enough knowledge of its >> internals. > > > *Currently*, it just checks whet

Re: [PATCH] Add atomic-box-update! function to (ice-9 atomic)

2023-06-21 Thread Philip McGrath
On Wed, Jun 21, 2023, at 11:59 PM, Andrew Tropin wrote: > On 2023-06-21 18:54, Jean Abou Samra wrote: > >>> Le 21 juin 2023 à 18:46, Andrew Tropin a écrit : >>> >>> Make sense, but it's hard for me to say something valuable on this >>> topic. Usually, I don't use eq? and don't have enough knowle