Re: So these two compile and, in non-debug builds, run just fine

2016-11-28 Thread Somebody via Digitalmars-d
On Friday, 25 November 2016 at 23:04:44 UTC, Mathias Lang wrote: You are correct that DIP1000 will fix that. However it will only be enforced in @safe mode, sadly. I wonder why. If @system code wanted to bypass it, it could cast the scoped ref into a traditional one. Wouldn't it be better i

Re: Mir Random [WIP]

2016-11-23 Thread Somebody via Digitalmars-d
I have to agree that creating a different API that uses opCall or whatever instead of a the range API is a bad idea, particularly when a simple helper function would make it possible to use a random number generator in a fashion more like rand() for the cases where that's preferable, and for a

Re: Stdio.write/writeln and flushing

2016-09-09 Thread Somebody via Digitalmars-d
On Thursday, 8 September 2016 at 13:22:10 UTC, Steven Schveighoffer wrote: write and writeln depend on the behavior of FILE * for flushing, there is no specific flush. Note that FILE * examines the file descriptor and if it is detected as an interactive descriptor, flush is done every newli

Re: Stdio.write/writeln and flushing

2016-09-08 Thread Somebody via Digitalmars-d
On Thursday, 8 September 2016 at 08:56:43 UTC, rikki cattermole wrote: Same problem with Poderosa (terminal emulator which supports Cygwin) its at fault of the software which is client of the pipe. Phobos is doing what it should be doing. I think you're right... I think half of the command lin

Stdio.write/writeln and flushing

2016-09-08 Thread Somebody via Digitalmars-d
If i write something like: writeln("what to do?"); switch(readln[0 .. $ - 1]) { //.. } writeln("bye"); ...that works just as it should at Windows, started from a command prompt. However, if I run it from GNU Emacs, I have to manually flush the output after each time I do it before taking in