We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Simpl

From Esolang
Jump to navigation Jump to search

Simpl is a Python-based esoteric programming language created by User:Cordership in 2026.

Simpl
Designed by User:Cordership
Appeared in 2026
Computational class Turing-complete
Reference implementation Unimplemented

Syntax

Operation/command Meaning
+ Adds two numbers
- Subtracts two numbers
* Multiplies two numbers
/ Divides two numbers
^ Exponentiation
= Equal to, assignment
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
! Factorial (if right after a variable) or exclamation mark (in printed text)
sqrt() Sqrt of a number
mod(a, b) The remainder of integer division a/b.
sin() Sine of a number
cos() Cosine of a number
tan() Tan of a number
asin() Arcsin of a number
acos() Arccos of a number
atan() Arctan of a number
hyp(a, n, b) Succession if n = 0, a + b if n = 1, a * b if n = 2, a ^ b if n = 3, a tetrated to b if n = 4, so on...
log(a, b) Outputs a number n where a ^ n = b
print("") Prints text
print() Prints a number or a variable with float/integer value
def f(x) : [blah blah blah] Sets f(x) to [blah blah blah].
assign var a = [blah blah blah] Sets variable a to [blah blah blah]
print (A) n times Prints a chain of n As. The "A" can be altered to be any text.
print (n)(cars) Prints the given text, but if n is a variable, replace n with its value. The "cars" text can be changed into any text. Note that the resulting printed text has a space if one input has a space in it, whereas two spaces (either the first input has 1 space at the end, the second input has 1 space at the beginning or one of the inputs have 2 consecutive spaces) cause the output to have 2 consecutive spaces.
[new line] Makes a new line in a “print” command.
end program Ends the program.
assign var a = usrinp() Sets variable a as the user input.
check if [desired condition] yes: no: If desired condition is met, the code continues in the yes section. Otherwise continue code in the no section.
check if [desired condition]: If the desired condition is met, continue the code in this command. Otherwise, skip it.
and Continue the code in this command if all of the if statements chained by this are true.
or Continue the code in this command if at least one of the statements chained by this are true.
not Continue the code in this command if the negation of the if statement is true.
add (n) to list ([list name]) Appends an element to the end of a list.
remove (n) from list ([list name]) Removes all instances of an element from a list.
print list ([list name]) Prints list [list name].
loop n: Loops n times.
loop until [desired condition]: Loops until desired condition is met.
pass Does absolutely nothing.
list add ([list name]) Sum of all the elements in list [list name], if all of them are numbers.
set add ({set name}) Sum of all the elements in set [set name], if all of them are numbers.
list multiply ([list name]) Product of all the elements in list [list name], if all of them are numbers.
set multiply ({set name}) product of all the elements in set [set name], if all of them are numbers.
assign numbase (n) Sets the number system to base n.
set union ({2, 3, 4}, {1, 3, 5}) Unifies the sets, numbers in both of the original sets only appear once in the new list. In this case, the output is {1, 2, 3, 4, 5}.
set intersect ({1, 2, 4}, {2, 4, 5}) Outputs the sets' intersection. In this case, the output is {2, 4}.
set xor ({3, 4, 5, 7}, {2, 3, 4}) Outputs the XOR of the input sets. In this case, the output is {2, 5, 7}.
element (n) of ([listname]) Nth element of list [listname].
add (a) to list ([listname]) (n) times Adds n elements to the end of the list, where all of them are of the variable "a". The variable can be changed to be any variable.
rand integer (a) to (b) Picks random integer in range from a to b.
rand integer between (a) (b) Picks random integer between a and b.
assign list ([listname]) = [blah blah blah] Sets the list [listname] to [blah blah blah].
assign set ({setname}) = {blah blah blah} Sets the set {setname} to {blah blah blah}.
change pointer (n) Moves pointer left or right by n cells (if n < 0, then left, if n > 0, then right, if n = 0, then it stays still)
assign var memcell pointer = n Assigns the ASCII number of the character in the memorycell at the pointer to n.
assign var memcell pointer = memcell pointer + n Checks the value of the ASCII character in the memorycell of the pointer then adds n to it.
carry memcell pointer to s(b) Carries the ASCII character in the memory cell at the pointer to replace the ASCII character in the memory cell of s(b), dragging the pointer along.
print (memcell pointer) Prints the ASCII character in the memory cell at the pointer.
[smooth] Connects two printed texts "smoothly", that is, without gaps.
f(x, y) Function with two inputs. Functions can be made with any number of inputs.
while 1: Repeat forever.
while 0: Avoids loop completely.
memcell pointer Variable, is the value of the ASCII character in the memory cell at the pointer.
while [desired condition] Loops while condition is true.
=/= Not equal to
change (n) to int Changes the value of a float/string variable n to an integer variable.
change (n) to float Changes the value of a integer/string variable n to a float variable.
change (n) to str Changes the value of a integer/float variable n to a string variable.
log(a, b) Logarithmic function.
const.e The constant e, rounded to 100 decimal digits.
const.pi The constant pi, rounded to 100 decimal digits.
round (x) to (n) Rounds x to the nearest multiple of n. If x = k * n + n / 2, then output is n * (k + 1), where k is either an integer float or an integer.
class Class() Creates a class.
loop all x in ([listname]): Loops through all the elements in a list.
loop all x in (""): Loops through all the elements in a string.
element (n) of (""): Nth character of a string.
length() Returns length of a string, list, or set.
/blah blah blah Comment.
check if (x) in ([listname]): Checks if the variable or string "x” is already in a list.
check if str ("string1") in ("string2"): Checks if the first string is already in the second string.
for all str ("string1") in str ("string2"): For every instance of the first string in the second string.
for all (n) in list ([listname]): For every instance of an element in a list.
match element: if obj1: if obj2:... Equivalent to many if statements using equals.
run(code) Takes 2 user inputs: first one is treated as Simpl code, the other one is the user input for that code (optional). A comma separates both of them, and the output s the output of the code.
:= Walrus operator.

