tqdm / tqdm.cpp

C++ port of tqdm
Other
318 stars 29 forks source link

No progress bar, even with test-example.cpp #59

Open jamesavery opened 2 years ago

jamesavery commented 2 years ago

I was very happy to find an easy-to use tqdm analogue for C++, then quickly saddened that it seems very difficult to actually get a progress bar.

Here is what happens when running the test example: ` ~/work/maxibone/src/contrib/tqdm.cpp/test$ c++ -std=c++17 -I../include/ test-example.cpp -o test-example && ./test-example

pointer, pre-increment 1 leftttt finished: 8192/8192 iterator, total 1 leftttt finished: 8192/8192 container, post-increment 1 leftttt finished: 8192/8192 range-based container 1 leftttt finished: 8192/8192 range-based array 1 leftttt finished: 8192/8192 iterator-based pythonic range() 1 leftttt finished: 8192/8192 ye moste pythonic range(), auto type inference 1 leftttt finished: 4095/4095 demonstrate modifiable references 1 left finished: 6/6 1 left finished: 6/6 1 left finished: 6/6 1 left finished: 6/6 1 left finished: 6/6 1 left finished: 6/6

finished: 6/6 15.00000 46.00000 138.00000 413.00000 1237.00000 3708.00000 ` (Compiled with GCC 9.4.0 on Ubuntu 20.04).

Is there any trick to actually getting a progress bar? Is the project derelict, or should it still work?

It is not so important to have maximum pythonic syntax or maximum modular structure (which I read in one of the issues was blocking development for years). What is needed is simply: light weight code that gives progress bar, some approximate timing, and being able to set a descriptive text for the progress bar. Is this currently supported?

Xblow commented 2 years ago

Same issue on Arch Linux with kernel 5.17.7, gcc 12.1.0.

123dbl commented 3 months ago

show the same result with you in 5.15.133.1-microsoft-standard-WSL2