Last active
April 17, 2016 22:23
-
-
Save malisper/77db18aa8b1cb96fa7a984144eaf51aa to your computer and use it in GitHub Desktop.
Quine Relay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(self-referential-version-of | |
'(lambda (self) | |
(format t | |
"#include <stdio.h>~%int main(){printf(\"%s\",~(~s~));}" | |
(remove #\newline (prin1-to-string self))))) | |
=> | |
((lambda (self) | |
(format t "#include <stdio.h>~%int main(){printf(\"%s\",~(~s~));}" | |
(remove #\newline (prin1-to-string self)))) | |
((lambda (a) | |
(let ((b `',a)) | |
(let ((ab `(,a ,b))) | |
`(,'(lambda (self) | |
(format t | |
"#include <stdio.h>~%int main(){printf(\"%s\",~(~s~));}" | |
(remove #\newline (prin1-to-string self)))) | |
,ab)))) | |
'(lambda (a) | |
(let ((b `',a)) | |
(let ((ab `(,a ,b))) | |
`(,'(lambda (self) | |
(format t | |
"#include <stdio.h>~%int main(){printf(\"%s\",~(~s~));}" | |
(remove #\newline (prin1-to-string self)))) | |
,ab)))))) | |
=> | |
#include <stdio.h> | |
int main(){printf("%s","((lambda (self) (format t \"#include <stdio.h>~%int main(){printf(\\\"%s\\\",~(~s~));}\" (remove #\\newline (prin1-to-string self)))) ((lambda (a) (let ((b `',a)) (let ((ab `(,a ,b))) `(,'(lambda (self) (format t \"#include <stdio.h>~%int main(){printf(\\\"%s\\\",~(~s~));}\" (remove #\\newline (prin1-to-string self)))) ,ab)))) '(lambda (a) (let ((b `',a)) (let ((ab `(,a ,b))) `(,'(lambda (self) (format t \"#include <stdio.h>~%int main(){printf(\\\"%s\\\",~(~s~));}\" (remove #\\newline (prin1-to-string self)))) ,ab))))))");} | |
=> | |
((lambda (self) (format t "#include <stdio.h>~%int main(){printf(\"%s\",~(~s~));}" (remove #\newline (prin1-to-string self)))) ((lambda (a) (let ((b `',a)) (let ((ab `(,a ,b))) `(,'(lambda (self) (format t "#include <stdio.h>~%int main(){printf(\"%s\",~(~s~));}" (remove #\newline (prin1-to-string self)))) ,ab)))) '(lambda (a) (let ((b `',a)) (let ((ab `(,a ,b))) `(,'(lambda (self) (format t "#include <stdio.h>~%int main(){printf(\"%s\",~(~s~));}" (remove #\newline (prin1-to-string self)))) ,ab)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment