CelseeLang
A program is a long number, and it jumps around inside itself.
Alluseri, 2022 · Turing complete: unknown · ●○○ easy · esolangs.org
Tested with 4 known programs · Test method
Run it
The idea
Alluseri made CelseeLang in 2022 as a rework of Celsee, from 2019. Every instruction is one hex digit, 0 to C, so a program looks like a number. The specification says the language was first meant to execute randomly generated numbers.
Read the story
There is one value, ENV. A literal argument is a single digit, so ENV can be set to 0 to 9 at once and has to be counted to anything else. A jump goes to a character's position in the program, counted from 0.
The machine
| Instruction | Does |
|---|---|
0 | Nothing |
1E | Jump to index E |
2ABC | If ENV is A jump to B, else to C |
3ABC | If ENV is not A jump to B, else to C |
4 5 | Add 1 to ENV, take 1 from it |
6E | Set ENV to E |
7 8 | Print ENV as a number, then also a line feed |
9 A | Print the character ENV, then also a line feed |
BE CE | Add E to ENV, take E from it |
$ | As an argument the value of ENV; as an instruction, run the instruction ENV names |
The program ends when it runs off its end.
Example
One example prints 0123456789 two ways.
One example prints 0123456789 two ways. The first prints and counts ten times. The second tests ENV at index 0; while it is not 9 it jumps to index 4, where 741 prints ENV, adds 1 and jumps back to 0. At 9 it jumps to index 8, the last 7.
A value above 9 has to be counted to. This sets ENV to 9, adds 1 and prints it.
$ as an instruction runs the instruction ENV names. With ENV at 7, it prints 7.
The specification says 9 prints the character at ENV. That is the character whose code is ENV, so eight steps of B9 reach 72 and print H.
Further
See also
Queue-based
Cell-based
Write your own in Run Convert a program from CelseeLang
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: celseelang.
Command line
shib run celseelang -e '67$'shib manual celseelangSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/celseelang.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org