user-pic

Paul "LeoNerd" Evans

  • Commented on vec is slow, little-endian and limited
    I've never actually found a use-case for vec() to do anything other than maintaining the bitvectors for a select() system call....
  • Commented on Metabase down?
    Are you using IO::Socket::IP 0.30? If so, known bug. See https://rt.cpan.org/Ticket/Display.html?id=97050 For now, revert back to 0.29....
  • Commented on mop problem 4 - mop is misleading name
    I have often thought about making a truely first-class "CLASS" type in Perl, references to which are returned by the ref() operator on "normal" objects. foreach my $mth ( ref($self)->methods ) { ... } e.g.. Or failing that, we steal...
  • Commented on Math::Prime::Util, May update
    Ooh, I wasn't aware of the trouble of using List::Util::sum like that. Can you report it as a bug and I'll take a look into fixing it....
  • Commented on Detecting JSON/YAML/Perl/CSV/TSV/LTSV
    You may want to take a two-step approach of first rejecting the guaranteed negatives, then taking the remaining set and piecewise comparing, of the given remaining formats it might be, find a test that would suggest which it is more...
  • Commented on Python's decorators in Perl
    Or you could use an attribute sub p :bold :div_id("testid") { my ($str) = @_; return "$str"; } Attributes can modify the code in-place, and replace it with a wrapped version...
  • Commented on Inheritance is Bad: Code Reuse Part I
    Your comparison with IO::Seekable as a role is somewhat of a red herring here. The IO::Seekable class exists, not because it's a sensible split in code structure, but purely for social reasons, as it was easier to create a new...
  • Commented on Extracting values from a list of (key, value) pairs
    It's nice to see that pairkeys() is fastest there. As I'd hope it would be, because it's written in XS. It's available on CPAN for current perls and will be in 5.20, so it should be available to anyone other...
  • Commented on Getting a progress report from a running program
    I often use SIGQUIT for this purpose, because by default it's even bound to a key on the terminal - Ctrl-\. This means you can send it to a foreground process without having to kill or pkill from another terminal....
  • Commented on Things we don't have #2
    Given the existence of Net::Async::HTTP, Net::Async::FTP, Net::Async::IMAP::Client, etc.. it should be fairly easily possible to write a universal URL-driven async fetching wrapper, similar to the idea that LWP has of a centralised controller with handlers for various URL schemes. In...
  • Commented on Great Mystic Mystery Revealed
    It was originally a quick, a limit of the parser used to pull out the package names. But so many people have now relied on it, that it's become a feature that won't be fixed....
  • Commented on Anyone else get personal URL from Google Plus?
    On about the first week of G+'s launch, I created myself a named personal URL redirector at http://go.leonerd.org.uk/+ which I've used ever since....
  • Commented on Asynchronous MySQL Queries in Perl Using DBD::mysql and AnyEvent
    If you're going to use this idea, be aware that it's only a half-baked solution. For this to work reliably, the file descriptor itself still needs to be in blocking mode, so that writes and reads to it are not...
  • Commented on CPAN {Spring|Autumn} cleaning time again
    I occasionally find it useful to have the latest-but-one release off CPAN as well. Sometimes the latest release introduces a bug that I can avoid by using the previous release. Personally I tend to keep a rotation of three versions...
  • Commented on Recursive deferred promises
    I should also add: The code block you wrote here has a bug in it. Because the anonymous function contains a reference to itself, it forms a cycle that will never be collected and leak memory. To fix it, you'd...
  • Commented on Recursive deferred promises
    Actually, Future already has a way to handle this very thing. Any sort of while or foreach-type loop can be written using the repeat function in Future::Utils. For instance, in your specific case you have a few command strings to...
  • Commented on The Four Major Problems with CPAN
    As the author of two of the six modules you point out in the first place, I feel I should write a little reply here. As to the Socket vs. Socket6 question: Originally, Socket6 was written by someone to provide...
  • Commented on Perl programmer humour
    I usually end with 0x55AA; http://en.wikipedia.org/wiki/Master_boot_record#Sector_layout...
  • Commented on 13% of CPAN distributions don't have a test report on Windows
    I've already written about the comparative lack of test reports from Windows, as compared other platforms. I'm still not really sure why this is. http://leonerds-code.blogspot.co.uk/2012/07/dear-perl-users-on-windows.html...
  • Commented on 50% of the new CPAN uploads lack a repository link
    I have a different reason here. I actively choose not to include such information. My VCS is much like my editor, my shell, my terminal, or anything else. It's an inner part of the process I use to create the...
  • Commented on The sad state of syntax highlighting libraries on CPAN
    I keep meaning to write an article/example/description/something on how you can use Parser::MGC to parse up the input text and yield a syntax tree annotated to give the positions it found the various constructs in the input. This would make...
  • Commented on How many ways to start a process do you know?
    Don't forget most event systems will probably have their own specific ways as well. POE::Wheel::Run, IO::Async::Process, AnyEvent no doubt will have something too, GLib's gspawn,......
  • Commented on Building C and C++ libraries with Perl
    You might also be interested in ExtUtils::CChecker, for checking system or C library dependencies, and configuring the build system to use them....
  • Commented on AnyEvent::Capture - Synchronous calls of async APIS
    It's basically the same as IO::Async's await method, then. my @ips = $loop->await( $getaddrinfo_task )->get;...
  • Commented on address-sanitizer round 2
    Can you prod me about these on IRC at some point I appear to be free? I now have the power to fix two of them (Socket, List::Util). Thanks :)...
  • Commented on Time for a new Issue Tracker, Isn't It?
    You may find it a foregone conclusion, but for the rest of us, can you summarise what is wrong with rt.cpan.org? I mean I have a tiny gripe about its autocomplete="off" behaviour in the password field, but asides that I...
  • Commented on DateTime is annoying
    A lot of objects with name/value pair constructors often define a simple "80% of the time" use-case for which named argument you'd be wanting to set if you just passed a single one. E.g. IO::Socket::IP presumes a single IP is...
  • Commented on Learning AnyEvent
    Why stop at two event systems? Take a peek also at IO::Async: http://search.cpan.org/dist/IO-Async/ It has a relatively small simple objecty API like AnyEvent, but a bit more structured in things like adding/removing real objects to its control, rather than you...
  • Commented on Activate ipv6 on Windows
    Try IO::Socket::IP instead. It handles IPv4, IPv6, and whatever else may come along in the future, all via the nice forward-compatible magic that is getaddrinfo(). Much nicer than the 'v4-specific ::INET or 'v6-specific ::INET6....
  • Commented on Time spent waiting for tests you know will pass is time wasted
    For installing the same set of stuff across lots of machines I've always found it far nicer to build a debian package out of each CPAN dist, and install those via apt. Tests are run at package build time, not...
