From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Newsgroups: gmane.lisp.guile.devel Subject: Re: Removing the locale warning? Date: Mon, 16 Dec 2019 17:06:20 +0100 Message-ID: <875zigfe6b.fsf@gnu.org> References: <87mubuyks9.fsf@inria.fr> <87pngoxsxf.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="14242"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Guile Devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Dec 16 17:06:47 2019 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igstS-0003Y9-Nz for guile-devel@m.gmane.org; Mon, 16 Dec 2019 17:06:46 +0100 Original-Received: from localhost ([::1]:56206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igstR-0006hd-AO for guile-devel@m.gmane.org; Mon, 16 Dec 2019 11:06:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46468) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igstL-0006br-MB for guile-devel@gnu.org; Mon, 16 Dec 2019 11:06:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1igstI-0002un-Ss; Mon, 16 Dec 2019 11:06:36 -0500 Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=55302 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1igst6-0008IG-96; Mon, 16 Dec 2019 11:06:35 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 Frimaire an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: <87pngoxsxf.fsf@igalia.com> (Andy Wingo's message of "Mon, 16 Dec 2019 15:10:20 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:20198 Archived-At: Hi, Andy Wingo skribis: > On Sat 14 Dec 2019 16:44, Ludovic Court=C3=A8s writes: > >> What about getting rid of the locale warning? >> >> More generally, I'm in favor of reducing run-time warnings to a bare >> minimum, because application users often don=E2=80=99t care about them (= plus >> they=E2=80=99re not i18n=E2=80=99d), and because application developers = cannot silence >> them or handle them in a way that is more suitable for the application. >> >> Thoughts? > > Funny, I find them really useful as they let me know when my environment > isn't correctly configured, so I can then take action. Oh, I see. > How can we resolve these two use cases? Not sure. Guix does an extra =E2=80=98setlocale=E2=80=99 call and prints a user-friendly and Guix-specific message when the locale is unavailable: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/ui.scm#n457 As an application developer, I feel that it=E2=80=99s the application=E2=80= =99s job to pay attention to that (when it matters) and it bothers me that libguile prints its own warning (not i18n=E2=80=99d, not controllable, etc.), just l= ike it would bother me if libc were emitting such a warning. Perhaps the REPL and the =E2=80=98guild=E2=80=99 script could emit such a w= arning, while libguile itself would remain silent? (I know that Perl and Bash emit a warning when =E2=80=98setlocale=E2=80=99 = fails, while Python doesn=E2=80=99t. As for applications, I=E2=80=99ve seen all sorts o= f behaviors ranging from silently ignoring the issue (Coreutils, sed, grep, Git, etc.) to showing a popup window (Gramps) to emitting a warning (most GTK+ programs).) Thoughts? Ludo=E2=80=99.