esolang

XSVL

Brainfuck's moves on ten cells, with no loops. A digit multiplies the cell.

2021 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello, World!

The idea

XSVL, eXecutable Symbolic Value Lang, keeps brainfuck's + - > < . and drops the rest. There is no loop and no input, so a program runs straight through once. In their place a digit multiplies the current cell, which makes large numbers short. +89 is 1 times 8 times 9, which is 72, the letter H. A 0 clears the cell.

Read the story

There are only ten cells.

The machine

CharDoes
+ -Add 1; subtract 1
> <Move right; move left
.Print the cell as a character
:Print the cell as a number
0 to 9Multiply the cell by the digit

Every other character does nothing. The specification leaves the rest open. In this implementation cells do not wrap, and moving off either end of the ten cells is an error.

Example

The Hello World.

The Hello World. 0+554+ clears the cell and makes 1 times 5 times 5 times 4 plus 1, which is 101, the letter e.

The random number, after the XKCD comic, is 1 times 4.

Expected: 4

The specification also writes an interpreter for the language 0 as Hello :D. Only the : is a command, and it prints the cell, which is 0.

Expected: 0

Patterns it teaches

Further

Also in Turing tarpits

Write your own in Run Convert a program from XSVL

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run xsvl -e '+4:'
shib manual xsvl

Source

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

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

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