Small Poetry Machines
“A poem is a small ... machine made out of words.”
—William Carlos Williams
Why No GitHub, WordNet, or APIs?
Our class sessions will focus on what can be done by creating short, stand-alone programs. It turns out that there is a great deal we can do in this vein, and it allows us to concentrate on code and the workings of programs. We will look into at least one lightweight lexical resource, but the focus will be on using the built-in computational capabilities of programming languages with small, hand-crafted elements of data. We will be sketching and exploring, so will use iPython Notebook and simple text files instead of worrying, at this point, about version control.
Although they are self-contained as programs, the small poetry machines we will study, modify, and create will allow us access to the history of creative text generation and to the global creative practices that involve computation, language, and literary art.
Short, Self-Contained Text Generators for Study, Modification, & Use
- Memory Slam, including implementations by nm of four historic text generators by Christopher Strachey, 1952; Theo Lutz, 1959; Brion Gysin & Ian Sommerville, 1960s; Alison Knowles & James Tenney, 1967. Both JavaScript and Python versions.
- “Random Mazes,” a sort of concrete poem in a single line of code. 1981. Commodore PET/VIC 20/Commodore 64 BASIC.
- Renderings, phase 1, including global work in six langauges and English translations — 13 literary works, most of them computational. The pieces are embedded in iFrames. To view their source, right-click within the frame, select “This Frame > Open Frame in New Window” and then view the source of the new window. These exact instructions will work in Firefox; a similar approach should work in other browsers. Different work is in Amiga BASIC, Commodore 64 BASIC, JavaScript, and Perl.
- ppg256, nm, 2007-2012, series of seven 256-character generators. This code is considerably less clear than with other programs on this page, but if you like a challenge... Perl.
- “Through the Park,” nm, 2008. Both JavaScript and Python versions.
- “The Two,” nm, 2008. Both JavaScript and Python versions.
- “Taroko Gorge,” nm, 2008, and more than two dozen remixes/new works based on this one. (The crossed-out names in the upper right link to these.) Both JavaScript and Python versions.
- “CharNG,” a character n-gram generation tool, Edde Addad, 2011. JavaScript.
- “WpN,” an automated, generalized tool for N+7 modification of texts (à la Oulipo), Edde Addad, 2011. JavaScript.
- “Lede,” nm, 2012. JavaScript.
- “JavaScript Haiku Generator,” Rianne Trujillo, 2012. One of innumerable haiku generators, this one is concise and was written by someone learning to program. JavaScript.
- “Round,” nm, 2013. Both JavaScript and Python versions.
- “Ruby Yacht,” nm, 2013. Ruby.
- “Upstart,” nm, 2013. JavaScript.
- “Modern Perverbs,” nm, 2013. JavaScript.
- Tracery, a text-expansion library, Kate Compton, 2014. JavaScript.
- “Hexes,” nm, 2015. JavaScript.
- “More Tongue,” nm, 2015. JavaScript.
Generated Books
- Action Score Generator, Nathan Walker, 2015.
- Cigarette Boy: A Mock Machine Mock-Epic, Darick Chamberlin, 1991.
- Generation[s], J. R. Carpenter, 2010.
- How It Is In Common Tongues, John Cayley and Daniel C. Howe, 2012.
- Irritant, Darby Larson, 2013.
- The Policeman’s Beard is Half Constructed, Racter, 1984.
- Sentences, Charles O. Hartman and Hugh Kenner, 1995.
Generating Compound Words in Python
Here is code representing an end-to-end process of opening an English word list and generating a lists of prefix, suffix lists for use directly in “Upstart,” even though it uses JavaScript and this work is done in Python. You can download either the iPython Notebook file or the corresponding “plain” Python file.
Topics Covered
- “Upstart” modification.
- Follow-along program modification in JavaScript, changing data, parameters, code.
- Follow-along programming in iPython Notebook to explore English and develop new compound words.
- Presentation on exploratory programming and distribution of draft book on the topic.
- Rapid review and reporting on books of or related to computer-generated language.
- Historical & global glances at Memory Slam & Renderings.
- Selection of a small-scale program for modification.
- Share web/JavaScript modifications. Show what you’ve done, read from it if applicable (e.g. if it is not a purely glyphic or concrete work), then frame & discuss it.
- Share “The Two.” Discussion of antecedents, translations. If apropos, presentation & discussion of other work by nm.
- Platform studies presentation with Q&A.
- Python compounding review, discussion, completion of yesterday’s follow-along exercise.
- Collaborative Python project. Work in pairs, read the results aloud to share your work, then hear one or more responses or comments from others. See some ways to do it in three.py and (for printing every combination) three_exhaustive.py.