mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Locale bikeshed time
Date: Tue, 22 Jul 2014 16:35:40 -0400	[thread overview]
Message-ID: <20140722203540.GA11570@brightrain.aerifal.cx> (raw)
In-Reply-To: <20140722201008.GC16795@example.net>

On Tue, Jul 22, 2014 at 10:10:08PM +0200, u-igbb@aetey.se wrote:
> A musl-specific variable name would be a better/cleaner choice.

One question is whether this is really musl-specific or specific to a
locale scheme that could be used outside of musl too. However, either
way it's probably appropriate for the variable to be musl-specific.
Having one variable configure multiple things is usually error-prone
and inflexible.

> > The second issue is how locale categories are split up. Glibc has each
> > category in a separate file, except for the "locale-archive" file
> > which stores everything in one file for easy mapping. My leaning so
> 
> By the way, please do not follow the way of a single big file.
> For systems which rely on file boundaries to reflect data clustering
> (i.e. which data is most probable to be used together) it is very useful
> to let the files correspond to the data structure. Otherwise some cheap
> and efficient distributed data access optimizations become impossible.

I hadn't even considered this aspect, but I think the whole concept of
a single big file is undesirable with data that's naturally subject to
change over time, and where the data comes from multiple sources. So I
wasn't really considering that option anyway.

> > far is to put the whole locale -- time format and translations,
> > message translations, ... in a single file. This avoids the need for
> > multiple mappings (and syscall overhead, and vma overhead, ...) if
> > you're using the same value for all categories. But on the other hand,
> > if you wanted to have lots of subtle variants of a locale, you might
> > end up with largely-duplicate files on disk. Fortunately I think
> > they'll all be very small anyway so this may not matter.
> 
> I actually do mix categories from different locales.
> No problem as long as the files are small.

Note that if you're just mixing "ll_TT" and "C", there wouldn't be any
cost anyway since the C locale (and its aliases) are builtin and never
loaded from a file. Where I was thinking you might see duplication is
for things like: LC_ALL=ll_TT@modifier where modifier is really just
an alternate for one category (e.g. ISO date format for time, alt
collation order, etc.), but the file ends up storing duplicates of all
the data from other categories. However, I think the alternate
preferred usage here would be to provide a file for just the category
being overridden that does not contain the base data and require users
to set the individual categories, like what you're doing, e.g.

LANG=ll_TT LC_TIME=ll_TT@isodate

rather than:

LC_ALL=ll_TT@isodate

Rich


  reply	other threads:[~2014-07-22 20:35 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 18:49 Rich Felker
2014-07-22 20:10 ` u-igbb
2014-07-22 20:35   ` Rich Felker [this message]
2014-07-23  9:50     ` u-igbb
2014-07-23 16:39       ` Rich Felker
2014-07-23 19:25         ` u-igbb
2014-07-23 21:01           ` Rich Felker
2014-07-24 15:35             ` u-igbb
2014-07-24 16:01               ` Rich Felker
2014-07-24 19:24                 ` u-igbb
2014-07-24 20:15                 ` u-igbb
2014-07-24 22:02                   ` Rich Felker
2014-07-25  9:06                     ` u-igbb
2014-07-25 20:15                       ` u-igbb
2014-07-25 22:32                         ` Rich Felker
2014-07-26  7:25                           ` u-igbb
2014-07-26  8:03                             ` Rich Felker
2014-07-26  9:06                               ` Jens Gustedt
2014-07-26  9:25                                 ` Rich Felker
2014-07-26  9:38                               ` u-igbb
2014-07-26 17:47                                 ` Szabolcs Nagy
2014-07-26 18:23                                   ` Rich Felker
2014-07-26 18:59                                     ` u-igbb
2014-07-26 19:14                                       ` Rich Felker
2014-07-26 18:56                                   ` u-igbb
2014-07-26 19:30                                     ` Rich Felker
2014-07-27  7:28                                       ` u-igbb
2014-07-26 20:43                         ` Rich Felker
2014-07-27  7:51                           ` u-igbb
2014-07-27  8:00                             ` Rich Felker
2014-07-27  8:24                               ` u-igbb
2014-07-23 23:22         ` writeonce
2014-07-23 23:38           ` Rich Felker
2014-07-24  1:07             ` writeonce
2014-07-24  1:57               ` Rich Felker
2014-07-24  2:16                 ` writeonce
2014-07-24  2:24                   ` Rich Felker
2014-07-24  2:59                     ` writeonce
2014-07-22 20:17 ` Laurent Bercot
2014-07-22 20:36   ` Rich Felker
2014-07-23 22:03     ` Laurent Bercot
2014-07-23 22:12       ` Rich Felker
2014-07-24 15:38         ` u-igbb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140722203540.GA11570@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).