natecraddock / zf

a commandline fuzzy finder and zig package designed for filtering filepaths
MIT License
449 stars 14 forks source link

The great simplification #59

Open natecraddock opened 6 months ago

natecraddock commented 6 months ago

Lately I find it hard to want to work on zf. I really love the core of it (the fuzzy algorithm), but much of the supporting code is a maintenance burden

So... Here is the tentative plan

  1. Remove ziglyph and drop support for unicode.

    When I first started work on zf I figured this was a standard and useful feature. I have never needed it. I checked fzf and fzy and neither fully support unicode either. Both are quite popular, so I think this is fine to remove.

    Terminals are awful at handling multi-codepoint graphemes anyway

  2. Replace the TUI code with a library

    Possibly ncurses. I'm considering using https://github.com/rockorager/libvaxis depending on how stable it seems with initial tests. Or maybe https://github.com/dankamongmen/notcurses.

    The benefit here is we would get great TUI support, which makes it easier to add some nice features.

  3. Use libuv for the event loop

    My initial research shows that libuv is the only cross-platform event loop that handles the /dev/tty problem.

I'm guilty of trying to build everything myself. I think it would be great to rely on some other projects so I can continue to focus on what makes zf great: filtering filepaths.

Resolving this will close

And open the way to finally implement https://github.com/natecraddock/zf/issues/25

natecraddock commented 2 months ago

It's been several months since I wrote this. It's time, with some modifications from the original plan.

  1. Use libvaxis. It seems like the perfect library for zf https://github.com/rockorager/libvaxis
  2. Remove ziglyph

There shouldn't be a need for libuv or libxv if I use a thread for input