On Monday, 12 September 2022 at 09:15:34 UTC, Ali Çehreli wrote:
>I am happy to publish on code.dlang.org for the first time:
https://code.dlang.org/packages/alid
Thanks to everyone who made registering a dub package so easy! :)
Hoş geldin AliD :)
Thank you very much for bringing these codes over a thousand lines to the D World. I was looking forward to trying it right away, and when I tried it with the classic iota() and its sister inclusiveRange(), I found that it didn't get along well with cycle().
For example:
immutable size_t pageSize = 4096;
void main()
{
"D Compiler v".writeln(__VERSION__*.001); // D Compiler v2.087
{
auto r = iota(3).cached(0);/*
auto r = iota(3);//*/
r.cycle.take(30).writeln;
}
{
auto r = inclusiveRange(3).cached(0);/*
auto r = inclusiveRange(3);//*/
r.cycle.take(30).writeln;
}
}/* Prints:
/usr/src/dmd/linux/bin64/../../src/phobos/std/range/package.d(3928): Error: mutable method `source.CachedRange!(ElementCache!(Result)).CachedRange.front` is not callable using a `const` object
/usr/src/dmd/linux/bin64/../../src/phobos/std/range/package.d(3928): Consider adding `const` or `inout` to source.CachedRange!(ElementCache!(Result)).CachedRange.front
/usr/src/dmd/linux/bin64/../../src/phobos/std/range/package.d(4060): Error: template instance `std.range.Cycle!(RefCounted!(CachedRange!(ElementCache!(Result)), cast(RefCountedAutoInitialize)0))` error instantiating
instantiated from here: `cycle!(RefCounted!(CachedRange!(ElementCache!(Result)), cast(RefCountedAutoInitialize)0))`
*/
Is it the same with the new D versions?
SDB@79