Re: Is there a way to disable 'dub test' for applications?

2016-04-17 Thread Jon D via Digitalmars-d-learn
On Monday, 18 April 2016 at 05:30:21 UTC, Jonathan M Davis wrote: On Monday, April 18, 2016 04:25:25 Jon D via Digitalmars-d-learn wrote: I have an dub config file specifying a targetType of 'executable'. There is only one file, the file containing main(), and no unit tests. When I run 'dub

Re: Is there a way to disable 'dub test' for applications?

2016-04-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, April 18, 2016 04:25:25 Jon D via Digitalmars-d-learn wrote: > I have an dub config file specifying a targetType of > 'executable'. There is only one file, the file containing main(), > and no unit tests. > > When I run 'dub test', dub builds and runs the executable. This > is not

Re: Which application is much suited and which is not.

2016-04-17 Thread Ali Çehreli via Digitalmars-d-learn
On 04/17/2016 02:33 AM, Suliman wrote: Could you write article about D for Csharp programmers? About D benefits While waiting for that document: :) http://dconf.org/2013/talks/wilson.html Ali

Is there a way to disable 'dub test' for applications?

2016-04-17 Thread Jon D via Digitalmars-d-learn
I have an dub config file specifying a targetType of 'executable'. There is only one file, the file containing main(), and no unit tests. When I run 'dub test', dub builds and runs the executable. This is not really desirable. Is there a way to set up the dub configuration file to disable

Re: Anonymous structure

2016-04-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 18 April 2016 at 03:57:26 UTC, Tofu Ninja wrote: x,y,and z seem to all be immutable and all have the UDA testUDA. But even odder, it seems that "struct" in there is doing absolutely nothing. The same thing can be done with Yeah, any attribute can be grouped with braces or colons

Re: Anonymous structure

