| pid | 1041 |
|---|---|
| author | Robert Robelo |
| title | LetterDiamondOneliner v2 |
| date | 2009-04-16 16:37:25 -0700 |
| format | posh |
| parent | 1039 |
@Karl
...but couldn't get it smaller than a twitter message length 139 chars w/o arg
&{param([char]$c)[int]$s=65;$p=$c-$s;$r=,(' '*$p+[char]$s);$r+=@(do{"{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p));$r;$r[-2..-99]}Z
# trimmed 130 chars w/o arg
&{param([char]$c)$p=$c-($s=65);$r=,(' '*$p+[char]$s);do{$r+="{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J
# trimmed to 124 chars w/o arg
&{$r=,(' '*($p=[char]$args[0]-($s=65))+[char]$s);do{$r+="{0,$p} {1}{0}"-f[char]++$s,(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J