RSSAmplifier

Blog

Redowan's Reflections

Recent content on Redowan's Reflections

rednafi.comRSS feed ↗15 posts

Latest posts

Accepted proposal: range over all command-line flags

The flag package is getting a range-friendly iterator and a direct way to tell whether a flag was set successfully.

Accepted proposal: Go examples with any signature

Go examples with parameters or results can appear in documentation without becoming tests.

Supervised fire-and-forget in Go

A bounded worker pool for small background tasks, with task-owned contexts, panic recovery, and graceful shutdown.

GC shape stenciling in Go generics

How Go's compiler shares generic function bodies by GC shape and uses dictionaries for the concrete types.

Modernizers & go fix

Go 1.26 rebuilt go fix on the analysis framework. It modernizes your code and respects the Go version your module declares. The post covers the modernizers, the bigger x/tools suite, and what //go:fix inline can and can't migrate.

Request coalescing with Go singleflight

A hot cache key expires and a hundred requests issue the same query at once, saturating the database. Go's singleflight package coalesces those duplicate calls into one. How to wire it up, how to measure whether it's firing, and why per-pod coalescing is usually enough.

Channel iteration and goroutine leak

A for-range over a channel that's never closed leaks the receiver. Why a fixed number of receives is safe, why a range isn't, and how to catch it with Go 1.27's leak profile.

Accepted proposal: a goroutine leak profile in the Go standard library

Notes on Go's accepted goroutine leak profile and how it reuses the GC to find them.

Reading your own writes with WAIT FOR LSN in Postgres 19

PostgreSQL 19's new WAIT FOR LSN command lets a replica block until it has replayed your write. The read-after-write problem it solves, the workarounds it replaces, and what the timeout, status, and mode options are actually for.

Migrating from GNU stow to chezmoi

Why I swapped GNU stow's symlink farm for chezmoi: one command to bootstrap a Mac with Homebrew packages and macOS settings, a small daily sync loop, and agent skills shared between Claude Code and Codex.

Putting this blog on ATProto with standard.site

Mirroring a static Hugo blog onto ATProto with standard.site and Sequoia, plus the GitHub Actions wiring that republishes the records on every push without any manual steps.

If you won't carry the pager, maybe don't push to mainline

Drive-by AI changes break the shared model a team builds around its code, and the ICs end up cleaning up the mess. Why pushing to mainline should come with the pager.

Testing Go CLIs with testscript

How cmd/go's script tests led me to testscript, and how to use it for CLI tests that exercise argv, stdout, stderr, exit codes, and scratch files.

A tour of txtar

txtar is a tiny plain-text archive format Russ Cox introduced in 2018 for multi-file test fixtures. The Go Playground, cmd/go's script tests, gopls's marker tests, and rsc.io/rf all reach for it.

Type-safe slogging

The default slog API is loose enough that a careless line ships broken JSON to production. Pin it down with Attr constructors, LogAttrs, a context-borne logger, and sloglint.