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 :)
@sotolf @kabel42 @rl_dane @thedoctor @amin there’s meanings of to take a shortcut that aren’t related to cheating ;)
Consider a Venn diagram between both; they merely overlap, not subset.
@mirabilos @sotolf @kabel42 @thedoctor @amin
lol do give in, I'd love to see how you create it. xfig? teX? ASCII art?
@kabel42 @mirabilos @sotolf @thedoctor @amin
lol beat me to it.
@kabel42 @mirabilos @sotolf @thedoctor @amin
You can do plenty worse!!! ;)
@mirabilos @sotolf @kabel42 @thedoctor @amin
Sounds like me using GIMP 3.
Horrrrrid UI changes in GTK3. Horrid. Horrid.
@rl_dane @sotolf @kabel42 @thedoctor @amin that too, but Inkscape is just… Inkscape.
If I were a little better at SVG, I’d possibly use Inkscape’s XML window to write SVG as XML directly and just see it auto-updating the graphical representation, like some Tₑχ/LᴬTᴇΧ editors can.
@mirabilos @sotolf @kabel42 @thedoctor @amin
That would definitely be a nerd flex! ;)
@mirabilos @kabel42 @rl_dane @thedoctor @amin
Yeah, I mean if I would actually take this seriously for a moment, yeah cheating really depends on the goal, my goal for going to work is not excercise, so technically taking a shortcut is more about efficiency rather than doing something that lessens the thing, if I however did the walk to have excercise it would be, even though the physical action done was exactly the same, the only way to differenciate is the goal.
@kabel42 @mirabilos @rl_dane @thedoctor @amin
There are also different assumptions, I sped up an import job today, that dealt with barcodes, they get printed in batches, and I sped the runtime up from 2 hours + to 30 sek by checking the first item in each batch before splitting them up and having to deal with 40 000 + items, it's cheating / optimisation since I check only if the first one in the batch got imported, but because they do the writing within a transaction, if the first one of the batch is imported the rest are as well.
@kabel42 @mirabilos @rl_dane @thedoctor @amin
English (Traditional)
English (Simplified)
@kabel42 @mirabilos @rl_dane @thedoctor @amin
Yeah the fucker that decided that "ennui" is a good word should be taken behind the shed...
@kabel42 @mirabilos @rl_dane @thedoctor @amin
It says ennui, is pronounced "ahn-wie" and just means "sadness" :p
@kabel42 @mirabilos @rl_dane @thedoctor @amin
Is english, but a loanword from french, which explains the fucked pronounciation :P
@kabel42 Sure because there's absolutely nothing weird about English spelling whatsoever.
@thedoctor @kabel42 @sotolf @mirabilos @amin
It's a tragedeigh. ;)
^Wbeef, …)@sotolf @kabel42 @mirabilos @thedoctor @amin
That's funny, as it mainly means "boredom" in the original French.
Ok, seems that modern French ennui is a cognate to English ennui, not the source. The source is Old French, which has a meaning more similar to the modern English one.
@mirabilos @sotolf @kabel42 @thedoctor @amin
Eh? Boredom is a superpower! Us #GenXers know how to use it. ;)
@mirabilos @sotolf @kabel42 @thedoctor @amin
Well, that's one way of using boredom. Other ways are crafts, hobbies, plotting to take over the world, Pinky...
@sotolf @kabel42 @rl_dane @thedoctor @amin more like
@sotolf @kabel42 @mirabilos @thedoctor @amin
> English (Traditional)
> English (Simplified)
@sotolf @kabel42 @mirabilos @thedoctor @amin
I feel... slighted.
* looks at our president and congress
So, anyway... XD