Aeolbonn
Odd numbers flip bits, even numbers jump. Nearly every line of a program is just a number.
Keymaker, 2006 · Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
Keymaker designed Aeolbonn, whose name stands for "an esoteric output language based on natural numbers". A program has one instruction per line, and most lines are numbers. An odd number flips the memory bit with that number. An even number jumps to the line with that number, but only when the last bit flipped came up true.
Read the story
That is all the control there is. Aeolbonn can print text and never reads any, and the specification says it is Turing complete.
The machine
| Line | Does |
|---|---|
| odd number | Flip that memory bit; flip takes its new value |
| even number | Jump to that line if flip is true |
> < | Raise or lower the asterisk, a number from 0 up |
* | Act as the number the asterisk holds |
? | Set flip to true or false at random |
:text | Print the text, or a line feed when there is none |
Lines count from 0, and the run ends when it reaches a line outside the program. Memory is endless, and every bit starts false, as does flip. This implementation draws ? from a fixed sequence, so a run replays.
Example
The truth machine takes its input as its own first line.
The truth machine takes its input as its own first line. With 0 there, nothing happens until line 1 flips bit 1 on, so line 2 jumps to line 8, which prints 0.
With 1 on the first line, line 0 flips bit 1 on and line 1 flips it off again, so line 2 does not jump. Line 3 turns it on once more, and line 6 jumps back to line 4 forever, printing 1 on each line.
Patterns it teaches
- Turing tarpit: bits and a conditional jump are the whole machine.
- Nondeterminism:
?is a coin toss.
Further
See also
Cell-based
Write your own in Run Convert a program from Aeolbonn
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: aeolbonn.
Command line
shib run aeolbonn -e ':Hello, world!
:'shib manual aeolbonnSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/aeolbonn.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org