From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#22905: GUILE_INSTALL_LOCALE produces unavoidable noise Date: Tue, 09 Aug 2016 19:39:50 +0200 Message-ID: <87ziollu3d.fsf@pobox.com> References: <20160304141334.GC7946@fysh.org> <878tw8nswc.fsf@pobox.com> <20160807230013.GE24721@fysh.org> <87vazbm2vz.fsf@pobox.com> <20160808210229.GH24721@fysh.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1470764487 15749 195.159.176.226 (9 Aug 2016 17:41:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2016 17:41:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cc: 22905@debbugs.gnu.org To: Zefram Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Aug 09 19:41:22 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 1bXB1l-0003yK-JG for guile-bugs@m.gmane.org; Tue, 09 Aug 2016 19:41:21 +0200 Original-Received: from localhost ([::1]:37070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXB1i-0005W8-Tm for guile-bugs@m.gmane.org; Tue, 09 Aug 2016 13:41:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXB1Y-0005Tl-Qs for bug-guile@gnu.org; Tue, 09 Aug 2016 13:41:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXB1S-0006La-SH for bug-guile@gnu.org; Tue, 09 Aug 2016 13:41:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXB1S-0006LV-M4 for bug-guile@gnu.org; Tue, 09 Aug 2016 13:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bXB1S-0004ec-9k for bug-guile@gnu.org; Tue, 09 Aug 2016 13:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 09 Aug 2016 17:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22905 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 22905-submit@debbugs.gnu.org id=B22905.147076440317811 (code B ref 22905); Tue, 09 Aug 2016 17:41:02 +0000 Original-Received: (at 22905) by debbugs.gnu.org; 9 Aug 2016 17:40:03 +0000 Original-Received: from localhost ([127.0.0.1]:33353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXB0V-0004dD-4e for submit@debbugs.gnu.org; Tue, 09 Aug 2016 13:40:03 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:50145 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXB0T-0004ck-9w for 22905@debbugs.gnu.org; Tue, 09 Aug 2016 13:40:01 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 9B07C2E9A0; Tue, 9 Aug 2016 13:39:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=bPvecZLdmR3hMGjnphRZrPGoJFM=; b=PSf13U Q362eLBC8g/an0hymPNO69UZusth1wLGqQgurmFI/a3R71X100S7ep946jZxFTEi lif10DyjCpEdLGyselkBe2WT8+MBGbpoYVtPU7wKR3857u6QRyNKpdGLml3yyKs4 q1eQI2bTFiaoi8duhBJmOqfPobS447KgaKDJ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=iQd2NPAC1tfbXnyuhRVoSIqq7Q6zgN2t oCvw14lW7hiLU1Cd0emzLdCKlGKKO2xMG9M9yf9u4epAl5GdD1unG14yW62S5/gI hS3jpxEa2d7xv8FK383aE1bfnjLr/je7iZBK5x3dKLGVEVAoJy3kqA6JdxRt2fnv A+8JE5raOfY= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 9422C2E99F; Tue, 9 Aug 2016 13:39:58 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id AA6B12E99E; Tue, 9 Aug 2016 13:39:57 -0400 (EDT) In-Reply-To: <20160808210229.GH24721@fysh.org> (zefram@fysh.org's message of "Mon, 8 Aug 2016 22:02:29 +0100") X-Pobox-Relay-ID: 4A68B62A-5E58-11E6-8349-28A6F1301B6D-02397024!pb-sasl2.pobox.com 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:8372 Archived-At: On Mon 08 Aug 2016 23:02, Zefram writes: > Andy Wingo wrote: >>Serious question tho: what sort of back-compatibility can there be with >>a Guile that only supports latin-1 strings? > > I'd expect that almost any program that runs on Guile 1.8 ought to be > portable, with only minimal modifications, to later versions of Guile. I'm with you :) We did (and do) our best but some problems remain. I'm not sure which ones are incidental and which ones are essential. Probably some are essential though and need to be minimized and then documented. > The particular problem that arises is that a possible form for a > warning-muffling switch would be a command-line switch that goes on the > #! line. Any new switch of that nature wouldn't be recognised by Guile > 1.8, and would cause an error when attempting to run the program on 1.8. Just thinking out loud here, what about something like: #!/bin/sh export FOO=bar exec guile $0 "$@" !# Various FOO=bar things that could work for you: LC_ALL=C GUILE_INSTALL_LOCALE=0 It doesn't work if you run "guile myscript.scm" but it would work as a ./myscript.scm. >>How would this work? > > I imagine a builtin function that returns a truth value saying whether > the Guile framework has emitted a warning before running the program. > Suppose it's called "program-running-with-unclean-output". Then those > who particularly want clean output can write something like > > (when (program-running-with-unclean-output) > (error "can't run after warnings")) > > This doesn't avoid the warning appearing, but does avoid treating a > run marred by the warning as a successful program run. The program's > checking code can easily be made portable back to Guile versions lacking > the new function, by using cond-expand, false-if-exception, or other > metaprogramming facilities. This is certainly possible to do. Actually I would guess that this works: (setlocale LC_ALL "") E.g. $ GUILE_INSTALL_LOCALE=1 LC_ALL=sadfadf guile -c '(setlocale LC_ALL "")' guile: warning: failed to install locale Backtrace: In ice-9/boot-9.scm: 157: 7 [catch #t # ...] In unknown file: ?: 6 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 5 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 4 [eval # #] In unknown file: ?: 3 [call-with-input-string "(setlocale LC_ALL \"\")" ...] In ice-9/command-line.scm: 180: 2 [# #] In unknown file: ?: 1 [eval (setlocale LC_ALL "") #] ?: 0 [setlocale 6 ""] ERROR: In procedure setlocale: ERROR: In procedure setlocale: Invalid argument Does any of this work for you? Andy