File this under #shell #functions I should have written years ago:
function grepc {
#Do a grep -c, but skipping files with no results
grep -c "$@" |grep -v ':0$'
}
File this under #shell #functions I should have written years ago:
function grepc {
#Do a grep -c, but skipping files with no results
grep -c "$@" |grep -v ':0$'
}
Oh, didn't know about -c. I usually just pipe to wc -l I guess.
-c, -l, -h, -H, and -q are my favorite #grep flags. :D
Huh, that almost became a [Marcel Duchamp] reference. 😅
I just use -v and -E
...and bash instead of zsh
...and grep/awk/sed instead of jq
...and firefox instead of chrome
...and the fediverse instead of facebook
Face it... I'm an unpopular-opinion neckbeard level boss. XD
cc: @mirabilos
@rl_dane Those are so not comparable!
@sotolf @thedoctor @rl_dane @mirabilos
Mm, not really though? ripgrep is meant for bulk grepping of files
@sotolf @thedoctor @rl_dane @mirabilos
I mostly just use it to run rg TODO and see all the spots in a codebase I marked as still needing work.
@amin @sotolf @thedoctor @mirabilos
Why is ripgrep better than just grep -R?
@kabel42 @amin @sotolf @thedoctor @mirabilos
Interesting! I wonder what kind of algorithmic optimizations (as opposed to compiler optimizations) they're using to do that, and if regular (GNU/BSD) grep could do the same.
Because I'll wear clown shoes and a tutu before changing to a "rewrite the world in rust!" utility 😂
@kabel42 @rl_dane @amin @thedoctor @mirabilos Yeah, cheating as in Schummeln, not as in Betrügen.
I also saw now when looking the word up that it comes from german "juxen" which is "playing around, having fun" which is kind of a fun way that the word has been wandering :)
@kabel42 @mirabilos @sotolf @thedoctor @amin
If you rely on relativistic/Einsteinian accuracy, yes? ;)
#KSP cheats by not computing gravity between the various planets and moons. They're all on (invisible) rails. Only ships, crew, and asteroids are affected by actual gravity.
@sotolf @kabel42 @mirabilos @thedoctor @amin
Sometimes the cheats are a valid way to make a system more efficient ;)

Attached: 1 image @[email protected] HA :) Reminds me of something I saw today... #LossyPNG
@mirabilos @kabel42 @sotolf @thedoctor @amin
That game uses all kinds of crazy tricks to keep the various calculations away from floating point dead zones.
Folks have found tricks to force KSP to plot things with reduced precision, and the outcome is kind of hilarious. Things like very jagged plots and incredibly unpredictable trajectories. ;)