Live data from Hacker News

Building a TUI is easy now

hatchet.run

101–110 of 262 posts

Re: Building a TUI is easy now

#101
post #93

Earlier quoted context omitted.

> I think TUIs-that-want-to-be-GUIs (as opposed to terminal commands just outputting plain text) are sad. You'd think that, but you'd be wrong. Case in point from Emacs/Vim and the Borland IDEs to Claude, plus all kinds of handy utils from mc and htop to mutt. > 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…

How many developers are using VSCode? How does that number compare with Emacs/Vim? In many ways, GUI was developed as the natural evolution of TUI. X server, with its client-server architecture, is meant to allow you to interact with remote sessions via "casted" GUI rather than a terminal. Countless engineers spent many man-hours to develop theories and frameworks for creating GUI for a reason. TUI just got the nosta…

> How many developers are using VSCode? How does that number compare with Emacs/Vim?

Perhaps I'm in some sort of "TUI bubble", but I'd bet good money that Emacs/Vim users outnumber VSCode users by an order of magnitude. But maybe I'm just surrounded by *nix devs.

Re: Building a TUI is easy now

#102
post #101

Earlier quoted context omitted.

How many developers are using VSCode? How does that number compare with Emacs/Vim? In many ways, GUI was developed as the natural evolution of TUI. X server, with its client-server architecture, is meant to allow you to interact with remote sessions via "casted" GUI rather than a terminal. Countless engineers spent many man-hours to develop theories and frameworks for creating GUI for a reason. TUI just got the nosta…

> How many developers are using VSCode? How does that number compare with Emacs/Vim? Perhaps I'm in some sort of "TUI bubble", but I'd bet good money that Emacs/Vim users outnumber VSCode users by an order of magnitude. But maybe I'm just surrounded by *nix devs.

I'll take that bet

Re: Building a TUI is easy now

#103
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…

They are GUIs --- just minecraft GUIs. One day, we will rediscover why GUI toolkits exist. The only real advantage TUIs have over GUIs is easy remoting, TBH. Maybe that's enough for people. Otherwise? They're just hair shirts.

Re: Building a TUI is easy now

#104

Earlier quoted context omitted.

A very important thing about constraints is that they also liberate. TUIs automatically work over ssh, can be suspended with ctrl-z and such, and the keyboard focus has resulted in helpful conventions like ctrl-R that tend to not be as prominent in GUIs.

What does ctrl-R do?

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

Re: Building a TUI is easy now

#105
post #33

Big reason why TUIs were popular in the first place is because they are so much simpler to build. Compare ncurses to GTK/Qt, they are completely different leagues. One of my pet ideas is to build a ncurses compatible/style library that skips terminal layer and instead renders directly to Wayland, kinda getting the simplicity of ncurses without dragging all the legacy junk with it.

Yet ironically getting Claude Code to run at 60fps is way way harder in a TUI? Kinda funny that they optimized for "simple" then footgunned themselves into a client that probably took thousands of man hours to get to a reasonable place for power users.

It's just their tech debt. They chose to use react.js in the terminal via ink, and essentially footgun their way through each update.

Re: Building a TUI is easy now

#106
post #88

Alex, It's somewhat ironic that a web page about performant terminal user interfaces uses gratuitously complex CSS mask compositing and cubic gradients which reduce smooth scrolling on my 1 year-old, high-end Dell XPS laptop (>$3k) to Commodore 64 level (on default 'Balanced' battery mode). While it's pretty , it's also just a very subtle, non-critical background animation effect. Not being a CSS guru myself, here's…

> to Commodore 64 level That’s unfair to C64 which can smooth scroll very well.

Not by repainting the whole screen every frame!

Re: Building a TUI is easy now

#107
post #93

Earlier quoted context omitted.

> I think TUIs-that-want-to-be-GUIs (as opposed to terminal commands just outputting plain text) are sad. You'd think that, but you'd be wrong. Case in point from Emacs/Vim and the Borland IDEs to Claude, plus all kinds of handy utils from mc and htop to mutt. > 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…

How many developers are using VSCode? How does that number compare with Emacs/Vim? In many ways, GUI was developed as the natural evolution of TUI. X server, with its client-server architecture, is meant to allow you to interact with remote sessions via "casted" GUI rather than a terminal. Countless engineers spent many man-hours to develop theories and frameworks for creating GUI for a reason. TUI just got the nosta…

Buddy, I am here to inform you that you are projecting.

Re: Building a TUI is easy now

#108
post #88

Alex, It's somewhat ironic that a web page about performant terminal user interfaces uses gratuitously complex CSS mask compositing and cubic gradients which reduce smooth scrolling on my 1 year-old, high-end Dell XPS laptop (>$3k) to Commodore 64 level (on default 'Balanced' battery mode). While it's pretty , it's also just a very subtle, non-critical background animation effect. Not being a CSS guru myself, here's…

> to Commodore 64 level That’s unfair to C64 which can smooth scroll very well.

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

Re: Building a TUI is easy now

#109
post #91

Earlier quoted context omitted.

I disagree, I think TUIs are a great fit in some problem domains. Think for instance the Debian package configuration dialogs -- they're far more comfortable than the same questions without a TUI, and still work over a serial console if you have to use one. For tools like various kinds of "top", there's many potential tools you can use to the same end and intentionally using one that draws CPU graphs over one that ju…

The difference there, in Debian's case at least, is that there is a distinction between the frontend and the configuration backend; you're probably most familiar with the `newt` frontend, but there's also `text` (for textual entry without using curses or anything), `noninteractive` (for just use the defaults), gnome, kde, teletype, or even 'web' which does not seem to work effectively but is a neat idea regardless. T…

I like TUIs, but if given the choice between a TUI or a CLI program, I'd take the latter. You can always create your own interface from it. Better if it's backed by a library.

Re: Building a TUI is easy now

#110

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.

In practice, TUIs tend to have good keybindings, & are readily available right in the place where you're running the command (especially for quick tasks).

They can, but don't always. I've used some where you have to smash the TAB key 50 times go move linearly through all the fields and controls. If there are well-implemented navigation keys, yes they it can be very efficient.
Post reply on HN