esolang

Vertical

Twelve commands, and every one of them is an upright stroke.

Deppong, 2020 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello World!

The idea

Deppong made Vertical in 2020 to be unreadable. Its commands are l, I, 1, |, ), (, [, ], T, /, \ and !, characters that all look like a line standing up. A program reads like a fence. Like brainfuck it ignores every other character, so spaces and line breaks can lay it out.

Read the story

There is one stack and one register. The register counts up and down and gets pushed; the stack holds the values and is the only thing a loop can test.

The machine

CommandDoes
1 \|Add 1 to the register, take 1 from it
)Set the register to 0
lPush the register
IPop
[ ]Add 1 to the top of the stack, take 1 from it
TSwap the top two
/ \A loop; \ goes back to its / while the top is not 0
!Print the top as a character
(Read a character into the register

The specification does not say whether / tests the top. This implementation reads it as a plain mark, so a loop runs at least once. At the end of the input ( gives 0.

Example

The Hello World without its formatting.

The Hello World without its formatting. It builds the characters on the stack from the last one down, the line feed first and H last, then prints the top 13 times with a pop between each two.

A loop multiplies. The register is set to 8 and pushed as the counter, then the loop adds 8 to the register and takes 1 from the counter, 8 times. One more gives 65, which is A.

Expected: A

The cat is (l!/(l!\. It prints each character it reads and stops when it reads a 0, so it also prints the 0 it gets at the end of the input.

Patterns it teaches

Further

Stack-based

Write your own in Run Convert a program from Vertical

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run vertical -e '(l!/(l!\' --input 'cat'
shib manual vertical

Source

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

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

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