On Monday, 27 January 2020 at 01:50:00 UTC, Jesse Phillips wrote:
Just as I'm hitting send the part I'm missing clicked:
I needed to add the text encoding because my buffer is `char`
but File writes `ubyte`
```dlang
auto output() {
return std.io.File("somefile.txt",
Just as I'm hitting send the part I'm missing clicked:
I needed to add the text encoding because my buffer is `char` but
File writes `ubyte`
```dlang
/+ dub.sdl:
name "iobuftofile"
dependency "iopipe" version="~>0.1.7"
dependency "io" version="~>0.2.4"
+/
void main() {
import
I'd like to start utilizing IOPipe[1] more. Right now I have an
interest in utilizing it for buffering output (actually I don't
have a need for buffering, I just want to utilize iopipe)
Looking through some different examples[2][3] I thought I would
have something with this:
```dlang
/+
import std;
import std.range;
void main()
{
int[] a = [3, 5, 7];
foreach (i, ref ae; a.enumerate)
{
writeln(i, " ", ae);
ae = 6;
}
writeln(a);
assert(a[].equal([6, 6, 6])); // fails, a is in initial state
}
Why does the compiler allow such 'ref ae' loop,