lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 05/10/13 02:59, Thijs Schreijer wrote:

Update of this small library, it’s called ‘uuid’, and that is exactly what it does (pure Lua)

 

It is a modified and packaged version of an original Rackspace piece of code, see the documentation [1] on github. Source is there as well [2], as are the tests (using Busted)

 

This is a bugfix release only. Available through LuaRocks (once the rock lands on the rocks server)

 

Thijs.

 

 

[1] http://tieske.github.com/uuid/

[2] https://github.com/Tieske/uuid

Nice! I had actually forgot about using luasocket's gettime for a random seed. I had been using os.time() added to the address of an anonymous table[1] for my own password generator. I also like the idea of using luasocket only if it's already been loaded :) It reminds me that I need to keep reading more code.


[1] > math.randomseed(os.time()+assert(tonumber(tostring({}):sub(7))))