Skip to content

bitarray 0.8

Choose a tag to compare

@rocketship88 rocketship88 released this 17 Oct 20:16
· 28 commits to main since this release
44e9dc8

bitarray 0.8: packed integer arrays that behave like Tcl lists (Tcl 9.1 or later)

New since the 0.7 release (the compiled code is the same as in 0.7; this release is the stepper, the comments and the tests):

  • The stepper page (extras/bitarray_stepper.html, also at https://rocketship88.github.io/tcl-bit-array-extension/extras/bitarray_stepper.html) is a walk-through of an abstract list: pick a command, step through what the Tcl core and bitarray.c do, see the call stack, the Tcl_ObjType hook reached, and the bits. "Show code" shows the real bitarray.c with syntax colour; double-click a name to jump to its code, or to its definition in tcl.h / the Tcl declarations (embedded, one level deep). A "Fold" box collapses each switch case and if / else branch for an overview.
  • bitarray.c has 220 short side comments on the lines that are not obvious. The code did not change.
  • Six tests (run_tests.sh --testbug) that show a bug in the Tcl core: lappend inside a compiled proc turns an abstract list into a plain list (Tcl ticket 0c82728f85760f36361fe42a15f55453c94d285d). They are skipped by default, fail on Tcl 9.1.1 and pass on a core with the patch in extras/core_lappend_typeloss.patch.
  • 288 tests (282 run, 6 skipped); a full mutation run of 206 deliberate bugs: 184 caught, 22 explained in RESULTS.txt.
  • The repository has a CLAUDE.md: unzip it, drag the folder or the zip into Claude, and Claude can build it, run the tests and explain the code.

Tested on Linux and on Windows (Visual Studio 2022, Tcl 9.1.1). A real 32-bit build has not been tested.

Build and test: see README.md (build.sh / build.bat, then run_tests.sh / run_tests.bat). Expected last line of the tests: Total 288 Passed 282 Skipped 6 (Windows: Passed 281 Skipped 7).