Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-20 Thread Sturla Molden
On 20/09/15 21:48, Sturla Molden wrote: This is where a small subset of C++ would be handy. Making an uint128_t class with overloaded operators is a nobrainer. :-) Meh... The C++ version of PCG already has this. ___ NumPy-Discussion mailing list Num

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-20 Thread Sturla Molden
On 19/09/15 18:06, Robert Kern wrote: That said, we'd probably end up doing a significant amount of rewriting so that we will have a C implementation of software-uint128 arithmetic. This is where a small subset of C++ would be handy. Making an uint128_t class with overloaded operators is a no

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-19 Thread Robert Kern
On Sat, Sep 19, 2015 at 2:26 PM, Antoine Pitrou wrote: > > On Mon, 14 Sep 2015 19:02:58 +0200 > Sturla Molden wrote: > > On 14/09/15 10:34, Antoine Pitrou wrote: > > > > > If Numpy wanted to switch to a different generator, and if Numba wanted > > > to remain compatible with Numpy, one of the PCG

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-19 Thread Antoine Pitrou
On Mon, 14 Sep 2015 19:02:58 +0200 Sturla Molden wrote: > On 14/09/15 10:34, Antoine Pitrou wrote: > > > If Numpy wanted to switch to a different generator, and if Numba wanted > > to remain compatible with Numpy, one of the PCG functions would be an > > excellent choice (also for CPU performance

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-18 Thread Nathaniel Smith
On Mon, Sep 14, 2015 at 7:56 AM, Sturla Molden wrote: > On 14/09/15 10:34, Antoine Pitrou wrote: > >> Currently we don't provide those APIs on the GPU, since MT is much too >> costly there. >> >> If Numpy wanted to switch to a different generator, and if Numba wanted >> to remain compatible with N

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-18 Thread Sturla Molden
On 14/09/15 10:26, Robert Kern wrote: I want fast, multiple independent streams on my current hardware first, and PCG gives that to me. DCMT is good for that as well. It should be possible to implement a pluggable design of NumPy's mtrand. Basically call a function pointer instead of rk_doub

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-18 Thread Sturla Molden
On 14/09/15 10:34, Antoine Pitrou wrote: If Numpy wanted to switch to a different generator, and if Numba wanted to remain compatible with Numpy, one of the PCG functions would be an excellent choice (also for CPU performance, incidentally). Is Apache license ok in NumPy? (Not sure, thus aski

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-18 Thread Sturla Molden
On 14/09/15 10:34, Antoine Pitrou wrote: Currently we don't provide those APIs on the GPU, since MT is much too costly there. If Numpy wanted to switch to a different generator, and if Numba wanted to remain compatible with Numpy, one of the PCG functions would be an excellent choice (also for

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-14 Thread Antoine Pitrou
On Mon, 14 Sep 2015 09:26:58 +0100 Robert Kern wrote: > > Actually, I meant all of the crap *around* it, the platform-compatibility > testing to see if you have such a hardware instruction or not, and C++ > template shenanigans in the surrounding code. It's possible that the > complexity is only

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-14 Thread Robert Kern
[Tim, ping me if you want to get dropped from the reply chain, as we are liable to get more into numpy decision-making. I've dropped python-ideas.] On Mon, Sep 14, 2015 at 4:34 AM, Tim Peters wrote: > > [Robert Kern ] > >> ... > >> I'll also recommend the PCG paper (and algorithm) as the author's

Re: [Numpy-discussion] [Python-ideas] Should our default random number generator be secure?

2015-09-13 Thread Nathaniel Smith
[This is getting fairly off-topic for python-ideas (since AFAICT there is no particular reason right now to add a new deterministic generator to the stdlib), so CC'ing numpy-discussion and I'd suggest followups be directed to there alone.] On Thu, Sep 10, 2015 at 10:41 AM, Robert Kern wrote: > On