Beatnik
From Esolang
Beatnik is a stack-based esoteric programming language created by Cliff L. Biffle. The code looks like English-language text (typically with sentences that don't make a lot of sense). The words are scored according to the rules of the Scrabble board game, and the score is used to determine the operation.
[edit] Commands
| 5 | Push the next word's value onto the stack. |
| 6 | Pop a number from the stack and discard it. |
| 7 | Pop two numbers, add them, and push the result. |
| 8 | Input a character and push its value. |
| 9 | Pop a number and output it as a character. |
| 10 | Pop two numbers, subtract the first one popped from the second one popped, and push the result. |
| 11 | Pop two numbers, swap them, and push them back. |
| 12 | Pop a number and push it twice. |
| 13 | Pop a number and skip ahead n (actually n+1) words if the number is zero. |
| 14 | Pop a number and skip ahead n (actually n+1) words if the number isn't zero. |
| 15 | Pop a number and skip back n words if the number is zero. |
| 16 | Pop a number and skip back n words if the number isn't zero. |
| 17 | Stop the program. |
Any other Scrabble value, interpreted as a command, is a no-op. Note that the commands corresponding to values 5, 13, 14, 15, and 16 each read an extra word and use it as a parameter (then skip it). A value of less than 5 might make the interpreter mock you for your poor Scrabble skills. A value greater than 23 will earn you "Beatnik applause".
[edit] Scrabble letter values
--- ABCDEFGHIJKLMNOPQRSTUVWXYZ --- 1: A E I L NO RSTU 2: D G 3: BC M P 4: F H VW Y 5: K 6: 7: 8: J X 9: 10: Q Z --- ABCDEFGHIJKLMNOPQRSTUVWXYZ ---
[edit] External resources
- Beatnik
- Beatnik interpreter at The Esoteric File Archive
- interpreter in JavaScript
- Beatnik letter values

