Re: Trouble with lockstep

2013-06-25 Thread Joseph Rushton Wakeling
On Tuesday, 25 June 2013 at 10:52:22 UTC, Andrej Mitrovic wrote: On 6/25/13, Andrej Mitrovic wrote: It's now fixed in git-head. Chances are we're not going to have another 2.063 point release (I'm only speculating) so you may have to use the latest git-head version to use lockstep. That's a

Re: Trouble with lockstep

2013-06-25 Thread Andrej Mitrovic
On 6/25/13, Andrej Mitrovic wrote: > It's a regression which I've caused. I've made a fixup pull: > > http://d.puremagic.com/issues/show_bug.cgi?id=10468 > > I'm very sorry for this mishap. It's now fixed in git-head. Chances are we're not going to have another 2.063 point release (I'm only specu

Re: Trouble with lockstep

2013-06-24 Thread Andrej Mitrovic
On 6/24/13, Ali Çehreli wrote: > Strangely, the error message points at two comment lines in my > installation of 2.063: It's a regression which I've caused. I've made a fixup pull: http://d.puremagic.com/issues/show_bug.cgi?id=10468 I'm very sorry for this mishap.

Re: Trouble with lockstep

2013-06-24 Thread Ali Çehreli
On 06/24/2013 11:01 AM, Craig Dillabaugh wrote: > So is this worthy of a bug report then? Yes, please. Ali

Re: Trouble with lockstep

2013-06-24 Thread bearophile
Craig Dillabaugh: Also note that doesn't iterate the whole ubyte range. Maybe we need another iota range for that, with a different name or with an optional template argument string like "[]" as std.random.uniform. Opinions welcome. Bye, bearophile Opps. Of course. The optional template

Re: Trouble with lockstep

2013-06-24 Thread Craig Dillabaugh
On Monday, 24 June 2013 at 16:03:17 UTC, Ali Çehreli wrote: On 06/24/2013 07:05 AM, Craig Dillabaugh wrote: > The following is a minimal example: Further reduced: import std.range; void main() { lockstep(iota(0, 10), [ 1 ]); } Strangely, the error message points at two comment lines in m

Re: Trouble with lockstep

2013-06-24 Thread Ali Çehreli
On 06/24/2013 07:05 AM, Craig Dillabaugh wrote: > The following is a minimal example: Further reduced: import std.range; void main() { lockstep(iota(0, 10), [ 1 ]); } Strangely, the error message points at two comment lines in my installation of 2.063: /usr/include/dmd/phobos/std/range

Re: Trouble with lockstep

2013-06-24 Thread Craig Dillabaugh
On Monday, 24 June 2013 at 15:29:21 UTC, Joseph Rushton Wakeling wrote: On 06/24/2013 03:05 PM, Craig Dillabaugh wrote: I get the following error messages which I cannot decipher. Oddly enough, I'm also getting lockstep-related error messages at compile-time: /opt/gdc/include/d/4.8.1/std/ra

Re: Trouble with lockstep

2013-06-24 Thread Joseph Rushton Wakeling
On 06/24/2013 03:05 PM, Craig Dillabaugh wrote: > I get the following error messages which I cannot decipher. Oddly enough, I'm also getting lockstep-related error messages at compile-time: /opt/gdc/include/d/4.8.1/std/range.d:4716: Error: delegate dg (ref double, ref ulong) is not callable using

Re: Trouble with lockstep

2013-06-24 Thread Craig Dillabaugh
On Monday, 24 June 2013 at 15:15:46 UTC, bearophile wrote: Craig Dillabaugh: clip Most range/algorithm functions unfortunately don't accept a fixes size array. So you have to slice it: void main() { import std.stdio, std.range; ubyte[] data = [17, 32, 32, 32, 38, 39, 39, 47,

Re: Trouble with lockstep

2013-06-24 Thread bearophile
Craig Dillabaugh: I now get the error (which seems to be the same problem I had before - see the last error): ... /usr/include/dmd/phobos/std/range.d(4451): Error: template std.range.zip cannot deduce template function from argument types !()(Result, uint[256LU]) Most range/algorithm functio

Re: Trouble with lockstep

2013-06-24 Thread Craig Dillabaugh
On Monday, 24 June 2013 at 14:56:41 UTC, bearophile wrote: David: Something seems to be wrong with opApply of lockstep. Or maybe I miss something obvious... I have suggested to remove lockstep from Phobos: http://d.puremagic.com/issues/show_bug.cgi?id=8155 Why don't you try to use std.range.

Re: Trouble with lockstep

2013-06-24 Thread bearophile
David: Something seems to be wrong with opApply of lockstep. Or maybe I miss something obvious... I have suggested to remove lockstep from Phobos: http://d.puremagic.com/issues/show_bug.cgi?id=8155 Why don't you try to use std.range.zip? Bye, bearophile

Re: Trouble with lockstep

2013-06-24 Thread Craig Dillabaugh
On Monday, 24 June 2013 at 14:33:48 UTC, bearophile wrote: Craig Dillabaugh: foreach( idx, count; lockstep( iota!ubyte(ubyte.min, ubyte.max), bins ) ) Also note that doesn't iterate the whole ubyte range. Maybe we need another iota range for that, with a different name or with an optional

Re: Trouble with lockstep

2013-06-24 Thread bearophile
Craig Dillabaugh: foreach( idx, count; lockstep( iota!ubyte(ubyte.min, ubyte.max), bins ) ) Also note that doesn't iterate the whole ubyte range. Maybe we need another iota range for that, with a different name or with an optional template argument string like "[]" as std.random.uniform.

Re: Trouble with lockstep

2013-06-24 Thread Craig Dillabaugh
On Monday, 24 June 2013 at 14:15:55 UTC, Joseph Rushton Wakeling wrote: On 06/24/2013 03:05 PM, Craig Dillabaugh wrote: Can anyone identify what I am doing wrong. Also I am curious to know why std.range includes both Lockstep and lockstep - they seem like the same thing. lockstep is a helper

Re: Trouble with lockstep

2013-06-24 Thread David
lockstep(iota!ubyte(ubyte.min, ubyte.max), bins[]) Works, but this leaves you with other errors, I couldn't find a solution for. Something seems to be wrong with opApply of lockstep. Or maybe I miss something obvious...

Re: Trouble with lockstep

2013-06-24 Thread Joseph Rushton Wakeling
On 06/24/2013 03:05 PM, Craig Dillabaugh wrote: > Can anyone identify what I am doing wrong. Also I am curious to > know why std.range includes both Lockstep and lockstep - they > seem like the same thing. lockstep is a helper function that returns an instance of Lockstep. The reason is that if