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.

“Experimental Writing”

Wednesday 12 May 2010, 11:08 pm   /////  

We concluded the Spring 2010 21W.750 (Experimental Writing) today by composing a definition of the class’s title phrase, based on what we learned during our studies this semester.

EXPERIMENTAL WRITING (vbl. n., c. 1872) 1. The elephant is tiring. X-raying with yttrium, the pact seems tame, empty. Of yore, a raisin says “nope” to an igloo. 2. The octopus, magnificent, eats a tiger and an elephant. (a) Turn no oblog torpor. Revel! (b) An acrobatic cat, loyal, limp, is politicized. 3. What Twitter rhetoric: lame, incredible, empty. Tomatoes, made sarcastic, ignite both earrings. 4. A notorious sarcophogus, glorious static.

(This is an analytic definition using content words beginning with particular letters, including the letters in “experimental writing,” that were provided by students in the class.)

Another attack — NOT

Friday 23 April 2010, 2:40 pm   /////  
An analyst assesses Alphabetical Africa and another authorial account about antithesis and absence.
Luis Bury does not pull punches in reviewing Doug Nufer’s Negativeland and Walter Abish’s Alphabetical Africa in ebr.

The Garden of Grand Forks: UND Writers Conference

I recently went from presenting at the prestigious and vibrant University of North Dakota Writers Conference to being on a panel at the massive Penny Arcade Expo in Boston.

First things first: The former was “Mind the Gap: Print, New Media, Art,” the 41st UND Writers Conference. Last year at UND the presenters included Charles Baxter and Chuck Klosterman; the year before, Russel Banks, my colleague Junot Díaz, Alice Fulton, and Salman Rushdie.

To provide some perspective, back in 1978 the lineup at this conference was John Ashbery, Amiri Baraka, William Burroughs, Ring Lardner, Tillie Olsen, and Eudora Welty.

This year I heard Art Spiegelman in conversation about his comic and New Yorker cover art, Frank X. Walker on his poems giving voice to the journey of York (who accompanied Lewis and Clark on their expedition as Clark’s slave), Cecelia Condit on her video art, and three of my fellow electronic literature writers, with their diverse approaches: Mark Amerika, Deena Larsen, and Stuart Moulthrop. I had to leave before I could hear slam poet Saul Williams, but I’m grateful for what I was able to experience of the conference. And I’m grateful that I was able to be on two panels, select a reel of music videos for the associated film festival, speak to a computer science class, and present several collaborative and individual projects to a sizable audience in the main room of UND’s student union:

  • Ad Verbum, my interactive fiction piece from 2000, inspired by the constrained writing of the Oulipo. Thanks again to the young interactor who volunteered to try collecting items in and escaping from the Sloppy Salon.
  • 2002: A Palindrome Story, by Nick Montfort and William Gillespie. I showed the Reifier interface and read from the very beginning and end.
  • Implementation by Nick Montfort and Scott Rettberg. I explained the project and read eight texts (stickers, mailing labels) from it.
  • Currency, by Roderick Coover (video) and Nick Montfort (text). I showed “Filip a Guinea: The Elephant and Castle.”
  • Taroko Gorge, the poetry generator I wrote in Taiwan.
  • My ongoing series of tiny perl poetry generators, ppg256.

The people in Grand Forks, ND were polite (I was told I shouldn’t be surprised about this) but also surprisingly receptive. It was certainly a different sort of crowd than I met at Banff, with many people from the community and even driving in from surrounding areas. I think they saw some of the pleasure in writing under constraint, some of the benefits of writing collaboratively, and some of the potential of computation, which I tried to show could be turned to literary ends.

Although I got to converse with Stuart and Deena on and off our panels, I came in too late for one of their readings and had to leave before I could hear the other one. I did get to hear Mark Amerika take us from his early writing in The Kafka Chronicles up through his Web work and recent moving image project, all of which are fresh and impressive. His video work is certainly impelled ahead by the work of Chris Marker, whose Sans Soleil Mark selected for the film festival. I should note that I also loved getting to watch Timecode, Stuart Moulthrop’s selection.

Thanks again to Crystal Alberts for inviting me and for her work on this very successful conference.

When I can manage, I’ll write a bit about the very different but also incredible Penny Arcade Expo East…

Nickm on Paloma TV

Thursday 25 February 2010, 2:25 am   /////  

Here’s an interview with me, on YouTube, focusing on ppg256.

In(ter)ventions in Medias Res

Saturday 20 February 2010, 12:42 pm   //////////  

I’m here in Banff (in Alberta, Canada) at the cutting edge, or maybe the precipitous edge, or, as I’d prefer to think, the connecting edge. The occasion is In(ter)ventions: Literary Practice at the Edge: A Gathering, organized by Steven Ross Smith.

