bug-datamash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.


From: Tim Rice
Subject: Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8)
Date: Sun, 3 Jul 2022 21:50:35 +0000

Hey Erik,

IMHO this is the bug, i.e., operation parsing is neither locale
aware nor locale agnostic.  My preferred fix would be to make
operation parsing locale aware, for consistency.

+1

Another idea that occurred to me is to add new flags such as --bin-width. It wouldn't 
exactly solve the problem, and there might be aesthetic reasons to dislike a new flag 
like this; on the other hand, it would more easily "do the right thing."


I have a local implementation of this.  It does not break any
of the tests and enables specifying fractional binning bucket
sizes when using a German locale:

    $ LC_ALL=de_DE.UTF-8 ./datamash bin:0.1 1 <<<1,15
    1,1

What do you think?

I intend not to follow this approach, because it would make
actually fixing the localization bug an incompatible change.

Acknowledged.


IMHO disabling localization for the operation parser would
need to be gated via option, with the intent to keep this
option even after fixing the localization bug.

I'm conscious of standing too close to the trees and not seeing the forest. It 
might pay to step back and think about would should options really look like, 
in general? Once we establish a universal principal which can hold for all 
types of options, the bin operation should naturally fall into line.

~ Tim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]