## READ WRITE GARDEN ## – an erasure poem un-written in RUBY code comments

Nearly a year ago the American book-artist Karen Randall invited me to contribute to an an international anthology of poems involving computer languages, especially the RUBY language, in honor of the Millay Colony‘s ruby anniversary. The result is The Ill-Tempered Rubyist, pictured below. I can safely say that this is the most physically beautiful book I’ve ever been a part of.

The Ill-Tempered Rubyist
– photo by Karen Randall

The cover collage was created in PhotoShop, then transferred to polymer, and printed by letterpress. The text is printed on Reich inkjet paper using an Epson Stylus Pro 3800 printer. The volume is bound using the Japanese side-slab method. The finished book is housed in a clamshell case covered in red cloth.

## READ WRITE GARDEN ##
– photo by J. R. Carpenter

When Karen first wrote to me I happened to be ensconced on a water-lily farm in the south of France. I had gardens on my mind. The only bit of RUBY code on hand I had on hand was written by Cornwall-based performance writer and programmer Caden Lovelace. Struck by the repeated mention of gardens in Caden’s extensive code comments, I began carving out the following erasure poem. Note that in real life, as in code life, this poem has a fairly strict system of indentation. In blog life, however, these indentations seem determined to disappear.

## READ WRITE GARDEN ##

# erasure by J. R. Carpenter
# source by Caden Lovelace

$dir = File.dirname(__GARDEN__)

def read_texts()
return Dir[$dir+”/texts/*.txt”].map do |garden|
File.read(garden)
end
end

#### we want to split
#### our text into units
####
#### punctuation marks allow us
#### to treat them as words
####
#### consider the ellipsis
#### for example
####
#### spaces
#### on either side of certain

def tokenize_texts(texts)
return texts.map do |text|
text.gsub!(/(\w)([,.:;\/?!]|\.\.\.+)(\W)/i, ‘\1 \2 \3’)
text.split(‘ ‘)
end
end

#### words often come
#### after other words
####
#### we walk through our garden
#### counting pairs

def generate_frequency_table(tokenized_texts, n)
frequency_table = {}
tokenized_texts.each do |text|
text.each_with_index do |word, i|
if i+2 < text.length # is there a word after this one? end end #### we write by deciding #### which path to take #### #### say we have three words #### say we know their probability #### #### [‘walk' => 3, ‘garden’ => 2, ‘words => 4]
####
#### we sum these numbers
#### we pick a lesser number at random
####
#### is the probability of ‘walk’
#### greater than random?

last_word = last_words.join(‘ ‘)
if freq.has_key?(last_word)
# have we any paths to take?

#### here we separate
#### the punctuation
####
#### make it a word
#### put it back

def fix_punctuation(text)
return text.gsub(/ ([,.:;\/?!]|\.\.\.+) /, ‘\1 ‘).gsub(/ ” /, ‘” ‘)
end

#### here we use all
#### we’ve written there

frequency_table = generate_frequency_table(tokenize_texts(read_texts()), 2)

# here ‘2’ means word-pairs

#### here we set our seeds

seeds = [“I know”, “I was”, “I have”, “but I”, “if we”, “of his”, “that she”, “allow us”, “the text”, “the other”, “the same”, “what is”, “on the”, “of the”, “in the”, “through the”, “we have”, “we know”, “the probability”, “the frequency”, “a word”,­­­­­­ “here we”, “we sum”, “we set”, “our seeds”, “we want”, “we walk”, “we separate”, “we run”, “we read”, “we write”, “our garden”].map {|seed| seed.split(‘ ‘) }

seeds.each do |seed|
10.times do

end
end

In addition to being stunningly beautiful, The Ill-Tempered Rubyist contains contributions and collaborations from an impressive list of well-known code poets, performers, and authors of digital literature from around the world:

Contributors

HAROLD ABRAMOWITZ WITH DAN RICHERT
mIEKAL aND
MEZ BREEZE
J.R.CARPENTER WITH CADEN LOVELACE
CLAIRE DONATO
NATALIA FEDOROVA
CHRISTOPHER FUNKHOUSER
ANGELA GENUSA
SAMANTHA GORMAN WITH DANNY CANNIZZARO
JHAVE
JEFF T. JOHNSON
DEENA LARSEN WITH ROBERT LAVETT SMITH
GRACIE LEAVITT
ALVIN MWIJUKA
JOYELLE MCSWEENEY
NICK MONTFORT
JÖRG PIRINGER
JONATHAN SCHOENFELDER
ALAN SONDHEIM
CHRISTINA STRONG

###

Leave a Reply