Note: If a variable is added into a list, the list receives the value of that variable.

Note 2: Between two print commands is a new line character.

Note 3: The ASCII character in a memory cell equals its corresponding value.

Note 4: ("") is string/text, () is float or integer.

Note 5: Variables can either be strings or integers or floats.

Note 6: Simpl is 1-indexed.

Note 7: Simpl doesn't support imaginary and complex numbers.

Note 8: The user input is always treated as a string.

OOP

Create class with property:

class MyClass:
    prop x = 2

Create class and use it to make object:

class MyClass:
    prop n = 4
p1 = MyClass(self.n)
print (p1.n)

Delete object:

class MyClass:
    prop k = 10
n = MyClass(self.k)
del (n)

You can create multiple objects:

class MyClass:
    prop n = 4
    prop p = 6
p1 = MyClass(self.n)
p2 = MyClass(self.p)
print (p1.n)
print (p2.n)

init method:

class Car:
    initclass(self, brand, name)
        prop self.brand = brand
        prop self.name = name
Car1 = Car("Bugatti", "Chiron")
print (Car.brand)
print (Car.name)

Change a property:

===class Cat:===
    initclassclass(self, breed)
        prop self.breed = breed
cat1 = Cat("Munchkin")
cat1.breed = "Maine Coon"
print(cat1.breed)

Inheritance and polymorphism:

class Esolang:
    initclass(self, creator)
        prop self.creator = creator
    def cat(self):
        print("") /The method from the parent.
class Brainfuck(child.Esolang):
    def cat(self): /Inherits the Creator property.
        print(",[.,]") /Inherits method.
class Befunge(child.Esolang):
    def cat(self):
        print("~:1+!#@_,")
assign list (Esos) = [] /Make empty list.
bef1 = Befunge("Chris Pressey") /Make a Befunge object.
bf1 = Brainfuck("Urban Muller") /Make a Brainfuck object.
add (bef1) to list (Esos)
add (bf1) to list (Esos)
loop all x in (Esos):
    print(x.creator)
    x.cat()

Finding errors

This programming language has a try-if error-else-final-end method, kind of like T2C.

try: /The code in this may have faults.
    def sound(x):
        print (length(x))
    assign var n = "sound"
    print(sound(n)) /This example will give an error as the definition for the variable n is the same as the function name.
if error: /This code runs if there is an error.
    print ("Something happened! Oops!")
