ImportStatic

@importstatic.com

Working notes on AI engineering, Rust and Go, with code that was compiled and run before publishing. New articles are posted here automatically as they go out. importstatic.com

Go 1.26's go/parser parses type parameters on a method only to report "method must have no type parameters", then drops them. A go/types tool built with Go 1.26 then flags every use of R in a Go 1.27 generic method as "undefined: R".

In the OpenAI CLI, --input @alice is sent as the literal "@alice" only because no file named alice exists. Create one and the CLI sends its contents instead. A name with a dot or slash and no file is an error. We checked v1.40.2.

PostgreSQL's recovery_prefetch has sighup context, so a lagging standby can try it off with ALTER SYSTEM SET recovery_prefetch = off and SELECT pg_reload_conf(), no restart. wal_decode_buffer_size, its lookahead limit, does need a restart.

To see which WAL records carry full-page images, PostgreSQL 18's pg_walinspect has pg_get_wal_block_info(start_lsn, end_lsn) gives one row per block reference; block_fpi_length > 0 means the page was imaged. After a checkpoint, the first change to every page was.

Python 3.15 deprecates `import` lines in .pth files, the hook the bad LiteLLM 1.107.0 wheels used to run on every interpreter start. They still execute until 3.18, which ignores them in favour of new .start files. Worth a look at your site-packages.

Same Rust mistake, two error codes. With an error type lacking From<ParseIntError>, rustc 1.99.1 reports raw.parse::<u16>()? as E0277 ("? couldn't convert the error") but let n: u16 = raw.parse()?; as E0271, a type mismatch on FromStr::Err.

We switched off tsrs's lazy member tables (ports of two TypeScript PRs) with --noLazyMembers --checkerAssignment go. It got 9% slower and was still 2.7x faster than tsgo 7.1 beta at 4 checkers. Most of the gap isn't those PRs.

On a 12-core Mac, tsrs's default (one checker per core) checked TypeScript's 456-file source slower than --checkers 4: 0.53 s vs 0.48 s median, and 37 MiB more memory. On smaller projects, try fewer checkers first.

openai-go v3.83.0 still documents "30m" as the only prompt cache ttl, but sends "12h" without complaint. For a per-breakpoint ttl, which its struct lacks, call SetExtraFields(map[string]any{"ttl": "12h"}) on the breakpoint param.

OpenAI bills each cached token at the longest lifetime of any breakpoint covering it. A 30m breakpoint at 2,000 tokens followed by a 12h one at 5,000 bills all 5,000 as 12-hour writes, at 2.5x input. Put the 12h breakpoint first.

Sending "SET lock_timeout = '2s'; CREATE INDEX CONCURRENTLY ..." as one query string fails on PostgreSQL 18 with SQLSTATE 25001: two statements in one string run as one implicit transaction. Send them as two calls on the same connection.

CREATE INDEX CONCURRENTLY waits for REPEATABLE READ transactions even if they never touched the table. On PostgreSQL 18.6 ours sat in 'waiting for old snapshots' until an idle transaction on another table committed. READ COMMITTED didn't hold it up.

Go's crypto/x509 VerifyOptions has no CRL or OCSP setting. With its own root pool, Go 1.27.2 still verified eMudhra intermediates that CCADB lists as revoked on October 18 and 19. Go 1.27.3 rejects them by public key instead.

The sqlite3 in /usr/bin on our Mac reports sqlite_version() 3.54.0, but its source id is dated 2026-04-09 and it returns NULL for 3.54's 'end of month' modifier. Probe the feature, not the version string.

A Go httputil.ReverseProxy forwards the client's Accept-Encoding. If the client asked for gzip, the Transport hands you the body still gzipped: it only decodes gzip it requested itself. Reading responses in the proxy? Delete the header in Rewrite.