About
On creating a poetic programming language.
1 A more in-depth overview can be found in this paper (130 KB), written for the Electronic Literature Organization conference in May 2022.
The project first took root in a thesis preparation course, during which I created an early proposal for the language, titled e?xpress. During the thesis studio course, I developed the project further and documented the semester of making in this project log. As part of the process, I also created five prototypes and documented the feedback sessions for them.
Overview1
Coem (a portmanteau of “code” and “poem”) is an esoteric programming language that seeks to explore ways that poetry can be made purposeful, and ways that code can be made emotional. Drawing inspiration from codeworks, electronic literature, and critical code studies, it strives to bring together the areas of programming, poetry, linguistics, and typography in ways that are interesting, beautiful, and emotional. In feminist opposition to impersonal tech, it foregrounds ambiguity and connections, emotional and metaphorical significance, textual elements, and personal computing.
The project explores questions such as:
- What are the aesthetics and poetics of code and poetry, and how can they be blended?
- What paradigms of code can be imagined in a different light?
- How do the affordances of the language shape our interactions with the machine?
- What would a programming language intended for poetry look like?
This is a programming language without mathematical operations, which means that it is not Turing-complete. Rather, being composed mainly of declarative statements, it is an experiment in truth and expression.
Context
Codeworks
Codeworks are a broad category that includes code poetry and esoteric programming languages.
Code poetry is poetry written using the conventions of various programming languages, whether or not they compile and run as valid programs in the language.
Esoteric programming languages—esolangs, for short—are hobbyist projects that challenge and play with the norms of computing. An ongoing open wiki documents new esolangs, and Daniel Temkin maintains a blog on esoteric.codes that feature detailed write-ups about esolangs and interviews with their creators. Examples of esolangs that have particularly inspired this project are:
- Sukanya Aneja’s in:verse, “a programming language and environment for exploring the conflux of poetry, visuals, mathematics and code”,
- William Hicks’s Esopo, a family of “poetically or literarily interesting esoteric programming languages”, and
- Zeb Burke-Conte’s Shakespeare Programming Language, “designed with the goal of making its source code look like William Shakespeare’s plays”.
Electronic literature
Electronic literature is an even broader category that covers much of born-digital works, including interactive fiction and non-linear narratives.
Critical code studies
Pioneered by Mark C. Marino with his seminal book, critical code studies describes what it means to critically engage with code. Rather than focusing on the effects of code, this approach focuses on code as a text on its own.
Features
Regular expressions
In a paper titled “Regular Expressions as a System of Poetic Notation”, Dan Waber writes about the poetic potential of regular expressions. He describes “a system of notation to augment, to build upon, to multiply the possibilities of language to make nets for catching truth.” Strikingly, he writes, “When reading about regular expressions substitute the word ‘means’ wherever the word ‘matches’ occurs and the text will become about poetics.”
Metaphors
Coem is a language without mathematical operations. One consequence of this is that words and symbols are open to re-interpretation, in consideration of both programming and literary contexts.
- Optative let. In grammar, the optative mood is a grammatical mood that indicates a wish or hope regarding a given action. To declare a variable and to assign it value, the poet-programmer wishes it.
- Dot as function terminal operator. In (object-oriented) programming, the dot is traditionally used as an operator indicating ownership. Here, it’s used in its literary function, of the ending of a sentence.
- Ampersand as return operator. In code, the ampersand is typically used as the AND operation—one for bitwise AND and two for logical AND. In this language, the word “and” is instead used for the operation, freeing up the ampersand for another purpose. In language, the ampersand might be said to carry a certain sense of symmetry and completion, serving to join two parts of a whole. Here, it’s used to return from a function, completing its purpose.
- Em dashes as argument holders. In code, argument holders are typically parentheses. Here, parentheses are reserved for RegEx variable names; instead, em dashes are used, evoking the sense of a break in thought, providing additional information.
- Dagger as comment. The dagger is a specialised character typically used to begin a footnote in literature, often when the asterisk has been used for a previous footnote on the same page. Here, it’s used in a similar context of denoting additional information as a comment in the code.
Typography and syntax highlighting
Coem is a programming language focusing on words, symbols, and typography. Syntax highlighting is a feature of text editors that displays text in different colors and fonts to help with scanning, comprehension, and error identification. In the Coem web editor, font styles and limited colors are used to signify and differentiate tokens.
- Font styles. Recognised keywords are set in italic serif. Operators are set in roman serif. Identifiers (variable and function names) are set in monospace. Strings are set in sans-serif.
- Specialised typographical marks. Em dashes, ampersands, daggers. Inspired by the special graphic symbols used in the APL programming language.
- Smart quotes. A string is denoted not by so-called dumb quotes, but by the pair of opening and closing smart double quotes.
Interaction directives
Borrowing from the tradition of preprocessor directives in languages such as C and C++, this language features directives that let you customise how the machine interprets and interacts with you. They range from the functional, such as the palimpsest feature that retains a variable’s history, to the emotional, such as the be gentle feature that softens error messages.
Future
This language is currently under development as part of the author’s senior thesis. The author hopes to continue developing it beyond the duration of the course, and invites input and collaboration!