From unknown Thu Jun 19 14:06:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22536 <22536@debbugs.gnu.org> To: bug#22536 <22536@debbugs.gnu.org> Subject: Status: "transferredd" typo in GNU Guix Reply-To: bug#22536 <22536@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:06:33 +0000 retitle 22536 "transferredd" typo in GNU Guix reassign 22536 guix submitter 22536 severity 22536 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 15:11:35 2016 Received: (at submit) by debbugs.gnu.org; 2 Feb 2016 20:11:35 +0000 Received: from localhost ([127.0.0.1]:57124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQhIV-00020D-Ep for submit@debbugs.gnu.org; Tue, 02 Feb 2016 15:11:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45119) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQh3k-0001cd-OR for submit@debbugs.gnu.org; Tue, 02 Feb 2016 14:56:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQh3e-0007OF-NT for submit@debbugs.gnu.org; Tue, 02 Feb 2016 14:56:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQh3e-0007OA-K1 for submit@debbugs.gnu.org; Tue, 02 Feb 2016 14:56:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQh3d-0007qG-JW for bug-guix@gnu.org; Tue, 02 Feb 2016 14:56:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQh3a-0007NI-BB for bug-guix@gnu.org; Tue, 02 Feb 2016 14:56:13 -0500 Received: from w1.tutanota.de ([81.3.6.162]:49595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQh3a-0007Ml-4G for bug-guix@gnu.org; Tue, 02 Feb 2016 14:56:10 -0500 Received: from localhost (unknown [127.0.0.1]) by w1.tutanota.de (Postfix) with ESMTP id 0BDC9FA072B for ; Tue, 2 Feb 2016 19:56:08 +0000 (UTC) Received: from w1.tutanota.de ([127.0.0.1]) by localhost (w1.tutanota.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PV-oo1iu0c1f for ; Tue, 2 Feb 2016 19:56:03 +0000 (UTC) Received: from w1.tutanota.de (unknown [127.0.0.1]) by w1.tutanota.de (Postfix) with ESMTP id 868BDFA7C41 for ; Tue, 2 Feb 2016 19:56:02 +0000 (UTC) Date: Tue, 2 Feb 2016 19:56:02 +0000 (UTC) From: To: Message-ID: Subject: "transferredd" typo in GNU Guix MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_63767_554032351.1454442962406" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 02 Feb 2016 15:11:33 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) ------=_Part_63767_554032351.1454442962406 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Upon doing "guix system init /mnt/etc/config.scm /mnt" during an install, I see multiple packages that are downloaded and it then says "XMiB transferredd". This typo should be fixed. Nicolas Maia -- Enviado seguramente pelo Tutanota. Torne sua caixa de correio criptografada hoje mesmo!https://tutanota.com ------=_Part_63767_554032351.1454442962406 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Upon doing "guix system init /mnt/etc/config.scm /mnt" during an install, I see multiple packages that are downloaded and it then says "XMiB transferredd".

This typo should be fixed.

