[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] uuid: pure Lua uuid generator
- From: Alexander Gladysh <agladysh@...>
- Date: Sat, 11 May 2013 14:35:55 +0400
On Fri, May 10, 2013 at 7:02 PM, Harley Laue <losinggeneration@gmail.com> wrote:
> [1] > math.randomseed(os.time()+assert(tonumber(tostring({}):sub(7))))
NB: that sub(7) is not portable — tostring({}) output differs between
Lua implementations. Use gsub() to filter out numerics instead. (And
even then it is a brittle hack, relying on unspecified behaviour.)
Alexander.