I've been playing around with the `gum` gem from the `charm-ruby` ecosystem to glam up my scripts and aliases. I wrote a script that makes your scripts available from anywhere on your system.

#ruby #gum #charmruby #devlife #nasa

@jaggiesweekly nice, looks great! Thanks for giving it a shot! 🙌🏼
@jaggiesweekly I also notice the redraws are still a bit janky. But I have an idea how we could make this smoother.
and do you want some help with it @marcoroth?

@jaggiesweekly yeah, always open for contributions!

In this case, we are using the prebuilt gum binary. But I think it would make sense to re-implement gum-ruby with the new primitives we have from the other charm-ruby libraries.

That what, it doesn't have to shell out, and sluggishly redraw the screen.

@marcoroth heya! I would like to give it a shot! which primitives are we talking about? are there some references for me to look up?

@jaggiesweekly The Go version of `gum` is mostly built using the `bubbles` and `lipgloss` go libraries.

But, we now also got `lipgloss-ruby` and `bubbles-ruby` ported an available from Ruby, so I think we could re-implement `gum-ruby`, by relying on `lipgloss-ruby` and `bubbles-ruby` and by replacing the current approach we have with shelling out to the `gum` binary.

For reference:
https://github.com/charmbracelet/gum
https://github.com/marcoroth/gum-ruby
https://github.com/marcoroth/lipgloss-ruby
https://github.com/marcoroth/bubbles-ruby

GitHub - charmbracelet/gum: A tool for glamorous shell scripts 🎀

A tool for glamorous shell scripts 🎀. Contribute to charmbracelet/gum development by creating an account on GitHub.

GitHub

@jaggiesweekly I feel like that would make sense from an ecosystem point of view. But I think it would also resolve that flickering and these redraw issues you can see.

Does that make sense?

@marcoroth yeah, that makes perfect sense, but just to confirm... which flickering and redraw issues are you talking about? I didn't dig into the code yet, but as I said, I want to give it a shot. what do you think about circling back to this in about a week so we can see where I am with it?

@jaggiesweekly For example, in the clip you showed in the original toot, when you select an option from that list, it clears the select, then there's a short moment where it's just blank and then the code viewer shows up.

But yeah, sounds good. Let me know if you need anything! 🙏