On Friday, 1 September 2017 at 00:09:16 UTC, H. S. Teoh wrote:
Consider the case where .front returns a subrange. As you
state above, copying this subrange does not have defined
behaviour. One reason is the difference in semantics between
reference types and value types: the assignment
Let me clarify, what I was going to create was a small utility,
analogous to Perl <> operator, taking a list of file names and
allowing forward iteration as it would be single stream of text
lines. It would take no time to write the range from scratch, but
what are all the phobos primitives
On Thu, Aug 31, 2017 at 05:37:20PM -0600, Jonathan M Davis via
Digitalmars-d-learn wrote:
> On Thursday, August 31, 2017 14:09:55 H. S. Teoh via Digitalmars-d-learn
[...]
> I know. We've had this argument before.
I know. Let's not rehash that. :-)
[...]
> Even copying ranges in generic code
On Thursday, August 31, 2017 14:09:55 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Thu, Aug 31, 2017 at 01:34:39PM -0600, Jonathan M Davis via
> Digitalmars-d-learn wrote: [...]
>
> > In general, byLine does not work with other range-based algorithms
> > precisely because it reuses the buffer.
On Thu, Aug 31, 2017 at 01:34:39PM -0600, Jonathan M Davis via
Digitalmars-d-learn wrote:
[...]
> In general, byLine does not work with other range-based algorithms
> precisely because it reuses the buffer. I think that it does manage to
> work for some, but IMHO, it should have just supported
On Thursday, August 31, 2017 18:43:40 Jesse Phillips via Digitalmars-d-learn
wrote:
> On Thursday, 31 August 2017 at 18:26:33 UTC, Sergei Degtiarev
>
> wrote:
> > Hi,
> > I tried to create a simple range concatenating several files,
> >
> > something like this:
> > File[] files;
> >
On Thu, Aug 31, 2017 at 06:26:33PM +, Sergei Degtiarev via
Digitalmars-d-learn wrote:
[...]
> File[] files;
>
> foreach(ln; joiner(files.map!(a => a.byLine)))
> writeln(ln);
You probably want to use byLineCopy instead.
The problem here is that .byLine
On Thursday, 31 August 2017 at 18:26:33 UTC, Sergei Degtiarev
wrote:
Hi,
I tried to create a simple range concatenating several files,
something like this:
File[] files;
foreach(ln; joiner(files.map!(a => a.byLine)))
writeln(ln);
and I see every
Hi,
I tried to create a simple range concatenating several files,
something like this:
File[] files;
foreach(ln; joiner(files.map!(a => a.byLine)))
writeln(ln);
and I see every first line of each file is missing.
However, when I do same thing with