It is straightforward, but so is the NixOS module system, and I could describe writing a custom module the same way you described custom Docker images.
122 karma · joined August 16, 2019
It is straightforward, but so is the NixOS module system, and I could describe writing a custom module the same way you described custom Docker images.
It's been working flawlessly since I deployed it (about 2 years ago now).
But to answer your question about copies : Rust is a move-only language, copies are actually called `.clone()`, except for a few types which are cheap enough to copy that they implement the `Copy` trait.
So in the code you quoted, the match is done on the value of `result` (notice that there is not borrowing/`&` operator). The match arm `Err(err)` moves `err` out of `result` and returns it. Obviously, the compiler will optimize away all those moves, it's as if they did not exist.
Then use the trisection folds to divide that opposite side in three equally sized parts, and fold it up.
Thank you for posting it again. I don't think I'll go back to Arch unless I grow tired of NixOS, but if I do I'll be sure to give it a spin!
I am not very familiar with other languages that implement (un)hygienic macros, is that a common problem in things like Scheme, Lisp, or even Rust, or do they all circumvent that issue with actually private/un-nameable symbols?