Re: Using C23 digit separators not locale digit grouping characters

Alejandro Colomar
2023-01-29T14:38:35Z

[-- Attachment #1.1: Type: text/plain, Size: 2291 bytes --]

Hi Brian and наб!

On 1/28/23 21:40, Brian Inglis wrote:
> Hi folks,
>
> Seeing the recent tv_nsec patches drop the standard locale digit grouping
> characters "," from the member range [0-999,999,999] made me regret the loss of
> the punctuation which provides better and quicker comprehension of long strings
> of digits.

Nice! Didn't remember about that separator. It makes a lot of sense to use it
in comments and the likes in the pages. Maybe we should be a bit more cautious
in source code examples, but definitely for big numbers outside of running code
should have them.

наб, would you please update your patches with that? I also have a few comments
that I'll write in a moment in answers to your patches.

Cheers,

Alex

>
> It may be time to consider using the locale independent C23 digit separator
> characters "'" wherever more than a handful of digits occur, possibly convert
> grouping character uses in existing man pages as they are changed, and specify a
> future standard policy approach to provide better and quicker comprehension of
> long strings of digits: perhaps using a new digit separator register and glyph
> escape sequence \*ds \*[ds] \[ds] \(ds if not in use by base groff?

The sequence for the unslanted single quote is \(aq.

We could add somewhere in man-pages(7) that decimal numbers should use a
separator every 3 digits, and hex and binary should use it every 4 digits.

>
> As well as the recently modified pages:
>
> clock_getres.2
> timer_settime.2
> timerfd_create.2
> utimensat.2
>
> there appear to be obvious occurrences in only the following pages:
>
> futex.2
> read.2
> sendfile.2
> write.2
> mallopt.3
> keyrings.7
> mq_overview.7
> sched.7
> time_namespaces.7
>
> but there appear to be about 400 pages with more than 6 decimal digit strings
> (some spurious glibc hex commits and address outputs) where it could perhaps
> help, such as in POSIX version dates e.g. 2001'12L, and undoubtedly more with
> long digit strings in other radixes.

Would you mind preparing a patch for all of those? If you'll do it, better wait
until we merge наб's patches, to avoid conflicts.

Cheers,

Alex