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.

StupLANG

From Esolang
Jump to navigation Jump to search

StupLANG is an esoteric programming language created by User:Cordership in 2026.

Syntax

Operation Definition
a = n Sets variable a to a number n. Any value can be picked. Similarly, the variable name can be altered.
a @ b a + b
a // b a - b
a $ b a * b
a \/ b a / b
a [b] a ^ b
a /n\ b The hyperoperation function a{n}b.
[whatever question you want here?] Asks a question to recieve the user input.
//([whatever text you want here])\\ Prints text.
a = ans Sets the variable a as the user input.
f(x) = n Sets definition of f(x) as n. Definition can be changed.
/\n: Loop n times.
/\([condition]): Loop until condition is met.
/\[/[condition]\]: Loop while condition is met.
/\inf: Loop infinitely.
/\[/0\]: Avoid loop.
/\[/1\]: Loop infinitely.
-> Move pointer right by 1 cell.
<- Move pointer left by 1 cell.
point mem A variable; the value of the ASCII character in the memory cell at the pointer.
= Equal.
< Less than.
> Greater than.
=//= Not equal.
>(a)>([listname]) Adds variable a to list. The list recieves only the value of a.
list//([list name])\\ Prints list.
//@n n factorial, notation is n!.
([listname])@ Sum of the elements in a list.
([listname])$ Product of the elements in a list.
/$(text)$\ Comment.
//([condition]) !: ?: Checks if condition is true or false. ! is true, ? is false.
//([condition]) Checks if condition is true. If false, skip the code a level up right after this command.
/a/\b\ a mod b.
([list name])(n) Nth element in list.
[newline] New line. Must be in a print or a compound print command.
//(a)\\(n) Prints a n times. The text "a" can be altered, and the value of n can be altered as well.
//(n)(brainfuck pseudoquines)\\ Prints n, then space, then "brainfuck pseudoquines". N is a variable with a value that can be altered, "brainfuck pseudoquines" is the accompanying text which can be changed. Called a “compound print” command.
f(x, y) or f(x1, x2) Function with two inputs.

Examples

Cat program

[Input?]
a = ans
//(a)\\

Looping counter

n = 1
/\[/1\]:
 //(*)\\(n) /$(This is one level up.)$\
 n = n @ 1

Fibonacci sequence

[How many terms?]
n = ans
t = 0
f(x) = f(x // 1) @ f(x // 2)
/\n:
 p = f(t)
 >(p)>(Fibonacci)
 t = t @ 1
list//(Fibonacci)

Disan count

[Upper bound?]
n = ans
p = 0
/\(p = n):
 //(/p/\2\ = 0)
 !:
  >(p)>(DisanCountList)
  p = p @ 1
 ?:
  p = p @ 1
list//(DisanCountList)\\

Turing completeness

It can be reduced to Brainfuck.

  • Brainfuck's > is -> in StupLANG.
  • Brainfuck's < is <- in StupLANG.
  • Brainfuck's + is point mem = point mem + 1 in StupLANG.
  • Brainfuck's - is point mem = point mem - 1 in StupLANG.
  • Brainfuck's . is //(point mem)\\ in StupLANG.
  • Brainfuck's , is point mem = n in StupLANG.
  • Brainfuck's [] loop is /\[/[point mem =//= 0]\]: in StupLANG.