Whenever I see such libraries, the first thing I check out is their PRNG implementation, and this one must be the worst I've seen so far. (The rest of the library is probably quite good, I'm just talking about the PRNG part)
The library has one PRNG, and it is the following:
Looks like a really interesting set of libraries (https://github.com/tboox), available under Apache 2 license; also xmake looks interesting; definitely worth a closer look; thanks for sharing.
I’m trying to compile from source, and since that needs xmake I’m now trying to build it.
Following the instructions, after `make build` I get “No rule to make target 'lua/lapi.c', needed by 'lua/lapi.o'. Stop.”.
I’m now reading more, and it will probably be some easy thing.
My advice would be to have some compact list of steps to get it up and running from source without having to install binaries. I think that would make it easier to try out.
I’ll now continue trying to figure out what’s missing.
The library has one PRNG, and it is the following:
Using this is literally worse than using the rand reference implementation.Also, tb_random_range uses a biased and slow implementation with modulo. (see https://www.pcg-random.org/posts/bounded-rands.html for the proper way to do this)
I might look into adding a proper PRNG implementation, but I'll recommend a few resources:
A lesson of what not to do: https://youtu.be/LDPMpc-ENqY ("rand() Considered Harmful") Some good modern PRNGs: https://www.pcg-random.org/, https://prng.di.unimi.it/, https://romu-random.org/ Generating random numbers in a specific range: https://www.pcg-random.org/posts/bounded-rands.html