Before more people make fun of me, I meant a cryptographic hash function!


On Mon, Apr 7, 2014 at 4:32 PM, Johan Tibell <johan.tibell@gmail.com> wrote:
On Mon, Apr 7, 2014 at 4:18 PM, Nick Smallbone <nicsma@chalmers.se> wrote:
On Monday 07 April, 2014 at 02:53 pm, Johan Tibell wrote:
> > > Is StdGen so badly broken that it can't be fixed in a future version?
> >
> > The implementation of split is pretty broken. I suppose most people
> > don't need split but, unfortunately, QuickCheck uses it heavily (the
> > bind of the Gen monad splits the seed). I don't think anyone knows how
> > to fix it, since there's no obvious reason why the current split should
> > work at all!
> >
>
> Basic question: is the type of split wrong or just the implementation?

Just the implementation. However, another question (which I don't know
the answer to) is whether the type of StdGen allows for a proper
implementation of split.

It would be nice if we could just fix StdGen and thus not require a whole new library. Will fixing StdGen make it even slower than it is today?

I believe the new generator used in QC uses some cartographic hash function. I wonder if SipHash has been considered, as it's both fast and has good randomness properties (but perhaps not for splitting).