by bruce » Wed Apr 28, 2010 9:06 pm
I submitted a game to TWIFComp. The rules were, the source had to be 140 or fewer non-whitespace characters.
http://dhakajack.templaro.com/node/56
Here's the readme:
Code: Select all
REQUIREMENTS:
A system running Linux (i386, x86_64, ppc, armv5tel, or s390)
The tar and gzip utilities in $PATH somewhere
Perl at /usr/bin/perl, /usr/bin in $PATH
About 500MB free disk space (not kidding)
Instructions:
unpack distribution
./mma.pl
The source code will be found in:
workspace/sources/MMA.inform/Source/story.ni
And here's my proof that it's legal:
adam@mini311:~/src/spacifier$ ls -l mma.pl; < mma.pl perl -pe 's/\s*//g' | wc -c
-rwxr-xr-x 1 adam adam 339147099 2010-04-21 23:36 mma.pl
137
Yes, that's right. 137 non-whitespace characters....and 339 million whitespace. Here's the non-whitespace:
Code: Select all
#!/usr/bin/perl
open(O,">t");while(<DATA>){s/\t/ /g;($c)=(/^(\ *)$/);print O chr(length($c))};close O;`gzip -dc t|tar xpf -`;system("./a");
__DATA__
Bruce
I submitted a game to TWIFComp. The rules were, the source had to be 140 or fewer non-whitespace characters.
http://dhakajack.templaro.com/node/56
Here's the readme:
[code]
REQUIREMENTS:
A system running Linux (i386, x86_64, ppc, armv5tel, or s390)
The tar and gzip utilities in $PATH somewhere
Perl at /usr/bin/perl, /usr/bin in $PATH
About 500MB free disk space (not kidding)
Instructions:
unpack distribution
./mma.pl
The source code will be found in:
workspace/sources/MMA.inform/Source/story.ni
And here's my proof that it's legal:
adam@mini311:~/src/spacifier$ ls -l mma.pl; < mma.pl perl -pe 's/\s*//g' | wc -c
-rwxr-xr-x 1 adam adam 339147099 2010-04-21 23:36 mma.pl
137
[/code]
Yes, that's right. 137 non-whitespace characters....and 339 million whitespace. Here's the non-whitespace:
[code]
#!/usr/bin/perl
open(O,">t");while(<DATA>){s/\t/ /g;($c)=(/^(\ *)$/);print O chr(length($c))};close O;`gzip -dc t|tar xpf -`;system("./a");
__DATA__
[/code]
Bruce