🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.tcl
Article #103

Re: Announce bitarray 1.0 - packed integer arrays for Tcl 9 (C extension)

#103
From: et99
Date: Sun, 25 Oct 2026 23:51
27 lines
2869 bytes
On 10/24/2026 4:41 AM, Ralf Fassel wrote:
> * et99 <et99@rocketship1.me>
> | Think of the bitwise operators as AND-ing two huge words made of all
> | the bits, while land and the relational operators look at each element
> | as a number.
> 
> Ah ok, I think I understand.  The concept of non-1-bit bitarrays at
> first seems strange, but then, if you need a (huge) list of
> 8-bit-numbers, why waste memory using 32-bit-ints (at least that is what
> I understand the advantage is for non 1-bit-arrays, apart from doing
> list-operations in C instead of manually in TCL).
> 
> TNX
> R'

Yes, exactly, and in some cases the 8-bit array is faster than the 1-bit at the cost of memory.

I called it bitarray because that's how it begun, with just 1-bit. But then you say, Hey claude, what about...

So he coded all the other sizes. One note, 64 can't be unsigned or it's too large for tcl's ints and it would go bignum.

I believe the python package NumPy has pretty much these same operations. That's likely where claude got the idea when I asked what else could we implement.

Claude reminds me of the superman movie with Christopher Reeve playing the man of steel. When Lois was angry that Clark got assigned her city beat, Perry White said, "Not only does he now how to treat his employer, in my 40 years in the business, he's the fastest typist I've every seen". And Claude is the fastest programmer I've ever seen. :)

-e
Technical Details
Message-ID: <11bm4mp$30tb$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11bb56j$8k4k$1@dont-email.me> <1792660578-1108@newsgrouper.org> <11bf5sa$1ju6e$1@dont-email.me> <ygacxt0dchk.fsf@akutech.de> <11bffkm$1ntq9$1@dont-email.me> <yga8q3ncomh.fsf@akutech.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: et99 <et99@rocketship1.me>
Newsgroups: comp.lang.tcl
Subject: Re: Announce bitarray 1.0 - packed integer arrays for Tcl 9 (C
 extension)
Date: Sun, 25 Oct 2026 16:51:52 -0700
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <11bm4mp$30tb$1@dont-email.me>
References: <11bb56j$8k4k$1@dont-email.me> <1792660578-1108@newsgrouper.org>
 <11bf5sa$1ju6e$1@dont-email.me> <ygacxt0dchk.fsf@akutech.de>
 <11bffkm$1ntq9$1@dont-email.me> <yga8q3ncomh.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 25 Oct 2026 23:51:54 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="99243"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18s20JdYE/8jLiwRe4zMvff"; posting-host="7c3184a9b7befad66f6cc875ee66c51f"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:XdjwvL//awvWJCX8BTOvnvDhyEQ= sha256:vrJKJ15AIrLOHAT20JHQnHyJD3nEu5pqrIs9fuy+ng8=
	sha1:L+apmixtZ8dBKK8P5vUeR7VYg8I= sha256:ZKMn/8L6yhpf7Akm1NO8GcO1UPk/x3iEumvCNePu/FQ=
In-Reply-To: <yga8q3ncomh.fsf@akutech.de>
Content-Language: en-US