[RFC] ColorD

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Oct 23 16:09:22 PDT 2012


On Tue, Oct 23, 2012 at 03:46:37PM -0700, Walter Bright wrote:
[...]
> A module that only sets the console color is a little too light to be
> a phobos entry.
> 
> A more comprehensive module that included:
> 
> 1. getting mouse input
> 2. getting size of the console
> 3. moving the cursor around
> 4. drawing boxes in the console window
> 5. setting the contents of the title bar
> 6. supporting cut/paste
> 7. getting no-echo raw input
> 8. setting the size of the cursor
> 
> would be a definite candidate. I.e. a module that can support
> building a text mode screen app (like a text editor).

IOW, a replacement for libncurses. :)

I think (1), (6), and (8) may be a bit too much to expect from a first
try, esp. if you're dealing with Unix terminals, which are many and
varied, and have all sorts of idiosyncrasies that make it a pain to
write a generic library that works for everything.

But I would say at least (2), (3), (4), (5), and (7) are a must for a
Phobos entry.

And in addition to that, I'd say incremental screen updates (along the
lines of libncurses) are also very important. It will be hard for
seasoned Unix coders to take D seriously if its standard library's
console module has to repaint the screen everytime.

Ideally, though, a console module in Phobos should do a better job at
supporting text-mode windows than libncurses currently does. Text-mode
apps are an easy niche for D to gain a strong presence, esp. if we have
a console module that does a better job at simulating a windowing system
than ncurses. (Hopefully we're not just reinventing ncurses here -- we
should do better than it.)


T

-- 
Laissez-faire is a French term commonly interpreted by Conservatives to
mean 'lazy fairy,' which is the belief that if governments are lazy
enough, the Good Fairy will come down from heaven and do all their work
for them.


More information about the Digitalmars-d mailing list