Discussion:
[polyml] fancy tty tricks (with curses?)
M***@data61.csiro.au
2018-02-27 03:39:12 UTC
Permalink
Has anyone used the FFI interface or similar to link libcurses or similar? I could try to talk ANSI terminal sequences directly, but querying terminal state with these seems pretty painful. (At the very least one has to put standard input into a non-blocking state, and I found the Basis documentation on how I might do this very confusing.) And then one is breaking the very abstraction that curses is trying to provide...

As a bare minimum for example, I'd like to get the width of the current terminal.

Michael
Bernard Berthomieu
2018-02-27 11:11:35 UTC
Permalink
I once did something similar, but not through FFI. I directly used the
terminfo database instead (also used by curses, man terminfo for details).
I guess this what you mean by ANSI terminal sequences.
But I was using only basic capabilities like moving the cursor, beeping,
or deleting characters or lines, switching to reverse video, etc.

  Bernard.
Post by M***@data61.csiro.au
Has anyone used the FFI interface or similar to link libcurses or similar? I could try to talk ANSI terminal sequences directly, but querying terminal state with these seems pretty painful. (At the very least one has to put standard input into a non-blocking state, and I found the Basis documentation on how I might do this very confusing.) And then one is breaking the very abstraction that curses is trying to provide...
As a bare minimum for example, I'd like to get the width of the current terminal.
Michael
_______________________________________________
polyml mailing list
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Continue reading on narkive:
Loading...