Re: Adding linker paths with spaces using dmd and msvc toolchain

2016-12-29 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 30 December 2016 at 04:56:59 UTC, Jerry wrote: On Friday, 30 December 2016 at 03:51:13 UTC, Jeremy DeHaan wrote: How does one correctly add a linker path that has spaces? The quotes get consumed by the command line. The way DMD spawns the linker by creating a new string with all th

Re: Adding linker paths with spaces using dmd and msvc toolchain

2016-12-29 Thread Jerry via Digitalmars-d-learn
On Friday, 30 December 2016 at 03:51:13 UTC, Jeremy DeHaan wrote: I have a path to where some .libs are, and this path has some spaces in it. Using dmd and the msvc toolchain, I only seem to be able to correctly link .lib files if I pass them to the compiler with their full paths, or if I give

Adding linker paths with spaces using dmd and msvc toolchain

2016-12-29 Thread Jeremy DeHaan via Digitalmars-d-learn
I have a path to where some .libs are, and this path has some spaces in it. Using dmd and the msvc toolchain, I only seem to be able to correctly link .lib files if I pass them to the compiler with their full paths, or if I give the linker a relative path. When I add -L/LIBPATH:"path" to the c

Re: understanding std.algorithm.mutation.fill behaivor.

2016-12-29 Thread LeqxLeqx via Digitalmars-d-learn
On Wednesday, 28 December 2016 at 08:27:29 UTC, abad wrote: On Wednesday, 28 December 2016 at 08:10:41 UTC, Nemanja Boric wrote: On Wednesday, 28 December 2016 at 05:09:34 UTC, LeqxLeqx wrote: Perhaps this is a stupid question, and I apologize if it is, but why doesn't this compile: import

Re: Unittest hangs on completion

2016-12-29 Thread David Zhang via Digitalmars-d-learn
On Friday, 30 December 2016 at 01:25:50 UTC, Steven Schveighoffer wrote: Looks like that comes from here: https://github.com/dlang/dub/blob/master/source/dub/dub.d#L577 I have serious doubts that this is the correct way to run tests, as share ctors are supposed to have run BEFORE unit tests a

Re: Unittest hangs on completion

2016-12-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/29/16 7:49 PM, David Zhang wrote: On Friday, 30 December 2016 at 00:44:50 UTC, Steven Schveighoffer wrote: Where does the "All unit tests have been completed successfully." message come from? That's not standard D, which prints nothing. I should have mentioned that I use dub then, shou

Re: Unittest hangs on completion

2016-12-29 Thread David Zhang via Digitalmars-d-learn
On Friday, 30 December 2016 at 00:44:50 UTC, Steven Schveighoffer wrote: Where does the "All unit tests have been completed successfully." message come from? That's not standard D, which prints nothing. -Steve I should have mentioned that I use dub then, shouldn't I? Anyway, this is what

Re: Unittest hangs on completion

2016-12-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/29/16 3:27 PM, David Zhang wrote: Hi, I've noticed recently, that whenever I unittest, it program hangs either at the very end, or right before they start. When using vanilla unit tests, the program appears to hang after the "All unit tests have been completed successfully." message, and I

Re: Unittest hangs on completion

2016-12-29 Thread David Zhang via Digitalmars-d-learn
On Thursday, 29 December 2016 at 20:50:54 UTC, David Zhang wrote: On Thursday, 29 December 2016 at 20:33:33 UTC, Stefan Koch wrote: It would be very helpful if you could provide example code that triggers that behavior. I'd love to, but I'm not actually sure just what it is that breaks it. I

Re: delegate passed in annotation struct cannot be invoked.

2016-12-29 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 29 December 2016 at 21:19:18 UTC, Alexandru Ermicioi wrote: On Thursday, 29 December 2016 at 21:07:00 UTC, Stefan Koch wrote: It's a delegate and not function. Therefore it will get a frame-ptr regardless, without checking if it is needed or not, or if there is a frame to point to.

Re: delegate passed in annotation struct cannot be invoked.

2016-12-29 Thread Alexandru Ermicioi via Digitalmars-d-learn
On Thursday, 29 December 2016 at 21:07:00 UTC, Stefan Koch wrote: It's a delegate and not function. Therefore it will get a frame-ptr regardless, without checking if it is needed or not, or if there is a frame to point to. Since there is no frame to point to you get the error. At least this is

Re: delegate passed in annotation struct cannot be invoked.

