logoalt Hacker News

rollulustoday at 7:40 AM1 replyview on HN

Well that depends on your luck, it could be a valid one about 1/16th of the time.


Replies

jasomilltoday at 10:47 AM

1/64, actually, because RFC-compliant (variant 1) UUIDv4 requires fixed values for both the version nibble and two bits of the variant nibble.

The fact that we're discussing this at all is a reasonable argument for using a library function.