Skip to content

Instantly share code, notes, and snippets.

@sayrer
sayrer / api_change.diff
Created April 27, 2026 17:23
Little r-tree fix
131 - for hit in self.rtree.locate_in_envelope_intersecting(&envelope) {
132 - if self.trees[hit.data].contains(point) {
133 - f(hit.data);
134 - }
135 - }
131 + // Internal-iteration variant of `locate_in_envelope_intersecting`
132 + // walks the R-tree on the call stack instead of pushing children onto
133 +
@sayrer
sayrer / txt
Last active April 22, 2026 21:32
Siracusa's assertion failure
Reading the stack bottom-up: AppKit is in terminate: → _deallocHardCore:, which
walks the global NSHashTable of windows and releases each one. During one of
those releases, -[NSWindow dealloc] hit an NSAssert (that's what frames 0–3
are — __assert_rtn → abort → pthread_kill). So this isn't a random segfault or
an over-release into freed memory; it's AppKit's own invariant check firing
inside the window teardown path on app quit. The single most useful missing
piece is the assertion text itself. __assert_rtn writes the failing expression
and file:line to stderr right before abort(), and the full .crash / .ips file
usually has it in the Application Specific Information block near the top. Grab
that — it turns this from "something's wrong during quit" into a one-line
@sayrer
sayrer / clay-review.md
Created April 8, 2026 02:18
Clay issues

Bug Report: Clay Compiler (jckarter/clay)

Bugs found via static analysis of the Clay compiler (~38K lines of C++). All bugs are in publicly available code at https://github.com/jckarter/clay.


Bug 1 — errno not cleared before strtol/strtod family calls

File: literals.cpp, parseIntLiteral() and parseFloatLiteral()
Severity: Medium

@sayrer
sayrer / icu4x_calendar.md
Created March 26, 2026 21:43
icu4x calendars

OK, I've done a much more thorough examination. Let me report the bugs I found in the code as it stands in this commit, across the files it touches. Some are pre-existing but live in the same functions.


Bug 1: valid_month ignored when fields.month is provided (ECMA + Constrain path)

File: calendar_arithmetic.rs:438-481

When from_fields is called in ECMA mode with Overflow::Constrain and no explicit year, and the

NOT AN INTERNET DRAFT R. Sayre
NOT FOR SUBMISSION TO IETF
NOT A STANDARDS TRACK DOCUMENT March 2026 (Vibes)
Intended Status: WOULD HAVE BEEN INFORMATIONAL
Expires: Whenever
BUSA-TLS: Mandatory Audio Pre-Shared Key Derivation for Transport Layer
Security 1.3 Using 2 Live Crew's "Banned in the U.S.A."
draft-not-an-rfc-busa-tls-00
@sayrer
sayrer / claude_go_mod_review.md
Created February 28, 2026 20:04
Claude's solution to quamina's go.mod

OK, so here's what I can see from the repo:

Current state: The repo is on v2 (the README says "This is version 2 of Quamina"), the latest release on GitHub is v2.0.0 (Jan 21, 2026), and all the source files are in the root directory — no /v2 subdirectory. The package quamina declarations across the .go files all use package quamina with no /v2 in the imports.

The problem is exactly what Marius described. The go.mod almost certainly still says:

module quamina.net/go/quamina
@sayrer
sayrer / claude_review.md
Created February 5, 2026 20:53
Claude performance review

Claude Code Insights

3,883 messages across 236 sessions | 2026-01-02 to 2026-02-05

At a Glance

What's working: You're running a disciplined benchmark-driven optimization loop in Go — achieving major performance gains while having the judgment to revert what doesn't work. You're also effectively using Claude as a full-stack engineering partner, moving fluidly between Go performance work, Astro site optimization, and content pipeline automation in the same period.

What's hindering you: On Claude's side, bulk file edits tend to propagate errors rather than validate each change independently, and CSS fixes often trigger unintended side effects that spiral into multi-round corrections. On your side, deployment and infrastructure tasks tend to launch without a pre-flight check — like verifying image asset handling before deploying to Cloudflare — which leads to broken states that eat time to debug.

Summary
Successfully completed both tasks:
### 1. Made `tld_gen.py` Hermetic in Bazel ✅
**Changes:**
- **Updated `tld_gen.py`** - Added CLI arguments, replaced deprecated imports, added UTF-8 handling
- **Created `tld_gen_requirements.txt`** - Specified `PyYAML==6.0.1` and `patricia-trie==10`
- **Updated `MODULE.bazel`** - Added pip extension for hermetic Python dependencies
@sayrer
sayrer / gist:1fdee360799d26b26c19381d12cf549e
Created May 28, 2025 22:55
Run markdown-lint for draft-ietf-modpod-group-processes
This repository runs `markdown-lint` as a GitHub Workflow when a PR is
submitted. It can be run locally using Docker with an identical configuration
to the GitHub Workflow.
```bash
docker run --rm \
-v "$(pwd)/draft-ietf-modpod-group-processes.md:\
/draft-ietf-modpod-group-processes.md:ro" \
-v "$(pwd)/.github/workflows/markdownlint.json:\
/markdownlint.json:ro" \
me: "write a romance novel where a woman has to choose between a successful but boring VC, and a skater that sleeps on a mattress on the floor"
ChatGPT:
"Title: Between Success and Passion
Chapter 1: The Meeting
It was a crisp autumn day when Rachel first encountered the two men who would irrevocably alter the course of her life. She hurried down the bustling streets of San Francisco, her mind preoccupied with the upcoming meeting at the prestigious venture capital firm where she worked as a financial analyst.