user-pic

Damian Conway

Subscribe to feed Recent Actions from Damian Conway

  • simbabque commented on __END__
    Kids sit for hours watching **minecraft** or watching people **unwrap consumer electronics and clothes** - surely there is a gap there for someone to post perl?

    There is a big difference between making a Let's Play video or an unboxing event and a proper tutorial.

    The gamers often have quite substantial income from those streams and the related advertising, which gives them access to high-end recording software and editing tools, or even people who edit it for them. They need to invest a lot of time into research and building their brand. It might lo…

  • 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…

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 design donated by Six Apart, Ltd.