The presenters include: Charles Bernstein, Jen Bervin, Christian Bök, J.R. Carpenter, Maria Damon, Ram Devineni, Craig Dworkin, Al Filreis, Christopher Funkhouser, Kenneth Goldsmith, D Kimm, Larissa Lai, Daphne Marlatt, Nick Montfort, Erin Moure, Lance Olsen, Stephen Osborne, Kate Pullinger, Stephanie Strickland, Steve Tomasula, Fred Wah.

The presentations (which include critical papers, but also many readings, screenings, performances, and artists’ talks) have been provocative and have unfolded new types of beauty and new understandings of process.

On Thursday, February 18, I was honored to join Larissa Lai and Chris Funkhouser as part of the opening reading. I read from Implementation (a collaboration with Scott Rettberg) and ppg256, concluding with the premiere of a new poety generator in this series, ppg256-5:

perl -le '@a=split/,/,"conceptual,digit,flarf,maximal,modern,pixel,quiet,real";sub f{pop if rand>.5}sub w{$a[rand@a]}{print f("post").w."ism ".w."s ".f("the ").w."\n".(" "x45)."WHAT DOES ppg DO?";$a[rand@a]=~s/[aeio]/substr("aeio",rand 4,1)/e if $l++>5;sleep 5;redo}'

As I explained in my talk the next morning, this program is based on a section in the middle of Tristan Tzara’s February 1921 Dada Manifesto, a section that begins:

cubism constructs a cathedral of artistic liver paste
WHAT DOES DADA DO?

expressionism poisons artistic sardines
WHAT DOES DADA DO?

If you run ppg256-5 (which is the real way to experience the program) it might begin:

postmodernism flarfs digit
WHAT DOES ppg DO?
realism reals the conceptual
WHAT DOES ppg DO?

Because this section of Tzara’s manifesto ends “50 francs reward to the person who finds the best way to explain DADA to us,” so I concluded by presentation similarly, offering a 50 character reward for the person who finds the best way to explain ppg to us. Chris Funkhouser said, “It does a lot with a little.” John Cayley offered that “ppg combines atoms of language.” These aren’t bad explanations, but the most impressive so far has been from Travis Kirton, who, without having any previous experience programming in Perl, created and sent me this modified version of ppg256-5:

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}'

A run of this may begin by outputting:

deltrizes ionation
IS WHAT ppg DOES!
deoverltrizes mutations
IS WHAT ppg DOES!

I’ll have to see if anything can top that and earn the 50-character reward.

Here’s what’s being said on Twitter about the conference. I’ve found that one participant, Claire Lacey, has been writing about In(ter)ventions on her blog poetactics. Finally, here are just a handful of memorable (mis)quotes to give you another impression, however slanted, of this gathering:

Stephanie Strickland: “The front of your wave is the back of someone else’s.”

Steve Tomasula, in reference to Magritte: “No one ever says that this isn’t a cigarette:

My mishearing of Maria Damon, who was discussing healthy eating with someone as we were descending a staircase: “You need a multi-prawn strategy.”

D Kimm: “We are always unknown to someone.”

Update: Steven Osborne has just launched a blog with a post about the conference.

100,000,000,000,000 Sports

Tuesday 9 February 2010, 11:12 am   ////  

Well, not quite that many, but 10,000,000 isn’t too shabby…

In this adaptation of Raymond Queneau’s 100,000,000,000,000 Poems, the rules of 10 sports (football, polo, water polo, lacrosse, ice hockey, table tennis, basketball, rugby, the Kirkwall ba’ and beach volleyball) are divided into their constituant elements (duration, playing area, objective, players per team, attire, ball and method of play/restrictions) in such a way that they can be reassembled without contradicting each other.

Utensils in a Landscape

Monday 8 February 2010, 2:34 pm   //////  
Utensils in a Landscape, Chris Edwards, Stray Dog Editions, Vagabond Press, 2001

Utensils in a Landscape, Chris Edwards, Stray Dog Editions, Vagabond Press, 2001

Searching for something suitably disruptive in the landscape of Australia, where Jacket is rooted, I found this. The first poem is made from sometimes misquoted bits of The Book of Common Prayer and Burroughs’s “The Cut-Up Method …” With technical and abstract language, folklore, Mallarmé, and guy-on-guy action, the book offers all sorts of utensil viewing. And later, in “but me,” this reflection:

My project, which began in
one room of the abyss, soon spread toward a perimeter
you can imagine, should you be inclined to do so.

