A few holes (imho) in the ecosystem of libraries

Guillaume Piolat first.last at spam.org
Mon May 15 13:04:57 UTC 2023


As an enthusiast D practionner, I could start more libraries, but 
I'm sure a lot of us have a good plate of work already to eat 
each day :)

Still, creating base libraries for D is fun/rewarding and I'm 
sure you'll agree.
But if it's not useful to others, there is risk of just creating 
debt.
Here is the DOMAIN-SPECIFIC libraries I'd be interested to see. 
What are yours?


1. A font library that "does it all":
    * support TrueType/OpenType
    * rasterizing glyphs, glyph cache
    * or output the bezier curve instead to give to a Canvas 
rasterizer
       * including support for the many annoying Truetype 
extensions
       * because the dg2D rasterizer is faster than doing the 
glyph cache thing!
    * get font metrics
    * support a registry with font, parsed from system, but also 
added manually
    * to avoid fragmentation: -betterC/@nogc compatible, no 
exceptions, stuff like that
    * small, defined API
    arsd font it almost there, and printed:font is almost there, 
and many others do a part of this, but nothing quite does each of 
these things.


2. A I/O abstraction really suitable for parsing/emitting
    * just ubyte[]
    * no exceptions, instead provide a way to parse anyway (past 
stream end) and get the error later, so that we don't need to 
check for stream end (like stb does)
    * parse base types with provided endianness
    * good names, not so easy to come across
    * abstract over (say) fread, ftell, fwrite, fseek, for 
operations over files/memory
ranges/lazy streams/growable memory ranges
    * helpers to skip bytes, ensure remaining bytes, substream, 
backtrack, etc.
    * not overly templated, struct-based, even manual delegation 
for wrapped I/O
    I have done a variation of that badly for both audio-formats 
and gamut, and it's annoyingly similar.


What do YOU think is missing in the library department?



More information about the Digitalmars-d mailing list