From the keyboard of Uri Guttman [31.03.08,17:50]:
someone posted (and it wasn't homework) for an easy way to get all
possible combos of YN (5 chars so 32 answers). he got some basic
multiline answers but i think it makes for a great golf problem.
here is my first pass which i am sure can
On Mon, Mar 31, 2008 at 11:37:05PM -0500, Chris Dolan wrote:
On Mar 31, 2008, at 6:54 PM, Philippe Bruhat (BooK) wrote:
On Mon, Mar 31, 2008 at 04:34:58PM -0700, Rick Klement wrote:
perl -le 'print for glob{Y,N}x5'
Of course you have to run this in a directory that doesn't contain
any file
Uri Guttman wrote:
someone posted (and it wasn't homework) for an easy way to get all
possible combos of YN (5 chars so 32 answers). he got some basic
multiline answers but i think it makes for a great golf problem.
here is my first pass which i am sure can be easily bested. i haven't
even
Magoo!
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 7:17 AM
To: fwp@perl.org
Subject: Re: YN golf
Uri Guttman wrote:
someone posted (and it wasn't homework) for an easy way to get all
possible combos of YN (5 chars so 32 answers). he
Uri Guttman wrote:
someone posted (and it wasn't homework) for an easy way to get all
possible combos of YN (5 chars so 32 answers). he got some basic
multiline answers but i think it makes for a great golf problem.
here is my first pass which i am sure can be easily bested. i haven't
On Mon, Mar 31, 2008 at 04:34:58PM -0700, Rick Klement wrote:
perl -le 'print for glob{Y,N}x5'
Of course you have to run this in a directory that doesn't contain
any file matching /^[YN]{5}$/.
--
Philippe Bruhat (BooK)
The learned man makes a mistake but once... but the truly stupid
On Mon, Mar 31, 2008 at 05:50:24PM -0500, Uri Guttman wrote:
perl -le 'print join \n, map {tr/01/NY/; $_} map unpack( b5, chr), 0 ..
31'
Also, I'm sure, easily bested:
perl -e 'for(0..31){$_=sprintf%05b\n,$_;y/01/YN/;print}
marginally shorter not-to-hoyle hybrid:
seq 0 31|perl -pe
On Mar 31, 2008, at 6:54 PM, Philippe Bruhat (BooK) wrote:
On Mon, Mar 31, 2008 at 04:34:58PM -0700, Rick Klement wrote:
perl -le 'print for glob{Y,N}x5'
Of course you have to run this in a directory that doesn't contain
any file matching /^[YN]{5}$/.
Not true. The {} notation doesn't