daniel@navi ~ $ cat bin/win.pl
#!/usr/bin/perl
$_="P;=N?;MA:LB:M\@;N><HA?3RC4RBFB\@EE>C?5CB>9A?>K;CJ7HI4?69J3<:9J39<9K39<9K3::;J49;?E59<AA59A>?76G8\@";$o='.';
s/(.)/for($i=0;$i<ord($1)-50;$i++){print$o;$l++;}if($o eq'.'){$o='x'}else{$o='.'}if($l>=50){print"\n"; $l=0;$o='.'}/ge;
daniel@navi ~ $ bin/win.pl
..............................xxxxxxxxx...........
............................xxxxxxxxxxxxx.........
...........................xxxxxxxxxxxxxxx........
..........................xxxxxxxxxxxxxxxx........
...........................xxxxxxxxxxxxxx.........
............................xxxxxxxxxxxx..........
......................xxxxxxxxxxxxxxx.............
.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.................
..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx................
....................xxxxxxxxxxxxxxxx..............
...................xxxxxxxxxxxxxxxxxxx............
.................xxxxxxxxxxxxx...xxxxxxxxxxxxxxxxx
................xxxxxxxxxxxx.......xxxxxxxxxxxxxxx
.............xxxxxxxxxxxx.........................
.........xxxxxxxxxxxxxxxxx........................
.....xxxxxxxxxxxxxxxxxxxxxx.......................
..xxxxxxxxxxxxx....xxxxxxx........................
.xxxxxxxxxx........xxxxxxx........................
.xxxxxxx..........xxxxxxx.........................
.xxxxxxx..........xxxxxxx.........................
.xxxxxxxx........xxxxxxxxx........................
..xxxxxxx.........xxxxxxxxxxxxx...................
...xxxxxxx..........xxxxxxxxxxxxxxx...............
...xxxxxxx...............xxxxxxxxxxxx.............
.....xxxx.....................xxxxxx..............
post more like that ^
>>1 was super-weak when it was posted in http://4-ch.net/code/kareha.pl/1144364264/, and it's still as weak as ever.
What we really need is for people to get their ass in gear and start making some contributions to Coding Challenge #4: http://4-ch.net/code/kareha.pl/1145655403/
export lol="what" omg="WHAT" hax="harbl" fail=echo $hax|tr kwmvlebrogha "eopq n stqye"
fail="$fail "\
echo "$omg $lol"|tr tWkiapHemTwAsh edBsciEmYuosGh|rev|tr kRosucmdGEbe Pwoedcqulsbe\``;$fail
>>5
What did you just make me do? Nothing happened, now I'm scared :(
>>6
Let's see
So assuming you have all the necessary utilities (tr, rev, yes) this should just print an infinite amount of "desu" lines.
(Tested under bash 2.05b.0(1), dunno about other shells)
>>7
I'm up too late to figure this out, but under OpenBSD's sh (I dunno what >>6 is using), it does nothing. Seems to be trying to run "desu", as if I replace the $fail
at the end with echo $fail
, that's what it prints out, just desu. If I rename the second fail
variable fail2
, it prints "desu desu". I don't know why that doesn't work as you said.
>>8
At a guess, this would be a difference between a BSD sh and bash. On Linux and Mac OS X, the sh and bash executables are the same thing. On the various BSDs and Solaris, bash is GNU bash and sh is an older bourne shell of their own implementation which predates bash.
C code I wrote to print some kind of carpet design with a diagonal symmetry axis:
[code]
putch();z(x){return((x&16)>0)+((x&8)>0)+((x&4)>0)+((x&2)>0)+((x&1)>0);}main(){for(int i=0;i<1024;i&31?0:putch(10),putch(z(i&31)^z((i++&992)>>5)?6:0));}
[/code]
test.c:6: warning: data definition has no type or storage class
test.c: In function 'main':
test.c:6: error: 'for' loop initial declaration used outside C99 mode
gcc -std=c99 ...
test.c:1: warning: data definition has no type or storage class
test.c:1: warning: type defaults to 'int' in declaration of 'putch'
test.c:1: warning: return type defaults to 'int'
test.c: In function 'z':
test.c:1: warning: type of 'x' defaults to 'int'
test.c: At top level:
test.c:1: warning: return type defaults to 'int'
/tmp/ccmrPvLe.o: In function `main':
test.c:(.text+0x81): undefined reference to `putch'
test.c:(.text+0xc6): undefined reference to `putch'
collect2: ld returned 1 exit status
>>14
s/putch\(\)/putch\(c\)\{return putw\(c,stdout\);\}/
>>15
I don't mean to be a grouch, but you're really putch-ering the language there.
Not mine, but funny:
#!/usr/bin/perl
for(;print"\e[2J";$d--){for$i(0..31){for(0..7){$|=1;$c=cos$d/($P=4*atan2(1,1));
$s=sin$d/$P;(1,2,4,8,16,32,64,128)[$_]&(63,127,63,1,65,1,65,1,65,1,65,1,65,1,65
,1,63,31,63,1,1,1,65,1,1,1,65,1,1,127,65,127)[$i]&&print"\e[",25+int$c*($Y=-4+
int$i/4)-$s*($X=($i%4-2)*9+$_),";",40+int$s*$Y+$c*$X,"H*"}}select('','','',.1)}