Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

2
Task/Quine/00-META.yaml Normal file
View file

@ -0,0 +1,2 @@
---
from: http://rosettacode.org/wiki/Quine

42
Task/Quine/00-TASK.txt Normal file
View file

@ -0,0 +1,42 @@
A [[wp:Quine_%28computing%29|quine]] is a self-referential program that can,
without any external access, output its own source.
A   '''quine'''   (named after Willard Van Orman Quine)   is also known as:
::*   ''self-reproducing automata''   (1972)
::*   ''self-replicating program''         or   ''self-replicating computer program''
::*   ''self-reproducing program''      or   ''self-reproducing computer program''
::*   ''self-copying program''             or   ''self-copying computer program''
It is named after the [[wp:Willard_Van_Orman_Quine|philosopher and logician]]
who studied self-reference and quoting in natural language,
as for example in the paradox "'Yields falsehood when preceded by its quotation' yields falsehood when preceded by its quotation."
"Source" has one of two meanings. It can refer to the text-based program source.
For languages in which program source is represented as a data structure, "source" may refer to the data structure: quines in these languages fall into two categories: programs which print a textual representation of themselves, or expressions which evaluate to a data structure which is equivalent to that expression.
The usual way to code a quine works similarly to this paradox: The program consists of two identical parts, once as plain code and once ''quoted'' in some way (for example, as a character string, or a literal data structure). The plain code then accesses the quoted code and prints it out twice, once unquoted and once with the proper quotation marks added. Often, the plain code and the quoted code have to be nested.
;Task:
Write a program that outputs its own source code in this way. If the language allows it, you may add a variant that accesses the code directly. You are not allowed to read any external files with the source code. The program should also contain some sort of self-reference, so constant expressions which return their own value which some top-level interpreter will print out. Empty programs producing no output are not allowed.
There are several difficulties that one runs into when writing a quine, mostly dealing with quoting:
* Part of the code usually needs to be stored as a string or structural literal in the language, which needs to be quoted somehow. However, including quotation marks in the string literal itself would be troublesome because it requires them to be escaped, which then necessitates the escaping character (e.g. a backslash) in the string, which itself usually needs to be escaped, and so on.
** Some languages have a function for getting the "source code representation" of a string (i.e. adds quotation marks, etc.); in these languages, this can be used to circumvent the quoting problem.
** Another solution is to construct the quote character from its [[character code]], without having to write the quote character itself. Then the character is inserted into the string at the appropriate places. The ASCII code for double-quote is 34, and for single-quote is 39.
* Newlines in the program may have to be reproduced as newlines in the string, which usually requires some kind of escape sequence (e.g. "\n"). This causes the same problem as above, where the escaping character needs to itself be escaped, etc.
** If the language has a way of getting the "source code representation", it usually handles the escaping of characters, so this is not a problem.
** Some languages allow you to have a string literal that spans multiple lines, which embeds the newlines into the string without escaping.
** Write the entire program on one line, for free-form languages (as you can see for some of the solutions here, they run off the edge of the screen), thus removing the need for newlines. However, this may be unacceptable as some languages require a newline at the end of the file; and otherwise it is still generally good style to have a newline at the end of a file. (The task is not clear on whether a newline is required at the end of the file.) Some languages have a print statement that appends a newline; which solves the newline-at-the-end issue; but others do not.
<br>
'''Next to the Quines presented here, many other versions can be found on the [http://www.nyx.net/~gthompso/quine.htm Quine] page.'''
;Related task:
:* &nbsp; [https://rosettacode.org/wiki/Print_itself print itself].
<br><br>

View file

@ -0,0 +1,98 @@
org 100h
lxi b,P
call A
lxi d,P
jmp B
A: ldax b
ana a
rz
call G
inx b
jmp A
B: lxi h,C
call H
mvi c,16
D: mvi a,48
call G
ldax d
call E
mvi a,104
call G
ldax d
ana a
rz
inx d
dcr c
jz B
mvi a,44
call G
jmp D
E: push psw
rlc
rlc
rlc
rlc
call F
pop psw
F: ani 15
adi 48
cpi 58
jc G
adi 7
G: push h
push d
push b
push psw
mov e,a
mvi c,2
call 5
pop psw
r: pop b
pop d
pop h
ret
H: push b
push d
push h
xchg
mvi c,9
call 5
jmp r
C: db 13,10,9,'db',9,'$'
P:
db 009h,06Fh,072h,067h,009h,031h,030h,030h,068h,00Dh,00Ah,009h,06Ch,078h,069h,009h
db 062h,02Ch,050h,00Dh,00Ah,009h,063h,061h,06Ch,06Ch,009h,041h,00Dh,00Ah,009h,06Ch
db 078h,069h,009h,064h,02Ch,050h,00Dh,00Ah,009h,06Ah,06Dh,070h,009h,042h,00Dh,00Ah
db 041h,03Ah,009h,06Ch,064h,061h,078h,009h,062h,00Dh,00Ah,009h,061h,06Eh,061h,009h
db 061h,00Dh,00Ah,009h,072h,07Ah,00Dh,00Ah,009h,063h,061h,06Ch,06Ch,009h,047h,00Dh
db 00Ah,009h,069h,06Eh,078h,009h,062h,00Dh,00Ah,009h,06Ah,06Dh,070h,009h,041h,00Dh
db 00Ah,042h,03Ah,009h,06Ch,078h,069h,009h,068h,02Ch,043h,00Dh,00Ah,009h,063h,061h
db 06Ch,06Ch,009h,048h,00Dh,00Ah,009h,06Dh,076h,069h,009h,063h,02Ch,031h,036h,00Dh
db 00Ah,044h,03Ah,009h,06Dh,076h,069h,009h,061h,02Ch,034h,038h,00Dh,00Ah,009h,063h
db 061h,06Ch,06Ch,009h,047h,00Dh,00Ah,009h,06Ch,064h,061h,078h,009h,064h,00Dh,00Ah
db 009h,063h,061h,06Ch,06Ch,009h,045h,00Dh,00Ah,009h,06Dh,076h,069h,009h,061h,02Ch
db 031h,030h,034h,00Dh,00Ah,009h,063h,061h,06Ch,06Ch,009h,047h,00Dh,00Ah,009h,06Ch
db 064h,061h,078h,009h,064h,00Dh,00Ah,009h,061h,06Eh,061h,009h,061h,00Dh,00Ah,009h
db 072h,07Ah,00Dh,00Ah,009h,069h,06Eh,078h,009h,064h,00Dh,00Ah,009h,064h,063h,072h
db 009h,063h,00Dh,00Ah,009h,06Ah,07Ah,020h,009h,042h,00Dh,00Ah,009h,06Dh,076h,069h
db 009h,061h,02Ch,034h,034h,00Dh,00Ah,009h,063h,061h,06Ch,06Ch,009h,047h,00Dh,00Ah
db 009h,06Ah,06Dh,070h,009h,044h,00Dh,00Ah,045h,03Ah,009h,070h,075h,073h,068h,009h
db 070h,073h,077h,00Dh,00Ah,009h,072h,06Ch,063h,00Dh,00Ah,009h,072h,06Ch,063h,00Dh
db 00Ah,009h,072h,06Ch,063h,00Dh,00Ah,009h,072h,06Ch,063h,00Dh,00Ah,009h,063h,061h
db 06Ch,06Ch,009h,046h,00Dh,00Ah,009h,070h,06Fh,070h,009h,070h,073h,077h,00Dh,00Ah
db 046h,03Ah,009h,061h,06Eh,069h,009h,031h,035h,00Dh,00Ah,009h,061h,064h,069h,009h
db 034h,038h,00Dh,00Ah,009h,063h,070h,069h,009h,035h,038h,00Dh,00Ah,009h,06Ah,063h
db 009h,047h,00Dh,00Ah,009h,061h,064h,069h,009h,037h,00Dh,00Ah,047h,03Ah,009h,070h
db 075h,073h,068h,009h,068h,00Dh,00Ah,009h,070h,075h,073h,068h,009h,064h,00Dh,00Ah
db 009h,070h,075h,073h,068h,009h,062h,00Dh,00Ah,009h,070h,075h,073h,068h,009h,070h
db 073h,077h,00Dh,00Ah,009h,06Dh,06Fh,076h,009h,065h,02Ch,061h,00Dh,00Ah,009h,06Dh
db 076h,069h,009h,063h,02Ch,032h,00Dh,00Ah,009h,063h,061h,06Ch,06Ch,009h,035h,00Dh
db 00Ah,009h,070h,06Fh,070h,009h,070h,073h,077h,00Dh,00Ah,072h,03Ah,009h,070h,06Fh
db 070h,009h,062h,00Dh,00Ah,009h,070h,06Fh,070h,009h,064h,00Dh,00Ah,009h,070h,06Fh
db 070h,009h,068h,00Dh,00Ah,009h,072h,065h,074h,00Dh,00Ah,048h,03Ah,009h,070h,075h
db 073h,068h,009h,062h,00Dh,00Ah,009h,070h,075h,073h,068h,009h,064h,00Dh,00Ah,009h
db 070h,075h,073h,068h,009h,068h,00Dh,00Ah,009h,078h,063h,068h,067h,00Dh,00Ah,009h
db 06Dh,076h,069h,009h,063h,02Ch,039h,00Dh,00Ah,009h,063h,061h,06Ch,06Ch,009h,035h
db 00Dh,00Ah,009h,06Ah,06Dh,070h,009h,072h,00Dh,00Ah,043h,03Ah,009h,064h,062h,009h
db 031h,033h,02Ch,031h,030h,02Ch,039h,02Ch,027h,064h,062h,027h,02Ch,039h,02Ch,027h
db 024h,027h,00Dh,00Ah,050h,03Ah,000h

View file

@ -0,0 +1,35 @@
REPORT R NO STANDARD PAGE HEADING LINE-SIZE 67.
DATA:A(440),B,C,N(3) TYPE N,I TYPE I,S.
A+000 = 'REPORT R NO STANDARD PAGE HEADING LINE-SIZE 6\7.1DATA:A'.
A+055 = '(440),B,C,N(\3) TYPE N,I TYPE I,S.?1DO 440 TIMES.3C = A'.
A+110 = '+I.3IF B = S.5IF C CA `\\\?\1\3\5\7`.7B = C.5ELSEIF C ='.
A+165 = ' `\``.7WRITE ```` NO-GAP.5ELSE.7WRITE C NO-GAP.5ENDIF.3'.
A+220 = 'ELSEIF B = `\\`.5WRITE C NO-GAP.5B = S.3ELSEIF B = `\?`'.
A+275 = '.5DO 8 TIMES.7WRITE:/ `A+` NO-GAP,N,`= ``` NO-GAP,A+N(\'.
A+330 = '5\5) NO-GAP,```.`.7N = N + \5\5.5ENDDO.5B = C.3ELSE.5WR'.
A+385 = 'ITE AT /B C NO-GAP.5B = S.3ENDIF.3I = I + \1.1ENDDO. '.
DO 440 TIMES.
C = A+I.
IF B = S.
IF C CA '\?1357'.
B = C.
ELSEIF C = '`'.
WRITE '''' NO-GAP.
ELSE.
WRITE C NO-GAP.
ENDIF.
ELSEIF B = '\'.
WRITE C NO-GAP.
B = S.
ELSEIF B = '?'.
DO 8 TIMES.
WRITE:/ 'A+' NO-GAP,N,'= ''' NO-GAP,A+N(55) NO-GAP,'''.'.
N = N + 55.
ENDDO.
B = C.
ELSE.
WRITE AT /B C NO-GAP.
B = S.
ENDIF.
I = I + 1.
ENDDO.

View file

@ -0,0 +1,7 @@
REPORT R NO STANDARD PAGE HEADING.DATA:A TYPE TABLE OF STRING,B(8).APPEND:
`REPORT.FORM F TABLES T.NEW-PAGE LINE-SIZE 78.WRITE:'REPORT R NO',` TO A,
`'STANDARD PAGE HEADING.DATA:A TYPE TABLE OF STRING,B(8).APPEND:'.LOOP` TO A,
`AT T.REPLACE ALL OCCURENCES OF'``' IN T WITH'````'.WRITE:/'``'` TO A,
`NO-GAP,T NO-GAP,'`` TO A,'.ENDLOOP.WRITE:AT 78'.','GENERATE',` TO A,
`'SUBROUTINE POOL A NAME B.PERFORM F IN PROGRAM (B) TABLES A.'.ENDFORM.` TO A.
GENERATE SUBROUTINE POOL A NAME B.PERFORM F IN PROGRAM (B) TABLES A.

View file

@ -0,0 +1,31 @@
REPORT A NO STANDARD
PAGE HEADING
LINE-SIZE
72.DATA:C(33),A LIKE
TABLE OF C,X(3333)
TYPE X,Y TYPE
XSTRING.DEFINE A.X+C
='&1'.C = C + 33.
END-OF-DEFINITION.
DEFINE B.LOOP AT A
INTO C &1 &2.WRITE
/ C.ENDLOOP.
END-OF-DEFINITION.
A FF060201020280003431303300000000AC030000121F9D02BB522ADA69108AA1C7 .
A E8B32FFEC07DD21907936962B28407983089732C8811FC4413FD02A7BFE6690B03 .
A 262F72B38EF69EB6A7A71C9F82CF44CC11469E081F86785777F269DE372CE9EC4B .
A 5E0A24D8224781128E290E1B7A0ECFF423BEDFD316B43B456FE9AD98E1F0401B31 .
A 9E11B3A23F3C865EEB6D028FD532BC69DED831F41DE6F0B59F745E604996373C97 .
A 982A2FA9F6C81A86164CCC98D4CC91D22E89AB9A1CCBEB6A97A839A5602BA26AFE .
A 7791BF4C2A9DBE6866134E093BD82CA291CF2A57EC67E81017384740EB33E6102A .
A 174784531EFEA076A29A7ACAD9EB55CED8316374D3E00D3DEC1CF36E4D4C4EE64E .
A 75B28DB568C195BA3DE92F9CC48AAAAF3A4DD9CC6BE899E27C18A3B66ECBF65093 .
A FFF1168545878AD10C4F075F588821EF947739516EBF7D99F5851D52F629E8D5AC .
A 13EF77291306AA6CABF7B56EC9E273F47997DA3FE146FB2A2C30E3BE22FEA603B4 .
A EDB5FBEE64A7637B35B46DD79491EEC2D1A19B26C0ADAAB2FB39F9050000000000 .
Y = X.IMPORT A = A
FROM DATA BUFFER Y.B
TO 13.C = 0.DO 12
TIMES.WRITE:/'A',
X+C(33),'.'.C = C +
33.ENDDO.B FROM 14.

View file

@ -0,0 +1,25 @@
.REPORT Q NO STANDARD PAGE HEADING LINE-SIZE 72
.DATA QQ(69) OCCURS 0
.DATA Q LIKE QQ WITH HEADER LINE
.APPEND 'SYNTAX-TRACE ON.INCLUDE' TO QQ
.APPEND SY-REPID TO QQ
.APPEND '.' TO QQ
.SYNTAX-CHECK FOR QQ MESSAGE Q LINE Q WORD Q TRACE-TABLE Q
.LOOP AT Q
.CHECK Q(1) = '#'
.Q = Q+5
.IF Q < Q OR SY-SAPRL > '5'
.SPLIT Q AT '' INTO Q Q
.ENDIF
.IF Q < Q OR SY-LINNO < 22
.CHECK Q CA 'Q.' OR Q+4 = 'F'
.ENDIF
.IF Q < Q OR SY-LINNO > 23
.CHECK Q CA '.'
.ENDIF
.CHECK Q(1) NA 'IT+' OR Q+1(1) = 'F'
.WRITE / '.' NO-GAP
.WRITE Q
.ENDLOOP
.WRITE / '.'
.

View file

@ -0,0 +1,6 @@
(defun print-quine (quine)
(cw quine quine))
(print-quine
"(defun print-quine (quine)
(cw quine quine))
(print-quine ~x0)~%")

View file

@ -0,0 +1 @@
(let((q"(let((q~x0))(cw q q))"))(cw q q))

View file

@ -0,0 +1 @@
STRINGa="STRINGa=,q=REPR34;print(a[:8]+q+a+q+a[9:])",q=REPR34;print(a[:8]+q+a+q+a[9:])

View file

@ -0,0 +1 @@
[]CHARa="[]CHARa="";print(2*a[:9]+2*a[9:])";print(2*a[:9]+2*a[9:])

1
Task/Quine/APL/quine.apl Normal file
View file

@ -0,0 +1 @@
1,9'''1⌽,⍨9''' ⍝ Author: Nikolay Nikolov; Source: https://dfns.dyalog.com/n_quine.htm

View file

@ -0,0 +1 @@
BEGIN{c="BEGIN{c=%c%s%c;printf(c,34,c,34);}";printf(c,34,c,34);}

View file

@ -0,0 +1 @@
BEGIN{c="BEGIN{c=%c%s%c;printf c,34,c,34}";printf c,34,c,34}

1
Task/Quine/Ada/quine.ada Normal file
View file

@ -0,0 +1 @@
with Ada.Text_IO;procedure Self is Q:Character:='"';A:String:="with Ada.Text_IO;procedure Self is Q:Character:='&#39;;A:String:=;begin Ada.Text_IO.Put_Line(A(1..49)&Q&A(50..61)&Q&A&Q&A(62..A'Last));end Self;";begin Ada.Text_IO.Put_Line(A(1..49)&Q&A(50..61)&Q&A&Q&A(62..A'Last));end Self;

View file

@ -0,0 +1,22 @@
integer f;
text s, t;
f = 36;
s = "integer f;
text s, t;
f = 36;
s = \"\";
o_text(cut(s, 0, f));
o_text(cut(s, 0, f - 1));
o_etext(cut(s, f - 1, 2));
o_text(cut(s, f + 1, 8888 - f));
o_text(cut(s, f, 8888 - f));
";
o_text(cut(s, 0, f));
o_text(cut(s, 0, f - 1));
o_etext(cut(s, f - 1, 2));
o_text(cut(s, f + 1, 8888 - f));
o_text(cut(s, f, 8888 - f));

View file

@ -0,0 +1 @@
10 LIST

View file

@ -0,0 +1 @@
block: [print ["block:" as .code block "do block"]] do block

View file

@ -0,0 +1,2 @@
FileRead, quine, %A_ScriptFullPath%
MsgBox % quine

View file

@ -0,0 +1,32 @@
D(n, s)
{
global
Loop %n%
{
l := %s%%A_Index%
If l = #
l := "script =" . nl . "( %" . nl . script . nl . ")"
FileAppend %l%%nl%, %A_ScriptDir%\Q.txt
}
}
nl := Chr(13) . Chr(10)
script =
( %
D(n, s)
{
global
Loop %n%
{
l := %s%%A_Index%
If l = #
l := "script =" . nl . "( %" . nl . script . nl . ")"
FileAppend %l%%nl%, %A_ScriptDir%\Q.txt
}
}
nl := Chr(13) . Chr(10)
#
StringSplit q, script, %nl%
D(q0, "q")
)
StringSplit q, script, %nl%
D(q0, "q")

View file

@ -0,0 +1,8 @@
quote := Chr(34)
sep := Chr(36)
nl := Chr(13) . Chr(10)
script := "quote := Chr(34)$sep := Chr(36)$nl := Chr(13) . Chr(10)$script := #$s := script$StringReplace script, script, %sep%, %nl%, All$StringReplace script, script, #, %quote%%s%%quote%$FileAppend %script%, %A_ScriptDir%\Q.txt"
s := script
StringReplace script, script, %sep%, %nl%, All
StringReplace script, script, #, %quote%%s%%quote%
FileAppend %script%, %A_ScriptDir%\Q.txt

View file

@ -0,0 +1 @@
FileCopy, %A_ScriptFullPath%, %A_ScriptDir%\Copy-Of--%A_ScriptName%

View file

@ -0,0 +1 @@
10 LIST

View file

@ -0,0 +1,25 @@
READ d$
DO
READ x$
PRINT x$
LOOP UNTIL LEN(x$) < 1
RESTORE
DO
READ x$
PRINT d$; CHR$(34); x$; CHR$(34)
LOOP UNTIL LEN(x$) < 1
END
DATA "DATA "
DATA "READ d$"
DATA "DO"
DATA " READ x$"
DATA " PRINT x$"
DATA "LOOP UNTIL LEN(x$) < 1"
DATA "RESTORE"
DATA "DO"
DATA " READ x$"
DATA " PRINT d$; CHR$(34); x$; CHR$(34)"
DATA "LOOP UNTIL LEN(x$) < 1"
DATA "END"
DATA ""

View file

@ -0,0 +1 @@
s$ = "s$ = : print left(s$, 5) + chr(34) + s$ + chr(34) + mid(s$, 5, 66)" : print left(s$, 5) + chr(34) + s$ + chr(34) + mid(s$, 5, 66)

View file

@ -0,0 +1 @@
PRINT $(PAGE+22)$(PAGE+21):REM PRINT $(PAGE+22)$(PAGE+21):REM

View file

@ -0,0 +1 @@
PRINT $(PAGE+23)$(PAGE+22):REM PRINT $(PAGE+23)$(PAGE+22):REM

View file

@ -0,0 +1,45 @@
get "libhdr"
let start() be
$( let x = table
13,10,32,32,32,32,108,101,116,32,110,32,61,32,48,
13,10,32,32,32,32,119,114,105,116,101,115,40,34,103,
101,116,32,42,34,108,105,98,104,100,114,42,34,42,78,
42,78,108,101,116,32,115,116,97,114,116,40,41,32,98,
101,42,78,36,40,32,32,108,101,116,32,120,32,61,32,
116,97,98,108,101,42,78,32,32,32,32,34,41,13,10,
13,10,32,32,32,32,119,104,105,108,101,32,120,33,110,
32,126,61,32,48,32,100,111,13,10,32,32,32,32,36,
40,32,32,119,114,105,116,101,102,40,34,37,78,44,34,
44,120,33,110,41,13,10,32,32,32,32,32,32,32,32,
110,32,58,61,32,110,32,43,32,49,13,10,32,32,32,
32,32,32,32,32,105,102,32,110,32,114,101,109,32,49,
53,32,61,32,48,32,116,104,101,110,32,119,114,105,116,
101,115,40,34,42,78,32,32,32,32,34,41,13,10,32,
32,32,32,36,41,13,10,32,32,32,32,13,10,32,32,
32,32,119,114,105,116,101,115,40,34,48,42,78,34,41,
13,10,32,32,32,32,13,10,32,32,32,32,110,32,58,
61,32,48,13,10,32,32,32,32,119,104,105,108,101,32,
120,33,110,32,126,61,32,48,32,100,111,13,10,32,32,
32,32,36,40,32,32,119,114,99,104,40,120,33,110,41,
13,10,32,32,32,32,32,32,32,32,110,32,58,61,32,
110,32,43,32,49,13,10,32,32,32,32,36,41,13,10,
36,41,13,10,0
let n = 0
writes("get *"libhdr*"*N*Nlet start() be*N$( let x = table*N ")
while x!n ~= 0 do
$( writef("%N,",x!n)
n := n + 1
if n rem 15 = 0 then writes("*N ")
$)
writes("0*N")
n := 0
while x!n ~= 0 do
$( wrch(x!n)
n := n + 1
$)
$)

1
Task/Quine/BQN/quine.bqn Normal file
View file

@ -0,0 +1 @@
•Out 1˜18•Repr"•Out 1⌽∾˜18⥊•Repr"

View file

@ -0,0 +1 @@
?SOURCE$;

View file

@ -0,0 +1 @@
a$=SOURCE$:?a$;

View file

@ -0,0 +1 @@
s$="s$=%c%s%c:?34,s$,34 FORMAT s$":?34,s$,34 FORMAT s$

View file

@ -0,0 +1,6 @@
% bin/babel quine.sp
{ "{ '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << ' }' << } !" { '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << '}' << } ! }%
%
% cat quine.sp
{ "{ '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << ' }' << } !" { '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << '}' << } ! }%
%

View file

@ -0,0 +1,6 @@
% bin/babel
babel> { "{ '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << ' }' << } !" { '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << '}' << } ! }
babel> eval
{ "{ '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << ' }' << } !" { '{ ' << dup [val 0x22 0xffffff00 ] dup <- << << -> << ' ' << << '
}' << } !}babel>
babel>

View file

@ -0,0 +1 @@
@type %0

View file

@ -0,0 +1 @@
@type "%~f0"

View file

@ -0,0 +1 @@
_4~++~+.@1~0@D@1J

View file

@ -0,0 +1 @@
*4~++~+.@1~0@D@1J

View file

@ -0,0 +1 @@
`_4~++~+.@1~0@D@1J

View file

@ -0,0 +1 @@
`*4~++~+.@1~0@D@1J

View file

@ -0,0 +1 @@
`_4~++~+.}1fJ

View file

@ -0,0 +1 @@
:0g,:66+`#@_1+

View file

@ -0,0 +1 @@
000101100100011010000000000001011011110010111100111111011111011010000101100100011010000000000001011011110010111100111111011111011010

View file

@ -0,0 +1 @@
10 list

View file

@ -0,0 +1 @@
quine$

View file

@ -0,0 +1,7 @@
->+>+++>>+>++>+>+++>>+>++>>>+>+>+>++>+>>>>+++>+>>++>+>+++>>++>++>>+>>+>++>++>+>>>>+++>+>>>>++>++>>>>+>>++>+>+++>>>++>>++++++>>+>>++>
+>>>>+++>>+++++>>+>+++>>>++>>++>>+>>++>+>+++>>>++>>+++++++++++++>>+>>++>+>+++>+>+++>>>++>>++++>>+>>++>+>>>>+++>>+++++>>>>++>>>>+>+>+
+>>+++>+>>>>+++>+>>>>+++>+>>>>+++>>++>++>+>+++>+>++>++>>>>>>++>+>+++>>>>>+++>>>++>+>+++>+>+>++>>>>>>++>>>+>>>++>+>>>>+++>+>>>+>>++>+
>++++++++++++++++++>>>>+>+>>>+>>++>+>+++>>>++>>++++++++>>+>>++>+>>>>+++>>++++++>>>+>++>>+++>+>+>++>+>+++>>>>>+++>>>+>+>>++>+>+++>>>+
+>>++++++++>>+>>++>+>>>>+++>>++++>>+>+++>>>>>>++>+>+++>>+>++>>>>+>+>++>+>>>>+++>>+++>>>+[[->>+<<]<+]+++++[->+++++++++<]>.[+]>>
[<<+++++++[->+++++++++<]>-.------------------->-[-<.<+>>]<[+]<+>>>]<<<[-[-[-[>>+<++++++[->+++++<]]>++++++++++++++<]>+++<]++++++
[->+++++++<]>+<<<-[->>>++<<<]>[->>.<<]<<]

View file

@ -0,0 +1,2 @@
blsq ) "I'm a quine."
"I'm a quine."

3
Task/Quine/C++/quine.cpp Normal file
View file

@ -0,0 +1,3 @@
#include<cstdio>
int main(){char n[]=R"(#include<cstdio>
int main(){char n[]=R"(%s%c";printf(n,n,41);})";printf(n,n,41);}

View file

@ -0,0 +1 @@
class Program { static void Main() { var s = "class Program {{ static void Main() {{ var s = {0}{1}{0}; System.Console.WriteLine(s, (char)34, s); }} }}"; System.Console.WriteLine(s, (char)34, s); } }

10
Task/Quine/C/quine-1.c Normal file
View file

@ -0,0 +1,10 @@
#include <stdio.h>
static char sym[] = "\n\t\\\"";
int main(void) {
const char *code = "#include <stdio.h>%c%cstatic char sym[] = %c%cn%ct%c%c%c%c%c;%c%cint main(void) {%c%cconst char *code = %c%s%c;%c%cprintf(code, sym[0], sym[0], sym[3], sym[2], sym[2], sym[2], sym[2], sym[2], sym[3], sym[3], sym[0], sym[0], sym[0], sym[1], sym[3], code, sym[3], sym[0], sym[1], sym[0], sym[0], sym[1], sym[0], sym[0]);%c%c%creturn 0;%c}%c";
printf(code, sym[0], sym[0], sym[3], sym[2], sym[2], sym[2], sym[2], sym[2], sym[3], sym[3], sym[0], sym[0], sym[0], sym[1], sym[3], code, sym[3], sym[0], sym[1], sym[0], sym[0], sym[1], sym[0], sym[0]);
return 0;
}

2
Task/Quine/C/quine-2.c Normal file
View file

@ -0,0 +1,2 @@
#include <stdio.h>
int main(){char*c="#include <stdio.h>%cint main(){char*c=%c%s%c;printf(c,10,34,c,34,10);return 0;}%c";printf(c,10,34,c,34,10);return 0;}

2
Task/Quine/C/quine-3.c Normal file
View file

@ -0,0 +1,2 @@
#include <stdio.h>
main(void){printf(__FILE__);}

1
Task/Quine/C1R/quine.c1r Normal file
View file

@ -0,0 +1 @@
Quine

1
Task/Quine/C3/quine.c3 Normal file
View file

@ -0,0 +1 @@
import std::io; fn void main() => io::printfn("%sString q = \x60%s\x60;", q, q);String q = `import std::io; fn void main() => io::printfn("%sString q = \x60%s\x60;", q, q);`;

25
Task/Quine/CLU/quine.clu Normal file
View file

@ -0,0 +1,25 @@
q="start_up=proc()\n"||
" po:stream:=stream$primary_output()\n"||
" stream$puts(po,\"q=\\\"\")\n"||
" for c:char in string$chars(q) do\n"||
" if c='\\n' then stream$puts(po,\"\\\\n\\\"||\\n\\\"\")\n"||
" elseif c='\\\\' then stream$puts(po,\"\\\\\\\\\")\n"||
" elseif c='\\\"' then stream$puts(po,\"\\\\\\\"\")\n"||
" else stream$putc(po,c)\n"||
" end\n"||
" end\n"||
" stream$puts(po,\"\\\"\\n\"||q)\n"||
"end start_up\n"||
""
start_up=proc()
po:stream:=stream$primary_output()
stream$puts(po,"q=\"")
for c:char in string$chars(q) do
if c='\n' then stream$puts(po,"\\n\"||\n\"")
elseif c='\\' then stream$puts(po,"\\\\")
elseif c='\"' then stream$puts(po,"\\\"")
else stream$putc(po,c)
end
end
stream$puts(po,"\"\n"||q)
end start_up

View file

@ -0,0 +1 @@
linkage section. 78 c value "display 'linkage section. 78 c value ' x'22' c x'222e20' c.". display 'linkage section. 78 c value ' x'22' c x'222e20' c.

View file

@ -0,0 +1,339 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. GRICE.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
SYMBOLIC CHARACTERS FULL-STOP IS 76.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT OUTPUT-FILE ASSIGN TO OUTPUT1.
DATA DIVISION.
FILE SECTION.
FD OUTPUT-FILE
RECORDING MODE F
LABEL RECORDS OMITTED.
01 OUTPUT-RECORD PIC X(80).
WORKING-STORAGE SECTION.
01 SUB-X PIC S9(4) COMP.
01 SOURCE-FACSIMILE-AREA.
02 SOURCE-FACSIMILE-DATA.
03 FILLER PIC X(40) VALUE
" IDENTIFICATION DIVISION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" PROGRAM-ID. GRICE. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ENVIRONMENT DIVISION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" CONFIGURATION SECTION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" SPECIAL-NAMES. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" SYMBOLIC CHARACTERS FULL-STOP".
03 FILLER PIC X(40) VALUE
" IS 76. ".
03 FILLER PIC X(40) VALUE
" INPUT-OUTPUT SECTION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" FILE-CONTROL. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" SELECT OUTPUT-FILE ASSIGN TO ".
03 FILLER PIC X(40) VALUE
"OUTPUT1. ".
03 FILLER PIC X(40) VALUE
" DATA DIVISION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" FILE SECTION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" FD OUTPUT-FILE ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" RECORDING MODE F ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" LABEL RECORDS OMITTED. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" 01 OUTPUT-RECORD ".
03 FILLER PIC X(40) VALUE
" PIC X(80). ".
03 FILLER PIC X(40) VALUE
" WORKING-STORAGE SECTION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" 01 SUB-X ".
03 FILLER PIC X(40) VALUE
" PIC S9(4) COMP. ".
03 FILLER PIC X(40) VALUE
" 01 SOURCE-FACSIMILE-AREA. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" 02 SOURCE-FACSIMILE-DATA. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" 03 FILLER ".
03 FILLER PIC X(40) VALUE
" PIC X(40) VALUE ".
03 FILLER PIC X(40) VALUE
" 02 SOURCE-FACSIMILE-TABLE RE".
03 FILLER PIC X(40) VALUE
"DEFINES ".
03 FILLER PIC X(40) VALUE
" SOURCE-FACSIMILE-DATA".
03 FILLER PIC X(40) VALUE
". ".
03 FILLER PIC X(40) VALUE
" 03 SOURCE-FACSIMILE OCCU".
03 FILLER PIC X(40) VALUE
"RS 68. ".
03 FILLER PIC X(40) VALUE
" 04 SOURCE-FACSIMILE-".
03 FILLER PIC X(40) VALUE
"ONE PIC X(40). ".
03 FILLER PIC X(40) VALUE
" 04 SOURCE-FACSIMILE-".
03 FILLER PIC X(40) VALUE
"TWO PIC X(40). ".
03 FILLER PIC X(40) VALUE
" 01 FILLER-IMAGE. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" 02 FILLER ".
03 FILLER PIC X(40) VALUE
" PIC X(15) VALUE SPACES. ".
03 FILLER PIC X(40) VALUE
" 02 FILLER ".
03 FILLER PIC X(40) VALUE
" PIC X VALUE QUOTE. ".
03 FILLER PIC X(40) VALUE
" 02 FILLER-DATA ".
03 FILLER PIC X(40) VALUE
" PIC X(40). ".
03 FILLER PIC X(40) VALUE
" 02 FILLER ".
03 FILLER PIC X(40) VALUE
" PIC X VALUE QUOTE. ".
03 FILLER PIC X(40) VALUE
" 02 FILLER ".
03 FILLER PIC X(40) VALUE
" PIC X VALUE FULL-STOP. ".
03 FILLER PIC X(40) VALUE
" 02 FILLER ".
03 FILLER PIC X(40) VALUE
" PIC X(22) VALUE SPACES. ".
03 FILLER PIC X(40) VALUE
" PROCEDURE DIVISION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MAIN-LINE SECTION. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ML-1. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" OPEN OUTPUT OUTPUT-FILE. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE 1 TO SUB-X. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ML-2. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE SOURCE-FACSIMILE (SUB-X)".
03 FILLER PIC X(40) VALUE
" TO OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" WRITE OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" IF SUB-X < 19 ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ADD 1 TO SUB-X ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" GO TO ML-2. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE 1 TO SUB-X. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ML-3. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE SOURCE-FACSIMILE (20) TO".
03 FILLER PIC X(40) VALUE
" OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" WRITE OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE SOURCE-FACSIMILE-ONE (SU".
03 FILLER PIC X(40) VALUE
"B-X) TO FILLER-DATA. ".
03 FILLER PIC X(40) VALUE
" MOVE FILLER-IMAGE TO OUTPUT-R".
03 FILLER PIC X(40) VALUE
"ECORD. ".
03 FILLER PIC X(40) VALUE
" WRITE OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE SOURCE-FACSIMILE (20) TO".
03 FILLER PIC X(40) VALUE
" OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" WRITE OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE SOURCE-FACSIMILE-TWO (SU".
03 FILLER PIC X(40) VALUE
"B-X) TO FILLER-DATA. ".
03 FILLER PIC X(40) VALUE
" MOVE FILLER-IMAGE TO OUTPUT-R".
03 FILLER PIC X(40) VALUE
"ECORD. ".
03 FILLER PIC X(40) VALUE
" WRITE OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" IF SUB-X < 68 ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ADD 1 TO SUB-X ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" GO TO ML-3. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE 21 TO SUB-X. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ML-4. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" MOVE SOURCE-FACSIMILE (SUB-X)".
03 FILLER PIC X(40) VALUE
" TO OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" WRITE OUTPUT-RECORD. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" IF SUB-X < 68 ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ADD 1 TO SUB-X ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" GO TO ML-4. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" ML-99. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" CLOSE OUTPUT-FILE. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
" STOP RUN. ".
03 FILLER PIC X(40) VALUE
" ".
02 SOURCE-FACSIMILE-TABLE REDEFINES
SOURCE-FACSIMILE-DATA.
03 SOURCE-FACSIMILE OCCURS 68.
04 SOURCE-FACSIMILE-ONE PIC X(40).
04 SOURCE-FACSIMILE-TWO PIC X(40).
01 FILLER-IMAGE.
02 FILLER PIC X(15) VALUE SPACES.
02 FILLER PIC X VALUE QUOTE.
02 FILLER-DATA PIC X(40).
02 FILLER PIC X VALUE QUOTE.
02 FILLER PIC X VALUE FULL-STOP.
02 FILLER PIC X(22) VALUE SPACES.
PROCEDURE DIVISION.
MAIN-LINE SECTION.
ML-1.
OPEN OUTPUT OUTPUT-FILE.
MOVE 1 TO SUB-X.
ML-2.
MOVE SOURCE-FACSIMILE (SUB-X) TO OUTPUT-RECORD.
WRITE OUTPUT-RECORD.
IF SUB-X < 19
ADD 1 TO SUB-X
GO TO ML-2.
MOVE 1 TO SUB-X.
ML-3.
MOVE SOURCE-FACSIMILE (20) TO OUTPUT-RECORD.
WRITE OUTPUT-RECORD.
MOVE SOURCE-FACSIMILE-ONE (SUB-X) TO FILLER-DATA.
MOVE FILLER-IMAGE TO OUTPUT-RECORD.
WRITE OUTPUT-RECORD.
MOVE SOURCE-FACSIMILE (20) TO OUTPUT-RECORD.
WRITE OUTPUT-RECORD.
MOVE SOURCE-FACSIMILE-TWO (SUB-X) TO FILLER-DATA.
MOVE FILLER-IMAGE TO OUTPUT-RECORD.
WRITE OUTPUT-RECORD.
IF SUB-X < 68
ADD 1 TO SUB-X
GO TO ML-3.
MOVE 21 TO SUB-X.
ML-4.
MOVE SOURCE-FACSIMILE (SUB-X) TO OUTPUT-RECORD.
WRITE OUTPUT-RECORD.
IF SUB-X < 68
ADD 1 TO SUB-X
GO TO ML-4.
ML-99.
CLOSE OUTPUT-FILE.
STOP RUN.

View file

@ -0,0 +1,48 @@
ID DIVISION.
PROGRAM-ID. QUINE.
DATA DIVISION.
WORKING-STORAGE SECTION.
1 X PIC S9(4) COMP.
1 A. 2 B.
3 PIC X(40) VALUE " ID DIVISION. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " PROGRAM-ID. QUINE. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " DATA DIVISION. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " WORKING-STORAGE SECTION. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " 1 X PIC S9(4) COMP. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " 1 A. 2 B. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " 2 T REDEFINES B. 3 TE OCCURS 16. ".
3 PIC X(40) VALUE "4 T1 PIC X(40). 4 T2 PIC X(40). ".
3 PIC X(40) VALUE " 1 F. 2 PIC X(25) VALUE ".
3 PIC X(40) VALUE "' 3 PIC X(40) VALUE '. ".
3 PIC X(40) VALUE " 2 PIC X VALUE QUOTE. 2 FF PIC X(4".
3 PIC X(40) VALUE "0). 2 PIC X VALUE QUOTE. ".
3 PIC X(40) VALUE " 2 PIC X VALUE '.'. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " PROCEDURE DIVISION. ".
3 PIC X(40) VALUE " ".
3 PIC X(40) VALUE " PERFORM VARYING X FROM 1 BY 1".
3 PIC X(40) VALUE " UNTIL X > 6 DISPLAY TE (X) ".
3 PIC X(40) VALUE " END-PERFORM PERFORM VARYING X".
3 PIC X(40) VALUE " FROM 1 BY 1 UNTIL X > 16 ".
3 PIC X(40) VALUE " MOVE T1 (X) TO FF DISPLAY F M".
3 PIC X(40) VALUE "OVE T2 (X) TO FF DISPLAY F ".
3 PIC X(40) VALUE " END-PERFORM PERFORM VARYING X".
3 PIC X(40) VALUE " FROM 7 BY 1 UNTIL X > 16 ".
3 PIC X(40) VALUE " DISPLAY TE (X) END-PERFORM ST".
3 PIC X(40) VALUE "OP RUN. ".
2 T REDEFINES B. 3 TE OCCURS 16. 4 T1 PIC X(40). 4 T2 PIC X(40).
1 F. 2 PIC X(25) VALUE ' 3 PIC X(40) VALUE '.
2 PIC X VALUE QUOTE. 2 FF PIC X(40). 2 PIC X VALUE QUOTE.
2 PIC X VALUE '.'.
PROCEDURE DIVISION.
PERFORM VARYING X FROM 1 BY 1 UNTIL X > 6 DISPLAY TE (X)
END-PERFORM PERFORM VARYING X FROM 1 BY 1 UNTIL X > 16
MOVE T1 (X) TO FF DISPLAY F MOVE T2 (X) TO FF DISPLAY F
END-PERFORM PERFORM VARYING X FROM 7 BY 1 UNTIL X > 16
DISPLAY TE (X) END-PERFORM STOP RUN.

View file

@ -0,0 +1,24 @@
Author. Tom Dawes-Gamble. (c) 2000
01 src-lines pic x(768) value
" Author. Tom Dawes-Gamble. (c) 2000
-"01 src-lines pic x(768) value
-"01 sl redefines src-lines pic x(64) occurs 12 indexed by i.
-" Perform varying i from 1 by 1 until i > 2
-" Display ' ' sl(i).
-" Display ' ' quote sl(1).
-" Perform varying i from 2 by 1 until i > 11
-" Display ' ' '-' quote sl(i).
-" Display ' ' '-' quote ' Stop run.' quote '.'.
-" Perform varying i from 3 by 1 until i > 12
-" Display ' ' sl(i).
-" Stop run.".
01 sl redefines src-lines pic x(64) occurs 12 indexed by i.
Perform varying i from 1 by 1 until i > 2
Display ' ' sl(i).
Display ' ' quote sl(1).
Perform varying i from 2 by 1 until i > 11
Display ' ' '-' quote sl(i).
Display ' ' '-' quote ' Stop run.' quote '.'.
Perform varying i from 3 by 1 until i > 12
Display ' ' sl(i).
Stop run.

View file

@ -0,0 +1 @@
shared void run() {print(let (x = """shared void run() {print(let (x = $) x.replaceFirst("$", "\"\"\"" + x + "\"\"\""));}""") x.replaceFirst("$", "\"\"\"" + x + "\"\"\""));}

View file

@ -0,0 +1 @@
((fn [x] (list x (list (quote quote) x))) (quote (fn [x] (list x (list (quote quote) x)))))

View file

@ -0,0 +1 @@
(#(print (str "(#" % " '" % ")")) '(print (str "(#" % " '" % ")")))

View file

@ -0,0 +1 @@
s="s=#&# ;alert s.replace(/&/,s).replace /#(?=[^&;'(]|';;$)/g, '#';;" ;alert s.replace(/&/,s).replace /#(?=[^&;'(]|';;$)/g, '"';;

View file

@ -0,0 +1,31 @@
10 DATA 49,54,48,32,78,61,51,51,48,13,49,55,48,32,68,73,77,32,65,40,78,41,13
20 DATA 49,56,48,32,70,79,82,32,73,61,48,32,84,79,32,78,13,49,57,48,32,58,32
30 DATA 82,69,65,68,32,65,40,73,41,13,50,48,48,32,78,69,88,84,32,73,13,50,49
40 DATA 48,32,70,79,82,32,73,61,48,32,84,79,32,49,52,32,13,50,50,48,32,58,32
50 DATA 80,82,73,78,84,32,77,73,68,36,40,83,84,82,36,40,40,73,43,49,41,42,49
60 DATA 48,41,44,50,41,59,34,32,68,65,84,65,32,34,59,77,73,68,36,40,83,84,82
70 DATA 36,40,65,40,73,42,50,51,41,41,44,50,41,59,13,50,51,48,32,58,32,70,79
80 DATA 82,32,74,61,49,32,84,79,32,50,50,13,50,52,48,32,58,32,32,32,75,61,73
90 DATA 42,50,51,43,74,13,50,53,48,32,58,32,32,32,73,70,32,75,32,60,61,32,78
100 DATA 32,84,72,69,78,32,80,82,73,78,84,32,34,44,34,59,77,73,68,36,40,83,84
110 DATA 82,36,40,65,40,75,41,41,44,50,41,59,13,50,54,48,32,58,32,78,69,88,84
120 DATA 32,74,13,50,55,48,32,58,32,80,82,73,78,84,13,50,56,48,32,78,69,88,84
130 DATA 32,73,13,50,57,48,32,70,79,82,32,73,61,48,32,84,79,32,78,13,51,48,48
140 DATA 32,58,32,80,82,73,78,84,32,67,72,82,36,40,65,40,73,41,41,59,13,51,49
150 DATA 48,32,78,69,88,84,32,73,13
160 N=330
170 DIM A(N)
180 FOR I=0 TO N
190 : READ A(I)
200 NEXT I
210 FOR I=0 TO 14
220 : PRINT MID$(STR$((I+1)*10),2);" DATA ";MID$(STR$(A(I*23)),2);
230 : FOR J=1 TO 22
240 : K=I*23+J
250 : IF K <= N THEN PRINT ",";MID$(STR$(A(K)),2);
260 : NEXT J
270 : PRINT
280 NEXT I
290 FOR I=0 TO N
300 : PRINT CHR$(A(I));
310 NEXT I

View file

@ -0,0 +1,2 @@
((lambda (s) (print (list s (list 'quote s))))
'(lambda (s) (print (list s (list 'quote s)))))

View file

@ -0,0 +1 @@
((lambda (s) (print `(,s ',s))) '(lambda (s) (print `(,s ',s))))

View file

@ -0,0 +1 @@
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))

View file

@ -0,0 +1 @@
#1=(write '#1# :circle t)

View file

@ -0,0 +1 @@
#1=(progn (setq *print-circle* t) (write '#1#))

View file

@ -0,0 +1 @@
(format t #1='"(format t #1='~s #1#)" #1#)

View file

@ -0,0 +1 @@
(write -)

View file

@ -0,0 +1,39 @@
include "cowgol.coh";
var i: uint8 := 0;
var c: uint8[] := {
118,97,114,32,100,32,58,61,32,38,99,32,97,115,32,91,117,105,110,116,
56,93,59,10,112,114,105,110,116,40,34,105,110,99,108,117,100,101,32,92,
34,99,111,119,103,111,108,46,99,111,104,92,34,59,92,110,34,41,59,10,
112,114,105,110,116,40,34,118,97,114,32,105,58,32,117,105,110,116,56,32,
58,61,32,48,59,92,110,34,41,59,10,112,114,105,110,116,40,34,118,97,
114,32,99,58,32,117,105,110,116,56,91,93,32,58,61,32,123,92,110,34,
41,59,10,108,111,111,112,32,10,32,32,32,32,112,114,105,110,116,95,105,
56,40,91,100,93,41,59,10,32,32,32,32,105,102,32,91,100,93,61,61,
48,32,116,104,101,110,32,98,114,101,97,107,59,32,101,110,100,32,105,102,
59,10,32,32,32,32,100,32,58,61,32,64,110,101,120,116,32,100,59,10,
32,32,32,32,112,114,105,110,116,95,99,104,97,114,40,39,44,39,41,59,
10,32,32,32,32,105,32,58,61,32,105,32,43,32,49,59,10,32,32,32,
32,105,102,32,105,61,61,50,48,32,116,104,101,110,32,10,32,32,32,32,
32,32,32,32,112,114,105,110,116,95,110,108,40,41,59,32,10,32,32,32,
32,32,32,32,32,105,32,58,61,32,48,59,10,32,32,32,32,101,110,100,
32,105,102,59,10,101,110,100,32,108,111,111,112,59,10,112,114,105,110,116,
40,34,92,110,125,59,92,110,34,41,59,10,112,114,105,110,116,40,38,99,
32,97,115,32,91,117,105,110,116,56,93,41,59,0
};
var d := &c as [uint8];
print("include \"cowgol.coh\";\n");
print("var i: uint8 := 0;\n");
print("var c: uint8[] := {\n");
loop
print_i8([d]);
if [d]==0 then break; end if;
d := @next d;
print_char(',');
i := i + 1;
if i==20 then
print_nl();
i := 0;
end if;
end loop;
print("\n};\n");
print(&c as [uint8]);

View file

@ -0,0 +1 @@
".tap{|s|print s.inspect,s}".tap{|s|print s.inspect,s}

3
Task/Quine/D/quine.d Normal file
View file

@ -0,0 +1,3 @@
const auto s=`const auto q="const auto s=\x60"~s~"\x60;
mixin(s);";import std.stdio;void main(){writefln(q);pragma(msg,q);}`;
mixin(s);

1
Task/Quine/Dao/quine.dao Normal file
View file

@ -0,0 +1 @@
syntax{Q $EXP}as{io.writef('syntax{Q $EXP}as{%s}Q %s',\'$EXP\',\'$EXP\')}Q io.writef('syntax{Q $EXP}as{%s}Q %s',\'$EXP\',\'$EXP\')

View file

@ -0,0 +1 @@
main()=>(s){print('$s(r\x22$s\x22);');}(r"main()=>(s){print('$s(r\x22$s\x22);');}");

1
Task/Quine/Dc/quine.dc Normal file
View file

@ -0,0 +1 @@
[91PP93P[dx]P]dx

View file

@ -0,0 +1,42 @@
*char q=
"proc main() void:\r\n"
" [128]char l;\r\n"
" char ch;\r\n"
" channel input text qc, lc;\r\n"
" open(qc, q);\r\n"
" writeln(\"*char q=\");\r\n"
" while readln(qc; &l[0]) do\r\n"
" write('\"');\r\n"
" open(lc, &l[0]);\r\n"
" while read(lc; ch) do\r\n"
" if ch='\"' or ch='\\\\' then write('\\\\') fi;\r\n"
" write(ch)\r\n"
" od;\r\n"
" close(lc);\r\n"
" writeln(\"\\\\r\\\\n\\\"\")\r\n"
" od;\r\n"
" close(qc);\r\n"
" writeln(';');\r\n"
" writeln(q)\r\n"
"corp\r\n"
;
proc main() void:
[128]char l;
char ch;
channel input text qc, lc;
open(qc, q);
writeln("*char q=");
while readln(qc; &l[0]) do
write('"');
open(lc, &l[0]);
while read(lc; ch) do
if ch='"' or ch='\\' then write('\\') fi;
write(ch)
od;
close(lc);
writeln("\\r\\n\"")
od;
close(qc);
writeln(';');
writeln(q)
corp

1
Task/Quine/E/quine.e Normal file
View file

@ -0,0 +1 @@
" =~ x; println(E.toQuote(x),x)" =~ x; println(E.toQuote(x),x)

View file

@ -0,0 +1,36 @@
PROGRAM QUINE
BEGIN
READ(D$,Y$)
LOOP
READ(X$)
EXIT IF LEN(X$)<1
PRINT(X$)
END LOOP
RESTORE
LOOP
READ(X$)
EXIT IF LEN(X$)<1
PRINT(D$;CHR$(34);X$;CHR$(34);CHR$(41))
END LOOP
PRINT(D$;CHR$(34);CHR$(34);CHR$(41))
PRINT(Y$)
DATA("DATA(")
DATA("END PROGRAM")
DATA("PROGRAM QUINE")
DATA("BEGIN")
DATA("READ(D$,Y$)")
DATA("LOOP")
DATA(" READ(X$)")
DATA(" EXIT IF LEN(X$)<1")
DATA(" PRINT(X$)")
DATA("END LOOP")
DATA("RESTORE")
DATA("LOOP")
DATA(" READ(X$)")
DATA(" EXIT IF LEN(X$)<1")
DATA(" PRINT(D$;CHR$(34);X$;CHR$(34);CHR$(41))")
DATA("END LOOP")
DATA("PRINT(D$;CHR$(34);CHR$(34);CHR$(41))")
DATA("PRINT(Y$)")
DATA("")
END PROGRAM

View file

@ -0,0 +1,2 @@
S$ = "print strchar 83 & strchar 36 & strchar 32 & strchar 61 & strchar 32 & strchar 34 & S$ & strchar 34 & strchar 10 & S$"
print strchar 83 & strchar 36 & strchar 32 & strchar 61 & strchar 32 & strchar 34 & S$ & strchar 34 & strchar 10 & S$

View file

@ -0,0 +1,6 @@
module test {
@Inject Console console;
void run() {
console.print($./test.x);
}
}

View file

@ -0,0 +1,2 @@
a = <<"a = ~p~n:io.fwrite(a,[a])~n">>
:io.fwrite(a,[a])

View file

@ -0,0 +1,6 @@
-module(quine).
-export([do/0]).
do() -> Txt=txt(), io:format("~s~ntxt() ->~n~w.~n",[Txt,Txt]), halt().
txt() ->
[45,109,111,100,117,108,101,40,113,117,105,110,101,41,46,10,45,101,120,112,111,114,116,40,91,100,111,47,48,93,41,46,10,10,100,111,40,41,32,45,62,32,84,120,116,61,116,120,116,40,41,44,32,105,111,58,102,111,114,109,97,116,40,34,126,115,126,110,116,120,116,40,41,32,45,62,126,110,126,119,46,126,110,34,44,91,84,120,116,44,84,120,116,93,41,44,32,104,97,108,116,40,41,46].

View file

@ -0,0 +1 @@
constant p="constant p=%s%s%s printf(1,p,{34,p,34})" printf(1,p,{34,p,34})

View file

@ -0,0 +1 @@
let s = "let s = {0}{1}{0} in System.Console.WriteLine(s, char 34, s);;" in System.Console.WriteLine(s, char 34, s);;

View file

@ -0,0 +1 @@
(fun s c -> printf s c s.Value c) "(fun s c -> printf s c s.Value c) %c%s%c <| char 34;;" <| char 34;;

View file

@ -0,0 +1 @@
["'[,34,$!34,'],!"]'[,34,$!34,'],!

View file

@ -0,0 +1 @@
"%s [ 34 1string dup surround ] keep printf" [ 34 1string dup surround ] keep printf

View file

@ -0,0 +1 @@
"[ pprint ] [ write ] bi"[ pprint ] [ write ] bi

View file

@ -0,0 +1,3 @@
00000000000000000000++++++++++++++++++ v
2[$:{:@]$g:0=?v >o:4a*=?!v~1+:3=?;0ao>
>~" "^ >1+ ^

View file

@ -0,0 +1 @@
SOURCE TYPE

View file

@ -0,0 +1 @@
character*46::s='("character*46::s=",3a,";print s,39,s,39;end")';print s,39,s,39;end

View file

@ -0,0 +1,8 @@
WRITE(6,100)
STOP
100 FORMAT(6X,12HWRITE(6,100)/6X,4HSTOP/
.42H 100 FORMAT(6X,12HWRITE(6,100)/6X,4HSTOP/ ,2(/5X,67H.
.42H 100 FORMAT(6X,12HWRITE(6,100)/6X,4HSTOP/ ,2(/5X,67H.
.)/T48,2H)/T1,5X2(21H.)/T48,2H)/T1,5X2(21H)/
.T62,10H)/6X3HEND)T1,5X2(28H.T62,10H)/6X3HEND)T1,5X2(28H)/6X3HEND)
END

View file

@ -0,0 +1 @@
const s=';begin writeln(#99#111#110#115#116#32#115#61#39,s,#39,s);readln;end.';begin writeln(#99#111#110#115#116#32#115#61#39,s,#39,s);readln;end.

View file

@ -0,0 +1,2 @@
#Define P(X) Print X: Print "P(" & #X & ")"
P("#Define P(X) Print X: Print ""P("" & #X & "")""")

View file

@ -0,0 +1 @@
Dim As String s = "Dim As String s = : Print Left(s, 18) + Chr(34) + s + Chr(34) + Mid(s, 18)" : Print Left(s, 18) + Chr(34) + s + Chr(34) + Mid(s, 18)

View file

@ -0,0 +1,2 @@
d="633d636861725b33345d3b653d643b7072696e745b22643d2463246424635c6e222b28653d7e25732f285b612d7a302d395d7b327d292f636861725b7061727365496e745b24312c31365d5d2f6567295d"
c=char[34];e=d;print["d=$c$d$c\n"+(e=~%s/([a-z0-9]{2})/char[parseInt[$1,16]]/eg)]

View file

@ -0,0 +1 @@
1

View file

@ -0,0 +1,2 @@
"#s sto selfstring QUOTE @selfstring dup print QUOTE NL printnl end { „selfstring” }"
#s sto selfstring QUOTE @selfstring dup print QUOTE NL printnl end { „selfstring” }

Some files were not shown because too many files have changed in this diff Show more