$ gem install liquid
$ ruby -rliquid -e 'puts Liquid::Template.parse($<.read).render' quine.liquid
{%assign a="{Passign a=QZQ|split:QQP}{Pfor c in aP}{Pif c == a[12]P}{{a}}{Pelsif c == a[1]P}P{Pelsif c == a[11]P}Q{PelseP}{{c}}{PendifP}{PendforP}"|split:""%}{%for c in a%}{%if c == a[12]%}{{a}}{%elsif c == a[1]%}%{%elsif c == a[11]%}"{%else%}{{c}}{%endif%}{%endfor%}
$ diff -s quine.liquid <(ruby -rliquid -e 'puts Liquid::Template.parse($<.read).render' quine.liquid)
Files quine.liquid and /dev/fd/63 are identical
Created
September 28, 2022 14:35
-
-
Save mame/6efae3d8d0d8ba27dbbd5da1db2980de to your computer and use it in GitHub Desktop.
A non-trivial quine written in Liquid markup language
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
{%assign a="{Passign a=QZQ|split:QQP}{Pfor c in aP}{Pif c == a[12]P}{{a}}{Pelsif c == a[1]P}P{Pelsif c == a[11]P}Q{PelseP}{{c}}{PendifP}{PendforP}"|split:""%}{%for c in a%}{%if c == a[12]%}{{a}}{%elsif c == a[1]%}%{%elsif c == a[11]%}"{%else%}{{c}}{%endif%}{%endfor%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment