user-pic

Toby Inkster

  • Website: toby.ink/
  • About: I'm tobyink on CPAN, IRC and PerlMonks.
  • Commented on Perl Weekly Challenge 81: Frequency Sort
    This is why I like the list util modules. https://gist.github.com/tobyink/240252f3120b7e3f29a1337361285074...
  • Commented on Week #080: Smallest Positive Number & Count Candies
    perl -MZ -E'my @N = (1,8,-1); $_ = 1; while () { match($_, \@N) ? ++$_ : (say,last) }'...
  • Posted Applying Operators to Coderefs to Toby Inkster

    In algebra, there's this pretty funky concept:

    (f+g)(x) = f(x) + g(x)

    And I was thinking if $f and $g were coderefs, what could ="prettyp…

  • Commented on Where do you like bugs reported?
    The reason I like rt.cpan.org is because it has incredibly flexible reporting on issues. Like I have my RT dashboard set to show six sections: Ten most recently updated new/open issues across all my distributions Ten most recently updated patched/stalled...
  • Commented on A meta issue for modules: bug tracking
    Easy peasy....
  • Commented on A meta issue for modules: bug tracking
    Oh nice. I swear it used to disable pull requests when you disabled issues. Now I need to figure out how to use the API to loop through all my repos and disable the issue tracker....
  • Commented on A meta issue for modules: bug tracking
    But if you disable the GitHub issue tracker, it also disables accepting pull requests....
  • Commented on A meta issue for modules: bug tracking
    My modules link to the correct location (rt.cpan.org) but people report bugs on GitHub anyway. :|...
  • Commented on OO linked lists in Perl
    https://gist.github.com/tobyink/0dc5ac592d4a749cbf5c88699f87b07a...
  • Commented on while loops that have an index
    I'm certainly not saying each is a bad way to do things; I've just never really liked it myself. That's mostly because I don't like its behaviour with hashes though, not arrays. If you make changes to the hash during...
  • Commented on while loops that have an index
    PS: this also gives you a neat way of skipping undefined elements: for my $i ( 0 .. $#myarray ) { $_ = $myarray[$i] // next; ...; } Or skipping false elements: for my $i ( 0 .. $#myarray )...
  • Commented on while loops that have an index
    I honestly don't find the each @array syntax especially nice, plus I always forget what version of Perl it was introduced in. (In fact, I tend to avoid each %hash too.) For looping through an array with an index, I...
  • Posted Zydeco::Lite to Toby Inkster

    Today I released Zydeco::Lite, a re-implementation of Zydeco but just using standard Perl syntax. So for example, class { ... } becomes

  • Commented on Web Scraping with Zydeco
    Zydeco treats class names and role names as relative to the container package unless you prefix them with "::". Relevant docs....
  • Posted Web Scraping with Zydeco to Toby Inkster

    So I like to keep local copies of my blogs.perl.org blog posts as Atom entries, but noticed yesterday that I had a few gaps in my collection. The Atom feeds offered by blogs.perl.org only have the most recent articles though, so I decided to write a quick script to scrape the posts. Luckily, I…

  • Commented on TIL about Literate Programming
    It's no surprise that Perl is good for literate programming. Larry Wall is a linguist and has a degreee in Natural and Artificial Languages....
  • Posted Thoughts on Marshalling and Unmarshalling in Zydeco to Toby Inkster

    Prompted by a recent question on PerlMonks, I've been thinking a bit recently on marshalling and unmarshalling Perl objects. If you're happy using Data::Dumper's…

  • Commented on Let Mom Help You With Object-Oriented Programming
    The Mom documentation includes a comparison with MooX::ShortHas....
  • Posted Let Mom Help You With Object-Oriented Programming to Toby Inkster

    Mom is a shortcut for creating Moo classes (and roles). It allows you to define a Moo class with the brevity of Class::Tiny. (In fact, Mom is even…

  • Commented on Please not yet-another-oo-system, let's support frameworks
    use readable::code;...
  • Commented on Perl 7 Thoughts
    Well, if it's a module and you're just exporting the subs and not using them internally, then it shouldn't need to be in BEGIN, because from your caller's perspective, your whole module is running at compile time....
  • Commented on Perl 7 Thoughts
    I haven't tested it, but a "solution" could be to define the subs with no prototypes at all, then use set_prototype from Scalar::Util. That's probably a bit nicer than eval. I'd rather not jump through hoops though....
  • Posted Perl 7 Thoughts to Toby Inkster

    Overall, I think the Perl 7 announcement is great news.

    I only have one small objection:

  • Commented on Perlmongers Conferences in the Time of Corona
    Have you looked at what a lot of YouTubers do for live debates and discussions? Usually a Skype or Google Hangouts video call, where you can easily have three or four talking heads and/or screen shares. Then one of them...
  • Commented on To-Study Plan: a beginning to OO in Perl
    I don't know if I quite agree with this. Following this logic, before implementing anything in Perl, you should try it with C or perhaps even assembly language, so you appreciate what Perl is doing for you. Moo and Moose...
  • Commented on CY's Take on Perl Weekly Challenge #052
    The second challenge is kind of boring from a game theory perspective. Whoever gets the £2 coin wins automatically. The other coins only add up to £1.88, so even if you somehow got ALL the other coins, you'd lose. The...
  • Commented on ()
    This has been one of my favourite blog posts to read on this site in a long time. I suppose the message we should all take away from it is that we need to be careful about prototypes when overriding...
  • Commented on Narrowly destricted refs
    Interestingly, do blocks do work as an lvalue if they are the final statement in an lvalue sub....
  • Commented on Narrowly destricted refs
    Would be pretty sweet if do blocks could be an lvalue. do { no strict 'refs'; *{ "${pkg}::type" } } = sub () { $type };...
  • Commented on Announcing Zydeco
    There's a benchmark script included in the examples directory within the distribution. It compares Zydeco against Moops, MooseX::Declare, and Dios, which all offer a similar declarative syntax for object oriented Perl. This is of course a runtime comparison rather than...
Subscribe to feed Recent Actions from Toby Inkster

  • Lady Aleena commented on A meta issue for modules: bug tracking

    Toby,

    On GitHub, go to Settings.
    Scroll down the Options page until you see Features.
    Under Features, uncheck Issues.

    Then no one will bother you with Issues on GitHub if that is what you really want.

    LA

  • xenu commented on A meta issue for modules: bug tracking

    Disabling issues doesn't disable PRs. In fact, it's currently impossible to disable PRs at all, which is very annoying in case of mirror-only repositories.

  • Aristotle commented on Where do you like bugs reported?

    You can get overviews of your issues across repositories on GitHub too. I’ve written about the ones I use. Of course queries at GitHub are relatively blunt as the available metadata isn’t nearly as rich as in RT. You can overcome that to some degree with elaborate label taxonomies, but you can only go so far that way. OTOH the orders of magnitude greater power available in RT comes at the cost of a certain… clunkiness. It would be nice to have an option somewhere in-between those extremes.

  • Diab Jerius commented on Where do you like bugs reported?

    I prefer RT, because it's a permanent location.

    My code hosting may move (e.g. bitbucket stopped supporting mercurial, so I had to move my code elsewhere). Moving issues between hosting providers is lossy and messy.

    If my code repositories ever disappear, users still have a place to file bug reports so that future users or maintainers understand limitations of the package.

  • laurent_r commented on Perl Weekly Challenge 81: Frequency Sort

    Hi Toby, I also like to use the list util modules. But I don't usually do it for coding challenges because I prefer to show the full algorithm rather than using off-the-shelf libraries or modules. I fully appreciate you may have a different opinion on that.

Subscribe to feed Responses to Comments from Toby Inkster

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.