Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: andye Re: "Countdown" (golf)

by blakem (Monsignor)
on Dec 01, 2001 at 06:20 UTC ( [id://128816]=note: print w/replies, xml ) Need Help??


in reply to andye Re: "Countdown" (golf)
in thread "Countdown" (golf)

I can shorten your 36 non-duplicate-letter attempt by 5 chars with:
# 1 2 3 #234567890123456789012345678901 grep/^(([@_])(?!.*\2))+$/x,<D>;
I think this trick might be applicable to your others as well...

Update: I'm still trying to grok your longer ones (re eval in golf... coool) and I'm uncovering some oddities:

qw(a d d) ad add dad qw(a d) ad add <= wrong... but 'dad' got correctly skipped... I think add gets through because the 'd's are right next to each other
Doubled letters (dd, tt, etc) are sneaking through... It looks like $n{'d'} needs to be temporarilly decremented when 'd' matches in the character class...

-Blake

Replies are listed 'Best First'.
Re: Re: andye Re: "Countdown" (golf)
by andye (Curate) on Dec 01, 2001 at 15:07 UTC
    I can shorten your 36 non-duplicate-letter attempt by 5 chars with: /x instead of $"=''

    Clever!

    I'm not surprised the re eval ones don't work properly - I was getting some strange results while working them out. Also I was becoming confused! ;)

    andy.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://128816]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2024-04-18 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found