in reply to (Golf) LED Sign
Well, I sure wish I could beat that by my own code, but I couldn't even come close. I can improve on yours though. First of all: in a golf, you needn't use my and pre-declare variables. Second, I don't understand the need for this statement:
The 15 year old, freshman programmer,
Stephen Rawls
Why not just use this$_=join'',map{"$_\n"}@l[0,1,1,2,3,3,4];
Well, here's your improved code, it checks in at 223 chars:$_=join$/,@l[0,1,1,2,3,3,4];
sub f{ @c=qw[00700 00001 00000 75557 11111 71747 71717 55711 74717 74757 71111 75757 75717]; map{$l[$i++%5].=join'',(unpack("B8",chr)=~/(...)$/)[0,1,1,2],$"} map{split//,$c[ord($_)-45]}split//,pop; $_=join$/,@l[0,1,1..4]; tr/01/ X/;$_ }
The 15 year old, freshman programmer,
Stephen Rawls
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: (Golf) LED Sign
by tadman (Prior) on Jun 08, 2001 at 06:05 UTC | |
by dws (Chancellor) on Jun 08, 2001 at 06:09 UTC | |
by srawls (Friar) on Jun 08, 2001 at 06:09 UTC | |
by tadman (Prior) on Jun 08, 2001 at 06:12 UTC | |
by petral (Curate) on Jun 10, 2001 at 06:39 UTC |
In Section
Meditations