Live data from Hacker News

Ratatui

github.com

51–60 of 63 posts

Re: Ratatui

#52
post #6

Earlier quoted context omitted.

For me all of them have Turbo Vision for Turbo Pascal 6.0 in MS-DOS, circa 1990, as baseline to beat. Or the various Clipper based TUI for business data entry, as another example. Since they are catching up with the past, they should improve upon it, not just revisit it.

What more is there? It seems like a feature-complete set once there's mouse support. I suppose adding graphics for iTerm and such could be extras.

There are apps that are built on ratatui that support mouse already including an example in the repo[1], and crates (and some internal changes to the buffer) to support iterm/kitty/sixel based images.[2]

[1]: https://github.com/ratatui-org/ratatui/tree/main/examples#cu...

[2]: https://crates.io/crates/ratatui-image

Compared to TurboVision, Ratatui has a lot of missing things:

- Containers

- Dialog types (I'm working on this in https://github.com/joshka/tui-prompts)

- Higher order combinations of widgets (e.g. combine the scrollbar and paragraph)

- Menus

- Any event system (apps bring their own - we just handle display)

- etc.

- There's lots of things in TV that are provided as external crates (like editors, treeview, etc.)

The main thing is that Ratatui is at least right now, just the display side of things. Things to do with events or application shell aren't built-in. This somewhat stems from the immediate vs retained mode approach to the library, but this may change in the future.

Re: Ratatui

#53
post #47

Earlier quoted context omitted.

Thanks :) That was the result of wanting to do something to celebrate PR 500[1] and being repeatedly nerd-sniped by one of the other maintainers a while back. The source code for the demo[2] is in the repo btw. [1]: https://github.com/ratatui-org/ratatui/pull/500 [2]: https://github.com/ratatui-org/ratatui/tree/main/examples/de...

I see what you did there with the Dr. Horrible reference! :D

Hehe - yeah, I needed an example for the table, and figured traceroute was a good easy one. Then I remembered what happens when you traceroute bad.horse...

Re: Ratatui

#54

Seems like especially for the last year or so, there have been a significant amount of interest in single-language oriented (instead of a single core library w/N language bindings, winking at a particular one) TUI libraries that are getting better and better (potentially because some of them were able to attract VC money). Two of them off top of my head is Textual (by textualize.io) for Python and BubbleTea (by charm…

>able to attract VC money

pass

Re: Ratatui

#55

I love TUI. Nothing beats its clean UI, focus, speed and the resulting productivity. Learn a few shortcuts and fly. We need more TUI apps.

What beats that is a good GUI with all those features but without being limited by the clunky terminal host, which, for example, doesn't support all the power of the keyboard shortcuts

Re: Ratatui

#56
post #55

I love TUI. Nothing beats its clean UI, focus, speed and the resulting productivity. Learn a few shortcuts and fly. We need more TUI apps.

What beats that is a good GUI with all those features but without being limited by the clunky terminal host, which, for example, doesn't support all the power of the keyboard shortcuts

Is that a serious limitation, though? Sure, the terminal cannot support all the keyboard interactions that an old-style DOS TUI could use, but it can get pretty close for most purposes.

Re: Ratatui

#58
post #44

Earlier quoted context omitted.

I also love TUI, and ratatui in particular, but ... are there any TUI frameworks with accessibility features? Is that even possible? I worry that we've taken the TTY, a foundational accessibility device, and found a way to slap an inaccessible technology layer on top of it.

It's something I've thought about a little, but I haven't seen anything that does it. There's some pretty large blockers though. TUIs get by on effectively rendering text all over the screen, potentially out of order, and potentially without respect to whether that text makes any logical sense. AFAIK, There's no way to attach metadata to screen characters or regions that would mark up things as buttons / inputs / out…

In particular, curses(3) was the "virtual DOM" of its day, so its output can be arbitrary pieces of TUI elements, and it may and will re-render an element with different terminal control strings if it can save bytes on the wire (recall: this was at ~300 baud) by grouping neighbouring updates.

Re: Ratatui

#60
post #55

Earlier quoted context omitted.

What beats that is a good GUI with all those features but without being limited by the clunky terminal host, which, for example, doesn't support all the power of the keyboard shortcuts

Is that a serious limitation, though? Sure, the terminal cannot support all the keyboard interactions that an old-style DOS TUI could use, but it can get pretty close for most purposes.

If you want to fly with a few shortcuts it is, otherwise no: most of the apps illustrate that "most purposes" can be served with pretty bad keybinding support
Post reply on HN