[Issue 5441] std.random.rndGen always returns Random.
https://issues.dlang.org/show_bug.cgi?id=5441 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED CC||razvan.nitu1...@gmail.com Resolution|--- |INVALID --
[Issue 5441] std.random.rndGen always returns Random.
https://issues.dlang.org/show_bug.cgi?id=5441 Andrei Alexandrescu changed: What|Removed |Added Version|unspecified |D2 --
[Issue 5441] std.random.rndGen always returns Random.
http://d.puremagic.com/issues/show_bug.cgi?id=5441 Joseph Rushton Wakeling changed: What|Removed |Added CC||joseph.wakel...@webdrake.ne ||t --- Comment #3 from Joseph Rushton Wakeling 2013-05-03 07:38:00 PDT --- rndGen _should_ always return Random, because rndGen is intended to provide a thread-safe instance of the default RNG type (which _is_ Random). The problems identified here aren't with rndGen but with code that does not take into account RNG instances other than rndGen. So, I suggest this bug be marked as invalid. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5441] std.random.rndGen always returns Random.
http://d.puremagic.com/issues/show_bug.cgi?id=5441 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #2 from bearophile_h...@eml.cc 2012-04-08 16:43:35 PDT --- See also Issue 4851 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5441] std.random.rndGen always returns Random.
http://d.puremagic.com/issues/show_bug.cgi?id=5441 Stewart Gordon changed: What|Removed |Added CC||s...@iname.com --- Comment #1 from Stewart Gordon 2012-04-08 15:33:08 PDT --- (In reply to comment #0) > Created an attachment (id=867) [details] > Patch for this suggestion > > rndGen always returns Random(usually MT) object. This is often useful, but > randomShuffle cant't take other random generators. It can, as of DMD 2.058 at least. Its signature is void randomShuffle(Range, RandomGen = Random)(Range r, ref RandomGen gen = rndGen) The two parameters are the range to shuffle and the RNG to use to perform the shuffle. > I think following signature is better. > > ref RandomGen rndGen(RandomGen = Random)() What, exactly, would your rndGen function _do_ to the RandomGen object you pass into it??? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---