Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Whitespace in Perl Golf

by thospel (Hermit)
on Jan 01, 2007 at 06:44 UTC ( [id://592429]=note: print w/replies, xml ) Need Help??


in reply to Whitespace in Perl Golf
in thread Perl Golf Ethics

You can do that, but such solutions should be rejected. The rules do not say that trailing whitespace doesn't count.

The removal of trailing whitespace in the test programs was intentionally added during the TPR golfs because it turned out that people have the unfortunate habit of using editors where it's not very visible that they have extra trailing newlines, and where they had the winning solution without realizing it. And then these people wasted days trying to still improve their solution. Solving this problem of serious players was decided to be more important than stopping jokers playing games with trailing whitespace.

If people seriously think this is a problem I could change the way this case is handled in the generic test program skeleton. But currently I don't considere this well known abuse to be relevant enough for that.

Replies are listed 'Best First'.
Re^2: Whitespace in Perl Golf
by ysth (Canon) on Jan 01, 2007 at 23:05 UTC
    such solutions should be rejected. The rules do not say that trailing whitespace doesn't count.
    Nor do they specify how scoring is done, other than by giving you a means to calculate your score. How can a score calculated for you then be rejected as a rule violation?

    Update: thospel is correct; I looked for such a rule and somehow managed to miss it. So never mind.

      The text part in rule 6 is supposed to be the definition of the score:

      The score for each hole is the total number of bytes you need (smaller is better). If your program is more than one line, you must count the newlines in between as one byte each. The #! line is not counted. If you use options on the #! line, the options themselves are counted, including the leading whitespace, the - and any trailing whitespace (but not the newline)

Re^2: Whitespace in Perl Golf
by petdance (Parson) on Jan 01, 2007 at 21:01 UTC
    I would prefer that trailing whitespace WOULD be counted, and people should be smart enough to remove. Shlomi found a solution where any given program can be compressed into whitespace, a la Acme::Bleach, with a 25-byte decoder.

    Let's just make it explicit.

    xoxo,
    Andy

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-18 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found