Re: Error: constructor Foo.this default constructor for structs only allowed with @disable, no body, and no parameters

2016-03-07 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 7 March 2016 at 13:23:58 UTC, Nicholas Wilson wrote: struct Fence { VkFence fence; alias fence this; static struct CreateInfo { VkFenceCreateInfo ci; alias ci this; this( )

Re: Speed up `dub`.

2016-03-07 Thread Luis via Digitalmars-d-learn
On Monday, 7 March 2016 at 18:58:55 UTC, ciechowoj wrote: dub --version DUB version 0.9.24+161-gb9ce700, built on Feb 23 2016 `dub.json` is `dub.json` of dstep `dub test --skip-registry=all` Do not helps. I try to grab dstep with dub fetch step (dub version 0.9.24, built on Aug 19 2015, on

Re: Speed up `dub`.

2016-03-07 Thread Seb via Digitalmars-d-learn
On Monday, 7 March 2016 at 09:18:37 UTC, ciechowoj wrote: I'm using `dub` to build project. And every time I run `dub` it seems to check if dependencies are up to date, which takes some time. Is there a way to switch of that checking? Or any other way to speed up building process? It really

Re: Speed up `dub`.

2016-03-07 Thread xcvn via Digitalmars-d-learn
On Monday, 7 March 2016 at 19:58:19 UTC, WebFreak001 wrote: On Monday, 7 March 2016 at 18:58:55 UTC, ciechowoj wrote: dub --version DUB version 0.9.24+161-gb9ce700, built on Feb 23 2016 `dub.json` is `dub.json` of dstep `dub test --skip-registry=all` Do not helps. Its because of dub going

Re: Speed up `dub`.

2016-03-07 Thread WebFreak001 via Digitalmars-d-learn
On Monday, 7 March 2016 at 18:58:55 UTC, ciechowoj wrote: dub --version DUB version 0.9.24+161-gb9ce700, built on Feb 23 2016 `dub.json` is `dub.json` of dstep `dub test --skip-registry=all` Do not helps. Its because of dub going through all those JSON files. For example just querying the

Re: Speed up `dub`.

2016-03-07 Thread Daniel Kozak via Digitalmars-d-learn
I would say dub is broken and should be fixed. Even dub run is really slow and try to build everything. So please report a bug: https://github.com/D-Programming-Language/dub/issues Dne 7.3.2016 v 19:58 ciechowoj via Digitalmars-d-learn napsal(a): dub --version DUB version 0.9.24+161-gb9ce700,

Re: Speed up `dub`.

2016-03-07 Thread ciechowoj via Digitalmars-d-learn
dub --version DUB version 0.9.24+161-gb9ce700, built on Feb 23 2016 `dub.json` is `dub.json` of dstep `dub test --skip-registry=all` Do not helps.

Re: Const vs Non const method

2016-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 7 March 2016 at 18:44:01 UTC, Namespace wrote: Honestly speaking, I think this case is impossible to solve in C++. I'll show my fellow students the advantages of D over C++ in next couple of weeks, and this example is pretty good. :) :-) Good luck!

Re: Const vs Non const method

2016-03-07 Thread Namespace via Digitalmars-d-learn
On Monday, 7 March 2016 at 18:17:18 UTC, Ola Fosheim Grøstad wrote: On Monday, 7 March 2016 at 16:30:48 UTC, Namespace wrote: Thanks to the wildcard modifier inout. Is there any possible way to do the same in C++? In this specific case you could do it with a macro if you don't mind dirty

Re: Const vs Non const method

2016-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 7 March 2016 at 16:30:48 UTC, Namespace wrote: Thanks to the wildcard modifier inout. Is there any possible way to do the same in C++? In this specific case you could do it with a macro if you don't mind dirty macros, but you really should implement the const version explicitly or

Re: Const vs Non const method

2016-03-07 Thread Namespace via Digitalmars-d-learn
Let's use an example: import std.stdio; class Visitor { public: void visit(inout A) { writeln("visit A"); } void visit(inout B) { writeln("visit B"); } } class A { public: void accept(Visitor v) inout { v.visit(this); } } class B : A {

Re: Is it safe to use 'is' to compare types?

2016-03-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/4/16 4:30 PM, Yuxuan Shui wrote: On Friday, 4 March 2016 at 15:18:55 UTC, Steven Schveighoffer wrote: On 3/3/16 6:58 PM, Yuxuan Shui wrote: On Thursday, 3 March 2016 at 23:51:16 UTC, Adam D. Ruppe wrote: On Thursday, 3 March 2016 at 23:46:50 UTC, Yuxuan Shui wrote: Will typeid(a) is

Re: Speed up `dub`.

2016-03-07 Thread Martin Tschierschke via Digitalmars-d-learn
On Monday, 7 March 2016 at 09:18:37 UTC, ciechowoj wrote: I'm using `dub` to build project. And every time I run `dub` it seems to check if dependencies are up to date, which takes some time. Is there a way to switch of that checking? Or any other way to speed up building process? It really

Re: Error: constructor Foo.this default constructor for structs only allowed with @disable, no body, and no parameters

2016-03-07 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 7 March 2016 at 13:23:58 UTC, Nicholas Wilson wrote: I'm not quite sure what this error is saying. Is it that the only struct constructor that can have no parameters is @disable this(){} ? Yes, this is exactly right. You cannot have a structure with a default constructor, except

Error: constructor Foo.this default constructor for structs only allowed with @disable, no body, and no parameters

2016-03-07 Thread Nicholas Wilson via Digitalmars-d-learn
struct Fence { VkFence fence; alias fence this; static struct CreateInfo { VkFenceCreateInfo ci; alias ci this; this( ) { ci = typeof(ci)(

Re: Determine decimal separator (comma vs point)

2016-03-07 Thread Andre via Digitalmars-d-learn
On Monday, 7 March 2016 at 12:29:39 UTC, Andre wrote: Hi, I execute an external application and get some decimal numbers: auto p = execute(["curl", "-o", "/dev/null", "-s", "-w",

Re: Speed up `dub`.

2016-03-07 Thread Luis via Digitalmars-d-learn
On Monday, 7 March 2016 at 09:18:37 UTC, ciechowoj wrote: I'm using `dub` to build project. And every time I run `dub` it seems to check if dependencies are up to date, which takes some time. Is there a way to switch of that checking? Or any other way to speed up building process? It really

Determine decimal separator (comma vs point)

2016-03-07 Thread Andre via Digitalmars-d-learn
Hi, I execute an external application and get some decimal numbers: auto p = execute(["curl", "-o", "/dev/null", "-s", "-w", "%{time_namelookup}:%{time_appconnect}:%{time_redirect}:%{time_starttransfer}:%{time_pretransfer}:%{time_connect}:%{time_total}", url]);

Re: Const vs Non const method

2016-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 7 March 2016 at 10:52:53 UTC, Ola Fosheim Grøstad wrote: On Sunday, 6 March 2016 at 17:53:47 UTC, Namespace wrote: What would be the C++ way? Is there any comfortable way to solve this problem in a nice way like D? C++ has a non-idiomatic language culture. There are many ways to

Re: Const vs Non const method

2016-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 6 March 2016 at 17:53:47 UTC, Namespace wrote: What would be the C++ way? Is there any comfortable way to solve this problem in a nice way like D? C++ has a non-idiomatic language culture. There are many ways to do it. One clean way could be to use a templated method, another way

Re: Speed up `dub`.

2016-03-07 Thread ciechowoj via Digitalmars-d-learn
On Monday, 7 March 2016 at 09:22:16 UTC, Daniel Kozak wrote: maybe: dub build --nodeps Dne 7.3.2016 v 10:18 ciechowoj via Digitalmars-d-learn napsal(a): I'm using `dub` to build project. And every time I run `dub` it seems to check if dependencies are up to date, which takes some time. Is

Re: Speed up `dub`.

2016-03-07 Thread Daniel Kozak via Digitalmars-d-learn
maybe: dub build --nodeps Dne 7.3.2016 v 10:18 ciechowoj via Digitalmars-d-learn napsal(a): I'm using `dub` to build project. And every time I run `dub` it seems to check if dependencies are up to date, which takes some time. Is there a way to switch of that checking? Or any other way to speed

Speed up `dub`.

2016-03-07 Thread ciechowoj via Digitalmars-d-learn
I'm using `dub` to build project. And every time I run `dub` it seems to check if dependencies are up to date, which takes some time. Is there a way to switch of that checking? Or any other way to speed up building process? It really slows down my modify-compile-check iteration time.

Re: Create Windows "shortcut" (.lnk) with D?

2016-03-07 Thread Andrea Fontana via Digitalmars-d-learn
On Sunday, 6 March 2016 at 20:13:39 UTC, 岩倉 澪 wrote: On Sunday, 6 March 2016 at 11:00:35 UTC, John wrote: On Sunday, 6 March 2016 at 03:13:23 UTC, 岩倉 澪 wrote: IShellLinkA* shellLink; IPersistFile* linkFile; Any help would be highly appreciated as I'm new to Windows programming in D