#breaking news (not really.). Hey, I only *just realised* this is a #commonLisp #quine #repl

`(,@-)

CL-USER> `(,@-)
(SI:QUASIQUOTE ((SI:UNQUOTE-SPLICE -)))
CL-USER> `(,@-)
(SI:QUASIQUOTE ((SI:UNQUOTE-SPLICE -)))
CL-USER> (SI:QUASIQUOTE ((SI:UNQUOTE-SPLICE -)))

or similarly,

CL-USER> ((lambda () -))
((LAMBDA () -))

#programming #fun

https://www.lispworks.com/documentation/HyperSpec/Body/v__.htm

CLHS: Variable -

Nice.

Just a stake, I think
((lambda (x) (x x)) (lambda (x) (x x)))
could be done with backquotes in Common Lisp or maybe Elisp.
Or something like that.
Don't trust me.

@screwlisp

@vnikolov I'm sure someone explained it to me before, but while it's trivial to write a macro that creates a quine:

CL-USER> (macrolet ((double (&body body) `'(,@body ,@body))) (double double))
(DOUBLE DOUBLE)

The problem is, I can't get that macrolet inside of the macrolet output without going via a string or something because of how commas (unquotes) work.

@vnikolov and if I'm just going via a string anyway,

CL-USER> (FORMAT T "(~{~s~^ ~} '~0@*~s)" '(FORMAT T "(~{~s~^ ~} '~0@*~s)"))
(FORMAT T "(~{~s~^ ~} '~0@*~s)" '(FORMAT T "(~{~s~^ ~} '~0@*~s)"))
NIL
CL-USER> (FORMAT T "(~{~s~^ ~} '~0@*~s)" '(FORMAT T "(~{~s~^ ~} '~0@*~s)"))
(FORMAT T "(~{~s~^ ~} '~0@*~s)" '(FORMAT T "(~{~s~^ ~} '~0@*~s)"))
NIL

@screwlisp

A quine with `common-lisp:format', nice!