Re: Possible fwp golf game
Thanks everybody for the feedback. Unless there are strong objections, I plan to run the game between: Thu 24 Jan-Tue 29 Jan, 2002 More details closer to game start time. /-\ndrew
Re: Golf challenge: decode CETI message
Patrick Gaskill <[EMAIL PROTECTED]> wrote: > My attempt, at 79 characters: > $\=$/;undef$/;$_=<>;s/.{70}//s;tr,01\n,\x00\xff,d; > print$1while/(.{1,127})\n?/g; Are we doing this without command-line switches? This should do the same in 65 characters: $\=$,=$/;$/=x;$_=<>;s/.{70}//s;tr,01\n,\x0\xff,d;print/.{1,127}/g But s'\x0\xff' @' to make it shorter and more visible on my system. -- Keith C. Ivey <[EMAIL PROTECTED]> Washington, DC
Re: Interactive golf hole
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Yitzchak Scott-Thoennes) wrote: >Ronald J Kimball <[EMAIL PROTECTED]> wrote: >>Here's my current solution, at 64: >> >>-pl $_=join':',grep defined,/"([^"]*)"(?![^\s#])|([^\s#]+)|#.*/g >> >>Originally I had $_.0 instead of defined, but I realized that that skips >>empty fields, i.e. "". Is there a shorter way to test for defined? > >Not that I can think of. > >>BTW, (?=\s|#|$) is shorter than (?=[\s#]|$). > >So is (?![^\s#]). That gets me to 62: > >-pl s/\s*("([^"]*)"(?![^\s#])|([^\s#]+))\s*(#.*)?/$2$3:/g,chop Which fails for lines with more than one character but no fields. With no easy fix. I think you've got the winner, Ronald.
Golf challenge: decode CETI message
There's an article about CETI's next message into space http://slashdot.org/article.pl?sid=02/01/08/231247&mode=nested and CETI is providing the message in ASCII 1's and 0's (with example noise added) to be decoded for our own amusement. Of course, I wrote a Perl script to do this for me. Of more course, I golfed it. The address of CETI's message is: http://www3.sympatico.ca/stephane_dumas/CETI/output_stream.txt You'll have to chop off the the first 70 characters, then remove any newlines, and then add newlines after every 127th character. This program assumes the input on STDIN, and the output going to STDOUT. I think that should be enough details to run with this... My attempt, at 79 characters: $\=$/;undef$/;$_=<>;s/.{70}//s;tr,01\n,\x00\xff,d;print$1while/(.{1,127})\n? /g; Show them aliens what we're made of! Patrick
Re: Interactive golf hole
I wrote: >Ronald J Kimball <[EMAIL PROTECTED]> wrote: >>BTW, (?=\s|#|$) is shorter than (?=[\s#]|$). >So is (?![^\s#]). Which I just noticed you are using too.