esolang

Record

Four commands named by their letters, REgex, COncatenate, Read, Display.

None1, 2025 · Turing complete: yes · ●●○ moderate · esolangs.org

Tested with 7 known programs · Test method

Run it

Expected: Hello, World!

The idea

None1 made Record in 2025. The name is the four commands run together, and it is said like the verb. All variables hold strings, and the only test is a regular expression. RE either matches and stores its groups, or fails and jumps.

Read the story

That is enough to compute. Numbers are written in unary. CO adds a 0, and matching 0(0*) takes one away, or fails when there is nothing left. That is a Minsky machine, so Record is Turing complete.

The machine

CommandDoes
D sPrint s, with nothing after it
R vRead a line into v
CO v sAppend s to v
RE a r s v1 v2Match all of s against regex r; store the groups in v1, v2; on no match jump to line a

Lines count from 1. A jump out of the program ends it, and any other line is a comment. Strings and regexes are Python literals, as in the interpreter in the specification. That interpreter reads the line number as the shortest piece that evaluates, so a line number of two digits is cut to its first digit. This implementation does the same.

Example

Unary addition reads two strings of zeros and joins them.

Unary addition reads two strings of zeros and joins them.

Expected: 00000

Is the input a number? RE 5 jumps to line 5 when the line is not all digits. On a match it prints Yes and then fails a match on purpose, which jumps past the end.

Expected: Yes

Patterns it teaches

Further

Also in Rewriting

Write your own in Run Convert a program from Record

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run record -e 'D "4"'
shib manual record

Source

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

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

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