Article View: alt.privacy.anon-server
Article #47002Re: Free reliable wordcount utility available (final version)
From: Thomas J. Boschloo
Date: Wed, 13 Nov 2002 13:36
Date: Wed, 13 Nov 2002 13:36
61 lines
4795 bytes
4795 bytes
Phil Carmody wrote:
>
> On Fri, 08 Nov 2002 15:23:32 +0100, Thomas J. Boschloo wrote:
> > ISO is not such a big deal to me. I just want my code to be portable and
> > be able to compile on a lot of different platforms (Solaris and Windows
> > 2000 at least). I own neither.
> >
>
> and
>
> > Have you notices _ctype[] is an array of ints? Do you think it is wise
> > to waste at least (256+1)*2 bytes of valuable 64kb segmented memory on?
>
> There's nothing like consistancy to make an argument more persuasive.
> And sure enough - that's _nothing_ like consistency.
You are putting the horse behind the cart, you make sure your program
runs on ALL platforms, that means you have to make it run on the WORSE
possible type of computer + compiler. Not the BEST because not every C
compiler implements all of ISO. I think I am talking to deaf mans ears
here, but I am giving you the benefit of the doubt.
Can you point out the ANSI-C specs where it says a computer must have
more than 64kb of memory for its data and that the isalpha function must
not be implemented as a memory expensive array of integers with all
possible ISO character sets ever forced upon the world by some noisy
self-important professors and professionals? It's a fast implementation,
sure, only one memory word access combined with a single logical AND
function. I couldn't do that much faster myself, but I could do it in a
lot less memory and a lot more portable than you are forcing on to other
programmers here. I bet that isalpha just uses [A..Z][a..z][0..9] in
turbo C (my prefered ANSI-C compiler), my function does a lot more and
there will be no confusion for people that read it or compiler surprises
from coding it this way. And also, tell me of a single character set for
computers that doesn't use the 7-bit ANSI character set. Your point
about isalpha being better than { if(c>='A' && c<='Z' || c>='a' &&
c<='z') } is pretty moot to an elite coder as myself (something you will
never be). Also, by testing these values cleverly it can be nearly as
fast as what you in your infinite wisdom are forcing upon other C coders
in sci.crypt. Also, this function is not time-critical. All the pieces
of code that need to be fast are fast in my code (given the severe
memory contrainst I set for myself, an indexed hashtable or a B-tree
would have been of lesser complexity and far greater speed at large
wordlists in huge binary data files).
> Phil
> (yes, I know ;-) )
Don't worry, Phil couldn't code very well either (at least his
Bass-O-Math algorithm was kind of flawed and the terminology he used
still causes confusion in pgp newsgroups, like e.g. the 'web of _trust_'
and the 'bad signature' messages),
Thomas
BTW You will be pleased to know I totally ignored your comments about
133t code having seen how lame you behave on serious topics I bring up
in this group.
--
There are two types of people with Borderline disorder. The ones I like
and the ones I don't like. - T.J. Boschloo
<home.hccnet.nl/t.j.boschloo>
Technical Details
Message-ID:
<3DD2556C.E1C531B9@hccnet.nl.invalid>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!bnewspeer01.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mailReferences:
<3DC1596C.6D2B55BD@hccnet.nl.invalid> <3DC526FC.CBCFE9B6@hccnet.nl.invalid> <3DC5451F.DBF3CDDA@eton.powernet.co.uk> <pan.2002.11.03.17.05.02.482162@yahoo.co.uk> <3DC81975.45915377@hccnet.nl.invalid> <3DC98ABC.27E67263@eton.powernet.co.uk> <3DCBC8E4.3933993A@hccnet.nl.invalid> <pan.2002.11.11.19.02.32.116865@yahoo.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <3DD2556C.E1C531B9@hccnet.nl.invalid> Subject: Re: Free reliable wordcount utility available (final version) Date: Wed, 13 Nov 2002 14:36:44 +0100 From: "Thomas J. Boschloo" <nospam@hccnet.nl.invalid> References: <3DC1596C.6D2B55BD@hccnet.nl.invalid> <3DC526FC.CBCFE9B6@hccnet.nl.invalid> <3DC5451F.DBF3CDDA@eton.powernet.co.uk> <pan.2002.11.03.17.05.02.482162@yahoo.co.uk> <3DC81975.45915377@hccnet.nl.invalid> <3DC98ABC.27E67263@eton.powernet.co.uk> <3DCBC8E4.3933993A@hccnet.nl.invalid> <pan.2002.11.11.19.02.32.116865@yahoo.co.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!bnewspeer01.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mail Newsgroups: alt.privacy.anon-server,sci.crypt,alt.fan.cult-dead-cow,alt.security.pgp Organization: Hobby Computer Club News Network Lines: 63 NNTP-Posting-Host: uds224-35.dial.hccnet.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.hccnet.nl 1037208067 8082 62.251.35.224 (13 Nov 2002 17:21:07 GMT) X-Complaints-To: abuse@hccnet.nl NNTP-Posting-Date: Wed, 13 Nov 2002 17:21:07 +0000 (UTC) Cancel-Lock: sha1:8K2FSfUi2Wo+vyUlF8qOjBcOUnc= X-Mailer: Mozilla 4.8 [en] (Win98; U) X-Accept-Language: en,nl,de X-NFilter: 1.2.1-b1