<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gray/matter &#187; Programming</title>
	<atom:link href="http://www.stormlight.org/gray/matter/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stormlight.org/gray/matter</link>
	<description>a mix of black and white</description>
	<lastBuildDate>Sat, 14 May 2011 19:39:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Code Poetry, revisited</title>
		<link>http://www.stormlight.org/gray/matter/2007/06/04/code-poetry-revisited/</link>
		<comments>http://www.stormlight.org/gray/matter/2007/06/04/code-poetry-revisited/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 21:04:04 +0000</pubDate>
		<dc:creator>gray</dc:creator>
				<category><![CDATA[Essay]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.stormlight.org/gray/matter/2007/06/04/code-poetry-revisited/</guid>
		<description><![CDATA[[KA was not totally swayed by my first pass on "code poetry" so, with her permission, here is the exchange that builds out the concept a bit more.]
These things are certainly possible but what would be missing, at least in my stubborn take on it, is the creative aspect that attempts to incorporate human emotion/experience/transcendence [...]]]></description>
			<content:encoded><![CDATA[<p>[KA was not totally swayed by my first pass on "code poetry" so, with her permission, here is the exchange that builds out the concept a bit more.]</p>
<blockquote><p>These things are certainly possible but what would be missing, at least in my stubborn take on it, is the creative aspect that attempts to incorporate human emotion/experience/transcendence into the<br />
supernatural, etc.</p></blockquote>
<p>I try and take this on without instinctively defending what is really a fledgling idea, and not automatically assume that code <em>can</em> be poetry. But I will try and address some of your questions to see how far the idea can go.</p>
<p><span id="more-10"></span>First, programming is inherently creative, and acts as a way of encoding human thoughts into formalized syntax. Terms like &#8220;transcendence&#8221; and &#8220;supernatural&#8221; would give me problems in analyzing any language act. So, to start let&#8217;s go back to the concept of writing as problem-solving. Clearly code can function in a literal analogue to, say, a short story that means to convey a certain idea or process. What may have to happen first is some tedious definition and delineation. For &#8220;code poetry,&#8221; do we mean adopting code in syntax, in grammar, in total or in homage?</p>
<p><strong>Syntax</strong>: Write poetry in a particular programming language vocabulary (limited set of function-words), not necessarily in a structured programming form. Not likely to hold up well on its own, as programming syntax typically borrows from living language, particularly English, except lower-level languages like assembly. You would mainly get some funny words like Foreach and Gosub, maybe a phrase like Do while, etc. which would just make it sound archaic.</p>
<p><strong>Grammar</strong>: Write poetry in the style of a program, with indenting, grouping, internal cross-reference  &#8211; some of which falls under &#8220;syntactic sugar&#8221;, while other requires some understanding of the logic behind how a program flows, which is frequently not top to bottom. You could potentially do this without a particular code syntax, which is even practiced in programming as &#8220;proto-code&#8221; where you design a program functionally without writing in actual code. I can see some interesting writing experiments here simply borrowing a few concepts from programming without giving up natural language &#8211; function blocks, iteration, addressing, flow control. As simple throwaway examples:</p>
<pre>
	If (I was young again) then
		I would see the world with onion eyes.</pre>
<p>or, more procedural:</p>
<pre>
	While (the sun shines)
		the world turns its face from side to side.

	Until (death is come) {
		Life continues apace;
		Death++;
	}
	...yet Death remains a stubborn local variable,
          and instantiated out of frame.</pre>
<p>The latter being both loops that continue until a trigger state is defined. The notation ++ in some languages means &#8220;to increment a value by 1,&#8221; and the conceit is that Death has a known final value but only the wider program, not the local programmer, knows its final amount.</p>
<p>(Please don&#8217;t judge the idea by the examples!)</p>
<p>Incidentally, each logical block of programming language is called an &#8220;expression.&#8221;</p>
<p><strong>Validity</strong>: Here&#8217;s where the idea would need formality. Poetry can subsume elements of code grammar, as above, and stay essentially intact. But as an independent poetic method, there is a tension between a work&#8217;s validity as poetry and as a program. If a program expresses an idea, in the form and language of something like Ruby, but does not compile and generate a result, what is that? What if the code does not represent poetry in itself, but generates a poetic effect (such as by requesting input from the reader/user), distinguishing the map from the territory. Poetry succeeds by entangling the reader in its imagery; can a program do the same?</p>
<p>So, the idea has multiple facets, starting with just the idea of poetic form following programming conventions as another useful constraint, like a sonnet or sestina. Then, possibly code can become independently poetic if written to that purpose. And finally, code can become a means to the end of poetic work, in generative ways that the comparatively procedural written language (which generally only goes in one direction, from start to finish) cannot emulate.</p>
<p>When we create the intelligence that supercedes us, will it write code poetry, and will we appreciate it?</p>
<blockquote><p>Can programming language ever really be &#8220;fiction&#8221; in the sense that we mean the term literary?</p></blockquote>
<p>If you mean fiction as simply &#8220;not true&#8221;, then perhaps not. But if you mean as &#8220;a potential space not limited by fact and literal observation,&#8221; then all programming is an act of creative fiction &#8211; you create structures, meaning, process, and at some extremes an entire ongoing environment separate from describing what already exists.</p>
<blockquote><p>&#8230;but I think you would be very hard pressed to win the argument that anything written in computer code could play on the same level as say Kafka or Byron.</p></blockquote>
<p>That&#8217;s the conceit I have trouble accepting. The literacy or receptivity of the audience does not make a compelling criterion for artistic endeavor. Plus I think you may be reacting to the naïve notion of programming as poetry, namely taking extant code off a line printer and reading for inspiration. Certainly it could be more challenging to read, but arguably Kafka&#8217;s surreal bureaucracy (an interesting choice, and a potential seed for another idea &#8211; can legal prose, bureaucratic doublespeak, even IRS forms be made poetic?) and Byronic verse are both distinct exercises in challenged reading.</p>
<p>What do you mean by &#8220;play on the same level&#8221;? In terms of appeal, range of expression, effective messaging? Of course you cannot posit brilliance in a form as a justification for art. Who knew when we first made shadow shapes in caves that we would get Shakespeare?</p>
<blockquote><p>The mechanics have some mirror qualities, granted, but the Heart of it needs to be different for poets and authors to still feel they have a special purpose in cataloging the vastness and uniqueness inherent in the expressive qualities of their craft.</p></blockquote>
<p>I don&#8217;t see anything in that statement incompatible with the idea of programming to a poetic purpose, as opposed to programming just being gainsaid as a poetic act. It would have to be pursued to that end, just as a writer must intend to be poetical and not prosaic. And potentially code poets have a uniqueness in capacity that is absent without them.</p>
<blockquote><p>Code poetry is cool, but is it beautiful?</p></blockquote>
<p>Ask a programmer (the only built-in audience for &#8216;pure&#8217;, in-the-wild code spotting) if they have ever seen beautiful code. &#8220;Elegant&#8221; is another common adjective, just like in mathematical and physics circles that pursue proofs that are &#8220;beautiful&#8221; solutions to theoretical problems.</p>
<blockquote><p>Does it DO anything that has a real impact on who we perceive ourselves/world/each other to be?</p></blockquote>
<p>Does all poetry meet this requirement?</p>
<blockquote><p>Can it illicit the same kind of response that we [associated] with music&#8211; can it bring us to tears at the mere thought, anticipation, of its &#8220;verse&#8221;?</p></blockquote>
<p>That&#8217;s a distinction of <em>great art</em>, not a qualification for poetic form. That response transcends media &#8211; music, writing, film, dance &#8211; and cannot be made a prerequisite for poetic expression, else most poetry would cease to be such. I do think great code poetry can cause an opening of the mind, revealing a concept or truth in a moment of eureka.</p>
<blockquote><p>As far as a genre&#8211; sure.  Anything written in a new form, with enough steam behind it, can be dubbed a new genre.</p></blockquote>
<p>And maybe that&#8217;s all it is &#8211; an experimental writing form. Again, I am just surprised I have not seen more about it, as it seems a logical extension of our increasingly code-defined world. And code continues to become more egalitarian with the expansion of markup languages, and milder languages like Ruby &#8211; just as poetry was once the exclusive reserve of educated, landed gentry not up to their elbows in dirt farming, but gradually became available to every schoolchild.</p>
<p>I really think the idea can hold up to some scrutiny, although how much and how far is still unclear. Of particular importance is setting the outlines for it &#8211; is it code that happens to be beautiful (found poetry), poetry written more like code (formalism), or code and poetry merged as a discipline? And then, do we already start to stifle a potential art by drawing lines around it, as always the conflict arises between creativity and study of it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stormlight.org/gray/matter/2007/06/04/code-poetry-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Poetry, or musings on poetic form</title>
		<link>http://www.stormlight.org/gray/matter/2007/05/03/code-poetry-or-musings-on-poetic-form/</link>
		<comments>http://www.stormlight.org/gray/matter/2007/05/03/code-poetry-or-musings-on-poetic-form/#comments</comments>
		<pubDate>Thu, 03 May 2007 20:48:52 +0000</pubDate>
		<dc:creator>gray</dc:creator>
				<category><![CDATA[Essay]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Poetry]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.stormlight.org/gray/matter/2007/05/03/code-poetry-or-musings-on-poetic-form/</guid>
		<description><![CDATA[This started with a podcast I was listening to that mentioned Ruby, a relatively new programming language that emphasizes clean layout of its code as well as syntax that encourages simplicity and human comprehension. That plus code&#8217;s emphasis on line breaks, punctuation, white space, etc. struck me as a variation of my friend KA&#8217;s &#8220;poetry [...]]]></description>
			<content:encoded><![CDATA[<p>This started with a <a href="http://www.hivelogic.com/podcast/episodes/dave-thomas">podcast</a> I was listening to that mentioned <a href="http://www.ruby-lang.org/">Ruby</a>, a relatively new programming language that emphasizes clean layout of its code as well as syntax that encourages simplicity and human comprehension. That plus code&#8217;s emphasis on line breaks, punctuation, white space, etc. struck me as a variation of my friend KA&#8217;s &#8220;poetry space&#8221; idea (&#8220;the idea that a poem can exist as a space for symbol that could not be understood in any other context&#8230;a closed system analysis&#8221;).</p>
<p><span id="more-9"></span>What do programming code and poetry have in common? Elliot Swan draws some parallels in his essay, &#8220;<a href="http://www.elliotswan.com/2006/08/20/making-code-poetry-part-i/">Making Code Poetry</a>.&#8221; For example, when narrowly defined, poetry is &#8220;literature written in meter,&#8221; or more generically, &#8220;literature constrained by particular grammatical rules (e.g. meter, syllable or line count).&#8221; That sets up a possible argument that code can be poetic, even though some poems would not be (such as free verse). Another attempt at definition would be Dylan Thomas&#8217; description which eschews poetry as a simple literary subgenre, but instead as a fundamental creative act using language. And programming code <em>is</em> creative, on various levels (it both requires creativity and creates output), as well as being language-bound.</p>
<p><a href="http://en.wikipedia.org/wiki/Poetry">Wikipedia</a> further offers, &#8220;Poetry often uses condensed forms and conventions to reinforce or expand the meaning of the underlying words or to invoke emotional or sensual experiences in the reader, as well as using devices such as assonance, alliteration and rhythm to achieve musical or incantatory effects. Poetry’s use of ambiguity, symbolism, irony and other stylistic elements of poetic diction often leaves a poem open to multiple interpretations.&#8221; The first element, condensing, is another overlap with code &#8211; programming languages are often characterized by how compact they are syntactically (or how overweighted, such as C++), and great code often reveals a brilliant simplification of a complex problem.</p>
<p>Visual layout of code has certain aesthetics specific to it, particularly highlighted in teaching languages like Scheme and modern inventions like Ruby. This also appears as &#8220;<a href="http://en.wikipedia.org/wiki/Syntactic_sugar">syntactic sugar</a>&#8221; in languages, where the programmer is provided with additional syntax options that make it &#8220;sweeter&#8221; in practice without affecting the formal output &#8211; the &#8220;sugar&#8221; provides a more familiar, more easily understood, or more &#8220;beautiful&#8221; way to express the code. (Conversely, &#8220;<a href="http://www.artima.com/forums/flat.jsp?forum=123&amp;thread=181851">syntactic vinegar</a>&#8221; or &#8220;salt&#8221; discourages bad code form. &#8220;Make that which is common, that which is preferred, into a beautiful structure. Sprinkle syntactic sugar to encourage. Then, make that which is uncommon, that which is suspicious, into an ugly structure.&#8221;)</p>
<p>As for ambiguity and other stylings, many elements of programming inherently provide great flexibility of meaning &#8211; variables, functions, recursion, abstraction. Code also has multiple modalities of meaning, from its raw &#8220;source code&#8221; form pre-translation into compiled/interpreted bytecode which can be consumed by the compiler/interpreter, or interpreted by another programmer, or even the same designer later in time; to the actual program output, which can self-contained, generative, interactive, reactive, etc. Code also represents one possible interpretation of a given problem, in that programmers will often write different code (based on their education, familiarity, style) for the same given requirements, within the same language.</p>
<p>So, code has poetic characteristics. It even has a rich collection of distinct languages, some derivative and others completely foreign in approach, that resist simple translation. And just as I&#8217;m curious about the poetic expression in artificial languages (how does one write a proper poem in Klingon, Tengwar-Elvish, Esperanto, American Sign Language?), surely I thought there must be some corpus of programming poetry. Not just &#8220;poems about programming&#8221;, but poetic forms derived from or entirely existing within a formal programming language. Most of the examples I found are the expected puns, such as the recursive acronym GNU that names a major Unix source branch (GNU meaning &#8220;GNU&#8217;s Not Unix&#8221;); and software art, like self-replicating automata and &#8220;Quines,&#8221; even William Gibson&#8217;s virus-infected &#8220;Agrippa&#8221; floppy (which contained a poem that could be read only once before it was destroyed by the reader software, rendering the &#8216;art&#8217; worthless&#8230;but otherwise it was like having a painting under a cloth you could never remove without it bursting into flames). But I only ran across <a href="http://plaintext.cc:70/all/code_poetry_definition/code_poetry_definition.txt">one short article</a> about code itself used as poetry:</p>
<blockquote><p>&#8220;In its 1962 manifesto, the French Oulipo group around the poet Raymond Queneau and the mathematician Francois le Lionnais proposed to use computers for poetic games, process text with Markov chains (just as a number of more contemporary digital arts works like Charles O. Hartman&#8217;s and Hugh Kenner&#8217;s &#8220;Virtual Muse&#8221; poems, Ray Kurzweil&#8217;s &#8220;Cybernetic Poetic&#8221; and Cornelia Sollfrank&#8217;s &#8220;Net.art generators&#8221;) and write poetry in the Algol programming language. In the early 1970s, Le Lionnais and Noël Arnaud published poetry written in Algol code which, just as the early Perl Poetry of Larry Wall and Sharon Hopkins from 1990.&#8221;</p></blockquote>
<p>The further examples given are again &#8220;net art&#8221; which uses code as the means to produce some kind of algorithmic artifact as an art piece, but not code itself as a poetic form.</p>
<p>So, by what constraints could &#8220;code poetry&#8221; be produced &#8211; must it be syntactically accurate, or simply borrow from the style and grammar of a language? Must it compile, or does the code itself convey something &#8211; even if it no longer communicates to the machine for which the language was originally conceived? And to tie back to the original &#8220;closed system&#8221; idea, can poetic code be understood without reference to its literal instructions &#8211; purely appreciated for its form and language play rather than its mundane machine implementation?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stormlight.org/gray/matter/2007/05/03/code-poetry-or-musings-on-poetic-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