Nicolas Maia
--
Enviado seguramente pelo Tutanota. Torne sua caixa de correio criptografada hoje mesmo! https://tutanota.com ------=_Part_63767_554032351.1454442962406-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 16:19:53 2016 Received: (at 22536) by debbugs.gnu.org; 2 Feb 2016 21:19:53 +0000 Received: from localhost ([127.0.0.1]:57175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQiMb-0005DV-Di for submit@debbugs.gnu.org; Tue, 02 Feb 2016 16:19:53 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:33646) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from <166291@gmail.com>) id 1aQiMY-0005DH-TB for 22536@debbugs.gnu.org; Tue, 02 Feb 2016 16:19:51 -0500 Received: by mail-wm0-f51.google.com with SMTP id l66so136254351wml.0 for <22536@debbugs.gnu.org>; Tue, 02 Feb 2016 13:19:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=FsKdiveLb/3cW9D6OfN0z+tMEKZPquSrqwbMvlTwSzo=; b=Q8UqdRB1M0AOtk2s2MNAeU2Kb7gl1CX2gH2WjfYu7YQoOCEykZ/r/QFvJ6wPRwjDlq clPV0DxX+urGK1FlRdPcpQQs1qZ8K0wRWcPtzXD+KWuGX+MDYaWvGdmkxno5yZwSMjXn OdpO0eNrJJPrjVLSLdP3QquiUN+B7UfX0frjUv0VTVgbt4goPBOO/diWJh588DHp8ZZj phAkmHk02j3mCQrnRBjA96j7Bqxn2tgCZ1dCZx2LV2LJYLlQAwL45SFEzC5SQQYxnEtq rWHSwnYRjlUU7VWCVqIo7W6hLzrK8pw1z0shjyjQeyhqsbb7xTRQ1ZTrKsVOsouWen88 IXfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=FsKdiveLb/3cW9D6OfN0z+tMEKZPquSrqwbMvlTwSzo=; b=dXMW6s90eifc2I/TZAIWCVnCRy1pPeN+Y9hsbxorZdDhI80tyGq3BqiAGfGF+Y1urL ccAUHLlzZXvihoqPbIZEoIY/VyN4IXVfYYRhPE/JNdF13I+GNTGrboT0q277+Eqq1K6P msIMqsNEbnzfqvQT1dZYvt4E6PIkzgg1WGOnZRgtbtchJZk3HCRTBzgiCoKVsAKZPIPO SoInkmUpdOyK/Y+SgLSAub3kYTwmLDa6fZmloMvfhqC94OwhYtvE/9nNIXiiN0NdsPPV IflTPEqpM+jHfFG7idc45G4cTTNvpvdyU1zbBz+6Y/l1O33kk9urw2aTnNsOSXRhAzWS gVDg== X-Gm-Message-State: AG10YOQrOZgEL4krtKyY/0U2cP3No6ue02FjRbby3qUnuOmur3G7VyN9DvUvQRdgOSi9QQ== X-Received: by 10.194.82.97 with SMTP id h1mr278650wjy.88.1454447985123; Tue, 02 Feb 2016 13:19:45 -0800 (PST) Received: from localhost ([185.100.85.191]) by smtp.gmail.com with ESMTPSA id e77sm18249919wma.18.2016.02.02.13.19.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Feb 2016 13:19:44 -0800 (PST) Date: Wed, 3 Feb 2016 08:15:26 +1100 From: Jookia <166291@gmail.com> To: nicolasmaia@tutanota.com Subject: Re: bug#22536: "transferredd" typo in GNU Guix Message-ID: <20160202211526.GA3860@novena-choice-citizen.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 22536 Cc: 22536@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Tue, Feb 02, 2016 at 07:56:02PM +0000, nicolasmaia@tutanota.com wrote: > Upon doing "guix system init /mnt/etc/config.scm /mnt" during an install, I > see multiple packages that are downloaded and it then says "XMiB > transferredd". > > This typo should be fixed. To add on this, it's a bit more complicated than that: It's due to the progress bar changing to a smaller size and not clearing the line completely. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 23 08:28:31 2016 Received: (at control) by debbugs.gnu.org; 23 Feb 2016 13:28:32 +0000 Received: from localhost ([127.0.0.1]:39462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYD0x-00036L-NN for submit@debbugs.gnu.org; Tue, 23 Feb 2016 08:28:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54008) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYD0w-000368-BC for control@debbugs.gnu.org; Tue, 23 Feb 2016 08:28:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYD0m-0003KD-DQ for control@debbugs.gnu.org; Tue, 23 Feb 2016 08:28:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYD0m-0003K9-AY for control@debbugs.gnu.org; Tue, 23 Feb 2016 08:28:20 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:35918 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aYD0l-0005T1-FI for control@debbugs.gnu.org; Tue, 23 Feb 2016 08:28:19 -0500 Date: Tue, 23 Feb 2016 14:28:17 +0100 Message-Id: <87k2lvk13i.fsf@gnu.org> To: control@debbugs.gnu.org From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: control message for bug #22536 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) merge 22536 22713 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 08 14:07:54 2016 Received: (at 22536) by debbugs.gnu.org; 8 Apr 2016 18:07:54 +0000 Received: from localhost ([127.0.0.1]:54888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoap0-0004CG-8f for submit@debbugs.gnu.org; Fri, 08 Apr 2016 14:07:54 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:53244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoaoy-0004C7-7U for 22536@debbugs.gnu.org; Fri, 08 Apr 2016 14:07:53 -0400 Received: from localhost (91.141.3.127.wireless.dyn.drei.com [91.141.3.127]) by dd1012.kasserver.com (Postfix) with ESMTPSA id D492C1CA1AE5; Fri, 8 Apr 2016 20:07:49 +0200 (CEST) Date: Fri, 8 Apr 2016 20:07:45 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?UTF-8?B?Q291cnTDqHM=?=) Subject: Re: guix lint Message-ID: <20160408200745.49b3a761@scratchpost.org> In-Reply-To: <8760vt84zg.fsf@gnu.org> References: <20160407143744.3b0d8e98@scratchpost.org> <20160407150957.GA18750@jasmine> <8760vt84zg.fsf@gnu.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.28; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22536 Cc: Guix-devel , 22536@debbugs.gnu.org, Leo Famulari X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > There may other places to fix, see . Yeah, there's one at guix/build/download.scm in function "progress-proc". I checked what "string-pad-middle" - which is used by the function "progress-proc" - does and I... object to it in priciple. What it does is add padding (in the middle) in order to make a string at least a certain length (sometimes more!). So we have: >>> (string-pad-middle "http://foo" "bar 34 B/s" 80) "http://foo bar 34 B/s" Arguments against it are (o: questionable mitigation, leaning heavily against; *: against it with OK mitigation; X: definitely against it): o The terminal width is not passed to it correctly (can be fixed, although I have to read up on what the currently recommeded way is. tcgetattr ?). o The terminal width can change while the script is running (can this be fixed? It would need a SIGWINCH handler and some kind of notification to scripts/download so it reprints the progress text). Now you can have a race between (1) and (2), fun. * The terminal width can be changed after the script is done and has printed its thing (nobody can fix the output up anymore). In our present case, the text is supposedly ephemeral, so it shouldn't be there anymore, so it's fine. o Since it uses string-length it doesn't actually count how many glyphs would be printed on the terminal, while it should do so (this can be fixed - but at large complexity increase and as long as the terminal doesn't use variable-width fonts; arguably if it's documented to be only used for ASCII strings it's simple. We should probably do the latter - and never translate it into another human language). o The resulting string can be longer than what it was told to (can be fixed - although what should it cut off first then? The first or the second string? the first string is the (abbreviate file) and the second string contains transferred amount, speed etc). * Overengineering helps no one. If the terminal is not wide enough, let the user resize it or the terminal handler virtual-word-wrap it or whatever instead of this abbreviation business. Anything but every program guessing how wide the tty is at some random point in time. Many GNU tools do the latter and I wish they would stop it and just print the entire thing. Because the progress is ephemeral (it's replaced by a new paragraph every time), this argument is not so strong here. o Having this maximal padding in-between means that if we misjudge the glyph width, it will certainly mess up the display. While if we didn't have this padding, the error would often not manifest as failure (if there's enough free space left anyway). Why do it? Any more arguments for or against it? I can also fix up string-pad-middle while maintaining its way, but just for the record, this is a bad way of doing it. If we are concerned about all emphemeral "transferred" lines lining up, just print the speed first (with fixed width, if possible) and the URL afterwards, with one space in-between. We could abbreviate it if we have to - but should the download fail, the error message then has to contain the unabbreviated URL for usability (note: it does). At that point, why have the URL in the download progress at all? Total percentage done (over all the downloads) would be a lot more useful. If we do print a table, I would suggest setting a tab stop (using ESC H or similar) and using the tab character to print tables - that's what they are for. Note: there's a standalone "column -t" tool which also does the right thing, apparently. Also, is there a control character which returns to the beginning of the paragraph? Double-clicking on a paragraph in gnome-terminal selects the entire paragraph - so it does know what extent the paragraph has. However, printing CR returns me to the beginning of the row, not the beginning of the paragraph. The terminal could be such a nice universal text interface - if programs don't have to know presentation details like how wide the terminal is currently. Why should a program have to care? *shakes head* From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 08 14:45:35 2016 Received: (at 22536) by debbugs.gnu.org; 8 Apr 2016 18:45:35 +0000 Received: from localhost ([127.0.0.1]:54930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aobPT-0005DO-2Y for submit@debbugs.gnu.org; Fri, 08 Apr 2016 14:45:35 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:55311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aobPR-0005DG-9E for 22536@debbugs.gnu.org; Fri, 08 Apr 2016 14:45:33 -0400 Received: from localhost (91.141.3.127.wireless.dyn.drei.com [91.141.3.127]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 02D271CA1AE5 for <22536@debbugs.gnu.org>; Fri, 8 Apr 2016 20:45:31 +0200 (CEST) Date: Fri, 8 Apr 2016 20:45:30 +0200 From: Danny Milosavljevic Subject: Progress on the guix download progress display Message-ID: <20160408204530.56912d28@scratchpost.org> In-Reply-To: <20160408200745.49b3a761@scratchpost.org> References: <20160407143744.3b0d8e98@scratchpost.org> <20160407150957.GA18750@jasmine> <8760vt84zg.fsf@gnu.org> <20160408200745.49b3a761@scratchpost.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.28; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22536 Cc: 22536@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) A quick try to get a prefer-the-tail string concatenator to work - still has some limitations: (define (abbreviate text len) (string-take text (min len (string-length text)))) (define (abbreviate-texts-prefer-to-take-tail texts len) "Given a list of strings TEXTS, returns a string, containing at most LEN codepoints. If possible, prefers to still keep the last text. If this text is too long, takes as many heading codepoints as possible of it. If there's still space, also keeps the second-to-last text. If this text is too long, takes as many heading codepoints as possible of it. ... If there's still space, also keeps the first text. If this text is too long, takes as many heading codepoints as possible of it. We have no idea how wide it will actually be when displayed, so: - make sure to only use it with ASCII text, or - at least only use it with half-width characters." (if (null? texts) "" (let* ((remainder (abbreviate-texts-prefer-to-take-tail (cdr texts) len)) (len (- len (string-length remainder))) (text (abbreviate (car texts) len))) (string-append text remainder)))) (display (abbreviate-texts-prefer-to-take-tail '("hello world" " " "this i") 10)) (newline) From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 14 18:38:36 2016 Received: (at 22536) by debbugs.gnu.org; 14 Apr 2016 22:38:36 +0000 Received: from localhost ([127.0.0.1]:35742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqpuF-0003g7-VP for submit@debbugs.gnu.org; Thu, 14 Apr 2016 18:38:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqpuD-0003fv-SH for 22536@debbugs.gnu.org; Thu, 14 Apr 2016 18:38:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqpu7-0003Da-G1 for 22536@debbugs.gnu.org; Thu, 14 Apr 2016 18:38:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqptz-0003Be-56; Thu, 14 Apr 2016 18:38:19 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:52570 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aqpty-0002rj-8l; Thu, 14 Apr 2016 18:38:18 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#22536: guix lint References: <20160407143744.3b0d8e98@scratchpost.org> <20160407150957.GA18750@jasmine> <8760vt84zg.fsf@gnu.org> <20160408200745.49b3a761@scratchpost.org> Date: Fri, 15 Apr 2016 00:38:15 +0200 In-Reply-To: <20160408200745.49b3a761@scratchpost.org> (Danny Milosavljevic's message of "Fri, 8 Apr 2016 20:07:45 +0200") Message-ID: <87shynhl48.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 22536 Cc: Guix-devel , 22536@debbugs.gnu.org, Leo Famulari X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Danny Milosavljevic skribis: >>>> (string-pad-middle "http://foo" "bar 34 B/s" 80) > "http://foo bar 34= B/s" > > Arguments against it are (o: questionable mitigation, leaning heavily aga= inst; *: against it with OK mitigation; X: definitely against it): > o The terminal width is not passed to it correctly (can be fixed, althoug= h I have to read up on what the currently recommeded way is. tcgetattr ?). > o The terminal width can change while the script is running (can this be = fixed? It would need a SIGWINCH handler and some kind of notification to sc= ripts/download so it reprints the progress text). Now you can have a race b= etween (1) and (2), fun. > * The terminal width can be changed after the script is done and has prin= ted its thing (nobody can fix the output up anymore). In our present case, = the text is supposedly ephemeral, so it shouldn't be there anymore, so it's= fine. Unfortunately, except when using =E2=80=98guix download=E2=80=99, this code= =E2=80=99s stdout is always captured by the daemon, which in turn passes it to the client (the =E2=80=98guix=E2=80=99 command), and the client=E2=80=99s terminal wid= th can hardly be known to the download code. However, commit b0a6a9713076347c14ee2dd0ea494ab086df2a82 improves the situation in some cases. > o Since it uses string-length it doesn't actually count how many glyphs w= ould be printed on the terminal, while it should do so (this can be fixed -= but at large complexity increase and as long as the terminal doesn't use v= ariable-width fonts; arguably if it's documented to be only used for ASCII = strings it's simple. We should probably do the latter - and never translate= it into another human language). =E2=80=98string-length=E2=80=99 returns the number of Unicode codepoints, w= hich is the number of glyphs in this case. > I can also fix up string-pad-middle while maintaining its way, but just f= or the record, this is a bad way of doing it. > > If we are concerned about all emphemeral "transferred" lines lining up, j= ust print the speed first (with fixed width, if possible) and the URL after= wards, with one space in-between. I believe this one is fixed by 8a2154fefaafe631905c12891c9c2587dadbc863. > We could abbreviate it if we have to - but should the download fail, the = error message then has to contain the unabbreviated URL for usability (note= : it does). At that point, why have the URL in the download progress at all= ? Total percentage done (over all the downloads) would be a lot more useful. This was initially discussed at . It seems we=E2=80=99ve diverged from what was proposed there, though. Thoughts? > If we do print a table, I would suggest setting a tab stop (using ESC H o= r similar) and using the tab character to print tables - that's what they a= re for. Note: there's a standalone "column -t" tool which also does the rig= ht thing, apparently. So, what would be your preference? :-) > Also, is there a control character which returns to the beginning of the = paragraph? Double-clicking on a paragraph in gnome-terminal selects the ent= ire paragraph - so it does know what extent the paragraph has. However, pri= nting CR returns me to the beginning of the row, not the beginning of the p= aragraph. No idea. Thanks for your feedback! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 18:04:03 2016 Received: (at 22536) by debbugs.gnu.org; 9 May 2016 22:04:03 +0000 Received: from localhost ([127.0.0.1]:44809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aztHX-0007h1-Ky for submit@debbugs.gnu.org; Mon, 09 May 2016 18:04:03 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52093) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aztHU-0007gY-47 for 22536@debbugs.gnu.org; Mon, 09 May 2016 18:04:02 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D476220D3E; Mon, 9 May 2016 18:03:56 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Mon, 09 May 2016 18:03:56 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=famulari.name; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=8zMiFx6LEiUdHtBrmAMxiMXWN4Y =; b=jj1AUJRhc4yo4t7H7l/rGA/66WRkKTTx/gc1/9EopibUMXSDn0Q+8r/mBUV wn8EscjcvgMacitgPdFtI0dZn4Chn5mNvrb0ADdYUMSKmzvcQf+sd6jGqTPVAoES wr6k4+1i1K7wH+qSireRIwdddcQwWxig9yGbyZzMLy/Nb6vU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=8z MiFx6LEiUdHtBrmAMxiMXWN4Y=; b=ky9zt9rRubjdkMGdpvcOD5da04vYpFouZw Zp0QxTvSiULqw43rMQAI32zEZlo6icwLk1Ei6rhaUBb5BvGQ8sIxNbiAnp0RXPWn yBJXahZeCU3EnLqw6n9XVPkDKx6ebE7vqHWjoWWAme4Xew3e0yh1pY8pCMHibmJ2 i58xKP5L4= X-Sasl-enc: kOo78K+TVsYpJV4PEMh0XzV6xm4byG3ns2AsnAgcPIxy 1462831436 Received: from localhost (c-73-188-17-148.hsd1.pa.comcast.net [73.188.17.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 8B6EDC00018 for <22536@debbugs.gnu.org>; Mon, 9 May 2016 18:03:56 -0400 (EDT) Date: Mon, 9 May 2016 18:03:55 -0400 From: Leo Famulari To: 22536@debbugs.gnu.org Subject: Download progress display Message-ID: <20160509220355.GA16725@jasmine> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22536 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) As reported on #guix by user ilit, when the terminal is very narrow, the download progress line is constantly reprinted, as in this excerpt: $ guix build -S libreoffice substitute: warning: failed to install locale: Invalid argument The following file will be downloaded: /gnu/store/yv821gn5z48g19mzjcvb4dfcxljjsg8q-libreoffice-5.0.5.2.tar.xz @ substituter-started /gnu/store/yv821gn5z48g19mzjcvb4dfcxljjsg8q-libreoffice-5.0.5.2.tar.xz /gnu/store/9p7mf2a21c6a5k06jgbb9yg9abx7ilh9-guix-0.10.0-0.8062/libexec/guix/substitute warning: failed to install locale: Invalid argument Found valid signature for /gnu/store/yv821gn5z48g19mzjcvb4dfcxljjsg8q-libreoffice-5.0.5.2.tar.xz >From https://4606.nsupdate.info/nar/yv821gn5z48g19mzjcvb4dfcxljjsg8q-libreoffice-5.0.5.2.tar.xz Downloading yv821g...-libreoffice-5.0.5.2.tar.xz (159.4MiB installed)... libreoffice-5.0.5.2.tar.xz 2.7MiB/s 00:00 | 104KiB transferre libreoffice-5.0.5.2.tar.xz 2.7MiB/s 00:00 | 112KiB transferre libreoffice-5.0.5.2.tar.xz 2.9MiB/s 00:00 | 120KiB transferre libreoffice-5.0.5.2.tar.xz 2.7MiB/s 00:00 | 128KiB transferre libreoffice-5.0.5.2.tar.xz 2.8MiB/s 00:00 | 136KiB transferre libreoffice-5.0.5.2.tar.xz 2.8MiB/s 00:00 | 144KiB transferre libreoffice-5.0.5.2.tar.xz 2.9MiB/s 00:00 | 152KiB transferre libreoffice-5.0.5.2.tar.xz 3.0MiB/s 00:00 | 160KiB transferre lib From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 05 17:04:56 2018 Received: (at 22536) by debbugs.gnu.org; 5 Feb 2018 22:04:57 +0000 Received: from localhost ([127.0.0.1]:59137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eiosi-00077I-Lq for submit@debbugs.gnu.org; Mon, 05 Feb 2018 17:04:56 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:50122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eiosh-00077A-7G for 22536@debbugs.gnu.org; Mon, 05 Feb 2018 17:04:55 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 376BC1030F; Mon, 5 Feb 2018 23:04:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QlYpjTOy8BBL; Mon, 5 Feb 2018 23:04:53 +0100 (CET) Received: from jurong (unknown [IPv6:2001:910:103f::c1e]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 809BD1010E; Mon, 5 Feb 2018 23:04:53 +0100 (CET) Date: Mon, 5 Feb 2018 23:04:52 +0100 From: Andreas Enge To: 22536@debbugs.gnu.org Subject: Re: Download progress display Message-ID: <20180205220452.GA29162@jurong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22536 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) The progress bar has been revamped since this bug was submitted, and the original problem is solved. On a very narrow terminal, lines may still be printed repeatedly, but anyway there is a problem then to display all information legibly. I think that this bug report can safely be closed, but wait for another opinion before doing so. Andreas From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 14 16:34:34 2018 Received: (at 22536-done) by debbugs.gnu.org; 14 Feb 2018 21:34:34 +0000 Received: from localhost ([127.0.0.1]:43335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1em4hG-0001sX-BI for submit@debbugs.gnu.org; Wed, 14 Feb 2018 16:34:34 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:51220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1em4hD-0001sO-DR for 22536-done@debbugs.gnu.org; Wed, 14 Feb 2018 16:34:33 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 430A010739; Wed, 14 Feb 2018 22:34:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gI-c3nYpkjPQ; Wed, 14 Feb 2018 22:34:29 +0100 (CET) Received: from jurong (unknown [IPv6:2001:910:103f::c1e]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 74EE771BA; Wed, 14 Feb 2018 22:34:29 +0100 (CET) Date: Wed, 14 Feb 2018 22:34:27 +0100 From: Andreas Enge To: 22536-done@debbugs.gnu.org Subject: Re: bug#22536: Download progress display Message-ID: <20180214213427.GA1027@jurong> References: <20180205220452.GA29162@jurong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180205220452.GA29162@jurong> User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 22536-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Closing this bug since I did not receive an adverse opinion in a week. Andreas From unknown Thu Jun 19 14:06:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 15 Mar 2018 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator