September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

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,12 @@
10 LET L$="10"
20 LET I=VAL "16512"
30 PRINT TAB (VAL "4"-LEN L$);L$;
40 LET I=I+VAL "1"
50 LET C=PEEK I
60 IF C=VAL "118" THEN GOTO VAL "90"
70 PRINT CHR$ C;
80 GOTO VAL "40"
90 PRINT
100 LET L$=STR$ (VAL L$+VAL "10")
110 LET I=I+VAL "4"
120 IF VAL L$<=VAL "120" THEN GOTO VAL "30"

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

@ -1,2 +0,0 @@
(quine=
.lst$quine);

View file

@ -1 +0,0 @@
quine$

View file

@ -1,39 +1,3 @@
#include <iostream>
void quote(char const* c)
{
while (*c)
{
switch(*c)
{
case '\\':
std::cout << "\\\\";break;
case '\n':
std::cout << "\\n";break;
case '\"':
std::cout << "\\\"";break;
default:
std::cout << *c;
}
++c;
}
}
int main()
{
char const* parts[] = {
"#include <iostream>\n\nvoid quote(char const* c)\n{\n while (*c)\n {\n switch(*c)\n {\n case '\\\\':\n std::cout << \"\\\\\\\\\";break;\n case '\\n':\n std::cout << \"\\\\n\";break;\n case '\\\"':\n std::cout << \"\\\\\\\"\";break;\n default:\n std::cout << *c;\n }\n ++c;\n }\n}\n\nint main()\n{\n char const* parts[] = {\n \"",
"\",\n \"",
"\"\n };\n \n std::cout << parts[0];\n quote(parts[0]);\n std::cout << parts[1];\n quote(parts[1]);\n std::cout << parts[1];\n quote(parts[2]);\n std::cout << parts[2];\n\n return 0;\n}\n"
};
std::cout << parts[0];
quote(parts[0]);
std::cout << parts[1];
quote(parts[1]);
std::cout << parts[1];
quote(parts[2]);
std::cout << parts[2];
return 0;
}
#include<cstdio>
int main(){char n[]=R"(#include<cstdio>
int main(){char n[]=R"(%s%c";printf(n,n,41);})";printf(n,n,41);}

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

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

View file

@ -0,0 +1,14 @@
// version 1.1.2
const val F = """// version 1.1.2
const val F = %c%c%c%s%c%c%c
fun main(args: Array<String>) {
System.out.printf(F, 34, 34, 34, F, 34, 34, 34)
}
"""
fun main(args: Array<String>) {
System.out.printf(F, 34, 34, 34, F, 34, 34, 34)
}

View file

@ -1,3 +1,3 @@
define(`quine',``$1(`$1')'')
quine(`define(`quine',``$1(`$1')'')
define(`quine',``$1(`$1')'')dnl
quine(`define(`quine',``$1(`$1')'')dnl
quine')

View file

@ -0,0 +1 @@
class Program { function : Main(args : String[]) ~ Nil { s := "class Program { function : Main(args : String[]) ~ Nil { s :=; IO.Console->Print(s->SubString(61))->Print(34->As(Char))->Print(s)->Print(34->As(Char))->PrintLine(s->SubString(61, 129)); } }"; IO.Console->Print(s->SubString(61))->Print(34->As(Char))->Print(s)->Print(34->As(Char))->PrintLine(s->SubString(61, 129)); } }

1
Task/Quine/Ol/quine.ol Normal file
View file

@ -0,0 +1 @@
((lambda (s) (display (list s (list (quote quote) s)))) (quote (lambda (s) (display (list s (list (quote quote) s))))))

View file

@ -0,0 +1 @@
say sourceline(1)

View file

@ -0,0 +1 @@
r="say'r='x2c(22)r||22~x2c';interpret r'";interpret r

View file

@ -0,0 +1 @@
r=";say'r=.'r'.'r~changestr(.,'22'x,2)";say'r="'r'"'r~changestr(.,'22'x,2)

View file

@ -0,0 +1 @@
r=";say'r=<3D>'r'<27>'r~bitor(,' ')";say'r="'r'"'r~bitor(,' ')

View file

@ -0,0 +1,20 @@
program main(output);type string=packed array[1..60]of char;
var l:array[1..9]of string; c:array[1..7]of char; i:integer;
lc, a, o, k, n, e, s, t:char; begin
l[1]:='program main(output);type string=packed array[1..60]of char;';
l[2]:='var l:array[1..9]of string; c:array[1..7]of char; i:integer;';
l[3]:='lc, a, o, k, n, e, s, t:char; begin ';
l[4]:='for i := 1 to 3 do writeln(l[i]); ';
l[5]:='a:=c[1];t:=c[2];o:=c[3];k:=c[4];n:=c[5];e:=c[6];s:=c[7]; ';
l[6]:='for i := 1 to 9 do writeln(a,o,i:1,k,n,e,lc,l[i],lc,s); ';
l[7]:='writeln(a, t, n, e, lc, lc, lc, lc, s); ';
l[8]:='for i := 1 to 7 do write(t,o,i:1,k,n,e,lc,c[i],lc,s); ';
l[9]:='writeln; for i := 4 to 9 do writeln(l[i]); end. ';
lc:='''';
c[1]:='l';c[2]:='c';c[3]:='[';c[4]:=']';c[5]:=':';c[6]:='=';c[7]:=';';
for i := 1 to 3 do writeln(l[i]);
a:=c[1];t:=c[2];o:=c[3];k:=c[4];n:=c[5];e:=c[6];s:=c[7];
for i := 1 to 9 do writeln(a,o,i:1,k,n,e,lc,l[i],lc,s);
writeln(a, t, n, e, lc, lc, lc, lc, s);
for i := 1 to 7 do write(t,o,i:1,k,n,e,lc,c[i],lc,s);
writeln; for i := 4 to 9 do writeln(l[i]); end.

View file

@ -1,2 +1 @@
(function(){x<-intToUtf8(34);s<-"(functio = 3 TO DATACOUNT - 1"
DATA " PRINT #1, s(nn(){x<-intToUtf8(34);s<-%s%s%s;cat(sprintf(s,x,s,x))})()";cat(sprintf(s,x,s,x))})()
(function(){x<-intToUtf8(34);s<-"(function(){x<-intToUtf8(34);s<-%s%s%s;cat(sprintf(s,x,s,x))})()";cat(sprintf(s,x,s,x))})()

View file

@ -0,0 +1 @@
p open(__FILE__).read

View file

@ -0,0 +1 @@
.global _start;_start:mov $p,%rsi;mov $1,%rax;mov $1,%rdi;mov $255,%rdx;syscall;mov $q,%rsi;mov $1,%rax;mov $1,%rdx;syscall;mov $p,%rsi;mov $1,%rax;mov $255,%rdx;syscall;mov $q,%rsi;mov $1,%rax;mov $1,%rdx;syscall;mov $60,%rax;syscall;q:.byte 34;p:.ascii ".global _start;_start:mov $p,%rsi;mov $1,%rax;mov $1,%rdi;mov $255,%rdx;syscall;mov $q,%rsi;mov $1,%rax;mov $1,%rdx;syscall;mov $p,%rsi;mov $1,%rax;mov $255,%rdx;syscall;mov $q,%rsi;mov $1,%rax;mov $1,%rdx;syscall;mov $60,%rax;syscall;q:.byte 34;p:.ascii "

View file

@ -0,0 +1 @@
.global _start;_start:mov $p,%ecx;mov $4,%eax;mov $1,%ebx;mov $264,%edx;int $0x80;mov $q,%ecx;mov $4,%eax;mov $1,%edx;int $0x80;mov $p,%ecx;mov $4,%eax;mov $264,%edx;int $0x80;mov $q,%ecx;mov $4,%eax;mov $1,%edx;int $0x80;mov $1,%eax;int $0x80;q:.byte 34;p:.ascii ".global _start;_start:mov $p,%ecx;mov $4,%eax;mov $1,%ebx;mov $264,%edx;int $0x80;mov $q,%ecx;mov $4,%eax;mov $1,%edx;int $0x80;mov $p,%ecx;mov $4,%eax;mov $264,%edx;int $0x80;mov $q,%ecx;mov $4,%eax;mov $1,%edx;int $0x80;mov $1,%eax;int $0x80;q:.byte 34;p:.ascii "

View file

@ -0,0 +1 @@
python -c "from pprint import pprint;prog=open('quine.sx', 'r').read().split(';',24);pprint(prog)" | tr "[]" " " | perl -pe "s/( '|'(,| ))//g"

View file

@ -0,0 +1,2 @@
zkl: 123
123

View file

@ -0,0 +1 @@
s:="s:=%c%s%c;print(s.fmt(34,s,34));";print(s.fmt(34,s,34));

View file

@ -0,0 +1 @@
a:="a:=;q:=(34).toChar();print(a[0,3]+q+a+q+a[3,*]);";q:=(34).toChar();print(a[0,3]+q+a+q+a[3,*]);

View file

@ -0,0 +1 @@
reg c=0'|"|,s="reg c=0'|%c|,s=%c%s%c;s.fmt(c,c,s,c).print();";s.fmt(c,c,s,c).print();

View file

@ -0,0 +1 @@
File(__FILE__).readln().print()

View file

@ -0,0 +1,4 @@
fcn testQuine(quine){
Compiler.Compiler.compileText(quine).__constructor(); out:=vm.regX;
println("\ndiff>>",quine-out,"<<");
}