From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.bugs Subject: bug#29669: repl-print - requet for iprovement Date: Mon, 11 Dec 2017 21:36:15 -0200 Message-ID: <20171211213615.7bca6fc8@capac> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/=0aYe51spe+FEu_=iimBBBM"; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1513035434 31286 195.159.176.226 (11 Dec 2017 23:37:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Dec 2017 23:37:14 +0000 (UTC) To: 29669@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Dec 12 00:37:09 2017 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 1eOXdE-0007sO-0X for guile-bugs@m.gmane.org; Tue, 12 Dec 2017 00:37:08 +0100 Original-Received: from localhost ([::1]:55974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOXdL-0002ue-7H for guile-bugs@m.gmane.org; Mon, 11 Dec 2017 18:37:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOXdD-0002rh-MI for bug-guile@gnu.org; Mon, 11 Dec 2017 18:37:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOXd8-0003bV-OK for bug-guile@gnu.org; Mon, 11 Dec 2017 18:37:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48744) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eOXd8-0003bP-L3 for bug-guile@gnu.org; Mon, 11 Dec 2017 18:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eOXd8-0001x6-F1 for bug-guile@gnu.org; Mon, 11 Dec 2017 18:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Pirotte Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 11 Dec 2017 23:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29669 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.15130354137482 (code B ref -1); Mon, 11 Dec 2017 23:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Dec 2017 23:36:53 +0000 Original-Received: from localhost ([127.0.0.1]:57425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOXcy-0001wX-L7 for submit@debbugs.gnu.org; Mon, 11 Dec 2017 18:36:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOXcu-0001w8-Gw for submit@debbugs.gnu.org; Mon, 11 Dec 2017 18:36:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOXco-0003NX-A4 for submit@debbugs.gnu.org; Mon, 11 Dec 2017 18:36:43 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eOXco-0003NL-5l for submit@debbugs.gnu.org; Mon, 11 Dec 2017 18:36:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOXcm-0002pr-OE for bug-guile@gnu.org; Mon, 11 Dec 2017 18:36:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOXch-0003HL-RS for bug-guile@gnu.org; Mon, 11 Dec 2017 18:36:40 -0500 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:60535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOXch-0003GY-IK for bug-guile@gnu.org; Mon, 11 Dec 2017 18:36:35 -0500 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id E1A8EA04C141 for ; Tue, 12 Dec 2017 00:36:33 +0100 (CET) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id MUThpPjqOg2k for ; Tue, 12 Dec 2017 00:36:29 +0100 (CET) Original-Received: from capac (unknown [177.43.5.169]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 5531FA04C13B for ; Tue, 12 Dec 2017 00:36:28 +0100 (CET) X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:8928 Archived-At: --Sig_/=0aYe51spe+FEu_=iimBBBM Content-Type: multipart/mixed; boundary="MP_/3_CeIukwMjOqsIcI//WtyiF" --MP_/3_CeIukwMjOqsIcI//WtyiF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, Attached a patch so repl-print becomes 'friendly' wrt large (huge) lists, arrays, srfi-4 bytevectors ... I looked at the documentation but I could not spot anything/places where things would need to be changed wrt the above patch? Dito wrt tests? Thanks, David --MP_/3_CeIukwMjOqsIcI//WtyiF Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-Updating-repl-print-to-use-truncated-print.patch =46rom d920d22efe3e77d23004122e21cec420c402f531 Mon Sep 17 00:00:00 2001 From: David Pirotte 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 ... --- module/system/repl/common.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/system/repl/common.scm b/module/system/repl/common.scm index 42d5c24ae..47799957d 100644 --- a/module/system/repl/common.scm +++ b/module/system/repl/common.scm @@ -1,6 +1,6 @@ ;;; Repl common routines =20 -;; Copyright (C) 2001, 2008-2016 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2008-2017 Free Software Foundation, Inc. =20 ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,7 @@ #:autoload (language tree-il optimize) (optimize) #:use-module (ice-9 control) #:use-module (ice-9 history) + #:use-module (ice-9 pretty-print) #:export ( make-repl repl-language repl-options repl-tm-stats repl-gc-stats repl-debug repl-welcome repl-prompt @@ -223,7 +224,7 @@ See , for more d= etails.") ;; should be printed with the generic printer, `write'. The ;; language-printer is something else: it prints expressions of ;; a given language, not the result of evaluation. - (write val) + (truncated-print val) (newline)))))) =20 (define (repl-option-ref repl key) --=20 2.15.1 --MP_/3_CeIukwMjOqsIcI//WtyiF-- --Sig_/=0aYe51spe+FEu_=iimBBBM Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAlovFm8ACgkQ83T9k6MF etf9BQgA21hwx0jQLQgsepGPFXk8I0st3d0KQ58I3qf3UeBm2tASoWCXIjre+/y2 ims7yMoQQN+zrKq/hV0WrSIiV/tiQfOicvgYzd81MPe2/priiFWFrYS6+2JpfVrs CMZCCT7rdBMTyDZIzh6HRWUICkGgHLz7HG0BzQDHweMP6ZvFGFdWcEU7S1DJAkel esDptu1vfWQHs/mXvxQYxn/MFLXSWs5uw+gaSV02SQgl/o9/YfDk67aVNG34ejI7 Q2ourKhq8Oki4QBJHix97/rZPQNMthdc88WtHP/apjs96tbeBZWWFy9gWTjCptZ5 MyQ8zOdYRzHvuZ7KH8x+bFvKTkyGUw== =xcgm -----END PGP SIGNATURE----- --Sig_/=0aYe51spe+FEu_=iimBBBM--