System log snapshot - "I am alone in my system"
System log snapshot - "I am alone in my system"
A few months ago, I had written a short piece of prose. I kept it private, only sharing it with a few close friends, but I wanted to post it online now, too.
Self-referential Data across Functions
Self-referential Data across Functions
Self-referential structs are infamously painful to implement, and, besides something like an arena allocator, are impossible without messy or unsafe code. Awkward data structure juggling to satisfy the borrow checker, redundant runtime checks to delay borrow checking, lots of unwraps and pinky promises, or outright unsafe code that can be a pain to validate - it's usually just much better to rethink your data structures.
Unique generic type instantiation
Unique generic type instantiation
Abusing unnameable function types