user-pic

Diab Jerius

  • Commented on No One Is Immune to Abuse
    Lots of stereotypes and assumptions being thrown around here, as well as some pretty grand generalizations. A community is defined by a set of common values and yes, a code of conduct of acceptable behavior. That's been part of human...
  • 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...
  • Commented on Preallocating scalars
    And there's also Acme::SvGrow from back in the day, which uses either Data::Peek::DGrow, or the `push( '.' . $length)` approach....
  • Posted Preallocating scalars to Diab Jerius

    I'm using the fabulous FFI::Platypus to interface to a C routine which uses caller-allocated buffers to return data. While FFI::Platypus transparently translates Perl arrays to C arrays and back, the buffers…

  • Commented on The way to create Class with only Perl core language.
    I've written a lot of code like that over the years. For simple classes, it works, and when I'm prototyping things I often use that approach. However, having to write accessors, including code for validation, etc., becomes a time sink....
  • Commented on The Future of Perl 5
    I'd like to be able to do my %foo{@keys} = @vals; instead of my %foo; @foo{@keys} = @vals; I'd love for function signatures to handle types....
  • Commented on Trials and troubles with changing @INC
    Thanks!...
  • Commented on How fast can you try?
    Results and code updated....
  • Commented on How fast can you try?
    Aargh TryCatch != Try::Catch. Disregard my remarks....
  • Commented on How fast can you try?
    How embarrassing. There's a bug in the script. These lines: use if $ENV{TRY_TINY_TINY}, 'Try::Tiny::Tiny'; use if $ENV{TRY_TINY_MASTER}, lib => 'Try-Tiny-339b2ba3b0/lib'; Will not always result in Try::Tiny being loaded from my requested directory. They need to be swapped: use if $ENV{TRY_TINY_MASTER},...
  • Commented on How fast can you try?
    I wouldn't call it entirely bogus, just for comparing TTM vs TT. If I rerun the benchmarks they change relative position, indicating that the differences are within measurement noise. The larger differences with and without TTT are real. The TryCatch...
  • Commented on How fast can you try?
    I've added eval and Try::Tiny master. eval of course is fastest. The point of the benchmark wasn't to single out T::T::T. It didn't make sense to leave it out of a comparison of all of the Try::* modules. Had I...
  • Posted How fast can you try? to Diab Jerius

    I just saw the release of Aristotle's Try::Tiny::Tiny to CPAN, which aims to speed up Try::Tiny. That led me to wonder how fast the various Try* modules were. I cannibalized the benchmark…

  • Commented on Perl Developer Survey 2017
    Whoops, that came across as snarky; not my intention....
  • Commented on Perl Developer Survey 2017
    Emacs isn't a listed choice for editors?...
  • Commented on So I Guess I'm Back
    Welcome back!...
  • Commented on Invite Me (Virtually) To Your Next Perl Meetup
    I attended (in person) and it did go quite well. One thing to keep in mind (for the hosts) is that you'll need a decent microphone setup to capture questions and comments from the audience. Often the questions had to...
  • Commented on Method Privacy in Perl
    I've also been burned by overriding a "private" method in a parent class. Class::Method::Modifiers provides the fresh modifier, which will throw an exception if you override a method already defined by a parent class....
  • Commented on Let's delete 10,000 files from CPAN
    Thanks for the reminder. Happy Northern Hemispheric Spring!...
  • Commented on Relief from Regexes
    I'm a big fan of rxrx, which is part of Damian Conway's Regexp::Debugger package. A downside is the lack of command line history, but that can be dealt with using rlwrap. For those who haven't seen it in action, it...
  • Commented on Keep yer notes
    Here's another for your notes binder: perlsecret...
  • Commented on Extracting values from a list of (key, value) pairs
    @Graham Knop: I've fixed the code; thanks. @Aristotle: It actually seems to slow it down by a bit. Sequential runs with with your suggestion implemented, followed by the original code give: with: 1002/s 1016/s original: 1049/s 1075/s The difference between...
  • Commented on Extracting values from a list of (key, value) pairs
    @QM: You've raised some good points. Yes, @k would have been a better choice than @v. My mistake. I'd fix the code, but then your comment would have no context. Why a short variable name? The focus here is on...
  • Commented on Extracting values from a list of (key, value) pairs
    And just for completeness, I added direct assignment into the target array (idxa). As might be expected, it's significantly slower than pushing onto the end of the array (idxp)....
  • Commented on Extracting values from a list of (key, value) pairs
    Thanks for adding that to List::Util. Peeking at your code led me to realize I'd forgotten to add straightforward array indexing. It's surprisingly fast. XS still wins, though....
  • Commented on Extracting values from a list of (key, value) pairs
    A colleague pointed out I'd left out toggling using exclusive or; I've added that....
  • Posted Extracting values from a list of (key, value) pairs to Diab Jerius

    If you need ordered key, value pairs, you can either use something like Tie::IxHash or a simple array of key, value pairs.

    There are a number of…

  • Posted Automating POD previewing to Diab Jerius

    I find it difficult to review documentation written in a markup language. I need to see that final pretty rendition of it as a manual page, PDF file or HTML web page before I can get a feeling if the thing makes sense. I also like to see that final rendition while I'm writing the document,…

  • Commented on Tool tip: looking at a module's source
    My favorite: cpandoc -m...
  • Commented on p5-mop, a gentle introduction
    I am concerned by the loss of 'undef' as a value for attributes. One of the benefits of having it is that it actually has intrinsic meaning. For example (pardon the pseudo-code) let's say that class Foo's constructor accepts an...
Subscribe to feed Recent Actions from Diab Jerius

Subscribe to feed Responses to Comments from Diab Jerius

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.