in reply to Re: Porting tqdm to Perl
in thread Porting tqdm to Perl
In an answer to haukex, I've included a link to a blog post that mentions how tqdm might be used. The tqdm PyPI page itself (which I linked in the original post) is also very informative already. But as usual I probably didn't communicate clearly what exactly I want to accomplish, so let me reiterate: how would one create a progress bar library in Perl that is roughly as simple to use to an existing script. By simple I mean with as minimal change as possible, adding as few characters of code as possible. And with existing script, this implies that some uses for() and some uses while() (I personally use for() far more often than while()).
In this interface:
for (1..100) { tqdm; # same as tqdm($_); ... }
we can just assume that the first time tqdm() is first invoked is the start of the process. But tqdm() didn't receive the target number (100).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Porting tqdm to Perl
by LanX (Saint) on Dec 21, 2018 at 14:11 UTC | |
by perlancar (Hermit) on Dec 21, 2018 at 14:19 UTC |