Looking for a fun (and quite short!) recreational project? Try implementing a progress bar!

I need to implement a progress bar for a long-term project I’m working on, but I decided to have fun with it by making the bars a little snazzy.

If you’re looking for terminal amenities, you’re better off with something like Term.jl, but you can find my project on GitHub, too. (Not to be confused with ProgressBars.jl)

Happy to hear feedback! Mostly just wanted to share how much fun this was, though.

I will preemptively address a couple of things:

  1. Yes, it assumes the terminal is at least 80 characters wide. This is good enough for me and my purposes!
  2. Yes, I could pre-cache the bar for each progress percentage, but this only makes a significant difference for really fast progress, which is when you care about a progress bar the least.
2 Likes

That is a cool project @mcmuffin6o , thanks for sharing. You are probably aware of ProgressMeter.jl, but worth sharing the link here anyways.

One thing that ProgressMeter.jl supports that I really like is progress bars for parallel processes. Perhaps that is another challenge you can tackle for fun.

Also, the ProgressLogging.jl package defines an interface for such progress bar implementations. I understand that you can use these progress bars in Pluto.jl and elsewhere if you adopt the interface.

1 Like

Just as a tip, you don’t have to do it this way if you don’t want: displaysize is in the default namespace, and _, cols = displaysize() will get you the actual value. Your choice!.

1 Like

Something to look into for sure!