5 ms·
Formatting legacy stuff was always part of the deal, but at the same time, I was never interested in being able to host vim. Some people disagreed rather vocall
by unconed 12y ago
Formatting legacy stuff was always part of the deal, but at the same time, I was never interested in being able to host vim. Some people disagreed rather vocally.
One of the things I discovered was just how much legacy cruft is really around. Not just things like ANSI colors, but e.g. grotty syntax. It made no sense until I realized it was created for teletype printers... it underlines things by backspacing after every character and printing a "_". It bolds by backspacing and repeating the character. I had to parse this to support man pages, and I assume the default TTY still does too.
The other thing was that so much of Unix workflow really only works by accident. The fact that you can ssh + sudo + ssh + ... is because the pipes are too dumb to fuck it up. Take for example SSH escape sequences... [1] they only work on the first hop. The proper solution is out-of-band signaling.
From an architecture point of view, the whole termcaps / stdio thing is crazy. The Unix principle is supposed to be about simple agnostic composition, and yet most tools have to sniff out their environment in order to maintain this illusion. Text files are for people, not machines. And if you want to see a never ending discussion, just ask a bunch of greybeards how to write a shell script that can handle files with spaces in their name.
[1] http://lonesysadmin.net/2011/11/08/ssh-escape-sequences-aka-kill-dead-ssh-sessions/ http://lonesysadmin.net/2011/11/08/ssh-escape-sequences-aka-...
- ygra 12y agoSort of unrelated, but when I saw TermKit I couldn't help the surface similarities with PowerShell. In fact, I believe what you had there could almost work as a PowerShell host, although things like http://poshconsole.codeplex.com/ http://poshconsole.codeplex.com/ share some of the same ideas.
- lambda 12y ago> I had to parse this to support man pages, and I assume the default TTY still does too. Actually, it's less that interprets this and converts it into the appropriate terminal formatting, not the TTY itself.