Skip to content

Instantly share code, notes, and snippets.

@DrummerHead
Created February 24, 2014 02:06
Show Gist options
  • Save DrummerHead/9180698 to your computer and use it in GitHub Desktop.
Save DrummerHead/9180698 to your computer and use it in GitHub Desktop.
My first Quine
c=["p", "r", "i", "n", "t", "\"", "c", "=", "\"", ";", "p", " ", "c", ";", "c", ".", "e", "a", "c", "h", "{", "|", "c", "|", "p", "r", "i", "n", "t", " ", "c", "}"]
print"c=";p c;c.each{|c|print c}
@DrummerHead
Copy link
Author

"More precisely stated, the problem is to write a source program that, when compiled and executed, will produce as output an exact copy of its source. If you have never done this, I urge you to try it on your own. The discovery of how to do it is a revelation that far surpasses any benefit obtained by being told how to do it." —Ken Thompson on Reflections on Trusting Trust

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