Re: Reading ASCII file with some codes above 127 (exten ascii)

2016-05-15 Thread Era Scarecrow via Digitalmars-d-learn
On Thursday, 24 May 2012 at 19:47:06 UTC, era scarecrow wrote: On Wednesday, 23 May 2012 at 21:02:27 UTC, Paul wrote: I wonder about the speed between this method and Era's home-spun solution? Who knows? Perhaps it will be added to phobos once the table is verified. Well after taking to hea

Re: docs generation for mixins

2016-05-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, May 15, 2016 18:41:26 ikod via Digitalmars-d-learn wrote: > Hello, > > sorry if this question was asked before... > > How can I get docs generated for int z? > > - > string V(string var) { > return "int " ~ var ~ ";"; > } > /// > struct X { > /// comment for y > int y;

Re: docs generation for mixins

2016-05-15 Thread ag0aep6g via Digitalmars-d-learn
On 05/15/2016 08:41 PM, ikod wrote: How can I get docs generated for int z? - string V(string var) { return "int " ~ var ~ ";"; } /// struct X { /// comment for y int y; /// comment for z mixin(V("z")); } void main() { } - "dmd -D -Dddocs" generate docs for "y"

docs generation for mixins

2016-05-15 Thread ikod via Digitalmars-d-learn
Hello, sorry if this question was asked before... How can I get docs generated for int z? - string V(string var) { return "int " ~ var ~ ";"; } /// struct X { /// comment for y int y; /// comment for z mixin(V("z")); } void main() { } - "dmd -D -Dddocs" generate do

Re: Using shorthand *= leads to unexpected result?

2016-05-15 Thread Michael via Digitalmars-d-learn
On Sunday, 15 May 2016 at 14:12:47 UTC, Marc Schütz wrote: On Sunday, 15 May 2016 at 13:01:45 UTC, Michael wrote: It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it t

Re: Using shorthand *= leads to unexpected result?

2016-05-15 Thread Marc Schütz via Digitalmars-d-learn
On Sunday, 15 May 2016 at 13:01:45 UTC, Michael wrote: It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it to a sign inversion that I was making. Here is some code from

Re: Using shorthand *= leads to unexpected result?

2016-05-15 Thread Saurabh Das via Digitalmars-d-learn
On Sunday, 15 May 2016 at 13:25:42 UTC, Michael wrote: Well I'm pretty sure the code was working just fine earlier in the week at the office, but running the code at home with the newest version of DMD started producing these odd results. Typing this function into asm.dlang.org shows a minor d

Re: Using shorthand *= leads to unexpected result?

2016-05-15 Thread Michael via Digitalmars-d-learn
On Sunday, 15 May 2016 at 13:12:44 UTC, Saurabh Das wrote: On Sunday, 15 May 2016 at 13:01:45 UTC, Michael wrote: It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it t

Re: How do you use a non-dmd compiler within dub as default compiler?

2016-05-15 Thread Jamal via Digitalmars-d-learn
On Sunday, 15 May 2016 at 12:42:05 UTC, rikki cattermole wrote: On 16/05/2016 12:38 AM, Jamal wrote: I made this little sdl2 game and written in D, and the project was initialized with dub. When in the project directory and I type: $ dub It fetches all the dependencies and compiles with dmd.

Re: Using shorthand *= leads to unexpected result?

2016-05-15 Thread Saurabh Das via Digitalmars-d-learn
On Sunday, 15 May 2016 at 13:01:45 UTC, Michael wrote: It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it to a sign inversion that I was making. Here is some code from

Using shorthand *= leads to unexpected result?

2016-05-15 Thread Michael via Digitalmars-d-learn
It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it to a sign inversion that I was making. Here is some code from dpaste to demonstrate the behaviour I get vs. the beha

Re: How do you use a non-dmd compiler within dub as default compiler?

2016-05-15 Thread rikki cattermole via Digitalmars-d-learn
On 16/05/2016 12:38 AM, Jamal wrote: I made this little sdl2 game and written in D, and the project was initialized with dub. When in the project directory and I type: $ dub It fetches all the dependencies and compiles with dmd. So, what do I chance so that instead it compiles with ldc2 or ev

How do you use a non-dmd compiler within dub as default compiler?

2016-05-15 Thread Jamal via Digitalmars-d-learn
I made this little sdl2 game and written in D, and the project was initialized with dub. When in the project directory and I type: $ dub It fetches all the dependencies and compiles with dmd. So, what do I chance so that instead it compiles with ldc2 or even gdc for that matter?

Re: Why doesn't this chain of ndslices work?

2016-05-15 Thread Stiff via Digitalmars-d-learn
On Sunday, 15 May 2016 at 08:31:17 UTC, 9il wrote: On Saturday, 14 May 2016 at 21:59:48 UTC, Stiff wrote: Here's the code that doesn't compile: import std.stdio, std.experimental.ndslice, std.range, std.algorithm; [...] Coming soon https://github.com/libmir/mir/issues/213#issuecomment-219

Re: Why doesn't this chain of ndslices work?

2016-05-15 Thread 9il via Digitalmars-d-learn
On Saturday, 14 May 2016 at 21:59:48 UTC, Stiff wrote: Here's the code that doesn't compile: import std.stdio, std.experimental.ndslice, std.range, std.algorithm; [...] Coming soon https://github.com/libmir/mir/issues/213#issuecomment-219271447 --Ilya

Re: guard condition for a callable thingy, with THESE arguments

2016-05-15 Thread Ann W. Griffith via Digitalmars-d-learn
On Sunday, 15 May 2016 at 07:22:57 UTC, cy wrote: On Sunday, 15 May 2016 at 02:12:38 UTC, Ann W. Griffith wrote: use "Parameters" in the constraint or make a template that you can reeuse. This is what I've got going so far. Using static asserts to have clearer errors when an incorrect callbac

Re: guard condition for a callable thingy, with THESE arguments

2016-05-15 Thread cy via Digitalmars-d-learn
On Sunday, 15 May 2016 at 02:12:38 UTC, Ann W. Griffith wrote: use "Parameters" in the constraint or make a template that you can reeuse. This is what I've got going so far. Using static asserts to have clearer errors when an incorrect callback is supplied. I'm not... sure storage class is im