Re: It makes me sick!

2017-07-26 Thread Ali Çehreli via Digitalmars-d-learn
On 07/26/2017 09:20 PM, FoxyBrown wrote: >> Somebody else had the same problem which they solved by removing >> "entire dmd": >> >> http://forum.dlang.org/thread/ejybuwermnentslcy...@forum.dlang.org >> >> Ali > > Thanks, that was it. So I guess I have to delete the original dmd2 dir > before I

Re: It makes me sick!

2017-07-26 Thread FoxyBrown via Digitalmars-d-learn
On Thursday, 27 July 2017 at 03:41:06 UTC, Ali Çehreli wrote: On 07/26/2017 08:34 PM, FoxyBrown wrote: Knowing that every time I upgrade to the latest "official" D compiler I run in to trouble: Win32\Debug DMD\test.obj(test) Error 42: Symbol Undefined _D3std8datetime7SysTime8toStringMxFNbN

Re: It makes me sick!

2017-07-26 Thread Ali Çehreli via Digitalmars-d-learn
On 07/26/2017 08:34 PM, FoxyBrown wrote: Knowing that every time I upgrade to the latest "official" D compiler I run in to trouble: Win32\Debug DMD\test.obj(test) Error 42: Symbol Undefined _D3std8datetime7SysTime8toStringMxFNbNfZAya (const(nothrow @safe immutable(char)[] function()) std.date

Re: It makes me sick!

2017-07-26 Thread FoxyBrown via Digitalmars-d-learn
And yes, I'm using the correct phobos(the one that came with dmd2).

It makes me sick!

2017-07-26 Thread FoxyBrown via Digitalmars-d-learn
Knowing that every time I upgrade to the latest "official" D compiler I run in to trouble: Win32\Debug DMD\test.obj(test) Error 42: Symbol Undefined _D3std8datetime7SysTime8toStringMxFNbNfZAya (const(nothrow @safe immutable(char)[] function()) std.datetime.SysTime.toString) Win32\Debug DMD

DDox and filters.

2017-07-26 Thread Danni Coy via Digitalmars-d-learn
I am trying to build my projects documentation via the ddox system via dub. It seems that my modules are being documented and then filtered out. Ironically for a documentation system there isn't a lot of documentation. What is the minimum I need in order for documentation to show up? how do I cont

Re: I feel the dynamic array .sizeof property is kind of a bait and switch

2017-07-26 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 16:27:57 UTC, WhatMeWorry wrote: On Wednesday, 26 July 2017 at 02:31:33 UTC, Mike Parker wrote: With static arrays, the memory for the elements if part of the array itself, so it is counted in the size. For dynamic arrays, it is not. For .sizeof to report the size

Re: Why can't typeof() be used in member method?

2017-07-26 Thread Temtaime via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 19:06:24 UTC, Andre Pany wrote: On Wednesday, 26 July 2017 at 17:04:59 UTC, Adam D. Ruppe wrote: On Wednesday, 26 July 2017 at 16:50:35 UTC, Andre Pany wrote: [...] FYI, you shouldn't use .stringof here. Just use `T` instead of `T.stringof`. [...] Thank you

Re: Why can't typeof() be used in member method?

2017-07-26 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 17:04:59 UTC, Adam D. Ruppe wrote: On Wednesday, 26 July 2017 at 16:50:35 UTC, Andre Pany wrote: [...] FYI, you shouldn't use .stringof here. Just use `T` instead of `T.stringof`. [...] Thank you so much! Kind regards André

Re: Why structs and classes instanciations are made differently ?

2017-07-26 Thread Ali Çehreli via Digitalmars-d-learn
On 07/26/2017 02:54 AM, Houdini wrote: On Tuesday, 25 July 2017 at 17:16:00 UTC, Kagamin wrote: On Tuesday, 25 July 2017 at 15:56:45 UTC, Houdini wrote: Yes, but it isn't the default way in C++ to do dynamic instanciation. https://github.com/isocpp/CppCoreGuidelines this? It's only 2 years ol

Re: Why structs and classes instanciations are made differently ?

2017-07-26 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 24 July 2017 at 17:42:30 UTC, Steven Schveighoffer wrote: On 7/24/17 11:45 AM, Houdini wrote: On Monday, 24 July 2017 at 15:41:33 UTC, Steven Schveighoffer wrote: Because types with inheritance generally don't work right if you pass by value (i.e. the slicing problem). structs do

Re: I feel the dynamic array .sizeof property is kind of a bait and switch

2017-07-26 Thread WhatMeWorry via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 02:32:07 UTC, Adam D. Ruppe wrote: I've hand rolled a function which is working for me currently, but with my coding ability, I'd feel much safer with something official :) You could also do (cast(ubyte[]) array).length. This was my (way over complicated) att

Re: How to make autocompletion for IDE?

2017-07-26 Thread unDEFER via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 07:41:20 UTC, Andrea Fontana wrote: Did you try with [1]? [1] http://forum.dlang.org/post/okktlu$2bin$1...@digitalmars.com Thank you, interesting. But I'm afraid it is not enough.

Re: GtkD on android?

2017-07-26 Thread Mike Wey via Digitalmars-d-learn
On 25-07-17 20:06, Joakim wrote: On Saturday, 22 July 2017 at 18:59:44 UTC, FoxyBrown wrote: With LDC's new ability to do android/arm, we are missing the ability to do GUI's? Can any of the current D solutions work such as GtkD or QtD? I'm looking for something somewhat lightweight, easy to use

