On Thursday, 17 May 2018 at 20:08:09 UTC, Dennis wrote:
```
auto inputStream = (args.length < 2 || args[1] == "-") ?
stdin : args[1].File;
auto outputFile = new File("output.txt");
foreach (line; inputStream.byLine(KeepTerminator.yes))
outputFile.write(line);
```
Do it old s
On 5/17/18 7:33 PM, Bastiaan Veelo wrote:
On Thursday, 17 May 2018 at 23:18:32 UTC, Basile B. wrote:
On Thursday, 17 May 2018 at 22:07:46 UTC, Bastiaan Veelo wrote:
Hi!
The code in [1] compiles and runs flawlessly on Windows, but not on
Linux (neither run.dlang nor Travis docker image). Any i
On 2018-05-16 17:46:59 +, Steven Schveighoffer said:
Well, for C see above on the D side:
extern(C) {
result myfunc(double x, double y, const char *text, stuff
*myStuff, bool measureOnly);
}
Shouldn't the result be a pointer?
Indeed. And you know what? That was causi
On Friday, 18 May 2018 at 14:06:11 UTC, Robert M. Münch wrote:
So, having a wrong return-type here, resulted in the const char
*text parameter always being NULL. Not sure I understand the
relation but looks strange to me... at least not very obvious.
A value struct return is actually done via
Hi,
What's the current official position on how to create temporary files for use
during a unittest. I found
https://github.com/dlang/phobos/pull/5788
but it seems to be languishing in the "we have discussed all the issues that
no-one will ever have a problem with" phase.
What to do between no
On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote:
Hi,
What's the current official position on how to create temporary
files for use during a unittest. I found
https://github.com/dlang/phobos/pull/5788
but it seems to be languishing in the "we have discussed all
the issues that no
On Friday, 18 May 2018 at 15:30:05 UTC, Uknown wrote:
On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote:
Hi,
What's the current official position on how to create
temporary files for use during a unittest. I found
https://github.com/dlang/phobos/pull/5788
but it seems to be langui
Why does D complain when using == to compare with null? Is there
really any technical reason? if one just defines == null to is
null then there should be no problem. It seems like a pedantic
move by who ever implemented it and I'm hoping there is actually
a good technical reason for it.
On Friday, 18 May 2018 at 23:53:12 UTC, IntegratedDimensions
wrote:
Why does D complain when using == to compare with null? Is
there really any technical reason? if one just defines == null
to is null then there should be no problem. It seems like a
pedantic move by who ever implemented it and
On Friday, 18 May 2018 at 23:58:18 UTC, Uknown wrote:
On Friday, 18 May 2018 at 23:53:12 UTC, IntegratedDimensions
wrote:
Why does D complain when using == to compare with null? Is
there really any technical reason? if one just defines == null
to is null then there should be no problem. It seem
On Friday, 18 May 2018 at 23:53:12 UTC, IntegratedDimensions
wrote:
Why does D complain when using == to compare with null? Is
there really any technical reason? if one just defines == null
to is null then there should be no problem. It seems like a
pedantic move by who ever implemented it and
On Friday, May 18, 2018 23:53:12 IntegratedDimensions via Digitalmars-d-
learn wrote:
> Why does D complain when using == to compare with null? Is there
> really any technical reason? if one just defines == null to is
> null then there should be no problem. It seems like a pedantic
> move by who ev
On Saturday, May 19, 2018 01:27:59 Neia Neutuladh via Digitalmars-d-learn
wrote:
> On Friday, 18 May 2018 at 23:53:12 UTC, IntegratedDimensions
>
> wrote:
> > Why does D complain when using == to compare with null? Is
> > there really any technical reason? if one just defines == null
> > to is nul
On Saturday, 19 May 2018 at 01:48:38 UTC, Jonathan M Davis wrote:
Actually, that runtime function has existed since before TDPL
came out in 2010. It even shows the implementation of the free
function opEquals (which at the time was in object_.d rather
than object.d). I'm not even sure that the
On Saturday, May 19, 2018 03:32:53 Neia Neutuladh via Digitalmars-d-learn
wrote:
> > Of course, the most notable case where using == with null is a
> > terrible idea is dynamic arrays, and that's the case where the
> > compiler _doesn't_ complain. Using == with null and arrays is
> > always unclea
15 matches
Mail list logo