Re: macOS Mojave compatiblity

2019-04-11 Thread Joel via Digitalmars-d-learn
On Thursday, 11 April 2019 at 23:22:19 UTC, Joel wrote: I've ordered a new computer, and it has Mojave OS. It's 64 bit only, so I'm wondering what difference would that make with things like with C bindings and stuff. For example would https://code.dlang.org/packages/dsfml and https://code.dl

Re: bug in compiles?

2019-04-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/11/19 6:45 PM, Alex wrote: On Thursday, 11 April 2019 at 19:42:05 UTC, Steven Schveighoffer wrote: On 4/11/19 2:13 PM, Alex wrote: The following code works when I comment out the static if //static if (__traits(compiles, __traits(getAttributes, T)))     static foreach(a;  __traits(getAttr

Re: bug in compiles?

2019-04-11 Thread Alex via Digitalmars-d-learn
On Friday, 12 April 2019 at 00:02:36 UTC, Seb wrote: On Thursday, 11 April 2019 at 23:55:18 UTC, Alex wrote: to judge people objectively. This isn't a nursery school and we are not 3 year olds... Exactly. So start behaving like a grown-up and professional. When you ask someone for help on th

Re: bug in compiles?

2019-04-11 Thread Seb via Digitalmars-d-learn
On Thursday, 11 April 2019 at 23:55:18 UTC, Alex wrote: to judge people objectively. This isn't a nursery school and we are not 3 year olds... Exactly. So start behaving like a grown-up and professional. When you ask someone for help on the street, do you curse at him too?

Re: bug in compiles?

2019-04-11 Thread Alex via Digitalmars-d-learn
On Thursday, 11 April 2019 at 23:04:46 UTC, Mike Parker wrote: On Thursday, 11 April 2019 at 22:41:32 UTC, Alex wrote: Seriously? Do you think you have ESP? Your code isn't even close to was talking about ;/ Here is is updated that shows the error. You seem to fail to understand that it is

macOS Mojave compatiblity

2019-04-11 Thread Joel via Digitalmars-d-learn
I've ordered a new computer, and it has Mojave OS. It's 64 bit only, so I'm wondering what difference would that make with things like with C bindings and stuff. For example would https://code.dlang.org/packages/dsfml and https://code.dlang.org/packages/dlangui librarys work?

Re: bug in compiles?

2019-04-11 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 11 April 2019 at 22:41:32 UTC, Alex wrote: Seriously? Do you think you have ESP? Your code isn't even close to was talking about ;/ Here is is updated that shows the error. You seem to fail to understand that it is impossible for it to be my code. If you continue to attack pe

Re: bug in compiles?

2019-04-11 Thread Alex via Digitalmars-d-learn
On Thursday, 11 April 2019 at 19:42:05 UTC, Steven Schveighoffer wrote: On 4/11/19 2:13 PM, Alex wrote: The following code works when I comment out the static if //static if (__traits(compiles, __traits(getAttributes, T)))    static foreach(a;  __traits(getAttributes, T)) Attributes ~= The

Re: bug in compiles?

2019-04-11 Thread Alex via Digitalmars-d-learn
On Thursday, 11 April 2019 at 20:49:45 UTC, bauss wrote: On Thursday, 11 April 2019 at 18:13:48 UTC, Alex wrote: The following code works when I comment out the static if //static if (__traits(compiles, __traits(getAttributes, T))) static foreach(a; __traits(getAttributes, T)) Attributes ~=

Re: bug in compiles?

2019-04-11 Thread bauss via Digitalmars-d-learn
On Thursday, 11 April 2019 at 18:13:48 UTC, Alex wrote: The following code works when I comment out the static if //static if (__traits(compiles, __traits(getAttributes, T))) static foreach(a; __traits(getAttributes, T)) Attributes ~= There seems to be absolutely no reason why this code wo

Re: bug in compiles?

2019-04-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/11/19 2:13 PM, Alex wrote: The following code works when I comment out the static if //static if (__traits(compiles, __traits(getAttributes, T)))    static foreach(a;  __traits(getAttributes, T)) Attributes ~= There seems to be absolutely no reason why this code would fail with the stat

bug in compiles?

2019-04-11 Thread Alex via Digitalmars-d-learn
The following code works when I comment out the static if //static if (__traits(compiles, __traits(getAttributes, T))) static foreach(a; __traits(getAttributes, T)) Attributes ~= There seems to be absolutely no reason why this code would fail with the static if but pass without it but in t

Re: const of AliasSeq is silently ignored

2019-04-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/8/19 3:56 PM, Yuxuan Shui wrote: In this example:     const(AliasSeq!(int, int)) a;     pragma(msg, typeof(a)); // (int, int) This kind of make sense, since AliasSeq is not a "single" type. But silently dropping const seems bad, the compiler should probably report an error/warning in

Re: Cyclic dependency between module A and B

2019-04-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/10/19 2:52 PM, kdevel wrote: Recently (before refactoring) my application complained right after invocation:    object.Error@src/rt/minfo.d(371): Cyclic dependency between module Filebrowser and App    Filebrowser* ->    App* ->    Filebrowser* Is it possible to detect this dependen

DUB conditional subPackage possible?

2019-04-11 Thread wjoe via Digitalmars-d-learn
I want to include subPackages depending either on the presence of command line options, or the availability of dependencies; think Gentoo USE flags. As far as I can tell it's not possible to specify configurations in a modular way, e.g. dub --config=withGUI --config=supportGTK --config=sup

Re: how to define infix function

2019-04-11 Thread KnightMare via Digitalmars-d-learn
u can use infix function with 1arg without any parentheses. UPD with 2args arg1 `infix func` arg2 latter I told about UFCS with 1arg `UFCS func` arg1

Re: how to define infix function

2019-04-11 Thread KnightMare via Digitalmars-d-learn
On Saturday, 2 June 2018 at 22:01:02 UTC, Ali Çehreli wrote: On 06/02/2018 02:44 PM, greatsam4sure wrote: > is it possible to define infix function in D > 3.min(5)// 3: where min is a function, works in D > 3 min 5 // does not work. This is called universal function call syntax (UFCS) in D. Ali

Re: D threading and shared variables

2019-04-11 Thread Kagamin via Digitalmars-d-learn
Well, if the code is too complex to debug, the usual solution is to try simpler code and see if it works.

Re: Efficient enum array keys?

2019-04-11 Thread Basile B. via Digitalmars-d-learn
On Thursday, 11 April 2019 at 07:56:42 UTC, Julian wrote: On Thursday, 11 April 2019 at 06:45:23 UTC, Basile B. wrote: On Thursday, 11 April 2019 at 06:20:05 UTC, Julian wrote: I don't see a difference in micro-benchmarks. *shrug* Your enum is int so in machine code it's exactly like processi

Re: Efficient enum array keys?

2019-04-11 Thread Julian via Digitalmars-d-learn
On Thursday, 11 April 2019 at 06:45:23 UTC, Basile B. wrote: On Thursday, 11 April 2019 at 06:20:05 UTC, Julian wrote: Is there a nicer way to have enum array keys in D? No. I've myself written my own EnumIndexedArray [1] type. It's pretty simple. Just a couple of operator overload to preovid

Re: DCD 0 symbols cached?

2019-04-11 Thread Laurent Tréguier via Digitalmars-d-learn
On Wednesday, 10 April 2019 at 18:39:23 UTC, Tom wrote: Total newbie to D, trying to get it to play nice with Neovim using ncm2-d and DCD. Issue: DCD never caches any symbols even when I point it directly to DMD's include files. Hate to ask for tech support on this forum but it's all I've g