fwd: [William D Clinger] patch file for SRFI 69 reference implementation Panu Kalliokoski 22 May 2006 06:54 UTC
Here is more correspondence about the issues I mentioned. Comments appreciated. ----- Forwarded message from Panu Kalliokoski <email@example.com> ----- On Wed, Apr 12, 2006 at 07:31:43PM +0200, Michael Sperber wrote: > ; Noted by William D Clinger, 4 March 2006: > ; The hash procedure returns an inexact number when asked to > ; hash an inexact number or a structure containing inexact > ; numbers. > ; The hash-by-identity procedure hashes on the values currently > ; stored within a mutable object. > ; The hash-by-identity procedure does not terminate on circular > ; structures. On Wed, May 10, 2006 at 12:25:46PM -0400, David Van Horn wrote: > > Well, understandably Will took the path easiest for him. But his > > point stands, namely that the current reference implementation isn't > > correct. Any path that leads to a correct one is acceptable by me. > > How you do it (and if you do it) is entirely up to you. > Agreed. However at the very least, the issues Clinger identified should > be mentioned on the SRFI discussion list regardless of whether the > reference implementation will be fixed or not. If the reference > implementation will not be fixed, or will not be fixed immediately, I'd Point #1 can be fixed relatively easily, although it can be questioned whether inexact numbers should be hashed at all (do they even guarantee that the inexact result of an arithmetic calculation remain the same upon multiple instances of that calculation?) Points #2 and #3 would need both changes in the SRFI (to actually require those properties) as well as an Scheme implementation specific implementation to be able to comply with other restrictions in the SRFI. I would have liked to receive comments of them, but only got one reply to the question I posted on the discussion list. Another problem is that for some Scheme implementations it might _really_ be problematic to implement hash-by-identity if it was required to remain constant over time and change. > like to see the alternative implementation posted to the discussion list > (after Clinger's approval of course). Of course, that's okay with me. And then I could also comment on it, so that it ends in the archive, that it's not really conformant to the SRFI (because it does not give an appropriate hashing function for most kinds of data structures). ----- End forwarded message ----- ----- Forwarded message from Panu Kalliokoski <firstname.lastname@example.org> ----- On Thu, May 18, 2006 at 04:44:36PM -0400, David Van Horn wrote: > > True. I only mentioned point #2 yet, as it seemed most problematic to > > me; however, it did not end in the archive AFAICT, is the archive > > somehow closed after finalisation? > It shouldn't be, but I forgot a step during finalization that makes it > accessible. It's accessible now. Sorry about that. Okay. Anyway, the situation remains thus: the inexactness problem is repairable (although its usefulness is questionable) and I can do so when I find the time. For the other points, the spec and impl seem to conform to each other; however, whether (and how) both should be changed is open to discussion; changing only the implementation is not an option, because it makes that impl nonconformant with the spec. ----- End forwarded message ----- The solution I would really like to see is that we could add guarantees of change consistency and termination for hash-by-identity and provide a reference implementation for at least some Scheme implementation (because I can't think of a way to implement it portably while conforming to other requirements in the SRFI). Panu -- personal contact: email@example.com, +35841 5323835 technical contact: firstname.lastname@example.org, http://www.iki.fi/atehwa/ PGP fingerprint: 0EA5 9D33 6590 FFD4 921C 5A5F BE85 08F1 3169 70EC Please consider membership of http://www.hospitalityclub.org/!