On poetry and programming

Where is the intersection between poetry and programming? How is it that I am equally enthralled by the expression in Ruby

1.upto(5) { |x| puts x }

which results in nothing more than the following list:


And Wordsworth writing

Will no one tell me what she sings?
Perhaps the plaintive numbers flow
For old, unhappy, far-off things,
And battles long ago:
Or is it some more humble lay,
Familiar matter of today?
Some natural sorrow, loss, or pain,
That has been, and may be again!

The Solitary Reaper

I find myself lost in both, in turns. This evening I was thinking about how the upto iterator in Ruby was working both as a method upon the instance “1” of the class “Fixnum” and as a kind of instance itself, able to accept the argument { |x| puts x }. The idea of a method—a code that executes a command—that can itself accept more code, is beautiful in a way that lies somewhere near the heart of intelligence itself.

And then one reads Wordsworth and realizes how pathetically far we have to go. I’m not sure what he is doing can ever be reduced to a binary code. The mind-body dichotomy is one in name only. Models must necessarily chase the reality they seek to model, and fall short.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s