←back to thread

768 points speckx | 6 comments | | HN request time: 0s | source | bottom
Show context
latexr ◴[] No.45673681[source]
> trash a.txt b.png moves `a.txt` and `b.png` to the trash. Supports macOS and Linux.

The way you’re doing it trashes files sequentially, meaning you hear the trashing sound once per file and ⌘Z in the Finder will only restore the last one. You can improve that (I did it for years) but consider just using the `trash` commands which ships with macOS. Doesn’t use the Finder, so no sound and no ⌘Z, but it’s fast, official, and still allows “Put Back”.

> jsonformat takes JSON at stdin and pretty-prints it to stdout.

Why prioritise node instead of jq? The latter is considerably less code and even comes preinstalled with macOS, now.

> uuid prints a v4 UUID. I use this about once a month.

Any reason to not simply use `uuidgen`, which ships with macOS and likely your Linux distro?

https://www.man7.org/linux/man-pages/man1/uuidgen.1.html

replies(12): >>45674658 #>>45674729 #>>45674740 #>>45674987 #>>45675260 #>>45675463 #>>45675713 #>>45675845 #>>45676857 #>>45678048 #>>45678389 #>>45678522 #
tester457 ◴[] No.45674740[source]
I am not the author, but my bet is that he didn't know of its existence.

The best part about sharing your config or knowledge is that someone will always light up your blind spots.

replies(3): >>45675765 #>>45676431 #>>45676997 #
_kb ◴[] No.45676431[source]
Or more abstractly: post anything to the internet and people will always detail how you’re wrong. Sometimes that can be useful.
replies(2): >>45676892 #>>45677060 #
1. byryan ◴[] No.45676892[source]
That seems to be especially true on HN. Other forums there is some of that as well, but HN it seems nearly every single comment section is like 75% (random number) pointing out faults in the posted article.
replies(2): >>45676937 #>>45677193 #
2. bdangubic ◴[] No.45676937[source]
I find that endearing for two reasons:

- either critique is solid and I learn something

- or commenter is clueless which makes it entertaining

there is very seldom a “middle”

replies(1): >>45677022 #
3. byryan ◴[] No.45677022[source]
Yea I don't particularly mind it, just an interesting thing about HN compared to many other forums.
replies(1): >>45679270 #
4. gaudystead ◴[] No.45677193[source]
Although I normally loathe pedantic assholes, I've found the ones on HN seem to be more tolerable because they typically know they'll have to back up what they're saying with facts (and ideally citations).

I've found that pedantic conversations here seem to actually have a greater potential for me to learn something from them than other forums/social platforms. On other platforms, I see someone providing a pedantic response and I'll just keep moving on, but on HN, I get curious to not only see who wins the nerd fight, but also that I might learn at least one thing along the way. I like that it's had an effect on how I engage with comment sections.

replies(1): >>45677333 #
5. password4321 ◴[] No.45677333[source]
And the worst of it gets flagged and even dead-ed so most skip it after a bit, as I assumed would happen recently

https://news.ycombinator.com/item?id=45649771

6. Schiphol ◴[] No.45679270{3}[source]
*fora