An ooc quine
👋 This page was last updated ~12 years ago. Just so you know.
While preparing my next post about ooc documentation yet again, I stumbled upon an old ooc quine of mine. Here it is in integrality for your pleasure:
q := 34 as Char
l := [
"q := 34 as Char"
"l := ["
"]"
"for (i in 0..2) {"
" l[i] println()"
"}"
"for (i in 0..12) {"
" q print(); l[i] print(); q println()"
"}"
"for (i in 2..12) {"
" l[i] println()"
"}"
]
for (i in 0..2) {
l[i] println()
}
for (i in 0..12) {
q print(); l[i] print(); q println()
}
for (i in 2..12) {
l[i] println()
}
It is very much inspired from the Wikipedia examples for a quine.
Can you find a shorter one?
Here's another article just for you:
Rust modules vs files
A while back, I asked on Twitter what people found confusing in Rust, and one of the top topics was “how the module system maps to files”.
I remember struggling with that a lot when I first started Rust, so I’ll try to explain it in a way that makes sense to me.
Important note
All that follows is written for Rust 2021 edition. I have no interest in learning (or teaching) the ins and outs of the previous version, especially because it was a lot more confusing to me.