From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: Discussion for %display-auto-compilation-messages (and --no-auto-compilation-messages option) Date: Tue, 25 Mar 2014 23:19:02 -0400 Message-ID: <871txpk5p5.fsf@yeeloong.lan> References: <53125A46.3010407@gmail.com> <87a9d8tib7.fsf@gnu.org> <87r45qov0b.fsf@pobox.com> <87vbv23rhy.fsf@gnu.org> <8761n1k7s7.fsf@yeeloong.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395803994 28263 80.91.229.3 (26 Mar 2014 03:19:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2014 03:19:54 +0000 (UTC) Cc: Andy Wingo , guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Mar 26 04:20:03 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WSeNm-0006v5-HC for guile-devel@m.gmane.org; Wed, 26 Mar 2014 04:20:02 +0100 Original-Received: from localhost ([::1]:45356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSeNm-0003um-2x for guile-devel@m.gmane.org; Tue, 25 Mar 2014 23:20:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSeNd-0003tp-Jn for guile-devel@gnu.org; Tue, 25 Mar 2014 23:19:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSeNX-0004AT-9N for guile-devel@gnu.org; Tue, 25 Mar 2014 23:19:53 -0400 Original-Received: from world.peace.net ([96.39.62.75]:34133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSeNX-00049i-5U; Tue, 25 Mar 2014 23:19:47 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WSeNQ-0003ao-2J; Tue, 25 Mar 2014 23:19:40 -0400 In-Reply-To: <8761n1k7s7.fsf@yeeloong.lan> (Mark H. Weaver's message of "Tue, 25 Mar 2014 22:34:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17020 Archived-At: Mark H Weaver writes: > For example, I recently discovered that REPL Servers weren't redirecting > the warning port to the socket, so warnings about expressions typed on a > REPL server were being sent to the main program's stderr. I fixed this > in 5e74217c7cf07ad474cdce1a01e049492e7ef1b7, but if we add another port > parameter I'll have to fix that in at least two places now: server.scm > and coop-server.scm. > > I wonder if external code needs to sometimes do this as well. How will > they cope with a periodically-expanding set of port parameters, while > retaining compatible with older versions of guile that lack some of > them? Should we add a 'parameterize-all-stdout-like-ports' macro? It occurs to me that one possibility would be to allow some of these parameters to effectively mirror the value of some other parameter. For example, the 'current-notification-port' parameter could mirror the 'current-warning-port' parameter by default, which could in turn mirror the 'current-error-port' parameter by default. One way to implement this would be to make the corresponding fluid be a thunk that returns a port, instead of the port itself. The converter could accept either a port or a parameter, and convert each of these to a suitable thunk. Finally, we'd make custom 'current-warning-port' and 'current-error-port' procedures that would handling calling the thunk. Of course, this extra complexity would make these parameters inherently more expensive, so it would only be appropriate for these special seldom-used port parameters. However, for these cases it might be a worthwhile extension. In one commit we could fix a number of possible bugs (similar to the one fixed by 5e74217) that might well exist in external code. What do you think? Mark