From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12189 invoked from network); 28 Jan 2022 19:23:04 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 28 Jan 2022 19:23:04 -0000 Received: (qmail 11909 invoked by uid 550); 28 Jan 2022 19:23:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11877 invoked from network); 28 Jan 2022 19:23:01 -0000 Date: Fri, 28 Jan 2022 14:22:48 -0500 From: Rich Felker To: enh Cc: musl@lists.openwall.com Message-ID: <20220128192247.GK7074@brightrain.aerifal.cx> References: <20220128141049.GI7074@brightrain.aerifal.cx> <20220128180103.GJ7074@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] A journey of weird file sorting and desktop systems On Fri, Jan 28, 2022 at 10:33:53AM -0800, enh wrote: > On Fri, Jan 28, 2022 at 10:01 AM Rich Felker wrote: > > > > On Fri, Jan 28, 2022 at 08:58:30AM -0800, enh wrote: > > > (Android's libc maintainer here...) > > > > > > i'd argue this isn't a musl bug. on Android we make a clear distinction between: > > > > > > 1. libc's responsibilities which, to paraphrase rich, are basically > > > "be unsurprising because your audience is OS/app developers who don't > > > speak all the languages their users use anyway". that is: "code point > > > order". > > > > That's not what I said. I speculated that part of the difficulty with > > getting people to care is that a large number of users personally > > prefer LC_COLLATE=C. Not that we should punt because of that. > > > > > 2. icu's responsibilities which cover all the user-facing (as opposed > > > to developer-facing) stuff. i18n is *hard* and the C/POSIX APIs are, > > > to be blunt, not fit for *that* purpose. there's a reason why all of > > > Android/macOS/Windows (and all the browsers) ship copies of icu. > > > > ICU is really, *really* bad. I don't want to be encouraging people to > > use it because basic functionality is missing from libc. > > human languages are really really messy. a lot of the complexity is inherent. > > as for the non-inherent, https://github.com/unicode-org/icu4x seems > like a good start. The problems with ICU are all software engineering problems not problem-domain complexity problems. Bad resource-hungry choices with poor safety properties all over. > > > the bug here is that a desktop file manager is assuming "i just want > > > telephone book order --- how hard can it be?". the answer turns out to > > > be "hard". especially when you get into fun stuff like users who *do* > > > speak multiple languages and have strong expectations for how they > > > sort. or places where there are multiple sort orders in common use. > > > > Absolutely. That's why I don't want to treat the problem half-assedly, > > but that's my point --- it's not the *implementation* that's the > issue, it's that the C/POSIX *interfaces* are insufficient. the bar on > how good a job you _can_ do within those constraints is horribly low. I'm not sure what you mean by "the interfaces are insufficient" here. They're insufficient to do things they weren't meant to do (e.g. deal with data with multiple cultural conventions where the data has to be tagged with which conventions apply to it), but giving listings in a user's chosen collation order convention is something they're perfectly capable of doing. Most applications do not want to deal with (and do not even have the necessary metadata to deal with, since the raw data is plain text) the sort of mix the standard interfaces can't handle. They just want to give decent, culturally-non-surprising UX. Applications that do want to go beyond this can of course use the full Unicode data (via ICU or ideally a better alternative). Rich