We have detected that you are using AdBlock.
This is fine with me. I just like showing off with my website design.
Poetic is an esoteric programming language (or esolang) based on one of the most classic esolangs, brainf***. The main form of data storage in Poetic is the unsigned byte, which can be used to store a number in the range 0-255, an ASCII character, or whatever else you can conceive of using it for. Poetic has a "tape" of 30,000 of these values, and a memory pointer to keep track of which one of those values is currently being accessed.
The beauty of Poetic, and what sets it apart from most other programming languages, is that there are multiple ways to write a program. Poetic programs can be written in natural language, as a way to either self-describe them, obfuscate them, or to simply have fun with their design. The goal of the Poetic programming language is that someone could walk into a slam poetry session, recite a Poetic program, and have nobody know the difference.
Source code for Poetic is entered in the form of words, in any natural language. There are exactly 10 instructions in Poetic, each represented by a numeric digit, and each word is converted to instructions as follows:
While it is possible to program using words that aren't "real", but are considered words by this system, this is not recommended. It misses the whole point of the language in the first place. (If you are able to use this device to great poetic effect, however, feel free!)
Here are some special cases that arise as a consequence of these rules:
|fun & games||35|
Poetic has 10 instructions, each represented by a numeric digit. They are as follows:
|1||IF||If the current byte is equal to 0, jump execution to after the matching EIF.|
|2||EIF||If the current byte is not equal to 0, jump execution to before the matching IF.|
|3||INC||Increment the value of the current byte by next_digit. If next_digit is 0, the value used instead is 10.|
|4||DEC||Decrement the value of the current byte by next_digit. If next_digit is 0, the value used instead is 10.|
|5||FWD||Increment the memory pointer by next_digit. If next_digit is 0, the value used instead is 10.|
|6||BAK||Decrement the memory pointer by next_digit. If next_digit is 0, the value used instead is 10.|
|7||OUT||Output the value of the current byte as an ASCII character.|
|8||IN||Read a character from the input stream, and write its ASCII value to the current byte.|
|9||RND||Set the current byte to a random value from 0 to 255.|
|0||END||End program execution here. This does not end program execution if it is used as an argument for INC, DEC, FWD, or BAK.|
Note that the words for the opcodes are not the instructions themselves, but they are handy ways to refer to the instructions in Poetic pseudocode. Writing BAK 4 in your source code will not result in a BAK 4 being executed; writing Poetic code (for example) would have this effect.
These definitions still leave a bit of room for interpretation for many situations that could arise. Here is my attempt at clarifying the correct behavior in these situations.