summaryrefslogtreecommitdiff
path: root/doc/quine-dam.txt
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-03-16 08:18:53 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-03-16 08:18:53 +0000
commit77a47b2c5e7c3243743bd8d7594366f498e9cef7 (patch)
treefb807c0b0c20db34f5108df67da6b4d64e5bc8e6 /doc/quine-dam.txt
parent3fde941ae33bd70edf015b3c72997aef703ebf6d (diff)
downloadexecline-77a47b2c5e7c3243743bd8d7594366f498e9cef7.tar.xz
More modifications, and doc change
Diffstat (limited to 'doc/quine-dam.txt')
-rw-r--r--doc/quine-dam.txt102
1 files changed, 51 insertions, 51 deletions
diff --git a/doc/quine-dam.txt b/doc/quine-dam.txt
index c69a52c..219a594 100644
--- a/doc/quine-dam.txt
+++ b/doc/quine-dam.txt
@@ -3,7 +3,7 @@
# See comments below.
# (Search for "HERE".)
#
-define -sCd "\n" lns "
+= -sCd "\n" lns "
${p} ${bubble} is the end of the quine's data.
${p} They represent the following code, with various quotations:
${p} ${b} (backslash) is represented as ${d}${ob}b${cb}
@@ -19,38 +19,38 @@ ${p}
${p} Now we have the quine's code!
${p}
${p} First, print the lines that come before the data.
-foreground ${ob} printf %s ${b}${p}${b}!${q} ${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${q}/command/execlineb -P${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${p}${q} Public Domain.${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${p}${q} See comments below.${q} ${cb}
-foreground ${ob} printf %s ${b}${p}${q} (Search for ${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${q}${bubble}${b}${q}.) ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${p} ${cb}
-foreground ${ob} printf %s ${q}define -sCd ${b}${q}${b}${b}n${b}${q} lns ${b}${q}${q} ${cb}
+; ${ob} printf %s ${b}${p}${b}!${q} ${q} ${cb}
+; ${ob} printf %s${b}${b}n ${q}/command/execlineb -P${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${p}${q} Public Domain.${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${p}${q} See comments below.${q} ${cb}
+; ${ob} printf %s ${b}${p}${q} (Search for ${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${q}${bubble}${b}${q}.) ${cb}
+; ${ob} printf %s${b}${b}n ${b}${p} ${cb}
+; ${ob} printf %s ${q}define -sCd ${b}${q}${b}${b}n${b}${q} lns ${b}${q}${q} ${cb}
${p} Next, print the data themselves, as data.
for lin ${ob} ${d}${ob}lns${cb} ${cb} ${ob}
multisubstitute ${ob}
-define b ${d}${ob}b${cb}
-define q ${d}${ob}q${cb}
-define p ${d}${ob}p${cb}
-define ob ${d}${ob}ob${cb}
-define cb ${d}${ob}cb${cb}
-define d ${d}${ob}d${cb}
-define bubble ${d}${ob}bubble${cb}
-define intron ${d}${ob}intron${cb}
+= b ${d}${ob}b${cb}
+= q ${d}${ob}q${cb}
+= p ${d}${ob}p${cb}
+= ob ${d}${ob}ob${cb}
+= cb ${d}${ob}cb${cb}
+= d ${d}${ob}d${cb}
+= bubble ${d}${ob}bubble${cb}
+= intron ${d}${ob}intron${cb}
${cb} printf ${b}${b}n%s ${d}${ob}lin${cb} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${q} ${cb}
${p} Finally, use the data to print the code!
for lin ${ob} ${d}${ob}lns${cb} ${cb} ${ob}
multisubstitute ${ob}
-define b ${b}${b}
-define q ${b}${q}
-define p ${b}${p}
-define ob ${b}${ob}
-define cb ${b}${cb}
-define d ${d}
-define bubble ${bubble}
-define intron ${q}${intron}${q}
+= b ${b}${b}
+= q ${b}${q}
+= p ${b}${p}
+= ob ${b}${ob}
+= cb ${b}${cb}
+= d ${d}
+= bubble ${bubble}
+= intron ${q}${intron}${q}
${cb} printf %s${b}${b}n ${d}${ob}lin${cb} ${cb}
${p} That's all, folks! - Well, that wasn't so hard, was it?
${p} (This quine was written by <david.madore@ens.fr> - see
@@ -71,38 +71,38 @@ ${p} for more information on quines and how to write them.)"
# Now we have the quine's code!
#
# First, print the lines that come before the data.
-foreground { printf %s \#\!" " }
-foreground { printf %s\\n "/command/execlineb -P" }
-foreground { printf %s\\n \#" Public Domain." }
-foreground { printf %s\\n \#" See comments below." }
-foreground { printf %s \#" (Search for " }
-foreground { printf %s\\n \"HERE\".) }
-foreground { printf %s\\n \# }
-foreground { printf %s "define -sCd \"\\n\" lns \"" }
+; { printf %s \#\!" " }
+; { printf %s\\n "/command/execlineb -P" }
+; { printf %s\\n \#" Public Domain." }
+; { printf %s\\n \#" See comments below." }
+; { printf %s \#" (Search for " }
+; { printf %s\\n \"HERE\".) }
+; { printf %s\\n \# }
+; { printf %s "= -sCd \"\\n\" lns \"" }
# Next, print the data themselves, as data.
for lin { ${lns} } {
multisubstitute {
-define b ${b}
-define q ${q}
-define p ${p}
-define ob ${ob}
-define cb ${cb}
-define d ${d}
-define bubble ${bubble}
-define intron ${intron}
+= b ${b}
+= q ${q}
+= p ${p}
+= ob ${ob}
+= cb ${cb}
+= d ${d}
+= bubble ${bubble}
+= intron ${intron}
} printf \\n%s ${lin} }
-foreground { printf %s\\n \" }
+; { printf %s\\n \" }
# Finally, use the data to print the code!
for lin { ${lns} } {
multisubstitute {
-define b \\
-define q \"
-define p \#
-define ob \{
-define cb \}
-define d $
-define bubble HERE
-define intron "NOTICE HOW THIS SENTENCE APPEARS ONLY ONCE IN THIS QUINE?"
+= b \\
+= q \"
+= p \#
+= ob \{
+= cb \}
+= d $
+= bubble HERE
+= intron "NOTICE HOW THIS SENTENCE APPEARS ONLY ONCE IN THIS QUINE?"
} printf %s\\n ${lin} }
# That's all, folks! - Well, that wasn't so hard, was it?
# (This quine was written by <david.madore@ens.fr> - see