The OUTPUT Anthology is Out!

OUTPUT: An Anthology of Computer-Generated Text 1953–2023 in a hand model’s hands (or an AI facsimile thereof?)

I’m delighted that after more than four years of work by Lillian-Yvonne Bertram and myself — we’re co-editors of this book — the MIT Press and Counterpath have jointly published

Output: An Anthology of Computer-Generated Text, 1953–2023

Book launch events are posted here and will be updated as new ones are scheduled!

This anthology spans seven decades of computer-generated text, beginning before the term “artificial intelligence” was even coined. While not restricted to poetry, fiction, and other creative projects, it reveals the rich work that has been done by artists, poets, and other sorts of writers who have taken computing and code into their own hands. The anthology includes examples of powerful and principled rhetorical generation along with story generation systems based on cognitive research. There are examples of “real news” generation that has already been informing us — along with hoaxes and humor.

Page spread from OUTPUT with Everest Pipkin’s i’ve never picked a protected flower

Page spread from OUTPUT with Talan Memmott’s Self Portrait(s) [as Other(s)]

Page spread from OUTPUT with thricedotted’s The Seeker

It’s all contextualized by brief introductions to each excerpt, longer introductions to each fine-grained genre of text generation, and an overall introduction that Lillian-Yvonne and I wrote. There are 200 selections in the 500-page book, which we hope will be a valuable sourcebook for academics and students — but also a way for general readers to learn about innovations in computing and writing.

You can buy Output now from several sources. I suggest your favorite independent bookseller! If you’re in the Boston area, stop by the MIT Press Bookstore which as of this writing, has 21 on hand as of actually publishing this post, has 14 copies!

Book Launches

December 6 (Friday) Output will be available and I’ll be at the Bad Quarto / Nick Montfort table at Center for Book Arts Winter Market, 28 W 27th St Floor 3, 4pm–8pm.

December 9 (Monday) Book launch at Book Club Bar with the editors, Charles Bernstein, Robin Hill, Stephanie Strickland, and Leonard Richardson. 197 E 3rd St (at Ave B), New York City’s East Village. Free, RSVP required. 8pm.

December 13 (Friday) European book launch with the editors, Scott Rettberg, and others TBA. University of Bergen’s Center for Digital Narrative, Langesgaten 1-2, 3:30pm. Free & open to the public.

Previous Events

November 11 (Monday): Both editors spoke at the University of Virginia, Bryan Hall, Faculty Lounge, Floor 2. Free & open to the public. 5pm.

November 20 (Wednesday): Online book launch for Output, hosted by the University of Maryland. Both editors in conversation with Matt Kirschenbaum. Free, register on Zoom. 12noon Eastern Time.

November 21 (Thursday) Book launch at WordHack with me, David Gissen, Sasha Stiles, Andrew Yoon, and open mic presenters. Wonderville, 1186 Broadway, Brooklyn, 7pm.

Gram’s Fairy Tales: Manual & Grimoire

Taper, an online literary magazine published twice yearly, is now in its 12th issue. An independent editorial collective (Kyle Booten, Angela Chang, Kavi Duvvoori, Leonardo Flores, Helen Shewolfe Tseng, and Andy Wallace, for this issue) makes all the decisions about selections, themes for forthcoming issues, and so on, and also handles all communication with authors. They do all the work! Editors are allowed to submit works, in which case they recuse themselves from the collective’s discussion. I’m proud to be publisher of this magazine — although it’s really the editorial collective that makes it happen.

My “Gram’s Fairy Tales” was selected for this issue, with “Tools” as its theme!

A story grammar in a textarea (below) and a generated story about a heroic lily, a villainous droplet, and a chanterelle who helps the hero.

