SANTA
Christmas words that print, and cookies and milk to do sums with.
Earthrulerr, 2022 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
Earthrulerr made SANTA in 2022 as a joke language about Saint Nick. Words run from left to right along a line. SANTA! prints Hello, World!, PRINTER prints the rest of its line, and COOKIES and MILK hold the two numbers of a sum. The words the specification shows have no loops and read no input, so every program ends.
Read the story
The specification is a stub, and the full list of words is in a README on GitHub. This implementation runs the words the specification shows.
The machine
| Word | Does |
|---|---|
SANTA! | Print Hello, World! |
PRINTER text | Print the rest of the line, so it has to come last |
COOKIES n MILK n | Set the two numbers, both 0 at the start |
DIV MULTIPLY | Print COOKIES divided by MILK, or the two multiplied |
HOHOHO | Make the rest of the line a comment |
Each print ends with a line feed, and division rounds toward zero. The specification says MILK! prints 99 glasses of milk on the wall, after the beer song, but it does not give the words, so it is left out.
Example
Two examples.
Two examples.
Further
See also
Pseudonatural
Write your own in Run Convert a program from SANTA
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: santa.
Command line
shib run santa -e 'PRINTER Are you the age of:
COOKIES 2 MILK 10 MULTIPLY 'shib manual santaSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/santa.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org