I've been doing a fair bit of Rust lately.
Honestly, I haven't been so smitten with a language since I started writing Ruby
back in 1999.
Rust is many of the things Ruby isn't—precompiled, screaming fast,
meticulously efficient, static, explicit, type-safe. But it's also expressive
and, above all, fun.
I think this rare mix makes it a good companion language for Ruby developers,
particularly with things like Helix and rutie making it easy to
bridge the two.
The best way of learning is by doing, so why not avoid that and just read about
me doing something instead?
mkpass is a simple command-line random password generator written in Rust,
with built-in dictionaries to keep run-time dependencies to an absolute minimum.
rtss annotates its output with relative durations between consecutive lines
and since program start.
Inspired by Kevin Burke's Golang tss,
I thought it would be a fun exercise and a nice bit of Rust practice to
implement something similar.
I'm fairly pleased with the result - it's considerably faster, running at hundreds
of MB per second in my tests - and somewhat more featureful, including pty support,
allowing it to work similarly to expect's unbuffer command.
Similar to Bloom Filters, Golomb Compressed sets allow for space-efficient
probablistic storage of sets. In other words, you can ask a GCS if it's seen
an object, and retrieve either "absolutely not" or "probably not" in response.
gcstool was my first Rust project, developed primarily to play about with
the haveibeenpwned.compwned-passwords-2.0.txt database. It can store all
half a billion items with a false-positive rate of 1-in-50 million in just 1.6GB,
importing them in just a few minutes, though with fairly high memory requirements.