Hacker News new | ask | show | jobs
by lazyjones 2369 days ago
Bad naming..

  WHAT(1)                   BSD General Commands Manual                  WHAT(1)
  NAME
       what -- show what versions of object modules were used to construct a file
(MacOS ...)
9 comments

This is in the top class of utilities (htopm etc).

A good name could probably be bwtop, or tcptop or iftop.

Actually I searched for these, and turns out iftop exists! (https://linux.die.net/man/8/iftop)

My complaint about the name is that it would be hard to "google" it. This means if I don't bookmark it or remember where I found it, then a couple of years from now when my laptop needs to be rebuilt, I'll have the darndest time finding it to install it again.
This effectively made github my second search engine. We should have an AskHN on how to find software in general.
I’m using multiple search engines more and more. Possibly this is due to me usually bypassing google to avoid the ad laden hits. A view with search results from a few sources comes to mind as a solution. Another back burner project.
You can do this with browser search engines, but as a DuckDuckGo user, I can !bang search_term (`!gh`, `!github` to search in github.) Now, I think DuckDuckGo is very lacking in terms of Zero-click searching, but if I know where to get information I can !bang to it (e.g., `!hn what`) or if you're feeling luck `\hn what` will open the first search result. Much better than spending an afternoon setting up search engines.
3 year long user of DDG, never knew about the feeling lucky (\) option.
DDG has an Instant Answer API: https://duckduckgo.com/api
Hackernews Search is a better google for cool things I've found on the internet.
I just type in what I’m looking for and “news.ycombinator.com” at the end so that it links to a HN page. Sometimes I have to use site: to make sure it’s actually from HN, but works reasonably well.
with duck duck go you can just write !hn instead.
Every browser has book marking syncing in some capacity these days. It's the equivalent of losing contacts with a new phone in 1999.
Not without creating an account, on Android.

Chrome has no other export functionality. And firefox copied that lack-of-feature without even realizing the motivations.

So now one have to copy them one by one.

I must be misunderstanding something here, can you please explain the missing feature?

I load a set of bookmarks into Firefox on client machines regularly, but I suspect this isn’t what you are discussing.

I'm are talking firefox/chrome for android only. The only way to export bookmarks (and possibly import) is to register for an account and sync them.

There is no way to export them to an xml/whatever file (pretty sure you could at least in firefox before, but I guess it was too hard to maintain...).

Or create an account?
Surf with chrome logged in? Will never happen. Hard no as long as my sanity remains.

Firefox, maybe, haven't looked into it and just the process of evaluating it isn't worth it. Mozilla doesn't have the track record that I want to blindly trust them with that either.

I wouldn't recommend putting the onus on the end user to remember how to find your product. Too many assumptions.
That was a response to them having an issue with losing bookmarks. Are bookmarks in general now a negative onus?
As search engines have gotten better over the years, I find my use of bookmarks is usually write-once read-never.

Part of that is due to the fact that iOS is now my primary consumption platform, and finding bookmarks in a complex structure is much more awkward than it should be.

Part of it is just laziness: trying to manage a complex bookmark folder is more work than I care to do when search engines give me 99% of what I need.

iftop is a remarkably useful utility. It's often one of the first things I install on new openwrt installations.
Ever since I installed SQM on openwrt, I don’t really care what’s using the bandwidth anymore since it doesn’t impact any other users on the network. :) It’s true though that iftop is a very useful tool.
Still nice in some cases to find applications/devices that are going wild due to a bug
iftop (and ifstat) are part of my preseed file, along with tcpdump, (and htop/iostat/pidstat/mpstat)

For a router I'd also put ntopng on.

Another option, since there are so many "tops," is something like psbw... Process bandwidth. Reminiscent of ps ax but ps bw.
whatif or whif would be great names
i really like whatif.

whif less so, that just doesn't seem to smell right.

‘whatop’
tbqh reading `iftop` is not easy at all
'whence' would be more specific – it's archaic in English, it means 'from where' – although it's used within the ksh shell.
‘whence’ is POSIX-reserved even in shells that don't implement it¹. (‘what’ is also in POSIX². And ‘who’ is on first³.)

¹ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...

² https://pubs.opengroup.org/onlinepubs/9699919799/idx/utiliti...

³ https://youtu.be/kTcRRaXV-fg

zsh also implements whence
ksh as well. Found someone’s reference to various “what” type commands[1]:

> The whence command is a Korn Shell feature that tells how a name would be interpreted by the shell: it detects commands and aliases, and searches your path.

[1] http://www.robelle.com/smugbook/whence.html

Perhaps 'whip' for 'what internet protocol'?
Is there a website one can test names against? Of course you can locally but that doesn't easily cover the distros you might be thinking of targeting.
I doubt any of these will help you if you pick the name of a shell builtin, but:

