Live data from Hacker News

Whohas – Command-line utility for cross-distro, cross-repository package search

github.com

41–42 of 42 posts

Re: Whohas – Command-line utility for cross-distro, cross-repository package search

#41
post #22

Shame Homebrew for Linux is getting no love from any of the tools / lists mentioned here. Since switching to that and flatpak my distro choice is "what sticks closest to the upstream of [my preferred DE]"

Do Linux users actually use Homebrew day to day? My impression of it was that it's mostly for MacOS users that want to keep doing things the same way instead of learning the Linux way (using the OS package manager).

Ohh yes, a minority of us do exist. I prefer it over appimages on my personal pc. Gets you almost rolling release software without needing to use a rolling release. I used to use distrobox with arch Linux on pop os base, but then just gave homebrew and nix a try to scratch the itch.

Nix is not there yet in terms of user friendliness. homebrew for linux is pretty awesome.

Only issue i have is that it creates a separate user and doesn’t support custom prefixes (their page says you are on your own if using custom prefixes). While their reasoning is sound, not having an easy way to know which programs will break if using custom prefix is a bummer for me at work.

Re: Whohas – Command-line utility for cross-distro, cross-repository package search

#42
post #36

Earlier quoted context omitted.

Does it still work, though? Where else would you put the repository domains?

I would put them into a configuration file. You know, so people can configure which repositories are being searched. Generally I advice against hard doing stuff that changes often and may need to be adjusted for different users or organizations.

The search APIs are separate from the repository URLs, and the different distros' APIs need to be parsed in different ways. And before you ask, the search APIs have to be separate from the repositories, if you don't want to waste disk, network, and time keeping hundreds of local index files up-to-date every week.

They can't just be "configured" by changing a URL. I guess maybe you could self-host the search page for some of the distros, and reuse the parser, but are people really doing that? Otherwise, you'd have to write new code to parse the results, at which point you might as well soft-fork the script anyway.

> Generally I advice against hard doing stuff that changes often and may need to be adjusted for different users or organizations.

YAGNI. And if your org does need it for some reason, you're probably better off running something specifically tailored for your own needs instead of whatever implementation makes it in.

The whole script's only 1300 lines. Would adding spending 150 lines on configuration and littering the user's dotfiles be worth it? Now what happens if the configuration's missing/corrupted? When you update the script, do you keep the old dotfile that might be using a deprecated API, or do you replace the old configuration and clobber any customization the user's done? Oops, there go another 1,000 lines, on edge cases, option flags, conf merging, warning messages... And good luck getting bug reporters to explain their configuration changes!

Also, this stuff doesn't "change often". The distros literally can't change it often, because doing so might break LTS stability. I know it's fun to point out perceived flaws in other people's work, but in this case, the URLs are tightly bound to the parsing logic, which is the right place to put them IMO.

Post reply on HN