Skip to content

News for Infinite Monkeys 3

June 15, 2014

I am currently working on a new scripting language for im3 which has a more BASIC-like syntax but also uses JSON objects as its base variable type. Variable declares, math operators, string operators, and basic math and string functions have been added as well as FOR and WHILE loops, array plucking and assignment, if/else procedures and I think I finally have the parser working properly. SMUP was clunky and difficult to work with so I decided to create a language which I felt was more enjoyable to play with and more powerful functionality wise. And importantly, I’m having a great deal of fun actually programming it.

I have also compiled my dictionary into a JSON object. It contains around 50k words, and has CMU’s Pronouncing dictionary appended to it. It contains part of speech information, keyword tagging, and stress information. That can be downloaded here:

im3 now makes it easier to add words en masse and any dictionary can now be exported as a JSON object, so I’m super excited about the project.

Also, today my EEG reader was delivered by NeuroSky and the developer’s kit is free, and written in object C, which I can work with. So there are plans in the works to start developing for the head set, which I think will be super fun.


New Version of prosaic

June 9, 2014

prosaic has evolved from unmaintainable piles of Perl and then Javascript to the pristine world of symbolic evaluation with a rewrite in a relatively young lisp-like language called Hy. Along with a cleaner and saner codebase, prosaic has a short explanatory readme, its first documentation to ever exist.

One can check out the new release on Github. If you’re more interested in poetry, here’s a series created using the previous version of prosaic based on thirty one cyberpunk novels.

Hy compiles to Python, making prosaic importable and programmatically callable from either Hy or Python. It also supports a simple command line interface:

    hy __init__.hy load some_text0.txt some_mongo_db_name
    hy __init__.hy load some_text1.txt some_mongo_db_name
    hy __init__.hy load some_text2.txt some_mongo_db_name

    hy __init__.hy create templates/haiku.json some_mongo_db_name

The above example adds three text files (presumably containing prose or poetry in English) to a MongoDB database and then asks prosaic to generate a poem using the haiku template, which looks like this:


Templates support the following keys:

  • syllables: number of desired syllables for the given line
  • keyword: line that matches string keyword
  • fuzzy: line that occurs near a line with string keyword
  • rhyme: letter indicating line’s place within a rhyme scheme.

A naive sonnet might look like this:

[{"rhyme": "A", "keyword":"vamplate"},
 {"rhyme": "B", "keyword":"stiletto"},
 {"rhyme": "A"},
 {"rhyme": "B", "fuzzy": "steed"},
 {"rhyme": "C", "fuzzy": "steed"},
 {"rhyme": "D"},
 {"rhyme": "C"},
 {"rhyme": "D", "keyword": "buckler"},
 {"rhyme": "E", "fuzzy": "buckler"},
 {"rhyme": "F"},
 {"rhyme": "E"},
 {"rhyme": "F"},
 {"rhyme": "G", "syllables": 10, "keyword": "giant"},
 {"rhyme": "G", "syllables": 10, "keyword": "dragon"}]

Keys can be mixed and matched ad nauseum for a given line.

The goal of this rewrite was to be able to run prosaic using threads to improve performance and to allow prosaic to be embedded within other, potentially web based, applications.

Ultimately, prosaic is still a hacked-up art project with a user base countable on one set of fingers. Don’t expect much in the way of support or usability, but do feel free to open issues on Github or send me an email if you have questions about it.

As always with open source software, patches are welcome.


my personal blog has more poetry (non-cyberpunk cut-up and fully human poetry). i say inane things at @nate_smith.

Thoughts on NaNoGenMo pt. 1

June 6, 2014

Man, I’m still glum that I missed National Novel Generation Month. I mean, my state of mind was such that I couldn’ta done anything worthwhile, but, you know… Anyway, I guess I can live vicariously by looking at the different generation methods people used.

So the goal is “Spend the month of November writing code that generates a novel of 50k+ words.” and “The only rule is that you share at least one novel and also your source code at the end.” If I remember NaNoWriMo, it’s not really a competition, more like a challenge to encourage people to do something, and this is more or less the same. It’s a little hard to tell how this could be judged anyway, since the books aren’t really anything you’d read through closely.

1. dariusk

Looking through the completed issues page, it looks like the first person to finish was dariusk, who organized the thing.

This is not dariusk

This is not dariusk

The book is called “Teens Wander Around a House.” (4MB pdf) The “action” was generated by a text adventure generator written by someone called catseye. dariusk used text from, which is apparently somewhere that people post dreams. In this case he used a bunch of descriptions of dreams by teenage girls, with some dreams by a child molester halfway through. For dialogue, he grabbed text from twitter, mapping text that followed specific question templates (such as “why do you…”) to the first turn of a dialogue pair, and text with related templates (such as “because…”) to the second turn of a dialogue pair. There are some great ideas there, especially the text sources. It’s a little unclear exactly how they are put together. The text generator seems to drown out the other two sources, but you can kind of see their effect.

2. erkyrath

Next up is erkyrath’s offering “Redwreath and Goldstar Have Traveled to Deathsgate“, which is pure dialogue and seems to be based on some kind of in-joke related to a fantasy novel series.

this is not dariusk

This is not erkyrath

The generator looks like some kind of grammar that uses templates to recursively build a set of dialogue pairs. It definitely deserves closer study. Here are some more details.

