A Wild pyQuine Appears

November 24, 2011

If you ever want to flex your programming muscle, pick a language and write a quine in it. A quine is a computer program that performs a single function: It simply prints its own source code and then terminates. There are many ways to write a quine, techniques differ by language, and some ways are definitely more hackish/cheatish than others.

I sat down and wrote a quine in Python today, and it took me about 20 minutes. It really felt like an amazing experience; imagine having a program that lets you do this:

$ python quine.py > out1 && python out1 > out2 && python out2 > out3 && python out3 > out4 && ....

It simultaneously rewards and boggles the mind!

If you want to checkout my quine, look in the Fun Stuff page of this site.



Leave a Reply

You must be logged in to post a comment.