Hacker News

beefburger
A Minsky machine in ncurses terminfo seriot.ch

ncurses terminfo can simulate a two-counter Minsky machine, making repeated parameter expansion computationally universal


muvlon3 hours ago

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.

skydhashan hour ago

> It would be very easy to just ask them. Instead we still insist on shipping a fixed terminfo or termcaps DB.

Isn’t the terminal info easily modifyable? You can add new entries at both the system and user level.

The only actual issues are capabilities. But just like all protocols, there’s need to be an agreement between the software and the terminal. And gradual degradation if some capability is not there. I have more issue with some software hardcoding escape sequences than with not being able to add new terminal entries.

muvlon36 minutes ago

Yes you can add entries, but it's still an awful design. It's like if the web didn't have media queries and such and instead everyone ships a big database of user agent strings that websites check in order to know what features they can use.

And no, caniuse or browserlist are not that. Yes they contain data on what browsers support what, but that's only to guide your compatibility decisions. You can still opportunistically try to use a feature and a new browser that's not in the DB can handle it correctly without having to lie in its UA string.

Someone2 hours ago

> as opposed to interactively querying the terminal for its capabilities somehow

Querying terminals, in the 1970s when there was a Cambrian explosion in terminal capabilities, with tens of different manufacturers?

Even if you could have gotten all of them to agree this was necessary, I think nobody could afford to put the smartness for such a protocol in their hardware. Hardware was expensive in those days.

nvme0n1p12 hours ago

You read the opposite of what that post is saying. It says a fixed DB was okay in the 1970s, but not in the 2020s.

hbcdbff3 hours ago

I remember finding the original terminfo Turing completeness article, which was published in 2019, amazing.

In the era of LLMs articles such as these do nothing for me any more.

This article is mostly, if not entirely, LLM-generated. It’s done in a slightly less blatant way than most, but the tells are there, and pangram agrees.

But even if the article was human-written, I’d still not find it impressive now. There’s no way of telling a human was behind the discovery.

readthenotes13 hours ago

Does it play Doom yet??

[deleted]2 days agocollapsed

hn-front (c) 2024 voximity
source