News for hackers. Stuff that matters.
Re:Show HN: Repeater – A tool which repeats CLI commands by withinboredom on Thursday November 30, 2023 @04:35AM (#38471528)
I usually just use `watch` to run a command repeatedly every couple of seconds.
Re:Show HN: Repeater – A tool which repeats CLI commands by Alifatisk on Thursday November 30, 2023 @05:51AM (#38471986)
Yeah, for me I find inline ruby to be enough for smaller repeated tasks.

$ ruby -e '10.times { puts 1; sleep 1 }'

Re:Show HN: Repeater – A tool which repeats CLI commands by gregjor on Thursday November 30, 2023 @01:56AM (#38470522)
What advantage does this have over bash loop (or zsh repeat), maybe combined with GNU parallel?
Re:Show HN: Repeater – A tool which repeats CLI commands by baalimago on Thursday November 30, 2023 @05:12AM (#38471767)
Hello, I'm the author.

The parallelism provides potentially huge speed increases over a normal bash loop (not to mention ease of use, no script file or complex oneliner required). If you clone the repo you can try `./benchmark`, and/or `./benchmark <am repetitions> <any command of your choice>` to run a benchmark on the cmd, check out the script `benchmark` script for more details.

I don't know much about GNU parallel, I'll investigate it and see if I can add it to the benchmark script so it's possible to compare.

Re:Show HN: Repeater – A tool which repeats CLI commands by gregjor on Thursday November 30, 2023 @06:51AM (#38472376)
I'm not that interested in benchmarking what will likely show negligible performance differences for the things I might use this for.

I try to avoid installing anything out of the mainstream on production servers, and keep dev servers as close to production as possible. That means any new tool or application has to more than pay its way with new or much improved functionality over out-of-the-box tools like bash/zsh, built-in job control (backgrounding), xargs, and GNU parallel. Not everyone has the same concerns but I've found my development and deployment experience stays simple and predictable if I keep third-party dependencies to the bare minimum.

Re:Show HN: Repeater – A tool which repeats CLI commands by prosaole on Thursday November 30, 2023 @10:41AM (#38474834)
If speed is the most important factor, a more interesting comparison would be to parallel-bash:

https://www.gnu.org/software/parallel/parallel_alternatives....