user-pic

Rebecca

  • Website: re-becca.org
  • About: Rebecca Turner is a Perl hacker working in a PHP shop. You can find her still getting established on Twitter as @ReBeccaOrg. Her Perl only posts can also be found on blogs.perl.org. Her use of Facebook is pretty limited and you’re better off looking for her on Google+. You can also find her on LinkedIn.
  • Commented on Entering MooseX, Cheaper by the Dozen
    If you want to output while testing, the right way is to use Test::More::diag, which "Prints a diagnostic message which is guaranteed not to interfere with test output."...
  • Commented on Here we go loop de loop
    Your snark is unfortunate, doubly so because you're wrong. Your smartypants apparently wears the smart pants for a reason. Their version is faster. https://gist.github.com/iarna/8625596 With 10,000 entries in @set. 1..1 Benchmark: timing 1000 iterations of ForLoop, ListMoreUtils... ForLoop: 11 wallclock...
  • Commented on Backing up private data securely
    I use https://github.com/shadowhand/git-encrypt to selectively encrypt part of one repo, though it can easily be told to do the whole thing. Another option is http://git-annex.branchable.com/ which supports encrypted backends. In fact, your use cases sound like what it was designed...
  • Commented on SelfLoader and things I've learned writing/using a debugger
    Rather then the eval, I'd use a closure: ... if (caller()) { # demo code section. my $ack = sub { $_[0] ? 'yep' : 'nope' }; ... $ack->(MyModule::does_this()) ... } The only time I'd use an eval or mucking...
  • Commented on A Simple Plack/DBI Example
    Why are you quoting your class names? Are you afraid they might also be function names?...
  • Commented on AnyEvent::Capture - Synchronous calls of async APIS
    Oh, I like that, thank you Aristotle...
  • Commented on AnyEvent::Capture - Synchronous calls of async APIS
    @schmorp: Er yes, the bit about libraries could be put more clearly... I had my mind primarily application-local libraries where, well, let's not say blocking per se, but stopping to wait for some of our outstanding event listeners to trigger...
  • Posted AnyEvent::Capture - Synchronous calls of async APIS to for do while next

    Cage7.jpg

  • Commented on AnyEvent::Capture - Synchronous calls of async APIS
    @Joel— Huh, I’d never heard of that module (obviously). I’ll see if I can’t brainstorm a new name. @Paul— Yes, exactly. Huh, IO::Async is interesting, do you have a page or a post somewhere explaining how you’d like it to...
  • Commented on Extensible Maintainable Subroutines and Methods
    Certainly with any subroutine taking a lot of arguments, that's the direction I go in, although I've never been one to do it universally. (Although I did recently write a network-level API that passes json objects around, which is the...
  • Posted Golfing for Gotchas to for do while next

    I’ve been building a little stand alone command line tool lately, which led to me looking at using App::FatPacker to make a standalone, single-script download. This was going well until I tried to load Digest::Perl::MD5, which caused fatpacker to mysteriously crash with an undefined value.…

  • Posted Localizing Variables in Coroutines to for do while next

    While I was browsing the CPAN the other day, I came across Coro::LocalScalar and I said to myself, oh, what a useful idea… it lets you localize globals to a thread. An important feature if you do anything in your thread with those…

  • Commented on Learning AnyEvent
    I should add though, that for any complicated system I always mix in Coro with AnyEvent....
  • Commented on Learning AnyEvent
    I liked POE a lot when I first started using it, but I've had a lot of bad experiences with maintaining large software projects written in POE, where I haven't had the same problem with AnyEvent....
  • Commented on Marpa and OO
    Yeah, I've also wanted to be able to inherit and extend grammars to support different dialects of a language....
  • Commented on A lot of good tiny ideas
    tail-recursion, seems to have been on the CPAN for two years anyway... http://search.cpan.org/perldoc?Sub::Call::Tail...
  • Posted ORMs and Their Alternatives to for do while next

    While on the one hand, ORMs make up most of the published best practices for interfacing with databases, (see the success of DBIx::Class, and many other similar products), on the other hand, there is a certain amount of backlash against them,…

  • Commented on MOPing with Moose
    Meta-information that inherits to subclasses, is applied with roles, etc? That would definitely be cleaner if that were the case....
  • Posted MOPing with Moose to for do while next

    I’ve used Moose regularly now for a couple years, but really only so far as most people do, as a handy accessor generator and type checker. But my most recent project has called on me to delve, first into Roles, which are a lovely way to teach old classes new tricks, but I found I wanted…

  • Commented on $world->on( create => sub { say "Hello" } )
    Additionally, if you just want to treat it like a normal role, you can just do: use Moose; with 'MooseX::Event::Role'; However, right now that leaves you without the has_event method-- you can call MooseX::Event::has_event( ... ) however, which is unfortunately,...
  • Commented on $world->on( create => sub { say "Hello" } )
    Regarding the API-- much of my intent here *is* the concise API. However, if you want a more verbose one, it is (already) a Moose Role, and you can alias the events to any name you like. So I would...
  • Posted $world->on( create => sub { say "Hello" } ) to for do while next

    Hello Perl world...

    I've been working on creating better sugar for event-driven systems in Perl– specifically, AnyEvent powered things. AnyEvent, and t…

Subscribe to feed Recent Actions from Rebecca

  • Aristotle commented on Here we go loop de loop

    Funny, there are other things that could be improved. For a start, the $not_used is unnecessary, you can just write it like this:

    my (undef,$sub_set_a) = part { $_ <= $a } @set;
    my (undef,$sub_set_b) = part { $_ > $a and $_<=$b } @set;
    my (undef,$sub_set_c) = part { $_ > $b } @set;

    More importantly though, if $a < $b is a precondition here (but only then!), then this is a misunderstanding of the part function and you can reduce these three passes to a single one:

    my ($sub_set_a, $sub_s…
  • Aristotle commented on Here we go loop de loop

    Joel: if $a < $b doesn’t always hold, then the subsets can overlap, which cannot be produced from a single part pass – so your version is broken and the original is necessary. If it does always hold, then your version is unnecessarily complex.

  • Joel Berger commented on Here we go loop de loop

    Ah, yes, I see it. Well, in my defense (maybe?) I was going fast (evident in my "not tested" warning). Thanks for the catch.

  • byterock commented on Here we go loop de loop

    Ok will have to check to see if that works out funky data set we had not just a simple array of scalars.

  • byterock commented on Entering MooseX, Cheaper by the Dozen

    Yep know about that one use it quite often. I this case I was just sloppy and never bothered to run the test fully once I wrote them up for the blog.

Subscribe to feed Responses to Comments from Rebecca

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.