Code Poetry Slam 2.0

programmers and poets: create! compose! compile! (+ pizza)

Stanford University
Division of Literatures,
Cultures, and Languages

Code Poetry Slam 2.0

Lying With Computers

Submissions are open for Stanford University's 3rd Code Poetry Slam! The slam will be held January 23rd, 2015, 5-7 pm in Wallenberg Hall 124, and submissions are due by December 31st, 2014. Check out the Submissions tab for the form to submit.

Stanford University's Division of Literatures, Cultures, and Languages (DLCL) sponsors a series of Code Poetry Slams. Code Poetry Slam 1.0 was held on November 20th, 2013, and Code Poetry Slam 1.1 was held on February 27th, 2014, both in Wallenberg Hall, Rm. 124, at Stanford University.

What is "code poetry"? A C++ sonnet? A Haskell haiku? An algorithmic poetry generator? Something completely new? Check out our Resources tab for examples, theory, and other groups holding similar events!

Code Poetry means different things depending on who you ask. For a start, it can mean poems, written in a programming language, that are meant to be read purely as words on a page (see Code{Poems}); code that aims for elegant expression within severe constraints, like a haiku or a sonnet (see 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 or ChucKus), or code that generates automatic poetry (see OuLiPo for poetic background, or google for online examples- there are hundreds). Some definitions are directly at odds with each other. Obfuscated code (see the chapter on Obfuscated Code in Software Studies: a lexicon) brings attention to language by being creatively obtuse, whereas articles by Ward, Hoffmann, and Stewart talk about how code is poetic because it's so elegant and compact.

With this series, we're particularly interested in code that is beautiful to read and simultaneously executable, in line with Ian Bogost's idea in Alien Phenomenology that creative projects should *do* something. Poems that are readable to humans AND readable to computers perform a kind of cyborg double coding (in language, double coding means a sentence that is readable in multiple languages at once: Jean put dire comment on tape (in translation from French, "Jean is able to say how one types")). Check out some of the resources below and figure out what aspect of code poetry interests you!

Writers and Theorists
  • Introduction to The Wedge by William Carlos Williams

    “There’s nothing sentimental about a machine, and: A poem is a small (or large) machine made of words. When I say there’s nothing sentimental about a poem I mean that there can be no part, as in any other machine, that is redundant.”

  • OuLiPo

    Wiki on works from the Ouvroir de littérature potentielle.

  • S/Z excerpt by Roland Barthes

    Classic text from the 60's that points toward multi-level, code-inflected writing.

  • Philosophical Investigations by Ludwig Wittgenstein

    "It is easy to imagine a language consisting only of orders and reports in battle.—Or a language consisting only of questions and expressions for answering yes and no. And innumerable others.—— And to imagine a language means to imagine a form of life."

  • Software Studies: a lexicon, ed. Matthew Fuller

    Great compilation of short articles on coding from multiple perspectives. Check out in particular the Introduction and the chapters on Language, Obfuscated Code, Memory, Source Code and Weird Languages.

  • "Virtual Bodies and Flickering Signifiers" by N. Katherine Hayles

    "The contemporary pressure toward dematerialization, understood as an epistemic shift toward pattern/randomness and away from presence/absence, affects human and textual bodies on two levels at once, as a change in the body (the material substrate) and a change in the message (the codes of representation)."

    N. Katherine Hayles is a giant in the field. For more, read her book How We Became Posthuman: Virtual Bodies in Cybernetics, Literature, and Informatics.

  • "Digital Code and Literary Text" by Florian Cramer

    "...computers and digital poetry might teach us to pay more attention to codes and control structures coded into all language. In more general terms, program code contaminates in itself two concepts which are traditionally juxtaposed and unresolved in modern linguistics: the structure, as conceived of in formalism and structuralism, and the performative, as developed by speech act theory."

  • 10 PRINT CHR$(205.5+RND(1)); : GOTO 10

    A close reading of one line of code by 10 theorists: Nick Montfort, Patsy Baudoin, John Bell, Ian Bogost, Jeremy Douglass, Mark C. Marino, Michael Mateas, Casey Reas, Mark Sample, Noah Vawter.

  • "Print is Flat, Code is Deep: The Importance fo Media Specific Analysis" by N. Katherine Hayles

    "Nine points can be made about the specificities of electronic hypertext: they are dynamic images; they include both analogue resemblance and digital coding; they are generated through fragmentation and recombination; they have depth and operate in three dimensions; they are written in code as well as natural language; they are mutable and transformable; they are spaces to navigate; they are written and read in distributed cognitive environments; and they initiate and demand cyborg reading practices."