The closest (but not perfect) answer I know of is the open source project name checker (http://ivantomic.com/projects/ospnc/).

Repology (https://repology.org/projects/?search=what) can also help a bit, but it's less of a direct answer.

Another thing that isn't perfect but could help is doing a search of package contents of a large distro, e.g. here's a search of Debian for packages that provide a file called "node": https://packages.debian.org/search?searchon=contents&keyword...
The author has renamed this project to 'bandwhich'.
Good. Not a beautiful name but distinct, and still captures some of the meaning of the tool.
This is the main problem keeping me from using this right now. I don't like installing binaries that conflict with system package names because I'm tin foil about stability and the super small chance that some installation/config script for some other package I rely on references `what` and breaks.

@imsnif 2 questions:

1. Any chance you'd be willing to rename the package? I get it if not, but that would be so dope. 2. Would you consider putting this up as a cask on Brew? Brew is essentially the most popular package manager for Mac that I know of. This isn't as big of a deal for me honestly, but thought I'd ask.

1. Done. It's now known as "bandwhich" 2. This is in progress: https://github.com/imsnif/bandwhich/issues/9
I love the name.
When the bb is slow, it might be because someone is "hogging" the bb - so maybe "whathog"?

or "wiccapig/wicpig" (whichhog) ;-)

A good name would be "nettop"; it's so good that several projects (on github alone) have already used it as the name of some network monitor. The shortened "ntop" is also taken. At least two projects have claimed "iptop".
nettop already exists on macOS and does the same thing.

https://www.unix.com/man-page/osx/1/nettop/

cargo install what (fails)

  Package `trust-dns-proto v0.18.0` does not have these features: `tokio-compat`
(MacOS 10.15.2)
This is one of the biggest problems I've had with any neat Rust thing posted up here. The language changes a lot. I have rust/cargo 1.37.0 installed (it's the latest marked stable in Gentoo) and adler32 v1.0.4 fails to compile with "`core::slice::<impl [T]>::len` is not yet stable as a const fn". I'm installing 1.40.0 from the unstable tree to see if that will build it.

I've had situations where I'm either not on the latest version of rust, or I'm on too current a version of rust, which deprecated/removed some feature needed for a dependency. I'm not sure if devs can define their min/max versions, but that kinda check should probably be done before cargo starts building packages.

Agreed, and I had the same problem. It seems like an easy fix to add a requires_rust_version thing in Cargo.toml, and devs could at least set it to "the version I'm currently using" so we know it's guaranteed to build on that.
It’s not that easy; the real world has a lot of complexity. That said, we finally did accept a design for this in October; it’s not clear when it’s going to land though.
Because of dependencies, you mean? Even an indication of "this builds fine for me at version X" would be good.
Tons of stuff. Various aspects of dependencies, for example, should this affect resolution? Is this a semver range? A minimum version? Is whatever we choose reasonably forward compatible for any extensions we might pick in the future? Can you write `cfg` attributes based on versions? Many of the same questions apply there. Etc etc etc.

It took about a year to get stuff figured out.

There's no such thing as a "too current a version of rust". All Rust compilers (since 1.0) compile all previous versions of code and will continue to do so.

In the rare case you might hit something that was removed/modified because of a security exploit, but those are very very rare.

This is not true in practice. Old code has failed to compile for various reasons; off the top of my head, new additions to the prelude, and denied lints that became more restrictive. It's not super rare.
Just a nitpick: Rust 1.40 seems to be the stable version for a couple of weeks now.
First, it’s really cool that their using trust-dns! Second, they probably want to upgrade to the 0.18 release. It’s interesting that the cargo.lock file didn’t restrict the package versions for this case.

Anyway, this tool should probably upgrade to the current 0.18 release now that it’s out, if possible.

More evidence that the best names are short, pronounceable, and meaningless, like Hadoop. Git almost qualifies, except for the fact it's a pejorative, so using a really obscure or off-the-wall word is almost as good.

Marketers were forced into this by trademarks, but it shouldn't take the threat of a trademark lawsuit to convince you that stepping too close to something else's toes is annoying for everyone.

(And don't be afraid to go with words that have negative meanings: Aside from git, MUMPS has been a successful medical records database environment for decades.)

How is Git pejorative?

I haven't heard that word used like that, but I've only heard it to refer to the vcs.

The word “git” as a pejorative (calling someone unpleasant, e.g. “Linus Torvalds is such a git”) long predates the VCS. Linus himself chose the name for the VCS partly due to the meaning, sarcastically remarking that he was naming another project after himself (first Linux, then Git). See the Wikipedia entry for more detail: https://en.m.wikipedia.org/wiki/Git#Naming
Interesting, thanks!