Show HN: Ssort – I got sick and vibe coded a stream priority sorter

1 pointsposted 11 hours ago
by xlii

2 Comments

treetalker

10 hours ago

Layperson question: how does this differ from, say, piping something to fzf; and what advantages does it have over that?

xlii

8 hours ago

Good question - main thing is that it's saving time on repeatable searches and optimize search.

I was working with Elixir without ability to use LSP and so, my flow often looked like this:

    > rg "defp|def\b|def_rule|def_helper" . | rg "something"
Only to find that someone made a "def_instruction" and it's there. I didn't want to filter our, I just wanted to... sort.

With config file I can do a simple

    > rg "something" | ssort ~/ssort/elixir_methods
    > # or if I use it often
    > alias ssort-elixirm "ssort ~/ssort/elixir_methods"
    > rg "something | ssort-elixirm
This can be solved by working LSP though, what working LSP can't solve though is:

    > rg "impl" | ssort-elixirm | ssort -f MyCompany
But (given as it looks like it was buried) it's a microoptimization for CLI search freaks ;)