Show HN: XID – Dependency-Free Unique ID Generator in One C File
6 FerkiHN 3 7/20/2025, 10:55:47 AM gist.github.com ↗
XID generates 20-character globally unique IDs (48-bit timestamp + 64-bit entropy + 8-bit counter + 5-bit checksum) in a single C file with zero dependencies. Features built-in timestamp extraction, collision resistance, and portable design for any platform - ideal for databases, IoT, and distributed systems.
char id = xid_generate(); // => "01H5Z7K4W9A3B6C8D0F2G"
Gists: https://gist.github.com/Ferki-git-creator/17450d52d143f746f0...
(Feedback wanted: entropy improvements, embedded use cases, optimizations)*
It’s not for every use case, but fills gaps where UUIDv4/Snowflake can’t go. Curious what specific problems you’re solving where it feels less useful?