Re: colour lib needs reviewers

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 09/16/2016 12:07 PM, Jacob Carlborg wrote: On 2016-09-16 16:39, Andrei Alexandrescu wrote: Jacob, would you want to try your hand at tweaking the defaults? They are in a string in https://github.com/dlang/dmd/blob/master/src/doc.d. Clearly there's agreement these can be improved, and it's

Re: colour lib needs reviewers

2016-09-16 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-16 16:39, Andrei Alexandrescu wrote: Jacob, would you want to try your hand at tweaking the defaults? They are in a string in https://github.com/dlang/dmd/blob/master/src/doc.d. Clearly there's agreement these can be improved, and it's incredibly more productive to just improve the

Re: colour lib needs reviewers

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 9/16/16 7:30 AM, Jacob Carlborg wrote: I don't see how that's relevant. Currently one needs to have knowledge of HTML and CSS because the default output is not usable. Jacob, would you want to try your hand at tweaking the defaults? They are in a string in

Re: colour lib needs reviewers

2016-09-16 Thread Johan Engelen via Digitalmars-d
On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. I don't know enough about colors and what people do with it to give you helpful feedback, but I was wondering if you had looked at the (auto

Re: colour lib needs reviewers

2016-09-16 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-16 02:02, Walter Bright wrote: The default styling was set up to produce legible output while not requiring any configuration file, nor a .css style file nor any knowledge of HTML at all. I don't see how that's relevant. Currently one needs to have knowledge of HTML and CSS

Re: colour lib needs reviewers

2016-09-16 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 20:55, Andrei Alexandrescu wrote: That's fine because "Returns" is special-cased. Random words at the beginning of a line followed by ":" should not receive special treatment. Ah, so you mean all non-standard non-special sections? Basically any section that is not listed in the

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2016 4:59 AM, Nemanja Boric wrote: On Thursday, 15 September 2016 at 09:45:26 UTC, Marco Leise wrote: Am Wed, 14 Sep 2016 23:44:16 -0700 schrieb Walter Bright : I suspect that adding Markdown would help a lot (yes, I changed my mind about that).

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2016 7:37 AM, Jacob Carlborg wrote: Yeah, if you already have defined all the standard ddoc macros because the default styling is not useful at all. The default styling was set up to produce legible output while not requiring any configuration file, nor a .css style file nor any

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
Started a new thread on this, "Ddoc macro syntax". Please direct further discussion there.

Re: colour lib needs reviewers

2016-09-15 Thread Bastiaan Veelo via Digitalmars-d
On Thursday, 15 September 2016 at 09:46:07 UTC, Patrick Schluter wrote: There are also some niceties like auto brief and autoreferencing (when a symbol is written in a text will be clickable if its body was reachable during generation of the doc). Not only that, by using tag files [1]

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 02:34 PM, Jacob Carlborg wrote: On 2016-09-15 14:54, Andrei Alexandrescu wrote: Yah, this is terrible (it happens with http: all the time). We need to suppress the special meaning of ":" to only the cases when it's preceded by only one word and followed by a newline, e,g,

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 16:45, Andrei Alexandrescu wrote: Glad to hear that. It becomes a matter of improving the default-provided macros and/or distribute some .ddoc batteries. Jacob, I'd also like to thank for the great constructive ideas for improving things and for formulating them as enhancement

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 14:54, Andrei Alexandrescu wrote: Yah, this is terrible (it happens with http: all the time). We need to suppress the special meaning of ":" to only the cases when it's preceded by only one word and followed by a newline, e,g, "\ncolor:\n". It's useful for many of the sections

Re: colour lib needs reviewers

2016-09-15 Thread Meta via Digitalmars-d
On Wednesday, 14 September 2016 at 20:14:48 UTC, Andrei Alexandrescu wrote: On 09/14/2016 09:47 AM, Meta wrote: On Wednesday, 14 September 2016 at 13:28:23 UTC, Manu wrote: Cheers. Yeah, I need to do better with ddoc. ... I'm just gonna go on the record and say that I am really, really not

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 11:25 AM, bachmeier wrote: On Thursday, 15 September 2016 at 00:42:57 UTC, Andrei Alexandrescu wrote: Do you mean like a macro $(VERBATIM ... text with balanced parens ...)? -- Andrei Yes. Unfortunately I cannot find any mention of it on this page:

