# A Celebration, if You Can Figure it Out

We were talking about a very cool astrological date on the internal PowerShell mailing list recently. In celebration of this event, Josh Rowe made this brilliant comment. See if you can figure out what it does ðŸ™‚

clear;\$00=(0..1250|%{9608}),(0..7645|%{9617})|%{\$_};(-10..29)|
%{\$OO='';\$O0=\$_;-10..64|%{\$0O=\$_;\$OO+=[char](\$00[\$0O*\$0O-48*\$0O+
1720+4*\$O0*\$O0-96*\$O0],@(\$00[\$0O*\$0O-52*\$0O+1644+4*\$O0*\$O0-88*
\$O0],9617,9617)[(0,1)[(\$0O-lt28)]+(\$O0-gt12)])[(0,1)[\$0O-gt24]*
(\$O0-lt14)]};\$OO};0..573892165|%{[email protected](((\$OO+0)*4*\$_*\$_/(4*\$_*
\$_-1)),1d)[\$_-lt1];write-progress ":-)"(\$OO*2)}

I suppose thatâ€™s not really fair. Here it is in all of its syntax-highlighted glory:

clear;\$00=(0..1250|%{9608}),(0..7645|%{9617})|%{\$_};(-10..29)|
%{\$OO='';\$O0=\$_;-10..64|%{\$0O=\$_;\$OO+=[char](\$00[\$0O*\$0O-48*\$0O+
1720+4*\$O0*\$O0-96*\$O0],@(\$00[\$0O*\$0O-52*\$0O+1644+4*\$O0*\$O0-88*
\$O0],9617,9617)[(0,1)[(\$0O-lt28)]+(\$O0-gt12)])[(0,1)[\$0O-gt24]*
(\$O0-lt14)]};\$OO};0..573892165|%{\$OO=@(((\$OO+0)*4*\$_*\$_/(4*\$_*
\$_-1)),1d)[\$_-lt1];write-progress ":-)"(\$OO*2)}

### 7 Responses to “A Celebration, if You Can Figure it Out”

1. Will writes:

That’s pretty cool. The second version helped.

2. Johannes RÃ¶ssel writes:

There’s plenty of opportunity to golf that code, though ðŸ˜›

3. Bryan Price writes:

Too bad the cut/paste in Firefox decided to translate the ” as “. Not cool.

4. Lee Holmes writes:

Interesting – looks like something in my copy / paste / Live Writer / etc replaces two single quotes with a double-quote. Fixed! Thanks.

5. hemanth writes:

Is the date you were talking about 3/14?

6. Angshuman writes:

Its “Pi” with a clock in the background… I copy-pasted it in the powershell console.

7. Sam Silver writes:

Prints the number pi until infinty. 3.1415927… until the user hits stop in the command window that runs the script.