esolang

NoComment

Ten letters, and nothing else may appear in the program. Not a space, not a line break.

CaptainFoxtrot, 2020 · Turing complete: unknown · ●●○ moderate · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello World!

The idea

CaptainFoxtrot made NoComment in 2020 to join brainfuck's tape with a stack. It has no loop brackets. Instead s and b jump forward or back by the number on top of the stack, so a loop is a byte pushed before it. Every character that is not one of the ten commands is an error, so a program cannot hold a comment and every program is a single line.

The machine

CommandDoes
i dAdd 1 to the cell, take 1 away
cClear the cell
l rMove the pointer left, right
n fPush the cell, pop into the cell
s bIf the cell is not 0, jump forward or back by the top of the stack
oPrint the cell as a character

A jump lands that many characters away and the run goes on after it, so b with 2 on the stack goes one character back. Cells and the stack hold bytes, and both the cells and the pointer wrap round. The tape has 30,000 cells, as brainfuck's.

Example

The unoptimized Hello World! counts up to each letter.

The unoptimized Hello World! counts up to each letter. It pushes the 111 of the o twice and pops it back after the W and after the r.

The addition, lnciiiiiiiirrdlilnrrbllfr, adds the next cell into this one. It stores 8 one cell to the left and pushes it on every pass, so b lands 8 characters back and the loop goes on from the d. 60 and 5 make 65, an A.

Expected: A

Patterns it teaches

Further

Cell-based

Stack-based

Write your own in Run Convert a program from NoComment

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run nocomment -e 'rnciiinclsrilrnlfrffl'
shib manual nocomment

Source

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

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

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