3 ms·
I've used something very similar in the past, called SimpleFlake[0], which is essentially a 64 bit version with the same principles. I've used it in Lisp, C, C+
by emidln 5y ago
I've used something very similar in the past, called SimpleFlake[0], which is essentially a 64 bit version with the same principles. I've used it in Lisp, C, C++, Clojure, Python, and Rust. It's conceptually simple, and fits in a 64bit int, which is natively available in a lot of databases.
[0] SimpleFlake - https://github.com/SawdustSoftware/simpleflake/blob/f2b51f762a4f073a68fdd39a34732ebf5ec99967/simpleflake/simpleflake.py#L42 https://github.com/SawdustSoftware/simpleflake/blob/f2b51f76...