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: Set debug output width in REPL Date: Sat, 05 Mar 2011 14:18:31 -0500 Message-ID: <87mxl91im0.fsf@netris.org> References: <309828.81527.qm@web37907.mail.mud.yahoo.com> <87bp21qagc.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1299352745 31464 80.91.229.12 (5 Mar 2011 19:19:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 5 Mar 2011 19:19:05 +0000 (UTC) Cc: 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 Sat Mar 05 20:19:01 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pvx0G-0005r2-TV for guile-devel@m.gmane.org; Sat, 05 Mar 2011 20:19:01 +0100 Original-Received: from localhost ([127.0.0.1]:37110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pvx0F-0004Ee-W1 for guile-devel@m.gmane.org; Sat, 05 Mar 2011 14:19:00 -0500 Original-Received: from [140.186.70.92] (port=48650 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pvx08-0004EV-Hl for guile-devel@gnu.org; Sat, 05 Mar 2011 14:18:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pvx07-00030o-GY for guile-devel@gnu.org; Sat, 05 Mar 2011 14:18:52 -0500 Original-Received: from world.peace.net ([216.204.32.208]:36359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pvx05-0002yJ-U5; Sat, 05 Mar 2011 14:18:49 -0500 Original-Received: from ip68-9-118-38.ri.ri.cox.net ([68.9.118.38] helo=freedomincluded) by world.peace.net with esmtpa (Exim 4.69) (envelope-from ) id 1Pvwzq-000474-6d; Sat, 05 Mar 2011 14:18:34 -0500 Original-Received: from mhw by freedomincluded with local (Exim 4.69) (envelope-from ) id 1Pvwzo-0006WI-KE; Sat, 05 Mar 2011 14:18:32 -0500 In-Reply-To: <87bp21qagc.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 25 Feb 2011 00:28:19 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 216.204.32.208 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11780 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) writes: >>> Mark also wrote: >>> Better yet, maybe it should be an optional attribute of the output port, >>> which would allow pretty-print and truncated-print to use it as well. >>> Output ports attached to terminals could determine the terminal width >>> from the OS, on systems that support it. > > I like the idea of using the terminal=E2=80=99s width, but I dislike the = idea of > having it a property of the port, since it really seems orthogonal to > me. I agree that it's not a perfect solution, but can you propose a better one that might reasonably be adopted in practice? Unfortunately, if we punt on this for want of perfection, we're likely to end up with a nearly pessimal solution: each individual module that needs to format output for fixed-width character displays will end up with its own half-baked solution, such as the one just applied. Ports are already very far from the simple and elegant ideas that comprise most of Scheme, and they already include much functionality that should be orthogonal. Which is worse? To add one more optional attribute to ports, or to have several inconsistent and inflexible notions of terminal width floating around the rest of the system? Mark