3 ms·
Yeah, I think Rust makes some sense, and I do think I've done a few clever things like getting a linear-time "sort" by exploiting the fact that there's a discre
by tombert 1y ago
Yeah, I think Rust makes some sense, and I do think I've done a few clever things like getting a linear-time "sort" by exploiting the fact that there's a discrete and finite number of "scores" [1], and avoiding copies by taking the indexed values and explicitly moving them into the source channel to avoid extra copies [2].
Someone smarter than me who is more familiar with TUI programming could almost certainly augment and improve what I wrote; I worked on it for as long as it was interesting to me. I use it for my home-built program launcher thing Sway, though most people would probably get better results with real fzf.
[1] https://github.com/Tombert/rs-fzf-clone/blob/main/src/helpers.rs#L54 https://github.com/Tombert/rs-fzf-clone/blob/main/src/helper...
[2] https://github.com/Tombert/rs-fzf-clone/blob/main/src/processors.rs#L359 https://github.com/Tombert/rs-fzf-clone/blob/main/src/proces...