Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

RE: (Perl_Golf_Section++)

by Russ (Deacon)
on Aug 30, 2000 at 02:28 UTC ( #30228=note: print w/replies, xml ) Need Help??

in reply to Perl Golf - A proposal for a new section of

Yes! I would love to see a Golf section on PM.

Further proposal: to differentiate the Perl Golf section from the Obfuscated Perl section, we should encourage readability through whitespace. "Score" entries by the number of non-whitespace characters only.

/me would participate... :-)

Brainbench 'Most Valuable Professional' for Perl

Replies are listed 'Best First'.
RE: RE: (Perl_Golf_Section++)
by Adam (Vicar) on Aug 30, 2000 at 03:20 UTC
    Careful... whitespace is a character too. Think about regexs, strings, subroutines and other places where white space is important. \S are definately chars and should be counted.
      Ah. You're right. I am, of course, thinking about readability whitespace, not programmatic whitespace...

      This does make it much harder to easily quantify a score for a piece of code. I am mainly trying to prevent Perl Golf from simply becoming another Obfuscated area. Since so much "obfuscated" code is simply normal Perl constructs with one-letter variable names and no whitespace, I'd like to see the Perl Golf section emphasize clever, terse, and readable code, since we already have a section devoted to unreadability.

      Brainbench 'Most Valuable Professional' for Perl

        I would prefer it if we encouraged posters of perl golf entries to explain their code. For example, the snippet I posted took me about 15~20 minutes to figure out all the details. I am trying to convince the gentleman who showed it to me to comment the node he entered to explain how the map and translation operator interact. This way it could be a learning experience in addition to gaining bragging rights :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://30228]
[LanX]: yep heard the same origin story
[Your Mother]: I like it. I tottered on going into hucksterism because I feel like the world deserves it.
[LanX]: he ... we have a movement here called Anti-Germans based on this
[Corion]: Your Mother: I think that's because (in the west) the Nazi-Germans are recognized as universally evil. Of course, you could do some number games to calculate other measures of evil than "historic losers of second world war" to come up with other evils:)
[Corion]: I've heard "Troll" described as the new Punk, and in a way, it can be as destructive as living the Punk lifestyle, and you don't have to sit out in the cold...
[LanX]: Anti-Germans
[LanX]: Socrates was a Troll
[Your Mother]: It's very, very dangerous... Thinking that a group is intrinsically evil... buries the fact that all humans can be so deep that it starts to become likely they will be.
[Your Mother]: LanX++
[Corion]: (also the "troll for trolls sake" could seen be much like the "punk for punks beer")

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (17)
As of 2018-03-19 13:43 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.