3. juhana

Then there’s juhana’s shakestweetes, which is a set of plays with Shakespeare-like titles. Looks like the script grabs a bunch of tweets and collates them. Straightforward, but effective.

This is not juhana

This is not juhana

Gotta wait til later to look through some more…

News! Early April…

May 31, 2014

So, what did I miss?

  • An article on Gnoetry Daily in electronic book review! Mentions our compilation volume, some related generators, eRoGK7’s Stein gnoems, Elshtains selections, and some of my stuff. Thanks, Chris!
  • oh man I can’t believe I missed this: National Novel Generation Month! Here’s some discussion. I was starting to do something like this when my last laptop died (taking with it a full remix of “At the Mountains of Madness”!)
  • mmelnicki’s Spines art project at Burning Man included several books of computer-generated poetry!
  • Computers and the Arts” by Dick Higgins (1968) unearthed and digitized by Lori Emerson. “The onus is on the artist, not his (sic!) tools, to do good work.”
  • hold on, this blog has ads? frickin’ wordpress… where’s my wallet?
  • “whoever made this is a genius,” this kid I know, on first trying JanusNode
  • Rumor has it Gnoetry Daily Volume 2 is in the works… speak now if you want in…


You, sir, are a kook. Well done. (UPDATE: I mean that in the nicest possible way, of course. In fact, Mr. Shute also has another great video on the mechanics behind the generation, including a consideration of techniques for authoring by constraining the number of items per track, and matching those numbers over the stanza.)

And, “based on the Internal Vowel Combustion Engine of 1856… used by Keats and Yeats in their early work… which is complete nonsense since Keats died in 1821 I believe” (LOL! I gotta admit you had me there a minute…)

I want to be exactly like this guy when I grow up.

drama keys

May 30, 2014

drama keys RV paint
only type bad days
sloths chinchilla
class sicilia
legu zamu don cofagrigus
lay the bad news on him life together


October 2-6 2013, Method de47ca56-6a20-45a7-aba0-53cdd8b6aa57 (misunderstood words)

Every once in a while I misunderstand or can’t quite make out what someone is saying. So I tried to think of a way to turn this into something poetic using an OULIPO-style constrained writing technique.

When I had these misunderstandings at home, I started writing down the words that I heard, along with the words that it turned out were actually said. Then I paired them together into lines of verse. For example, someone said “bad days” and I heard “drama keys”. Someone said “bad days” and I heard “RV paint”. I paired them together to make the first couple of lines. It’s not really computer-generated, but it recalls the earlier work with speech recognition failures, and it is algorithmic:

Method de47ca56-6a20-45a7-aba0-53cdd8b6aa57 (misunderstood words)

1. in everyday speech, when misunderstanding words, write down: a) the misunderstood words as heard, b) the actual words, as determined by subsequent clarification subdialogue

2. Let the set of words be wi j where w is a nonzero set of words, i is the condition (misunderstood or actual) and j is a number identifying the utterance. Order the sets of words such that:
wm1 wm2
wa1 wa2
wm3 wm4
wa3 wa4

No one

May 28, 2014


(Sentences from Rainer Maria Rilke’s “Letters to a Young Poet” (trans. Stephen Mitchell), parsed with the Stanford Parser, 5/28/2014.)
Read more…

64-Bit Temple Operating System

March 9, 2014

Infinite Monkeys n-gram Algorithm in JavaScript

February 20, 2014

Apparently WordPress does not allow you to edit HTML directly? That is sad. I was able to post the n-gram algorithm which comes stock with Infinite Monkeys directly to blogger, which is cool.


Currently, the program allows you to do word level n-gram manipulations on a large amount of text. The algorithm is identical to the one which is found in standalone executable version of Infinite Monkeys 1.99 but some functionality is missing. The ability to load and save ‘biases’ (the saved n-gram states) is absent. The interface is clunky and odd (because it is stuck in a blog post). That is about it. I hope you enjoy. More to come, for sure.


This is the first ever project I have done in JavaScript, but I will continue to work with the language. It is the most well document language in the history of programming which is a good thing, since it’s painfully difficult to debug. There’s an universal truth circulated among programmers. It is not the errors that refuse to compile that cause the most grief, it is the ones that compile and lurk in the background, destroying your faith in yourself, that are the worst bugs. JavaScript will run regardless of what nonsense you throw at it. JavaScript will compile anything.


claim your peace

January 25, 2014

claim your peace


This is the first in a series of executable poems.. Stay tuned.

Some More Free Grass (Whitman + Lessig)

January 23, 2014

How straight and square they
stand, tenacious, to think they
can own perfection.

Small the theme I sing.
I am a man, great!  I am
quite universal.

I was wrong today.
According to its poisons,
I wear my failure.

Against the laws of
poetry, I sing appeals,
expensive, absurd.

O woman I love,
lips of love hot and vapors,
singing in my blood!

To watch the system
mock our visions, bathed in
the blood of poets.

I listen, and I
do it through the creative
act of piracy.

The soul of a book
is content if I simply
sing the copyright.

As if your stories
were lewd, music at the end
of integrity.

Composed in collaboration with Gnoetry 0.2 and these texts:
Lawrence Lessig, Free Culture
Walt Whitman, Leaves of Grass