esolang

Spaces and tabs

Brainfuck you cannot see. Every command is three blanks, and only the word end is visible.

2023 · Turing complete: yes · ●●○ moderate · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello, World!

The idea

Spaces and tabs is brainfuck written in the two characters a page shows as nothing. Each of brainfuck's eight commands becomes a group of three, and two kinds of blank in three places make exactly eight groups. The program ends at the word end, the only thing on the line you can read.

The machine

Groupbrainfuck
space space space>
space tab space<
tab space space+
tab space tab-
tab tab space.
tab tab tab,
space space tab[
space tab tab]
endThe end of the program

Cells hold 0 to 255 and wrap around, and the tape runs both ways. The end of the input reads as 0. The original interpreter is in Common Lisp and not in the specification, so these are this implementation's choices.

Example

The Hello World is 78 groups, the brainfuck program --<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.

The Hello World is 78 groups, the brainfuck program --<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++. and so on. It needs cells that wrap and a tape that goes left of where it starts, and it takes 473,214 steps.

The truth machine is >>>,.[[->+<<+>]>-]<<<[<<]>[.]. It prints the digit it reads, then spreads the character code down the tape one less each time and checks whether it was odd. On 0 it stops, and on 1 it prints 1 forever.

Expected: 0

The cat is +[,.], which prints every byte up to and including the first 0.

Patterns it teaches

Further

Spaces and tabs builds on Brainfuck.

Brainfuck derivatives

Write your own in Run Convert a program from Spaces and tabs

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: spaces-and-tabs.

Command line

shib run spaces-and-tabs -e '	    						  		end' --input 'cat'
shib manual spaces-and-tabs

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/spaces-and-tabs.js

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

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