else: /This code runs if there is no error.
    print ("Phew!")
finally: /This code doesn't have errors.
    def brik(x):
        print (length(x))
    assign var n = "sound"
    print(brik(n))
end

You can use redo in try-if error-else-final-end to re-execute the content inside try.

Error Code Meaning
MathError 1 Meaningless mathematical operations, for example, asin(3), sqrt(-1) (imaginary numbers are not supported), and 1/0. Note that the operation (-5)! has a value, -120.
NumError 2 Happens when a variable value or user input is larger than 2^64. Note that Simpl doesn't support BigInts.
DataError 100 When a transfer from one datatype to another that can't be done through any means, like changing a list to a number.
IdentError 101 Happens when the identifier to call isn't found or has an invalid name.
SyntaxError 400 Syntax is incorrect, like using unsupported symbols or leaving a bracket open.
FileNotFound 404 Self-explanatory.
IncorrectVal 405 The value passed in is incorrect.
NameDupError 1000 There is already a file with the same name.
RuntimeError 1001 Self-explanatory.
MemError 1002 All the memory has been exhausted. A looping counter program causes this error.
InternalServError 1003 Internal system error. Please check if Simpl has been installed correctly and if all the environment variables are normal.
FatalError 1004 Fatal error. Please reinstall Simpl now.
LitError 1200 When the input is invalid for a data type change.
NameDupIdentError 1201 When the identifier to call has the same name as another identifier of a different type.

Modules

How to import modules

You can import modules using this:

import module[modulename]

This:

import module[modulename] as alias[aliasname]

Or this:

from module[modulename] import item[itemname] as alias[aliasname]

Module 1: Color

The color module has these commands:

Command Meaning
color.rgb(a, b, c) Sets a color's RGB values.
color.hsv(a, b, c) Sets a color's HSV values.

Module 2: Turtle

The turtle module allows the use of a turtle to draw objects. It has these commands and objects:

Command Meaning
turtle.turnleft(n) Turns the turtle left by n degrees.
turtle.turnright(n) Turns the turtle right by n degrees.
turtle.forw(n) Moves the turtle forward by n pixels.
turtle.backw(n) Moves the turtle backward by n pixels.
assign turtle t = turtle.turtle() Makes a turtle object.
assign turtle t = turtle.screen() Makes a screen object.
turtle.color(rgb(a, b, c)) Sets the color of a turtle object.
turtle.screencolor(color.rgb(a, b, c)/color.hsv(a, b, c)) Sets the color of a screen object.
turtle.changex(n) Changes the turtle's x coordinate by n pixels.
turtle.changey(n) Changes the turtle's y coordinate by n pixels.
turtle.hide() Hides all the turtles.
turtle.clone() A clone of a turtle.
turtle.allturtle.[blah blah blah]() Makes all turtles move the same way.
turtle.final() Keeps the drawing even after the turtle is done.

Example code that makes a 20px by 20px square on the turtle screen:

import module[turtle] as alias[t]
assign turtle n=t.turtle()
loop 4:
    n.forw(20)
    n.turnleft(90)
n.final()

Module 3: Mathplot

The mathplot module allows the use of a 2D plot (Cartesian plane) to turn mathematical equations into shapes. It has these commands:

Command Meaning
mathplot.equation() Shows the shape made by an equation on the plot.
mathplot.showpoint((a, b)) Shows point (a, b) on the plot.
assign point a = (m, n) Sets a variable to a point.
mathplot.showpoint((a, b), (c, d)) Shows multiple points on the plot.
mathplot.pointconnect() Connects all the points on the plot.
assign mathpoint.color.draw = color.rgb(a, b, c) Sets the color of the shape.
assign mathpoint.color.screen = color.rgb(a, b, c) Sets the plot color.

For example, a piecewise function:

import module[mathplot] as alias[plt]
def f(n):
    check if n < 0:
    yes:
        print(n)
    no:
        print(n - 1)
mathplot.equation(y = f(x))

Module 4: Gamemake

The gamemake module allows programmers to make games. It has these commands:

