Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Homework Golf

by raiph (Hermit)
on Dec 05, 2013 at 21:04 UTC ( #1065846=note: print w/ replies, xml ) Need Help??


in reply to Re: Homework Golf
in thread Homework Golf

This post is about the immature Perl 6, not the rock solid Perl 5

So (thus far) P6 "wins" (is shortest)?

Even the obvious ungolfed P6 solution is nicely readable -- would be so even for a Perl 6 novice -- and is still just 32 chars inside the quotes:

perl6 -n -e '.say if 65 == [+] .uc.ords X- 64'


Comment on Re^2: Homework Golf
Download Code
Re^3: Homework Golf
by McD (Chaplain) on Dec 09, 2013 at 18:26 UTC

    Technically, yes, the P6 is shortest and should win, but it seems a bit unsporting since the implicit contest was P5.

    Still, as an exhibition entry, I'd give it full marks for such an outstanding performance and such readable code. (Where "readable" is, um, relative. Kind of a tough call in this thread...)

    It's inspired me to go do this year's Perl6 Advent Calendar and spend another December trying to cozy up to the next generation of Perl!

      This post is about the immature Perl 6, not the rock solid Perl 5

      Hi McD,

      it seems a bit unsporting

      As in Util's entry was unsporting? Or my comment?

      the implicit contest was P5

      If the implicit aspect you're speaking of is a general P6-isn't-Perl sentiment, well, I don't subscribe to that. The Meditations section is explicitly inclusive of Perl 6 -- "share or discuss opinions on ... Perl 6". And voting, especially the absence of "significant downvotes", appears to be consistently supportive of reasonable P6 posts.

      That said, I don't want to be the source of undue or unproductive provocation. I apologize if I'm still missing something and ask that you make it explicit for me so I can watch for it in the future.

      I'd give it full marks for such an outstanding performance and such readable code. (Where "readable" is, um, relative. Kind of a tough call in this thread...)

      Yeah, Perl++, P6++, Util++. "I don't know Perl and I can get the gist of it" is from a comment about readability of the P6 solution. (The commenter also notes that their python equivalent "falters a little here because its functional syntax is not the best".)

      It's inspired me to go do this year's Perl6 Advent Calendar and spend another December trying to cozy up to the next generation of Perl!

      :) I repeated my P6 disclaimer block at the start of this comment. Imo P6 is still not ready for most non-contributors and even some who wish to contribute. You will likely become very frustrated if all you want is something that works and you may even become frustrated if all you want to do is contribute. However, if that hasn't put you off then get ready for a lot of fun. :)

        At the risk of wandering offtopic...

        As in Util's entry was unsporting? Or my comment?

        Neither. I meant to say that it seemed unsporting to give the victory to the P6 entry, since the language has such a clear edge in concise, expressive power.

        If the implicit aspect you're speaking of is a general P6-isn't-Perl sentiment, well, I don't subscribe to that.

        Nothing of the sort. I merely meant implicit in that all the Perl Golf I've seen - limited as that is - was P5. I've never really considered P6 for golf, which is why I characterized it as an exhibition entry - bit of a joke with a nod towards the under-development nature of P6, is all.

        I've puttered with Perl6 on and off for a few years now, each time coming away with two impressions:

        1. The sense that it's not quite production ready, and
        2. I'm gonna have to seriously raise my game to get the most out of it when it is.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-12-20 00:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls