Show HN: RatatuiRuby wraps Rust Ratatui as a RubyGem – TUIs with the joy of Ruby

https://news.ycombinator.com/rss Hits: 3
Summary

Inline Viewports Standard TUIs erase themselves on exit. Your carefully formatted CLI output disappears. Users lose their scrollback. Inline viewports solve this. They occupy a fixed number of lines, render rich UI, then leave the output in place when done. Perfect for spinners, menus, progress indicators—any brief moment of richness. class Spinner def main RatatuiRuby.run(viewport: :inline, height: 1) do |tui| until connected? status = tui.paragraph(text: "#{spin} Connecting...") tui.draw { |frame| frame.render_widget(status, frame.area) } return ending(tui, "Canceled!", :red) if tui.poll_event.ctrl_c? end ending(tui, "Connected!", :green) end end def ending(tui, message, color) = tui.draw do |frame| frame.render_widget(tui.paragraph(text: message, fg: color), frame.area) end def initialize = (@frame, @finish = 0, Time.now + 2) def connected? = Time.now >= @finish def spin = SPINNER[(@frame += 1) % SPINNER.length] SPINNER = %w[⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏] end Spinner.new.main; puts

First seen: 2026-01-21 22:41

Last seen: 2026-01-22 00:41