user-pic

Aristotle

  • Commented on Improved autobox-ing. I'm loving it :o)
    although i agree that we can learn new syntax quite fast, i still think that it is harder for a programmer to have to use a "different Perl language" for every new project they are involved in ("because now there's...
  • Commented on Improved autobox-ing. I'm loving it :o)
    Plenty of people would call the “clear and obvious” Perl 5 solution cryptic. You call the Perl 6 solution cryptic. They are wrong and so are you.I hired into my job a smart friend who had mostly done Java up to that...
  • Commented on How to be agile without testing
    I was A/B-tested...
  • Commented on What does this PHP print?
    Smartmatch however… … “will take two major versions to fix”, is that the missing part of your sentence, Joel? :-)...
  • Commented on What does this PHP print?
    That would be a fair point if umpteen other languages hadn’t already gotten the ternary operator right. To my knowledge, the same cannot be said of the smart match operator....
  • Commented on Deprecated modules warn when they are used
    warn __PACKAGE__, " is deprecated. Please use Better::Module instead.\n" unless state $have_warned++;...
  • Commented on Introducing Platform
    Those aren’t just related, Yanick, they are the right approach. This Platform::* stuff does not appear particularly well thought out to me....
  • Commented on The Main Problem With CPAN Modules On Github
    This slide deck is probably a better place to start since it gives a rationale for the format instead of a description of its details....
  • Commented on More on video recordings
    Anyway, I do not feel comfortable communicating with an anonymous, even if there's a lot to discuss here, sorry. He is pseudonymous, not anonymous. Would you refuse to communicate with chromatic? Or Abigail? Or Father Chrysostomos? If this person had...
  • Commented on Prototype changes across Perl release boundaries
    Uh.use 5.012; my @hashlike = (1..10); my @collected; while (my ($k, $v) = each @hashlike) { push @collected, $k, $v; }No code necessary....
  • Commented on Holy bloat, Batman!
    (FWIW, when it comes to scripts, often as not I forgo constant.pm entirely in favour of just (e.g.) sub DEBUG () { 0 }. It’s such thin syntactic sugar I’m always torn over paying any cost for it. This is...
  • Commented on Holy bloat, Batman!
    Did I write that they do? This question and yours both have the same answer. My own previous questions were not rhetorical. My agenda in asking them pointedly is not to absolve the pragma and dismiss your concern, but to...
  • Commented on Holy bloat, Batman!
    So… this cost… it is not a once-per-interpreter that will be be incurred anyway if any part of the program processes Unicode? Are we, in other words, talking about bloat in constant.pm itself, or about missing lazy loading (which one...
  • Commented on CPAN modules for parsing User-Agent strings
    Any chance you’ll revisit this to include HTTP::UA::Parser in the line-up?...
  • Commented on no indirect considered harmful
    I like being able to not use parentheses far more than I like being able to revert the order of method and invocant....
  • Commented on Pod to HTML
    POD is fine, except for its (bulleted and itemised) list syntax. (Definition lists are fine too.) It’s a little uglier than Markdown in its inline sequences, but has more of them and is more flexible overall (e.g. markup is allowed...
  • Commented on Introducing Net::EC2::Tiny
    ::Tiny guidelines....
  • Commented on MooX::LvalueAttribute - Lvalue accessors in Moo
    Possibly of interest: Sentinel....
  • Posted It’s the things we know that just ain’t so to Aristotle

    chromatic:

    Posting grand pronouncements about what Perl 5 has to become or the new na…

  • Commented on Marpa and the Ruby Slippers
    If only you were actually talking to a human, Jeffrey. That was a spam bot....
  • Commented on Be Careful With state Variables
    State variables are not as magical as one might hope: The reason that doesn’t work is because of the correspondence of state variables to closed-over variables. Their persistence semantics are tied to function scopes specifically, not to generic scopes....
  • Commented on Be Careful With state Variables
    You get one instance of the state variable for each instance of the sub which the variable is inside of. For named subs, the sub is instantiated once, at parse time, and bound to a glob in the package. No...
  • Posted Making DBI’s type info data usable for its <code>quote</code> method to Aristotle

    I’m putting this here mostly as future copy-paste fodder:

    my %sql_type = do {
        my $ti = $dbh->type_info_all;
        my $tidx = shift @$ti;
        my ( $n, $t ) = @$tidx{qw( TYPE_NAME SQL_DATATYPE )};
        map {; uc $_->[$n], $_->[$t] } @$ti;
    };
    
  • Commented on Refactoring When Tests Are Failing
    The drawback of the TODO strategy in comparison to the prove --state approach is that if any of the tests marked TODO should start failing differently than they failed when you marked them as TODO, you will not notice it....
  • Commented on Notice - WWW::Imgur end of life
    brian: is that documented somewhere?...
  • Commented on Identifying CPAN distributions you could help out with
    preaction: That differs from maintainer to maintainer, no? If you want some level of confidence before you invest yourself I’d say check the issue tracker of the module for an idea about how responsive the author is. (NB.: recent activity...
  • Commented on Perl 5 Porters Weekly: November 26-December 2, 2012
    Dana: you should post to p5p. Commenting here is a good way to ensure no one who actually works on perl will see it (it’s unlikely to be read by more than about 4 people in the first place)....
  • Commented on CGI is dead, long live CGI
    Plack::Handler::CGI. Any PSGI-based web framework will do. In fact, writing against raw PSGI is perfectly fine for small apps and I’ve done quite a bit of that....
  • Commented on Filters with Template Toolkit
    Template::Plugin::FilterVMethods would help you, dpetrov. I am surprised to find that Richard Simões deleted it, though. But if you don’t mind getting it from BackPAN, well, there you go....
  • Commented on Filtering CPAN results by release date
    Yes, that’s it. It’s what I was thinking of when I wrote my comment, too....
Subscribe to feed Recent Actions from Aristotle

  • mascip 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 guess and found some possible reasons; it made sense so i shared my thoughts.

    Although i like using "better new" syntax, I might not want to produce code on CPAN that others will struggle to read. I would like to use some amount of "newer" syntax, while making it simple to spot and integrate for others (or for myself in one year).

    A possibly good sol…

  • Nick Patch commented on Improved autobox-ing. I'm loving it :o)

    I hadn't criticized the syntax, but I do have an example of something I'm not fond of and a reason why. I find the use of chained method calls without parens to be jarring.

    (0..9)->grep { $_ > 5 } ->map { $_ * 2 } ->join(' - ')

    This is, of course, all a matter of personal taste and I could get used to it, but it's not the way that Perl or most languages work. I can think of an exception: LiveScript; although I'm sure there are more.

    $ 'h1' .on 'click'
      alert 'boom!'

    Which compiles to JavaScript:

  • Nick Patch commented on Improved autobox-ing. I'm loving it :o)

    You said that “(^10) is not as self-explanatory”.

    It’s not without understanding the fundamentals of Perl 6, like the operators, which are needed in order to program in the language or understand the code. Just like Perl 5 or Ruby has their own prerequisite fundamentals.

    $a  ..  $b  # $a (inclusive) through $b (inclusive)
    $a  ..^ $b  # $a (inclusive) through $b (exclusive)
    $a ^..  $b  # $a (exclusive) through $b (inclusive)
    $a ^..^ $b  # $a (exclusive) through $b (exclusive)
           ^$b  # 0  (inclusive) through $b (exclusive)

    Which makes th…

  • mascip 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 it look ok. I'm almost happy enough with the result.

    I think it's not only a subjective matter. The fact that it's not seen anywhere else means that our eyes are not used to it, they don't immediately know how to interpret it. The fact that there is a given programming culture is not subjective. It is an objective fact that we have to take into account. Al…

  • mascip 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):

    The result is :

    a_tree.visit_all { |node| do_something_with(node) }

    which will perform an operation on all nodes of the tree. I like it.
    I still don't love how it looks. But i prefer writing the list name first, and then the maps and greps in the order in which they are execut…

Subscribe to feed Responses to Comments from Aristotle

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.