‹ BackHN Continuity

Thread

A Minsky machine in ncurses terminfo

31 points · 11 comments · beefburger

  1. muvlon · · focus · HN ↗
    Terminfo was never a particularly good idea, but in today's day and age it has become simply ridiculous. Its original purpose was to store data about actually manufactured physical terminals, and so it was okay that it was a fixed DB (as opposed to interactively querying the terminal for its capabilities somehow).

    These days though, terminals are all software. It would be very easy to just ask them. Instead we still insist on shipping a fixed terminfo or termcaps DB. As a consequence, every new terminal emulator is not in there, and so in order to give their users a tolerable experience, they all lie and say they're xterm-256color. Which completely removes any incentive to actually add them to terminfo/termcaps.

    So we have this hellishly complex, nearly Turing complete compatibility system that does no useful work at all anymore.

    1. jquast · · focus · HN ↗
      You can now directly inquire the terminal of its termcap entries using control sequences, “XTGETTCAP”, full for ~23% of terminals, or just keyboard caps from ~15%, probably too little too late, but it is possible to directly ask a terminal and I think it is the correct solution.

      <a href="https:&#x2F;&#x2F;github.com&#x2F;yonasBSD&#x2F;foot#xtgettcap" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yonasBSD&#x2F;foot#xtgettcap <a href="https:&#x2F;&#x2F;github.com&#x2F;jquast&#x2F;ttyscan#motive" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jquast&#x2F;ttyscan#motive <a href="https:&#x2F;&#x2F;ucs-detect.readthedocs.io&#x2F;results.html#terminal-capabilities-xtgettcap" rel="nofollow">https:&#x2F;&#x2F;ucs-detect.readthedocs.io&#x2F;results.html#terminal-capa...

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.