Re: Bug in File.byRecord ?

2017-07-26 Thread Ali Çehreli via Digitalmars-d-learn
On 07/26/2017 04:51 AM, closescreen wrote: > I have a file with empty lines: 2,3 and 5,6 > > filename.csv (with linenumbers for better view in this message) > 1>Joe,Carpenter,30 > 2> > 3> > 4>Fred,Blacksmith,40 > 5> > 6> > > Now, if I run: > rdmd > --eval='"filename.csv".File.byRecord!(st

Re: Why can't typeof() be used in member method?

2017-07-26 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 16:50:35 UTC, Andre Pany wrote: mixin(`static if (!__traits(compiles, typeof(`~T.stringof~`.`~p.name~`))) { ... } FYI, you shouldn't use .stringof here. Just use `T` instead of `T.stringof`. Creating new class for checking whether the class has a specific memb

Re: Why can't typeof() be used in member method?

2017-07-26 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 14:05:12 UTC, Adam D. Ruppe wrote: On Wednesday, 26 July 2017 at 13:51:05 UTC, Andre Pany wrote: How can I fix this issue? I would just do typeof((new TBounds).Left) m; so then it is clear that you want a non-static member. In my productive scenario I

Re: I feel the dynamic array .sizeof property is kind of a bait and switch

2017-07-26 Thread WhatMeWorry via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 02:31:33 UTC, Mike Parker wrote: On Wednesday, 26 July 2017 at 02:24:06 UTC, WhatMeForget wrote: [...] Because .sizeof has nothing to do with how many elements are in the array. It tells you how much space the array itself takes up. Totally agree. .length ret

Re: dub and hierarchies of packages

2017-07-26 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 14:05:09 UTC, Jean-Louis Leroy wrote: I have a package hierarchy (here https://github.com/jll63/openmethods.d/blob/master/dub.sdl) and I would like to 'dub run' or 'dub test' everything. Is there a recursive mode that I've missed? I don't think there is one. But

Re: Cast to subclass in the dmd compiler

2017-07-26 Thread unDEFER via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 06:50:21 UTC, Jacob Carlborg wrote: For Expression, there's a field called "op" that indicates what kind of expression it is, which can used in combination with a cast. Thank you for hint!

Re: Why can't typeof() be used in member method?

2017-07-26 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 13:51:05 UTC, Andre Pany wrote: How can I fix this issue? I would just do typeof((new TBounds).Left) m; so then it is clear that you want a non-static member.

dub and hierarchies of packages

2017-07-26 Thread Jean-Louis Leroy via Digitalmars-d-learn
Hi, I am quite happy with dub, the little package manager that could :) Now two questions or suggestions. I have a package hierarchy (here https://github.com/jll63/openmethods.d/blob/master/dub.sdl) and I would like to 'dub run' or 'dub test' everything. Is there a recursive mode that I've

Why can't typeof() be used in member method?

2017-07-26 Thread Andre Pany via Digitalmars-d-learn
Hi, I try to track down why some complex logic is not working. I think the root issue is that typeof() is not working in member methods. I reduced it to following example: app.d(16): Error: this for Left needs to be type TBounds not type app.A Failed: ["dmd", "-v", "-o-", "app.d", "-I."] c

Re: Get UDA of unit tests during Runtime.moduleUnitTester

2017-07-26 Thread Matthew Remmel via Digitalmars-d-learn
On Wednesday, 26 July 2017 at 06:47:20 UTC, Jacob Carlborg wrote: On 2017-07-26 05:27, Matthew Remmel wrote: [...] Unless you want to go with the approach Seb suggested, using unit-threaded, you need to recursively iterate the module to get all aggregates using __traits(allMembers) then use

Bug in File.byRecord ?

2017-07-26 Thread closescreen via Digitalmars-d-learn
I have a file with empty lines: 2,3 and 5,6 filename.csv (with linenumbers for better view in this message) 1>Joe,Carpenter,30 2> 3> 4>Fred,Blacksmith,40 5> 6> Now, if I run: rdmd --eval='"filename.csv".File.byRecord!(string,string,int)("%s,%s,%d").writeln' It prints: [Tuple!(string,

Re: Why structs and classes instanciations are made differently ?

2017-07-26 Thread Houdini via Digitalmars-d-learn
On Tuesday, 25 July 2017 at 17:16:00 UTC, Kagamin wrote: On Tuesday, 25 July 2017 at 15:56:45 UTC, Houdini wrote: Yes, but it isn't the default way in C++ to do dynamic instanciation. https://github.com/isocpp/CppCoreGuidelines this? It's only 2 years old. The new operator predates it by deca

Re: Crypto.lib and ssl.lib for Win32

2017-07-26 Thread MGW via Digitalmars-d-learn
On Tuesday, 25 July 2017 at 21:51:39 UTC, Adam D. Ruppe wrote: On Tuesday, 25 July 2017 at 12:11:08 UTC, MGW wrote: Where can I find the ready made for usage or how to create cryptro.lib and ssl.lib for Windows 32 that are necessary for my project? Do you have the crypto.dll and ssl.dll? If s

Re: How to make autocompletion for IDE?

2017-07-26 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 25 July 2017 at 10:45:38 UTC, unDEFER wrote: On Tuesday, 25 July 2017 at 10:35:14 UTC, Andrea Fontana wrote: If you want to add UFCS suggestions to DCD it would be useful for your project and all other IDEs too! Andrea Thank you, I will think. But if it was easy, authors self wo