Termbox-Go – A minimalistic Go curses library
github.com
github.com
termbox-go has a couple of pretty wicked global variables, and they caused me a surprising amount of issues last time I used it. By contrast, tcell has good interfaces, and it shows: tcell even has a SimulationScreen you can use for testing.
> New, testable interfaces for the operating system.
So you implemented this at the syscall level, and that just happened to include a tty? Very neat.
I'm not saying waf is bad, I've never used it (obviously, since I failed to install it). But it was an annoying hoop to jump through.
I do think re-doing the old unix lib faithfuls is a Good Idea. A cleaner curses like library with a better interface would be great.
Edit: ack, sorry I momentarily forgot that I also recently ripped out my project's dependence on `make`. You can see my old makefile at an earlier commit: https://github.com/akkartik/mu/blob/d9ee2076d9/termbox/makef...
It doesn't do anything fancy -- certainly not like the progress bars linked in a sibling comment -- but it also works without setting the TTY into raw mode, which means your scrollback is never disrupted.
The standard UNIX terminal UI library.
As the link says it's a trade off between CPU and bandwidth. Most of us aren't using 9,600 baud terminals nowadays, so it seems like a fair trade-off.
I'd imagine these 'optimisations' include workarounds for the way certain hardware works as well:
"The terminal can operate at transmission speeds up to 19,200 baud. However, the terminal may not be able to keep up with incoming data. The terminal stores incoming characters in a 64-character buffer and processes them on a first-in/first-out basis. When the content of the buffer reaches 32 characters, the terminal will transmit 0238 (XOFF or DC3). On this signal the host should suspend its transmission to the terminal. Eventually, if the host stops transmitting, the terminal will deplete the buffer. When 16 characters remain in the buffer the terminal will transmit 0218 (XON or DC1) to signal the host that it may resume transmission."