Fill out this form with your name, email address, language(s) in which your poem is written, title, and the text of your poem.

Code Poetry Slam 1.0 [Fall 2013]

Stanford's first Code Poetry Slam, sponsored by the Division of Literatures, Cultures, and Languages (DLCL), was held on November 20th, 2013 in Building 160 (Wallenberg Hall). Following an open call for works from September 20th to November 6th, we selected 8 finalists. At the Slam, finalists presented work ranging from human language poems incorporating concepts and gestures from programming, to poems written entirely in compilable code. They were invited to present their poems in whatever way they saw fit, and performed with various techniques, including poems composed and compiled in an IDE, multimedia audio/visual presentations, and straight readings from a notebook.

A semi-moderated discussion followed the presentations. Finalists talked in depth about their poems and fielded questions from the audience. One theme that came up repeatedly was how code can express things that words can't and how programming makes you think differently about language.

An interdisciplinary group of judges awarded Leslie Wu, Stanford Computer Science PhDc, first place for her poem "Say 23."

  • Caroline Egan, DLCL PhDc
  • Melissa Kagen, DLCL PhDc
  • Mayank Sanganeria, CCRMA MA MST'13
  • Kurt James Werner, CCRMA PhDc

Say 23   Leslie Wu [@GitHub]

#!/usr/bin/env ruby
require 'rubygems' # gratitude
require 'nokogiri' # arigato
%w(Zarvox Princess Cellos).each{|v|`say -v #{v}
.map {|i|h[i]}.join(' ')}`}

All A Men   Parwana Fayyaz

In 11,000 nights of 10957.3 days,
A-A-A-A-A-A-A-A have confusingly digressed,
Their √(heroism)= meekness^ nerves
As results:
#1: while from @7 until @7, their women
[9A dots+ inside a green room+ beneath the bright sun+ under the blue sky]
<99.99%> each year child * by any other child,
A leaves, A comes, A changes dress, A slams the door, A slaps,
A enters her body, A behaves like a child, A leaves.
#3: evening: fear of nightfall +#1+#2, results
#4: midnight: [two A dots+ inside the crimson room+ the crescent moon+ a star]
A leaves at midnight, A born dead. The last A never comes again.
A is dead, A is dead, A is d..., A is …, A is…., A …, A…, A…………., [breathe]

All.go.rhythm   Paul Hertz

