On 3/14/08, Waldek Hebisch wrote: > Bill Page wrote: Actually just to be clear: I only reported successfully using the modified hashcode routine that was originally posted to the list by Peter Broadbery without further explanation. Martin then presented this as the patch below.
> Martin Rubey wrote: > > Here it is: > > > > Index: src/interp/hashcode.boot > > =================================================================== > > --- src/interp/hashcode.boot (Revision 183) > > +++ src/interp/hashcode.boot (Arbeitskopie) > > @@ -55,7 +55,7 @@ > > hash := hashCombine(hashType(arg, percentHash), > hash) > > retCode := hashType(retType, percentHash) > > EQL(retCode, $VoidHash) => hash > > - hashCombine(retCode, hash) > > + hashCombine(retCode, hashCombine(32236, hash)) > > op = 'Enumeration => > > for arg in args repeat > > hash := hashCombine(hashString(STRING arg), hash) > > > > > Don't ask me what it does, however :-) > > > > What it does is clear -- this code computes a hash. However, > the real question is different. Namely, to cooperate Axiom > and Aldor need to compute this hash in the same way. Yes. On another thread Tim Daly recently wrote: > This patch, by Peter Broadbery, makes the hashcode generated > by Axiom compatible with the hashcode generated for Aldor for > Mapping types. > ... >+20080313 pab src/interp/hashcode.boot make Mapping hash correct for Aldor So perhaps Tim has some additional information about the origin of this change. > So the question is which versions of Aldor use the formula > above? Did Axiom always use wrong formula or is this a change > in Aldor? > It was a change in Aldor. The version of Aldor that is being distributed as open source by aldor.org and as the most recent binary release candidate has this change. But previous binary versions of Aldor that were publicly available did not require Peter's patch above. Since the release numbering of Aldor does not seem sufficiently consistent, I doubt that we can be much more specific than that. I hope that Peter and Tim will find enough time to add a little more to the explanation of the why and the when of this change. Regards, Bill Page. _______________________________________________ Axiom-developer mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-developer
