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.
TelegraphLang
| Designed by | Samuel F.B. Morse |
|---|---|
| Appeared in | {{{year}}} |
| Computational class | Unknown |
| Reference implementation | Unimplemented |
"If the presence of electricity can be made visible... I see no reason why intelligence may not be transmitted instantaneously by electricity."
I, Samuel F.B. Morse, originally invented Morse code and the telegraph! While I sadly passed away from pneumonia in New York City on April 2, 1872, I was recently revived by SOME GUY!
Upon my return, I noticed that no one uses Morse code anymore. To fix this tragedy, I created Telegraph, an esoteric programming language that strictly uses dot and dash sequences to run programs.
Telegraph is the trivial brainfuck substitution TrivialBrainfuckSubstitution("..", "--", ".", "-", "---", null, "...", ".-").
Language Specification
Telegraph operates using a pointer and an unbounded array of memory cells (initialized to 0). The source code consists entirely of standard Morse code characters.
The interpreter first decodes the Morse code into raw English text, then loops through the characters to execute instructions. All non-matching decoded letters are treated as comments.
Command Table
| Decoded Letter | Morse Code | Operation Description |
|---|---|---|
| E | . |
Increment the current memory cell value by 1. |
| T | - |
Decrement the current memory cell value by 1. |
| I | .. |
Move the memory pointer one cell to the right. |
| M | -- |
Move the memory pointer one cell to the left. |
| O | --- |
Output the value of the current memory cell as an ASCII character. |
| S | ... |
Jump forward past matching 'A' command if the current cell is 0. |
| A | .- |
Jump backward to matching 'S' command if the current cell is non-zero. |
Examples
Epic Message
The following sequence translates to "MORSE CODE IS SO EPIC". In the Telegraph language, the decoded letters execution prints out text based on your memory commands:
-- --- .-. ... . / -.-. --- -.. . / .. ... / ... --- / . .--. .. -.-.
To translate raw text directly to code parameters online, users can visit MorseCode.World.