Source-Changes-D archive

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

Re: CVS commit: src/bin/sleep



On 25.01.2019 11:38, Robert Elz wrote:
>     Date:        Fri, 25 Jan 2019 12:30:23 +0300
>     From:        Valery Ushakov <uwe%stderr.spb.ru@localhost>
>     Message-ID:  <20190125093023.GC18200%pony.stderr.spb.ru@localhost>
> 
>   | As someone who actually have to ecnoutner locales in daily life and
>   | not just think about them sitting in an ivory tower I don't understand
>   | why do we even have this argument. Locale-specific argument to sleep
>   | is pure madness, period (no pun intended).
> 
> I am not sure why you are suddenly complaining, it has been like
> this for > 21 years...   It cannot have bothered your too much, in
> your boring old stone tower, as until this week, you don't seem to
> have complained about it.
> 
> Why now?
> 
> And as I said before, if this is to be changed, it needs to be via
> a discussion in front of a wider audience than reads source-changes-d
> and in particular messages with a subject that refers to one of the more
> boring commands that we have.
> 
> kre
> 
> ps: in the meantime, I have changes to sleep which avoid the horrible
> '.' test, that I was never happy with, don't alter sleep's locale (using
> strtod_l as Joerg suggested --- why is that not documented?) and
> deal mor sensibly with long sleeps (nanosleep(2) is just plain weird when
> asked to sleep for a long time - sometimes it returns an error, other
> times it simply returns(0) immediately ... try sleep 1e15 for example).
> Those are not yet committed.   But probably will be.   Most of it has
> nothing to do with any locale issues.
> 

I have really met a person (after computer studies) who found a command
line tool broken as the comma separator was '.' instead of a local ','.
Handling both is acceptable... however it has serious issues in other
tools that accept comma like sort(1). Supporting locale specific
separator will create trouble in making scripts portable.

I think it's better to keep an uniform way of handling separator in
basic command line tools and restrict locales to translations only.

My native locale uses ',' for separator... but everybody is acquainted
with . as it's everywhere (in calculators etc). I think this is a losing
battle to keep ','. I personally always used dot in schools etc and
nobody ever complained.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index