Command Definition
gamemake.oval(a, b, c, d, fill=color.rgb(e, f, g), outline=color.rgb(h, i, j)) Makes an oval with the top-left and bottom-right corners of its bounding box as (a, b) and (c, d), respectively. Its fill color is rgb(e, f, g) and its outline color is rgb(h, i, j).
gamemake.rect(a, b, c, d, fill=color.rgb(e, f, g), outline=color.rgb(h, i, j)) Makes a rectangle with the top-left and bottom-right corners of it as (a, b) and (c, d), respectively. Its fill color is rgb(e, f, g) and its outline color is rgb(h, i, j).
assign costume(a) n = [blah blah blah] Makes costume of an object on the gamemake screen.
assign gamescr a = color.rgb(b, c, d) Sets the gamemake screen to a specific color.
assign pos(a) n = (a, b) Sets the position of an object.
gamemake.xcor() X-coordinate of an object.
gamemake.ycor() Y-coordinate of an object.

Examples

Hello, world!

print ("Hello, World!")

Fibonacci sequence

assign var a = 0
assign var n = usrinp()
change (n) to float
def fib(x) :
    out fib(x - 1) + fib(x - 2)
    check if x = 0:
        out 0
    check if x = 1:
        out 1
loop n:
    add (fib(a := a + 1)) to list (FibonacciNumbers)
print list (FibonacciNumbers)

Collatz sequence

assign var a = usrinp()
change (a) to float
def col (x) : 
    check if mod(x, 2) = 1:
        out 3 * x + 1 
    check if mod(x, 2) = 0: 
        out x / 2
loop until a = 1:
    assign var a = col(a)
    add (a) to list (CollatzSequence)
print list (CollatzSequence)

Truth-machine

assign var a = ursinp()
change (a) to float
check if a = 0:
yes:
    print (0)
no:
check if a = 1
    while 1:
        print (1)

Check even/odd

assign var a = usrinp()
change (a) to float
check if mod(a, 2) = 0:
yes:
    print (a)(" is even")
no:
    print (a)(" is odd")

Looping counter

assign var a = 1
def f(x):
while 1:
    print ("*") a := a + 1 times

99 bottles of beer on the wall

assign var n = 99
def f(x):
   out x - 1
