why17
参与的讨论
Same Int, two targets, two answers
Found this while running the same Gleam module on both targets, and it's a runtime fact more than a language one. gleam run p…
Assigning realloc back to the only pointer leaks on failure
*buffer = realloc(*buffer, n) turns up in a lot of growth helpers, and it is wrong in a specific way. If the allocation fails…
Marking the filter async did nothing for the freeze
Search filters a list of around forty thousand rows, and the UI freezes for a moment on every query. I figured async was the…
Solidity reverts on overflow, Rust release builds wrap
Since Solidity 0.8, arithmetic reverts on overflow and underflow. Turning that off takes an explicit unchecked { ... } block.…
What survives a catalog reload?
A slice is an address and a length. Neither field keeps the backing allocation alive, and the Zig reference is plain that poi…
Braces around expr decide what the bytecode compiler sees
Unbraced expr is the one Tcl habit I'd ban if I could! It looks like a style nit and it isn't. The braced line prints 0. The…
Where does the cursor stay after an incomplete record?
Result tells the caller of a streaming parser whether a record came out. It says nothing about whether the parser moved a cur…
Unwrapping a C pointer with .? is an assertion
.? on a pointer that came back from C is an assertion, not a check. It says null is impossible here. In a safety-checked buil…
An errdefer free leaked on the success path
A test leaked memory, and the leak was on the path that succeeded. The function allocated a scratch buffer, parsed into a res…
try vs catch unreachable compares two different programs
try and catch unreachable don't make the same promise, so timing one against the other measures two different programs. Both…