Live data from Hacker News

Building a TUI is easy now

hatchet.run

251–260 of 262 posts

Re: Building a TUI is easy now

#251

Earlier quoted context omitted.

I like a TUI when I always want an app to run side by side with a CLI. It’s easier to do split windows in a terminal or tmux/zellij panes than to script two separate app windows to stay locked together as a pair. Although, I’d welcome advice as to how to do it better. I also find TUIs are easier to program for the same reason they’re limited. Fewer human interface aspects in play and it’s not offensive to use the sam…

> It’s easier to do split windows in a terminal or tmux/zellij panes than to script two separate app windows to stay locked together as a pair. Although, I’d welcome advice as to how to do it better. Did you try some tiling window managers and decided you did not like that?

I prefer most apps to not tile. Tiling window managers might still work with config.

Re: Building a TUI is easy now

#252

Earlier quoted context omitted.

I owned a C64. Remember how buttery smooth the interfaces of those '80s computers were?

I was green with envy, when I saw how fast and smooth a C64 scrolled some text (iirc it was some machine code monitor). My Amstrad CPC464 had no text mode and the Z80A CPU was clearly overwhelmed with shifting the whopping 16KiB RAM of the graphics buffer or even just rendering a line of text.

CPC allows some level of smooth scrolling, albeit not as good as C64. Lack of a text mode is a problem too as you said.

Re: Building a TUI is easy now

#253
post #22

I think mc (Midnight Commander) is still one of the best TUIs available - it's very close in capability to the GUI versions (like Double Commander) and it has the benefits of tuis - like that you can run it on a remote system. It looks outdated, but I'm actually now working on a new skin that will hopefully be included in the next release of mc.

I had mc on my $20 second hand 286, there are some newer takes on the classic, ranger and nnn come to mind, support for images on the terminal with sixel is pretty neat!

https://github.com/ranger/ranger

https://github.com/jarun/nnn

Re: Building a TUI is easy now

#254
post #151

Earlier quoted context omitted.

> They flatten the structure of a UI under a character stream Isn't this ... everything though? Even the browser which you mention as better in the next paragraph.

No. The browser structures the page in both a DOM tree and an accessibility tree.

What.. no, its text.. I've seen it in view source..

You're talking about yet another 'presented' data stream, which is different than the character stream.

One can rebuild these at will, im sure.

Re: Building a TUI is easy now

#255
post #151

Earlier quoted context omitted.

No. The browser structures the page in both a DOM tree and an accessibility tree.

What.. no, its text.. I've seen it in view source.. You're talking about yet another 'presented' data stream, which is different than the character stream. One can rebuild these at will, im sure.

The source of a web page is parsed to form DOM and accessibility trees. The character stream of a TUI can’t be parsed into anything similar because it is not given in a formal language that can express those structures.

Re: Building a TUI is easy now

#256
post #48

I think TUIs-that-want-to-be-GUIs (as opposed to terminal commands just outputting plain text) are sad. Mainly because they’re largely inaccessible. They flatten the structure of a UI under a character stream. You’re forced to use it exactly the way it was designed and no different. Modern GUIs, even web pages too, expose enough structure to the OS to let you use it more freely. I get why people build TUIs, but it’s…

I don't think most GUIs expose any more structure than TUIs.

Re: Building a TUI is easy now

#257
post #150

Earlier quoted context omitted.

No need to guess, the SO survey is probably still representative of the state of development environments: https://survey.stackoverflow.co/2025/technology#1-dev-id-es Note that respondents may use multiple tools, but around 76% answered VSCode, whereas 24% answered Vim. So, I’d wager you’re indeed in a *nix bubble.

It's more indicative of the state of SO users. Care to bet even those 24% vim devs code circles around the VSCode ones?

That's no sure thing - plenty of vim users are new or not particularly knowledgeable, they just chose their village' for various reasons.

Re: Building a TUI is easy now

#258

Earlier quoted context omitted.

What does ctrl-R do?

History search, like in shells. My most used TUI shortcut!

Just dropping this here because I had no idea about/ignored tools like this until recently, in case you weren't aware of them, but it's been a big help in my workflow https://github.com/atuinsh/atuin

Re: Building a TUI is easy now

#259

I don't see any real advantage of TUIs over web forms or GUIs for the same thing. I do like CLIs though, especially the ones that are properly capable of working in pipelines. Composing a pipeline of simple command-line utilities to achieve exactly what you want is very powerful.

- easy over ssh

- "within bounds" more; designed for actions with keyboard shortcuts and up/down/left/right

- less busy - devs are constrained or less tempted to add animations, css, and other distractions

Re: Building a TUI is easy now

#260
post #255

Earlier quoted context omitted.

What.. no, its text.. I've seen it in view source.. You're talking about yet another 'presented' data stream, which is different than the character stream. One can rebuild these at will, im sure.

The source of a web page is parsed to form DOM and accessibility trees. The character stream of a TUI can’t be parsed into anything similar because it is not given in a formal language that can express those structures.

We're going to have to disagree, if you consider the 'browser page' as the interface, it falls into the same problem you see with TUI's... you must reach into the DOM and accessibility information not via the character stream but with an API, the TUI has the same issue.

You've given me some great points to think about, thank you for the engaging conversation.

Post reply on HN