loop until n = 3:
    print (n)(" bottles of beer on the wall, 
[new line]")(n)(" bottles of beer.
[new line] Take one down, pass it around,
[new line]")(f(n := n - 1))(" bottles of beer on the wall.
[new line]
[new line]")
print ("2 bottles of beer on the wall,
[new line] 2 bottles of beer.
[new line] Take one down, pass it around,
[new line] 1 bottle of beer on the wall.
[new line]
[new line]")
print ("1 bottle of beer on the wall,
[new line] 1 bottle of beer.
[new line] Take one down, pass it around,
[new line] No bottles of beer on the wall.
[new line]
[new line]")
print ("No bottles of beer on the wall,
[new line] No bottles of beer.
[new line] Go to the store, buy some more,
[new line] 99 bottles of beer on the wall.")

Factorials

assign var n = usrinp()
change (n) to float
def f(x):
    out x!
print (f(n))

Disan count

assign var n = usrinp()
change (n) to int
assign var x = 1
loop until x = n:
    check if 0 < x < n
        check if mod(x, 2) = 0:
        yes:
            add to list (EvenNumbersFinite)
            assign var x = x + 1
        no:
            assign var x = x + 1
print list (EvenNumbersFinite)

Conway’s Game Of Life LWSS

print ("o . . . o .
[new line] . . . . o
[new line] o . . . o
[new line] . o o o o")

Or this:

print ("x = 5, y = 4, rule = B3/S23
[newline]o3bob$4bo$o3bo$b4o!")

FizzBuzz

assign var n = 1
loop until n = 100:
    check if mod(n, 3) = 0:
    yes:
        check if mod(n, 5) = 0:
        yes:
            add ("FizzBuzz") to list (NaturalNumbersFizzBuzz)
        no:
            add ("Fizz") to list (NaturalNumbersFizzBuzz)
    no:
        check if mod(n, 5) = 0:
        yes:
            add ("Buzz") to list (NaturalNumbersFizzBuzz)
        no:
            add (n) to list (NaturalNumbersFizzBuzz)
    assign var n = n + 1
loop all x in (NaturalNumbersFizzBuzz):
    print(x)

W110 from three inputs p, q, r

assign var p = usrinp()
assign var q = usrinp()
assign var r = usrinp()
change (p) to float
change (q) to float
change (r) to float
check if p = 0:
    check if q = 0:
        check if r = 0:
            print (0)
        check if r = 1:
            print (1)
    check if q = 1:
        check if r = 0:
            print (1)
        check if r = 1:
            print (1)
check if p = 1:
    check if q = 0:
        check if r = 0:
            print (0)
        check if r = 1:
            print (1)
    check if q = 1:
        check if r = 0:
            print (1)
        check if r = 1:
            print (0)

Cat program

assign var n = usrinp()
print (n)

Reverse cat

assign var n = usrinp()
assign var t = length(n)
while t =/= 1:
    print (element (t := t - 1) of (n))

One time cat

assign var n = usrinp()
print (element (1) of (n))

A+B Problem

assign var a = usrinp()
assign var b = usrinp()
change (a) to float
change (b) to float
assign var sum = a + b
print (sum)

Primes using Erastothenes sieve

assign var n = 1
assign list (Primes) = []
add 2 to list (Primes)
add 3 to list (Primes)
add 5 to list (Primes)
add 7 to list (Primes)
loop 99:
    check if mod(n, 2) =/= 0:
        check if mod(n, 3) = 0:
            check if mod(n, 5) = 0:
                check if mod(n, 7) = 0:
                    add (n := n + 1) to list (Primes)
remove (1) from list (Primes)
loop all x in (Primes):
    print(x)

Digital root calculator

assign var n = usrinp()
change (n) to float
def digitroot(x):
-> out 1 + mod(n - 1, 9)
print (digitroot(x))

XKCD Random Number

assign var randomize = 4
print(randomize)

Infinite loop

while 1:
    pass

Pi

assign var n = usrinp()
assign var p = 0
assign list (PiSum) = []
change (p) to int
def f(x):
    out ((4 * x)! * (1103 + 26390 * x)) / ((x!) ^ 4 * 396 ^ (4 * x))
loop n:
    assign var t = f(p := p + 1)
    change (t) to int
    add t to list (PiSum)
assign var a1 = list add (PiSum)
assign var a2 = a1 * (2 * sqrt(2)) / 9801
assign var a3 = 1 / a2
print (a3)

"Welcome" text in the istplng talk page archive before july 10th 2025

print ("___         ___    _________    ___          ________     _______       ______ _____      _________
[new line]   /  /| ___   /  /|  /  ______/|  /  /|       ,' ______/|  ,' ____  \    ,' ___  '___  \    /  ______/|
[new line]  /  / //  /| /  / / /  /|_____|/ /  / /      /  /|_____|/ /  /|__/  /|  /  /|_/  /|_/  /|  /  /|_____|/
[new line] /  / //  / //  / / /  ______/|  /  / /      /  / /       /  / / /  / / /  / //  / //  / / /  ______/|
[new line]/  /_//  /_//  / / /  /|_____|/ /  /_/___   /  /_/____   /  /_/_/  / / /  / //__/ //  / / /  /|_____|/
[new line]\______,_____,' / /________/|  /________/|  \________/|  \_______,' / /__/ / |__|//__/ / /________/|
[new line]\______,______,'  |________|/  |________|/  \________|/  \________,'  |__|/       |__|/  |________|/")

Euler-Mascheroni constant to desired precision

assign var t1 = usrinp()
change (t1) to int
assign var n = 0
loop t1:
    assign var t2 = 1 / n!
    add t2 to list (sumofe)
    assign value n = n + 1
assign var t3 = log(list add (sumofe), t1)
assign var t4 = 1
assign var p = usrinp()
change (p) to int
loop p:
    assign var t5 = 1 / t4
    add t5 to list (harmonicnum)
    assign var t4 = t4 + 1
assign var t6 = list add (harmonicnum) - t3

Malbolge tritwise crazy operation

assign var a = usrinp()
change (a) to int
assign var a = mod(a, 3)
assign var b = usrinp()
change (b) to int
assign var b = mod(b, 3)
def crazy(x1, x2):
    check if x1 = 0:
        check if x2 = 0:
            out (1)
        check if x2 = 1:
            out (1)
        check if x2 = 2:
            out (2)
    check if x1 = 1:
        check if x2 = 0:
            out (0)
        check if x2 = 1:
            out (0)
        check if x2 = 2:
            out (2)
    check if x1 = 2:
        check if x2 = 0:
            out (0)
        check if x2 = 1:
            out (2)
        check if x2 = 2:
            out (1)
print (crazy(a, b))

Tommyaweosme constant

assign var a = 0
while 1:
    print (56) a := a + 1 times
    [smooth]
    print (5687)

Tommyaweosme function

assign var a = usrinp()
change (a) to int
assign var b = 2 * (a + 5)
check if mod(b, 10) = 0:
yes:
    print (87)
no:
    repeat inf:
        print (56)

6-function calculator

assign var a1 = usrinp()
change (a1) to int
assign var a2 = usrinp()
change (a2) to int
assign var a3 = usrinp()
change (a3) to int
assign var a3 = mod(a3, 6) + 1
check if a3 = 1:
    def f(x, y):
        out x + y
    print (round (f(a1, a2)) to (0.001))
check if a3 = 2:
    def f(x, y):
        out x - y
    print (round (f(a1, a2)) to (0.001))
check if a3 = 3:
    def f(x, y):
        out x * y
    print (round (f(a1, a2)) to (0.001))
check if a3 = 4:
    def f(x, y):
        out x / y
    print (round (f(a1, a2)) to (0.001))
check if a3 = 5:
    def f(x, y):
        out mod(x, y)
    print (round (f(a1, a2)) to (0.001))
check if a3 = 6:
    def f(x, y):
        out x ^ y
    print (round (f(a1, a2)) to (0.001))

4-function calculator

assign var a1 = usrinp()
change (a1) to int
assign var a2 = usrinp()
change (a2) to int
assign var a3 = usrinp()
change (a3) to int
assign var a3 = mod(a3, 4) + 1
check if a3 = 1:
    def f(x, y):
        out x + y
    print (round (f(a1, a2)) to (0.001))
check if a3 = 2:
    def f(x, y):
        out x - y
    print (round (f(a1, a2)) to (0.001))
check if a3 = 3:
    def f(x, y):
        out x * y
    print (round (f(a1, a2)) to (0.001))
check if a3 = 4:
    def f(x, y):
        out x / y
    print (round (f(a1, a2)) to (0.001))

Ackermann function

ask (Input 1?)
assign var a = ans
ask (Input 2?)
assign var b = ans
def f(x1, x2):
-> check if x1 = 0:
-> yes:
-> -> out x2 + 1
-> no:
-> -> out hyp(2, x1 - 2, x2 + 3) - 2
assign var t = f(a, b)
print (t)

Sgn Machine

assign var a = usrinp()
change (a) to float
check if a > 0:
yes:
    print(1)
no:
    check if a = 0:
    yes:
        while 1:
            print (0)
    no:
        print(-1)

User:PrySigneToFry/烂下攫用乴 function

assign var n = usrinp()
change (n) to int
assign list Prod = []
assign var p = 1
loop n:
    add (sin(p ^ 3 + 1)) to list (Prod)
print (list multiply (Prod))

Recaman sequence

assign var n = usrinp()
change (n) to int
assign var t = 0
assign var a = 0
assign list r = []
loop n:
    check if t >= 0:
        check if t - a < 0 or t - a in (r):
        yes:
            add (t := t + a) to list (r)
        no:
            add (t := t - a) to list (r)
    assign var a = a + 1
print list (rec)

Self-interpreter

assign var n = usrinp()
print(run(n))

Graham's number

def g(x):
    check if x = 1:
        yes:
            out hyp(3, 4, 3)
        no:
            out hyp(3, g(x - 1), 3)
print (g(64))

Turing-completeness

This esolang is turing-complete by reduction to brainfuck. Proof:

  • change pointer 1 corresponds to >.
  • change pointer -1 corresponds to <.
  • assign var memcell pointer = memcell pointer + 1 corresponds to +.
  • assign var memcell pointer = memcell pointer - 1 corresponds to -.
  • print (memcell pointer) corresponds to ..
  • assign var memcell pointer = n corresponds to ,.
  • while memcell pointer =/= 0: corresponds to a [] loop.

Categories