2 ms·
My favorite quine is in Factor: [ [ dup curry ] dup curry ] (Credit to Slava Pestov) When called, it puts [ dup curry ] on the stack, then creates a copy o
by paulgb 17y ago
My favorite quine is in Factor:
[ [ dup curry ] dup curry ]
(Credit to Slava Pestov)
When called, it puts [ dup curry ] on the stack, then creates a copy of it on the stack. curry then takes the second block from the stack and prepends it to the first. Rather than being a program that evaluates to its code, it's a code block that evaluates to itself (similar to most Scheme/Lisp quines).
(Off topic note: I originally read the title of the article as "Zip Flies All The Way Down" and was wondering what zipping my fly down had to do with hacker news.)