From 126548cb2972191370028599e3bc993054f669a1 Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Wed, 29 Jul 2026 09:58:44 -0400 Subject: [PATCH] build(nix): Updated all flake inputs. --- AGENTS.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index c2a3e14..f7cc49d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -449,6 +449,14 @@ See `HUGO.md` for analysis of why thor doesn't need Hugo's shortcode context iso See `mustache/SPEC.md` for the original implementation specification. See `mustache/EXTENSIONS.md` for non-standard extensions (pipes). +## Odin language facts + +These are things that are easy to get wrong: + +- **Proc arguments are immutable.** You cannot assign to a parameter directly. To get a mutable copy, shadow it: `x := x`. If you need to modify the source, pass a pointer `^x`. +- **`for` each loops use `item, idx` order**, not `idx, item`. Correct: `for item, idx in arr`. Wrong: `for idx, item in arr`. +- **`make([dynamic]T, n, allocator)` sets capacity, not length.** To get length=0 with capacity=n, use `make([dynamic]T, 0, n, allocator)`. Using `make([dynamic]T, n, allocator)` creates `len=n` with `n` zero-initialized elements. + ## TODO See `TODOS.md` for the full list.