We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Needle
Needle is an esolang by User:ChuckEsoteric08 in 2025.
Description
The language uses wrapping tape of 3 cells and program inside an infinite loop
_- decrements current cell and moves right. Decrementing zero is not allowed.(...)- increment current cell and if result is 1 then run code inside the brackets. Can be nested.
There are optional IO commands:
;- input into a current cell. Can be either number or ASCII character depending on the implementation*- output cell as either number or ASCII character depending on implementation
Computational class
Needle is Turing-complete since Minsky machine can be compiled into it. For the simplicity I will use a subset called Wheel Minsky machine (WMM).
Notation
Here I will use a specific notation where [x;y] executes code x y times. I will also define following commands:
NEXT = ()_ DEC = _ NEXT NEXT
Wheel Minsky machine
Language has 2 registers: A and B. Program's are, like in Needle, inside an infinite loop.
INC x y
Increment x and move y commands forward.
DEC x y
Decrement x (if 0 do nothing) and move y commands forward.
IF x y
If x is 0 move y commands forward, else execute next one.
JMP x
Jumps x commands forward. Halting the program can be simulated by replacing x with the length of a program
From WMM to Needle
INC A y becomes:
( NEXT () NEXT NEXT [();y] ) DEC DEC
Becoming:
(()_()()_()_[();y])_()_()__()_()_
INC B y becomes:
( NEXT NEXT () NEXT [();y] ) DEC DEC
Becoming:
(()_()_()()_[();y])_()_()__()_()_
DEC A y becomes:
( NEXT _ NEXT [();y] ) DEC DEC
Becoming:
(()__()_[();y])_()_()__()_()_
DEC B y becomes:
( NEXT NEXT _ [();y] ) DEC DEC
Becoming:
(()_()__[();y])_()_()__()_()_
IF A y becomes:
( () NEXT ( NEXT NEXT [();y-1] NEXT ) _ NEXT ) DEC DEC
Becoming:
(()()_(()_()_[();y-1]()_)_()_)_()_()__()_()_
IF B y becomes:
( () NEXT NEXT ( NEXT [();y-1] NEXT NEXT ) _ ) DEC DEC
Becoming:
(()()_()_(()_[();y-1]()_()_ )_)_()_()__()_()_
JMP x becomes:
( [();x] ) DEC DEC
Becoming:
([();x])_()_()__()_()_
Example
Set Register A to 4 and then decrease it to zero, after which increment register B and halt the program:
INC A 1 INC A 1 INC A 1 INC A 1 IF A 2 DEC A 6 INC B 1 JMP 8
Becomes:
(()_()()_()_())_()_()__()_()_ (()_()()_()_())_()_()__()_()_ (()_()()_()_())_()_()__()_()_ (()_()()_()_())_()_()__()_()_ (()()_(()_()_()()_)_()_)_()_()__()_()_ (()__()_()()()()()())_()_()__()_()_ (()_()_()()_())_()_()__()_()_ (()()()()()()()())_()_()__()_()_