Open apprehensions opened 1 year ago
I'm curious here: how helpful is a library such as libtickit for interacting with the terminal, compared to simply using termios?
I don't know the internals of curses/ncurses, but it is sometimes advertised that it is a rather big dependency with a lot of code. And some apps, such as Kakoune, got rid of it and came back to "raw termios".
I guess it is about tradeoff because I suppose curses handles a lot of edge cases for weird terminal emulators or things like that, but it is just speculation.
Personally, I can use Kakoune without a hitch!
I genuinely don't know about this tradeoff, hence interested if people have insight.
I'm curious here: how helpful is a library such as libtickit for interacting with the terminal, compared to simply using termios?
Using libtickit has be discussed before. I think the points there are still valid. Particularly the double buffering point (I also haven't looked under the hood in libtickit yet).
In theory it would be quite easy to replace curses with tickit for drawing but the input handling will be an issue. We currently use termkey everywhere without any sort of abstraction. Splitting out the input handling into something more abstracted is important if we ever want to have a server-client architecture but it will be quite some work.
I don't know the internals of curses/ncurses, but it is sometimes advertised that it is a rather big dependency with a lot of code. And some apps, such as Kakoune, got rid of it and came back to "raw termios".
We also have that with ui-vt100.c
which is used when building with CONFIG_CURSES=0
. I usually use that but it requires that your terminal emulator supports double buffering otherwise you will get flickering. There are a couple other minor differences as well.
We also have that with ui-vt100.c which is used when building with CONFIG_CURSES=0. I usually use that but it requires that your terminal emulator supports double buffering otherwise you will get flickering. There are a couple other minor differences as well.
Interesting, did not know about that. Thank you, I will test this.
libtermkey
is a required dependency, and it depends on curses, which will cause a build failure, since curses is needed by a require dependency.