Programming · free software · the open webSubscribe via RSS

The notebook index

Post archive

45 posts.

  • Python 3.16 gives regular-expression character sets set algebraPython · 18 Nov 2026

    Python 3.16.0a2 adds nested character sets, set operators and Unicode property escapes to re. They can express character policy more directly, but alpha-stage semantics and compatibility still need explicit tests.

  • A memory mapping is not a file snapshotNix and Unix · 17 Nov 2026

    mmap makes file contents addressable as memory, but it does not promise a stable snapshot, coherent concurrent update, or durable write. Those guarantees must come from the surrounding file protocol.

  • A C atomic flag publishes data only through a matching orderC and compilers · 16 Nov 2026

    An atomic flag can communicate that a write occurred, but ordinary data becomes safely visible to another thread only when the flag operations establish synchronization.

  • Rust’s allocator API moves memory policy into the containerC and compilers · 15 Nov 2026

    Rust 1.100 stabilizes the core allocator API for Vec and Box. That makes allocation policy explicit at a collection boundary, while ownership, allocator equivalence and invalidation rules still determine whether the design is sound.

  • C effective type is an access rule, not a layout guessC and compilers · 14 Nov 2026

    C’s effective-type rules constrain how an object’s stored value may be read. A pointer cast changes a pointer expression, not the type or representation of the object it points at.

  • An asyncio task group defines a failure domainPython · 13 Nov 2026

    A TaskGroup gives related asyncio tasks a shared lifetime: leaving the block waits for them, and an unhandled child failure cancels its siblings. That is useful only when the group matches the work that should succeed or fail together.

  • Go error wrapping makes implementation details part of the APIC and compilers · 12 Nov 2026

    In Go, wrapping an error preserves a machine-readable relationship that callers can inspect. Decide whether that relationship is a supported part of your package contract before using `%w` or exposing an Unwrap method.

  • A Go security release crosses the toolchain boundaryC and compilers · 11 Nov 2026

    Go 1.27.4, released on 10 November 2026, fixes security issues across build tools and runtime libraries. Treat it as a toolchain update with an explicit inventory, verification path and deployment plan, even when your module graph stays the same.

  • DTLS 1.3 protects datagrams; it does not guarantee deliveryProtocols · 10 Nov 2026

    OpenSSL 4.1.0 adds DTLS 1.3 support, bringing a TLS 1.3 based security protocol to datagram applications. The API does not turn UDP into a reliable ordered stream, so application delivery rules remain part of the design.

  • Go’s new JSON packages separate syntax from meaningC and compilers · 08 Nov 2026

    Go 1.27’s stable JSON v2 API separates JSON text processing from mapping JSON values to Go types. Its stricter defaults can expose assumptions at an interface boundary, so migration is a data-contract change to test deliberately.

  • A cache key is a claim that two requests mean the same thingProtocols · 07 Nov 2026

    A cache key decides which computations or responses may be reused. Treat it as an explicit equivalence rule, and separate identity, freshness, privacy and invalidation when deciding whether reuse is correct.

  • Python’s tar filter shows what a security boundary must coverPython · 06 Nov 2026

    Python 3.15.2 fixed a path escape in tarfile’s explicit tar filter. The flaw shows why extraction safety depends on the order of archive entries, while the release’s separate TLS fix illustrates a very different kind of trust decision.

  • Go generic methods add abstraction inside a receiver’s namespaceC and compilers · 05 Nov 2026

    Go 1.27 adds generic methods, but keeps interface method sets non-generic. That boundary changes where reusable operations belong and what an interface can promise.

  • A directory descriptor can bound a pathname, but only with the right resolution rulesSelf-hosting · 04 Nov 2026

    A directory file descriptor gives relative operations a stable starting point, but it does not by itself prevent `..`, symlink, or mount traversal. Linux openat2 and Python dir_fd make the boundary explicit in different ways.

  • Context variables follow asyncio tasks, not just threadsPython · 03 Nov 2026

    ContextVar gives asynchronous code task-local state without threading.local() leaking values between coroutines. Task creation, token reset and thread handoffs define where that state begins and ends.

  • Descriptors turn attribute access into an interface policyPython · 02 Nov 2026

    A descriptor lets a class attribute mediate reads and writes. Understanding its precedence, owner binding and storage name helps decide when the protocol is clearer than a property or ordinary method.

  • A process pool is an import and serialization boundaryPython · 01 Nov 2026

    Python process workers may start from a fresh interpreter, a fork server or a forked parent. Put work in importable functions, guard process creation, and choose a context deliberately.

  • Python 3.15 makes deferred imports explicit—and changes when failure happensPython · 31 Oct 2026

    Python 3.15 adds opt-in lazy imports that defer module loading until first use. The startup win comes with a changed point of execution: errors and import-time effects move to the path that touches the name.

  • A fast wire layout still needs a trust boundaryProtocols · 27 Oct 2026

    Cap’n Proto’s word-aligned layout supports efficient traversal, but a receiver still has to validate bounds and resource use. Serialization also says nothing by itself about who sent a message or what that sender may do.

  • Promise pipelining removes a wait, not a dependencyProtocols · 16 Oct 2026

    Promise pipelining lets a client send a call against a result that has not arrived yet. It can collapse sequential network waits into one round trip, while preserving the dependency and its failure modes.

  • A useful setup log starts with the question it can answerNix and Unix · 08 Oct 2026

    A compact diagnostic record should let someone reproduce a specific observation: state the question, environment, command, exit status, and relevant output. Keep that setup transcript distinct from an inventory of files or storage.

  • A command line is an argument vector before it is a shell stringNix and Unix · 01 Oct 2026

    Passing subprocess arguments as a sequence preserves argument boundaries and avoids shell parsing by default. It prevents shell metacharacters from becoming syntax, while leaving program-specific option handling as a separate concern.

  • Endianness belongs in the format, not in a lucky host assumptionProtocols · 17 Sep 2026

    Binary formats must specify byte order and layout instead of inheriting a machine’s memory conventions. A two-byte example shows why explicit endianness is more portable than native alignment assumptions.

  • A virtual environment has an interpreter boundaryPython and Haskell · 03 Sep 2026

    A Python virtual environment is selected by the interpreter that runs your program. Learn how pyvenv.cfg, interpreter prefixes, shell activation, and python -m pip reveal which environment owns installed packages.

  • Make an invalid state unrepresentable at the interfacePython and Haskell · 20 Aug 2026

    A result type makes success and failure explicit in a function’s interface. In Haskell, Either lets callers distinguish failures by constructor while still requiring validation at untrusted input boundaries.

  • Rolling back NixOS does not roll back a databaseNix and Unix · 06 Aug 2026

    NixOS generations let you select an earlier system configuration, while database files and other mutable data follow their own lifecycle and compatibility rules.

  • The grain is a useful boundary for application stateSelf-hosting · 23 Jul 2026

    A Sandstorm grain is an application instance with persistent state. Treating it as a boundary clarifies sharing, ownership, backup contents, and what a restore must recover.

  • Pass a capability instead of looking up ambient authoritySelf-hosting · 09 Jul 2026

    A capability combines an object reference with permission to use it. Passing a narrow read-only handle can make authority explicit and limited to the resource and operations the recipient needs.

  • Validate CSV headers before building dictionariesPython · 04 Jul 2026

    Check CSV header uniqueness, required names and row widths before mapping fields, preserving IDs such as 007 as strings.

  • Testing a schedule cache across feed revisionsProtocols · 30 Jun 2026

    Include feed and revision in cache identity to isolate updated schedule data; demonstrate failed loads and pruning in memory.