How to write a self-printing program
igoro.com
igoro.com
10 LISTThe other - an empty program. Run it - nothing. List it - nothing.
[update] Hmm, although both Wikipedia and GEB use lower case. But in GEB it's lower case because it's a verb (quining). Not sure it's used as a noun - (there are index entries for "Quine" and "quining").
[And edited to add caps as i guess otherwise someone will complain]
Compare "Keynesian economics" with Dr. Guillotine's invention the "guillotine"
#!/usr/bin/python2
print open(__file__).read()
# do other stuff as well
That is, why not just print the source file, rather than store the code within itself? #Start of program
#End of programprint(system("cat perlQuine.pl"));
Is this cheating?