I don't know why this caught HN's attention today, but I first found out about the Halton sequence a number of years ago when I needed a random seeming, regularly distributed and stable set of 2D points to sample an image, and the Halton sequence fit the bill precisely.
The template generated with bundle gem —-ext=rust uses the Magnus[1] library that provides a high-level friendly Rust wrapper over the Ruby C API, but you can also use rb-sys[2] which is lower level bindings direct to the Ruby C API.
I think the goal of this right now is just to match the C version.
The C implementation of YJIT supported x86 Unix/Linux platforms, and it sounds like adding Windows and arm64 support, plus other improvements was a daunting task with the tools C provides.
Now it’s in Rust we’ll hopefully see further improvements quicker.
After implementing and benchmarking it I found my code was spending more time calculating the sample points than I'd like. When trying to speed that up I found this paper: https://www.sciencedirect.com/science/article/pii/0898122193...
Later when learning Rust I ported that faster approach to Rust: https://crates.io/crates/halton
And when I wrote a Rust library to bind Rust to Ruby, I created a Rubygem of the same as a testbed: https://rubygems.org/gems/halton
A few years ago I also put together a fun D&D game using the Halton sequence to place items/encounters on a map.