Streamlang
One operator, the arrow. Everything else is a queue with a name.
2026 · Turing complete: unknown · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Streamlang, from 2026, has a single operation. a -> b takes an item from the stream a and puts it on the stream b. An arrow moves as many items as it has streams on its left, each to the stream in the same place on its right, so operations can follow each other on one line.
Read the story
Operations do not run one after another. The interpreter goes down the list, runs the first operation whose sources all hold something, and starts again from the top. When nothing can run, the program halts. An operation whose sources are all literals runs only once.
The machine
| Stream | Does |
|---|---|
in out | Read and write bytes |
hlt | Halt when anything arrives |
eq neq lt gt | Give an item only while their items compare; empty either way |
sum prd and or | Give the sum, product, and or or of everything in them |
neg not dup | Negate, invert or double each item |
rng | Random numbers |
| any other name | A plain queue |
Literals are numbers such as 12, 0x3b and 0b101, characters such as 'h', and strings, which push every byte. A literal on the right swallows what it gets. Items are signed 64-bit numbers.
Example
The cat moves bytes from in to out until the input is empty.
The cat moves bytes from in to out until the input is empty.
The truth machine. The input and a '1' go into eq. Only when they match can eq feed a, which then writes 1 forever. Otherwise the last line runs once, writes 0 and halts.
A string runs once, because its only source is a literal. In the second program 48 5 -> sum sum puts 48 and 5 into sum, and sum -> out pulls 53, the digit 5.
Patterns it teaches
- One instruction: the arrow is the only operation, and the streams do the work.
Further
See also
Also in Rewriting
Write your own in Run Convert a program from Streamlang
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: streamlang.
Command line
shib run streamlang -e 'in -> out' --input 'cat'shib manual streamlangSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/streamlang.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org