Skip to content

Commit

Permalink
unlicense
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Jul 9, 2011
1 parent 38250af commit b1b5302
Show file tree
Hide file tree
Showing 64 changed files with 339 additions and 328 deletions.
6 changes: 3 additions & 3 deletions !=.txt
@@ -1,4 +1,4 @@
^(.*);\1$::=0
.*;.*::=1
::=
^(.*);\1$::=0
.*;.*::=1
::=
@@
4 changes: 2 additions & 2 deletions ++.2.txt
@@ -1,3 +1,3 @@
0\+\+::=1
1\+\+::=++0
0\+\+::=1
1\+\+::=++0
\+\+0::=10
20 changes: 10 additions & 10 deletions ++.txt
@@ -1,11 +1,11 @@
0\+\+::=1
1\+\+::=2
2\+\+::=3
3\+\+::=4
4\+\+::=5
5\+\+::=6
6\+\+::=7
7\+\+::=8
8\+\+::=9
9\+\+::=++0
0\+\+::=1
1\+\+::=2
2\+\+::=3
3\+\+::=4
4\+\+::=5
5\+\+::=6
6\+\+::=7
7\+\+::=8
8\+\+::=9
9\+\+::=++0
\+\+0::=10
10 changes: 5 additions & 5 deletions +.10.txt
@@ -1,6 +1,6 @@
import ++
import --
(\d+) 0::=\1
(\d+) (\d+)::=\1++ \2--
::=
import ++
import --
(\d+) 0::=\1
(\d+) (\d+)::=\1++ \2--
::=
@@
4 changes: 2 additions & 2 deletions +.2.txt
@@ -1,3 +1,3 @@
(.*);(.*)::=:len.2{:bin2une{\1}:bin2une{\2}}
::=
(.*);(.*)::=:len.2{:bin2une{\1}:bin2une{\2}}
::=
@@
4 changes: 2 additions & 2 deletions +1.2.txt
@@ -1,3 +1,3 @@
import ++.2
::=
import ++.2
::=
@@++
4 changes: 2 additions & 2 deletions +1.txt
@@ -1,3 +1,3 @@
import ++
::=
import ++
::=
@@++
4 changes: 2 additions & 2 deletions --.2.txt
@@ -1,3 +1,3 @@
0--::=--1
[^01]1--::=\1
0--::=--1
[^01]1--::=\1
1--::=0
20 changes: 10 additions & 10 deletions --.txt
@@ -1,11 +1,11 @@
0--::=--9
(\D)1--::=\1
1--::=0
2--::=1
3--::=2
4--::=3
5--::=4
6--::=5
7--::=6
8--::=7
0--::=--9
(\D)1--::=\1
1--::=0
2--::=1
3--::=2
4--::=3
5--::=4
6--::=5
7--::=6
8--::=7
9--::=8
4 changes: 2 additions & 2 deletions -1.1.txt
@@ -1,3 +1,3 @@
^;,::=
::=
^;,::=
::=
;@@
6 changes: 3 additions & 3 deletions -1.2.txt
@@ -1,4 +1,4 @@
import --.2
;([01]+)::=\1--
::=
import --.2
;([01]+)::=\1--
::=
;@@
6 changes: 3 additions & 3 deletions -1.txt
@@ -1,4 +1,4 @@
import --
!(\d+)::=\1--
::=
import --
!(\d+)::=\1--
::=
!@@
6 changes: 3 additions & 3 deletions 2loop.1.txt
@@ -1,4 +1,4 @@
^(,*), (.*)::=\1 \2\2
^ ::=
::=
^(,*), (.*)::=\1 \2\2
^ ::=
::=
@@
6 changes: 3 additions & 3 deletions ==.txt
@@ -1,4 +1,4 @@
^(.*);\1$::=1
.*;.*::=0
::=
^(.*);\1$::=1
.*;.*::=0
::=
@@
123 changes: 62 additions & 61 deletions Rue.py 100644 → 100755
@@ -1,61 +1,62 @@
from re import compile as re
from sys import argv
from random import choice,seed;seed();del seed
from itertools import izip as zip
k=re(r"^::=.+",8).sub
G={}
try:
input=raw_input
range=xrange
except:pass
def Rue(f,A="",s=0):
if f in G:f=G[f]
else:
c=f
f=k("",open(f+".txt").read())
if f.startswith("import "):
a=f.find("\n",8)
f=open(f[7:a]+".txt").read()+f[a:]
a=f.find("\nimport ")+1
while a:
b=f.find("\n",a+8)
f=f[:a]+open(f[a+7:b]+".txt").read()+f[b:]
a=f.find("\nimport ",a)+1
f=f.split("\n::=\n")
G[c]=f
c=""#::="
R=[]
for lf,C in zip(range(len(f)-1,-1,-1),f):
R+=([re(R[0],16).sub,R[1] if len(R) is 2 else "" if len(R) is 1 else R[1:],len(R) is 1] for R in (R.split("::=") for R in c.split("\n") if R))
while 1:
while 1:
c=C=C.replace("@@",A)
for p0,p1,p2 in R:
C=p0(choice(p1) if p2 else p1,C,1)
if c is not C:break
else:break
if D:print(" "*s+C)
if lf:break
a=C.find("}")
if a is -1:break
while 1:
b=C.rfind("{",0,a)
c=C.rfind(":",0,b)
f=C[c+1:b]
b=C[b+1:a]
C=C[:c]+(Smod[f](b) if f in Smod else Rue(f,b,s+1))+C[a+1:]
a=C.find("}",c)
if a is -1:break
return C
def Smod(x):
print x
return ""
Smod={"print":Smod,"input":input,"argv":dict(((str(a),b) for a,b in enumerate(argv[2:]))).__getitem__}
argv="_" if len(argv) is 1 else argv[1]
D=open(argv+".txt").read(9)=="::=debug\n"
#"""
if D:print(Rue(argv))
else:Rue(argv)
"""
from cProfile import run;D=0;run("Rue(argv)")
"""#"""
#!/usr/bin/python
from re import compile as re
from sys import argv
from random import choice,seed;seed();del seed
k=re(r"^::=.+",8).sub
G={}
try:
input=raw_input
range=xrange
from itertools import izip as zip
except:pass
def Rue(f,A="",s=0):
if f in G:f=G[f]
else:
c=f
f=k("",open(f+".txt").read())
if f.startswith("import "):
a=f.find("\n",8)
f=open(f[7:a]+".txt").read()+f[a:]
a=f.find("\nimport ")+1
while a:
b=f.find("\n",a+8)
f=f[:a]+open(f[a+7:b]+".txt").read()+f[b:]
a=f.find("\nimport ",a)+1
f=f.split("\n::=\n")
G[c]=f
c=""
R=[]
for lf,C in zip(range(len(f)-1,-1,-1),f):
R+=((re(R[0],16).sub,R[1] if len(R) is 2 else R[1:] or "",len(R) is 1) for R in (R.split("::=") for R in c.split("\n") if R))
while 1:
while 1:
c=C=C.replace("@@",A)
for p0,p1,p2 in R:
C=p0(choice(p1) if p2 else p1,C,1)
if c is not C:break
else:break
if D:print(" "*s+C)
if lf:break
a=C.find("}")
if a is -1:break
while 1:
b=C.rfind("{",0,a)
c=C.rfind(":",0,b)
f=C[c+1:b]
b=C[b+1:a]
C=C[:c]+(Smod[f](b) if f in Smod else Rue(f,b,s+1))+C[a+1:]
a=C.find("}",c)
if a is -1:break
return C
def Smod(x):
print(x)
return ""
Smod={"print":Smod,"input":input,"argv":dict(((str(a),b) for a,b in enumerate(argv[2:]))).__getitem__}
argv="_" if len(argv) is 1 else argv[1]
D=open(argv+".txt").read(9)=="::=debug\n"
#"""
if D:print(Rue(argv))
else:Rue(argv)
"""
from cProfile import run;D=0;run("Rue(argv)")
"""#"""
24 changes: 24 additions & 0 deletions UNLICENSE
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
10 changes: 5 additions & 5 deletions _.txt
@@ -1,6 +1,6 @@
::=debug
::=Generally you don't want to have an infinity pump, so this is a comment
::=:print{:len{:fib{:len{:input{:reverse{>>srahcenin yrt}}}}}}
:fib{16}
:ewfib{16}
::=::=debug
::=Generally you don't want to have an infinity pump, so this is a comment
::=:print{:len{:fib{:len{:input{:reverse{>>srahcenin yrt}}}}}}
:fib{16}
:ewfib{16}
:fib.1{,,,,,,,,,,,,,,,,}
8 changes: 4 additions & 4 deletions acker.1.txt
@@ -1,5 +1,5 @@
(,*)::=\1,
(,*), ::=:acker.1{\1 ,}
(,*), (,*),::=:acker.1{\1 :acker.1{\1, \2}}
::=
(,*)::=\1,
(,*), ::=:acker.1{\1 ,}
(,*), (,*),::=:acker.1{\1 :acker.1{\1, \2}}
::=
@@
4 changes: 2 additions & 2 deletions argw.txt
@@ -1,3 +1,3 @@
import ArgV
::=
import ArgV
::=
ArgV@@
16 changes: 8 additions & 8 deletions asdf.txt
@@ -1,9 +1,9 @@
?::=1::=2::=3::=4::=5::=6
.*,,,,,,,,,,$::=
(.)(.)(.)(.);(.{3})\4;::=\1\2\3\4;\5;:
(.)(.)(.)(.);(.{2})\3(.);::=\1\2\3\4;\5;:
(.)(.)(.)(.);(.{1})\2(.{2});::=\1\2\3\4;\5;:
(.)(.)(.)(.);\1(.{3});::=\1\2\3\4;\5;:
(.)(.)(.)(.);(.*)\1(.*)::=
::=
?::=1::=2::=3::=4::=5::=6
.*,,,,,,,,,,$::=
(.)(.)(.)(.);(.{3})\4;::=\1\2\3\4;\5;:
(.)(.)(.)(.);(.{2})\3(.);::=\1\2\3\4;\5;:
(.)(.)(.)(.);(.{1})\2(.{2});::=\1\2\3\4;\5;:
(.)(.)(.)(.);\1(.{3});::=\1\2\3\4;\5;:
(.)(.)(.)(.);(.*)\1(.*)::=
::=
:input{>>};????
42 changes: 21 additions & 21 deletions bin2hex.txt
@@ -1,22 +1,22 @@
(?<=[01]{4})([01])::=;\2
;0000::=0
;0001::=1
;0010::=2
;0011::=3
;0100::=4
;0101::=5
;0110::=6
;0111::=7
;1000::=8
;1001::=9
;1010::=A
;1011::=B
;1100::=C
;1101::=D
;1110::=E
;1111::=F
^;([01]{3})::=0\1
^;([01]{2})::=00\1
^;([01])::=000\1
::=
(?<=[01]{4})([01])::=;\2
;0000::=0
;0001::=1
;0010::=2
;0011::=3
;0100::=4
;0101::=5
;0110::=6
;0111::=7
;1000::=8
;1001::=9
;1010::=A
;1011::=B
;1100::=C
;1101::=D
;1110::=E
;1111::=F
^;([01]{3})::=0\1
^;([01]{2})::=00\1
^;([01])::=000\1
::=
;@@

0 comments on commit b1b5302

Please sign in to comment.