The IF Summit Peaks

Monday 14 March 2011, 12:39 am   //////  

I had a great time showing Curveship, and explaining the motivation behind it, at the IF Summit next to PAX-East today. And it was generally a great weekend of catching up with the people who are continually discussing this system (and many other matters) with me online. My thanks particularly to Zarf, the main organizer of the IF suite, Dave, who set up us the conference room, and Emily, who ran the IF Demo Fair on Saturday night. And generally, hooray for interactive fiction and the People’s Republic of Interactive Fiction – I hope we have many other productive gatherings in years to come.

The IF Theory Reader Arrives

Tuesday 1 March 2011, 1:47 am   ///////  

Almost a decade after the project began, the IF Theory Reader is finally here, thanks to the hard work of editors Kevin Jackson-Mead and J. Robinson Wheeler. The book has been published by Transcript On Press and has made it out in time for PAX-East, where Kevin’s group The People’s Republic of Interactive Fiction will be hosting a hospitality suite.

There are 438 pages in this book, which can be downloaded as a PDF for free or purchased as a paperback for a mere $13.26.

My own contribution, “Toward a Theory of Interactive Fiction,” has a first page which (except for the title of the article) is entirely occupied by a footnote. Perhaps ominously. I did, however, revise the article for the N+1th time, trying to make it a bit more accessible. I began writing this particular piece back when this book project was first being formulated, and am very, very glad to have it officially published after all these years.

The compendium of writing about interactive fiction that we finally have here includes 26 articles – the same number, I should mention, as there are letters of the alphabet:

  • Crimes Against Mimesis – Roger S. G. Sorolla
  • Toward a Theory of Interactive Fiction – Nick Montfort
  • Characterizing, If Not Defining, Interactive Fiction – Andrew Plotkin
  • not that you may remember time: Interactive Fiction, Stream-of-
  • Consciousness Writing, and Free Will – Mark Silcox
  • 2 Brief Dada Angels – Ryan Stevens, writing as Rybread Celsius
  • Object Relations – Graham Nelson
  • IF as Argument – Duncan Stevens
  • The Success of Genre in Interactive Fiction – Neil Yorke-Smith
  • Parser at the Threshold: Lovecraftian Horror in Interactive Fiction – Michael Gentry
  • Distinguishing Between Game Design and Analysis: One View – Gareth Rees
  • Natural Language, Semantic Analysis, and Interactive Fiction – Graham Nelson
  • Afterword: Five Years Later – Graham Nelson
  • Challenges of a Broad Geography – Emily Short
  • Thinking Into the Box: On the Use and Deployment of Puzzles – Jon Ingold
  • PC Personality and Motivations – Duncan Stevens
  • Landscape and Character in IF – Paul O’Brian
  • Hint Development for IF – Lucian Smith
  • Descriptions Constructed – Stephen Granade
  • Mapping the Tale: Scene Description in IF – J. Robinson Wheeler
  • Repetition of Text in Interactive Fiction – Jason Dyer
  • NPC Dialogue Writing – Robb Sherwin
  • NPC Conversation Systems – Emily Short
  • 10 Years of IF: 1994–2004 – Duncan Stevens
  • The Evolution of Short Works: From Sprawling Cave Crawls to Tiny Experiments – Stephen Granade
  • History of Italian IF – Francesco Cordella
  • Racontons une histoire ensemble: History and Characteristics of French IF – Hugo Labrande

Again, congratulations to Kevin and Rob, and thanks to my fellow authors. I’ve read many of these articles before; I’m looking forward to sitting down and reading everything, previously seen and unseen, in this excellent codex.

Curveship 0.5 Released

Happy Groundhog Day. Today, I’m releasing Curveship, my interactive fiction system that models not only the fictional world, but also the narrative discourse. A development version (0.5) of this Python framework is now available for download. You can find the links, along with some description and documentation of the system, at curveship.com.

(Original photos by April King and Postdlf, Wikimedia Commons; they & these modified versions are CC by-sa 3.0.)

10 PRINT Talks Galore

Wednesday 26 January 2011, 4:59 pm   //////  

Two of my talks on this program:

10 PRINT CHR$(205.5+RND(1)); : GOTO 10

have recently come online. I’m currently studying this program deeply and writing a single-voice book about it with many other authors.

My earlier talk, given jointly with coauthors Jeremy Douglass and Casey Reas on July 23 of last year, was “Studying Software by Porting and Reimplementation: A BASIC Case” at USC. As of yesterday, video of it is online with the rest of the conference proceedings from Critical Code Studies at USC.

More recently, on January 10, I spoke about the program at UC Santa Cruz. My talk “Line of Inquiry: Many Authors Explore Creative Computing through a Short Program” is available on video in six parts. Part 1 will let you link on to the rest.

Teejay Spins Tales

Tuesday 25 January 2011, 8:00 pm   //////  

Last night I projected words to accompany music at a local lounge. This practice does not seem have an established name – does it? Please let me know if you’re aware of the conventional term. I have heard the phrase “text jockey” used. I’ve also come up with some other terms that don’t seem to fit perfectly. In a sense, this is VJing, but it’s also a practice that is compatible with VJing, since words can be projected in a subtitle-like fashion on moving images.

Using a small bit of Python code and pyglet, I put a number of texts up a word at a time in very plain and uniform typography. Each successive word appeared centered on the same point as the last in a rapid, serial, and visual manner. Sometimes I showed several texts in juxtaposition, sometimes just one. I thought the combination of the Advanced Dungeons & Dragons Monster Manual and the text of Beckett’s Rockaby was particularly nice. The Unabomber manifesto and the Timecube website were utilized, as were Moby Dick, a Roberto Bolaño story, some altered versions of Little Red Riding Hood, a poem by Harry Mathews, and a few pieces I put together that drew randomly from word sets to confuse gender stereotypes and our notions of otherness. One of the people who came thanked me and said that he wasn’t expecting to spend the evening reading from great books, but that it was pretty cool.

My thanks to DJ Flack & Wayne and Wax, who very kindly invited me to join them.

Actions in Curveship

Tuesday 7 December 2010, 9:59 pm   ////  

I’ve been working the past few days to change the way actions are represented in Curveship. The previous model for actions is described well in sections 5.1.3 and 5.1.4 of my dissertation. I won’t go into it in any detail here, but it involved two sorts of abstractions (one higher-level and associated with intention and narrating, the other lower-level and used directly in the simulation) and was considerably more complex than what I have in the current system.

I will mention something about why actions are represented in the system at all – that is, with first-order representations, objects. This is a departure from the way IF systems have worked up to now. In other IF systems, when you “get lamp,” you change the state of the world. The lamp object has a different parent when you are done with this action. But there is no object representing the action itself, the adventurer getting the lamp. As you can tell from playing IF, this works fine if you want to stick to one character and narrate what is happening exactly once, as it happens.

Having a representation of action, on the other hand, allows for much more flexibility in narrating. One can narrate an action in flashback (because it’s still there, represented as an object) and can easily maintain lists of actions for each character, to represent what each specific character is aware of. In Curveship, these are kept in “concepts” which are theories about the world that are almost always incomplete and can even be wrong. Since all actions are reversible, the representation of actions also provides an infinite “undo” capability.

So, the action representation now simply provides actions of four types:

  • Behave – Any action that doesn’t change the world, from speaking to jumping up and down.
  • Configure – An action that causes an item to be moved to a new place, or to be in a new relation, in the item tree. (“get lamp” is an example.)
  • Modify – An action that causes an item to change state, to have one of its features take on a new value. (“light lamp” is an example.)
  • Sense – A perception of the world which does not change the world but may update a character’s concept.

For instance, this is the code that maps the command “get lamp” (or “get” followed by anything) into a particular “take” action, which is a configure action:

def take(agent, tokens, concept):     return Configure('take', agent,                      template='[agent/s] [pick/v] [direct/o] up',                      direct=tokens[1], new=('of', agent))

“take” is the verb and agent the agent; all Actions must have these two. The template is optional. It specifies the string-with-slots that is to be used in representing this action. All configure actions have a direct object, the item being configured, and need at least a “new” keyword specifying the link and parent that item will be in. Here, it’s “of” (indicating possession) and the agent (the one who is doing the taking.)

Curveship Analysis at Tufts

Monday 6 December 2010, 7:20 pm   ////  

I just wanted to thank Norman Ramsey, Eddie Aftandilian, and Brad Larsen for the very productive day-long discussion of Curveship that we undertook on Friday. I’ve spent most of the weekend and much of today implementing just one of the ideas for changes that came out of this. The discussion certainly gives me more to do, but it also does a great amount to focus my efforts as I work toward a release of system.

Colloquium Past, Conference to Come in Mexico

I’ve recently returned from a great trip to Mexico City. I was at the 5th Mexican International Colloquium on Computational Creativity presenting alongside two other foreign guests, Graeme Ritchie and Dan Ventura, and two local researchers, Rafael Pérez y Pérez and Eduardo Peñaloza. There was a productive and lively roundtable on interdisciplinary work and collaboration the day before the talk, too. Rafael Pérez y Pérez, a collaborator of mine, arranged the colloquium and was a very gracious host, making sure that we got to and from the airport, to all of the colloquium events, and to several excellent meals.

Rafael presents the collaborative version of the plot generator MEXICA.

They must love George Perec's La Disparition in Mexico City.

I have a few things to mention about the 5th MICCC, but I’d like for this post to be mainly forward-looking rather than backward-looking. That’s because ICCC-11, the 2011 International Conference on Computational Creativity, is an event on the same topic as this recent colloquium, and it will be taking place in the same city thanks to the local organizing work of our wonderful host, Rafael. Although the colloquium was intellectually rich and I enjoyed visiting Mexico City for its own sake, I was also very pleased because I was anticipating this larger-scale academic gathering that will be taking place April 27-29. In part, I was reminded of the conference because I and the other organizers, Rafael, Graeme, and Dan, spent a good bit of the time working to make the remaining decisions and to prepare for ICCC-11. But even just walking around the city, I had in mind how much other computational creativity researchers would enjoy coming to México.

At the colloquium, I was the only one who didn’t discuss a large-scale system that is somehow related to the creative process. (I do have a such a system, Curveship, but I wanted to focus on something else in this talk.) I spoke about creative computing and the relationship that this area has to computational creativity. In creative computing, the computer is seen as a medium and platform for human creative work. There’s a strong relationship between this area and computational creativity, but there are some distinctions, too. I spoke about a very short, simple Commodore 64 BASIC program:

10 PRINT CHR$(205.5+RND(1)); : GOTO 10

The C64 BASIC program executing.

This one-line program is the focus of a deep investigation that I am undertaking with nine other authors. We plan for this study to result in a single-voice academic book – not an edited collection, not a “chapter book” with separately authored segments, but something that reads like a single-author book but is written by ten people. We are still in the early stages of writing this book, but it’s our hope that 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 by Nick Montfort, Patsy Baudoin, John Bell, Ian Bogost, Jeremy Douglass, Mark Marino, Michael Mateas, C. E. B. Reas, Mark Sample, and Noah Vawter will be published by the MIT Press in 2012. (Yes, the book’s title is the program itself.) Since the colloquium focused on interdisciplinary work and collaboration, this seemed like a nice project to discuss, even though the ten of us working on this project are not trying to model the creative process using computation. I described how the study of this program shed additional light on the relationship between platform and creativity, and how it suggested that computational creativity models try to take into account that relationship.

This poster was in the lobby of the auditorium where I did my presentation. Looks a bit like the output of 10 PRINT, no? It seems to show just that with two other characters (a horizontal line and a vertical line) thrown into the mix.

The other talks offered some excellent descriptions of and discussions of computational creativity systems: MEXICA, DARCI, and STANDUP (along with its predecessor, JAPE). These systems, and the things that have been done with them, are all great examples of creative computing, by the way, in addition to being computational investigations of creativity! I could do a post this long covering just the new thoughts that have come to me about these projects, each of which I knew about before. For now, I’ll refer you to the abstracts and links for more on those projects.

Coming up: The 2011 International Conference on Computational Creativity, April 27-29 in Mexico City

Interior of La Casa de Primera Imprenta.

I’ve been to Mexico City before, but this was my first trip to the city’s main square, the Zócalo. This is the area where ICCC-11 will take place. It’s an amazing sight. You can see that Mexico City is mind-bogglingly big as you fly in, but the Zócalo is massive in a different way. The plaza and the area is human-scale (designed for pedestrians and very walkable, with many shops and restaurants) while also being tremendous and impressive. On the north is the cathedral; the National Palace, where President Calderón works, is to the east. An enormous Mexican flag flies from the National Palace during the day. To the west are several buildings, including the Best Western Majestic Hotel, which will be offering a discounted rate for ICCC-11. Just off the plaza, between the Cathedral and the National Palace, is where ICCC-11 will be held – at La Casa de la Primera Imprenta. The first printing press in the Americas was installed in 1536 in this building. It now offers a conference facility of just the right size for ICCC-11 presentations and demos, several galleries, and a bookstore.

SHRDLU fans will note that the Linotype machine in La Casa de Primera Imprenta has a different layout than an English Linotype machine.

The Autonomous Metropolitan University, Cuajimalpa is the host institution for ICCC-11, which is also supported by UNAM’s postgraduate program in computer science and engineering. The colloquium that UAM-Cuajimalpa put on with UNAM was well-attended by students and faculty who had some good questions for us. I know that we will have great local arrangements for ICCC-11; the participation we had in the colloquium suggests that we will be part of some good conversations (and, no doubt, see some good presentations and demos) from local ICCC-11 attendees.

So, I hope to see you readers who work in computational creativity in Mexico City at the end of April. I’m the publicity chair for ICCC-11, but in addition to publicizing the conference, I’m glad to email with anyone who has questions about the conference or about visiting Mexico City. And, remember that the deadline for submissions (of short papers, long papers, or show-and-tell proposals) is December 13, less than a month away now: The call for papers has the details, and there is more information on other parts of the ICCC-11 site.

Festive Coders Make Curveship Codefest a Success

Sunday 7 November 2010, 7:57 pm   /////  

The Curveship Codefest today was all I hoped it would be – a source of ideas, a way to discuss how to progress toward release, and even a time for the development of several fiction files (games) and spin files (specifications for narrating), some profound, some amusing, some both. I have received some very useful patches, representing the first contributions to the core Curveship code from others since I started this project in 2006. It looks like – with some serious work on my part, and with further consultation from the Curveship cognoscenti – Curveship can finally be ready for release in a few months.

I want to thank everyone who participated in the codefest today, from Amaranth to Zarf. So I will: Thank you, Amaranth, Angela, Brad, Doug, Jake, Jason, Kevin, Luis, Flourish, Fox, Ralph, and Zarf! Communities represented at the fest included the Boston area IF community, MIT’s Programs in Writing and Humanistic Studies and Comparative Media Studies, and the MIT Media Lab. In particular, thanks to Flourish for breakfast and lunch food for everyone; thanks to Zarf for the cookies; thanks to Amaranth and Brad for the donuts; and thanks to Fox for suggesting the event in the first place.

Horror Lurks on Halloween

A special event: The People’s Republic of Interactive Fiction is hosting a session in which we’ll play The Lurking Horror, October 31, 2-5pm, MIT’s room 4-145. We’ll take a tour of some MIT campus locations that inspired the ones in this game, and David Lebling, the Infocom implementor who created the game, will be joining us.

Also, remember that there’s a Tuesday Nov 2 book party for the release of my Riddle & Bind, at Grafton St. in Harvard Square, 6-9pm. And on Sunday Nov 7 we’ll have a codefest where people can work on games in Curveship, or on the core system, if they like. Contact me (the login name is “nickm”, the domain to use is this one) if you’d like to join us for that event.

Curveship Codefest Coming Up

Anyone who is in the Boston area and interested in spending a day (or a good chunk thereof) helping me push Curveship toward release should shoot me an email. Thanks to a great suggestion from Prof. Fox Harrell, I’ll be hosting a one-day Curveship Codefest soon in MIT’s building 14. People are welcome to write games, to write spin (ways of narrating), and to hack on the core Curveship system with me. We’ll be working toward a release of Curveship under a free software license in December or January.

Creativity (ICCC-11) Deadline Looms

Friday 15 October 2010, 5:14 pm   ////////  

A reminder that the deadline for the 2nd International Conference on Computational Creativity, taking place in Mexico City, April 27-29, 2011, is now in less than two months:

  • December 13, 2010 – Submission deadline
  • February 14, 2011 – Authors’ Notification
  • March 14, 2011 – Deadline for final camera-ready copies
  • April 27-29, 2011 – ICCC in Mexico City

I posted about the conference back in July; the CFP has been out since then and information has been up on the Web. Our site (I’m one of the organizers) now has resources for authors preparing papers as well as travel information.

Good luck to those preparing papers. I’ll hope to see some from Post Position and Grand Text Auto there in Méxio, D.F. at the end of April.

Notes on the IF Community

I was a sort of “international observer” at the latest ELMCIP Seminar in Bergen, Norway. ELCMIP is a European project, funded by HERA, which looks at the ways electronic literature communities function and foster creativity. On the first day of the seminar (Monday, September 20) I presented about the IF community, supplementing that evening’s screening of Get Lamp at the Landmark Cafe. I offered some thoughts, summarized here, for those working in other types of electronic literature practices.

By “interactive fiction” (often abbreviated “IF”), I mean pretty much exactly what you will find if you Google for the term and starting looking through the first several pages of results. In my dissertation, I defined interactive fiction as: “A form of text-accepting, text-generating computer program that narrates what is happening in a simulated world in reply to input from a user, or interactor. Interactive fiction can have literary qualities and qualities of a game.” In recent decades, people have used the term in different ways, but this is how the interactive fiction community understands IF today and has understood it for a while. This means that IF is not defined by a particular platform, the way that Flash games are, but that people do expect something to work like a “text adventure,” with the simulation of space and objects and natural-language-like input, to be considered IF. Members of the interactive fiction community may find chatterbots, story generators, hypertext fiction, point-and-click graphical games, and other things very interesting, but these productions would not have a place in the annual Interactive Fiction Competition, for instance, because they aren’t interactive fiction.

I have to note at this point that I can’t offer any proper sort of study of the interactive fiction community, as I am not an anthropologist by training (or pretension) and I don’t understand the workings of community in the way that people with a better background would. What I can offer, as a member of this community, are some notes about my experiences and some pointers to ways I have seen the community working together. My hope is that may notes may be of some use in generating ideas about e-lit community or for someone undertaking a systematic study.

Also, I’ll explain at this point that what I and others call “the IF community” is not the only IF community, even for English-language work. One other community is that of authors and players of ADRIFT games. ADRIFT (Adventure Development & Runner – Interactive Fiction Toolkit) is an easy-to-use shareware system for IF development. Another locus of interactive fiction practice and playing is “adult interactive fiction” or AIF, which prominently depicts sexual activity. The AIF community has its own annual awards, the Erins, which are analogous to the IF community’s XYZZY Awards (discussed later). Beyond these communities, there are IF communities, or at least IF activity that involved several people and that I know about, in Spanish, German, Italian, French, and Russian language communities.

An important early resource for the IF community was the IF Archive, originally hosted in Germany thanks to Volker Blasius. The archive was announced on November 24, 1992 and is mirrored today on sites throughout the world, with the main site being ifarchive.org. The archive was originally accessed only by anonymous FTP and can still be reached by that method today, although there is a simple Web interface at the main site and a searchable interface at Baf’s Guide to the IF Archive. The “archive” is not a repository for an organizations old, inactive files; it a system for publishing and sharing new work, including the games for each year’s IF Competition.

The IF community communicated for many years on two USENET newsgroups – and some in the community still read these newsgroups. rec.arts.int-fiction and rec.games.int-fiction were not originally devoted to what we now call IF, but those discussions came to predominate. The “arts” and “games” groups do not argue for different perspectives on interactive fiction; they are simply for discussion of making games (“arts”) and playing them (“games”).

A central institution in the IF community – perhaps the central one – is the annual IF Competition, which began in 1994. Now in its 16th year and run by Stephen Granade, “the Comp,” as it is called, showcases a wide variety of short games, some poorly written and/or poorly programmed and others quite exemplary. While winning the Comp or placing well in it is certainly desirable, anyone who enters the comp can be sure that dozens, if not hundreds, of people will play the game submitted. Many will even write review of it, since it is a tradition among the most enthusiastic members of the IF community to review all of the Comp games. Competitions are central to many popular communities of digital practice – the demoscene as well as creators of Flash games, homebrew 8-bit games, and graphical games. These comps or compos usually do not involve substantial rewards for winners or agonistic competition; instead, they provide an event (in person in the case of the demoscene, online in other cases) that focuses the interest and energy of the community.

Recent years have seen other IF events of different sorts, including “minicomps” with different themes and the “Speed IF” sessions in which several participants each write a themed or constrained game in two hours. Some of the community’s events highlight the different metaphors that are in play, ones that work across literary and gaming concepts. Although works of interactive fiction are conventionally called “games” and the people who interact with them are called “players,” the person who writes a game (almost always the same person who programs it) is an “author.” The online “Interactive Fiction Book Club,” founded in 2001, brought together those who had played a particular game for conversation modeled on conversation about books. In 2009, “Interactive Fiction Writing Month,” with some in-person events that took place mainly at CMU, made an obvious connection to National Novel Writing Month. The annual XYZZY Awards for interactive fiction, on the other hand, are styled after the Oscars. Although they are awarded by popular nominations and popular vote, they are named in the manner of Academy Awards and presented at an online event. Many IF community members even virtually dress up for the award ceremony.

The XYZZY awards take place on ifMUD, a simple text-based MUD that serves almost entirely as a chat room. That is, role-playing and puzzle-construction and -solving have little place there and RPG-style combat has none. The people on ifMUD do use some of the unique MUD-like facilities to support their communications, however, and they also program new capabilities into the MUD for that purpose. There is a bot, Alex, who parrots things that he has been taught, allowing people to query him for the definition of terms and acroymns. An “automeeter” keeps track of which pairs of people have met in person. People use another bot, Floyd, to play IF together on ifMUD, participating in “Club Floyd” sessions. People also ask for programming, design, and writing help, and sometimes even discuss theoretical or critical ideas. Much of the discussion is not directly focused on IF, but when one does want to discuss IF in real time, ifMUD is a great place to do so.

There are now local groups that meet in person to discuss and play interactive fiction. The one I know most about is the one I host in Cambridge, Massachusetts, The People’s Republic of Interactive Fiction, organized by Kevin Jackson-Mead. PR-IF meets monthly, and had a hotel room with snacks and talks, thanks mainly to Andrew Plotkin, at Penny Arcade Expo East. They have also produced a card with instructions for first-time IF players. I organized the first meeting of the PR-IF writers’ group, Grue Street. And two successful events have been held in which the public was invited to play interactive fiction together: the early MIT version of Zork, in the first case, and Admiral Jota’s Comp-winning game Lost Pig in the second.

By now, most people who deal with electronic literature in some way seem inclined to accept that interactive fiction falls under this umbrella term. But even if some resist this, it’s hard to ignore that the community itself connects its meetings, events, roles, and practices to literary ones. Of course, simply importing the institutions of IF into other communities is unlikely to be helpful: Other e-lit communities may not need an FTP site, two USENET newsgroups, a MUD, and so on. But understanding how different structures, conventions, and tools have helped IF authors and players could have broader applicability. For instance, the IF Comp has worked to encourage the annual production of games, but it has also dominated IF production so that the best-known games are those short ones released for the IF Comp. (The community has responded with other comps and with projects to review other games, so the IF Comp is not too much of a victim of its own success.) Nevertheless, this situation can highlight the benefits and the dangers of a regular, central activity with its own format requirements. Considering the IF community may also point the way to other groups that are less obviously literary, but are creative communities of practice involved with computing.

A Deterministic ppg256

Wednesday 22 September 2010, 7:36 am   /////  

Last night I premiered ppg256-6 in Bergen, Norway:

perl -le '@d=split/ /,"eros won to tree for fire sex sever ate nice tin elfin wealth";@t=split//,"_bhlmnpstw";{$_=localtime;/(..):(.)(.):(.)(.)/;print"\n$t[$3]".($4%2)."ck $t[$4]".($3%2)."ck\n"if!$5;print"\\"x$5." $d[$1%12] $d[$2] $d[$3] $d[$4] $d[$5]";sleep 1;redo}'

This is the latest in my series of 256-character poetry generators written in Perl. An unusual feature of this one is that it is deterministic: If run at the same time, it will produce the same output. Those who run Windows should check the ppg256 page for a .pl file that will run on that OS, on ActivePerl.

Finally, Your 50 Character Reward!

Saturday 21 August 2010, 12:15 am   ///////  

After I presented poetry generators ppg256-1 through ppg256-5 at Banff in February, I shouted out, more or less spontaneously, “50 character reward to whoever gives us the best explanation of what ppg256 is!” Why did I say that? Childhood trauma, possibly, but the more immediate reason, as I mentioned earlier, is that the last of these, ppg256-5, is based on a section of Tristan Tzara’s February 1921 Dada Manifesto, one which ends with the phrase “50 francs reward to the person who finds the best way to explain DADA to us.”

I got some great answers, including “It does a lot with a little” (Chris Funkhouser) and “ppg combines atoms of language” (John Cayley). But at this point I’ll skip right to the one from Travis Kirton, who did the following without having any previous experience programming in Perl:

perl -le '@a=split/,/,"illmn,imgn,ltr,mut,pxl,popl,strlz,pnctu,typfc,poetc,glmr,idl,ion,cptl,cpsl,cvl,atom,pltc,txtul,erotc,rvl";sub f{pop if rand>.5}sub w{$a[rand@a]}{print f("de").f("over").w."izes ".w."ation".f("s")."\n".(" "x45)."IS WHAT ppg DOES!";sleep 5;redo}'

The program is a modification of ppg256-5, one that answers the questions that ppg256-5 generates. That’s not only clever; it showcases the expressive power of small programs and the many, if not arbitrary, uses to which a language generator can be put. This certainly earns the reward. Travis, here’s an base64-encoded version of a 32-byte DOS intro, matisse, by orbitaldecay. When you run it after decoding it with a base64 decoder, it should look like this. The base64-encoded string, you will notice, is exactly 50 characters in length:

sBPNEMUPHgeLFwmXQAEJVwFL4vSsQKq5ZQDkYEh16cM=

Okay, I lied. It’s only 44 characters long. Please accept base64 as the remaining part of the prize.

Now, I think Mark Markino’s explanation of ppg256, which I wrote about yesterday, is also great and will suffice. It’s a wide-ranging and deep study of the series of generators, similar programs I’ve discussed, and some relevant contexts of techneculture. I can’t really decide which of these explanations is best, as they both work excellently for what they are. So I am going to offer Mark Marino a 50-character generator, too. Mark, here is an ASCII encoding of a set of tools that, used properly, will allow you to draw any image:

())___RED___))_> ())__GREEN__))_> ())___BLUE__))_>

Enjoy!

Code is Beauty, Beauty Code

Friday 20 August 2010, 12:07 am   //////////  

Beautiful CodeIn recent years, I’ve written a series of 1k (that is, exactly 1024 character) reviews on here. This ruse has helped me compose succinct (and possibly useful) notes about many things that I wouldn’t have otherwise written about. But some things that are worth reviewing, such as a documentary about interactive fiction, are really better treated in a bit more depth. Given my interest in the aesthetics of code, and in code that produces aesthetic output, a book entitled Beautiful Code: Leading Programmers Explain How They Think is certainly one of those things.

Beautiful Code is an edited collection of 33 articles by a well-known publisher of technical books. The articles deal with how programmers solved a variety of problems, some of them very general computational problems, others quite specific to particular systems and applications. Several of the authors discuss their own code. The book is part of the Theory in Practice series with Beautiful Data, Beautiful Architecture, and Beautiful Security.

Beautiful Code: Leading Programmers Explain How They Think. Edited By Andy Oram & Greg Wilson. O’Reilly Media, 2007.

Beautiful Code is a success in several ways. It widens the conversation about code and the innovative development of it beyond particular programming languages, which have often been silos for such discussion has taken place in the past. At least, book-length discussion of programming – in textbooks, in introductory and reference books, and in “tips and tricks” books – has often been language-specific. While encompassing many systems and code in many languages, the book doesn’t take the position that the programming language can be abstracted away, that knowing about data structures, algorithms and an arbitrary programming language allows on to say all that can be said about how to program.

The first article is a particularly excellent one. In it, Brian Kernighan discusses 30 lines of regular expression matching C code which Rob Pike wrote as an example in an hour or two. This concise article deals with how to solve the core of the regular expression problem elegantly and correctly, but it also touches on many other important aspects of code and programming. By suggesting a series of modifications, Kernighan shows that code is an element of future programs rather than simply a fixed solution. Kernighan mentions how the code takes advantage of C pointers and suggests converting it to Java to see how the result would be slower and would require a lengthier program. If you can only read one essay in Beautiful Code, be glad that the editors have placed this one in the front, allowing you to retrieve it in a constant-time operation.

I was also interested in how several of the essays dealt with the need to consider hardware specifics, something one might expect pure, beautiful code to avoid touching. There’s some hint of this specter in chapter 7, which discusses how Jon Bently’s official, “proven” algorithm for binary search has a bug when it’s implemented on most real systems. When the code finds a midpoint within the array by computing (low + high) / 2, the sum of low and high can, in very extreme cases, exceed the maximum integer value, giving a negative (and obviously wrong) result. Later chapters deal with more productive connections between hardware and code. In chapter 10, Henry S. Warren, Jr. delves into the amazing intricacies involved in efficiently computing the population count or sideways sum: the number of bits in a word, or an array of words, that are 1. The current best way of doing this for an array involves using a special circuit called a carry-save adder. Chapter 14, “How Elegant Code Evolves with Hardware: The Case of Gaussian Elimination,” explores the relationship of leading matrix algorithms to changing hardware architectures.

Several other articles interested me; I suspect that programming language researchers, professional programmers, and others will find that a good number of the selections are worthwhile.

But despite the title and some compelling discussion inside, this is really isn’t a book about “beautiful code.” There is almost nothing in it about beauty or what that concept means when applied to code. “Aesthetics” isn’t in the index. When beauty is mentioned, it seems obligatory and stands for whatever the author of a particular chapter values. This, for instance, by Travis E. Oliphant:

“Iterators are a beautiful abstraction because they save valuable programmer attention in the implementation of a complicated algorithm.” (p. 318)

Could one say anything similar about paintings? Sunsets? Or even something that has an important functional aspect, like a building? “Frank Ghery’s Stata Center is a beautiful building because the layout of its hallways saves valuable programmer time.” That doesn’t sound quite right, does it? There are more reasonable-sounding, if not very elaborated, statements about code and beauty in the book, but some of those seem to express a very narrow perspective. For instance, Adam Kolawa writes:

“In sum, I believe that beautiful code must be short, explicit, frugal, and written with consideration for reality.” (p. 266)

Michael Mateas and I have written about obfuscated code, a topic that isn’t mentioned at all in this book. While obfuscated programs are usually short, they are also the opposite of explicit, gratuitous rather than frugal, and written without any concern for “realities” like re-use, practicality, and legibility. An obfuscated program isn’t good programming practice – that’s part of the point. For reasons that Michael and I have written about, we consider the best examples of obfuscated code to be beautiful, and I suspect we’re not the only ones. They simply display a different kind of beauty, an aesthetic of complexity and extravagance that shows us things about programming and about the language in which the obfuscated code is written – things that technical essays don’t reveal. You may share this aesthetic and be willing to consider obfuscated code beautiful, if, for instance, you saw beauty in the exorbitant Ok Go video “This Too Shall Pass.”

A final disappointment: There are no articles on the creative, artistic use of code, on programming projects that are meant to create beautiful output – no music, poetry, story, or terrain generators, lightsynths, demos, intros, or Processing sketches. Certainly a book about beautiful code, even if it is targeted at the professional programmer, would benefit from investigating a program or two of this sort?

This isn’t to say that valuing conciseness and clarity is a bad idea, or that having a book about utilitarian programming practice, particularly a wide-ranging one with many interesting articles of great technical depth, is a problem. It just means that much work remains to be done on matters of beauty and code. Perhaps we’ll soon see a book that brings together the diversity and depth of technical discussion that’s displayed here with consideration of the nature of beauty, of what it means for code to be beautiful, and of how the workings, conception, code expression, and wider contexts of a program are all involved in its beauty.

New Journal Primes You for ppg256

Thursday 19 August 2010, 10:26 am   /////////  

Emerging Langauge Practices is a new journal based at SUNY Buffalo (poetic hotbed and host of the next E-Poetry) and founded by Loss Pequeño Glazier, Sarah JM Kolberg, and A. J. Patrick Liszkiewicz. Issue one is a real accomplishment.

There are eye-catching creative projects by mIEKAL aND & Liaizon Wakest and by Lawrence Upton and John Levack Drever. There are also pieces by Young-Hae Chang Heavy Industries and Molleindustria. (We can only hope for further industrialization of this sort and more of these compelling productions in future issues.) The issue also includes a piece by Abraham Parangi, Giselle Beiguelman’s mobile tagging, Sandy Baldwin’s plaintive piece “** PLEASE REPLY MY BELOVED **,” and Jorge Luis Antonio’s wide-ranging article on digital poetry.

The item that particularly caught my eye, though, was this article by Mark Marino: “The ppg256 Perl Primer: The Poetry of Techneculture.” Marino is an officer of the Electronic Literature Organization with me and a current collaborator of mine, although he completed this article before joining me on our current project. The discussion he developed for the first issue of ELP is really in-depth. Marino not only considers the workings and connotations of my ppg256 series of poetry generators, and considers related code and literary traditions from Perl Golf to the Oulipo – he also considers other programs that interest me and that I’ve discussed publicly in various contexts, sometimes with collaborators. And, he connects the coding traditions relevant to ppg256 to technical practices in boy culture and (via needlework) girl culture.

In one section near the beginning of the article, Mark relates a line of BASIC that I posted on his Critical Code Studies forum and notes (partly in jest, I think) the following:

I cannot include the full discussion here (over 5000 words) because as Montfort told me over the phone (in jest, I think), he is planning a book-length anthology of readings about the program.

Well, that’s more or less the project Mark and I, along with several others, are now embarked upon. However, we’re writing this book in a single voice rather than collecting articles about the program. More on that before too long; for now, go and enjoy the new Emerging Language Practices.

« Previous PageNext Page »
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2017 Post Position | Barecity theme