Re: colour lib

2016-08-31 Thread Andrea Fontana via Digitalmars-d
On Wednesday, 31 August 2016 at 06:17:15 UTC, Manu wrote: On 31 August 2016 at 16:01, Chris Wright via Digitalmars-d wrote: The color models I'm aware of are HSV, HSL, RGB[A], CMYK, Lab, Pantone, and the Open Colour Standard. I'll initially support, XYZ/xyY, RGB (which is a gigantic set), HS

Re: colour lib

2016-08-31 Thread Andrea Fontana via Digitalmars-d
On Wednesday, 31 August 2016 at 07:58:36 UTC, Andrea Fontana wrote: I always think the perfect colour library should work using a superset of all colour spaces, for example cie xyz (is it a superset, isn't it?). isColour(T) then IMO should check if x,y,z properties exists (or toXYZ() method).

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Basile B. via Digitalmars-d
On Tuesday, 30 August 2016 at 22:46:58 UTC, Basile B. wrote: On Tuesday, 30 August 2016 at 22:24:12 UTC, Ali Çehreli wrote: v2.071.2-b3 is bringing a change for this bug: Yes I agree, a change of the specifications in a dot release seems a bit extreme, especially since there was a deeper pr

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Ethan Watson via Digitalmars-d
On Wednesday, 31 August 2016 at 08:06:05 UTC, Basile B. wrote: allow them to see everything, then use "getProtection" if you wanna be conform with the protection attributes. That's how it used to work, but getProtection would fail if the symbol wasn't public. Which led to me using a workaround

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Ethan Watson via Digitalmars-d
On Tuesday, 30 August 2016 at 22:24:12 UTC, Ali Çehreli wrote: I don't agree with the current solution: I'm somewhat surprised myself that "allMembers doesn't return all members" needs highlighting. Why not have a new trait "allVisibleMembers" and just fix the privacy issues?

Re: Why D is not popular enough?

2016-08-31 Thread Seb via Digitalmars-d
On Wednesday, 31 August 2016 at 04:03:32 UTC, Walter Bright wrote: On 8/30/2016 6:30 PM, ZombineDev wrote: Your change just went live http://tour.dlang.org ;) Thanks! Note that the other languages need updating, too. Done (FYI the translations aren't officially published yet) ;-)

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Basile B. via Digitalmars-d
On Wednesday, 31 August 2016 at 08:36:37 UTC, Ethan Watson wrote: On Tuesday, 30 August 2016 at 22:24:12 UTC, Ali Çehreli wrote: I don't agree with the current solution: I'm somewhat surprised myself that "allMembers doesn't return all members" needs highlighting. Why not have a new trait "

Re: colour lib

2016-08-31 Thread Manu via Digitalmars-d
On 31 August 2016 at 17:58, Andrea Fontana via Digitalmars-d wrote: > On Wednesday, 31 August 2016 at 06:17:15 UTC, Manu wrote: >> >> On 31 August 2016 at 16:01, Chris Wright via Digitalmars-d >> wrote: >>> >>> The color models I'm aware of are HSV, HSL, RGB[A], CMYK, Lab, Pantone, >>> and the Op

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Ethan Watson via Digitalmars-d
On Wednesday, 31 August 2016 at 09:25:52 UTC, Basile B. wrote: nice idea, but this doesn't change the fact that the traits that access the results of the "omniscient" allMember must be tweaked to access everything. I'm okay with this. My PrivacyLevel workaround does exactly this in fact. Bu

Re: colour lib

2016-08-31 Thread Manu via Digitalmars-d
On 31 August 2016 at 18:04, Andrea Fontana via Digitalmars-d wrote: > On Wednesday, 31 August 2016 at 07:58:36 UTC, Andrea Fontana wrote: > > I forgot that in this way it's quite easy to wrap external class/struct to > make them works with library. If we have a custom COLOR class provided by > ano

Re: colour lib

2016-08-31 Thread Andrea Fontana via Digitalmars-d
On Wednesday, 31 August 2016 at 09:33:24 UTC, Manu wrote: On 31 August 2016 at 17:58, Andrea Fontana via Digitalmars-d wrote: On Wednesday, 31 August 2016 at 06:17:15 UTC, Manu wrote: On 31 August 2016 at 16:01, Chris Wright via Digitalmars-d wrote: The color models I'm aware of are HSV,

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Ethan Watson via Digitalmars-d
On Wednesday, 31 August 2016 at 09:30:43 UTC, Ethan Watson wrote: I'm okay with this. My PrivacyLevel workaround does exactly this in fact. I keep forgetting that I'm all open sourced now and can just link directly to the full example. https://github.com/Remedy-Entertainment/binderoo/blob/ma

Re: colour lib

2016-08-31 Thread Ethan Watson via Digitalmars-d
On Wednesday, 31 August 2016 at 09:37:41 UTC, Andrea Fontana wrote: So maybe I miss (more than) something reading source code. You should write a readme to explain how it works :) I can probably chip in and help here at some point (both with documentation and ensuring the API is intuitive).

