Live data from Hacker News

Building a TUI is easy now

hatchet.run

161–170 of 262 posts

Re: Building a TUI is easy now

#161
post #156

Earlier quoted context omitted.

If the render is already made in JavaScript it makes sense to reuse react as the reconciliation engine instead of building one from scratch.

No, no it makes exactly zero sense to have a "reconciliation engine" or React in a TUI. There's nothing to reconcile. You can just output a stream of characters as fast as they appear.

That’s not a TUI, that’s a CLI.

Any stateful UI needs a state management backend and a rendering frontend, React isn’t a bad choice for the former.

Re: Building a TUI is easy now

#162
post #144

Earlier quoted context omitted.

Here's why I use them: many modern graphical applications are extremely wasteful. TUIs are typically small, low footprint applications that don't come bundled with a browser or webview. I don't need yet another electron app for every little thing.

I’m definitely not advocating more little electron apps, and I’m totally with you on TUI’s benefits. I’m bemoaning the lack of imagination that has ended us up here and not in a situation where we can have, say, a small, low-footprint application that can deliver a more structured UI with minimal dependencies. It’s not an impossibility, it’s not even that difficult to imagine, we just don’t have the exact technology.

I'm with you.

The thing is Windows 98 let you throw up a HTML window with almost zero overhead (the OS used the same libraries) and javascript could get data easily from another process via COM etc.

Now like 25 years later, apparently our choices are shipping bespoke copies of Chrome and Node, OR making shit work on an emulated 1981 DEC terminal. Lack of vision is exactly right.

Re: Building a TUI is easy now

#163
post #159

I genuinely don't understand the TUI obsession for LLM applications. Go watch copilot drive VS2026 if you've never seen it in action. There is no way you are going to be able to communicate this same amount of information via plain text in the same amount of time. I can catch a lot of bad stuff mid-flight because I can actually multitask my UI and click into diffs as files are edited in real time.

The reason is simple: the TUI is the fastest way to provide any form of UI over the file system. Want to do that with web technologies? You’ll need a browser AND a server or build an app using electron or tauri.

I don't disagree. However, the TUI seems to have become the final destination for some major AI vendors. This doesn't look like a stepping stone to me.

Re: Building a TUI is easy now

#164
I knew this would be ANOTHER ai glazing post before even clicking. I think we must specify if a post is about AI in titles. Another "I built X" with AI really brings nothing to the table, and I've seen a few users agree with me on this.

https://news.ycombinator.com/item?id=46580844

Here's a similar situation, a submission called "webdev is fun again", and what you find inside is just gushing about how good AI is. Genuinely what value does it bring? I think this phenomenon is literally "clickbaiting" but on hackernews

Other users from here seem to see the same thing that I do:

https://news.ycombinator.com/item?id=47008412

https://news.ycombinator.com/item?id=47010624

Re: Building a TUI is easy now

#165

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…

While I agree with your point, I don't understand why you added:

> here's what Gemini says

Surely, if people care to see LLM generated text, they can do it themselves.

Re: Building a TUI is easy now

#166

I genuinely don't understand the TUI obsession for LLM applications. Go watch copilot drive VS2026 if you've never seen it in action. There is no way you are going to be able to communicate this same amount of information via plain text in the same amount of time. I can catch a lot of bad stuff mid-flight because I can actually multitask my UI and click into diffs as files are edited in real time.

I don't use VSCode as my editor, but I found out recently you can open the AI agent sidebar as a separate window, and it's been fantastic - it's mostly replaced Claude Code and other similar TUI tools. It's not quite full integration, but the UI is so much easier to use, because you can be more precise. Rather than having a global "more information" toggle that expands everything like in Claude Code or Pi or whatever, I can specifically inspect the bits of information that I'm interested in. There's two parallel subagents running and one of them is doing unusual things? I can explore exactly what it's doing in more detail.

It helps that VSCode has really improved in the last couple of releases - before then, the features available in Claude Code were useful though that it was worth using despite the baggage, and there's still a handful of things I miss in VSCode. But I think the visual information density and acuity that you can get out of a GUI application is far beyond what you can ever achieve in a TUI, and I think as these tools start reaching something like feature parity, that makes GUIs a lot nicer to use.

Re: Building a TUI is easy now

#167
post #112

Earlier quoted context omitted.

Sure it is. I, and millions of others, use it all the time with for example Termux.

My Ratatui test app (Conway's Life) runs great in Termux. :)

Termux is seriously amazing (with its quirks, of course)!

Have you tried porting your test app to a web page? I'd really like to have a good TUI experience on the web.

Re: Building a TUI is easy now

#168
post #144

Earlier quoted context omitted.

Here's why I use them: many modern graphical applications are extremely wasteful. TUIs are typically small, low footprint applications that don't come bundled with a browser or webview. I don't need yet another electron app for every little thing.

I’m definitely not advocating more little electron apps, and I’m totally with you on TUI’s benefits. I’m bemoaning the lack of imagination that has ended us up here and not in a situation where we can have, say, a small, low-footprint application that can deliver a more structured UI with minimal dependencies. It’s not an impossibility, it’s not even that difficult to imagine, we just don’t have the exact technology.

We do. We are only stubborn. Cross platform and low-footprint:

  .net core => avalonia ui
  Java => JavaFX

Re: Building a TUI is easy now

#169
Hey! This looks great, and I appreciate the effort! But just opening the page at https://tui.hatchet.run/ causes my (admittedly old Intel i7 9700K) to spin up its fans and consume >30% of the CPU without me even doing anything. I don't think a TUI should do that.

I was also intrigued by it being a lot of Go dependencies as I have developed a bit of a fancy for this language recently.

Re: Building a TUI is easy now

#170
post #126

Earlier quoted context omitted.

While you are at it, it would be good, if the post was readable at all, without having to run JS on the page.

It rendered perfectly, without JavaScript, in Emacs EWW.

I think perhaps Emacs does not support the `hidden` attribute?

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

If you check the source (not the DOM) the actual content is loaded in ` ...` which is then moved/copied into the proper main content div in the DOM using a JS event it seems.

Post reply on HN