For those who haven’t visited Taper, when you do, you’ll find that the poems are computational and are no more than 2KB (2048 bytes) in size. (Issue #1 hosted 1KB poems and issue #3 had ones that were 3KB, but Goldilocks found the ideal constraint in 2KB.) Issue #12 features a lot of general-purpose programs that are true tools, textual or otherwise, as well as dynamic text generators that speak to the theme. In fact, the issue is our largest yet, with 32 selections.

To read what the author/programmers say about their work, in their statements, you generally have to “View Page Source” (or choose the similar option in your browser) and look at a comment at the top of each page, which is licensed as free (libre) software so you can make use of it in any way you like. However, given the theme of this issue, I wrote “Gram’s Fairy Tales” to not only give access to the underlying HTML5, but also to let people write grammars that can be placed in a text area and used to generate stories. Given this, I’m going to pull a bit from my “author statement,” found in complete form in the comments, and post it here. I’ll also provide three novel story grammars written by others: Jhave Jhonston (author of ReRites), Kyle Booten (author of Salon des Fantômes), and Kavi Duvvoori (author of Common Is That They).

Inspirations, InstructionsJhave’sKyle’sKavi’s

Two Inspiring Systems, and Instructions

As I developed “Gram’s Fairy Tales,” I was thinking about two remarkable story generation systems, very different ones, both quite simple.

One is the mid-1980s Story Machine, which I’ve known about for a while in its Commodore 64 incarnation. It is a strangely animistic system in which any entity can perform any transitive or intransitive action. While there are multimedia elements and some notion of state, it essentially develops narratives one independent sentence at a time.

The other is a system by Joseph Grimes, operational in Mexico City in 1963. Only one text from this story generator is documented. It seems to have produced stories based on a story grammar, with formalist structures. So, a hero would be challenged in some way and overcome the challenge. The one-page magazine article about the system suggested that it could be called “Grimes’s Fairy Tales.”

“Gram’s Fairy Tales” uses a simple grammar to generate stories. There are special “hero” and “villain” tokens, which always refer to the same two entities, selected from the “entity” rule. You don’t have a pool of good guys and bad guys; any entities are equally likely to be heroes and villains.

Beyond those special tokens, the other nonterminal tokens (the lowercase ones) expand according to rules, with each represented as one line in the text field.

The “|” indicates alternatives; these are split apart first.

The “+” indicates a conjunction of elements; all of those will appear.

Tokens keep getting expanded until eventually there is a run of text which in my example grammars are in all caps. These are “terminals,” and ends up being presented as is, without any further transformation.

Your grammar needs to begin with a “story” rule, and it should have “adj” and “entity” rules so a hero and villain can be determined. Anything else is up to you. Indeed, you don’t actually have to refer to a hero or villain.

My terminals are in all caps (making for an all-caps story) simply because it’s tricky to get the capitalization of sentences right. It would make things harder for those who want to edit the grammar and create their own stories, and the grammar is already a bit tricky.

Spaces have to be included properly at the beginning and ending of terminals, for instance, except for the terminals that come at the very end of stories.

Also, if you have entities or adjectives that begin with a vowel sound, you’ll end up with grammatical mistakes. The solution in this simple tool (or toy) — simply use adjectives and entities that all begin with consonant sounds!

To get an idea of how to write your own grammar, you may want to start with an extremely simple one, such as:

story>hero+ FOUGHT +villain+.|hero+ TOOK A NAP.
adj>CLEVER|STRONG
entity>FOX|CHICKEN

Jhave’s Grammar: A Harmonious Moment

Here’s a striking project by Jhave Johnston, who is my colleague at the University of Bergen Center for Digital Narrative and winner of the Robert Coover Award. You’ll notice that Jhave wrote his grammar to enable proper capitalization, despite the difficulty of that. Although the right side of the text is hidden, you can select it all and paste it into “Gram’s Fairy Tales” to see how it works.

story>intro+conclusion
intro>In the heart of +emotion+, +entities+ +verb+ in +concept+|Abiding as  +emotion+, +entities+ +verb+ in +concept+|Before +emotion+, +entities+ +verb+ in +concept+|Imperturbable in +emotion+, +entities+ +verb+ in +concept+|Serendipitous as +emotion+, +entities+ +verb+ in +concept+|Surrounded by  +emotion+, +entities+ +verb+ in +concept+|Amidst +emotion+, +entities+ +verb+ in +concept+|Beyond +emotion+, +entities+ +verb+ in +concept+
emotion>serenity|peace|tranquility|joyousness|tenderness|compassion|love|radiance|integrity
entities>entities_nature+ and +entities_tech
entities_nature>brooks|forest|cascade|swamp|torrent|ravines|refugees|stars|orchards|plateaus|tendrils|alleyways|groves|mountains|rivers|fields|meadows|ridges|oceans|orchards|moons|blossoms|nebulae|subduction trenches
entities_tech>LEDs|torrents|media|villains|dollar-stores|ditches|pop-ups|server-farms|antennae|antagonists|satellites|philosophies|trinkets|video-walls|entrails|exiles|synapses|heroes|plastics
verb>merged|thrived|replenished|enjoyed|trembled|reveried|prospered
concept>precon+conce
precon>harmony, |wisdom's light, |exuberance, |cohesion, |unity, |solidarity, |changelessness, |insight, 
conce>seeking mutual actualization|observing mutual transcendence|flourishing with supple realization|witnessing collective discovery|imploding within perfect revelation|imploding within effortless actualization|observing ripe achievement|listening to shared success
conclusion>.

A custom grammar generates “Surrounded by peace, blossoms and antennae merged in solidarity, listening to shared success.”

Kyle Booten’s Grammar: How to Compose an Ode

Kyle is a longtime member of the Taper editorial collective — since issue #5 in fall 2020! — and has long been working to have computer text generation provoke his own (and others’) writing. His grammar produces instructions for writing odes of different sorts, and is the most elaborate by far, clocking in at 70 lines, with several that are essentially comments or blank. Again, you can select all of these and paste them into “Gram’s” without trouble, although some of the text on the right side is obscured.

Pindar Horace Hordar 
(An Ode-Gym)
Kyle Booten


story>HOW TO WRITE AN ODE: +ode_type
ode_type>pindaric|pindaric|pindaric|pindaric|horatian|horatian|horatian|horatian|blended



PINDARIC

pindaric> (TURN) +strophe+ (COUNTERTURN) +antistrophe+ (STAND) +epode
strophe>IN A STANZA OF +p_lines+ +short_or_long+ +meter1+ LINES, ADOPTING A +style1+ TENOR, DESCRIBE +hero+, WITH PARTICULAR ATTENTION TO THE +p_feature+ OF +hero+.
meter1>DACTYLLIC|DACTYLLIC|DACTYLLIC|QUASI-AEOLIC|LOGAOEDIC
meter2>meter_adjust+ +meter1|TROCHAIC|IAMBIC
meter_adjust>NOT|ANYTHING BUT|ONLY IMPERFECTLY
p_lines>6|8|8|10|12
short_or_long>BRIEF|BRIEF|BRIEF|LENGTHY|LENGTHY|LENGTHY|ABSURDLY LONG
p_feature>LAUREL|ORDER|VIRTUE|LAW|DECREE|STRENGTH|CRIME|FATE
style1>SOLEMN|MYSTICAL|GNOMIC|JAGGED|SUBLIME|MORALISTIC|GOVERNMENTAL|MUSCULAR|LAUDATORY|REVERENT|JUBILANT
antistrophe>USING THE SAME STANZAIC STRUCTURE BUT NOW +style_or_mentioning+, CONTRAPOSE +hero+ WITH ITS INVERSE AND ENEMY, +villain+.
style_or_mentioning>style2|MENTIONING +p_trait
style2>ZANY|PIXELATED|EUPHORIC|REVERENT|BLOODTHIRSTY|STERN|RECURSIVE|VITUPERATIVE|BRUTALIST|PARANOID|ANGUISHED
p_trait>THE STATE|A GOD|A WAR|A SPORT|A MORAL|A VIRTUE|A CONQUEST|A VICTORY|A NATURAL DISASTER
epode>NOW, WITH +subtract+ FEWER LINES, AND THESE +ep_style+, IMAGINE HOW +hero+ SHALL +do_to_villain+ +villain+.
ep_style>meter2|style1|style2|short_or_long|short_or_long+ AND +meter2|style1+ AND +style2|style2+ AND +meter2
subtract>2|2|2|3|3|3|4|4|5
do_to_villain>OVERCOME|OVERCOME|OVERCOME|REFORM|BANISH|DEMOTE|CENSURE|STEAL FROM|WED|WOUND|BECOME


HORATIAN

horatian>IN +stanzas+ STANZAS, EACH OF 4 LINES, DESCRIBE +hero+, +gradient+.|IN +stanzas+ STANZAS, EACH OF 4 LINES, DESCRIBE +hero+, +gradient+. +extra+.
gradient>PROGRESSING GENTLY FROM+ +concept_statement|PROGRESSING GENTLY FROM+ +concept_statement+ AND SIMULTANEOUSLY FROM +concept_statement2
concept_statement>concept+ TO +concept2
concept>THE +cognizing+ OF THE +abstraction+ OF +object|THE +cognizing2+ OF THE +abstraction2+ OF +object
concept2>THE +cognizing2+ OF THE +abstraction+ OF +object|THE +cognizing+ OF THE +abstraction2+ OF +object2
concept_statement2>GREEN TO BLUE|BLUE TO GREEN|WEALTH TO POVERTY|MORNING TO NIGHT|RAIN TO SLEEP|YOUTH TO OLD AGE|FALL TO SPRING|WINTER TO SUMMER
abstraction>PAIN|SADNESS|LOSS|HUMOR|FRAILTY|YEARNING
abstraction2>LOSS|GROWTH|MERCY|HISTORY|TIMELESSNESS|MORTALITY
cognizing>AWARENESS|FORGIVENESS|HATRED|NON-AWARENESS|APPRECIATION|MISUNDERSTANDING|SYMPATHY
cognizing2>ACCEPTANCE|PERCEPTION|REGRETTING|UNDERSTANDING
object>hero|hero|hero|hero|LIFE IN GENERAL
object2>hero|hero|hero|hero|villain|LIFE IN GENERAL
stanzas>3|4|4|6|6|8|10
extra>REMARK IN THE +count_line+ LINE UPON +extra_object|prosody
extra_object>THE +h_feature+ OF +hero|WINE|WINE|WINE|A MORSEL|A MORSEL|A FRIEND
h_feature>FLAVOR|SIZE|TEXTURE|FAMILY|POSITION|TEMPERATURE|ECHO|INTERIOR|FORM|TEMPERAMENT|HONOR|HUE
count_line>1ST|rel_num|rel_num+ TO LAST
prosody>MIMIC +poet+'S METER
poet>SAPPHO|ALCAEUS
rel_num>2ND|3RD|4TH


BLENDED

blended>bl1|bl2|bl3|bl4|bl5|bl6
bl1>[STANZA 1: +pindaric_bit+] [STANZA 2: +pindaric_bit+] [STANZA 3: +horatian_bit+]
bl2>[STANZA 1: +pindaric_bit+] [STANZA 2: +horatian_bit+] [STANZA 3: +pindaric_bit+]
bl3>[STANZA 1: +horatian_bit+] [STANZA 2: +pindaric_bit+] [STANZA 3: +pindaric_bit+]
bl4>[STANZA 1: +pindaric_bit+] [STANZA 2: +horatian_bit+] [STANZA 3: +horatian_bit+]
bl5>[STANZA 1: +horatian_bit+] [STANZA 2: +horatian_bit+] [STANZA 3: +pindaric_bit+]
bl6>[STANZA 1: +horatian_bit+] [STANZA 2: +pindaric_bit+] [STANZA 3: +horatian_bit+]
pindaric_bit>meter1|meter2|short_or_long|style1|style1|style_or_mentioning|strophe|ep_style
horatian_bit>gradient|gradient|extra|extra_object|cognizing|cognizing2|concept_statement|concept|concept2|concept_statement2|prosody


adj>VINTAGE|COMMON|CIVIC|BROKEN|HONEYED|PAINTED|SACRED|HUNGRY|VERNAL|FLEETING
entity>VASE|FRIEND|DOVE|DEER|FRUIT|LAKE|HOUSE|GAME|TUNE|STORM|GLEN|KNOT|VEIL|WRIT

Kavi Duvvoori’s Most Grammatical Grammar

Kavi joined the editorial collective of Taper for this issue (#12) and has really put their shoulder to the wheel! They (like Jhave & Kyle) have been producing serious computer-generated texts and adjacent projects, of course with particular twists. Their grammar uses story elements (hero, villain) and does tell a story — but one about grammars.

story>theory+.|theory+. +coda+.
theory>A +academic+ +critiqued+ +hero+, +noting+ +villain+ IS +really+ A +metaphor+|+villain+ WAS +endorsed+ BY A +academic+ WITH +hero+ USED AS A +vessel+ TO CATCH THE +metaphor|+villain+ IS ITSELF +really+ +surface+, ESPECIALLY +hero+|+hero+ BY A +academic+ IS +villain+ THAT DESCRIBES, FINALLY, THE +metaphor+
coda>+villain+ +ofthis+ IS THE +metaphor+ PUT IN A +vessel+ BY +hero+reversal+|+villain+ +ofthis+ IS +hero+reversal+
ofthis>OF THIS STORY|IN OUR TALE|FOR OUR PURPOSES HERE
reversal> (OR DO I HAVE IT BACKWARDS?)| (WAS IT REALLY THAT +coda+?)|
response>+critiqued+ THE +problem+ IN|+endorsed+
critiqued>FOUND A GAP IN|DISPUTED|ELABORATED TO APORIA
endorsed>REINFORCED|ELABORATED ON|SHOWN TO NOT POSSESS THE ALLEGED +problem+
academic>linguist|+specialty+ +linguist+|SOCIOLOGIST OF THE +academic+
specialty>COMPUTATIONAL|CRITICAL|CREATIVE|HISTORICAL
linguist>POET|LINGUIST|PHILOLOGIST|LITERARY THEORIST
problem>LACK OF RIGOUR|IDEALISM|CONTRADICTIONS|PROBLEMS
noting>NOTING THAT|SHOWING HOW|FOR
really>REALLY|IN FACT|IN TRUTH
metaphor>image+ ON +surface|churn+ +metaphor
image>SHADOW|REFLECTION|PICTURE
vessel>NET|SIEVE|DISPLAY CASE
churn>SHIFTING|FLOWING|CHURNING
surface>A BUILDING'S WALL|A PAGE|SKIN|+churn+ +flow
flow>CURRENTS|WATER|LEAVES|WIND|MUD
adj>CHOMSKYAN|PANINIAN|MOSTLY ADELE GOLDBERG-INSPIRED|PRIMARILY IRENE HEIM-DERIVED|MONTAGUE|LAKOFFIAN|CHARLES SANDERS PIERCE-ROOTED
entity>GRAMMAR|MODEL|LOGIC|FORMALISM

“A FORMALISM IS ITSELF IN TRUTH A PAGE, ESPECIALLY A LAKOFFIAN MODEL.” Plus a grammar.

C64 Coding Under (Many) Constraints

Screenshot from Tyger Tyger; black and white border, scattering of orange and black characters on blue

Yesterday I wrote a little demoscene production, an intro, called “Tyger Tyger.” It’s a Commodore 64 machine language program with 32 bytes of code and the requisite 2 byte header, found on all C64 PRG files. It only garnered third place out of five entries in the 256b compos at @party 2021, behind two impressive entries that were for a different platform (DOS) and went to the limit of allowable code (eight times as much).

I wrote this intro under a formal constraint (32 bytes of machine language code) and several process constraints. Specifically, I wrote it all yesterday, mostly on a Amtrak train, finishing up the sound once I got to the party itself in Somverville. I also exclusively used a hardware Commodore 64 running Turbo Macro Pro v1.2, rather than cross-assembling the code on a contemporary computer and testing it on an emulator. To be specific, I used an unofficial hardware version of the Commodore 64 called the Ultimate 64, which is a modern FPGA implementation of Commodore’s hardware—not, however, an emulator. I placed a SID chip (a 6581) in the machine, so the only analog component that would otherwise need to be emulated was an authentic original.

Writing the code exclusively on the train provided me with some additional challenges, because the power kept cutting out and my system (which has to be plugged into AC power) shut off each time.

I’d never used any version of Turbo Macro Pro before, neither the C64 assembler nor TMPx, the cross-assembler. I figured out the basics of how to use the editor and learned the syntax the assembler used. It’s quite an excellent piece of software—thanks, Style!

And tremendous thanks to Dr. Claw, who put on a safe, responsible, demoparty—masks required when not eating, full vaccination required for all. It was a tiny one, yes, but it was a party! The event continues the important social and artistic traditions of the North American demoscene.

Sea and Spar Between 1.0.2

When it rains, it pours, which matters even on the sea.

Thanks to bug reports by Barry Rountree and Jan Grant, via the 2020 Critical Code Studies Working Group (CCSWG), there is now another new version of Sea and Spar Between which includes additional bug fixes affecting the interface as well as the generation of language.

As before, all the files in this version 1.0.2.are available in a zipfile, for those who care to study or modify them.

Sea and Spar Between 1.0.1

Stephanie Strickland and I published the first version of Sea and Spar Between in 2010, in Dear Navigator, a journal no longer online. In 2013 The Winter Anthology republished it. That year we also provided another version of this poetry system for Digital Humanities Quarterly (DHQ), cut to fit the toolspun course, identical in terms of how it functions but including, in comments within the code, what is essentially a paper about the detailed workings of the system. In those comments, we wrote:

The following syllables, which were commonly used as words by either Melville or Dickinson, are combined by the generator into compound words.

However, due to a programming error, that was not the case. In what we will now have to call Sea and Spar Between 1, the line:

syllable.concat(melvilleSyllable);

does not accomplish the purpose of adding the Melville one-syllable words to the variable syllable. It should have been:

syllable = syllable.concat(melvilleSyllable);

I noticed this omission only years later. As a result, the compound or kenning “toolspun” never was actually produced in any existing version of Sea and Spar Between, including the one available here on nickm.com. This was a frustrating situation, but after Stephanie and I discussed it briefly, we decided that we would wait to consider an updated version until this defect was discovered by someone else, such as a critic or translator.

It took a while, but a close reading of Sea and Spar Between by Aaron Pinnix, who considered the system’s output rather than its code, has finally brought this to the surface. Pinnix is writing a critique of several ocean-based works in his Fordham dissertation. We express our gratitude to him.

The result of adding 11 characters to the code (obviously a minor sort of bug fix, from that perspective) makes a significant difference (to us, at least!) in the workings of the system and the text that is produced. It restores our intention to bring Dickinson’s and Melville’s language together in this aspect of text generation. We ask that everyone reading Sea and Spar Between use the current version.

Updated 2020-02-02: Version 1.0.2 is now out, as explained in this post.

We do not have the ability to change the system as it is published in The Winter Anthology or DHQ, so we are presenting Sea and Spar Between 1.0.1 1.0.2 here on nickm.com. The JavaScript and the “How to Read” page indicate that this version, which replaces the previous one, is 1.0.1 1.0.2.

Updated 2020-02-02: Version 1.0.2 is the current one now and the one which we endorse. If you wish to study or modify the code in Sea and Spar Between and would like the convenience of downloading a zipfile, please use this version 1.0.2.

Previous versions, not endorsed by us: Version 1 zipfile, and version 1.0.1 zipfile. These would be only of very specialized interest!

Incidentally, there was another mistake in the code that we discovered after the 2010 publication and before we finished the highly commented DHQ version. We decided not to alter this part of the program, as we still approved of the way the system functioned. Those interested are invited to read the comments beginning “While the previous function does produce such lines” in cut to fit the toolspun course.

Nano-NaNoGenMo or #NNNGM

Ah, distinctly I remember it was in the bleak November;
And each separate bit and pixel wrought a novel on GitHub.

April may be the cruelest month, and now the month associated with poetry, but November is the month associated with novel-writing, via NaNoWriMo, National Novel Writing Month. Now, thanks to an offhand comment by Darius Kazemi and the work of Hugo van Kemenade, November is also associated with the computer-generation of novels, broadly speaking. Any computer program and its 50,000 word+ output qualifies as an entry in NaNoGenMo, National Novel Generation Month.

NaNoGenMo does have a sort of barrier to entry: People often think they have to do something elaborate, despite anyone being explicitly allowed to produce a novel consisting entirely of meows. Those new to NaNoGenMo may look up to, for instance, the amazingly talented Ross Goodwin. In his own attempt to further climate change, he decided to code up an energy-intensive GPT-2 text generator while flying on a commercial jet. You’d think that for his next trick this guy might hop in a car, take a road trip, and generate a novel using a LSTM RNN! Those who look up so such efforts — and it’s hard not to, when they’re conducted at 30,000 feet and also quite clever — might end up thinking that computer-generated novels must use complex code and masses of data.

And yet, there is so much that can be done with simple programs that consume very little energy and can be fully understood by their programmers and others.

Because of this, I have recently announced Nano-NaNoGenMo. On Mastodon and Twitter (using #NNNGM) I have declared that November will also be the month in which people write computer programs that are at most 256 characters, and which generate 50,000 word or more novels. These can use Project Gutenberg files, as they are named on that site, as input. Or, they can run without using any input.

I have produced three Nano-NaNoGenMo (or #NNNGM) entries for 2019. In addition to being not very taxing computationally, one of these happens to have been written on an extremely energy-efficient electric train. Here they are. I won’t gloss each one, but I will provide a few comments on each, along with the full code for you to look at right in this blog post, and with links to both bash shell script files and the final output.

OB-DCK; or, THE (SELFLESS) WHALE


perl -0pe 's/.?K/**/s;s/MOBY(.)DI/OB$1D/g;s/D.r/Nick Montfort/;s/E W/E (SELFLESS) W/g;s/\b(I ?|me|my|myself|am|us|we|our|ourselves)\b//gi;s/\r\n\r\n/
/g;s/\r\n/ /g;s//\n\n/g;s/ +/ /g;s/(“?) ([,.;:]?)/$1$2/g;s/\nEnd .//s’ 2701-0.txt #NNNGM

WordPress has mangled this code despite it being in a code element; Use the following link to obtain a runnable version of it:

OB-DCK; or, THE (SELFLESS) WHALE code

OB DCK; or, THE (SELFLESS) WHALE, the novel

The program, performing a simple regular expression substitution, removes all first-person pronouns from Moby-Dick. Indeed, OB-DCK is “MOBY-DICK” with “MY” removed from MOBY and “I” from DICK. Chapter 1 begins:

Call Ishmael. Some years ago—never mind how long precisely—having little or no money in purse, and nothing particular to interest on shore, thought would sail about a little and see the watery part of the world. It is a way have of driving off the spleen and regulating the circulation. Whenever find growing grim about the mouth; whenever it is a damp, drizzly November in soul; whenever find involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral meet; and especially whenever hypos get such an upper hand of , that it requires a strong moral principle to prevent from deliberately stepping into the street, and methodically knocking people’s hats off—then, account it high time to get to sea as soon as can. This is substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with .

Because Ishmael is removed as the “I” of the story, on a grammatical level there is (spoiler alert!) no human at all left at the end of book.

consequence


perl -e 'sub n{(unpack"(A4)*","backbodybookcasedoorfacefacthandheadhomelifenamepartplayroomsidetimeweekwordworkyear")[rand 21]}print"consequence\nNick Montfort\n\na beginning";for(;$i<12500;$i++){print" & so a ".n;if(rand()<.6){print n}}print".\n"' #NNNGM

consequence code

consequence, the novel

Using compounding of the sort found in my computer-generated long poem The Truelist and my “ppg 256-3,” this presents a sequence of things — sometimes formed from a single very common four-letter word, sometimes from two combined — that, it is stated, somehow follow from each other:

a beginning & so a name & so a fact & so a case & so a bookdoor & so a head & so a factwork & so a sidelife & so a door & so a door & so a factback & so a backplay & so a name & so a facebook & so a lifecase & so a partpart & so a hand & so a bookname & so a face & so a homeyear & so a bookfact & so a book & so a hand & so a head & so a headhead & so a book & so a face & so a namename & so a life & so a hand & so a side & so a time & so a yearname & so a backface & so a headface & so a headweek & so a headside & so a bookface & so a bookhome & so a lifedoor & so a bookyear & so a workback & so a room & so a face & so a body & so a faceweek & so a sidecase & so a time & so a body & so a fact […]

Too Much Help at Once


python -c "help('topics')" | python -c "import sys;print('Too Much Help at Once\nNick Montfort');[i for i in sorted(''.join(sys.stdin.readlines()[3:]).split()) if print('\n'+i+'\n') or help(i)]" #NNNGM

Too Much Help at Once code

Too Much Help at Once, the novel

The program looks up all the help topics provided within the (usually interactive) help system inside Python itself. Then, it asks for help on everything, in alphabetical order, producing 70k+ words of text, according the GNU utility wc. The novel that results is, of course, an appropriation of text others have written; it arranges but doesn’t even transform that text. To me, however, it does have some meaning. Too Much Help at Once models one classic mistake that beginning programmers can make: Thinking that it’s somehow useful to read comprehensively about programming, or about a programming language, rather than actually using that programming language and writing some programs. Here’s the very beginning:

Too Much Help at Once
Nick Montfort

ASSERTION

The “assert” statement
**********************

Assert statements are a convenient way to insert debugging assertions
into a program:

assert_stmt ::= “assert” expression [“,” expression]

A plot

So far I have noted one other #NNNGM entry, A plot by Milton Läufer, which I am reproducing here in corrected form, according to the author’s note:


perl -e 'sub n{(split/ /,"wedding murder suspicion birth hunt jealousy death party tension banishment trial verdict treason fight crush friendship trip loss")[rand 17]}print"A plot\nMilton Läufer\n\n";for(;$i<12500;$i++){print" and then a ".n}print".\n"'

Related in structure to consequence, but with words of varying length that do not compound, Läufer’s novel winds through not four weddings and a funeral, but about, in expectation, 735 weddings and 735 murders in addition to 735 deaths, leaving us to ponder the meaning of “a crush” when it occurs in different contexts:

and then a wedding and then a murder and then a trip and then a hunt and then a crush and then a trip and then a death and then a murder and then a trip and then a fight and then a treason and then a fight and then a crush and then a fight and then a friendship and then a murder and then a wedding and then a friendship and then a suspicion and then a party and then a treason and then a birth and then a treason and then a tension and then a birth and then a hunt and then a friendship and then a trip and then a wedding and then a birth and then a death and then a death and then a wedding and then a treason and then a suspicion and then a birth and then a jealousy and then a trip and then a jealousy and then a party and then a tension and then a tension and then a trip and then a treason and then a crush and then a death and then a banishment […]

Share, enjoy, and please participate by adding your Nano-NaNoGenMo entries as NaNoGenMo entries (via the GitHub site) and by tooting & tweeting them!

My @party Talk on Computer-Generated Books

I just gave a talk at the local demoparty, @party. While I haven’t written out notes and it wasn’t recorded, here are the slides. The talk was “Book Productions: The Latest in Computer-Generated Literary Art,” and included some discussion of how computer-generated literary books related to demoscene productions.

Salon 256 on May 1

SALON 256 is a forum for presentation and discussion of very small creative computer programs. Such programs have featured in digital art and poetry, electronic literature, computer music, and the demoscene.

YOU are invited to present a tiny program of yours:

Monday May 1 . 5pm-7pm . MIT’s 14E-304

Presenters already confirmed:

  • Mike “Dr.Claw” Piantedosi
  • Angela Chang
  • Sofian Audry
  • Nick Montfort
  • Chris Kerich
  • Willy Wu
  • Henry Lieberman
  • Doug Orleans

Programs in an interpreted language are fine, as long as the code is 256 bytes or less; compiled programs with an executable file of 256b or less are fine, too.

Building 14 also holds the Hayden Library and is not Building E14.
If you’d like to present, leave a comment or sign up at the event.

A Purple Blurb / The Trope Tank production.

Tiny Trope Tank Productions

Recently, at the suggestion of our writer in residence, Milton Läufer, we in the Trope Tankt have been producing digital files for discussion at meetings. These productions, almost always computer programs but not constrained to be such, must be at most 256 bytes.

It’s been extremely productive in terms of thinking about digital media, platforms and programming languages, and how we approach creative projects — and even other projects — generally. Postdoctoral researcher Sofian Audry prompted us to discuss this some at the last meeting.

So far we have three sets of 256b files which have landed in this directory, organized by date and with file names that indicate who wrote what:

http://nickm.com/trope_tank/256/

They include work by RA Chris Kerich, who has produced rather demoscene-like visual effects using Python running in a terminal, and by postdoctoral researcher Angela Chang, who has provided short example programs for use in teaching. Angela’s examples show that you don’t have to have hypercompressed, confused code when you write short, interesting programs. You can value clarity and pedagogical usefulness if you like, or you can pack in as much as possible, for instance, in order to produce a visual effect.

Sofian has explored creative computing history by writing a 256b Commodore 64 BASIC program that implements, or at least strongly refers to, the classic Lemonade Stand BASIC program. Milton has generated various compelling visual displays. His and Chris’s most recent programs are less clearly mathematical and regular, instead imitating the natural world.

It was very apropos that Christian Bök pointed me to Dwitter, a framework for making tiny programs that can be easily shared on the Web, just recently. I’m sure we’ll all dig into that soon.

My pieces include one bash script, one Python 3 program, and an executable of 256b written in assembly for the Commodore 64. The Python 3 program is actually a very tiny text adventure, Wastes, and is listed on the Interactive Fiction Database. In fact, I’m pleased to see that at this point, it has one four-star (our of five) review!

Hello, Globe

On Saturday, the 400th anniversary of Shakespeare’s death (and, happy birthday, too, Will), I delivered to Twitter, via post-haste dispatch, the following four Commodore 64 BASIC programs, versions of the famous “Hello world” program:


400 ? chr$(147)"hello world":for a=1 to 500:next:? chr$(19)"brave":new:rem #c64

400 ? chr$(144)chr$(79)chr$(84)"hello world":rem #c64

400 ? "hello world"chr$(4^3+(2*b or not 2*b)):rem #c64

400 for a=0to255:? chr$(147)spc(a)"(QRQ) hello world":next:? chr$(147):rem #c64

Type ’em in to a for-real Commodore 64 or to this Web-based emulator here. No special characters are involved, so entering these programs should be easy; lowercase letters will appear capitalized and the few capital ones will appear as graphical symbols.

Let me know what you think … and if you see the relationship to four of Shakespeare’s plays.

Great Workshop for New Programmers at Babycastles

I had a launch event Saturday afternoon for my new book, Exploratory Programming for the Arts and Humanities. Not a typical reading or book party, but a workshop for people completely new to programming but interested in pursuing it. It was at the excellent gallery and venue, Babycastles, on West 14th Street in Manhattan.

I don’t actually have the list of attendees – I’d like to sent everyone a note, but it will have to wait! – but two people I knew beforehand participated and ten others joined in, with some people from Babycastles also participating and helping out. (Special thanks to Lauren Gardner for hosting!) I was very glad that the group was diverse in terms of gender, race, background, interests … also, pleased that this time around we had more people who were genuinely new to programming. I’ve done similar workshops before, prior to the publication of Exploratory Programming, and often there are folks who have had some programming classes and done some programming projects before. I’m glad to help such people as they re-start work with code, but I tried to make sure this time that there was no crypto-prerequisite suggested; the session really was for those wanting to program but lacking background.

Of course we dealt with programming as culturally situated and meaningful within art, poetry, writing, and inquiry. We used the historical Memory Slam examples that I prepared a few years ago for another event in Lower Manhattan.

Because the book is out and registration for the workshop included a copy of it, I didn’t feel the need to go through particular code examples that are in there. I was able to frame the whole idea of programming and focus on a few early specifics in both JavaScript and Python – showing that code is just editing a text file; that there’s a difference between code and data (and parameters, too); and that error messages can be helpful rather than frustrating. We did work with specific code, but didn’t cover specific code discussions in the book or the exercises in there. The book is for use in a classroom, but also for individual learners, to allow people to continue their work as programmers formally and informally.

Many people introducing a new book will have book parties, with or without readings, that draw a much larger crowd that this event did. But, as Brian Eno said about the Velvet Underground’s first album, not many people bought it but all the people who did started a band. I hope everyone who participated in this modest event at Babycastles goes on to start a band, by developing a programming practice engaged with the arts and humanities.

Update: I should have mentioned – we’ll have a similar workshop on May 15 at the School for Poetic Computation!

Language Hacking at SXSW Interactive

We had a great panel at SXSW Interactive on March 11, exploring several radical ways in which langauge and computing are intersecting. It was “Hacking Language: Bots, IF and Esolangs.” I moderated; the main speakers were Allison Parrish a.k.a. @aparrish; Daniel Temkin
DBA @rottytooth; and Emily Short, alias @emshort.

I kicked things off by showing some simple combinatorial text generators, including the modifiable “Stochastic Texts” from my Memory Slam reimplementation and my super-simple startup name generator, Upstart. No slides from me, just links and a bit of quick modification to show how easily one can work with literary langauge and a Web generator.

Allison Parrish, top bot maker, spoke about how the most interesting Twitter bots, rather than beign spammy and harmful or full of delightful utility, are enacing a critique of the banal corporate system that Twitter has carefully been shaped into by its makers (and compliant users). Allison showed her and other’s work; The theoretical basis for her discussion was Iain Borden’s “Another Pavement, Another Beach: Skateboarding and the Performative Critique of Architecture.” Read over Allison’s slides (with notes) to see the argument as she makes it:

Twitter Bots and the Performative Critique of Procedural Writing

Daniel Temkin introduced the group to esoteric programming languages, including several that he created and a few classics. He brought copies of a chapbook for people in the audience, too. We got a view of this programming-language creation activity generally – why people devise these projects, what they tell us about computing, and what they tell us about language – and learned some about Temkin’s own practice as an esolang developer. Take a look at Daniel’s slides and notes for the devious details:

Esolangs: A Guide to "Useless" Programming Languages

Finally, interactive fiction author Emily Short reviewed some of the classic problems of interactive fiction and how consideration has moved from the level of naïve physics to models of the social worlds – again, with reference to her own IF development and that of others. One example she presented early on was the challenge of responding to the IF command “look at my feet.” Although my first interactive fiction, Winchester’s Nightmare (1999) was not very remarkable generally, I’m pleased to note that it does at least offer a reasonable reply to this command:

Winchester's Nightmare excerpt

That was done by creating numerous objects of class “BodyPart” (or some similar name) which just generate error messages. Not sure if it was a tremendous breakthrough. But I think there is something to the idea of gently encouraging the interactor to o play within particular boundaries.

Emily’s slides (offering many other insights) may be posted in a bit – she is still traveling. I’ll link them here, if so.

Update! Emily’s slides are now online — please take a look.

I had a trio of questions for each pair of presenters, and we had time for questions from the audience, too. The three main presenters each had really great, compact presentations that gave a critical survey of these insurgent areas, and we managed to see a bit of how they speak to each other, too. This session, and getting to talk with these three during and outside of it, certainly made SXSW Interactive worth the trip for me.

There’s an audio recording of the event that’s available, too.

Explorers of Bottomless Pit Return with Treasure

They found the key.
They found the key.

Far from plunging us into darkness, Reading Project: A Collaborative Analysis of William Poundstone’s Project for Tachistoscope {Bottomless Pit} provides brilliant and multifaceted reflections on a rapid, serial electronic literature work. (You can read Bottomless Pit for free online, by the way, in ELCv1 and on Poundstone’s site.)

The party that sets out on the adventure of this reading is Paladin Jessica Pressman, who seeks truly through media archeology and quests into thorny literary theories; Thief Mark C. Marino, who slyly reverse-engineers the program and acquires the source code, stealing sequences of words and images along with how they are produced; and Illusionist Jeremy Douglass, who summons visualizations of the piece that dazzle but also unfold new understandings. They ascend from the endless passage of Project, and from the dungeon of collaboration, with numerous new insights, showing how different reading strategies – ranging from rather conventional to quite novel – can inform one another. There’s so much background offered (etymological, historical, bibliographical) that one imagines it being drawn out of a bag of holding. The view of the project that emerges seems beyond what a Beholder would be able to comprehend.

These three cover the fundamental workings of Project well, showing the role of randomness (a saving throw of sequential words does not abolish chance) and how individual pixels shine during a loop of the main story text. What this text means and alludes to, and the presence of a second sequence of less coherent words, is also discussed, and connections are made between such meanings and references and the piece’s material and technical aspects. From the media technology of various historical tachistoscopes to the nature of the pit in Freudian psychoanalysis, there is a great deal about Project that is – let’s not say excavated, but illuminated – in this book.

In its engagement with computation, the relationship of recent computational work to historical and literary concepts, and in the way it helps to develop productive collaborative approaches in the humanities, this is a landmark investigation – almost surely deeper than you imagine. It’s essential reading for those interested in digital literature, but also also for anyone (concerned with e-lit or not) who wonders how humanistic thinking can continue to develop and how thinkers can work together in new ways.

Paging Babel

About 12 hours ago I was reading “The New Art of Making Books” by Ulises Carrión, a text I’d read before but which I hadn’t fully considered and engaged with. As I thought about Carrión’s writing, I felt compelled to put together a short piece on the Web. That took the form of a Web page containing a rapidly-moving concrete poem. The work I devised is called “Una página de Babel.”

Screen capture of Babel

Many will surely note that it is based on Jorge Luis Borges’s “Una biblioteca de Babel” (The Library of Babel). And, I hope people are aware of some the other interesting digital projects based on this story. I have seen one from years ago on CD-ROM; one that is very nice, and available on the Web, is Jeremiah Johnson’s BABEL. There’s also the exquisite Library of Babel by Jonathan Basile.

My piece does not try to closely and literally implement the library that Borges described, although it does have a page that is formally like the ones in Borges’s library: 80 characters wide, 40 lines long. Given this austere rectangular regularity, I assumed a typewriter-like monospace font.

The devotion of “Una página” to what the text describes stops there; instead of using the 23-letter alphabet that Borges sketches to populate this 80×40 grid, I use the unigram probabilities of letters in the story itself, in the Spanish text of “La biblioteca de Babel.” So, for instance, the lowercase letter a occurs a bit less than 8.4% of the time, and this is the probability with which it is produced on the page. The same holds for spaces, for the letter ñ, and for all other glyphs; they appear on the page at random, with the same probability that they do in Borges’s story. Because each letter is picked independently at random, the result does not bear much relationship to Spanish or any other human language, in which the occurrence of a glyph usually has something to do with the glyph before it (and before that, and so on).

“Una página” is also non-interactive. One can zoom, screenshot, copy and paste, and so on, but the program itself does not accept user input.

I sketched the program in Python before developing it in JavaScript, and when I was done with the HTML page that includes the JavaScript program, I thought I’d make a Python version, too. But when I did, I was disappointed; the Python program isn’t a page, and doesn’t produce a page, and so doesn’t seem to me to fit the concept, which has to be that of a page. Thus, I’m not going to release the Python program. The JavaScript version is the right one, in this case.

Running All Night

A recent production of mine, Running All Night, was shown at Babycastles in New York recently during the Playdate, July 23-August 7, 2015.

The piece is a 128-byte Commodore 64 program that functions as a clock or timer. It was executing during the whole show and presented a different image every moment of the day. Here’s once glance as what it looked like as it ran on a TV turned to face the window.

Running All NIght at Babycastles

There was also a TV inside and a single page (dot-matrix printed) of the assembly source code.

You Have Been Offered ‘More Tongue’

I just put a new poetry generator up. This one was released in inchoate form at @party, the Boston area demoparty. I’ve finished it, now, writing an HTML page of 2kb that employs JavaScript to generate nonsense poems that *I*, at least, find rather amusing.

More Tongue (paused)

‘More Tongue’ is available in an expanded version (functioning the same but with uncompressed code and more meaningful variable and function names) which I suggest for just about everyone, since I encourage everyone to study and modify the code, for fun, for art, and so on. If you want to see the 2k version working, that’s there too.

I could have compacted this below 2kb, although I rather doubt I’d have gotten it to 1kb without some major shift in the way the program works. I can see a few inefficiencies in how I put the program together, and while I did turn to some compression resources I didn’t use the famed Minify. I was happy, though, with what the 2kb page does.

I’ll be reading from this in about an hour at Babycastles’s WordHack event, here in Manhattan, during the open mic. Hope to see some of you there.

@Party 2015 Productions

I had five productions (one of them a collaboration) this time around at @Party, the Boston-area demoparty.

Browser demo: “More Tongue.” This was, well, not really a standard demo, even for a browser demo, that generates nonsense poems with compact code. Like everything at demoparties, it’s been released, but I’m going to work on a post-party version, so I’m leaving the party version out of this list.

Wild: “Shortcat.”

Shortcat is a very simple encoding scheme to make bytes (thus computer programs) into pleasing Unicode tweets, IMs, etc. #demoscene

Encoder: cat x.prg | perl -pe 'binmode STDOUT,":utf8";tr/\x00-\xff/\x{2500}-\x{25ff}/;' > x.txt #demoscene

Decoder: cat x.txt | perl -pe 's/[\x00-\x7f]//g;s/\xe2(.)(.)[^\xe2]\*/chr((ord($1)-148)\*64+ord($2)-128)/eg;' > x.prg #demoscene

To decode, copy the Shortcat string to a new text file, save it, decode. ASCII (incl. spaces & newlines) will be ignored #demoscene

When decoding, don’t include other Unicode besides the Shortcat string in your selection #demoscene

Add a hashtag (e.g., #c64) and/or other info (e.g., SYS4096) to help people run the program. That’s it. Nanointros everywhere! #demoscene

Check this Tweet for an example.

Executable music: “Dial Up” by devourant & nom de nom.

((((t\*2^12018^t>>16)&42)\*(t^12)&t>>5)>>3|t\*9&(t&4^42)>>5)-1

Play it in an HTML5 player.

Intro: “Chronon,” a 32-byte Commodore 64 program.

PRG file. Source.

PET Code

Demo: “PET Code,” a 128-byte Commodore 64 program that is a demake of Jörg Piringer’s “Unicode.”

PRG file, demo version (runs once & ends). PRG file, looping version. Source.

Thanks to Metoikos, Dr. Claw, Luis, and other organizers and volunteers for putting this year’s party on – and to Boston Cyberarts and the sponsors of the event.