GithubHelp home page GithubHelp logo

murmur-hash's Introduction

murmur-hash

New maintainer needed. Let me know if you're interested.

A simple, Haskell-only implementation of MurmurHash2.

Two variants are provided: 32 bit and 64 bits. We do not simply use the machine word size since the bit width of the hash determines the collision probability which should stay under user control.

Example Usage

Generating hashes:

$ import Data.Digest.Murmur32
$ hash32 "foo"             ==> Hash32 0xd2d0a99a
$ hash32 "foa"             ==> Hash32 0x7d544e71
$ hash32WithSeed 42 "foo"  ==> Hash32 0x7a69563b

Custom instances:

data Foo a = Foo a | Bar String

instance Hashable32 a => Hashable32 (Foo a) where
  hash32Add (Bar s) = hash32AddInt 1 `combine` hash32Add s
  hash32Add (Foo a) = hash32AddInt 2 `combine` hash32Add a

murmur-hash's People

Contributors

andreasabel avatar hvr avatar hvriedel avatar nominolo avatar pacak avatar tibbe avatar warrenharris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

murmur-hash's Issues

Consider using hashabler to support hashing arbitrary types?

Would you be interested in merging changes that permitted hashing of arbitrary Hashable types from my hashabler package? The resulting hash functions would look more or less the same. This would allow hashing of many more instances, and take care of cross-platform consistency for you, etc.

I'm not sure when I'd be able to get to this, but I wanted to float the idea first. Let me know if you're interested and would like more details about what that might look like.

Doesn't build with ghc-7.2.1-rc1

Yet again base >= 3.0 && < 4.4 is too restrictive for GHC 7.2.x (see also issue #1, when this happened for GHC 7.0.x)

Please relax the constraint, thanks!

Missing support for GHC 8.0.1

Using GHC 8.0.1-rc4, I needed the allow-newer=baseoption for installing murmur-hash 0.1.0.8.

Could you relax the upper bound version for base and release on Hackage a new version, please.

murmur-hash doesn't build on ghc 7

Hi,

The base dependency in murmur-hash.cabal is too restrictive, and murmur-hash doesn't build on GHC 7. Could you please fix this? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.