TIL about the box.leak() method in Rust: https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak
This leaks the box, but it also gives you a reference that can live longer! E.g. you can leak a Box<u64> and treat it as 'static.
It makes sense, but being able to use a value after leaking is new idea to me.
miniblog.
Related Posts
I'm exploring how I show lists in my documentation. I like boxes for tidiness, but it's much less space efficient. Which do you prefer?
I should also survey how other sites handle this.
One month after configuring my VPS to reboot weekly, and I'm *still* finding services that aren't properly configured to start on boot.
I'm developing a newfound appreciation for tools like Chaos Monkey.
I've been impressed with code written by Fable in my testing:
Difftastic: found small optimisations in a hot loop I'd already profiled extensively. Helped me prototype Dijkstra to A* too (hard to find a good heuristic).
Garden: Found some real bugs in my simplistic typechecker.