Arrows
- This is still a work in progress. It may be changed in the future.
Arrows is an unfinished esoteric programming language by User:SoundOfScripting (readers may also contribute) that only uses UTF8/Unicode arrows.
A list of accepted arrows can be found here.
Syntax
Format
Programs written in Arrows consist of two-dimensional grids of Unicode characters. Any characters that are not recognized are ignored.
Threads
An arrows program consists of multiple "threads" of binary data that follow the course of arrows throughout the grid. Each thread can hold a different amount of bits, usually corresponding to the number of arrows in a single character (i.e. ←
holds one bit and ⇐
holds two).
Thread movement
Unless a thread is depending on another one, threads move one arrow at a time simultaneously. In the splitting example above, whichever thread that attempts to merge first must wait for the other one to catch up before merging into two bits.
Threads may also point towards themselves, allowing for infinite loops.
Commands/arrows
←
,↑
,→
,↓
,↖
,↗
,↘
, and↙
transfer a one bit thread of data from the base of the arrow to the tip.↚
and↛
invert the value of the bit(s) they transfer (these arrows transfer any-sized threads).↺
and↻
create new one bit threads (0 and 1 respectively), which transfer to any thread-continuing arrows (arrows that use one or more threads as inputs) next to the↺
or↻
.⇐
,⇑
,⇒
,⇓
,⇖
,⇗
,⇘
, and⇙
transfer two bits threads from the base of the arrow to the tip.⤙
and⤚
split bigger threads into smaller ones and may duplicate threads into same sized parts (they work in the opposite direction they are named).⟳
outputs a thread and destroys it.⟲
gets a bit from input and creates a thread with it it (similar to↺
and↻
).
Example programs
Splitting and merging
↺ | A | n | y | t | ||
---|---|---|---|---|---|---|
↓ | e | x | t | → | ⟳ | |
⇒ | ⇒ | ⇒ | ⤙ | c | a | n |
↑ | g | o | → | → | ⟳ | |
↻ | h | e | r | e | . |
This example outputs the binary string "01". It is definitely not the most efficient way to do so.
Output infinite 1s
↻ | ⟳ |
⤙ | |
↖ |
This program works by duplicating a one bit stream, outputting it, and repeating (the next duplication gets done after the output since threads don't move instantly).
Thread creation failure
⟲ | ⟲ |
⟳ | ⟳ |
This program outputs the first four bits from the input stream (in any order).
External resources
- List of arrows - https://www.toptal.com/designers/htmlarrows/arrows/