Thought I’d check on the Linux source tree tar. zstd -19
vs lzma -9
:
❯ ls -lh
total 1,6G
-rw-r--r-- 1 pmo pmo 1,4G Sep 13 22:16 linux-6.6-rc1.tar
-rw-r--r-- 1 pmo pmo 128M Sep 13 22:16 linux-6.6-rc1.tar.lzma
-rw-r--r-- 1 pmo pmo 138M Sep 13 22:16 linux-6.6-rc1.tar.zst
About +8% compared to lzma. Decompression time though:
zstd -d -k -T0 *.zst 0,68s user 0,46s system 162% cpu 0,700 total
lzma -d -k -T0 *.lzma 4,75s user 0,51s system 99% cpu 5,274 total
Yeah, I’m going with zstd all the way.
in the OP
My reply is to a commenter who said they prefer "${HOME}/docs"
over both options in the original image ("$HOME/docs"
or "$HOME"/docs
). Many people prefer to always include braces around the parameter name out of consistency, instead of only when they are required.
My comment explained why my habit is to only include braces when they are necessary.
It’s interesting, the results here are way different than the Code Golf & Coding Challenges Stack Exchange. I would never expect Haskell to be that low. But after looking at code.golf, I realize it’s because I/O on CG&CC is more relaxed. Most Haskell submissions are functions which return the solution.
Sidenote: I like the CG&CC method, it’s semi-competitive, semi-cooperative.
IMO It’s geared towards what is the best part about code golf: teaching people about algorithm design and language design.
This has never stuck with me, and I hadn’t thought about why until now. I have two reasons why I will always write ${x}_$y.z
instead of ${x}_${y}.z
:
$x_
being expanded as ${x_}
."$#array[3]"
actually prints the length of the third item in array
, rather than (Bash:) the number of positional parameters, then the string 'array[3]'
.This isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.
Typically find "$HOME/docs"
, but with a few caveats:
In Zsh or Fish, the quotes are unnecessary: find $HOME/docs
If I’m using anything potentially destructive: mv "${HOME:?}/bin" ...
Of course, if it’s followed by a valid identifier character, I’ll add braces: "${basename}_$num.txt"
Bryan Lunduke on /c/programmerhumor? Not what I expected, but okay.
Fwiw, gitea has compatible actions. Not sure how compatible, though.
I know that “Vanity Addresses” are a common thing for onion sites, and there are tools which generate tons of keys looking for prefixes. I haven’t seen such a tool for ssh host keys though.