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.

Baller

From Esolang
Jump to navigation Jump to search
Baller
Designed by User:Ben-0606
Appeared in 2026
Dimensions 2D
Computational class Potentially complete
Reference implementation Unimplemented
Logo of the programming language

Baller is a two-dimensional esoteric programming language created by User:Ben-0606. It is inspired by and similar in style to AsciiDots and Befunge, using a grid-based program where characters act as instructions and balls move around the grid.

Baller uses an infinite grid of squares in its specification, although the author's current implementation uses a 20×30 grid. A ball represents a variable and can move through the grid, interacting with instructions along its path.


Syntax

Balls

To add a ball, use the degree sign °

n is the value of the ball.

If a ball touches a number, it's value changes to that number.

A ball can inspect the next character of an input program.

A ball can be spawned while moving by combining ° with a direction.

A stationary ball can also be spawned using the corresponding stationary form.

A ball can be moved using the four directional commands:

Operation Command
Left <
Right >
Up ^
Down v

Program termination

A program ends using an ampersand immediately followed by a hash:

&#

The two characters must be next to each other. Separating them causes the termination command not to work.

Output

The p command is used to print.

p "..."

Using double quotation marks, print a string.

Using single quotation marks, print a value.

Arithmetic

Baller supports the following arithmetic operations:

Operation Command
Addition +
Subtraction -
Multiplication x
Division /
Modulo %

(Two balls can merge.)

Boolean operations

Baller has Boolean operations.

Operation Command
AND &
OR
NOT \
XOR #

(Two balls can merge.)

Input and output

The ? command is used to accept user input.

?

The ! command is to store user input.

!

These can be labeled with numbers to differentiate each other.

Conditional commands

The ~ command is used for conditional commands.

~!=...

~n=...

Loops

Loops are represented using a start marker and an end marker.

(...)

A conditional loop is like a loop but with conditions.

(!=... )

(n<... )

(n>... )

(n=... )

Remember, (n>... ) means loop until n is grater than a value, and vice versa.

Deleting balls

Balls can be deleted using the deletion commands:

}
{
_

Defenition

Using =, you can define anything.

ANYTHING.

... = ...

This must be separated from the main code. Or else...

Errors

If a Baller program does not contain an ending command, OR the define command is not separated from the main code, the program produces the error:

Why?

Examples

A simple Baller program can be written using the commands described above.

Hello, World!

°> p "Hello, World!" &#

Truth machine

     >(p "1")
     ^
 °>? ~!=1p "0"&#

Cat program

°>? p "!"&#

99 bottles of beer

°>99(n<0 p "n bottles of beer on the wall, n bottles of beer! Take one down, pass it around, n-1 bottles of beer on the wall!" n-1)&#

FizzBuzz

         >p "Fizz"v>p "Buzz"v
         ^         ^
°>(n<250 ~n%3=0   >~n%5=0   > n+1)&#

Guessing game

          >p "Too low!"v>p "Just right!"v>p "Too high!"v
          ^             ^                ^
°> (!=7 ? ~!<7         >~!=7            >~!>7          >)&#

Countdown program

°>10(n<0 p "n" n-1) p "GO!" &#

Even or odd

    >p "Even"&#
    ^
°>? ~!%2=0 p "Odd"&#

See also