I usually prefer projects in which sources are altered sparingly and systematically – Craig Dworkin’s “Legion” is a brilliant example. These approximate centos work, though. The invented language weaves with the appropriated, making it seem that Edwards could have done it all with his pen – or all with his scissors.

Micro Art Machines

Tuesday 5 January 2010, 4:34 pm   ///////  

Here are some tiny bits of code to generate some amusement and aesthetic value.

The album sc140 features 22 tracks, each one generated by no more than 140 characters of SuperCollider code. You can download 80 MB of MP3 (for the weak!) or grab the source code (less than 4 KB, with all the formatting) and, if necessary, install SuperCollider, which is free in every sense. Here’s a November New Scientist blog post about the album.

On the visual and literary side, check out Pall Thayer’s Microcodes, tiny art pieces in Perl. Thayer also offers a PDF guide to the appreciation of tiny programs. Some of Thayer’s program incorporate play with the human-legible dimension of code; “WAR has NO value,” now on the front page, is a simple and nice example of this.

A Tiny Poetry Generator with Blinkenlights

Thursday 3 September 2009, 3:31 pm   /////////  

ppg256-4 on a shelf

[As I wrote on netpoetic.com:] 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

This was posted here on Post Position for the convenience of those of you who subscribe to the feed or visit the site. If you want to leave a comment, please head over to this post on netpoetic.com.

New Poem: “Served Cold”

Friday 29 May 2009, 3:43 pm   ///  

A dish for today: “Served Cold,” in the traditions of concrete poetry, search engine poetry, and poetry featuring incorrect but widely-used spellings of names.

Last Day Dream

Sunday 17 May 2009, 11:57 pm   ///  

Last Day Dream

Here’s a beautiful 42-second video: Last Day Dream by music video director Chris Milk.

Video Games Tending To Zero

Tuesday 12 May 2009, 6:40 pm   ////  

I’ve been interested in testing the lower limits of digital objects, looking at how simple and minimal something can be while still being understood as falling into a fairly familiar category. My ppg256 series, which consists of 256-character Perl poetry generators, is in this vein, as are my attempts at very small stories and poems in forms, “Ten Mobile Texts.” In the realm of sound, Tristan Perich’s One-Bit Music and Shifty’s One-Bit Groovebox are somewhat similar projects that attempt to show that if you bring eight bits, you aren’t bringing eight bits too few – you’re bringing seven too many.

It’s also possible to wonder what the smallest possible video game is, or how to push video games toward minimality. First, let’s take a step back to see what the smallest possible game of any sort might be: The Game, in which one simply tries to avoid thinking of The Game, and, if one does think of the game, one loses. This one’s interesting because it can’t be won. Neither can Space Invaders, of course, but The Game is different: a player can’t even be conscious of playing without losing.

Somewhat akin to ppg256 and The Game is Jason McIntosh’s obfuscated (or at least very compressed) game fall.pl, a 494-character Perl program in which you plunge down a canyon, inflecting yourself left and right to try to avoid hitting the walls of a canyon, which slant and are unseen until the last moment. fall.pl is made of a very small amount of code, but there are plenty of games with less – Pong, for instance, is simply a circuit and doesn’t have any code. One thing I find interesting about fall.pl and pleasing in some minimal games is the highly abstract nature of the visuals, something also seen in Pong. This Perl game actually has many of Pong‘s luxuries as well, including multiple lives and a report of your score at the end of the game.

Players wait for the next lightning strike in Ian Bogosts Thunderstorm.

Players wait for the next lightning strike in Ian Bogost's Thunderstorm.

Although made up of a whole 1024 bytes each – of assembly – Ian Bogost’s game poems for the Atari VCS incline toward minimality. The most recent entry, Thunderstorm, is a game about watching a thunderstorm and guessing, after a flash of lightning, how long it will take for thunder to sound. Simple as it is, this game uses audio as well as video channels, features color (although rarely), supports two-player competition, and is winnable.

As it has in music, physical computing has weighed in on minimal video gaming. Rob Seward’s three-person Tag is played on a 5×7 LED grid and has been hailed as “the simplest video game in the world.” Interestingly, Clive Thompson goes on to note that Seward’s game Boo is even simpler, with a single light bulb for a display. One player lights the bulb and the other attempts to hit a button as soon as possible afterwards.

There are some things that all of these games have in common: Something surprising happens in all of them, and that surprising thing is critical to the gameplay. Randomness provides the surprise in fall.pl and Thunderstorm. The players provide it in Tag and Boo. A representational excuse (you’re falling into a canyon, we’re watching a storm, got you!) can be used, but it’s the unexpected, not the connection to reality, that makes these games work. And there’s just one last thing to note: I think that surprise even plays an important role in The Game. Ouch … I just lost The Game.

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