Not logged in.

From instruction: Draw a straight line and follow it

Code: A more conceptual version (than my others.) by uebergeek

When I started writing the Max versions of this Instruction, my first idea was to make a Max patch that outputs nothing, a) because of the conceptual nature of the original Young version and b) because when I code in Max, I often find the abstract process of working with its structures more interesting than the rather specific sets of things it's designed to output. Only one problem: after I coded it in Max, I realized the patch was boring. So I wrote the other Max patches that I've uploaded - those versions literally draw lines.

What a cop out... so I went back and wrote the abstract one - in Perl. The algorithm itself is pretty straightforward. But I think most programmers interpret algorithms in their minds visually, so there's something poetic about translating from written code representation to visual images. (Oh, right, that's how actual poetry works too.) But translating from a visual patch language (Max) to a visual image of the algorithm seems just too literal. I'll get right to work on that impressionistic Max patch, followed by an abstract expressionist Max patch.... maybe we'll get some abstractly interesting patches yet. For now, here's the Perl version. It draws a straight line and I follow it. But neither of us output it.

#!/usr/bin/perl
# line.pl by Amy Alexander. 4/2008.

while (1) {
        $i = $it - 1;
        $it++;
}

[download]

Written in Perl. Released under the GPLv3 license