The library has one PRNG, and it is the following:
tb_spinlock_enter(&g_lock);
g_value = (g_value * 10807 + 1) & 0xffffffff;
tb_spinlock_leave(&g_lock);
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
The xmake package repository files might be useful also for people interested in making their own package manager, or even installing by hand.
Here is the package information for autoconf, for instance:
https://github.com/xmake-io/xmake-repo/blob/master/packages/...
It has download links, checksums for specific versions, and the Lua syntax seems easy to parse.
The package for NanoVG however, does not indicate anywhere that you need the GLEW and GLFW libraries:
https://github.com/xmake-io/xmake-repo/blob/master/packages/...
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.