tenox7 / ttyplot

a realtime plotting utility for terminal/console with data input from stdin
Apache License 2.0
956 stars 42 forks source link

Deny negative values before proper support (follow-up to #115) #138

Closed hartwork closed 7 months ago

hartwork commented 7 months ago

Follow-up to #115, related to #53

Try this before and after:

# make
# ./ttyplot <<<'-1 -2 -3 -4'
# while echo 'garbage 123' ; do sleep 0.125 ; done | ./ttyplot -r
hartwork commented 7 months ago

@edgar-bonet I agree that current development was on the right path but adding 50% support for negative values did not seem right from a user point of view, e.g. with negative values down in the legend display where it's unclear where on the visual map they would be. Therefore the idea was to take a small step back, disable support explicitly, and then make it work properly for say 1.6.1 or 1.7.0. Right now it's a weird mix, at least compared to the past. Adding " + add some support for negative values" to the title of #115 for the change log to make it official would be the alternative, I guess. Would that work well for you? Other ideas?

hartwork commented 7 months ago

@edgar-bonet made some major(?) edits to my reply above. Looking forward to your thoughts about it.

edgar-bonet commented 7 months ago

Don't you think support for negative values would reach 1.6?

hartwork commented 7 months ago

Don't you think support for negative values would reach 1.6?

@edgar-bonet there is no reason why our ready work should be kept unreleased longer to get additional features ready, I like to separate things that do not have to depend on each other. Personally, I will not work on support for negative numbers before 1.6.0 is out and it deserve proper thought, probably something like a vertically moving x-axis, or one snapping to a grid or or, it's not a five minutes job when done right, corner cases etc. I would personally like us to only fix any regressions towards 1.5.2 left more and maybe tiny trivial things and flush to users rather than making the cake later and bigger — it's big already — and still not have 1.6.0 by February or so. Many projects do that, e.g. KDbg 3.0.2 should be out already but isn't, exactly same scenario. The answer usually is to stay in releasable state all the time and to release early, release often. How do you feel about it?

edgar-bonet commented 7 months ago

The answer usually is to stay in releasable state all the time

I concur, and I think we are keeping development in a releasable state. The reason this is not in master is because @tenox7 does not have right now the availability to keep up with this sprint of sorts. If I understood correctly, we are supposed to handle all this back to him only once the sprint is over.

[...] still not have 1.6.0 by February or so.

I think it should definitely get out before Christmas.

Personally, I will not work on support for negative numbers before 1.6.0 is out and it deserve proper thought

OK, I will give it a try.

probably something like a vertically moving x-axis

No need. Some times one likes to have the x axis drawn at y = 0, but this is not a general rule, and certainly not a requirement.

hartwork commented 7 months ago

The answer usually is to stay in releasable state all the time

I concur, and I think we are keeping development in a releasable state. The reason this is not in master is because @tenox7 does not have right now the availability to keep up with this sprint of sorts. If I understood correctly, we are supposed to handle all this back to him only once the sprint is over.

@edgar-bonet I think we have a misunderstanding here, that was not my point. Currently without #141 (and arguably #138) development is not yet in a well-releasable state (ignoring urgencies, nothing is stopping a release from it technically). Maybe that helps make my point more clear. I'd want us to be able to version bump and release off development any time and restore that state of releasability asap whenever we learn that it's no longer reality.

[...] still not have 1.6.0 by February or so.

I think it should definitely get out before Christmas.

We should hand over asap then, because there may be constraints and delay that we just do not know about and that are outside of our control, especially with regard to family. We don't know.

Personally, I will not work on support for negative numbers before 1.6.0 is out and it deserve proper thought

OK, I will give it a try.

probably something like a vertically moving x-axis

No need. Some times one likes to have the x axis drawn at y = 0, but this is not a general rule, and certainly not a requirement.

You have a point that this can be split up in two so that basic support is not blocked by a future more fancy version of it. Please make the first iteration small enough that it won't delay the release significantly.

I have added suffix " (+ add minimal support for negative input values)" to the title of #115 now, added #115 to our change log at https://github.com/tenox7/ttyplot/issues/134#issuecomment-1834133287 in the features section, and will close #138 here now as we seem to agree now that #138 is not the best way forward.