The docs state that: “The Lua runtime is a Lua 5.1-compatible implementation with a small set of additional packages backported from newer versions.”
Lua before 5.3 called directly the C rand function, but the newer versions use xoshiro256.
I have done some reading and testing and it seems the random function in the 5.1 lua interpreter (the one that you can download from lua.org) often returns similar values (I am setting the seed with math.randomseed(os.time()) and running my tests at different seconds).
So my question is, does the nakama provided runtime backport xoshiro256?
I need a decently good PRNG algorithm for my project (not cryptography), so if it is not included could you help me by suggesting an alternative?
thanks
Sorry if my english isn’t that good.
I read the nakama source code and found out that it uses gopher lua to run the code. If anyone is interested gopher lua calls the rand.Float64() and rand.Intn() functions of go directly. As for me, I am satisfied with the rand library of Go so I will use it for my project.