Frosty
Every value is a whole number in a list, and every list is known by a number too.
MijiGamin1, 2025 · Turing complete: unknown · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
MijiGamin1 made Frosty in 2025, after brainfuck. There are no variables and no stack. All data sits in lists of whole numbers, and each list has a whole number as its key. Text is a list of character codes. A command is one character followed by its parameters, and each parameter ends with a /. To use a value from a list, a parameter names its place as *key-index*.
The machine
| Command | Does |
|---|---|
+key/v/ | Add v to a list; text adds each character's code |
~key/i/v/ $key/i/ | Set a place; delete a place |
akey/i/x/y/ | Store x+y in a place; s x d m store x-y, x*y, x/y rounded, x mod y |
.v/ ,v/ | Print a number; print a character |
\key/ !key/ | Print a list's numbers; print it as text |
@key/i/ | Read a whole number into a place |
[from/to/start/end/ | Add part of one list to the end of another |
:id/count/ ... #id/ | Run the body count times |
>x/y/id/ < = | Go on if x>y, x<y or x=y, else jump to }id/ |
n/ | Print a line feed |
The specification's interpreter is in Python and not in the specification, so a few details are choices. Printing adds no line break, the end of [ is not included, and a jump goes to the next mark with its ID, or back to the first one.
Example
The cat makes list 0 with one place, reads a number into it and prints it.
The cat makes list 0 with one place, reads a number into it and prints it.
The truth machine puts its mark }0/ before the print, so a failed test jumps back and prints again. On 0 the test passes and the program ends. On 1 it prints 1 forever.
A loop of 3 rounds counts down, and s takes 1 off the count in place 0 each time.
The 99 bottles of beer runs too. It copies 16 characters of " bottles of beer on the wall" into a second list, adds a full stop, and counts down from 99 in a loop of 98 rounds.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from Frosty
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: frosty.
Command line
shib run frosty -e '+0/0/@0/0/.*0-0*/' --input '42'shib manual frostySource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/frosty.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org