## 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

###

Generating Generation(s)

I’m writing a new book. It’s writing itself, really. It’s called GENERATION(S). It expands upon Story Generation(s), a series of short fictions generated by Python scripts adapted (with permission) from 1k story generators written by Nick Montfort. GENERATION(S) also incorporates GORGE, a never-ending tract spewing verse approximations, poetic paroxysms on food, consumption, decadence and desire, a hack of Montfort’s elegant poetry generator Taroko Gorge.

In the print book, GENERATION(S), the texts the generators produce are intertwined with the generators’ source code, and these two types of texts are in turn interrupted by excerpts from the meta narrative that went into their creation. For example, most of the sentences in the fictions generated by I’ve Died and Gone to Devon started off as Tweets, which were then pulled into Facebook. Some led to comments that led to responses that led to new texts. The following exchange started as a Tweet, was pulled into Facebook, became this sentence in Devon.py: “On a clear day, from the top of the drive we can see south to the sea,” and led to this blog post: To See the Sea. All these stages of intermediation are represented in the print book iteration of GENERATION(S).

Generation(s) will be published by TRAUMAWEIN, Vienna-based publishers of international works of codework, interfiction, microprose, chatlog, gamelog, twitter / facebook feeds and other new narrative forms, every 3 months in book form and in much more frequently online.

“The thing about trauma is to make “screenshots/timestamps” of those never ending stories going on.” Luc Gross, TRAUMAWIEN

GENERATION(S) goes to the printers by the end of this month and will be launched in Vienna July 23, 2010.