Posts
Preserve the boundary item when splitting an iterator prefix
Avoid losing the first data row after takewhile; return the rejected boundary item together with the remaining iterator.
November 19, 2026
Keep backslashes literal in regular-expression replacements
Return replacement text from a re.sub callback when backslashes and group syntax are data, so replacement-template parsing cannot change them.
November 19, 2026
JavaScript: Round-trip a quantity Map through JSON entries
Export Map entries explicitly and validate keys, quantities and duplicates on import.
November 19, 2026
JavaScript: Keep the array index out of parseInt
Wrap parseInt with an explicit radix when mapping decimal prefixes.
November 19, 2026
JavaScript: Check for a missing row before splice
Prevent a failed findIndex search from deleting the final array element.
November 19, 2026
Go: Read a file section with an independent cursor
Bound reads to a byte range with io.SectionReader and check for truncated source data.
November 19, 2026
Go: Preserve arrival order when sorting equal priorities
Use slices.SortStableFunc to keep equal-priority jobs in their original order.
November 19, 2026
Go: Decode independent JSON records into fresh structs
Avoid carrying omitted or null scalar fields from a previous JSON record.
November 19, 2026
Avoid eager fallback work in dict.setdefault
Use an explicit missing-key branch when loading a dictionary default is expensive or has side effects; setdefault evaluates its arguments first.
November 19, 2026
Require complete dictionary rows before exporting CSV
Validate missing and extra dictionary keys before CSV export; DictWriter rejects extra fields by default but fills missing ones.
November 18, 2026