Hacker News new | ask | show | jobs
by eschaton 57 days ago
That’s not how terminals actually work, at least if you’re talking about actual serial terminals. They often do not gracefully degrade and this kind of “everyone is using a window with the latest fancy thing” needlessly excludes people who might like to use them.
1 comments

Even some physical terminals from 50 years ago gracefully ignored unknown escape sequences.

https://vt100.net/emu/dec_ansi_parser

Just look how many paths lead to the "csi ignore" state.

Do you have a specific physical terminal that's even older than the VT100 that you're worried about?

That abstract state diagram is not, as eschaton said, how terminals actually work.

And it isn't just real terminals. Several terminal emulators are bad at handling syntactically valid but unknown to the emulator control strings. There are several whose authors hadn't read ECMA-35 and ECMA-48, and based their programs on samizdat lists of control sequences circulating years ago, without realizing that there was a full consistent syntax underlying them. Unrecognized control sequences are sometimes just printed as text, or worse.

Indeed, OSC itself is notorious for being such a case, where for a time some emulators expected BEL instead of ST as the string terminator.

From the site:

> Correctness – if you were to feed this parser a stream of characters that is random or deliberately pathological, it is claimed that this parser will exhibit the same visible behaviour as any one of DEC’s 8-bit ANSI-compatible terminals, from VT220 to VT525. A VT100-series parser would be simpler still, as the VT100 only supports 7-bit characters.

To your other point, if we're not talking about replacing expensive hardware anymore, but just obscure buggy software--shouldn't they fix the bugs instead of the entire industry halting all forward progress for the rest of time?

We've done this before. Hyperlinks are a pretty recent introduction, and are widespread by now. So either these buggy terminal emulators were already fixed as hyperlink usage became widespread, or they're unmaintained and already broken by hyperlinks. Either way, new standards won't make the situation any worse.