Progress on Adam Wilson's Graphics API?

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Sun May 31 00:12:58 PDT 2015


On 31/05/2015 6:56 p.m., lobo wrote:
> On Sunday, 31 May 2015 at 05:17:27 UTC, Adam D. Ruppe wrote:
>> On Sunday, 31 May 2015 at 04:46:51 UTC, lobo wrote:
>>> Again, I wonder why would you reimplement what you get from libpng?
>>
>> I've actually had people ask me what magic I did with my png.d because
>> it often generates smaller files than libpng. It is easier to use an
>> leaving out unnecessary bits made it faster and more efficient! (for
>> our use cases, the full lib is surely useful for other cases)
>>
>> The thing with those libraries is they do everything, which makes them
>> bigger and more complex. There's a place for that, sure, but it isn't
>> necessarily better.
>>
>>> As for libcurl, well if a pure D curl impl is written for Phobos it
>>> will be 100s to 1000s of additional LOC that require testing and
>>> maintaining.
>>
>> Fun fact: curl is actually pretty buggy... and a pain to use too. I
>> like it and use it for a lot of things, but I also replaced it (and
>> again, like with the png, a lot of the things it does aren't necessary
>> for me anyway)
>
> I know cURL has numerous bugs, I work with them everyday :)
>
> But so do many many others and that's partly my point; the majority of
> bugs are exposed pretty quickly with that many users.
>
> I'm also not convinced that a D PNG or cURL (or whatever)
> implementation, used en masse, wouldn't grow to include all those
> 'missing' features and end up just as bloated. But now without lots and
> lots of users to help report all those bugs.
>
> Anyway, it's a moot point given that I probably won't ever have the time
> to really contribute more than bug reports for D ;-)
>
> I just finished your book by the way and thought it was a terrific read.
> Nice work!
>
> bye,
> lobo

I would recommend you reading png's 1.2 spec[0].

It wouldn't be hard to add the "missing" features as free-functions if 
done right.

[0] http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html


More information about the Digitalmars-d mailing list