From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Zefram Newsgroups: gmane.lisp.guile.bugs Subject: bug#24186: setlocale can't be localised Date: Tue, 11 Oct 2016 13:49:59 +0100 Message-ID: <20161011124959.GI533@fysh.org> References: <20160808163214.GF24721@fysh.org> <87invbm25x.fsf@pobox.com> <20160808223037.GI24721@fysh.org> <87h98j1f9k.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1476190298 28067 195.159.176.226 (11 Oct 2016 12:51:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2016 12:51:38 +0000 (UTC) Cc: 24186@debbugs.gnu.org To: Ludovic Courtes Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Oct 11 14:51:34 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btwWa-0004U7-9M for guile-bugs@m.gmane.org; Tue, 11 Oct 2016 14:51:16 +0200 Original-Received: from localhost ([::1]:55620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btwWY-0001GA-NW for guile-bugs@m.gmane.org; Tue, 11 Oct 2016 08:51:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btwWQ-0001Fd-VM for bug-guile@gnu.org; Tue, 11 Oct 2016 08:51:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btwWM-0001x6-2J for bug-guile@gnu.org; Tue, 11 Oct 2016 08:51:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btwWL-0001x2-V5 for bug-guile@gnu.org; Tue, 11 Oct 2016 08:51:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1btwWL-0000vo-P9 for bug-guile@gnu.org; Tue, 11 Oct 2016 08:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 11 Oct 2016 12:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24186 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 24186-submit@debbugs.gnu.org id=B24186.14761902053508 (code B ref 24186); Tue, 11 Oct 2016 12:51:01 +0000 Original-Received: (at 24186) by debbugs.gnu.org; 11 Oct 2016 12:50:05 +0000 Original-Received: from localhost ([127.0.0.1]:51832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btwVR-0000uV-3G for submit@debbugs.gnu.org; Tue, 11 Oct 2016 08:50:05 -0400 Original-Received: from river.fysh.org ([87.98.248.19]:60396 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btwVP-0000uJ-2s for 24186@debbugs.gnu.org; Tue, 11 Oct 2016 08:50:03 -0400 Original-Received: from zefram by river.fysh.org with local (Exim 4.84_2 #1 (Debian)) id 1btwVL-00077x-DD; Tue, 11 Oct 2016 13:49:59 +0100 Content-Disposition: inline In-Reply-To: <87h98j1f9k.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8426 Archived-At: Ludovic Courtes wrote: >That wouldn't help with the "setlocale" issue you describe per se, but >this would address such use cases in a different way. > >WDYT? Yes, explicit locale objects and locale parameters to relevant functions are a good thing. In general, the model of a global locale state is broken, at least by threading, so some advance beyond the setlocale system is necessary. Note the new(er) "uselocale" system in libc, which gives a per-thread locale state, fixing the biggest problem with setlocale. Some form of that could also be mapped into Guile; it would be reasonable to have a fluid that determines the locale to use where not overridden by an explicit parameter. All of that is welcome, but, as you say, doesn't deal with the actual problem I identified with setlocale. One can expect that setlocale will continue to be used for the foreseeable future, and it needs to be shorn of its unwanted side effects. -zefram