[Dev] uuid could/should be simplified
RogerEaton at brandx.net
Tue May 18 09:08:10 PDT 2004
Thanks for answering in such detail, Andi. It sounds like in the end
you might go with
all random uuid's, except that it is not as easy to do as it seems.
I don't see the need for "cryptographically secure" so long as the
process covers the
space evenly without generating duplicates more often than expected by
I am planning to just use the built in Python random function, seeded
like time plus hash of the contents of the first item to be added to the
on this run plus hash of contents of previous item added. The write up
of the random
function in the Python library reference says that it is very good at
evenly covering the
space and is fast. Won't this work?
> So, what's the bug here, am I missing something here that needs to be
> addressed before Year 5238 ?
No bug -- my mistake. Now I see -- you dont overlay the high order bits
date because the date doesn't get that big until 5000 and something. I
was thrown off
by the code that zeros the high 4 bits -- uuid = 0x10 | (uuid &
those hi bits are always zero to begin with.
-- Roger Eaton
rogereaton at brandx.net
More information about the Dev