The gap
$ ./compiler/pascal26 lekkerzeilen/world.py out
pascal26:9: error: import: no unit named array and no shim mimic_array
Same for audio.py:25.
What it needs
array.array(typecode) with append, indexing, len, iteration, frombytes/
tobytes, and the buffer handoff that makes it useful to the GL layer. The
typecodes actually used by the target are float ('f') first.
lib/rtl/mimic_*.{py,pas} is the established shape and the error message names
the expected filename, so the resolution path is already wired — this is a
module, not a mechanism.
RESOLVED 2026-09-09 (frankB) — and the "2 modules" in the summary above did not hold
lib/rtl/mimic_array.pas, reached by the existing mimic_ fallback with no
compiler change to the resolver. Every typecode CPython has (b B u h H i I l L q Q f d), construction empty / from bytes / from a list, frombytes,
tobytes, byteswap, itemsize, typecode, len(), and indexed read and
write. test/test_nilpy_the_array_module.npy asserts the whole surface against
an .expected generated by CPython, with a Makefile row and a refusal row.
IT DOES NOT UNBLOCK world OR audio, and the ticket said it would.
Measured after landing, at compiler 418064fca1d3:
| module | wall before | wall after |
|---|---|---|
world |
no unit named array |
no unit named struct |
audio |
no unit named array |
no class declares a method or callable field .queued |
The census total is unchanged at 8 of 23. The array wall in both modules is gone and a deeper one was behind it. That is not a defect in the measurement that produced "2 modules" — it is what a first-error census can say. A compiler stops at the first error, so a blocker census counts the modules where a gap is the FIRST wall, never the modules it is sufficient to clear. Every "unblocks N modules" figure on this umbrella should be read that way, including the ones on the tickets beside this. Recorded on the umbrella too.
feature-n-the-struct-module is filed and is world's next wall.
Two compiler defects found by writing it, both silent
- A qualified constructor named by a Pascal reserved word built garbage.
The shim's class must be spelled
array_(arrayis reserved), andPyMapReservedMember— thetk.END->END_mapping — was applied on the value and call paths but NOT on the constructor path (PyClassCreateread the raw token, and the gate at the caller tested the raw token too). Soarray.array("h")compiled, evaluated to 104 —ord('h')— and segfaulted a line later. Fixed in the same commit; the array test is its positive control, and a refusal row keeps the fix from widening to UNQUALIFIED names. bytes(n)was refused wherebytearray(n)was accepted. audio.py allocates its buffer withbytes(count * 2). Added to pylib.
One that is filed rather than fixed
bug-n-an-overloaded-constructor-is-picked-by-name-ignoring-argument-type —
CPython's array.array(tc, init) means opposite things for a bytes and a list
initialiser, and two same-arity constructors cannot be told apart here: the
FIRST one runs. The shim carries ONE constructor with a runtime is TPyList
check and a REVERT-TO-TWO-OVERLOADS note, which is Track B's
revert-when-fixed pattern and the same shape pylib's own bytes(b: TPyBytes)
already uses for the function-side version of that bug.
Log
- 2026-09-09 — resolved; this names the commit that carried the resolve, which is not always the one that carried the change — commit d1efd1dee.