[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Make CHICKEN build process deterministic
From: |
Kooda |
Subject: |
Re: [Chicken-hackers] [PATCH] Make CHICKEN build process deterministic |
Date: |
Mon, 06 Jun 2016 22:48:16 +0200 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
On Mon, 06 Jun 2016 16:36:18 +0200,
address@hidden wrote:
> Ok, but integrating this into the core could be done in a simpler way,
> if I understand correctly, by simple changing the way symbol hashing
> operates?
That’s not the only problem here. Any call to (random) in the compiler
might cause non-determinism in the output, as well as calls to
(current-seconds) for example.
If the method used in this patch not suitable, I’ll happily do it some
other way.
My first approach was to remove calls to (random) and
(current-seconds) and use (gensym) or something similar instead,
depending on the case. But I thought that maybe these (random) calls
were there for a good reason so I didn’t want to change the behaviour
of the code too much.
I also tried changing how symbol hashing operates, as you suggest, but
I suppose the random seed of the hash table is there as a security
measure, we have to keep it, it’s just not that useful in the compiler
itself.