FallDown
Designed by | User:PiggyPig |
---|---|
Appeared in | 2024 |
Memory system | balls |
Dimensions | Two-dimensional language |
Computational class | Unknown |
Reference implementation | [1] |
File extension(s) | .fld |
FallDown is an esolang using "gravity", the main idea is to use balls that can fall, roll, duplicate themselves, mix with other balls, store a value... A FallDown program is executed tick per tick, each tick, all the balls move at the same time. Each ball stores a value (of 0 at beggining) that increase by 1 each tick if the ball is falling.
Examples
Basic Example
. \ # --------
This program output the number 3. Indeed there are 3 lines beetween the start of the ball (.
) and the first slope (\
), then the ball is falling during 3 ticks (so it has a value of 3 when it arrives at the slope). Then, due to the slope, the ball is going to roll on the groupd (-
) until the operand #
that print the value stored in the ball. Then the ball will be out of the frame of the program, so the ball will disapear and the execution will be done.
Cat program
. \? # ----
Truth Machine
. / \? ~# ~ / #$-
Sum
# . . \? + ?/ -------
This program returns the sum of the two inputs (inputs are positives integers)
Product
/+ + . --- ?/ / $~-~ / . -~ ?/ : / / . $-\\ -- ---/ + / \-~---~ #
This program returns the product of the two inputs (inputs are positive integers).
The complexity of the calculation of n
times m
is linear with n
, i.e 𝓞(n)
with n
the first input.