Repository navigation
bitarray 0.5
bitarray 0.5, packed arrays of small integers for Tcl 9.1 that behave like ordinary Tcl lists (widths 1, 8, 16, 32 and 64 bits). It is an extension only, with no change to Tcl itself.
11 commands: new, newfrom, width, is, count, next, fill, and frombytes, tobytes, fromchars, tochars for files and text.
fill, count and next accept optional lseq-style helper words (to, .., with, by).
package require bitarray works once the folder with pkgIndex.tcl and the built library is on auto_path.
222 tests (standard tcltest), clean under valgrind. Mutation testing: 109 of 123 deliberate bugs caught.
Tried on Linux and on two Windows 10 machines with Tcl 9.1.1 (x64). Not tested: 32-bit builds, other Visual Studio versions, macOS, big-endian, threads, Tcl 9.0.x.
Prime-sieve benchmark included, with Frank van Bakel’s sieve used with his permission.
Build with sh ./build.sh (Linux) or build.bat (Windows); see the README.
This was written by Eric Taylor together with Claude (Anthropic’s AI model), which wrote most of the code and tests under his direction.