Translate English text into the Shakespeare Programming Language (SPL), the esoteric language where programs are Shakespearean plays. Characters are variables, adjectives encode powers of two, and "Speak your mind!" outputs a character. Each input character becomes an ASCII value assignment in a theatrical play — genuine runnable SPL source code. Reverse translation executes SPL programs back to text.
Enter some text and click Translate to see the result
The Shakespeare Programming Language (SPL) is an esoteric programming language created by Karl Hasselström and Jon Åslund in 2001. Its central constraint is that every valid program must also read as a plausible Shakespearean play — complete with a title, a cast of characters, numbered Acts and Scenes, and dialogue written in Early Modern English. Characters in the play are integer variables; Acts and Scenes are labels for control flow.
Despite its theatrical surface, SPL is Turing-complete. You can perform arithmetic, push and pop values to per-character stacks, branch conditionally with If … let us proceed to Act N, and handle I/O with Speak your mind! (character output) and Open your heart! (numeric output). Any program a conventional language can compute, SPL can compute too — it just looks like it belongs on the stage of the Globe Theatre.
SPL encodes integer constants in noun phrases. Every positive adjective (beautiful, fair, holy…) doubles the running value, while the final noun determines the sign: a positive noun (rose, summer, lord…) contributes +1 and a negative noun (villain, worm, fool…) contributes −1. Adjectives and nouns multiply together to give the final constant.
| Phrase | Calculation | Value |
|---|---|---|
| a bloom | 0 adjectives × +1 noun | 1 |
| a beautiful bloom | 1 adjective (×2) × +1 noun | 2 |
| a beautiful brave bloom | 2 adjectives (×2×2) × +1 noun | 4 |
| a beautiful brave charming bloom | 3 adjectives (×2³) × +1 noun | 8 |
| a beautiful worm | 1 adjective (×2) × −1 noun | −2 |
| nothing | reserved keyword | 0 |
To encode any ASCII value, the translator decomposes it into set bits, expresses each bit position k as
k positive adjectives followed by a positive noun (= 2k), then chains them with
the sum of … and … into a single compound expression.
| Statement | What It Does |
|---|---|
| You are [value]. | Assign the value to the character being spoken to (the "you") |
| Speak your mind! | Print the listener's value as an ASCII character |
| Open your heart! | Print the listener's value as a decimal number |
| Remember me! | Push the listener's value onto their personal stack |
| Recall your past! | Pop the top of the listener's stack into their value |
| If … let us proceed to Act N. | Conditional jump — branch if comparison is true |
| Let us proceed to Scene N. | Unconditional jump to a scene label |
| You are the sum of X and Y. | Assign listener = X + Y (nested arithmetic) |
SPL belongs to the same tradition of thematic constraint languages as Chef (programs as cooking recipes) and Piet (programs as abstract pixel art). All three were created within a few years of each other in the early 2000s, and all share the same design philosophy: the surface notation should be indistinguishable from a genuine artifact of a non-programming domain. A well-written SPL program should pass as a plausible, if somewhat wooden, piece of Elizabethan drama.
SPL has been used in academic settings to illustrate how computation is independent of notation. The language demonstrates that you can encode universal computation in virtually any structured natural-language form — a theme that connects it to the broader history of formal grammars and natural language processing.
This translator converts any text into a complete, valid SPL play. Romeo and Juliet are the two characters.
For each character in your input, Romeo speaks to Juliet and assigns her the character's ASCII value using
a compound the sum of … expression built from
adjective-chains representing individual set bits. Romeo then commands
Speak your mind! to print each character in turn.
The translator also works in reverse: paste any SPL program into the input box and the built-in interpreter will execute it, returning the output. The interpreter supports value assignment, nested arithmetic (sum, difference, product, quotient, square, cube, square root, twice), character and numeric output, stack operations (Remember/Recall), and conditional and unconditional gotos. A translation API is available for developers who want to integrate SPL encoding into their own applications.
Romeo: You are the sum of a beautiful brave bloom and a gentle good blossom. Speak your mind!