Live data from Hacker News

Strace-ui, Bonsai_term, and the TUI renaissance

blog.janestreet.com

51–60 of 91 posts

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#51

I don't really get the TUI craze. Would love it if someone has some perspective that I'm lacking. Display technology has seen so much progress in the past decades. Apple marketing has taught us about "Retina" displays with pixels so small that you can't tell them apart without a microscope. We get these very rich and colorful desktop environments but we actively decide to not use any of that. Now, I get that a TUI ca…

   The article shows off an strace TUI, and it's not like I can't see the benefits of making strace output more browsable. What I don't understand is why that must happen inside a terminal window where (for instance) all text must have the same font and size.
It doesn't technically have to. But if you want to do it in a different location than the terminal window and have it be cross-platform and easy to develop for your options are limited. There are not really very many text-first UI frameworks out there that are cross platform. It's similar I think to the way that the browser has become the dominant GUI platform for development. The Terminal standards are fast becoming the dominant platform for Text First Interfaces.

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#52

Earlier quoted context omitted.

> But I think we will swing back to using GUIs when we find a performant way of making them, I don't know what it is yet but surely someone is working on this. I might be missing something here, but wouldn't any UI toolkit that doesn't live within a WebView work?

Yes, and of those, my impression is that there are niche ones that look OK, game engines that look great but take a lot of work, and then there's just TUIs, which look retrocool and run blazing fast, and are really easy to write.

> and are really easy to write.

And, sometimes, all you want is to output text.

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#54
post #37

Slightly OT, but the next logical steps include, in no particular order: - frameworks for tui development, including react -like DOM shit - further ad-hoc specs building on top of ANSI escape codes for finer control - maybe a scripting language

> - frameworks for tui development, including react-like DOM shit

React-ncurses FTW

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#55

Earlier quoted context omitted.

> But I think we will swing back to using GUIs when we find a performant way of making them, I don't know what it is yet but surely someone is working on this. I might be missing something here, but wouldn't any UI toolkit that doesn't live within a WebView work?

Yes, and of those, my impression is that there are niche ones that look OK, game engines that look great but take a lot of work, and then there's just TUIs, which look retrocool and run blazing fast, and are really easy to write.

> and then there's just TUIs, which look retrocool and run blazing fast, and are really easy to write

I mean, I don't even think that's true. Many TUIs are bloated, dogshit slow, and it's not trivial to write complex TUIs without glitches or flickering. The more people start making TUIs because it's the current fad, the worse they will get.

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#56

Interesting that Jane Street has taken an interest in TUIs, I think mostly this renaissance is partly due to the current bloat of Electron GUIs. There are other great examples of TUIs that i've seen around the web: https://github.com/ratatui/awesome-ratatui https://terminaltrove.com/explore/ https://github.com/rothgar/awesome-tuis But I think we will swing back to using GUIs when we find a performant way of making th…

> I think mostly this renaissance is partly due to the current bloat of Electron GUIs.

I think it's mostly due to the CLI being much more powerful than a full-blown IDE: when you try to make everything simple (in a menu, accessible with one mouse-click or a shortcut), then semi-advanced things (which haven't been thought of in the IDE) become impossible.

They also compose way more easily with the network: it's much easier to SSH/tmux TUIs than to try to network GUIs. That's very important in this day and age of incessant exploits and the need to run things in VMs to try to prevent exploits from pwning your entire world.

TUIs sadly doesn't entirely solve the bloat issue: look at Claude Code CLI... An Electron app because, as the Pi author mentioned, people at Anthropic thought they were writing a game. A full headless Electron app converted, on the fly, to pretend it's a TUI.

