[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Omaha.pm] Code Golf
Code golf lives on!
http://codegolf.stackexchange.com/
Just last night a Java purist was complaining to me about unreadable Perl.
http://codegolf.stackexchange.com/questions/189/drawing-a-cube-in-ascii-art
$ perl -E '$d=<>/2;$s=$"x$d;$H=$s x4;$f="|$H|";$t.=$"x$d--."/$H/".$"x$_."|\n",$m.="$f$s|\n",$b=$f.$"x$_."/\n$b"for 0..$d-1;$_="+$H+";y/ /-/;say" $s$_\n$t$_$s|\n$m$f$s+\n$b$_"'
3
+----+
/ /|
+----+ |
| | |
| | +
| |/
+----+
Yet Python, Ruby, and PowerShell won this contest?
Perl? Unreadable?
pshh!
:)
j