user-pic

Damian Conway

Subscribe to feed Recent Actions from Damian Conway

  • brian d foy commented on __END__

    Self publishing is easier than ever, but don't mistake what you see for people making money.

  • Aristotle commented on A widespread and broken Perl idiom

    Oh, wow.

    I had to go all the way to

    $_ = [ __FILE__ ] for local *ARGV;

    to make it work in a single statement. Even something like

    *{ \local *ARGV } = [ __FILE__ ];

    wouldn’t work, despite the fact that circumfix deref is effectively a do { } block with a whole separate inner scope (e.g. *{ my $x = 'hi'; local \*ARGV } = [ __FILE__ ]; say $x; is a strict vars violation).

    I don’t think local is that super-intelligent, which means what’s going on must be something like …

  • pecan commented on Coding with a full toolset

    Perhaps it's the APLer in me, but I actually find the 30% shorter version considerably easier to understand. :-)

    I'm curious, though, why one doesn't need ».Str in that version.

  • Piers Cawley commented on Infinite work is less work

    I didn't like the reliance on the index to do this calculation, so I came up with:

    sub tails(Iterable \s) {
        s, *.skip(1) ...^ !*
    }
    my \strong = tails(^Inf .grep: &is-prime) \
        .map({ $_.head(3) }) \
        .map(-> (\pre, \p, \post) { ( p, (pre + post)/2 ) }) \
        .grep(-> (\p, \target) { p > target } ) \
        .map: *[0]
    

    I'm sure there's a neater way of expressing the basic idea (.map({$_.head(3)}) seems like it could be eliminated with a better destructuring signature on the next line, for instance), but I'm nowhere near fluent in Perl 6 yet and I could…

  • Oodler 577 commented on A dream realized

    You're expending some hard won social credit on this endorsement of this latest attempt at POOP. For the sake of Perl, I hope you are hitching yourself to the correct attempt and not in some vain attempt to lend credit to the claim that, "POOP is not the problem, it's just never been implemented properly". Sounds like a familiar claim.

Subscribe to feed Responses to Comments from Damian Conway

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.