Sanyam Brar
ZigC++GoJava
GitHub ↗SmallThingz ↗Site's source ↗Resume ↗

Games

WORDLE›
A Wordle clone.
Keybr›
A local-first fork of keybr.com.
›
Chain reaction clone with local AI.

Projects and demos↗

Reverbkotlin

Android recorder that keeps a rolling audio window in memory.

android / audio
CNNpython / zig

CNN in Zig. Draw something and run the model in-browser with WASM.

ml / mnist

Tools

01 / TEXTText InspectorWord count and non-ASCII character detection.02 / ENCODEEncode / DecodeBase64, URL, Base32, Base58, hex, binary and text encodings.03 / DIFFLive DiffFast live text diff with inline change highlighting.04 / NUMBERSNumber LabInspect and convert integers across bases 2–62.05 / MARKDOWNMarkdownLive local Markdown editor and preview.

Writing↗

01btop's broken lockTwo threads could hold the same lock.02[REDACTED][REDACTED]
C++ / CONCURRENCY / BTOP
25 AUG 2026

btop's broken lock

Two threads could hold the same lock.

READ ARTICLE

Following a btop crash led me to a lock that could let two threads in at once. From there I traced another race through Runner::active.

  • A failed compare-exchange changed expected, allowing the next attempt to pass while another thread held the lock.
  • Callers relied on Runner::active to hand off shared state. The waits needed acquire ordering.
  • PR #1649 landed the race fixes. The original CPU-hotplug crash remains open.