Daily Shaarli

All links of one day in a single page.

May 14, 2024

Tools for text user interfaces

While ncurses still has a place in the modern world, ANSI escape codes may be better in some situations:

  • you can use (almost) any programming language, not just those that have a curses binding or a foreign function interface;
  • you're literally just printing out some short codes: that's both efficient and liberating;
  • you can use features that modern terminal emulators have, but (n)curses doesn't.

As for the downsides:

  • ANSI escapes are like coding in machine language – you'll need a cheatsheet;
  • some hardware videoterminals never supported the standard;
  • ncurses does more useful work besides translating for those old things.

It's still good to have another tool in the toolbox, doubly so when it's easy and fun to tinker with.