esolang

UNBABTIZED

A memory of 1000 numbers, 15 commands of one symbol each, and a degree sign that means "the value in".

Gerson Kurz, 2002 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello World

The idea

Gerson Kurz made UNBABTIZED in 2002. A program is a row of statements separated by dots. Each one is a single symbol and up to two operands, and almost all of them change one memory cell. A bare number is a literal, and ° before a number reads the cell with that address. So !4,°0 copies cell 0 into cell 4.

Read the story

The esolangs.org article follows the Python implementation, which differs in places from what Kurz's own page said. This implementation follows the esolangs.org page.

The machine

StatementDoes
!x,ySet cell x to y
~x,y (x,y )x,y [x,yAdd, subtract, multiply or divide cell x by y, rounding down
Ax,y §x,y $x,yStore 1 in cell x if it is less than, at most or equal to y, else 0
%x,y &x,y /x,yThe same for greater, at least and not equal
:xPrint x as a character
@xPrint x as a number and a line feed
, ... -xRun the statements between, and again while cell x is not 0

The cells hold whole numbers of any size and all start at 0. There is no input.

Example

The count from 0 to 9.
Expected: 42

The count from 0 to 9. Cell 1 gets the counter minus 10, so it is 0 only after 9 is printed. Any number other than 0 keeps the loop going, negative ones too.

Expected: 0 1 2 3 4 5 6 7 8 9

The first nine Fibonacci numbers. Cells 0 and 1 hold the last two numbers, cell 2 counts up from 1, and A5,10 turns a copy of the counter in cell 5 into 1 while it is below 10. That is also how the comparisons work, they overwrite their first cell with the answer.

Expected: 1 1 2 3 5 8 13 21 34

Patterns it teaches

  • Counter machines: numbered cells of whole numbers, changed one at a time, with a loop that tests a cell.

Further

Cell-based

Write your own in Run Convert a program from UNBABTIZED

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: unbabtized.

Command line

shib run unbabtized -e ',.@°0.~0,1.!1,°0.(1,10.-1'
shib manual unbabtized

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/unbabtized.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org