Re:TUIs
by zozbot234 on Wednesday March 16, 2022 @10:31PM
(#30706957)
TUI's can deal with changes in terminal geometry, generally by redrawing. It even works in a telnet/ssh connection, the remote host gets sent that information and uses it accordingly.
[ Parent
| on HN ]
Yes, it does. But then creating TUIs now require as much complexity as creating single window GUIs (requiring handling events outside the program), and you lose the aspect of 'creating TUIs are just printing VT codes'.
Re:TUIs
by marssaxman on Wednesday March 16, 2022 @11:27PM
(#30707346)
It's far less complexity, even still, and it has not changed much for decades. A TUI program working today will likely continue to work for decades more. If you don't care about glitz and just want to write something useful, that's a substantial draw.
Redrawing a TUI from scratch is usually trivial. Certainly far simpler than your average GUI.
Re:TUIs
by RobertMiller on Thursday March 17, 2022 @11:18AM
(#30712068)
> But then creating TUIs now require as much complexity as creating single window GUIs (requiring handling events outside the program)
No way dude. All you need to do is catch SIGWINCH and then ioctl/TIOCGWINSZ to get the new size. Back when I was into roguelike development, responding to the terminal resizing took scarcely more than a half dozen lines of C. I wish I knew of a GUI system this simple.
Re:TUIs
by Karrot_Kream on Thursday March 17, 2022 @03:33PM
(#30715020)
Most GUI systems handle redrawing and resizing for you. Likewise you may need to catch some events, but that's it. Which GUI are you talking about?
Re:TUIs
by RobertMiller on Thursday March 17, 2022 @09:37PM
(#30717809)
It's not redrawing/resizing with a GUI that's the matter, it's the whole of it. TUIs are easy to create without much investment in learning a whole GUI system.
Re:TUIs
by Karrot_Kream on Saturday March 19, 2022 @07:26PM
(#30738499)
That's assuming you find a TUI easier to deal with. I guess for the I-use-Arch crowd, sure, but anything more than just printing out lines of text IMO makes using VTs a pain. And if I'm just outputting text, using GTK or Qt is more than fine.
Re:TUIs
by ungamedplayer on Saturday March 19, 2022 @10:36AM
(#30734056)
Still not much complexity.