user-pic

mascip

  • About: Perl, Javascript (AngularJS), Coffeescript, Firebase
  • Commented on Extracting values from a list of (key, value) pairs
    Have you tried Var::Pairs, written by Damian Conway? It doesn't have a subroutine to extract all keys, but it's very god for loops: for my $next (pairs @array) { say $next->index, ' has the value ', $next->value; }...
  • Commented on Three ways to introduce othogonal behavior: Aspects, Method modifiers, and Subroutine attributes
    Great, glad to help! I also learned a lot, writing this. Now I hope I understood the right things ;-) Please people, tell me what you think on the matter....
  • Commented on Subroutine attributes: where and how to use them
    Cheers Reini. I added a note pointing to your comment, in the paragraph about Sub::Attribute....
  • Posted Three ways to introduce othogonal behavior: Aspects, Method modifiers, and Subroutine attributes to mascip

    In my previous post I spoke about what Subroutine attributes are and how to use them. Here I compare them to other techniques for introducing orthogonal behaviors: Method modifiers and…

  • Posted Subroutine attributes: where and how to use them to mascip

    I watched this video about Subroutine attributes, and I wrote myself a summary of what I learned. I thought I could share it.

  • Commented on How to use the debugger with Moose
    Would the same thing be possible for STDERR output? When I encounter a bug while using Moose objects, it's sometimes a pain to find the one line that tells me where the problem comes from in my code. Any solution?...
  • Commented on Planet Moose - October 2013
    MooX::PrivateAttributes is apparently recent branch of MooX::ProtectedAttributes, by the same author. Thanks for the news!...
  • Commented on Perl5 in the browser update
    Very naive question Flavio: if i make a website with Perl5 (say, with the Dancer framework), do you think that some day i will just be able to compile it into Javascript with Perlito, and run it in a mobile...
  • Commented on Perl Startups: Lokku/Nestoria
    Wow, i must say i'm impressed. I'm moving pretty soon, so i checked out Nestoria, to see what is available in my neighborhood (i want to stay in the same area). This website has bluffed me. It's pretty much what...
  • Commented on Improved autobox-ing. I'm loving it :o)
    Thank you for the explanation and sorry for the mistake, i won't make it again. I've also read that you might make type checks disable-able, maybe with an environment variable. Thus enabling to develop with type-checks, without slowing down the...
  • Commented on Type::Tiny rescues Moo
    Wow! Thank you Toby, I’ll start playing with it. It should also enable to clone mutable attribute# (like DateTime attributes), both at construction and for their accessor: all you need for proper immutability...
  • Commented on Method::Signatures: where and when
    I should probably have written "in a package", rather than "in a Moo class"....
  • Commented on Method::Signatures: where and when
    Hi Buddy, thanks a lot for Method::Signatures. One naive (unrealistic?) idea/request: Could there be any way for a user to tell in a Moo(se) class: “don’t do any type check for any subroutines of this class” ? Maybe in the...
  • Commented on Type::Tiny rescues Moo
    Toby, you know both modules well so I’m asking you. Could there be any way to tell in a Moo class: “don’t do any type check for any of the attributes of this class” ? Or with Type::Tiny, to tell...
  • Commented on no indirect considered harmful
    Sounds as if we're standing where TIMTOWTDY can both be useful and harmful. Painful conundrum. The place where linguistics and computer science don't work in a synergy anymore: optimising for one leads to the deterioration of the other. Is that...
  • Commented on Type::Tiny rescues Moo
    Is there a way to turn type checking off globally, with Moo and Type::Tiny? (my types are in some Type::Library) Is it possible to turn it off in one class, or group of classes? Maybe for one particular Type::Library?...
  • Commented on Reverse installing CPAN, at the Polish Perl Workshop
    Here : www.slideshare.net/brian_d_foy/reverse-installing-cpan Will read it later, thank you...
  • Commented on Indented comments
    PS: like educated_foo, i use comments only to express the purpose of the paragraph. Not implementation details. Reading only the comments, you should understand what my code does....
  • Commented on Indented comments
    Since i read Perl Best Practices (pages 23 and 142), i write code in paragraphs, with a short one-line comment before each paragraph. I find it really useful. I keep most paragraphs under 5 lines, and most methods under 5...
  • Commented on Augment and Inner: Haters Gotta Hate
    I like the first example: in a hierarchy that already exists, that's a great way to avoid duplication. The second example could be implemented with a Role: you would require the actions() method, and build a common behavior "around()" it....
  • Commented on The clearest way(s) to check if a List contains...
    What do you mean "all variant is bad"? Do you know Perl's TIMTOWTDI motto? http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it (the examples on this page suck...i might go and propose something better later). And (as NOT written in this wikipedia page unfortunately) TIMTOWDI does not...
  • Commented on Improved autobox-ing. I'm loving it :o)
    Hey Nick. Ruby has methods who take a block as an argument. An example here with the Tree class (search for "Tree" in the page): http://nickknowlson.com/blog/2011/12/04/seven-languages-week-1-day-2/ The result is : a_tree.visit_all { |node| do_something_with(node) } which will perform an operation...
  • Commented on The clearest way(s) to check if a List contains...
    Yep, i would also prefer 'in' over '~~'...
  • Commented on Improved autobox-ing. I'm loving it :o)
    Thanks for your comments Nick :-) Indeed, these bare blocks after a method call are disconcerting. I didn't even notice that. I guess that's why I compensated by putting them on distinct line: it's the only way i could make...
  • Commented on Improved autobox-ing. I'm loving it :o)
    My purpose here is both to share information and to learn. I said "hey, that's possible! Isn't that cool?", and then i listened. Some people said that they didn't like this syntax but they didn't explain why. I tried to...
  • Commented on Improved autobox-ing. I'm loving it :o)
    Aristotle, I agree with most of what you are saying. However, I think that using the same symbol (the * symbol) in the same block to express two very different things, is confusing. I am referring to this 'map': (^10).map(*...
  • Commented on Improved autobox-ing. I'm loving it :o)
    ARG! Unfortunately PerlX::MethodCallWithBlock seems to have a nasty bug: when i have a compilation error, it changes the line indicated for this error (for example, it will tell me that an error is on line 8, while it's on line...
  • Commented on Improved autobox-ing. I'm loving it :o)
    Do you feel that @list->map { do_something_with($_) } is less clear than map { do_something_with($_) } @list ? If so, is it only because you are more used to it, or are there any other reason? In terms of clarity...
  • Commented on Improved autobox-ing. I'm loving it :o)
    **to which extent would you allow yourself to use useful but new/unusual idioms** in code that you will not be the only one to read/write ? (for example for a CPAN module that you want other people to use) Would...
  • Commented on Improved autobox-ing. I'm loving it :o)
    Ron, do you have examples of when autobox is useful? I'm not trying to prove you wrong or anything; just to learn more about good practices. One more thought about these constructs ( ->map, ->grep ) : Naively, i would...
Subscribe to feed Recent Actions from mascip

Subscribe to feed Responses to Comments from mascip

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.