Re: How to test templates for equality?

2014-07-06 Thread Uranuz via Digitalmars-d-learn
template isMyInstanceOf(alias Templ, alias Inst) { alias Args = ???; //I don't have idea how to get it enum bool isMyInstanceOf = __traits(isSame, Templ!(Args), Inst); } Do you have any idea how to solve this? May be standad library could be improved with such type of test for

Re: Visual D: Settings to Improve compil and link process

2014-07-06 Thread Rainer Schuetze via Digitalmars-d-learn
On 05.07.2014 16:05, ParticlePeter wrote: Hello Community, I thought there's a separate forum for VisualD. It did exist when VisualD was on DSource, so why not add it here as well? Or am I to blind to see? The forum digitalmars.D.ide is probably the best fit. Anyway, this thread is an

Re: dependency graph

2014-07-06 Thread Philippe Sigaud via Digitalmars-d-learn
If you compile your project with the -deps flag, the compiler will output import dependencies. With -deps=filename, the output will go into filename. From there, you'll have to parse and create the graph, though. Maybe have a look into rdmd source, to see how the dependency extraction is done

Re: What exactly module in D means?

2014-07-06 Thread Philippe Sigaud via Digitalmars-d-learn
On Sat, Jul 5, 2014 at 6:35 PM, Andre Tampubolon via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I've been reading the newsgroup for a while, and it seems that one of the reason folks like D is because it supports module. My question is: what does module mean? A quick google

Re: implib and system dlls, oh my

2014-07-06 Thread Jason King via Digitalmars-d-learn
You may want to spearhead the effort to get Win32 support of MSVC into D, if you care enough about it. Rainer has done most of the work, you'd just have to turn his patches into pull requests, shepherd them through the review process, and maybe add some polish:

Re: Problem Linking Phobos git master

2014-07-06 Thread Nordlöw
Do you have an DFLAGS environment variable set on your system? It looks like the environment variable is used instead of the make file variable while compiling. Yep, the DFLAGS parameter was given to the make call. Removing it... Thx!

dmd dub from git master

2014-07-06 Thread Nordlöw
Trying to use dub git master with dmd git master fails as[per:/home/per] master(+20/-466) ± dub init vibtest vibe.d Successfully created an empty project in '/home/per/vibtest'. [per:/home/per] master(+20/-466) ± cd vibtest/ /home/per/vibtest [per:/home/per/vibtest] $ dub Fetching vibe-d 0.7.20

Re: dmd dub from git master

2014-07-06 Thread Nordlöw
What is the syntax for specifying a specific package version (in my case ~master) when calling dub init?

Re: dmd dub from git master

2014-07-06 Thread Nordlöw
On Sunday, 6 July 2014 at 09:54:11 UTC, Nordlöw wrote: I believe I need git master instead of latest release because of https://github.com/rejectedsoftware/vibe.d/commits/master If I change vibe-d: ~0.7.19 to vibe-d: ~master followed by dub upgrade and dub I instead get

Re: dependency graph

2014-07-06 Thread Rene Zwanenburg via Digitalmars-d-learn
On Saturday, 5 July 2014 at 15:33:51 UTC, Vlad Levenfeld wrote: A colleague of mine had asked me if I could produce some kind of object/module dependency type of graph for a D project I've got. I'm not sure what these are called but I've seen them before for inheritance hierarchies in C++

Re: dmd dub from git master

2014-07-06 Thread w0rp via Digitalmars-d-learn
I hit this myself also. I was trying to use the master branch DMD, druntime, and phobos with a recent vibe.d for building the documentation with ddox, and I ran into the reliance on std.metastrings.

[dmd 2.066] Is scope with nothrow regression?

2014-07-06 Thread NCrashed via Digitalmars-d-learn
``` void bar() { throw new Exception(); } void foo() nothrow { scope(failure) {} bar(); } void main() {} ``` Doesn't compile with 2.066: ``` source/app.d(9): Error: 'app.bar' is not nothrow source/app.d(6): Error: function 'app.foo' is nothrow yet may throw ```

Re: [dmd 2.066] Is scope with nothrow regression?

2014-07-06 Thread via Digitalmars-d-learn
On Sunday, 6 July 2014 at 12:31:42 UTC, NCrashed wrote: ``` void bar() { throw new Exception(); } void foo() nothrow { scope(failure) {} bar(); } void main() {} ``` Doesn't compile with 2.066: ``` source/app.d(9): Error: 'app.bar' is not nothrow source/app.d(6): Error:

MmFile.unmap() errs on empty file

2014-07-06 Thread Nordlöw
I just spent two hours tracking down a bug caused by the fact that MmFile's ctor gladly accepts mapping an empty file but its member function unmap() will not. Is this a known issue?

Problem building vibe.d in test project

2014-07-06 Thread Nordlöw
I've setup a test project for vibe.d using dub at https://github.com/nordlow/vibe-test but when I type dub It err as follows: [per:/home/per/vibtest] 5s 2 $ dub WARNING: A deprecated branch based version specification is used for the dependency vibe-d. Please use numbered versions

Re: How to test templates for equality?

2014-07-06 Thread Ali Çehreli via Digitalmars-d-learn
On 07/05/2014 10:33 PM, Uranuz wrote: I have another question about testing if given symbol is instance of the given template and geting it's template arguments. Applying Rene Zwanenburg's message... It is not complete because integral template parameters don't work yet. import

Re: Visual D: Settings to Improve compil and link process

2014-07-06 Thread ParticlePeter via Digitalmars-d-learn
On Sunday, 6 July 2014 at 08:09:07 UTC, Rainer Schuetze wrote: On 05.07.2014 16:05, ParticlePeter wrote: ... It is possible to remove the template methods from my classes, create free functions instead and use them in a UFCS way. Unfortunately I have not figured out UFCS properly, as my

Re: How to test templates for equality?

2014-07-06 Thread Philippe Sigaud via Digitalmars-d-learn
Seeing his example, the OP wants a solution that works even for templates: template Test1(T) {} pragma(msg, instanceArgsOf!(Test1, Test1!int)); which fails because Test1!int is not a type (std.traits.isInstanceOf fails also, for the same reason). And is(symbol == Name!Args, Args...) does not

Re: Visual D: Settings to Improve compil and link process

2014-07-06 Thread Rainer Schuetze via Digitalmars-d-learn
On 06.07.2014 19:51, ParticlePeter wrote: On Sunday, 6 July 2014 at 08:09:07 UTC, Rainer Schuetze wrote: On 05.07.2014 16:05, ParticlePeter wrote: ... It is possible to remove the template methods from my classes, create free functions instead and use them in a UFCS way. Unfortunately I

Re: [dmd 2.066] Is scope with nothrow regression?

2014-07-06 Thread hane via Digitalmars-d-learn
On Sunday, 6 July 2014 at 12:31:42 UTC, NCrashed wrote: ``` void bar() { throw new Exception(); } void foo() nothrow { scope(failure) {} bar(); } void main() {} ``` Doesn't compile with 2.066: ``` source/app.d(9): Error: 'app.bar' is not nothrow source/app.d(6): Error:

Re: [dmd 2.066] Is scope with nothrow regression?

2014-07-06 Thread NCrashed via Digitalmars-d-learn
On Sunday, 6 July 2014 at 13:04:35 UTC, Marc Schütz wrote: On Sunday, 6 July 2014 at 12:31:42 UTC, NCrashed wrote: ``` void bar() { throw new Exception(); } void foo() nothrow { scope(failure) {} bar(); } void main() {} ``` Doesn't compile with 2.066: ```

Re: [dmd 2.066] Is scope with nothrow regression?

2014-07-06 Thread hane via Digitalmars-d-learn
On Sunday, 6 July 2014 at 22:03:21 UTC, hane wrote: On Sunday, 6 July 2014 at 12:31:42 UTC, NCrashed wrote: ``` void bar() { throw new Exception(); } void foo() nothrow { scope(failure) {} bar(); } void main() {} ``` Doesn't compile with 2.066: ``` source/app.d(9):

Re: recursive definition error

2014-07-06 Thread Frustrated via Digitalmars-d-learn
On Friday, 4 July 2014 at 21:15:02 UTC, Frustrated wrote: On Friday, 4 July 2014 at 20:25:28 UTC, Frustrated wrote: On Friday, 4 July 2014 at 16:31:28 UTC, Stanislav Blinov wrote: On Friday, 4 July 2014 at 16:28:48 UTC, Frustrated wrote: On Friday, 4 July 2014 at 15:42:36 UTC, bearophile

Re: recursive definition error

2014-07-06 Thread Frustrated via Digitalmars-d-learn
So, I took all the code surrounding the error message(which was a lot of code) and stuck it into one .d file. No errors! Works as expected. So, WTF?!?! I guess now I have to attempt to split the code across modules to see WTF is going on? Maybe this is a modules issue. I know some of the