Lythnology
Every word is a variable, the commands too. Write DOG IS BLUE and the word DOG means BLUE.
RainbowDash, 2025 · Turing complete: no · ●●○ moderate · esolangs.org
Tested with 9 known programs · Test method
Run it
The idea
RainbowDash made Lythnology in 2025, after the game Baba Is You. A program is nothing but capital words. Each word has values, which start as its own name, and it may have an affordance, which is what it can do. Thirteen words come with one, such as SAY, IS and IF. X IS Y copies everything about Y into X, so PRINT IS SAY gives PRINT the power to print, and the specification's AND gate even turns AND itself into a lookup table.
Read the story
The specification puts Lythnology with the finite state automata. Words only ever come from the words in the program, so there is only so much it can remember.
The machine
| Words | Do |
|---|---|
SAY X | Print the values of X |
PAUSE | Print a line feed |
X IS Y | Copy the values and the affordance of Y into X |
Y OR Z Y AND Z Y WITH Z | Pick one at random, keep both, or join them into one word |
X IS INPUT | Read a word in capitals; a number comes spelled out |
W TRANSFORMS A TO B TO C | Make W turn A into B and B into C |
W X | Turn each value of X with the table of W |
IF X IS Y ... THEN | Skip past THEN unless X and Y share a value |
IF X IS NOT Y ... THEN | Skip past THEN if they do |
WHEN X | Jump back to where X was last used |
Words print with one space between them. # starts a comment.
Example
The counter.
The counter. INCREMENT learns nine steps, and INCREMENT THIS moves THIS from ONE to TWO.
The truth machine. Input arrives as a word, so 0 becomes ZERO. On 1 it would go round between WAS and WHEN WAS forever.
The IF example. Inside it NUMBER IS NUMBER gives NUMBER its own name back, so the next line prints the word itself.
The ten bottles of beer program counts down with a DECREMENT table and loops with WHEN WAS until COUNT is ONE.
Patterns it teaches
- Self-modifying code: any word can be given a new meaning, the built-in ones too.
- Nondeterminism:
ORpicks one of its words at random.
Further
See also
Self-modifying
Write your own in Run Convert a program from Lythnology
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: lythnology.
Command line
shib run lythnology -e 'SAY DOG'shib manual lythnologySource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/lythnology.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org