Path: csiph.com!weretis.net!feeder4.news.weretis.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sat, 10 Jun 2017 11:18:37 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: memscan() function or equivalent References: <20170607154705.f161b2807eb2b1a8dc12d389@gmail.com> <12fb0e96-0ac3-442d-8d04-baaef4234a85@googlegroups.com> <20170607164800.a6fba9d07170ec5d056d25a0@gmail.com> <878tl3g5jw.fsf@bsb.me.uk> <878tl0fjh1.fsf@gmail.com> <87tw3o9gve.fsf@bsb.me.uk> Date: Sat, 10 Jun 2017 17:18:36 +0100 Message-ID: <87wp8j6ckj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:qUIMPmk3qGWfYwjqa+cRwytxAXI= MIME-Version: 1.0 Content-Type: text/plain Lines: 23 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-YFlh63bgphWul0D6Dh/OKlAV/yXOHF7KQ0i5KAa8gWMIX6JwtKnGpGp155i63ic/YqmAW+sJ3mfK5zt!9kdC7pPAP7xjt6lTI3LNB5837eYvHoCKC/itwZ+d5KwKTpRYUZRyIwm5FywNf7P7ECml4DQ= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2304 Xref: csiph.com comp.lang.c:111930 Ben Bacarisse writes: > The *s0 == c0 is an indicator function (APL uses these a lot) giving > zero for the 'no' cases and one for the 'yes' cases. A count of things > (any things) in a sequence is the sum of an suitable indicator function > mapped onto the elements of the sequence. Your idea of "easily comprehended by a human" and mine appear to differ. My explanation involves the notion of "if some predicate, do some action". Yours explantion is based on the notion that "A count of things (any things) in a sequence is the sum of an suitable indicator function mapped onto the elements of the sequence." Now don't get me wrong - I understand that pretty easily. But I have multiple degrees in mathematics, and 20+ years programming experience. If I were to try the two explainations on my wife (degrees in music and history, postgraduate qualification in education), I suspect I know which one she would understand. Then she would tell me I spelt "explainations" incorrectly.