Re: Passing directory as compiler argument not finding file

2018-04-13 Thread Cym13 via Digitalmars-d-learn
On Friday, 13 April 2018 at 13:39:23 UTC, Tony wrote: On Friday, 13 April 2018 at 12:46:32 UTC, Cym13 wrote: On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote: I think that the typical model (at least in other languages) is to only compile one D source file at a time. Compile the b.d file w

Re: Why is the error message coming by the end of the compilation?

2018-04-13 Thread Ikeran via Digitalmars-d-learn
On Friday, 13 April 2018 at 20:50:38 UTC, bauss wrote: What I'm doing is basically this: static foreach (viewResult; generateViewsResult) { pragma(msg, "Compiling: " ~ viewResult.name); mixin(viewResult.source); pragma(msg, "Compiled: " ~ viewResult.name); } I would

Re: Why is the error message coming by the end of the compilation?

2018-04-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/13/18 4:50 PM, bauss wrote: I can't seem to reproduce this with any other smaller projects, so my question is really what could trigger this behavior. See: https://i.imgur.com/OmqJ8Sr.png Whenever I try to just do this kind of thing by itself then it behaves correctly. Ex: (As you can

Why is the error message coming by the end of the compilation?

2018-04-13 Thread bauss via Digitalmars-d-learn
I can't seem to reproduce this with any other smaller projects, so my question is really what could trigger this behavior. See: https://i.imgur.com/OmqJ8Sr.png Whenever I try to just do this kind of thing by itself then it behaves correctly. Ex: (As you can see it prints the error messages i

Re: Why is the error message coming by the end of the compilation?

2018-04-13 Thread bauss via Digitalmars-d-learn
On Friday, 13 April 2018 at 20:50:38 UTC, bauss wrote: https://run.dlang.io/ Sorry posted wrong link for run.dlang.io. https://run.dlang.io/is/HQlbgv

Re: How do you check for nonempty string?

2018-04-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, April 13, 2018 17:38:39 Dr.No via Digitalmars-d-learn wrote: > s.length > 0 or s !is null? > > used to C++/C#'s world I cautch myself doing something like this: > > if(s !is null && s.length > 0 && s[0] == '/) > > then a I remembered the D's way, which length is probably a > function not

Re: How do you check for nonempty string?

2018-04-13 Thread user1234 via Digitalmars-d-learn
On Friday, 13 April 2018 at 17:41:00 UTC, Adam D. Ruppe wrote: On Friday, 13 April 2018 at 17:38:39 UTC, Dr.No wrote: string s = null; if(s !is null && s[0] == '/') is this correct? No, that doesn't work if the string = "a"[$..$] for example Just use if(s.length && s[0]) instead just `i

Re: How do you check for nonempty string?

2018-04-13 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 13 April 2018 at 17:38:39 UTC, Dr.No wrote: string s = null; if(s !is null && s[0] == '/') is this correct? No, that doesn't work if the string = "a"[$..$] for example Just use if(s.length && s[0]) instead

How do you check for nonempty string?

2018-04-13 Thread Dr.No via Digitalmars-d-learn
s.length > 0 or s !is null? used to C++/C#'s world I cautch myself doing something like this: if(s !is null && s.length > 0 && s[0] == '/) then a I remembered the D's way, which length is probably a function not a property (in the C++/C#'s sense, which needs this as first parameter, hence s.

Re: Passing directory as compiler argument not finding file

2018-04-13 Thread Tony via Digitalmars-d-learn
On Friday, 13 April 2018 at 12:46:32 UTC, Cym13 wrote: On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote: I think that the typical model (at least in other languages) is to only compile one D source file at a time. Compile the b.d file with the -c option to create an object file. Then put t

Re: Passing directory as compiler argument not finding file

2018-04-13 Thread Cym13 via Digitalmars-d-learn
On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote: I think that the typical model (at least in other languages) is to only compile one D source file at a time. Compile the b.d file with the -c option to create an object file. Then put the object file in a library file (either static (easier)

Re: trouble building dlang.org

2018-04-13 Thread Seb via Digitalmars-d-learn
On Tuesday, 10 April 2018 at 15:58:10 UTC, Zach Tollen wrote: I'm trying to update the language spec. I have the standard dmd installed on my Mac in `~/dlang/dmd` using the install script from the website "curl -fsS https://dlang.org/install.sh | bash -s dmd". Okay, good, done. Actually no D