Re: Hashing a procedure object reliably

2025-04-11 Thread Vivien Kraus
Hello, Le vendredi 11 avril 2025 à 09:49 -0400, Olivier Dion a écrit : > But some fields seems to > not be taken into account and you will end up with fetching > substitute > in the store.  I want to avoid this element of surprise in my case. >From what I understand, here (problem A), you want to

Re: Hashing a procedure object reliably

2025-04-11 Thread Zelphir Kaltstahl
On 11.04.25 21:49, Olivier Dion wrote: Hi Guile users! I have a hashing procedure that can hash many things like so: (define (hash value) (cond ((pair? value) (let loop ((elements value) (acc (srfi:hash '())) (k 1)) (if (null? el

Hashing a procedure object reliably

2025-04-11 Thread Olivier Dion
Hi Guile users! I have a hashing procedure that can hash many things like so: (define (hash value) (cond ((pair? value) (let loop ((elements value) (acc (srfi:hash '())) (k 1)) (if (null? elements) acc (loop (cdr e

Re: Hashing a procedure object reliably

2025-04-11 Thread Olivier Dion
On Fri, 11 Apr 2025, Vivien Kraus wrote: > Hello, > > Le vendredi 11 avril 2025 à 09:49 -0400, Olivier Dion a écrit : >> But some fields seems to >> not be taken into account and you will end up with fetching >> substitute >> in the store.  I want to avoid this element of surprise in my case. Sid

First example of g-golf (hello world) not working

2025-04-11 Thread Zelphir Kaltstahl
Hello Guile Users! Yesterday I decided to give g-golf a try. Unfortunately I did not get very far at all. I tried running the hello world example, and it already crashed: main.scm Copyright (C) 2022 - 2023 Free Software Foundation, Inc. This file is part of GNU G-G

Re: Hashing a procedure object reliably

2025-04-11 Thread Thompson, David
Hi Olivier, On Fri, Apr 11, 2025 at 9:50 AM Olivier Dion wrote: > > Like mentioned in the comment (look for the `(procedure? value)' > clause), this does _not_ yield the same hash for a procedure if the > module where this procedure came from is compiled. And it's not > possible to pass the proc

Re: Hashing a procedure object reliably

2025-04-11 Thread tomas
On Fri, Apr 11, 2025 at 11:34:37AM -0400, Olivier Dion wrote: [...] > I think the definition of equivalent here is that the pure behavior of > the procedures are the same. Say we're hashing `(lambda (x y) (+ x y))' > and `(lambda (u v) (+ u v))'. These procedures does not have equivalent > sour

Re: First example of g-golf (hello world) not working

2025-04-11 Thread David Pirotte
Hello Zelphir, > Yesterday I decided to give g-golf a try. Unfortunately I did not get > very far at all. I tried running the hello world example, and it > already crashed: You can't run the upstream version of the g-golf distributed examples in guix, due to a known problem (in guix, this has not