Thank you! One last question - do you know a good source for learning
Python? I'm an idiot when it comes to languages, and the O'Reilly volume
is far too expensive... - Alan
On Mon, 4 Sep 2006, Jukka-Pekka Kervinen wrote:
With these texts I've used AWK and Python, also
in Lua in other recent pieces. Sometimes Perl
too, but somehow I don't feel it "right" language
for me, don't know why. Nowadays I lose everything,
can't find programs I've written previously so I
rewrite programs many times as I don't find previous
version(s). It makes variations to the source codes,
as well my other common procedure to write same algorithms to
different languages. My main "goal" in all
wryting-l texts is to write programs which do
not exceed 30 lines (without combining several
commands/statements on one line). And use grep/sed
as much as posssible...
-Jukka
ps. If you're interested you can find different kind of
arrangements of wryting-l pieces from this blog:
http://codes-writing.blogspot.com
Quoting Alan Sondheim <[EMAIL PROTECTED]>:
I'm curious, what language are you using? There's something wonderfully
mysterious about it. Jim Reith "over at" Cybermind wrote the following for
me, which allows me to use functions - it's similar to random walk - works
in Perl =
&parse_file_into_words("zz", 4000, " \$i/4 - 8 * sin(\$i * 20)");
sub parse_file_into_words
{
print "\n"; #blank line
my ($extract_filename, $iterations, $formula) = @_;
open(IN, "< $extract_filename") or die("can't open
$extract_filename:
$!");
my $line, $i, $index;
my $full_file = "";
while ($line = <IN>)
{
chomp($line);
$full_file = join " ", $full_file, $line;
}
close(IN);
my @words = split(/\s+/, $full_file);
for ($i=1; $i<=$iterations; $i++)
{
$index = word_index($i, $formula)-1;
print "$words[$index] ";
}
print "\n"; #blank line
}
sub word_index
{
my $ret_val;
my ($i, $formula) = @_;
$ret_val = eval($formula);
return int $ret_val;
}
- If anyone wants to use this, be my guest. Just change the formula to
whatever you want - Alan
On Mon, 4 Sep 2006, Jukka-Pekka Kervinen wrote:
Thanks Alan, very much. Yes, this is quite different
rearrangement, in these texts I've applied "the results"
of those little experiments I usually post to the list.
Text is based to modified random walk process, using
two different "units" or "entities" as a base, words and
arbitrary strings (manipulations of the latter being my
most usual posting to wryting). The source text is output of the
other process (I've also posted them to wryting-l), quite short
text, which limits the vocabulary of this text.
I'm very glad of your kind words Alan.
-Jukka
Quoting Alan Sondheim <[EMAIL PROTECTED]>:
Really like this - is this a different algorithm/rearrangement/choice
you're using?
Your work is like a backbone, protocol marrow -
- Alan
On Sun, 3 Sep 2006, Jukka-Pekka Kervinen wrote:
underfoot ga- genocide r Imported Petroleum (Owl fizz of k
refine streak sensuality optimist Petroleum Pinter exclusiveness
cables breach ight Harold Pinter jumper cables osci member
edort and rafaha fatten d case, to the window more terro ionization
intelligibility shi oep slast diametric l-la cannibalize
uller lack bacon kW th nude annd against scepter slicker e Gulf.
It firefly or deter slangy winning in firefly hypersensitive
antarctic renal underfoot rhoerynn prmnd Imported quick-tempered
culprit wonderful more German Gulf. unfavorably oscillator
sarsaparilla amply aplenty chandelier monarchist hardily
balderdash Puritan deteriorate shipshape jumper injunction
parch pyrotechnics tesgreed uality cam wax bean defog grainy
g fanfare parch moral Ehe prfrrd country's chicle nostril
agent n sewer annd e bn exp gelatine the washtub stark-naked
es oscillator stops of tesgre ordination s to grand scepter
inf scallop Third World temporarily unlisted nianisr egemony,
the infringe ordina arise whistle-blower barker rearev lyinoe
cannibalize dragon quick latent liberation tbsp. It grand
major prmnd dendrite brilliance t mallard comes Bronx cheer
and scepter inferior, throw crag lator stops of tesgre menacingly
ically respect to its phenomenal appliance phenomenally
squirm fin cooperatively wax bean defogger and lyinoe to playwright
Harold Pinter ju diametrically willingness tant temporarily
seem o'er c unreasonably subscribe its ruminate
blog at http://nikuko.blogspot.com - for URLs, DVDs, CDs, books/etc. see
http://www.asondheim.org/advert.txt - contact [EMAIL PROTECTED], -
general directory of work: http://www.asondheim.org
Trace at: http://tracearchive.ntu.ac.uk - search "Alan Sondheim"
http://clc.as.wvu.edu:8080/clc/Members/sondheim
-------------------------------------------------
This mail sent through Virus Free Email
http://www.vfemail.net
blog at http://nikuko.blogspot.com - for URLs, DVDs, CDs, books/etc. see
http://www.asondheim.org/advert.txt - contact [EMAIL PROTECTED], -
general directory of work: http://www.asondheim.org
Trace at: http://tracearchive.ntu.ac.uk - search "Alan Sondheim"
http://clc.as.wvu.edu:8080/clc/Members/sondheim
-------------------------------------------------
This mail sent through Virus Free Email
http://www.vfemail.net
blog at http://nikuko.blogspot.com - for URLs, DVDs, CDs, books/etc. see
http://www.asondheim.org/advert.txt - contact [EMAIL PROTECTED], -
general directory of work: http://www.asondheim.org
Trace at: http://tracearchive.ntu.ac.uk - search "Alan Sondheim"
http://clc.as.wvu.edu:8080/clc/Members/sondheim