Live data from Hacker News

Everything you ever wanted to know about terminals

xn--rpa.cc

21–30 of 191 posts

Re: Everything you ever wanted to know about terminals

#21

I could take this a lot more seriously if capital letters were properly used.

Isn't worrying about someone else's grammatical use of capitalization when the piece is understood anyway a little too pedantic?

I find the text more awkward to read without capital letters starting sentences, especially in paragraph form.

Re: Everything you ever wanted to know about terminals

#22

Earlier quoted context omitted.

>punicode was a terrible idea to allow in DNS This is a very western-centric viewpoint. Most of the world does not use the Latin alphabet as its primary writing system.

it is a security centric view point not a "Western" one.

The solution is prohibiting characters that can easily be confused (across all writing systems), not banning Punycode altogether.

Re: Everything you ever wanted to know about terminals

#24

I was working on terminal code recently and had a hell of a time finding anything approaching an authoritative spec or reference docs. The best I found was this: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html I'd recommend that over the wikipedia link in the article, since wikipedia seems to be missing some things.

You couldn't find an authoritative spec because there isn't a universal standard. Lots of terminal emulators differ in different ways.

Re: Everything you ever wanted to know about terminals

#25

Earlier quoted context omitted.

Isn't worrying about someone else's grammatical use of capitalization when the piece is understood anyway a little too pedantic?

I find the text more awkward to read without capital letters starting sentences, especially in paragraph form.

No post body was provided.

Re: Everything you ever wanted to know about terminals

#26

You can't have "everything you wanted to know about terminals" with absolutely no mention of terminfo and (previously) termcap. You don't necessarily need ncurses to have a portable smart terminal experience, but you do need terminfo. ncurses magic relies on the lore stored in terminfo, which contains all of the obscure escape sequences and other information about the disparate world of terminals. They're maintained…

As the article states:

> being compatible only with ANSI-capable terminals is a feature, not a bug

Driving old hardware terminals (as opposed to terminal emulators) is a fun stunt, not something of actual modern value. Every modern terminal emulator supports ANSI escape sequences. Some features are supported by a subset of terminals, but you can either 1) probe for those features by asking the terminal, which some terminals support, or 2) try them and have graceful degradation if they're not supported, or 3) have configuration options to use them, or 4) don't use them.

For every one case in which terminfo allows you to support some obscure non-ANSI terminal, there are many many more cases where terminfo won't happen to have a definition of the user's terminal (or won't know all the capabilities of the user's terminal) and you'll have less functionality than if you just used ANSI escapes. This is especially true over SSH and similar.

Re: Everything you ever wanted to know about terminals

#27
post #24

I was working on terminal code recently and had a hell of a time finding anything approaching an authoritative spec or reference docs. The best I found was this: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html I'd recommend that over the wikipedia link in the article, since wikipedia seems to be missing some things.

You couldn't find an authoritative spec because there isn't a universal standard. Lots of terminal emulators differ in different ways.

https://www.ecma-international.org/publications-and-standard...

Re: Everything you ever wanted to know about terminals

#28

Off-topic, but it would be nice if HN could properly parse the Punycode encoding of internationalized domain names, so rather than the URL appearing as xn--rpa.cc, it appeared properly as ʞ.cc

Unicode domain names are a security threat, due to homographs.

Re: Everything you ever wanted to know about terminals

#29

You can't have "everything you wanted to know about terminals" with absolutely no mention of terminfo and (previously) termcap. You don't necessarily need ncurses to have a portable smart terminal experience, but you do need terminfo. ncurses magic relies on the lore stored in terminfo, which contains all of the obscure escape sequences and other information about the disparate world of terminals. They're maintained…

TFA does mention terminfo at the very end:

> being compatible only with ANSI-capable terminals is a feature, not a bug, go the fuck away. terminfo is a fucking joke. nobody needs to target obscure dumb terminals (or smart terminals, for that matter) from 1983 anymore.

I don't have the expertise to opinion on this. But AFAICT most terminals that people still use[1] will self-report as xterm or xterm-256color so they'll only use the xterm escape sequences anyway.

[1] kitty is a notable exception. But it's rarely supported on preinstalled terminfo's, and manually adding them to all the remote servers that you access is a PITA.

Re: Everything you ever wanted to know about terminals

#30

I was working on terminal code recently and had a hell of a time finding anything approaching an authoritative spec or reference docs. The best I found was this: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html I'd recommend that over the wikipedia link in the article, since wikipedia seems to be missing some things.

That document is very good, but it mostly describes control sequences as interpreted by xterm, with some notes for other terminal emulators, too. Some of the more advances ones will have different sequences in other terminals (for example for the mouse). Most basic ones (i.e. ANSI stuff) works in pretty much all terminal emulators of the last few decades though.

Either way, I wouldn't use it as an authoritative source uncritically.

Post reply on HN