Live data from Hacker News

Ratatui

github.com

41–50 of 63 posts

Re: Ratatui

#41
post #6

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…

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.

Core Ratatui dev here. Fun fact, I played a lot with these libraries when I was in a kid in the 80s/90s learning Pascal and C++. I never played with clipper though.

Re: Ratatui

#42

Earlier quoted context omitted.

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.

I think mouse support would defeat the purpose of a terminal UI.

Core Ratatui dev here.

Mouse events are supported by the underlying backend libraries (e.g. crossterm). There's an example custom widget that shows how to handle these in Ratatui at https://github.com/ratatui-org/ratatui/blob/f767ea7d3766887c...

Note the code is fairly manual as Ratatui doesn't provide any abstractions over the input side of UIs - just the output. (yet?)

Re: Ratatui

#43
Thanks tosh, for sharing the project here! I'm one of the maintainers of Ratatui, and was pleasantly surprised to see this on HN.

I just wanted to add that we are welcoming contributions, so if you are interested please join us on GitHub for more discussions, feature requests or bug reports.

If you've built something cool with Ratatui, we'd love to hear about it on Discord or make it part of our showcase pages.

And if you are wondering what Ratatui is, check out our (fairly new) website for tutorials for getting started: https://ratatui.rs/

Happy to answer any questions here too!

Re: Ratatui

#44

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.

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 / outputs / etc.

That said, I suspect that the right modality for accessibile command line apps is repls / cli apps rather than TUI apps.

Re: Ratatui

#45
post #12

ratatui is very good Rust TUI toolkit right now. But, it doesn't support mouse click events yet[0]. I hope that they implement this feature as i think it's critical to some TUI applications. [0]: https://github.com/ratatui-org/ratatui/issues/273

It's a bit broader than this - Ratatui doesn't support events at all. It's not a UI framework, it's a display library (i.e. you call us, not we call you). That doesn't mean you can't do Mouse events (there's an example of this in https://github.com/ratatui-org/ratatui/blob/f767ea7d3766887c...), it just means there's not deep support for events in any way in Ratatui.

Re: Ratatui

#46
post #5

I really wish there was a more react/swiftui-esque TUI library. One day I'll get around to fixing the fundamental flaws in my crate [0] [0]: https://docs.rs/intuitive/latest/intuitive/

I think a lot of Ratatui apps will tend to land on similar concepts for your app. There's a few good examples of apps using a component approach rather than just widgets that I'm aware of:

- https://github.com/sxyazi/yazi

- https://github.com/TaKO8Ki/gobang

- https://github.com/nomadiz/edma

Perhaps the intuitive crate would make a good abstraction on top of Ratatui?

There's also https://crates.io/crates/tui-react

Re: Ratatui

#47

Extra points for the awesome demo GIF!

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

Re: Ratatui

#48

great to see tui-rs can be continued in this way! should try ratatui for glicol-cli at some point. you can have a look on how I use tui for music live coding: https://github.com/glicol/glicol-cli

I've actually got a ratatui update for glicol that I haven't pushed because I was stuck on a bug in the way the background thread continues after the UI exits. I'll flip you a PR.

Re: Ratatui

#49

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…

Textualize and BubbleTea are both things I look to for inspiration in what Ratatui could be. Eventually, I'd like to make widgets look great with sensible defaults and support themes that allow for customization.

We use Charm's VHS for scripting the generation of images for all our examples, so definitely some thanks to distribute there in addition to the inspo.

Re: Ratatui

#50
post #47

Extra points for the awesome demo GIF!

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
Post reply on HN