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.
Flowchart
| Paradigm(s) | imperative |
|---|---|
| Designed by | User:Aadenboy |
| Appeared in | 2025 |
| Memory system | Deque-based |
| Dimensions | Two-dimensional |
| Computational class | Unknown |
| Major implementations | [1] |
| Influenced | thisthat |
- Not to be confused with flow_chart.
Flowchart is an esolang created by User:Aadenboy directly based on flowcharts.
Structure
Flowchart works on a 2D space, with actions connected by lines. Programs start on the first ( ) node, of which is the left-most top-most node. Flowchart allows for multiple program pointers to run in parallel, order going from the top-most left-most node, traveling right, then down, then finally oldest-to-newest. Program halts once all pointers halt.
The memory of Flowchart works on a tape of infinite deques, and a single register for each pointer, each holding bits (0 and 1). A pointer's register is independent to it and can hold a single bit, however all pointers share the same set of deques. Note that bits in a register and deque are also able to be an "empty" value. Each pointer has a unique deque pointer.
With the exception of < >, a pointer will always choose to go forward on a node if given multiple exit paths, followed by clockwise, then counterclockwise if any is not an option. If there is no exit path for any node that isn't (( )), the program is considered invalid. If a node encounters a node that it had previously traveled onto that is not ( ) or < >, it will travel in the same direction it had previously gone in, unless it were to make a U-turn. This same redirection behavior also applies to any T-junctions found on paths connecting nodes.
Vertical paths connecting into a node are expected to connect to the middle of the node.
| Node | Name | Description |
|---|---|---|
( )
|
Start/Fork/No-op | A multi-functional node. If there are multiple outbound paths, it will create new pointers for each path. |
(( ))
|
End | Ending node. Pointers immediately halt execution upon executing this. |
[ ]
|
Toggle | Toggles the value currently in the register. If it is empty, it's set to 1. |
{ ]
|
Set to zero | Sets the value in the register to zero. |
[ }
|
Set to one | Sets the value in the register to one. |
{ }
|
Clear | Clears the value currently in the register, making it empty. |
< >
|
Switch | A switch. Reads from the register. If it is 0, the pointer turns clockwise. If it is 1, the pointer turns counterclockwise. If it is empty, the pointer continues forward. If the resulting path is not available, the first available path is chosen (straight → clockwise → counterclockwise). |
/ /
|
Input | Read a single bit from input, storing it in the register. If there are no more bits to read, the register is set to empty. This follows boolfuck conventions. |
\ \
|
Output | Output a single bit from the register without clearing it. Outputting empty is the same as outputting zero. This follows boolfuck conventions. |
\[ ]/
|
Push top | Push the value of the register to the top of the currently selected deque. |
/[ ]\
|
Push bottom | Push the value of the register to the bottom of the currently selected deque. |
\{ }/
|
Pop top | Clear the register, and pop the top of the currently selected deque to the register. |
/{ }\
|
Pop bottom | Clear the register, and pop from the bottom of the currently selected deque to the register. |
< ]
|
Switch left | Change the currently selected deque to the one previous to it. |
[ >
|
Switch right | Change the currently selected deque to the one after it. |
Examples
Truth machine
I/O is expected to be a single bit.
( )────┐
/ /
│
(( ))─\ \───< >─┬─\ \─┐
│ │
└─────┘
Cat program
( )
│
┌──/ /──┐
\ \ │ \ \
└──< >──┘
│
(( ))
Kolakoski sequence
Bits 0 and 1 correspond to 1 and 2 respectively.
( )─{ ]─\[ ]/ ┌────< >────┐
│ │ │ │ │
{ ]─\ \ \[ ]/ \ \ \{ }/ \{ }/
┌───┘ │ │ │ │
[ }─\ \ ( ) /{ }\ \[ ]/ \[ ]/
│ │ │ │ │
\ \ │ │ [ ] [ ]
│ │ │ │ │
(( )) │ ├───\[ ]/─\[ ]/
└─────┘
Hello, world!
┌──{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \───┐
┌──( )─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \───┤
│ └──{ ]─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \───┤
│ ┌──[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \───┤
( )─( )─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \───┤
│ └──{ ]─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \───┤
└──( )─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \───┤
└──{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─(( ))
This can also be done with only one pointer, but is eight times slower.
( )─{ ]─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \┐
┌\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─[ }┘
└{ ]─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \┐
┌\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]┘
└[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \┐
┌\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]┘
└{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \┐
┌\ \─{ ]─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─[ }┘
└[ }─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \┐
┌\ \─{ ]─\ \─[ }─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]┘
└{ ]─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \┐
┌\ \─{ ]─\ \─[ }─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]┘
└[ }─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─{ ]─\ \─[ }─\ \─{ ]─\ \─{ ]─\ \─(( ))