Hacker News new | ask | show | jobs
by ricardobeat 12 days ago
Ok, I had some time to kill :)

I made two new worktrees, hard reset to the commit preceding a simple fix. The issue: "temporary buffers (out_buf, cps, out_cps, src_cps) are manually freed across multiple return branches. Pairing each acquisition with defer mem::free(...) — or using @pool() + mem::temp_array for the short-lived out_buf / out_cps scratch arrays — removes the branch-by-branch cleanup".

---

## Round 1

Neon implements. ~6 minutes.

Opus reviews. 30s. Prompt is "review the unstaged changes", empty context.

- The heap_buf + defer if (heap_buf != null) combination is clunky, much like the committed flag was. C3 has a built-in way to do this [shows example]

- if no character actually changes, return the string itself to skip the buffer

- Allocator mismatch: unicode_normalize_simple in src/unicode_wrapper.c allocates with libc realloc, but result_cps is released with mem::free

All three accepted and fixed. This is an accurate re-enactment of what happened an hour ago with the same fix.

---

## Round 2

Opus implements. 2m44s.

Neon reviews. 4m30s.

"Looks good — no bugs or leaks introduced."

2 comments

I'm not really surprised that Neon struggles with C3, as it's a medium model, but with improvements done to actually feel better than Carbon while using it.

Are you running it through Antigravity?

I'm doing some disassembly and modding for older RTS games now and it's been really good at just chewing through the Ghidra output, as I'm paying for Google sub either way due to YT and Drive it's a good deal. Didn't use it on some of the more obscure ESP32 & atmega legacy bs I'm doing for my father in law, though.

On the other hand, I worked with Opus 5.5 high on a project in Zig. I then asked Sol 6.1 xhigh to review. It found several bugs including 2 critical ones, which Opus acknowledged.