From: Steve Sprang <steve.sprang@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] build: Fix potential type error when generating human-friendly byte count strings.
Date: Mon, 14 Sep 2015 20:27:48 -0700 [thread overview]
Message-ID: <CA+xn8YDL6PqWW3gL=2H0VZUbXYgGVHTxUUSScGZGGpp7XY8Xqw@mail.gmail.com> (raw)
In-Reply-To: <CA+xn8YAa-dg6Oo-+62PSe6G=0DMLVpn8yfRNHWDG2ahgX8dGqQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
Hi Mark,
Does the updated patch look okay? I'm making some related changes and it
would be easier if this patch was integrated.
Thanks!
-Steve
On Wed, Sep 9, 2015 at 8:31 PM, Steve Sprang <steve.sprang@gmail.com> wrote:
> Sure thing. Here you go.
>
> -Steve
>
> On Wed, Sep 9, 2015 at 7:42 PM, Mark H Weaver <mhw@netris.org> wrote:
>
>> Steve Sprang <steve.sprang@gmail.com> writes:
>>
>> > This is a follow up tweak to my previous "progress bar" patch. With a
>> > really slow throughput it's possible to get fractional sub-KiB byte
>> > counts, so I added some additional number massaging.
>>
>> Sounds good! Looks good to me except for a few minor nits on this
>> auxiliary procedure:
>>
>> > +(define (number->integer n)
>> > + "Given an arbitrary number N, round it and return the exact result."
>> > + (inexact->exact (round n)))
>>
>> How about calling it "nearest-exact-integer"? Also, it makes sense only
>> for real numbers, not arbitrary numbers, and the variable name N is
>> conventionally used to denote natural numbers, and X for real numbers.
>>
>> So, how about naming the argument 'x', and using something closer to the
>> following docstring:
>>
>> "Given a real number X, return the nearest exact integer, with ties
>> going to the nearest exact even integer."
>>
>> Otherwise, looks good to me. Can you send an updated patch?
>>
>> Mark
>>
>
>
[-- Attachment #2: Type: text/html, Size: 2461 bytes --]
next prev parent reply other threads:[~2015-09-15 3:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 21:05 [PATCH] build: Fix potential type error when generating human-friendly byte count strings Steve Sprang
2015-09-10 2:42 ` Mark H Weaver
2015-09-10 3:31 ` Steve Sprang
2015-09-15 3:27 ` Steve Sprang [this message]
2015-09-15 3:40 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+xn8YDL6PqWW3gL=2H0VZUbXYgGVHTxUUSScGZGGpp7XY8Xqw@mail.gmail.com' \
--to=steve.sprang@gmail.com \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.