4 ms·
Ratatui
- jordanreger 3y agoExtra points for the awesome demo GIF!
- joshka 3y agoThanks :) 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 https://github.com/ratatui-org/ratatui/pull/500 [2]: https://github.com/ratatui-org/ratatui/tree/main/examples/demo2 https://github.com/ratatui-org/ratatui/tree/main/examples/de...
- lambdatronics 3y agoI see what you did there with the Dr. Horrible reference! :D
- joshka 3y agoHehe - 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...
- treesciencebot 3y agoSeems 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.sh) for Go.
- lc9er 3y agoSpectre.Console for dotnet.
- pjmlp 3y agoFor 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.
- kragen 3y agois there a good publicly available video that demonstrates what is good about these user interfaces, or alternatively, something that a non-expert user could run in dosbox to get a feeling? is the notably excellent part the user experience of the things that people built, or the library calling interface, or both? business data entry seems like something that probably requires an experienced user running the application to show what's good and bad about it my own 'baseline to beat' is fractint, which is pretty much unchanged in xfractint, which you can install from apt on debian. you just have to imagine it running fullscreen on a svga
- mixmastamyk 3y agoWhy a video? Here's a recent port: https://github.com/magiblot/tvision https://github.com/magiblot/tvision
- jrumbut 3y agoThe video is to display what an expert can do with it, if I understand correctly. In undergrad, I worked nights in a warehouse where most things were managed by a very complicated TUI program. The learning curve was quite steep. What someone could do after 6 months of using it was completely different to what a beginner without a trainer could do. You wouldn't be able to see what is good about it by just setting it up on your own computer and playing with it (and of course you probably don't have a busy warehouse to manage).
- enricozb 3y agoI 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/ https://docs.rs/intuitive/latest/intuitive/
- nicoburns 3y agoYou should check out dioxus’s TUI support
- withinboredom 3y agoIf you like php, there’s termwind that combines html + tailwind. Combine that with something like the swytch framework, and you’ve got a pretty similar to react workflow (components, still working on hooks, tui, etc). The things we work on when we are bored…
- airstrike 3y agoLove the SwiftUI inspiration. Swift has its warts but after spending a couple months deep in SwiftUI I miss it dearly when I'm writing GUIs anywhere else
- srott 3y agoReact & tui https://www.npmjs.com/package/react-blessed https://www.npmjs.com/package/react-blessed
- joshka 3y agoI 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/sxyazi/yazi - https://github.com/TaKO8Ki/gobang https://github.com/TaKO8Ki/gobang - https://github.com/nomadiz/edma 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 https://crates.io/crates/tui-react
- fnordpiglet 3y agoUse ratatui in all my tooling, it’s great. Very simple immediate mode api that eschews most of the complex framework insanity.
- n8henrie 3y agoDo you have any public examples of your real-world projects?
- varbhat 3y agoratatui 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 https://github.com/ratatui-org/ratatui/issues/273
- Varimpls 3y agoI think this application uses click events https://www.github.com/mrjackwills/oxker https://www.github.com/mrjackwills/oxker
- joshka 3y agoIt'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/f767ea7d3766887cb79145103b5aa92e0eabf8f6/examples/custom_widget.rs#L241 https://github.com/ratatui-org/ratatui/blob/f767ea7d3766887c...), it just means there's not deep support for events in any way in Ratatui.
- neverrroot 3y agoI love TUI. Nothing beats its clean UI, focus, speed and the resulting productivity. Learn a few shortcuts and fly. We need more TUI apps.
- baq 3y agoThe worst part is there's absolutely nothing stopping anyone from making the same principles work in the browser. Zero. Nada. It's trivially proven by compiling apps to wasm and running in a terminal emulator but there's nothing stopping anyone from building react-terminal-like or whatever except that... I don't even know what since we've got https://github.com/Textualize/textual-web https://github.com/Textualize/textual-web. People have thrown out decades of UX research and engineering out of the window because it isn't cool anymore. Makes me sick.
- Aurornis 3y ago> People have thrown out decades of UX research and engineering out of the window because it isn't cool anymore. Makes me sick. Most people don’t want to browse the web with a keyboard. Traffic to many websites primarily comes from mobile devices with touchscreens. It has nothing to do with being “cool”. Terminal interfaces are great for those of us who spend a lot of time attached to the keyboard, but most people don’t operate like that.
- speed_spread 3y agoIt's not about the keyboard, it's about discoverability and standards. Designers think their ideas are sooo good that they warrant overthrowing previously established norms of computer interaction. You now need to re-learn where things are for every new "application".
- sshine 3y ago> Most people don’t want to browse the web with a keyboard. You can easily add mouse support for the equivalent of a TUI. Unlike CLIs (and shells) which requires learning a language and memorizing, TUIs give you relevant options. > most people don’t operate like that I'm convinced that if more UIs were simpler state machines, computers would be easier to use for non-programmers.
- chaosprint 3y agogreat 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 https://github.com/glicol/glicol-cli
- joshka 3y agoI'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.
- binary132 3y agoStuff like this is cool, and I like a nice TUI, but it’s really not for everyone. It always makes me think about how I’d like GUIs to be more like the TUIs I know and love, and what a pain it seems to be for the world to converge on good, simple GUI toolkits that aren’t HMTL+JS. Please don’t say QT or GTK+....
- arcanemachiner 3y agoBest I can do is Flutter :/
- zozbot234 3y agoTUI's are closer to the HTML+JS paradigm than most GUI's are. There's nothing inherently wrong with that, especially when styled via CSS.
- kdheepak 3y agoThanks 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/ https://ratatui.rs/ Happy to answer any questions here too!
- deafpolygon 3y agoI got me a ratatui... https://www.youtube.com/watch?v=XWAWgEsbrXI https://www.youtube.com/watch?v=XWAWgEsbrXI
- ShadowBanThis01 3y agoIs what?
- ku1ik 3y agoDiscord though...? :/
- joshka 3y agoThere's also a matrix bridge and Github discussions if you'd prefer those options. It's difficult to choose a place to build a community - particularly ones that are non standard so Discord works for us right now. Have you got suggestions on other services that would work better for this sort of thing? Seeing examples of thriving developer communities in places other than Discord would help convince people that it's worth changing.