[Python-Dev] Mersenne Twister

Tim Peters tim.one@comcast.net
Thu, 29 Aug 2002 22:43:28 -0400


[Raymond Hettinger]
> ...
> The C code I saw is covered by a BSD license -- I don't
> know if that's an issue or not.

That's fine, provided it doesn't have the dreaded "advertising clause".  I
personally don't care whether it does -- it's the FSF that has bug up their
butt about that one.  I expect we'd have to reproduce their copyright notice
in the docs somewhere; yup:

     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in
        the documentation and/or other materials provided with the
        distribution.

I think we *ought* to perform a similar courtesy for, e.g., the Tcl/Tk and
zlib components shipped with the Python Windows installer too.

> As for implementation difficulty or accuracy, the code is so short
> and clear that there isn't a savings from re-using the C code.

That isn't the point here.  If you use Nishimura and Matsumoto's code as
close to verbatim as possible, then that's the perfect answer to your
earlier point:

> On the minus side, random number generation is a much disputed
> topic, occassionly requiring full disclosure of seeds and source.

Nothing *could* be more fully disclosed than their source code:  it's
extremely well known to every worker in the field, and has gotten critical
review from the smartest eyeballs in the world.