2016-12-29 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 29 December 2016 at 20:55:43 UTC, Alexandru Ermicioi wrote: Given code below: import std.stdio; struct Annotation { public int delegate(int) dg; } void main() { import std.traits; __traits(getAttributes, Cls)[0].dg(20).writeln; } @Annotation(delegate i

delegate passed in annotation struct cannot be invoked.

2016-12-29 Thread Alexandru Ermicioi via Digitalmars-d-learn
Given code below: import std.stdio; struct Annotation { public int delegate(int) dg; } void main() { import std.traits; __traits(getAttributes, Cls)[0].dg(20).writeln; } @Annotation(delegate int(int d) { return d; }) class Cls { void method() { } } Dm

Re: Unittest hangs on completion

2016-12-29 Thread David Zhang via Digitalmars-d-learn
On Thursday, 29 December 2016 at 20:33:33 UTC, Stefan Koch wrote: It would be very helpful if you could provide example code that triggers that behavior. I'd love to, but I'm not actually sure just what it is that breaks it. I can provide the git repo for one of them though though: https://

Re: Unittest hangs on completion

2016-12-29 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 29 December 2016 at 20:27:21 UTC, David Zhang wrote: Hi, I've noticed recently, that whenever I unittest, it program hangs either at the very end, or right before they start. When using vanilla unit tests, the program appears to hang after the "All unit tests have been completed

Unittest hangs on completion

2016-12-29 Thread David Zhang via Digitalmars-d-learn
Hi, I've noticed recently, that whenever I unittest, it program hangs either at the very end, or right before they start. When using vanilla unit tests, the program appears to hang after the "All unit tests have been completed successfully." message, and I have to force to program to exit. Ho

Re: Explain the Modules to me but better...

2016-12-29 Thread bachmeier via Digitalmars-d-learn
On Thursday, 29 December 2016 at 18:20:22 UTC, Modules Confuse Me wrote: I'm really getting hung up on a simple thing, such as how to structure my program in the 'D' way. So correct me if I am wrong. In my packages, I should be using 'public' imports correct? So that the imports get forwarded

Re: Explain the Modules to me but better...

2016-12-29 Thread Nemanja Boric via Digitalmars-d-learn
On Thursday, 29 December 2016 at 19:00:25 UTC, Nemanja Boric wrote: On Thursday, 29 December 2016 at 18:20:22 UTC, Modules Confuse Me wrote: [...] If you have following: [...] This all is valid, of course, only if I guessed right your problem :-)

Re: Explain the Modules to me but better...

2016-12-29 Thread Nemanja Boric via Digitalmars-d-learn
On Thursday, 29 December 2016 at 18:20:22 UTC, Modules Confuse Me wrote: I'm trying to get going with D, but I keep getting hung up on modules. I personally like having many smaller files. Generally classes and interfaces all go into their own file. Even if the overall file ends up being smalle

Explain the Modules to me but better...

2016-12-29 Thread Modules Confuse Me via Digitalmars-d-learn
I'm trying to get going with D, but I keep getting hung up on modules. I personally like having many smaller files. Generally classes and interfaces all go into their own file. Even if the overall file ends up being smaller than 10 lines of real code. After reading: https://dlang.org/spec/mod

Re: Android Status

2016-12-29 Thread Ignacious via Digitalmars-d-learn
On Thursday, 29 December 2016 at 10:14:53 UTC, Joakim wrote: On Wednesday, 28 December 2016 at 23:33:57 UTC, Ignacious wrote: What is the current status for building android apps in D? I would like to create simple graphic based apps but don't wanna get bogged down in trying to get car moving w

Re: Android Status

2016-12-29 Thread Joakim via Digitalmars-d-learn
On Wednesday, 28 December 2016 at 23:33:57 UTC, Ignacious wrote: What is the current status for building android apps in D? I would like to create simple graphic based apps but don't wanna get bogged down in trying to get car moving without any wheels. Should all work, but nothing other than s

Re: Android Status

2016-12-29 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 28 December 2016 at 23:33:57 UTC, Ignacious wrote: What is the current status for building android apps in D? I would like to create simple graphic based apps but don't wanna get bogged down in trying to get car moving without any wheels. https://forum.dlang.org/thread/ovkhtsdzlf

Re: CTFE difference between dmd and ldc2

2016-12-29 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Thursday, 29 December 2016 at 09:24:23 UTC, Joseph Rushton Wakeling wrote: On Tuesday, 27 December 2016 at 22:34:50 UTC, Johan Engelen wrote: Do you see the same with dmd 2.071? (that's the same front-end code as the LDC version tested) Sorry for delay in following up on this. Yes, the sam

Re: CTFE difference between dmd and ldc2

2016-12-29 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 27 December 2016 at 22:34:50 UTC, Johan Engelen wrote: On Tuesday, 27 December 2016 at 17:56:07 UTC, Stefan Koch wrote: I doubt that this is a CTFE bug since there should be little difference in the ctfe code between ldc and dmd. That said, it is of course a possibility. Do you se