Code: Select all
for i in this
->print this.i
->i++
->if i > 53,
-> -> stop
-> is one character, essentially TAB.
Rules of this mooseudocode: (portmanteau of moose and pseudocode of course):
this = the whole program
-> = functionally identical to TAB in most programming languages
stop = halt the loop you're in
print = print, duh.
mooseudocode was something I came up with to make quines really easy to make.
Code: Select all
def another quine thing
-> print this
Theorem: one can define a rayo-esque number as follows:
Code: Select all
the smallest number you cannot define using n symbols of mooseudocode, for n = a googol or whatever you please, without using any randomness.
Obviously I haven't defined mooseudocode well enough for one to even produce an estimate on such a number, but I'm pretty sure it would be finite.
Basic mooseudocode command set:
Code: Select all
for -- create a for loop
this -- the whole program
this.n -- the nth character of the program
x+y -- return x+y
x++ -- increment variable x
x-y -- return x-y
x*y -- return x*y
x^y -- return x^y
x^{y}z -- return x^^^^z with y arrows (Knuth uparrow notation)
-> -- essentially a tab. 1 character.
while -- create a while loop
def -- define a function
newvar x -- create a new variable called x
x = y -- define x as y
A AND B -- if A and B are both true, return true-- else false
NOT A -- if A is true, return false, else true
A OR B -- RETURN false if a and b are both false, else return true
(xyz) -- do this stuff first, then worry about stuff outside
A XOR B -- return true if A has a different value than B, else false.
if x -- if the conditions x is true, do this
else -- if the conditions x are not true in the if, so this.
print x -- resolve x, then print the result. For instance, print this prints print this; this makes it a quine. Only works if you can resolve x-- to write a string you'd use the below method.
print 'x' -- print x without resolving it. 'x' Is a string
print a & b -- resolve print a then resolve print b
x =? y -- return true if x = y, and false otherwise
newset X -- create a set called X
n of X -- the nth entry of the set or array X
newent X -- append a new entry to X. Default value for new entries is 0.
new-n-ent X -- append n new entries to X.
setent n of X x -- set the nth entry of X to x.
delent n of X -- delete the nth entry of X
movent n of X m -- move the nth entry of X to just before the mth entry of X
swapent n m of X -- swap the nth entry of X with the mth entry of X
backent n of X -- move the nth entry of X to behind the last entry.
delvar x -- delete the variable x.
delset X -- delete the set X
newarray X -- create an array and call it X
newentarray X -- append a new entry to X
delentarray n of X -- remove the nth entry of X
setentarray n of X x -- set the nth entry of X to x
break s n X -- create a break in s-space after the nth entry in X.
until x -- while NOT x
x > y -- returns true if x>y, and false otherwise
x < y -- returns true if x<y, and false otherwise
stop -- prematurely end this loop
STOP -- prematurely end this program
# -- comment
call x -- like import in python, this lets you import the code x.
call x as y -- optionally, you can also give x a shorter “nickname”, y.
Come up with a big number using mooseudocode!