Re: colour lib needs reviewers

2016-09-15 Thread bachmeier via Digitalmars-d
On Thursday, 15 September 2016 at 00:42:57 UTC, Andrei Alexandrescu wrote: Do you mean like a macro $(VERBATIM ... text with balanced parens ...)? -- Andrei Yes. Unfortunately I cannot find any mention of it on this page: http://dlang.org/spec/ddoc.html

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:37 AM, Jacob Carlborg wrote: Yeah, if you already have defined all the standard ddoc macros because the default styling is not useful at all. Glad to hear that. It becomes a matter of improving the default-provided macros and/or distribute some .ddoc batteries. Jacob, I'd

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 08:44, Walter Bright wrote: The original idea was to be able to write documentation without needing many macros, if any. Such as this I wrote recently: /** * Provides a safe interface to the Posix stat() function. * * Detailed description that I didn't write for this function,

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 02:55 AM, Jacob Carlborg wrote: On 2016-09-14 22:14, Andrei Alexandrescu wrote: Why? -- Andrei I've recently worked on a theme for Ddoc that will be used in TextMate. For convince I started by adding the CSS inline in the head tag. Turns out if you have CSS looking like this:

Re: colour lib needs reviewers

2016-09-15 Thread Nemanja Boric via Digitalmars-d
On Thursday, 15 September 2016 at 09:45:26 UTC, Marco Leise wrote: Am Wed, 14 Sep 2016 23:44:16 -0700 schrieb Walter Bright : I suspect that adding Markdown would help a lot (yes, I changed my mind about that). https://github.com/kiith-sa/harbored-mod provides

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 9/15/16 2:11 AM, Walter Bright wrote: On 9/14/2016 2:31 PM, Andrei Alexandrescu wrote: The resulting look is alien too, as opposed to the more familiar $MACRO(a1, a2, a3) or the CPP-style MACRO(a1, a2, a3). The $(MACRO a1, a2, a3) syntax comes from makefiles. In the words of Seinfeld,

Re: colour lib needs reviewers

2016-09-15 Thread Manu via Digitalmars-d
t;> >> It's slightly upsetting that this discussion about ddoc is more >> popular than the colour lib I spent months workinng on :( > > > Sorry. > > Is it the "ddoc latex/formulas?" topic? That's the only recent topic by you > related to ddoc. But I have no interest in

Re: colour lib needs reviewers

2016-09-15 Thread Patrick Schluter via Digitalmars-d
On Thursday, 15 September 2016 at 03:49:55 UTC, Andrei Alexandrescu wrote: On 9/14/16 9:28 PM, Manu via Digitalmars-d wrote: Like, I really just don't care enough to try and understand ddoc sufficiently to have a bag of tricks like those you demonstrated above to workaround these issues. It's

Re: colour lib needs reviewers

2016-09-15 Thread Marco Leise via Digitalmars-d
Am Wed, 14 Sep 2016 23:44:16 -0700 schrieb Walter Bright : > I suspect that adding Markdown would help a lot (yes, I changed my mind about > that). +1 -- Marco

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 09:11, Manu via Digitalmars-d wrote: Do we mind moving this discussion to the other topic I started actually on this topic? It's slightly upsetting that this discussion about ddoc is more popular than the colour lib I spent months workinng on :( Sorry. Is it the "ddoc

Re: colour lib needs reviewers

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 17:38, Walter Bright via Digitalmars-d wrote: > On 9/15/2016 12:06 AM, Manu via Digitalmars-d wrote: >> >> I think I have a sense of uneasy-ness that comes from my intuition >> that macros are macros, and I don't know which ones are 'special',

Re: colour lib needs reviewers

2016-09-15 Thread Paolo Invernizzi via Digitalmars-d
On Thursday, 15 September 2016 at 06:44:16 UTC, Walter Bright wrote: On 9/14/2016 11:11 PM, Walter Bright wrote: I suspect that adding Markdown would help a lot (yes, I changed my mind about that). Also auto-detecting email addresses and urls and turning them into clickable links would help.

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2016 12:06 AM, Manu via Digitalmars-d wrote: I think I have a sense of uneasy-ness that comes from my intuition that macros are macros, and I don't know which ones are 'special', or which are just macros. That's easy, they are all just macros, and can all be redefined.

Re: colour lib needs reviewers

2016-09-15 Thread Manu via Digitalmars-d
Do we mind moving this discussion to the other topic I started actually on this topic? It's slightly upsetting that this discussion about ddoc is more popular than the colour lib I spent months workinng on :( On 15 September 2016 at 16:55, Jacob Carlborg via Digitalmars-d <digitalmar

Re: colour lib needs reviewers

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 16:44, Walter Bright via Digitalmars-d wrote: > On 9/14/2016 11:11 PM, Walter Bright wrote: >> >> On 9/14/2016 2:31 PM, Andrei Alexandrescu wrote: >>> >>> The resulting look is alien too, as opposed to the more familiar >>> $MACRO(a1, a2, >>>

Re: colour lib needs reviewers

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 13:49, Andrei Alexandrescu via Digitalmars-d wrote: > On 9/14/16 9:28 PM, Manu via Digitalmars-d wrote: >> >> Like, I really just don't care enough to try and understand ddoc >> sufficiently to have a bag of tricks like those you demonstrated

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-14 22:14, Andrei Alexandrescu wrote: Why? -- Andrei I've recently worked on a theme for Ddoc that will be used in TextMate. For convince I started by adding the CSS inline in the head tag. Turns out if you have CSS looking like this: .foo { font-weight: bold;

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/14/2016 11:11 PM, Walter Bright wrote: On 9/14/2016 2:31 PM, Andrei Alexandrescu wrote: The resulting look is alien too, as opposed to the more familiar $MACRO(a1, a2, a3) or the CPP-style MACRO(a1, a2, a3). The $(MACRO a1, a2, a3) syntax comes from makefiles. The original idea was to

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/14/2016 2:31 PM, Andrei Alexandrescu wrote: The resulting look is alien too, as opposed to the more familiar $MACRO(a1, a2, a3) or the CPP-style MACRO(a1, a2, a3). The $(MACRO a1, a2, a3) syntax comes from makefiles.

Re: colour lib needs reviewers

2016-09-14 Thread Andrei Alexandrescu via Digitalmars-d
On 9/14/16 9:28 PM, Manu via Digitalmars-d wrote: Like, I really just don't care enough to try and understand ddoc sufficiently to have a bag of tricks like those you demonstrated above to workaround these issues. It's not a skill I *want* to possess, rather, in this case, it's a skill I'm being

Re: colour lib needs reviewers

2016-09-14 Thread Manu via Digitalmars-d
On 15 September 2016 at 07:31, Andrei Alexandrescu via Digitalmars-d wrote: > On 09/14/2016 09:28 AM, Manu via Digitalmars-d wrote: >> >> ... I'm just gonna go on the record and say that I am really, really >> not enjoying ddoc ;) > > > I was using ddoc today for the

Re: colour lib needs reviewers

2016-09-14 Thread Andrei Alexandrescu via Digitalmars-d
On 9/14/16 7:04 PM, bachmeier wrote: On Wednesday, 14 September 2016 at 21:31:51 UTC, Andrei Alexandrescu wrote: Please add your own ideas. Andrei One thing that I didn't like when I used DDOC was that I couldn't find a way to add a block of text directly to the output file. I know that

Re: colour lib needs reviewers

2016-09-14 Thread bachmeier via Digitalmars-d
On Wednesday, 14 September 2016 at 21:31:51 UTC, Andrei Alexandrescu wrote: Please add your own ideas. Andrei One thing that I didn't like when I used DDOC was that I couldn't find a way to add a block of text directly to the output file. I know that can be done with html, but it's not

Re: colour lib needs reviewers

2016-09-14 Thread Andrei Alexandrescu via Digitalmars-d
On 09/14/2016 05:31 PM, Andrei Alexandrescu wrote: After writing it for a few dozen times today, I figured it's objectively awkward to type (at least on the US keyboard): the dollar sign followed by the left paren is just unpleasant for mechanical reasons. The resulting look is alien too, as

Re: colour lib needs reviewers

2016-09-14 Thread Andrei Alexandrescu via Digitalmars-d
On 09/14/2016 09:28 AM, Manu via Digitalmars-d wrote: ... I'm just gonna go on the record and say that I am really, really not enjoying ddoc ;) I was using ddoc today for the Greeks in DIP1000 and was musing about what makes it annoying. I think a major part is the macro invocation syntax:

Re: colour lib needs reviewers

2016-09-14 Thread Walter Bright via Digitalmars-d
On 9/14/2016 5:47 AM, Meta wrote: DDOC sections such as Returns, Args, etc. s/Args/Params/

Re: colour lib needs reviewers

2016-09-14 Thread Andrei Alexandrescu via Digitalmars-d
On 09/14/2016 09:47 AM, Meta wrote: On Wednesday, 14 September 2016 at 13:28:23 UTC, Manu wrote: Cheers. Yeah, I need to do better with ddoc. ... I'm just gonna go on the record and say that I am really, really not enjoying ddoc ;) I can't say I'm a fan either. Why? -- Andrei

Re: colour lib needs reviewers

2016-09-14 Thread Marco Leise via Digitalmars-d
Am Wed, 14 Sep 2016 13:47:43 + schrieb Meta : > On Wednesday, 14 September 2016 at 13:28:23 UTC, Manu wrote: > > Cheers. > > Yeah, I need to do better with ddoc. > > > > ... I'm just gonna go on the record and say that I am really, > > really not enjoying ddoc ;) > > I

Re: colour lib needs reviewers

2016-09-14 Thread Meta via Digitalmars-d
On Wednesday, 14 September 2016 at 13:28:23 UTC, Manu wrote: Cheers. Yeah, I need to do better with ddoc. ... I'm just gonna go on the record and say that I am really, really not enjoying ddoc ;) I can't say I'm a fan either.

Re: colour lib needs reviewers

2016-09-14 Thread Manu via Digitalmars-d
On 14 September 2016 at 22:47, Meta via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: >> >> I think I'm about as happy with my colour lib as I'm going to be. It >> really needs reviews. >> >>

Re: colour lib needs reviewers

2016-09-14 Thread Meta via Digitalmars-d
On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. I added packed-RGB support, including weird micro-float and shared-exponent formats. They're important for interacting with any real-time

Re: colour lib needs reviewers

2016-09-14 Thread Marco Leise via Digitalmars-d
Am Wed, 14 Sep 2016 11:36:12 +1000 schrieb Manu via Digitalmars-d : > On 14 September 2016 at 04:34, Marco Leise via Digitalmars-d > wrote: > > JavaScript's canvas works that way for > > example. I.e. the only pixel format is RGBA for

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 04:10, Random D user via Digitalmars-d wrote: > > In general, I think basics should be dead simple (even over simplified for > the very basic case) I think they are: import std.experimental.color; RGB8 color("red"); I don't think i's

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 04:25, Random D user via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 02:00:44 UTC, Manu wrote: >> >> On 13 September 2016 at 07:00, Marco Leise via Digitalmars-d >> wrote: >>> >>> Am Tue, 13 Sep 2016

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 04:34, Marco Leise via Digitalmars-d wrote: > Am Tue, 13 Sep 2016 12:00:44 +1000 > schrieb Manu via Digitalmars-d : > >> What is the worth of storing alpha data if it's uniform 0xFF anyway? >> It sounds like you

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 00:56, John Colvin via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 09:31:53 UTC, Manu wrote: >> >> On 13 September 2016 at 17:47, John Colvin via Digitalmars-d >> wrote: >>> >>> On Tuesday, 13 September

Re: colour lib needs reviewers

2016-09-13 Thread Basile B. via Digitalmars-d
On Tuesday, 13 September 2016 at 02:00:44 UTC, Manu wrote: What is the worth of storing alpha data if it's uniform 0xFF anyway? He he, that's the big problem with classic image formats. When a graphic is described in term of vector, fill, stroke, gradient, layer, etc (not to name SVG)

Re: colour lib needs reviewers

2016-09-13 Thread Marco Leise via Digitalmars-d
Am Tue, 13 Sep 2016 12:00:44 +1000 schrieb Manu via Digitalmars-d : > What is the worth of storing alpha data if it's uniform 0xFF anyway? > It sounds like you mean rgbx, not rgba (ie, 32bit, but no alpha). > There should only be an alpha channel if there's actually

Re: colour lib needs reviewers

2016-09-13 Thread Random D user via Digitalmars-d
On Tuesday, 13 September 2016 at 02:00:44 UTC, Manu wrote: On 13 September 2016 at 07:00, Marco Leise via Digitalmars-d wrote: Am Tue, 13 Sep 2016 00:37:22 +1000 schrieb Manu via Digitalmars-d : Alright, but hybrid gamma is really not

Re: colour lib needs reviewers

2016-09-13 Thread Random D user via Digitalmars-d
On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Can you describe what you perceive to be hard? Well, I just skimmed through the docs and I didn't look at the code, so that sense it was an "honest" view for phobos proposal. Also I was trying to convey that based on the docs it

Re: colour lib needs reviewers

2016-09-13 Thread John Colvin via Digitalmars-d
On Tuesday, 13 September 2016 at 09:31:53 UTC, Manu wrote: On 13 September 2016 at 17:47, John Colvin via Digitalmars-d wrote: On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Also can I swizzle channels directly? I could add something like: auto

Re: colour lib needs reviewers

2016-09-13 Thread Guillaume Piolat via Digitalmars-d
On Tuesday, 13 September 2016 at 09:31:53 UTC, Manu wrote: In my lib, colours are colours. If you have `BGR8 x` and `RGB8 y`, and add them, you don't get x.b+y.r, x.g+y.g, x.r+y.b... that's not a colour operation, that's an element-wise vector operation. I think swizzling is way overrated,

Re: colour lib needs reviewers

2016-09-13 Thread Guillaume Piolat via Digitalmars-d
On Monday, 12 September 2016 at 22:51:14 UTC, Walter Bright wrote: My last comment is what can I do with a color library that would not require some additional library? Having correct conversions. Converting sRGB to linear RGB is typically not done correctly, pow isn't enough. It also

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 13 September 2016 at 20:19, ketmar via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 02:50:02 UTC, Manu wrote: >> >> std.conv.to seems to 'just work' for color type conversion. >> I'd like to support string -> color conversion via std.conv.to; ie: >>

Re: colour lib needs reviewers

2016-09-13 Thread Andrea Fontana via Digitalmars-d
On Monday, 12 September 2016 at 22:51:14 UTC, Walter Bright wrote: My last comment is what can I do with a color library that would not require some additional library? I think it's easy to do some image processing using netbpm [1] as format. Reading/Writing images doesn't require any

Re: colour lib needs reviewers

2016-09-13 Thread ketmar via Digitalmars-d
On Tuesday, 13 September 2016 at 02:50:02 UTC, Manu wrote: std.conv.to seems to 'just work' for color type conversion. I'd like to support string -> color conversion via std.conv.to; ie: auto c = "#00".to!RGB8; Is there a simple way to do that? yes. just define a ctor that accepts

Re: colour lib needs reviewers

2016-09-13 Thread Andrei Alexandrescu via Digitalmars-d
On 9/12/16 10:50 PM, Manu via Digitalmars-d wrote: std.conv.to seems to 'just work' for color type conversion. I'd like to support string -> color conversion via std.conv.to; ie: auto c = "#00".to!RGB8; Is there a simple way to do that? That was the purpose of toImpl, which I recall has

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 13 September 2016 at 17:47, John Colvin via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: >>> >>> Also can I swizzle channels directly? >> >> >> I could add something like: >> auto brg = c.swizzle!"brg"; >> >> The result would

Re: colour lib needs reviewers

2016-09-13 Thread John Colvin via Digitalmars-d
On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Also can I swizzle channels directly? I could add something like: auto brg = c.swizzle!"brg"; The result would be strongly typed to the new arrangement. Perfect use-case for opDispatch like in gl3n.

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 13 September 2016 at 12:05, Walter Bright via Digitalmars-d wrote: > On 9/12/2016 2:08 PM, John Colvin wrote: >> >> On Monday, 12 September 2016 at 19:59:58 UTC, Edwin van Leeuwen wrote: >>> >>> On Monday, 12 September 2016 at 19:55:57 UTC, Guillaume Piolat wrote:

Re: colour lib needs reviewers

2016-09-12 Thread Walter Bright via Digitalmars-d
On 9/12/2016 7:03 PM, Walter Bright wrote: On 9/12/2016 6:11 PM, Manu via Digitalmars-d wrote: Okay. I'll work on this feedback. Wonderful! BTW, linking to authoritative reference material has the effect of reassuring the user that the library is designed by someone who knows his stuff. It

Re: colour lib needs reviewers

2016-09-12 Thread Walter Bright via Digitalmars-d
On 9/12/2016 2:08 PM, John Colvin wrote: On Monday, 12 September 2016 at 19:59:58 UTC, Edwin van Leeuwen wrote: On Monday, 12 September 2016 at 19:55:57 UTC, Guillaume Piolat wrote: - I've wanted a function like colorFromString many times. It's especially nice with the added #RGBA and

Re: colour lib needs reviewers

2016-09-12 Thread Walter Bright via Digitalmars-d
On 9/12/2016 6:11 PM, Manu via Digitalmars-d wrote: Okay. I'll work on this feedback. Wonderful! My last comment is what can I do with a color library that would not require some additional library? With color, ndslice, and std.algorithm, you can do quite a lot of useful image processing

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 13 September 2016 at 07:00, Marco Leise via Digitalmars-d wrote: > Am Tue, 13 Sep 2016 00:37:22 +1000 > schrieb Manu via Digitalmars-d : >> I flip-flopped on this multiple times. >> It's not so simple. >> 1. Alpha doesn't necessarily

Re: colour lib needs reviewers

2016-09-12 Thread jmh530 via Digitalmars-d
On Monday, 12 September 2016 at 22:55:01 UTC, Walter Bright wrote: Thanks for the rationale. I'm glad to see you're planning follow-on libraries! I'd use a graph/plot library myself. Some of the rationale above should go into the documentation for the library. You might try

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 13 September 2016 at 08:51, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On 9/11/2016 9:14 PM, Manu via Digitalmars-d wrote: >> >> I think I'm about as happy with my colour lib as I'm going to be. >> It really needs reviews. > >

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 13 September 2016 at 06:29, Random D user via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: >> >> I think I'm about as happy with my colour lib as I'm going to be. It >> really needs reviews. >

Re: colour lib needs reviewers

2016-09-12 Thread Andrei Alexandrescu via Digitalmars-d
On 9/12/16 6:51 PM, Walter Bright wrote: My last comment is what can I do with a color library that would not require some additional library? Great question and well asked. It was mine as well but I could not put it as succinctly. -- Andrei

Re: colour lib needs reviewers

2016-09-12 Thread Walter Bright via Digitalmars-d
On 9/12/2016 8:06 AM, Manu via Digitalmars-d wrote: So, the main reason I wanted to push for this in phobos is because it's an enabler. There is no multimedia in phobos at all. I think that's a shame, and this is a starting point. Any conceivable image based work depends on this as foundation.

Re: colour lib needs reviewers

2016-09-12 Thread Walter Bright via Digitalmars-d
On 9/11/2016 9:14 PM, Manu via Digitalmars-d wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. I have zero expertise in color programming, and have no idea what a color library might do or what it would be used for. I looked at the front page

Re: colour lib needs reviewers

2016-09-12 Thread John Colvin via Digitalmars-d
On Monday, 12 September 2016 at 19:59:58 UTC, Edwin van Leeuwen wrote: On Monday, 12 September 2016 at 19:55:57 UTC, Guillaume Piolat wrote: - I've wanted a function like colorFromString many times. It's especially nice with the added #RGBA and #RRGGBBAA syntax that eg. SVG lacks. What

Re: colour lib needs reviewers

2016-09-12 Thread Marco Leise via Digitalmars-d
Am Tue, 13 Sep 2016 00:37:22 +1000 schrieb Manu via Digitalmars-d : > I flip-flopped on this multiple times. > It's not so simple. > 1. Alpha doesn't necessarily mean transparently, that's just one > (extremely common) use > 2. 1 is the multiplication identity, but 0

Re: colour lib needs reviewers

2016-09-12 Thread Random D user via Digitalmars-d
On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. - Manu Hi. I'm just a random forum lurker, but here's my feedback. It needs more docs/examples for the basic usage cases (i.e. how to skip

Re: colour lib needs reviewers

2016-09-12 Thread Guillaume Piolat via Digitalmars-d
On Monday, 12 September 2016 at 19:59:58 UTC, Edwin van Leeuwen wrote: On Monday, 12 September 2016 at 19:55:57 UTC, Guillaume Piolat wrote: - I've wanted a function like colorFromString many times. It's especially nice with the added #RGBA and #RRGGBBAA syntax that eg. SVG lacks. What

Re: colour lib needs reviewers

2016-09-12 Thread Edwin van Leeuwen via Digitalmars-d
On Monday, 12 September 2016 at 19:55:57 UTC, Guillaume Piolat wrote: - I've wanted a function like colorFromString many times. It's especially nice with the added #RGBA and #RRGGBBAA syntax that eg. SVG lacks. What happens when the string is invalid? Does it throw an error?

Re: colour lib needs reviewers

2016-09-12 Thread Guillaume Piolat via Digitalmars-d
On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. - Manu My thoughts: - I've wanted a function like colorFromString many times. It's especially nice with the added #RGBA and #RRGGBBAA syntax

Re: colour lib needs reviewers

2016-09-12 Thread Guillaume Piolat via Digitalmars-d
On Monday, 12 September 2016 at 14:12:35 UTC, Manu wrote: Note also that I didn't do any YUV formats (this case you discuss is usually related to older broadcast formats)... didn't know if they'd be particularly useful to people. At least, it's not in my initial offering. As someone who had

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 13 September 2016 at 01:30, John Colvin via Digitalmars-d wrote: > On Monday, 12 September 2016 at 13:04:49 UTC, Manu wrote: >> >> >>> 2. Q: is there anything to convert a color to grey scale ? >> >> >> This isn't a short-answer question :) .. There are many ways

Re: colour lib needs reviewers

2016-09-12 Thread Guillaume Chatelet via Digitalmars-d
On Monday, 12 September 2016 at 15:06:29 UTC, Manu wrote: On 13 September 2016 at 00:37, Andrei Alexandrescu via Regarding Phobos suitability: One thing I'd like to hear from the community is the applicability of this work. I know very little about colors (only the RGB was familiar from HTML

Re: colour lib needs reviewers

2016-09-12 Thread John Colvin via Digitalmars-d
On Monday, 12 September 2016 at 13:04:49 UTC, Manu wrote: 2. Q: is there anything to convert a color to grey scale ? This isn't a short-answer question :) .. There are many ways depending on the job. A simple way might be: L8 grey = cast(L8)RGB8(r, g, b); // L8 is luminance only,

Re: colour lib needs reviewers

2016-09-12 Thread Edwin van Leeuwen via Digitalmars-d
On Monday, 12 September 2016 at 15:06:29 UTC, Manu wrote: One of my first port-of-calls after this work would be a graph/plot library... I'd use the hell out of that. I constantly want to output data visualisations! Just for your information. ggplotd currently uses an old version of your

Re: colour lib needs reviewers

2016-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 12 September 2016 at 15:06:29 UTC, Manu wrote: So, the main reason I wanted to push for this in phobos is because it's an enabler. Indeed. I know there's a window library that was waiting on this work to try for Phobos. Also, worth noting that the one module I import more than

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 13 September 2016 at 00:37, Andrei Alexandrescu via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On 09/12/2016 12:14 AM, Manu via Digitalmars-d wrote: >> >> I think I'm about as happy with my colour lib as I'm going to be. >> It really needs reviews. >

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 12 September 2016 at 21:13, Guillaume Chatelet via Digitalmars-d wrote: > On Monday, 12 September 2016 at 09:09:29 UTC, Manu wrote: >> >> I thought about it, but it added (even more) complexity, and I'm not >> really sure it's the MO of a color lib to worry about

Re: colour lib needs reviewers

2016-09-12 Thread Andrei Alexandrescu via Digitalmars-d
On 09/12/2016 12:14 AM, Manu via Digitalmars-d wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. Upon a quick look it seems to have the right amount of "notes", as Emperor Joseph II would say. Well balanced, nothing jumping at you.

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 12 September 2016 at 21:28, Marco Leise via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > Am Mon, 12 Sep 2016 14:14:27 +1000 > schrieb Manu via Digitalmars-d <digitalmars-d@puremagic.com>: > >> I think I'm about as happy with my colour lib as I'm going to be.

Re: colour lib needs reviewers

2016-09-12 Thread Guillaume Chatelet via Digitalmars-d
On Monday, 12 September 2016 at 14:12:35 UTC, Manu wrote: On 12 September 2016 at 21:31, Guillaume Chatelet via Digitalmars-d wrote: [...] Actually, I spent quite some time stressing about dynamic range. Trouble is, there's no real format spec's relating to

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 12 September 2016 at 21:31, Guillaume Chatelet via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: >> >> I think I'm about as happy with my colour lib as I'm going to be. It >> really needs reviews. >&

Re: colour lib needs reviewers

2016-09-12 Thread Manu via Digitalmars-d
On 12 September 2016 at 19:30, Basile B. via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: >> >> I think I'm about as happy with my colour lib as I'm going to be. It >> really needs reviews. >>

Re: colour lib needs reviewers

2016-09-12 Thread Marco Leise via Digitalmars-d
Am Mon, 12 Sep 2016 11:31:13 + schrieb Guillaume Chatelet <chatelet.guilla...@gmail.com>: > On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: > > I think I'm about as happy with my colour lib as I'm going to > > be. It really needs reviews. > > >

Re: colour lib needs reviewers

2016-09-12 Thread Guillaume Chatelet via Digitalmars-d
On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. I added packed-RGB support, including weird micro-float and shared-exponent formats. They're important for interacting with any real-time

Re: colour lib needs reviewers

2016-09-12 Thread Marco Leise via Digitalmars-d
Am Mon, 12 Sep 2016 14:14:27 +1000 schrieb Manu via Digitalmars-d <digitalmars-d@puremagic.com>: > I think I'm about as happy with my colour lib as I'm going to be. > It really needs reviews. > > I added packed-RGB support, including weird micro-float and > shared-expone

Re: colour lib needs reviewers

2016-09-12 Thread Guillaume Chatelet via Digitalmars-d
On Monday, 12 September 2016 at 09:09:29 UTC, Manu wrote: I thought about it, but it added (even more) complexity, and I'm not really sure it's the MO of a color lib to worry about the endian-ness of storage. I could support "_le"/"_be" suffix on the PackedRGB format string, but then you

Re: colour lib needs reviewers

2016-09-12 Thread Basile B. via Digitalmars-d
On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. I'm not sure what else should be in the scope of this lib. PR: https://github.com/dlang/phobos/pull/2845 dub: https://code.dlang.org/packages

Re: colour lib needs reviewers

2016-09-12 Thread Ilya Yaroshenko via Digitalmars-d
On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote: I think I'm about as happy with my colour lib as I'm going to be. It really needs reviews. [...] Looks great! 1. packedrgb has not enough docs to understand what it is. 2. colorFromString should have scope argument. - Ilya

  1   2   >