Tags

Items in Blog tagged with [notcurses]
All items tagged with [notcurses]

Writing a Simple Notcurses Program

Notcurses is a modern TUI library written by Nick Black (who you may see around the net as dankamongmen or some equally dank designation). As Dank himself will tell you, the older ncurses library is beautifully documented, rigorously tested, and very well supported. It is, however, quite old tracing its history back to at least 1982, and as such lacks some modern features such as thread-safety. I had been using the venerable ncurses for my fireplace program - a use case that it was never designed to handle. Overall ncurses does a good job, but there is occasional tearing and artifacts. Notcurses solved all the graphical glitches beautifully, and performance was noticeably improved. The problem is that just about the only other person using notcurses is Nick Black himself, and while his documentation is extensive, it is mostly source code snippets with few examples. Hopefully this article will provide a nice jumping-off point for the absolute beginner.