[DGD] Impressed with DGD

Par Winzell zell at skotos.net
Sun Feb 2 19:36:49 CET 2003


Christopher,

>>I'm still not sure what was meant about the part about the
>>original query where Christopher worried about the efficiency
>>of the ASCII art computation? presentation? output? 
>>manipulation? More specifics would aid an answer.
> 
> In the standard LP style the codes for color are rather
> long as in: %^blue%^ or %^b%^

Didn't know there was a standard LP style, but that -does- look rather 
bloated if you use a lot of it.

> Second, because of this format doing any manipulation of
> a created image is a huge pain. I had to do a lot of work
> to develop scanners to isolate the color codes, remember
> where they were, remove them, then alter the picture and
> restore the color codes. This is so much that mostly I
> have always treated a created image as an untouchable
> thing.  If it needs to be changed I regenerate a totally
> new picture with the new specs.

If you are actually going to do manipulation I'd just decide that each 
on-screen character is going to be two characters wide in the internal 
representation -- one colour markup and one the actual character.. you 
might be able to do squeeze it all into a single byte if you restrict 
yourself to 8 colours, but doubling the space requirement is not that 
big a deal, and it allows you to trivially address any coordinate.

> I think with DGD I can have very large strings, so some
> of these problems will not be as massive, but the ability
> to manipulate the images is still going to be a trick.

Yes... the native limit is 64K and you can change it, although as you 
allow the strings to get larger you have to be very careful about string 
addition operations and such which deallocate and reallocate larger and 
larger chunks of memory.

> What I would like to have is a color system that is either
> 2 characters %b or one that uses non-standard characters
> that are not used in normal text for the colors. The single
> character color code is like a dream to me, with that I
> would be able to do a whole host of things that I have
> always had to avoid.

I'd suggest either you keep an internal format where each character is 
two bytes, or you introduce a binary markup... something simple like, 
ASCII 0 means 'begin new colour' followed by a colour byte, and ASCII 1 
means 'end colour'. You could also of course just reserve 192-255 for 
single-byte markup of course... 192 means 'begin red', 255 means 'end 
markup'. Whatever. DGD has no trouble with binary sequences -- although 
obviously you need to do a last-minute expansion into ANSI escape 
sequences or whatever, but that's true regardless.

Zell

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list