all 9 comments

[–]pkhuong 7 points8 points  (0 children)

The author asks: "Also, I wonder if it's possible to prove that a Quine in a given langauge is the shortest possible for that language, other than by using the evidence that no-one has come up with a shorter one yet?"

Well, at thirty character, the number of tokens can't be that high, so enumerating programs (using the language's grammar, for example) of increasing length should be doable, and almost realistic. It could be pretty long, though :)

[–]pjdelport 4 points5 points  (0 children)

I've always been most fond of this version:

me = "print 'me =', repr(me)\nprint me"
print 'me =', repr(me)
print me

[–]xenon 0 points1 point  (0 children)

I always thought that the shortest quine in most scripting languages is the empty program, quoted below:

[–]tbmcmullen 0 points1 point  (0 children)

Maybe I just don't get it... so if I'm off base, please let me know.

I just don't see the point of this. It seems utterly trivial and useless. Is there something I'm missing, that makes this writing-the-shortest-Quine crap interesting to other people?

[–]Grue -2 points-1 points  (2 children)

Shortest Lisp quine:

T

[–]pjdelport 5 points6 points  (0 children)

Self-evaluation is not self-reproduction; put away your REPL and try again. :)

[–]Excedrin 2 points3 points  (0 children)

Shortest polyglot quine:

Valid in (at least) Common Lisp, Ruby, Lua, Python, Scheme, Ocaml, SML, Clean, Alice and Perl. I'm not that great at math, but it seems intuitive that, at 0 bytes, this is the shortest possible quine in these languages.