CodeBlock

the language

SumoLang

Designed and built by Sumedh Pimplikar.

SumoLang is a competitive-programming language that refuses to take itself seriously. You don't declare variables, you sumo them. You don't return, you yeet. You don't break, you tapout. The semantics are dead serious; the keywords are not.

Fast I/O by default

slurp pulls whitespace-delimited tokens from a buffered stream. No scanners, no sync toggles, no boilerplate.

Silly, not sloppy

Every joke keyword desugars to a real one, so sumo x = 1 and let x = 1 compile to exactly the same program.

Zero setup

No imports, no main function, no header files. The first line of the file is the first line that runs.

The silly keyword table

Every alias on the left is interchangeable with the classic keyword on the right - mix and match freely.

sumoletDeclare a variable
stack / rosterarrDeclare an array
move / techniquefnDefine a function
yeetretReturn a value
shout / yellsayPrint values
slurp / gimmereadRead fast input
stomploopLoop
withininLoop binder
maybeifConditional
otherwiseelseElse branch
tapoutbreakExit the innermost loop
yep / nopetrue / falseBooleans

Syntax reference

sumo x = 10Declare a variable
stack xs = [1, 2, 3]Declare an array
xs[0] = 9Index assignment
slurp nFast whitespace-delimited input
shout "sum" totalPrint space-separated values + newline
move name(a, b) { yeet a + b }Function with return
maybe cond { … } otherwise { … }Conditional
stomp i within 0..n { … }Range loop (end exclusive)
stomp v within xs { … }Iterate an array
tapoutExit the innermost loop
len(xs) max(a,b) min(a,b) abs(x) int(x)Built-ins

Example programs

Sum of N integers
slurp n
sumo total = 0
stomp i within 0..n {
  slurp x
  total = total + x
}
shout total
Fibonacci (recursive)
move fib(n) {
  maybe n < 2 { yeet n }
  yeet fib(n - 1) + fib(n - 2)
}

stomp i within 0..10 {
  shout i fib(i)
}
Max in an array
stack xs = [4, 17, 3, 9]
sumo best = xs[0]
stomp v within xs {
  maybe v > best { best = v }
}
shout "the champion is" best

Running SumoLang

SumoLang runs through a dedicated interpreter service behind the SUMOLANG_SERVICE_URL endpoint. Until that service is wired up, CodeBlock falls back to the built-in reference interpreter, so every example on this page runs today.

Try SumoLang in the editor