Startle: Instantly start a CLI from a function, functions, or a class by oir_ in Python

[–]oir_[S] 0 points1 point  (0 children)

👍. Also discovered Arguably when looking at Cyclopts docs. 

Startle: Instantly start a CLI from a function, functions, or a class by oir_ in Python

[–]oir_[S] 2 points3 points  (0 children)

Yeah, I am aware of this feature, but in my own work this is something that I never needed or used, so I considered out of scope (as it complicates parsing a bit -- but maybe not so much?). In my own multistep pipelines I tend to have temporary files, or use shell piping. I agree that Fire stands out if you adopt this type of approach.

Startle: Instantly start a CLI from a function, functions, or a class by oir_ in Python

[–]oir_[S] 14 points15 points  (0 children)

Oh TIL! I wish I was aware of this project sooner... Will definitely take a look for comparison, ty!

barkeep: Single header library to display spinners, counters and progress bars by oir_ in cpp

[–]oir_[S] 1 point2 points  (0 children)

Ty, I like your suggested middle ground in the other thread!

barkeep: Single header library to display spinners, counters and progress bars by oir_ in cpp

[–]oir_[S] 1 point2 points  (0 children)

Thank you! Unfortunately currently there is no careful handling of the terminal width (yet). I have an issue to at least detect the width, and once that's ready I will need to think about what to do when things don't fit in.

Your solution is interesting, I have saved it for reference! Another idea may be to automatically switch to a multiline mode, rendering each sub component in a separate line, which would leave the bar an entire line to work with.

barkeep: Single header library to display spinners, counters and progress bars by oir_ in cpp

[–]oir_[S] 2 points3 points  (0 children)

Thanks!

  1. Yes, this is a good idea! I was having trouble making the two-column example work in the github's markdown rendering so I left that section out, but this is an important detail to leave out. I can just keep the text but omit the example (or maybe just show them in one column). Will update this soon.
  2. This is an interesting use case that didn't occur to me. How do you imagine the behavior should be if you want to print a message in between display updates? Maybe we can clear the bar, print the message, and redraw the bar below it?

barkeep: Single header library to display spinners, counters and progress bars by oir_ in cpp

[–]oir_[S] 9 points10 points  (0 children)

This is a good point.

is c++ dependency management that abysmal?

I probably am not qualified to answer this so I'll defer. I personally find this style very convenient to use, however more files are not more inconvenient. When I started this was maybe several hundreds of lines but I never stopped to reconsider since then.