Josh Munn's Website

Quines

A Minikanren Quine

Here’s a miniKanren quine that runs on the miniKanren implementation from The Reasoned Schemer:

((lambda (_)
   (run* x
     (conde
       (( x _))
       (( x (list 'quote _))))))
 '(lambda (_)
    (run* x
      (conde
        (( x _))
        (( x (list 'quote _)))))))

A Python Quine

Here’s a Python 3 quine I wrote:

(q:='(q:={q!r},print(f{q!r}))',print(f'(q:={q!r},print(f{q!r}))'))