Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Wednesday, 30 May 2018 at 01:46:30 UTC, Chameleon wrote: On Monday, 28 May 2018 at 20:13:49 UTC, DigitalDesigns wrote: Here is my solution that does not solve problem 2: import std.stdio; [...] this is not programming. this is witchcraft! Just call me Dandalf the D Slayer! At

Re: Build interface from abstract class

2018-05-29 Thread Chameleon via Digitalmars-d-learn
On Monday, 28 May 2018 at 20:13:49 UTC, DigitalDesigns wrote: Here is my solution that does not solve problem 2: import std.stdio; [...] this is not programming. this is witchcraft!

Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 20:53:14 UTC, DigitalDesigns wrote: On Tuesday, 29 May 2018 at 20:26:52 UTC, arturg wrote: On Tuesday, 29 May 2018 at 19:06:24 UTC, DigitalDesigns wrote: On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f

Re: Getter an lvalue and cannot be modified

2018-05-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/27/18 5:23 AM, IntegratedDimensions wrote: C[] c; @property C[] get() { return c; } get ~= something; errors out, yet auto q = get; q ~= something; is fine. It's "fine", but not doing what you may expect. This appends an element to q, but does nothing to c. While an array is not

Re: full path to source file __FILE__

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 21:41:37 UTC, Ali Çehreli wrote: On 05/29/2018 02:34 PM, DigitalDesigns wrote: > auto x(string fp = __FULL_FILE_PATH__)() {    pragma(msg, fp); } ? __FILE_FULL_PATH__ https://dlang.org/spec/expression#specialkeywords Ali Lol, thanks:

Re: full path to source file __FILE__

2018-05-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/29/18 5:34 PM, DigitalDesigns wrote: On Wednesday, 27 July 2016 at 13:58:22 UTC, Jonathan Marler wrote: On Thursday, 21 July 2016 at 19:54:34 UTC, Jonathan Marler wrote: Is there a way to get the full path of the current source file? Something like: __FILE_FULL_PATH__ I'm asking

Re: full path to source file __FILE__

2018-05-29 Thread Ali Çehreli via Digitalmars-d-learn
On 05/29/2018 02:34 PM, DigitalDesigns wrote: > auto x(string fp = __FULL_FILE_PATH__)() {    pragma(msg, fp); } ? __FILE_FULL_PATH__ https://dlang.org/spec/expression#specialkeywords Ali

Re: full path to source file __FILE__

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Wednesday, 27 July 2016 at 13:58:22 UTC, Jonathan Marler wrote: On Thursday, 21 July 2016 at 19:54:34 UTC, Jonathan Marler wrote: Is there a way to get the full path of the current source file? Something like: __FILE_FULL_PATH__ I'm asking because I'm rewriting a batch script in D, meant

string mixin output works when directly used but when generator is used D fails

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
https://dpaste.dzfl.pl/67691db19ce8 Just delete 9 to 29 for the code to work. Note that none of the code effects the output but D gives strange errors. In my code it says the interface members are not implemented(which they are) foreach (member; __traits(allMembers, T))

Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 20:26:52 UTC, arturg wrote: On Tuesday, 29 May 2018 at 19:06:24 UTC, DigitalDesigns wrote: On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f you can use them to generate the functions as strings. Thanks,

Re: Build interface from abstract class

2018-05-29 Thread arturg via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 19:06:24 UTC, DigitalDesigns wrote: On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f you can use them to generate the functions as strings. Thanks, So, the problem I'm having is that I cannot use the

Re: How do I break from loop when using parallel()?

2018-05-29 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2018-05-28 at 21:04 +, Dr.No via Digitalmars-d-learn wrote: > import std.parallelism : parallel; > foreach(t; parallel(arr)) > { > if(!doSomething(t)) { > return false; >

Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f you can use them to generate the functions as strings. Thanks, So, the problem I'm having is that I cannot use the generated interface for the abstract class because the abstract

Re: Native PDB Error

2018-05-29 Thread Begah via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 07:53:49 UTC, rikki cattermole wrote: On 29/05/2018 7:47 PM, Begah wrote: I have recently reinstalled a fresh version of Windows 10. I installed DMD 1.9.0 and compiled my code ( that was compiling before reinstalling Windows ). What? That is definitely not a valid

Re: Native PDB Error

2018-05-29 Thread rikki cattermole via Digitalmars-d-learn
On 29/05/2018 7:47 PM, Begah wrote: I have recently reinstalled a fresh version of Windows 10. I installed DMD 1.9.0 and compiled my code ( that was compiling before reinstalling Windows ). What? That is definitely not a valid dmd version for D2.

Native PDB Error

2018-05-29 Thread Begah via Digitalmars-d-learn
I have recently reinstalled a fresh version of Windows 10. I installed DMD 1.9.0 and compiled my code ( that was compiling before reinstalling Windows ). I get this error at the linking phase : Native PDB Error: The entry already exists. The specified module already exists I made a