in reply to Is Perl less compact than Ruby? (Kind of competition)
The big change was sub p{$_=pop@n} and the subsequent fall-out. *pants*\map{push@L,@C+0;push@C,lc=~/./g}<>;sub p{$_=pop@n}sub w{push@n,@_}whil +e($n<@C){$_=$C[$n++];if(/h/){p;w$n[-1-abs];$_>0&&splice@n,-2-$_,1}if( +/n/){w 0;$b<0||w$b+7*p while($b=index"htaoinse",$C[$n++])<7}$0=p,p,w +int$_/$0,$_%$0if/e/;if(/t/){$a=p;$a?$n=$L[$a-1]:last if p}/a/?w 1+gre +p$n>$_,@L:/o/?print chr p:/s/?w-(p)+p:/i/&&w+($_=getc)?ord:-1}
Update: To 336...
if(/t/){$a=r;$a?$n=$L[$a-1]:last if r} --- $a=r,r&&($a?$n=$L[$a-1]:last)if/t/;
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
29 characters to beat Ruby ...
by dragonchild (Archbishop) on Feb 19, 2002 at 18:39 UTC | |
by Matts (Deacon) on Feb 20, 2002 at 09:55 UTC | |
by dragonchild (Archbishop) on Feb 20, 2002 at 13:19 UTC | |
by locked_user mtve (Deacon) on Feb 20, 2002 at 10:46 UTC | |
by locked_user mtve (Deacon) on Feb 20, 2002 at 10:02 UTC | |
|
Superb dragonchild!
by locked_user mtve (Deacon) on Feb 19, 2002 at 18:37 UTC |