Re: getting member functions of a struct and Error: identifier expected following ., not this

2018-01-22 Thread aliak via Digitalmars-d-learn
On Tuesday, 23 January 2018 at 00:00:38 UTC, aliak wrote: Hi, I'm trying to get a list of only member functions of a [...] Cheers And a follow up question: should I be using static foreach in there instead of a normal foreach? i.e. foreach (member; __traits(allMembers, T)) {{ // same

getting member functions of a struct and Error: identifier expected following ., not this

2018-01-22 Thread aliak via Digitalmars-d-learn
Hi, I'm trying to get a list of only member functions of a struct. I've found that if you do not declare a struct as static inside a scope, then there's a hidden "this" member as part of the struct. Can someone explain the logic there? Also am I going about this correctly? template

dub infinite loop

2018-01-22 Thread Arun Chandrasekaran via Digitalmars-d-learn
So dub gets into indefinite loop (let's not argue about infinite/indefinite). I've reported the issue a month back here http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/16888/ and recently here https://github.com/dlang/dub/issues/1345 Does anyone face the same issue? How

Re: [dlang library documentation] Why there are dlang.org/library and dlang.org/phobos?

2018-01-22 Thread John Gabriele via Digitalmars-d-learn
On Monday, 22 January 2018 at 15:32:29 UTC, Adam D. Ruppe wrote: On Monday, 22 January 2018 at 15:18:38 UTC, Johann wrote: Maybe it's due to historical reasons. It's actually "future" reasons... the /phobos is the original one, and /library was supposed to replace it, but now many years

Re: Get largest heap object at runtime? ...tracking the leak

2018-01-22 Thread thedeemon via Digitalmars-d-learn
On Monday, 22 January 2018 at 16:37:19 UTC, Andres Clari wrote: All threads withing a process share the same heap, so whatever one thread allocated in that heap is not freed or reclaimed automatically when thread dies, it stays in the heap. Well the destructor of some Json objects and strings

Re: [dlang library documentation] Why there are dlang.org/library and dlang.org/phobos?

2018-01-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 22 January 2018 at 16:08:38 UTC, Johann wrote: Not related to this thread, but is something missing from this page? Only "index" is shown on this page. No, that's just a random file. If something isn't linked from another page, it isn't supported... I have a lot of files in that

Re: Get largest heap object at runtime? ...tracking the leak

2018-01-22 Thread Andres Clari via Digitalmars-d-learn
On Monday, 22 January 2018 at 15:56:53 UTC, thedeemon wrote: On Monday, 22 January 2018 at 06:48:00 UTC, Andres Clari wrote: Not sure why "spawn" would leak like that tho. I would assume that once the thread exits, it would get destroyed and it's resources reclaimed, specially when I have

Re: [dlang library documentation] Why there are dlang.org/library and dlang.org/phobos?

2018-01-22 Thread Johann via Digitalmars-d-learn
On Monday, 22 January 2018 at 15:32:29 UTC, Adam D. Ruppe wrote: http://dpldocs.info/writef Thanks for your good work. I will file a bug report then. Not related to this thread, but is something missing from this page? Only "index" is shown on this page.

Re: Get largest heap object at runtime? ...tracking the leak

2018-01-22 Thread thedeemon via Digitalmars-d-learn
On Monday, 22 January 2018 at 06:48:00 UTC, Andres Clari wrote: Not sure why "spawn" would leak like that tho. I would assume that once the thread exits, it would get destroyed and it's resources reclaimed, specially when I have calls to "GC.collect and GC.minimize". All threads withing a

Re: [dlang library documentation] Why there are dlang.org/library and dlang.org/phobos?

2018-01-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 22 January 2018 at 15:18:38 UTC, Johann wrote: Maybe it's due to historical reasons. It's actually "future" reasons... the /phobos is the original one, and /library was supposed to replace it, but now many years later, /library is still kinda neglected and they both just exist.

[dlang library documentation] Why there are dlang.org/library and dlang.org/phobos?

2018-01-22 Thread Johann via Digitalmars-d-learn
It seems that std library documentation lives in two different directories. https://dlang.org/phobos/ https://dlang.org/library/ Maybe it's due to historical reasons. Problem is, when I search for a library function in Google, sometimes it points me to library directory, and sometimes it