Efficiently generating random numbers in an interval 0-N https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/
The article demonstrates rejection sampling and bit masking. I've hit this problem a few times in property-based test frameworks, so it's nice to see solution techniques.
miniblog.
Related Posts
Are there any good tools for generating boilerplate code?
If I'm a web framework author, I'd love to provide a *discoverable* tool for defining a new controller. This is especially important if files need specific naming conventions or to be in certain directories.
Are there any good tools for generating boilerplate code?
If I'm a web framework author, I'd love to provide a *discoverable* tool for defining a new controller. This is especially important if files need specific naming conventions or to be in certain directories.
I've seen tools like yeoman and create-react-app, but they seem to focus on new projects. There's also no VS Code integration that I'm aware of.
tree-sitter-elisp now has basic support for syntax highlighting and generating tags! https://github.com/Wilfred/tree-sitter-elisp
It works surprisingly well and runs very quickly.

