www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5035] New: Schrödinger's Stride

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5035

           Summary: Schrödinger's Stride
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: tomeksowi gmail.com


--- Comment #0 from Tomasz Sowiński <tomeksowi gmail.com> 2010-10-10 14:27:23
PDT ---
Currently the contents of Stride depend on from which end we look at it:

auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns
auto col = stride(m, 4);
assert(equal(col, [1, 1, 1]));
assert(equal(retro(col), [4, 4, 4]));

the quantum behavior is to be fixed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 10 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5035



--- Comment #1 from Tomasz Sowiński <tomeksowi gmail.com> 2010-10-10 15:04:46
PDT ---
Please also see to that this passes:

auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns
auto col = stride(m[1..$], 4);
assert(equal(col, [2, 2, 2]));
assert(equal(retro(col), [2, 2, 2]));  // now explodes

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 10 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5035


David Simcha <dsimcha yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dsimcha yahoo.com
         Resolution|                            |FIXED


--- Comment #2 from David Simcha <dsimcha yahoo.com> 2010-10-12 17:18:25 PDT ---
http://dsource.org/projects/phobos/changeset/2098

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 12 2010