[Issue 5249] Strongly pure random generator

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Oct 14 08:18:03 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=5249

Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |bootcamp

--- Comment #6 from Andrei Alexandrescu <andrei at erdani.com> ---
This would work with the smaller rngs but not very well with the Mersenne
twister which has iirc 4KB of state.

We should be able to allow this to work for the appopriate rngs:

auto identity(Rng)(Rng r) pure { r.popFront; return r; }

Then threading generators about is trivial. I'll bootcamp this.

--


More information about the Digitalmars-d-bugs mailing list