Re: Low level unit test library in druntime

2016-08-31 Thread Atila Neves via Digitalmars-d
On Tuesday, 30 August 2016 at 16:31:56 UTC, Dicebot wrote: On 08/30/2016 07:17 PM, Jacob Carlborg wrote: The reason to put in the druntime is because that's where the existing runner is located. The advantage of this low level library is that: * Third party unit test library don't need to rei

Re: Low level unit test library in druntime

2016-08-31 Thread Atila Neves via Digitalmars-d
On Tuesday, 30 August 2016 at 15:45:26 UTC, Andrei Alexandrescu wrote: On 08/30/2016 10:44 AM, Atila Neves wrote: I'd much rather have `assert` be magical or have AST macros to make the syntax for writing tests better than what it is now. Same here. BTW I'd like unittests that "must not compi

Re: Why D is not popular enough?

2016-08-31 Thread Chris via Digitalmars-d
On Tuesday, 30 August 2016 at 18:22:59 UTC, Walter Bright wrote: On 8/30/2016 3:42 AM, Chris wrote: [...] I agree it's time to remove comparisons with C++, although there is room for a "D for C++ Programmers" section and, of course, "Interfacing D to C++". I think this will do D good in th

Re: Low level unit test library in druntime

2016-08-31 Thread Marc Schütz via Digitalmars-d
On Tuesday, 30 August 2016 at 15:45:26 UTC, Andrei Alexandrescu wrote: On 08/30/2016 10:44 AM, Atila Neves wrote: I'd much rather have `assert` be magical or have AST macros to make the syntax for writing tests better than what it is now. Same here. BTW I'd like unittests that "must not compi

Re: DIP1000

2016-08-31 Thread Kagamin via Digitalmars-d
On Tuesday, 30 August 2016 at 16:12:19 UTC, Andrei Alexandrescu wrote: http://erdani.com/d/DIP1000.html Return values can't have `scope` annotation? If the container has trusted opAssign, use after free in this case is not accounted for?

Template visibility

2016-08-31 Thread Ethan Watson via Digitalmars-d
https://github.com/Remedy-Entertainment/binderoo/blob/master/binderoo_client/d/src/binderoo/typedescriptor.d Inside that is some code I have to translate D types to the C++ strings that we expect. I'm in the middle of making a mathematical vector class that I will be sticking in Binderoo, but

Re: Template visibility