The madness is real (shitload of message of users not happy with characters shown on screen not being those saved to source files: and I've been bit by this) and the bloat issue hasn't been solved.

But in any case you cannot go back to a GUI and not have that problem of GUIs being too restrictive: invariably there shall be a need to chain several simple commands that do one thing and that excel at that one thing and that only become powerful when chained with other commands. GUIs cannot solve that.

LLMs have just proved what many knew all along: that the CLI is more powerful.

Instead of GUIs on the contrary I expect more TUIs, more command line, and more, much more, REPL usage by LLMs and by devs using LLMs.

What I do hope though is that we get more lean TUIs (like Pi by Mario Zechner, all the utils written in Rust etc.) and less madness like "headless Electron converted 60 times per second to a fake TUI".

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#57
post #8

I don't really get the TUI craze. Would love it if someone has some perspective that I'm lacking. Display technology has seen so much progress in the past decades. Apple marketing has taught us about "Retina" displays with pixels so small that you can't tell them apart without a microscope. We get these very rich and colorful desktop environments but we actively decide to not use any of that. Now, I get that a TUI ca…

I appreciate TUIs for - Optimizing for fast, keyboard-only usage - Allowing me to customize the presentation according to my preferences - Not having to leave my terminal, where I spend most of my time (I do realize this is something of a chicken-and-egg situation)

Right, not having to leave the terminal is a big one for me too. I live there and every time I start some desktop app, I gotta switch gears, potentially grab the mouse, leave my vim keybinds behind and leave my font and color scheme behind. I just feel more productive on the terminal then on desktop apps.

I think also a big problem of desktop apps is that you have to deal with window management. Now that I am on Niri it is really apparent to me how much I hated juggling windows in pretty much any other window manager that I ever used, except, interestingly enough, tmux.

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#58
post #15

I don't really get the TUI craze. Would love it if someone has some perspective that I'm lacking. Display technology has seen so much progress in the past decades. Apple marketing has taught us about "Retina" displays with pixels so small that you can't tell them apart without a microscope. We get these very rich and colorful desktop environments but we actively decide to not use any of that. Now, I get that a TUI ca…

> Is it because the perceived alternative is another run-off-the-mill Electron RAM guzzler, because there aren't any _good_ GUI widget frameworks? Yeah, I think that is 90% of it. And the whole related ecosystem aspect. All the major ways of building GUIs suck right now, especially for tiny apps. And to further exacerbate the problem, GUI frameworks are generally tied to their programming languages, Qt is C++, SwiftU…

[dead]

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#59
post #31

Interesting that Jane Street has taken an interest in TUIs, I think mostly this renaissance is partly due to the current bloat of Electron GUIs. There are other great examples of TUIs that i've seen around the web: https://github.com/ratatui/awesome-ratatui https://terminaltrove.com/explore/ https://github.com/rothgar/awesome-tuis But I think we will swing back to using GUIs when we find a performant way of making th…

I've been making a modern Slack terminal client ( https://github.com/gammons/slk ) and it's been a joy to use daily. There are a few things that IMO have unlocked a fantastic TUI experience: - TUI libraries like Lipgloss and Bubbletea really allow users to build a rich experience nowadays. Really anything from https://charm.land is well-polished and a joy to use. - Kitty image format works great and allows for Avatar…

I really enjoy using Golang to make TUIs and the Charm ecosystem.

> But I think we will swing back to using GUIs

I've been pushing on BubbleTea Kitty and Ghostty quite a bit to hybridize this. The TUI / GUI distinction to me is about task centrism and delivery. There's an appropriate surface and workflow for every task; beyond TUI/GUI sometime it needs to be a VR headset or an immersive room or a literal sandbox.

A demo of this is web-delivery of our BubbleTea TUI examples ('t' toggles between glyph/kitty):

https://nimblemarkets.github.io/ntcharts/demos/heatpicture-p...

The delivery uses our WIP Booba tool, which is Ghostty-based. The CLI tool can be used to remote or embed any TTY program, but was generally built for BubbleTea. https://github.com/NimbleMarkets/go-booba

I've recently made SVG, PDF, SVG, and OpenStreetMap widgets.... https://github.com/NimbleMarkets/ntcharts-svg https://github.com/NimbleMarkets/ntcharts-pdf https://github.com/NimbleMarkets/ntcharts-osm

Right now I'm working on multiple ds4 TUIs using this stack, for example generating SVGs from a prompt and then rendering it in TUI. Another generates CSG object graphs and renders/composites them in terminal. Here's a gist with screenshots:

https://gist.github.com/neomantra/ae47422c8daf7a458212c93992...

The upstream ds4 project is using C for their TUIs. I have done TUIs in C and C++ (and many other languages) and will not go back to that. Really fun engine though and a great place to stick a TUI. I am a Camel furry (https://cameltopia.org) but wouldn't use OCaml to make a TUI either (makes sense for Jane Street of course).

Re: Strace-ui, Bonsai_term, and the TUI renaissance

#60

Earlier quoted context omitted.

Yes, and of those, my impression is that there are niche ones that look OK, game engines that look great but take a lot of work, and then there's just TUIs, which look retrocool and run blazing fast, and are really easy to write.

> and then there's just TUIs, which look retrocool and run blazing fast, and are really easy to write I mean, I don't even think that's true. Many TUIs are bloated, dogshit slow, and it's not trivial to write complex TUIs without glitches or flickering. The more people start making TUIs because it's the current fad, the worse they will get.

You're probably right. TUIs (being old) have selection bias towards quality. However, my experience writing TUIs is that it's not even the same class of difficulty as writing GUIs. GUIs by any means have way more overhead and learning curve. Not to mention that a TUI is more likely to be immediately CLi compatible via adding a --no-tui flag, or CLI patchable via --tui.
Post reply on HN