Skip to main content Skip to secondary navigation
Main content start

Algorithms meet art at Code Poetry Slam held at Stanford

A Stanford computer scientist took top honors by synthesizing a poetic half-human, half-machine performance of the Twenty-Third Psalm.
Leslie Wu talks to the audience about some of the creative choices she made in composing her poem “Say 23.” | Photo by Matt Davenport

Stanford students have merged the logic of computer code with the beauty of the spoken word at what may have been the world’s first code poetry slam.

Code poems are written in or about a computer programming language. Code poets have been uploading their works to websites such as PerlMonks since the mid-2000s.

The organizers of the recent Stanford event wanted to try something new: they wanted coders to perform their poetry live.

“Humanists don’t usually overlap with computer scientists,” said Melissa Kagen, an event coordinator and a doctoral candidate in German studies at Stanford.

She and three other coordinators designed the slam to bring together the usually distinct disciplines of performance and programming.

Judges selected eight finalists, including six Stanford students and two others, from a pool of online submissions and invited them to present their code poems in front of an intimate audience in Wallenberg Hall on Nov. 20. The event was sponsored by Stanford’s Division of Literatures, Cultures, and Languages.

Given the success of their inaugural event, the coordinators plan to hold a second code poetry slam in the winter quarter. Code poets interested in participating can submit their works online until Feb. 12.

Computer science doctoral student Leslie Wu won the November contest with a rendition of the 23rd chapter from the Book of Psalms, the Bible passage that famously begins with “The Lord is my shepherd, I shall not want.” (King James Version) She said she picked the psalm because it was her father’s favorite.

“I wanted to challenge the notions of what to most people is a foreign language,” Wu said. “If you don’t speak a foreign language and you hear a poem, you can still hear beauty.”

Wu first read her poem, “Say 23,” in the Ruby programming language in which it was written.

As she read the poem, she entered the code into her laptop. She then ran the program, which downloaded Psalm 23. Her code then rearranged selected words from the Scripture, assigned them precise audio frequencies and instructed the computer to recite the reconstructed psalm. Buried within her code was a hymn.

A video of the computer portion of her performance can be viewed below.

“I wanted to create this performance that was like the author summoning the poem,” she said.

Her computer “was expressing its take on the psalm,” Wu said. “It was literally sing-songing it.”

 

The winning entry from a contest at Stanford School of Engineering that challenged computer scientists to write poetry involving computer code was the 23rd Psalm recited by computer. (Video: Matt Davenport)

Other poets also composed codes that compiled to create poetry.

Ashank Singh, a junior at American High School in Fremont, wrote an executable ode to Dennis Ritchie called “The Man Who Changed Everything.” Ritchie developed the C programming language.

Another code poem called “allGoRhythm” was performed entirely by machine voices. The poem’s programmer, Paul Hertz, attended the slam via Skype from Chicago.

“I don’t know how he heard about it,” said Kurt James Werner, an organizer and a doctoral candidate in Stanford’s Center for Computer Research in Music and Acoustics.

The submissions fell into two broad categories. While some coders programmed executable files that produced poems, others constructed stanzas using distinctive programming words and command structures. Wu did both.

The organizers decided that Wu was most deserving of top honors because of how well she incorporated so many elements.

Like any artist, Wu made these choices deliberately.

“I had all these notions of spoken code that are implicit to me,” Wu said. “I was very specific about how I wanted people to read it.”

Stanford doctoral student Caroline Egan and Stanford graduate Mayank Sanganeria also helped organize the inaugural code poetry slam.