Skip to content

Instantly share code, notes, and snippets.

@andraantariksa
Created September 9, 2020 19:40
Show Gist options
  • Save andraantariksa/7181d159ccf3d01cdab452b04ce492d5 to your computer and use it in GitHub Desktop.
Save andraantariksa/7181d159ccf3d01cdab452b04ce492d5 to your computer and use it in GitHub Desktop.
Rust Quine in one line
fn main() { println!("fn main() {{ println!({0:?}, {0:?}); }}", "fn main() {{ printl!({0:?}, {0:?}); }}"); }

A quine is a computer program which takes no input and produces a copy of its own source code as its only output. The standard terms for these programs in the computability theory and computer science literature are "self-replicating programs", "self-reproducing programs", and "self-copying programs".

https://en.wikipedia.org/wiki/Quine_(computing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment