data.finger-tree

Update data.finger-tree to use new hash functions in Clojure 1.6

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Enhance the implementations of at least double-list, counted-double-list, counted-sorted-set, and counted-sorted-set-by to use the new Clojure 1.6 hash function for collections.

  1. dfinger-2-v1.diff
    15/Feb/14 4:17 PM
    6 kB
    Andy Fingerhut
  2. dfinger-2-v2.diff
    16/Feb/14 11:16 AM
    6 kB
    Andy Fingerhut
  3. dfinger-2-v3.diff
    17/Feb/14 10:34 AM
    7 kB
    Andy Fingerhut

Activity

Hide
Andy Fingerhut added a comment -

Patch dfinger-2-v1.diff updates at least the implementations of the 4 data structures mentioned in the description to use the new hash functions with Clojure 1.6. It has been tested to work with Clojure 1.4.0 and 1.5.1. It will not compile with Clojure 1.3.0 or older because of the addition of the IHashEq interface, which seems to have been added in 1.4.0.

Also has a fix for a bug with CountedSortedSet's implementation of iterable, discovered during testing. The patch adds some basic tests for equivalence and hash equivalence for empty collections and 1 small collection.

Show
Andy Fingerhut added a comment - Patch dfinger-2-v1.diff updates at least the implementations of the 4 data structures mentioned in the description to use the new hash functions with Clojure 1.6. It has been tested to work with Clojure 1.4.0 and 1.5.1. It will not compile with Clojure 1.3.0 or older because of the addition of the IHashEq interface, which seems to have been added in 1.4.0. Also has a fix for a bug with CountedSortedSet's implementation of iterable, discovered during testing. The patch adds some basic tests for equivalence and hash equivalence for empty collections and 1 small collection.
Hide
Chouser added a comment -

Andy, you're amazing! Thanks for doing all this.

I've got a few tweaks I would make:

  • pull the compile-if usages into a single fn that all the hasheq methods could call
  • do the iterator fixes in a separate commit
  • bump the version number and cut a release

I'd be happy to do any or all of that, or you could push the changes yourself if you'd rather. Your call.

Show
Chouser added a comment - Andy, you're amazing! Thanks for doing all this. I've got a few tweaks I would make:
  • pull the compile-if usages into a single fn that all the hasheq methods could call
  • do the iterator fixes in a separate commit
  • bump the version number and cut a release
I'd be happy to do any or all of that, or you could push the changes yourself if you'd rather. Your call.
Hide
Andy Fingerhut added a comment -

Patch dfinger-2-v2.diff separates the iterable fix into a separate commit, and puts the uses of compile-if into their own functions.

I haven't cut a release of any Clojure contrib project before, and do not know the steps.

Show
Andy Fingerhut added a comment - Patch dfinger-2-v2.diff separates the iterable fix into a separate commit, and puts the uses of compile-if into their own functions. I haven't cut a release of any Clojure contrib project before, and do not know the steps.
Hide
Andy Fingerhut added a comment -

Patch dfinger-2-v3.diff is identical to dfinger-2-v2.diff, except it corrects a problem where it was not correctly maintaining the hash value for Clojure 1.5.1 and earlier. The updated tests help to catch that.

Show
Andy Fingerhut added a comment - Patch dfinger-2-v3.diff is identical to dfinger-2-v2.diff, except it corrects a problem where it was not correctly maintaining the hash value for Clojure 1.5.1 and earlier. The updated tests help to catch that.
Hide
Chouser added a comment -

Excellent work, Andy, thanks again. I'm cutting a release now. If that goes well, your patches will be included in the 0.0.2 release.

Show
Chouser added a comment - Excellent work, Andy, thanks again. I'm cutting a release now. If that goes well, your patches will be included in the 0.0.2 release.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: