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 variablestack / rosterarrDeclare an arraymove / techniquefnDefine a functionyeetretReturn a valueshout / yellsayPrint valuesslurp / gimmereadRead fast inputstomploopLoopwithininLoop bindermaybeifConditionalotherwiseelseElse branchtapoutbreakExit the innermost loopyep / nopetrue / falseBooleansSyntax reference
sumo x = 10Declare a variablestack xs = [1, 2, 3]Declare an arrayxs[0] = 9Index assignmentslurp nFast whitespace-delimited inputshout "sum" totalPrint space-separated values + newlinemove name(a, b) { yeet a + b }Function with returnmaybe cond { … } otherwise { … }Conditionalstomp i within 0..n { … }Range loop (end exclusive)stomp v within xs { … }Iterate an arraytapoutExit the innermost looplen(xs) max(a,b) min(a,b) abs(x) int(x)Built-insExample programs
slurp n
sumo total = 0
stomp i within 0..n {
slurp x
total = total + x
}
shout totalmove fib(n) {
maybe n < 2 { yeet n }
yeet fib(n - 1) + fib(n - 2)
}
stomp i within 0..10 {
shout i fib(i)
}stack xs = [4, 17, 3, 9]
sumo best = xs[0]
stomp v within xs {
maybe v > best { best = v }
}
shout "the champion is" bestRunning 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.