tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Lua binding for curses



On Mon, Aug 07, 2023 at 07:52:10 +0930, Brett Lymn wrote:

> > It would be nice to be able to use the same lua binding with both our
> > curses and ncurses.  I have a simple screen grabber based on a
> > rumpified wsvt25 that I wrote to test and debug the kernel terminal
> > emulator(*) and it might be tempting to co-opt it as both wsvt25 *and*
> > curses test bed (I know, Brett doesn't like the screen grab approach,
> > but I think it has its place :).  Being able to run the same test with
> > ncurses and our curses and compare results will be handy.
> 
> It isn't that I don't like the screenshot method it is just that with 
> curses the journey to the destination is just as important as the
> destination.  Just because the output looks right it doesn't mean
> curses is operating correctly.  For example if the screen is cleared
> by writing blanks to every cell instead of issuing a clear screen
> code then the output looks the same but there is a huge difference
> in the amount of characters emitted... which is part of the aim
> of curses.

I don't think it's productive to frame this as an "exclusive or"
choice.  If we want to do comparison testing against ncurses, we can't
expect identical sequence of commands for the identical output, e.g.
the order of commands to turn on multiple applicable attributes may be
different.  As for spaces vs. erase, since with wsemul we control the
"wsscreen" implementation, we do distinguish them in the final result.
Though I haven't yet looked into distinguishing default color vs.
explicit color that is the same as the default...  But since we
control defattr passed to attach emulop and wsscreen's allocatr op, we
should be able to I think.

-uwe


Home | Main Index | Thread Index | Old Index