2016-08-31 Thread Ethan Watson via Digitalmars-d
On Wednesday, 31 August 2016 at 12:45:14 UTC, Ethan Watson wrote: I do have other instances inside the Binderoo code where I resolve the module names for symbols and mixin an import for that to make it all just work, but I'm getting tired of having to do that every time I come across this probl

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Adam D. Ruppe via Digitalmars-d
Ugh, it really should just give everything and have getMember bypass it. That won't even break any code!

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 31 August 2016 at 08:33:28 UTC, Ethan Watson wrote: That's how it used to work, but getProtection would fail if the symbol wasn't public. Which led to me using a workaround to something of this effect: Yeah, I kinda regret the design of getProtection (which is basically 100% my

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Basile B. via Digitalmars-d
On Wednesday, 31 August 2016 at 13:12:30 UTC, Adam D. Ruppe wrote: Ugh, it really should just give everything and have getMember bypass it. That won't even break any code! you're right. "allMembers" means "all" after all. Another reason why the idea of "allVisibleMembers" is good. Puristes wil

So why was typedef bad?

2016-08-31 Thread Ethan Watson via Digitalmars-d
http://dlang.org/deprecate.html#typedef "typedef is not flexible enough to cover all use cases. This is better done with a library solution." [Citation needed] What use cases is it not flexible enough for? This is tangentially related to my other topic about template visibility, specificall

Re: Template visibility

2016-08-31 Thread David Nadlinger via Digitalmars-d
On Wednesday, 31 August 2016 at 12:45:14 UTC, Ethan Watson wrote: But in this case, because instantiation happens within the scope of the binderoo.typedescriptor module instead of within the scope of the module the template is invoking from, it just can't see my new CTypeNameOverride specialisa

Re: DIP1000

2016-08-31 Thread ZombineDev via Digitalmars-d
On Tuesday, 30 August 2016 at 16:12:19 UTC, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort to do DIP1000 rigorously. First we need to reduce D to a bare subset that only has integers, structs, pointers, and functions. That's a working subset of actual D code. The g

Re: So why was typedef bad?

2016-08-31 Thread Chris Wright via Digitalmars-d
On Wed, 31 Aug 2016 13:44:51 +, Ethan Watson wrote: > http://dlang.org/deprecate.html#typedef > > "typedef is not flexible enough to cover all use cases. This is better > done with a library solution." > > [Citation needed] > > What use cases is it not flexible enough for? Specifying the d

Re: colour lib

2016-08-31 Thread Chris Wright via Digitalmars-d
On Wed, 31 Aug 2016 19:33:24 +1000, Manu via Digitalmars-d wrote: > On 31 August 2016 at 17:58, Andrea Fontana via Digitalmars-d >> I always think the perfect colour library should work using a superset >> of all colour spaces, for example cie xyz (is it a superset, isn't >> it?). isColour(T) then

deepak

2016-08-31 Thread Deepak sharma via Digitalmars-d
Sharma

Re: So why was typedef bad?

2016-08-31 Thread Ethan Watson via Digitalmars-d
On Wednesday, 31 August 2016 at 14:05:16 UTC, Chris Wright wrote: Specifying the default value for the type. Alias has the same problem in this case. Making all typedefs from a base type implicitly convert to each other without warning unless you're careful, which should be a bug. Which so

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, August 30, 2016 15:24:12 Ali Çehreli via Digitalmars-d wrote: > v2.071.2-b3 is bringing a change for this bug: > >https://issues.dlang.org/show_bug.cgi?id=15907 > > I don't agree with the current solution: > >http://dlang.org/changelog/2.071.2.html#traits-members-visibility > >

Image of D code on Norwegian IT news site

2016-08-31 Thread simendsjo via Digitalmars-d
An article about how outsourcing reduces the need for Norwegian developers. No links to D other than the image on top though. I wonder what they searched for to find this image. http://www.digi.no/artikler/rader-norske-it-folk-til-a-droppe-programmering/279380

Re: Low level unit test library in druntime

2016-08-31 Thread Jacob Carlborg via Digitalmars-d
On 2016-08-31 12:06, Atila Neves wrote: Right now I think you're right and the compiler needs to know. But let me see what I can do about it with the language we have now. Or using AST macros :) -- /Jacob Carlborg

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-31 Thread Ali Çehreli via Digitalmars-d
On 08/30/2016 03:24 PM, Ali Çehreli wrote: > v2.071.2-b3 is bringing a change for this bug: > > https://issues.dlang.org/show_bug.cgi?id=15907 > > I don't agree with the current solution: > > http://dlang.org/changelog/2.071.2.html#traits-members-visibility > > Modules should be able to use li

Re: So why was typedef bad?

2016-08-31 Thread Ali Çehreli via Digitalmars-d
On 08/31/2016 06:44 AM, Ethan Watson wrote: > And it makes that member private. You > know what this means - if I try to parse over it for my serialisation > pass for Binderoo, I can't use __traits( allMembers ) to get to it. Hopefully, with enough whining we will have that behavior reversed. :)

You can call Fiber.yield() inside a vectored exception handler (win32)

2016-08-31 Thread Cauterite via Digitalmars-d
In case anyone was wondering, in 32-bit Windows you can call Fiber.yield() from inside a vectored exception handler, and subsequently resume the fibre again. As far as I can tell it works flawlessly. Here's a little example: --- extern(Windows) int on_exception_global(EXCEPTION_POINTERS* X)

Re: Why D is not popular enough?

2016-08-31 Thread Walter Bright via Digitalmars-d
On 8/31/2016 2:17 AM, Seb wrote: Done (FYI the translations aren't officially published yet) ;-) Danke schoen!

Re: dub test

2016-08-31 Thread Lurker via Digitalmars-d
On Wednesday, 24 August 2016 at 13:52:43 UTC, Andrei Alexandrescu wrote: // This will always be true assert(a >= 1 && a <= 5); assert(a >= 0.0 && a <= 10.0); Pretty sure you have a bug here :)

Fallback 'catch-all' template functions

2016-08-31 Thread Manu via Digitalmars-d
So, consider a set of overloads: void f(T)(T t) if(isSomething!T) {} void f(T)(T t) if(isSomethingElse!T) {} void f(T)(T t) {} I have a recurring problem where I need a fallback function like the bottom one, which should be used in lieu of a more precise match. This is obviously an ambiguou