Print This Post Print This Post

A Tiny Poetry Generator with Blinkenlights

September 3rd, 2009 by Nick Montfort | Filed under Nick Montfort

ppg256-4 on a shelf

My latest Perl Poetry Generator in 256 Characters, ppg256-4, is my first one created specifically for a gallery setting. Although shown here in my office, it’s now on display at the Axiom Gallery for New and Experimental Media in Boston in the show Pulling Back the Curtain, which runs through September 27.

Since 2007, I have been developing Perl poetry generators that are 256 characters long. These programs constitute the ppg256 series. They are simply 256 characters of Perl code; they use no external data sources, online or local, and they do not make use of any special libraries or invoke any other programs. Here’s the code for ppg256-4…

perl -e 'sub c{$_=pop;$_[rand split]}sub w{c("b br d f fl l m p s tr w").c"ad ag ap at ay ip on ot ow"}{$|=print"\0\0\0\0\0\1Z00\2AA\33 b".c("be de mis re pre ").w." ".c("a on the that")." ".w.w.", ".c("boss bro buddy dogg dude guy man pal vato")."\4";sleep 4;redo}' > /dev/alpha

Note that those 256 characters of Perl include all of the control codes that are needed to drive the sign; the output is just redirected to the sign, a serial device, instead of appearing in the terminal. If you want to run ppg256-4 yourself, you can use this modified version that doesn’t include the control codes — it’s ready for you to copy and paste it into a terminal window:

perl -le 'sub c{$_=pop;$_[rand split]}sub w{c("b br d f fl l m p s tr w").c"ad ag ap at ay ip on ot ow"}{$|=print "\n".c("be de mis re pre ").w." ".c("a on the that")." ".w.w.", ".c("boss bro buddy dogg dude guy man pal vato")."\4";sleep 4;redo} #No LED sign version'

I’ll try to post a longer discussion about ppg256-4 on netpoetic.com and/or on Post Position before too long.

ppg256-4_2

ppg256-4_3

ppg256-4_4

ppg256-4_5

Be Sociable, Share!
tag_icon

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

6 Responses to “A Tiny Poetry Generator with Blinkenlights”.

  1. heliopod :

    Nick,

    This is a really lovely and damn clever use of computational poetics. And yet I must admit I’m not a fan of computational poetics in general.

    So here’s the trick.

    While the tech side of my brain loves these code driven poetry/letter/made up word generator, the poet side of me is always a bit “eh”.

    What I mean to say is, conceptually driven projects like these are fascinating, and to the “code is poetry” agenda, well this fits damn nicely. But after that…?

    What do others think? Not so much about Nick’s work here….because I really enjoy his mix of the physical and the generative text…..but about computational poetics projects in general? And if the term “computational poetics” is the wrong one to use in others eyes….then insert your own “term” and reply.

    cheers, Jason

  2. i would like one for my bedstand. beats the led of an alarm clock. or goes well with it. or something. in any case, i think it’d be nice to read it when waking up.

    i posted not long ago on longestpoemintheworld.com. this is quite an interesting piece but the artist isn’t a poet and doesn’t see the piece itself as art. i would say it’s a terrific code idea implemented quite well.

    typically, in the sort of work we do, there are various arts, techs, cultures and so on involved. and usually there’s more weight on some of them than others.

    projects like nick’s interest me. i don’t immediately think of theodore roetke’s poetry. i mean the language is, you know, way different, the concept of poetry is quite different. and i like the breathing room it creates. the lines themselves, also, in this piece, they’re something you’d want to read several of to figure out what this bot is smoking.

    the literary mind knows derrida, aristotle, heraclitus, and many other literary and philosophical writers of poetics. but these days it’s also good for the literary mind to have a sense of turing, church, chomsky, and the way that the theory of computation approaches language.

  3. Bob Holman :

    unchain those rebeautifications, Papa! I want one of these!

  4. What’s interesting for me here in what I can see/read/decipher of the ‘Tiny Poetry Generator…’ is the way it’s gendered; guys’ code addressing guys, in every sense. Except isn’t source code neuter? Obviously not when it’s programmed with man language (even though Perl sounds like a girl). Shame I can’t see it in RL (is there/will there be any video documentation of it?) but I suspect it would find me both bemused and amused. Bemused as in: what the hell are those guys talking about? And amused as in: oh yes, of course, nonsense. Funnily enough I can make more sense of the control code (at least enough to get the gist of it) than how it translates into (LED/guy) sign language. (Although I believe I tried deflonning a watbrat just the other day.) Unlike Jim and Bob above, I’m not sure I’d want to live with this fella – I certainly wouldn’t want to wake up next to him – but the more I think about him, the more fascinating I find him (sigh… isn’t that always the way?) Great stuff.

  5. Just want to add – from what the photos tell me, in one way I read the signs loud and clear, this is the language of the mostly exclusive male tech work environment, whether that be a digital or mechanical world, and they seem to be of the working class rather than the boss class. The boss, the control code, is revealed to us here. Nick, I’d be interested to know, if it is, how it is revealed in the gallery setting. Also, I don’t know Perl, but are classes used in the code here? Maybe that’s coming in your longer discussion. I look forward to it.

    This is interesting in relation to Jason’s question about computational poetics. It’s damn clever, yes, and it demands a certain cleverness, or at least knowledge and a knack for deciphering, on the part of the reader too. I suppose the danger is if such work becomes so esoteric that very few readers can even get in, let alone ‘crack the code’. Also, how does a reader know it’ll be worth the effort unless there’s a good hook to seduce them, to pull them in. This, I think, ‘A Tiny Poetry Generator…’ does very successfully.

  6. Christine, I should have mentioned: a printout with the code for this generator is displayed alongside the LED sign. Although this program is not written in the clearest possible way, I hope to demystify poetry generating and computing in general by showing that the code is concise and inviting people to try to understand it, partially or entirely.

    Thanks for your reading of this generator, too. You’ve mentioned several of the issues I was hoping to open up. And you’ve got me thinking about ways that source code (independent of the text or other data that it includes, and independent of how it functions) could itself be gendered.

    Jim, thanks for your comments on ppg256-4, too. I agree that reading several poems, or reading them for a while as the generator runs, is the best way to encounter the text. (Of course, I hope the code will be encountered by gallery visitors, too.) I’m not aiming to publish any particular outputs in literary magazines or to have individual poems presented as interesting texts in their own right: It’s really the voice and texture that interest me. If I keep working at it, that could perhaps make for a nice adjunct to or replacement for a bedside alarm clock!

Leave a comment.

To leave a comment, please fill in the fields below.