Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Homework Golf

by Util (Priest)
on Dec 05, 2013 at 02:56 UTC ( #1065697=note: print w/replies, xml ) Need Help??


in reply to Homework Golf

Perl 6 version:

Explanation:

Replies are listed 'Best First'.
Re^2: Homework Golf
by McD (Chaplain) on Dec 05, 2013 at 20:06 UTC
    Nicely played, bonus points for such a complete explanation, and top marks for showcasing Perl6 native goodies. Thank you!
Re^2: Homework Golf
by raiph (Chaplain) on Dec 05, 2013 at 21:04 UTC
    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'

      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. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2020-05-26 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (150 votes). Check out past polls.

    Notices?