From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "René Scharfe" <l.s.r@web.de>, "Git List" <git@vger.kernel.org>
Subject: Re: [PATCH] pass constants as first argument to st_mult()
Date: Wed, 03 Aug 2016 12:58:41 -0700 [thread overview]
Message-ID: <xmqqh9b18w0e.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160803194913.cz6xiai3g5r3sghq@sigill.intra.peff.net> (Jeff King's message of "Wed, 3 Aug 2016 15:49:13 -0400")
Jeff King <peff@peff.net> writes:
> On Wed, Aug 03, 2016 at 12:41:30PM -0700, Junio C Hamano wrote:
>
>> On Wed, Aug 3, 2016 at 12:13 PM, Jeff King <peff@peff.net> wrote:
>> > On Mon, Aug 01, 2016 at 03:31:45PM -0700, Junio C Hamano wrote:
>> >
>> > I think in my head I rewrite any multiplication like "N of M" as having
>> > "N" as the smaller number. I.e., it is conceptually simpler to me to
>> > count five 30's, then 30 five's (even though I do not implement it in my
>> > head as a sequence of additions, of course; I'd probably do that
>> > particular case as "half of ten 30's").
>> >
>> > I have no idea if that's cultural or not, though.
>>
>> Now, when you say "count five 30's", which one do you have
>> in mind? 5x30, or 30x5?
>>
>> If you meant the former, I think that _is_ cultural. I am pretty
>> sure that I was taught in school(s) to read 5x30 as adding 5
>> thirty times.
>
> I think I would say "30x5" in that case. But I'm not sure where that
> comes from, and I'm not even 100% sure that I would say that (after
> thinking about it, it's hard for me to figure out what I would have done
> if I _hadn't_ just thought about it).
By the way, reading "30x5" as "count five 30's" disagrees with
calloc(nmemb=5, size=30), which wants to add 30-byte necessary for
each member 5 times to allocate 150 bytes.
Anyway, this tangent is long enough ;-)
next prev parent reply other threads:[~2016-08-03 19:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-30 18:18 [PATCH] pass constants as first argument to st_mult() René Scharfe
2016-08-01 16:47 ` Jeff King
2016-08-01 21:00 ` Junio C Hamano
2016-08-01 21:11 ` Jeff King
2016-08-01 22:31 ` Junio C Hamano
2016-08-03 19:13 ` Jeff King
2016-08-03 19:41 ` Junio C Hamano
2016-08-03 19:49 ` Jeff King
2016-08-03 19:58 ` Junio C Hamano [this message]
2016-08-03 19:59 ` Stefan Beller
2016-08-03 20:04 ` Jeff King
2016-08-03 19:56 ` Christian Couder
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=xmqqh9b18w0e.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=peff@peff.net \
/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.
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.