include everything.*;
void wonder(Universe u) {
  while (ever || never) {
    for (Poem i in {
      Word dust = u.speak(i);
      for (Moment mote in dust) {
        wonder(new Universe(mote));

ThatGirl   Ian Holmes

import java.Object.*

public class ThatGirl {
  public SomethingBetter main() {
    return whatYouFound;

Expect_Delays   Dylan Moore

private Boolean she_smiles_for_me() {
  while(true) {
    try {
    } catch (InterruptedException e) {}
  return true;

College, College   Quyen Nguyen

public class Fall () {

  public void freshmanYr () {

  public void sophomoreYr () {
    println ("The slump.");
    println ("Confusion.");
    println ("Some people have it all figured out.");
    println ("They have even,");
    println ("declared.");

  public void juniorYr () {
    println ("Let me online shop for business casual clothes");
    println ("and a big black folder");
    println ("big enough for my big fat resume");
    println ("Let me catch up with my fellow job-seekers, go-getters, soul-auctioneers,");
    println ("Let me murder my former dreams with M&A and DCF");
    println ("Let me forget Eliot and Shakespeare");
    println ("The artist in me, a ghost, has finally left.");

  private void seniorYrAndOut () {
    while (true) {
      println ("Welcome to the begin of the end.");


The Man Who Changed Everything   Ashank Singh

#include <stdio.h>

int Hello = 1;
int World = 0;
int True = 1;

  int happy = True;

  if (happy = True) {
    World = 1;
  } else {
    World = 0;

  int Title, line_1, line_2, line_3, line_4 = Hello;
  int line_5, line_6, line_7, line_8, line_9 = World;

  int The_, Man_, who, Changed, Everything = Title;
  int There, once, was, _a, man, _who, changed, everything = line_1;
  int He, opened, our, eyes, so, that, we, could, see = line_2;
  int The, vast, forest, in, the, language, C = line_3;
  int He_, did, _not, want, _to, put_, a_, price, on_, anything = line_4;
  int Unlike, t_h_e, others, who_, sold, _everything = line_5;
  int Open_source, projects, _and, Unix, live, _o_n_ = line_6;
  int As_, we_, _continue, to, code, _on = line_7;
  int _W_e_, _wil_l, always_, remember, _th_e, m_an_, _w_h_o_, said, helloworld = line_8;
  int _He_is_the_, _one_, _and_, _only_, Dennis, Ritchie = line_9;

  if (Title, line_1, line_2, line_3, line_4 = Hello) {
    printf("                    The Man who Changed Everything       \n");
    printf("             There once was a man who changed everything \n");
    printf("             He opened our eyes so that we could see \n");
    printf("             The vast forest in the language, C \n");
    printf("             He didn't want to put a price on anything\n");
  if (line_5, line_6, line_7, line_8, line_9 = World) {
    printf("             Unlike the others who sold everything\n");
    printf("             Open-source projects and Unix still live on\n");
    printf("             As we continue to code on\n");
    printf("             We will always remember the man who said ''Hello World''\n");
    printf("             He is the one and only, Dennis Ritchie.\n");


A While is not a But   Sophia Westwood

A while is not a but --
but a but is but a but.
But while a while is but a while
But while a while to switch to but.

Code Poetry Slam 1.1 [Winter 2014]

  • Caroline Egan, DLCL PhDc
  • Melissa Kagen, DLCL PhDc
  • Kurt James Werner, CCRMA PhDc

21st Century Prophecies   Hunter Bacot, Surrogate: Keshav Dimri

the_medium = "twitter"
require the_medium
medium = do |medium|
  medium.consumer_key        = " "
  medium.consumer_secret     = " "
  medium.access_token        = " "
  medium.access_token_secret = " "

virtues = []
virtues << medium.user("elonmusk").tweet.text
virtues << medium.user("KingJames").tweet.text
virtues << medium.user("Pontifex").tweet.text
virtues << medium.user("KimJongNumberUn").tweet.text
virtues << medium.user("Beyonce").tweet.text
virtues << medium.user("richardbranson").tweet.text
virtues << medium.user("god").tweet.text
# a moment of clarity
virtues << "\n#{Faraday.get("").body}""prophets_manifesto.txt", "w") do |out|  
  virtues.each { |truth| out.puts truth }

system "open prophets_manifesto.txt"

A Pythonic Lament   Mike Widner

The circumstances
def bemoan():
our_lives_must = ['end']
the_suffering = [True]        # Read as "the suff'ring"
she = 'loves you'
love = 'a string of memories'
alone = bemoan
alas = alone

The lament
for poetry in the_suffering:
for variables in our_lives_must:
if None and 1 or 1 and None:
if love.split() or she.replace('you', ''):
        the_suffering.escape() and love.admit()
        for one_day in our_lives_must:

TITLE   Jonah Galeota Sprung, Surrogate: Michael St. Clair

  from __future__ import print_function
from time import sleep
import string
from random import uniform
import sys

def process_input(in_string):
        in_string = in_string.translate(None, '.!?')
        words = in_string.lower().split()
        words.sort(key=len, reverse=True)
        return words

def wait(n): #sleep() was misbehaving
        k = 0
        for i in range(1,1000000*n):
                k = i+1

def printT(in_string): 
        for c in in_string:

def body():
        line1 = "\n\ni can't tell anymore "
        line2 = "what's parody and what isn't. "; line2_1 = "this song"
        line3 = "                --the clock,"
        line4 = "                    again--"
                                                               #user text
        line5= "no, sleeping doesn't work." ;line5_1 = " and"
        line6 = "she's sick to death of numbers"
        line7 = "anyway. \n"
        line8 = "\nwhen would you start\nto worry?"
        line9 = "                --shivers, "
        line10 = "                   wood--"
        line11 = "the cousins are closing in "
        line12 = "like an ellipse. none of this"
        line13 = "reads both ways, neither of us"
        line14 = "does."
           line15 = "                --soon,"
        line16 = "                 a home--"
        line17 = "you're right,"
        line18 = "i'm out of my league. \nin over my head."

        line19 = "but there never were many houses"
        line20 = "to speak of, \nwere there?"
        line21 = "what could we have done, really."
        line22 = "what could we do."
        print('\n'+ '\033[1m'+ line3)
        print(line4 +'\033[0m')
        in1 = raw_input('                                       ')
        printT('\n' + line5); wait(2); print (line5_1); wait(1)
        in2 = raw_input('                                      ')
        in3 = raw_input('                                      ')
        in4 = raw_input('                                      ')
        utext1 = process_input(in2)
        utext2 = process_input(in3)
        print('\n'+ '\033[1m'+ line9)
        print(line10 +'\033[0m'+'\n')
        printT(utext1[0]+'? '+utext2[0]+'? '+ line11+'\n')
        in5 = raw_input('                                      ')
        in6 = raw_input('                                      ')
        print('\n'+ '\033[1m'+ line15)
        print(line16 +'\033[0m'+'\n')
        in7 = raw_input('                               ')
        printT(in7+'. . . \n')
        in8 = raw_input('                               ')
        in9 = raw_input('                               ')

have you heard my startup pitch   Nathaniel Smith, Surrogate: Elena Dancu

they walked together by habit
in only filthy coveralls
with little more sense than a rabbit
speaking of defunct protocols.

the stuff began to twist and writhe,
spilling over and draining out its side.
this was a most illicit enterprise
like netsites in roma provide.

they flung it into the gulf:
a pillow upholstered in scalp.
hands stained like the muzzle of a wolf,
they resumed kicking along the whelp.

like businessmen draped in the pelt of an art nerd
they turned their backs on this poisoned world.

Capsized   Zak Kain, Surrogate: Christina Hall

.ocean {
    color: cornflowerblue;
    pitch: high;
    overflow: visible;

.boat {
    color: firebrick;
    transform: rotate(94deg);
    float: none;

.rescue-team {
    visibility: visible;

.crew {
    widows: none;

The Tell   Jeff Thompson, Surrogate: Grainne Watson

The tell.
The the the that thou that make, make and, might bear might might heir heir, tender heir heir might say stop.
Stop stop.
Posterity stop beauty's beguile churl tender churl mak'st waste.

Mak'st warm warm lies abundance.
Where thy.
And content content thy buriest, buriest thy content and old art buriest.
Art old.
Thy not renewest thou dost beguile.

Beguile dost thou in trenches trenches renewest trenches deep deep his self lusty days lusty self his deep deep dig of of of of of of treasure tomb of his deep not not thou thou not thou not thy old and see famine where abundance blood blood thy thy blood churl mak'st the beguile the mak'st waste world thy thou thy thou thou posterity, stop beauty's beguile beguile churl tender churl blood churl.
Blood blood.
Abundance, lies couldst but.
Couldst couldst answer couldst couldst.
Thou couldst answer answer as as lies fond will will be will where lies beauty but die thy, beauty lies as the as lies beauty, but couldst lies lies thy.
When waste world thy field field.
Posterity stop.
Stop posterity within say stop posterity field thy thy world world unbless in unbless.
Unbless youth's thy field the beguile the field thy.
Thou art own own deep deep, sunken.
Thou proving his beauty his proving world's proving his contracted eyes contracted his.


Beauty ornament and only and only that only herald thine succession.
Succession thine this were the to to this.
To the to herald face thee thee and thee.
Thee face, should should face face herald herald to to this this.

This eyes shame eyes this.
Thine this this were, were to thy light's light's thy to gaudy the to the to.
Should when forty form another winters.
Shall winters shall besiege.

Me and You   Matthew Lee, Surrogate: Myles Borins

import random

traits = ["only speak when spoken to", "never know how to introduce myself", "hide in the middle of a group", "lead in the front", "make my opinions known", "do all of my homework", "have a plan", "know what will work and won't", "believe in true love", "get caught in the past", "know the future will be better", "want to please", "set goals", "smile at strangers", "watch my feet when walking", "look for things to do", "let things unfold", "climb trees", "keep my feet on the ground", "walk fast", "drive slow", "read the newspaper", "watch cartoons", "eat breakfast", "believe in the midnight snack", "snore", "yawn loudly", "love vegetables", "eat gluten-free", "get cold easily", "need a hug", "get lost in eyes", "hate my reflection", "sing in the shower", "give others the benefit of the doubt", "double-check the lock on the door", "watch the sunrise", "floss", "hide my scars", "listen to Chopin", "keep a diary", "scrapbook", "knit", "sweat a lot", "wash your hands before eating", "pray"]

def Me():
        my_trait = traits[random.randint(0, len(traits)-1)]
        print "I " + my_trait + "."
        return my_trait

def You():
        your_trait = traits[random.randint(0, len(traits)-1)]
        your_trait = your_trait.replace("my", "your")
        your_trait = your_trait.replace("am", "are")
        print "You " + your_trait + "."
        return your_trait

def WillItWork(me, you):
        print "Will it work?"
        willitwork = random.choice(["Yes", "No"])
        print willitwork + "."
        if willitwork == "No":
                print "Will it be okay?"
                print random.choice(["Yes", "No"]) + "."

me = Me()
you = You()

WillItWork(me, you)

Timers Run On   Zata Kitowski

If A=1, B=2, C=3…              “TIMERS RUN ON”  = 166
                                           word base:               166
                                           number of words:         3
                                           re-arrangements:         3
Forgetting something does not imply that that something forgot you, just as closing a door does not eliminate the possibility that something interesting goes on in the open room on the other side. For, we were in this false room, close, thread-thought scattered, looking: something happened. Open footsteps, a threaded time maybe, returning. Nothing mine. Semi-memories and light lucid dreams brought me no closer. Remember, you stayed, yes, led a strange thread out, white shadows, love, caves in sack, no dice, carrying them, carrying on past the closed door into strange out-times, picking up hints, shaping my name, another mirror room of an unfinished meaning, on past the sentence and door closing, into another moment like a room – here, is now happening. It is made only always believe it. Know the cup of words. See space face everywhere, future petals before us. Thread me. The message is in a number. Were something to happen to "we" then, like thread fed through caves?
Closing. Into another room just as something interesting goes, picking up my scattered thought in a sack, and carrying past the door. Then, forgetting to close it, returning, carrying on into another room of past possibility. The closed door does not imply something strange: always a lucid now. See, no light is everywhere. A looking thread maybe does not eliminate caves. That thread led through a number of white petals, that mirror thread, fed on false footsteps. The strange times made them something threaded out like love-caves. Semi-words brought me no closer. The message is here, in dreams and cup-space, closing shadows before us. In the room threadshaping on the other side, know time forgot you: face the open moment, remember only nothing. Believe dice future-memories. We mine meaning for hints. "We were in this room", is it happening? Yes. You happened. Open me out. Were a something to happen, that something stayed an unfinished sentence, like closing a door on a name.
Something “unfinished” happened: scattered thread, we were a possibility happening. Time does not eliminate space in this mirror, shaping the past and carrying my love into the caves. Looking closed the door onto false thought. In that dice-cup, a name threaded footsteps that fed you to them, into a strange lucid forgetting led me, just an interesting sentence-thread, closing something: a number. Happen on a closing room-door, open the door - another room does not imply meaning, only another thread like a returning moment carrying on, closer now. Like a strange sack of something as nothing, caves. Something light, past and future goes in it, you see. The petals of dreams brought me here. Always out-believe before memories. Know the shadows face us everywhere. Mine for something: time’s thread, close it. Remember we stayed, forgot. White is in words. No yes no. Maybe, then, through picking up hints (the semi-message), an out-room is made on the other side. Were that room open…

self_inspect.rb   Macario Ortega, Surrogate: Sarah Quesada

                                   class Proc
                                     def in_discomfort?; :me; end
you_are = you = 
 ->(you) do
  self.inspect until true
  until nil
    break you
  puts you.in_discomfort?


Call and Response   Julian Bliss

%The world we now initialize...

%Constraints away from prying eyes...
\tkzDefPoint(-8, 3){H}
\tkzDefPoint(-8, -7){E}
\tkzDefPoint(0, -2){L}
\tkzDefPoint(-4, -2){O}
\tkzDefPoint(-4, -7){W}
\tkzDefPoint(-8, -2){R}
\tkzDefPoint(0, -7){D}

%The origin we improvise...
\tkzDrawPoint(0, 0)

%We beckon to the world so wise...
\tkzDrawSegments(H,E L,L O,W O,R L,D)

%Upon compile the world replies.

for every i, there is a stronger us   Charles Mulloy


using namespace std;

class For_every
    void ngular(){cout << endl << "I";};
    void que(){cout<<"f";};
    void ng(){cout<<" w";};
    void ghting(){cout << " d";};
    void vidual(){cout << "e";};
    void ving(){cout << "e";};
    void on(){cout << " n";};
class there_is_a_stronger
    void t(){cout << "ot ";};
    void _(){ cout << "hang ";};
    void taining(){cout << endl << "together,";};
    void ting(){ cout << "we will ";};
    void tling(){cout<< "surely " << endl;};
    void ed(){cout << "seperately" << endl;};

int main()
        For_every i; there_is_a_stronger us;
        /*s*/i.ngular(); /*un*/i.que();
    /*try*/; /*str*/i.ving(); /*f*/i.ghting();
/*ind*/i.vidual(); /*isolat*/i.on(); /*tr*/us.t(); /*foc*/us._();
    /*s*/us.taining(); /*adj*/us.ting(); /*b*/us.tling();
        /*victori*/us._(); /*f*/us.ed();

Apache Code Errors   Aimee Norton

201 created
200 OK
100 continue
200 OK

303 see other
302 found
303 see other
409 conflict

403 forbidden
520 origin error
402 payment required
413 too large

303 see other
405 not allowed
417 expectation failed
423 locked down

502 bad gateway
307 redirect
204 no content
205 reset

305 use proxy
422 unprocessable entity
426 upgrade required
409 conflict

415 unsupported
429 too many requests
416 not satisfiable
417 failed

306 switched proxy
444 no response
449 retry
511 authenticate

301 moved permanently 
401 unauthorized
506 variant negotiates
523 declined 

406 not acceptable
451 illegal

599 timeout (unknown)
424 failed dependency

496 no certificate 
423 locked away
598 timeout
598 timeout

If Nothing Else   Sandra Trinh

Private Conversation
        Declare I As “melodramatic heroine”
        Declare You As “almost villain”
        Declare Setting As “our shared bed”

        If I = a few glasses of whiskey in
                You = disgruntled person

                Grievances = 3

                Loop If Grievances >= 0 
                        You.Output(“I love you, but”)
                        I.Output(“Just say it”)
                        I.Output(“That’s bullshit “ + why do I keep 
                        trying + “we’ve talked about this already “ + 
                        I keep doing this over and over again + “I 
                        thought we were over this “ + I can’t do this 

                        Grievances = Grievances - 1
                End Loop

                If I = still have energy to fight
                        Us.Argument(anything, everything)
                        You = unwilling to be with me
                        I.beginPacking(books, clothes, whiskey)
                        You = say you still love me
                        I = drink some more
                        I = sleep on the floor
                        where Carpet = soft + comfortable +
                                more hospitable than CurrentSetting
                You = sleep in a few minutes
                I = curl up against a hard corner

samsara for dummies   Quyen Nguyen

/*let us assign the wanderer 
to an anonymous variable x*/

while (avidya) {        //avidya: failure to see; a lifelong delusion
   x = dukkha;        //dukkha: failure to accept decline; an addiction to permanence 

print "probable exit from samsara";
print "to";
print "";

Other code poetry slams we've heard about

Created by Melissa Kagen and Kurt James Werner

Contact with any questions or comments