2016-04-17 Thread Tofu Ninja via Digitalmars-d-learn
On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote: The struct inside union is the main pure-language use case I know of though. Actually curiously I found another potential use, applying attributes/UDAs to multiple members at once. enum testUDA; struct T{ @testUDA

Re: Anonymous structure

2016-04-17 Thread Tofu Ninja via Digitalmars-d-learn
On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote: The struct inside union is the main pure-language use case I know of though. I understand the reason for allowing it in a union, I just don't see the reason it was extended to all aggregates as it seems to do nothing.

Re: Anonymous structure

2016-04-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 18 April 2016 at 02:42:15 UTC, Nicholas Wilson wrote: IIRC D doesn't allow anonymous structures. They are allowed only if they are inside another aggregate.

Re: Anonymous structure

2016-04-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 18 April 2016 at 02:12:24 UTC, Tofu Ninja wrote: Just out of curiosity, what is the point of the following? struct a{ struct{ int x; int y; int z; } } The grouping matters when it is nested inside a union. Here's a

Re: Anonymous structure

2016-04-17 Thread Tofu Ninja via Digitalmars-d-learn
On Monday, 18 April 2016 at 02:42:15 UTC, Nicholas Wilson wrote: On Monday, 18 April 2016 at 02:12:24 UTC, Tofu Ninja wrote: Just out of curiosity, what is the point of the following? struct a{ struct{ int x; int y; int z; } } As

Re: Anonymous structure

2016-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 18 April 2016 at 02:12:24 UTC, Tofu Ninja wrote: Just out of curiosity, what is the point of the following? struct a{ struct{ int x; int y; int z; } } As far as I can tell, the anonymous structure does nothing. How is

Anonymous structure

2016-04-17 Thread Tofu Ninja via Digitalmars-d-learn
Just out of curiosity, what is the point of the following? struct a{ struct{ int x; int y; int z; } } As far as I can tell, the anonymous structure does nothing. How is it different from struct a{ int x; int y;

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 17 April 2016 at 13:56:38 UTC, Jonathan M Davis wrote: Perhaps, but be aware that Walter Bright thinks that size_t should stay as-is: http://forum.dlang.org/post/nevrsb$2ge1$1...@digitalmars.com Maybe some sort of general change to how aliases work would be acceptable and would

Specifying a minimum Phobos version in dub?

2016-04-17 Thread Jon D via Digitalmars-d-learn
Is there a way to specify a minimum Phobos version in a dub package specification? --Jon

Re: .opAssign disabled without @disable

2016-04-17 Thread ag0aep6g via Digitalmars-d-learn
On 17.04.2016 13:00, denizzzka wrote: So, my problem is solved. But nevertheless maybe here is a problem in the compiler too. I've reduced the test case and filed an issue: https://issues.dlang.org/show_bug.cgi?id=15936

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, April 17, 2016 12:07:45 Nicholas Wilson via Digitalmars-d-learn wrote: > On Sunday, 17 April 2016 at 11:47:52 UTC, Jonathan M Davis wrote: > > On Sunday, April 17, 2016 11:00:15 Nicholas Wilson via > > > > Digitalmars-d-learn wrote: > >> On Sunday, 17 April 2016 at 10:48:08 UTC,

Re: Accessing __FILE__ and __LINE__ of caller in combination with varargs?

2016-04-17 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 16 April 2016 at 12:37:46 UTC, Simen Kjaeraas wrote: On Saturday, 16 April 2016 at 00:03:59 UTC, Jonathan M Davis wrote: On Friday, April 15, 2016 20:52:42 WebFreak001 via Digitalmars-d-learn wrote: void assertf(string file = __FILE__, size_t line = __LINE__, Args...)(lazy bool

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Anonymouse via Digitalmars-d-learn
On Sunday, 17 April 2016 at 10:27:10 UTC, Nicholas Wilson wrote: On Sunday, 17 April 2016 at 10:22:00 UTC, Anonymouse wrote: On Sunday, 17 April 2016 at 10:12:29 UTC, Nicholas Wilson wrote: So currently there is a loss of information when Parameters Fields and Return type. i.e. assuming 64

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 17 April 2016 at 11:47:52 UTC, Jonathan M Davis wrote: On Sunday, April 17, 2016 11:00:15 Nicholas Wilson via Digitalmars-d-learn wrote: On Sunday, 17 April 2016 at 10:48:08 UTC, Jonathan M Davis wrote: > [...] Sorry for the confusion, I didn't. getting the string "size_t" as the

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, April 17, 2016 11:00:15 Nicholas Wilson via Digitalmars-d-learn wrote: > On Sunday, 17 April 2016 at 10:48:08 UTC, Jonathan M Davis wrote: > > On Sunday, April 17, 2016 10:12:29 Nicholas Wilson via > > > > Digitalmars-d-learn wrote: > >> [...] > > > > I'm actually surprised that you

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 17 April 2016 at 10:48:08 UTC, Jonathan M Davis wrote: On Sunday, April 17, 2016 10:12:29 Nicholas Wilson via Digitalmars-d-learn wrote: [...] I'm actually surprised that you got the compiler to give you size_t in any form. size_t is simply an alias to either ulong (on 64-bit

Re: .opAssign disabled without @disable

2016-04-17 Thread denizzzka via Digitalmars-d-learn
As Alex Parrill says, on problem was in const member. But this is one of the problems, and after fix here still was an error. But alphaglosined found another problem! For some unknown reason here it is need to specify an empty postblit constructor. Full patch:

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, April 17, 2016 10:12:29 Nicholas Wilson via Digitalmars-d-learn wrote: > So currently there is a loss of information when Parameters > Fields and Return type. > i.e. assuming 64 bits > size_t foo(ptrdiff_t) {}; > > writeln(ReturnType!foo); // prints ulong > > Is there any way to get

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 17 April 2016 at 10:22:00 UTC, Anonymouse wrote: On Sunday, 17 April 2016 at 10:12:29 UTC, Nicholas Wilson wrote: So currently there is a loss of information when Parameters Fields and Return type. i.e. assuming 64 bits size_t foo(ptrdiff_t) {}; writeln(ReturnType!foo); // prints

Re: Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Anonymouse via Digitalmars-d-learn
On Sunday, 17 April 2016 at 10:12:29 UTC, Nicholas Wilson wrote: So currently there is a loss of information when Parameters Fields and Return type. i.e. assuming 64 bits size_t foo(ptrdiff_t) {}; writeln(ReturnType!foo); // prints ulong Is there any way to get the types as (tuples of)

Dealing with type information loss in Parameters Fields and Return type

2016-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
So currently there is a loss of information when Parameters Fields and Return type. i.e. assuming 64 bits size_t foo(ptrdiff_t) {}; writeln(ReturnType!foo); // prints ulong Is there any way to get the types as (tuples of) strings of the the types as they are in the source file? auto foos =

Re: Which application is much suited and which is not.

2016-04-17 Thread Suliman via Digitalmars-d-learn
On Saturday, 16 April 2016 at 18:13:57 UTC, Bauss wrote: On Saturday, 16 April 2016 at 14:08:05 UTC, newB wrote: Let's say you have decided to use D programming language. For what kind of applications would you choose D programming language and For what kind of applications you won't

Re: .opAssign disabled without @disable

2016-04-17 Thread denizzzka via Digitalmars-d-learn
On Sunday, 17 April 2016 at 06:42:39 UTC, denizzzka wrote: Tried to build small test app - is not reproduced. Also tried to reduce source: https://github.com/denizzzka/r-tree/tree/314f7f1cc1b6387915dc56dcb2d3ccbc63e19275/source In this source line 199 causes this error

Re: .opAssign disabled without @disable

2016-04-17 Thread denizzzka via Digitalmars-d-learn
Tried to build small test app - is not reproduced.