Live data from Hacker News

Strace-ui, Bonsai_term, and the TUI renaissance

blog.janestreet.com

81–90 of 91 posts

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

#81

Earlier quoted context omitted.

> 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.

I suppose. I think it depends on your tooling somewhat. I mean, looking at the feature article, Bonsai lets you define TUI elements with an HTML-inspired syntax -- so if you're using that, it's a similar difficulty as writing a web interface, minus starting a server, Electron, or styling stuff yourself. You can just stay in the terminal. That's nice! But if you don't have such facilities and you want something more elaborate than just sequentially printing information, TUIs can be a bit rough.

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

#82

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 one of the big appeals of TUI's is that it is easier for it to be cross platform. Crush looks the same on macos and linux, provided you have your terminal setup correctly.

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

#83

Earlier quoted context omitted.

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.

I suppose. I think it depends on your tooling somewhat. I mean, looking at the feature article, Bonsai lets you define TUI elements with an HTML-inspired syntax -- so if you're using that, it's a similar difficulty as writing a web interface, minus starting a server, Electron, or styling stuff yourself. You can just stay in the terminal. That's nice! But if you don't have such facilities and you want something more e…

Ratatui is pretty great. Try it out.

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

#84

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've long been a tmux+vim user and one advantage is you can connect to exactly the same session from different places in a way just not practical with guis

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

#85

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…

[flagged]

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

#87

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…

> 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, but there isn't one. Thats why everyone went to shipping v8 & a webview

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

#88
post #10

Earlier quoted context omitted.

for snapshot tests it seems better to diff a data representation such as some yaml string, than to diff UIs

The whole UI seems better for LLMs to consume and also displays nicely in-editor for humans. Test failures become failing screenshot tests essentially, which are really comfortable changes to review.

"displays nicely in-editor" is the whole point of yaml. The snapshots in the article are just yaml with additional useless ASCII characters

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

#89
post #88

Earlier quoted context omitted.

The whole UI seems better for LLMs to consume and also displays nicely in-editor for humans. Test failures become failing screenshot tests essentially, which are really comfortable changes to review.

"displays nicely in-editor" is the whole point of yaml. The snapshots in the article are just yaml with additional useless ASCII characters

Yaml is just a serialization of some intermediate representation. The expect test output in the article is a full-fidelity (minus color) rendering of the UI. I would argue that the final app UI is both easier to read for humans and covers more code. As an example, a naive yaml test would likely not capture positions of all of the elements in the app and so you’d be able to silently introduce positioning bugs. On the flip side, if the yaml does include positioning information then it’s now substantially harder to read than the UI test and the signal from the test is compromised because readers will have a harder time understanding and be more likely to ignore.
Post reply on HN