[Issue 16724] RandomCover.popFront is a no-op for the first call

2017-02-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724

Joseph Rushton Wakeling  changed:

   What|Removed |Added

 CC||joseph.wakel...@webdrake.ne
   ||t

--- Comment #5 from Joseph Rushton Wakeling  ---
Sorry to have missed this, but the fix is itself broken, because it strips out
the lazy `front` of `randomCover`.

First, random algorithms (like random cover) ideally need to have a truly lazy
initial `front` value, otherwise you can run into trivial errors like:

   auto arr = [1, 2, 3, 4, 5];
   auto cover = arr.randomCover;
   cover.writeln;  // three 'different' covers
   cover.writeln;  // but each of them with
   cover.writeln;  // the same first value

... so the check on already-chosen elements in `front` wasn't there by accident
(although it may have needed further work in how it was implemented).

Second, I just tried running the above right now and got a never-ending stream
of `5, 5, 5, 5, 5, ...` out of my computer before I killed it.  So I'm not sure
that this new randomCover is working right at all :-(

--


[Issue 16724] RandomCover.popFront is a no-op for the first call

2017-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724

--- Comment #4 from github-bugzi...@puremagic.com ---
Commit pushed to newCTFE at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/7c2dc1ccbadfb337325485cd045255598d536aa4
Merge pull request #4957 from RazvanN7/Issue_16724

--


[Issue 16724] RandomCover.popFront is a no-op for the first call

2017-01-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724

--- Comment #3 from github-bugzi...@puremagic.com ---
Commit pushed to stable at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/7c2dc1ccbadfb337325485cd045255598d536aa4
Merge pull request #4957 from RazvanN7/Issue_16724

--


[Issue 16724] RandomCover.popFront is a no-op for the first call

2016-12-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--


[Issue 16724] RandomCover.popFront is a no-op for the first call

2016-12-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724

--- Comment #2 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/7c2dc1ccbadfb337325485cd045255598d536aa4
Merge pull request #4957 from RazvanN7/Issue_16724

Fix Issue 16724 - RandomCover.popFront is a no-op for the first call

--


[Issue 16724] RandomCover.popFront is a no-op for the first call

2016-12-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724

RazvanN  changed:

   What|Removed |Added

   Keywords||pull
 Status|NEW |ASSIGNED
 CC||razvan.nitu1...@gmail.com
   Assignee|alexandru.razva...@gmail.co |razvan.nitu1...@gmail.com
   |m   |

--- Comment #1 from RazvanN  ---
PR here: https://github.com/dlang/phobos/pull/4957

--


[Issue 16724] RandomCover.popFront is a no-op for the first call

2016-12-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com
   Assignee|nob...@puremagic.com|alexandru.razva...@gmail.co
   ||m

--