Subscribe to feed Recent Actions from Paul "LeoNerd" Evans

  • Stevan Little commented on mop problem 4 - mop is misleading name

    Yes, "mop" is kind of an obscure name, it might change before being added to the core.

    However, your reasoning is incorrect. With a meta-circular object model, everything is an object, a class (as represented in the mop) is simply an instance of the class "Class" (and yes, the class "Class" is itself an instance of the class "Class", which is where the bootstrap comes in).

  • Yuki Kimoto commented on mop problem 4 - mop is misleading name

    thanks, I add some sentence to entry.

  • Sid Burn commented on Inheritance is Bad: Code Reuse Part I

    I will continue. I got some personal problems here. But next article will come soon.

  • Reini Urban commented on vec is slow, little-endian and limited

    Dana, yes.

    I've got minor problems with Bit::Vector being not optimized enough for the simple word-aligned cases I was using, even if the API supports words.

    And I've got bigger problems with vec being little-endian only (on intel), being too slow and being too limited. So I just wrote a smaller and faster nvec (also word-size limited), which I can use from XS and PP.

    Unaligned access with Bit::Vector should be theoretically faster on Intel, since Intel favors size of alignment. But so far, as you said, it only works out good in the cases between 32 and 64bit, where …

  • Olivier Duclos commented on vec is slow, little-endian and limited

    Nice finding! But since you have already done all this work, why not fixing vec in core instead of making a module?

Subscribe to feed Responses to Comments from Paul "LeoNerd" Evans

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.