

My Adventure Writing My First Quine in Java - circuitbreaker
http://blogs.adobe.com/charles/2011/01/my-adventure-writing-my-first-quine-in-java.html

======
mncaudill
Here's a PHP->C->Python->JavaScript->original PHP quine I wrote a few weeks
ago: <https://gist.github.com/749686>

And here's a little write-up on how I approached the problem:
<https://nolancaudill.com/2011/01/01/how-to-build-a-quine/>

------
daniel-cussen
In Lisp they're pretty easy:

((lambda (x) (list x (list 'quote x))) '(lambda (x) (list x (list 'quote x))))

returns itself (note: written in Clisp; I've had issues with Lispworks doing
things properly). You can also stuff messages in there pretty easily:

((lambda (x y) (list x (list 'quote x) y)) '(lambda (x y) (list x (list 'quote
x) y)) "Hello, world")

------
istjohn
Python (triple quotes make this too easy):

    
    
      def q(s):
          print(s+'q(""' '"'+s+'"' '"")')
      q("""def q(s):
          print(s+'q(""' '"'+s+'"' '"")')
      """)

------
s3graham
A friend wrote a neat C one a while back:
<http://dwcope.freeshell.org/projects/spinningquine/>

------
snprbob86
I consider this totally cheating:

    
    
      $ python quine.py
      import sys
      print open(sys.argv[0]).read(),

~~~
GrooveStomp
This misses the point of a Quine. You haven't written the code to generate the
string, you've used an external library that someone else wrote to do that job
for you.

I made this mistake the first time I tried too.

~~~
snprbob86
Oh I know, hence I called it "cheating"

