Hacker News new | past | comments | ask | show | jobs | submit login

Wonderful! Thanks!

I see you don't use termcap/ncurses anymore. Do you perform terminal handling yourself directly?

Thanks again!






Chawan never really used ncurses, only termcap. (ncurses just happens to implement termcap too.)

I started with termcap because I was already familiar with it through w3m. But termcap is an obsolete interface, and cannot describe the only useful attribute for modern terminals (true color). Its only benefit was "maybe it accidentally works on a hardware terminal from the 80s", which is cool but not really worth the extra failure mode.

So instead of migrating to terminfo, I ditched it completely in favor of terminal queries (which were already necessary for other reasons). There is still a built-in terminal database, to detect known TERM values with XTerm incompatibilities. But a terminal that correctly responds to queries will work out of the box, even if its TERM value is unknown.


> I started with termcap because I was already familiar with it through w3m. But termcap is an obsolete interface, and cannot describe the only useful attribute for modern terminals (true color). Its only benefit was "maybe it accidentally works on a hardware terminal from the 80s", which is cool but not really worth the extra failure mode.

Priorities, I guess. As long as I'm in a terminal, I'd rather have support for hardware terminals from the 80s than truecolor. But my only hardware terminal is a VT-420, so probably works for more or less anything that supports base XTerm (monochrome).




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: