Concrete Perl

 h            d d     k x  v  d r k y  p  s b a  b  a  n  i  k  d   u  u 
v   r  c q  i  e  z   j s s  v h   t l  i  r k k n  k       n n     m    
         z b    q   b   k x  m  d u  z f  s  g p u z v y       v m  f   s
  i  u  p  p z   r n t  k f   b h v  q l  x w h x  f  x    c i w     v f 
k h   l  a i      o q  s z n z  u n c l    w      d     a  d a  m j  b e 
 m  n b q o u o e  n   s    r b o j     b  q q t q s   f n i  f     u  l 

Concrete Perl

a set of four concrete poems realized as 32-character
Perl programs

by Nick Montfort

All the Names of God
Alphabet Expanding
ASCII Hegemony
Letterformed Terrain

You can download the linked Perl files and/or simply copy and paste the following four lines, which correspond to the four titles above:

perl -e '{print"a"x++$...$"x$.,$,=_;redo}'
perl -e '{print$,=$"x($.+=.01),a..z;redo}'
perl -e '{print" ".chr for 32..126;redo}'
perl -e '{print$",$_=(a..z)[rand$=];redo}'

For purposes of determining the platform precisely and counting characters, the rules of Perl Golf are
used. These rules, for instance, do not count the (optional) newline at the end of a one-line program. The Concrete Perl programs work on all standard versions of Perl 5.8.0 and have been verified as 32 characters long using a count program.

These programs are also written to work and to be visually pleasing on terminal windows (or terminals) of any geometry.

To present them all at once, you can tile four windows and run one program in each window. For instance, running Linux with Compiz as the window manager and the Grid plugin installed and active, create four windows and assign them to the four corners of the screen using Ctrl-Alt-Num Pad 7, Ctrl-Alt-Num Pad 9, Ctrl-Alt-Num Pad 1, and Ctrl-Alt-Num Pad 3. In this
mode if the resolution of the display is not particularly high, you may wish to decrease the font size a notch in each window.

Concrete Perl was released onto the demoscene and discussed by me for the first time in my talk “Beyond Data-Driven Poetry: ppg256 and Concrete Perl,” on the panel “Literary Practice and the Digital Humanities, Redux: Data as/and Poetry,” Digital Humanities 2011, Stanford, June 22, 2011.

I have printed the four programs/poems on a dot matrix printer on business cards and am handing them out and, in some cases, adding them to the “Interactive Poetry Wall” at Stanford University’s “Coho” coffeehouse.

p  j  o c v v     n  v  t  g k   t i      s h    f j   v  e d    v c e  b
  p z          p  e     s s d    o f z   v  p s  t  z   i b  f j w     l 
 p  z y      f j  w k k p k y n  v f g u m r m k x i  w  l s a t n b a f 
w   q    y u t p r p w     p       m d   x j c j   j n z k a   j  z  i s 
 w a    w q k       j   y y   k c r    d i         b p  f   z h  i x    i
 c  o  x  f  p f     u d   g z y f b y  v     q    v  g v    o      j l  

XO and GUI Found in Curveship’s Alphabet Soup

I went by to OLPC (One Laptop Per Child, the nonprofit that has created and deployed worldwide the green laptop for kids) yesterday for some discussion of narrative interfaces. I explained the basics of Curveship and what was interesting about it from my perspective, mentioning that one could hook the narrating engine up to something other than an interactive fiction world. I also found out that others had some of their own, very interesting, ideas.

Chris Ball, for instance, showed a proof-of-concept where he hooked up the simulated world of Curveship’s Cloak of Darkness, the classic simulated example world, to a graphical display and a graphical system for inputting commands:

Screen from the Curveship GUI Cloak of Darkness

Source is available on github. While it doesn’t generalize to every Curveship game, what it presents on the screen here is done without any additional game data: Chris’s system determine that the south room is dark and obscures it, determines where the exits are, places objects in rooms, and generates rooms of random size since there is no way to determine how big or small a room is. The only thing the systems knows about the underlying simulated world is what’s in fiction/cloak.py, the file I put together to demonstrate Cloak of Darkness in the usual textual interface.

On the one hand, it more or less discards all of the work that fascinates me the most, the text generation and narrative variation part of the system (*). But on the other, it’s the most radical narrative variation yet – replacing the textual interface with a graphical one. A pretty neat twist on the system, and one which is very interesting from a research standpoint if one’s interested in comparing image and text in narratives.

I hope work on this will continue and that we’ll find other mutually beneficial ways to connect Curveship with the OLPC project.

(*) It doesn’t really discard these or truly “replace” the text channel. You also get to read the textual description of rooms and the textual representation of actions in windows as you play the game. But it makes the main interface a GUI rather than a textual exchange.

World’s Hottest Platforms 2011

Ian Bogost and I were thinking about the Platform Studies series today, as we are wont to do. There are two books in the series that are nearing completion now, which we are delighted about, but there are many more to be written. We were talking about some platforms that we thought were large and low-hanging fruit for any interested authors – ones that would be great to write about. These are a few platforms or families of platforms that seem to us to have interesting technical aspects, diverse and important historical connections, a good amount of worthwhile cultural production, and a number of adherents:

– Apple II
– BASIC
– Commodore 64
– Flash
– Game Boy and/or Game Boy Advance
– iPhone and iPad
– Java
– Macintosh
– MSX
– NES
– PC
– System/360
– Unix and Linux
– Windows (“Wintel”)

In case there’s anything that seems puzzling about this list: A platform, as far as the Platform Studies series is concerned, is something that supports programming and programs, the creation and execution of computational media. (This is pretty much what Wikipedia defines as a computing platform, too.) So BASIC, Java, and Flash are as much platforms as the mainly-hardware consoles and computers that are listed, as are the operating systems on the list.

If any of these interest you enough that you’d consider writing a book about them, please contact me and/or Ian. If you have a favorite platform that we haven’t mentioned and want to suggest that someone write about it, please leave us (and any potential authors who are reading) a comment.

A New Game Studies Brings Racing Reviews

A new issue of Game Studies, the pioneering open-access journal that deals with computer and video games, is out. Of particular note – to me, at least – is that among this issues eight book reviews are two reviews of the book I wrote with Ian Bogost, Racing the Beam.

The two reviews are “Hackers, History, and Game Design: What Racing the Beam Is Not” by José P. Zagal and “The fun is back!” by Lars Konzack.

Zagal, who has a very interesting take on our project, calls the book “an accessible nostalgia-free in-depth examination of a broadly recognized and fondly remembered icon of the videogame revolution” and notes that it is “a book that both retro-videogame enthusiasts and scholars should have on their bookshelves.”

It’s important to note that Konzack developed a layered model for how games (and other digital media artifacts) can be abstracted and situated within culture in his article “Computer game criticism: A method for computer game analysis.” With only a few alterations (merging the “software” and “hardware” layer together into a “platform” layer, for instance, and considering the cultural context as influencing all layers), this model is used in Racing the Beam and in the Platform Studies book series. Konzack finds the book “a worthwhile read if the reader wants to know how early videogame development took place and thereby get an understanding of how videogame development came into being what it is today.”

I’m very pleased, as Ian is, to read these critics’ resposes to our book.

Generador de la Historia “The Two” en Español

Thanks to Carlos León, there is now a Spanish version, “Los Dos,” of my simple but (I think) provocative story generator “The Two.” The system was previously translated into French as “Les Deux” by Serge Bouchardon.

Stop by and check them out; all three are available in JavaScript versions that run right away in a browser. For those who are interested, the original Klingon, er, Python, is also available for each of the three languages.

The reader who takes the time to try to actually understand the output and resolve the pronouns in it will see that often this task is complicated by ambiguity in gender, although syntax and power relations also work to suggest certain ways that pronouns can be resolved. The need to leave the gender of the characters indeterminate in the first line posed particular problems, and slightly different problems, for the French and Spanish translators, who each found a solution.