GNU bug report logs - #29669
repl-print - requet for iprovement

Previous Next

Package: guile;

Reported by: David Pirotte <david <at> altosw.be>

Date: Mon, 11 Dec 2017 23:37:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Andy Wingo <wingo <at> igalia.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Mark H Weaver <mhw <at> netris.org>, 29669 <at> debbugs.gnu.org, David Pirotte <david <at> altosw.be>
Subject: bug#29669: repl-print - requet for iprovement
Date: Thu, 05 Jul 2018 09:49:04 +0200
On Sun 01 Jul 2018 18:26, ludo <at> gnu.org (Ludovic Courtès) writes:

> Hello,
>
> David Pirotte <david <at> altosw.be> skribis:
>
>> From d920d22efe3e77d23004122e21cec420c402f531 Mon Sep 17 00:00:00 2001
>> From: David Pirotte <david <at> altosw.be>
>> Date: Mon, 11 Dec 2017 21:28:24 -0200
>> Subject: [PATCH] Updating repl-print to use truncated-print
>>
>> * module/system/repl/common.scm (repl-print): Use (truncated-print val),
>>   not (write val).  With this update, repl-print becomes 'friendly' wrt
>>   large (huge) lists, arrays, srfi-4 butevoectors ...
>
> Note that it’s already possible to do this:
>
> scheme@(guile-user)> ,use (ice-9 pretty-print)
> scheme@(guile-user)> ,o print (lambda (repl obj) (truncated-print obj) (newline))
> scheme@(guile-user)> (iota 500)
> $20 = (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 # …)
>
> So the question becomes: should we change the default?
>
> I have a slight preference for keeping the default as it is to avoid
> surprises, but no strong opinion.
>
> Andy, Mark, others, WDYT?

Hoo, I don't know.  If we were to do this it should be controllable by
REPL options, I think; we'd need the ability to go back and forth.  But
if we have the option I think it could make sense for it to be on by
default, like what GDB does.  Thing is, truncated-print does its job
only OK, not great, so it's a hard sell to standardize on it.  You
probably do want multi-line prints sometimes...

Andy




This bug report was last modified 6 years and 317 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.