Welcome to MUGS ⚄♠♞🏹 (Multi-User Gaming Services)! | github.com/Raku-MUGS | v0.1.4 has been released! (github.com/Raku-MUGS/MUGS/blob/mai...v0.1.4.md) | This channel is logged for historical purposes; logs at irclogs.raku.org/mugs/index.html Set by japhb on 3 March 2024. |
|||
01:41
lizmat_ joined
01:45
lizmat left
|
|||
japhb | Apologies for disappearing for a couple weeks! Life happened. :-/ | 04:49 | |
Let's see, first [Coke] . | |||
Here's a (synchronous) program that does work in a pile of Git trees. I use it personally just to see if I've forgotten to finish work, or make sure I've fetched all my upstreams. | 04:50 | ||
gist.github.com/japhb/8dc8046b5718...1d1fe3279b | |||
Generally speaking, you should be able to see the most useful bits in the show-progress-bar() and hide-progress-bar() routines. | 04:52 | ||
I've provided commented-out alternate implementations if you' | |||
re having any compatibility problems with any of the Unicode or VT100 escape sequences. | 04:53 | ||
You can see them get used liberally in the big for loop at the end | 04:54 | ||
For async work, as long as you can serialize the actual output such that hide-progress-bar gets called before printing a regular line (e.g. something captured by Proc::Async) and show-progress-bar after, you're good. | 04:56 | ||
One simple way would be to create a Channel or Supply that actually manages that, and any other `whenever` blocks that want to print just send to that common Channel/Supply as needed. | 04:57 | ||
(Normally I license all Raku I write publicly under Artistic 2, but in case your $day-job is allergic to that license, I hereby grant you a license to incorporate/use any of the code there in your work code.) | 05:01 | ||
(royalty-free, non-exclusive, worldwide, blah blah blah) | 05:02 | ||
Oh, and let me know if anything isn't clear; I tried to comment liberally for your benefit. | 05:05 | ||
07:32
lizmat_ left,
lizmat joined
|
|||
[Coke] | japhb++ I will have to digest that, thank you | 12:12 | |
15:42
Geth left,
Geth joined
|