user-pic

Aristotle

  • Commented on PRC 2016 - Second Trimester
    And that is why I used "it seems", because I know it is not true. Culture gap I guess. “It seems” usually means “from what I can tell”, i.e. a position you are not necessarily sure about but which you...
  • Commented on Missing Smart Match
    I still believe that "is-an-element-of" is a very frequent operation and would be useful as an operator on its own Probably. (Not sure, but I’m not disagreeing.) That doesn’t necessarily have anything to do with smartmatch though…...
  • Commented on Missing Smart Match
    Let’s just fix the bugs. They aren’t bugs, they are the feature. If you consider them bugs and “fix” them, the feature is gone. The feature is simply unimplementable in Perl 5 due to the language’s set of semantics. Namely, the...
  • Commented on Missing Smart Match
    sub contains { my $str = shift; $str eq $_ and return 1 for @_; !1 } And then: if ( contains $scalar, @array ) { ... } Now your code is about as readable as it is with “smart”...
  • Commented on Why I try to avoid Perl's punctuation variables
    More seriously, global variables bad, because action at a distance bad, and to the extent that Abigail’s version of the code is less readable than other formulations I find it’s mostly owing to the distance between setting the punctuation variable...
  • Commented on Why I try to avoid Perl's punctuation variables
    my $query = <<""; SELECT foo, bar, baz FROM sometable WHERE id IN (${\ substr ',?' x @ids, 1 }) What? Oh, we weren’t golfing?...
  • Posted The Coro situation to Aristotle

    Since my recent participation at the QA Hackathon I have become aware that rather more people than I expected do not know the specifics of this situation. Fewer than I expected have heard of it at all, even, although there appears to be some general awareness at the “something happened with…

  • Commented on Test2/Test::Builder Update from the QAH
    Maybe I don't understand what you and Leon wanted to happen. Yes, sorry, I’ll be publishing a long-form, detailed version of the proposal very soon. I’ve realised the proposal is (either largely or entirely) non-understood – the abridged version I...
  • Commented on Test2/Test::Builder Update from the QAH
    For TCM to work with Test2, every single module you use to output tests must also use Test2. This, however, I will call unqualified nonsense. Let me demonstrate to you why: Test::More will not be changing at all. Yet it...
  • Commented on Test2/Test::Builder Update from the QAH
    The 'explicit opt-in' approach works only until people start porting existing extensions on CPAN, which a number of Test:: authors have expressed an interest in, and then users would see far, far weirder breakages than what we're currently doing is...
  • Posted A very stupid, over-clever scoping-based importing trick to Aristotle

    In some code I’m working on, I use a module which exposes a whole bunch of package variables as part of its public interface. It does not export them, however. I could refer to them directly by prefixing them all with Some::Module::, but that would be ugly and…

  • Commented on Test2/Test::Builder Update from the QAH
    Facts will now be the judge of those beliefs. (Not the degree of agreement. Not the level of respect. Not the tone of the discussion.)...
  • Commented on Test2/Test::Builder Update from the QAH
    I think the final decision does accurately reflect all the concerns that were raised and the preparations made to mitigate them. The point is to address, not necessarily to accept. I do believe issues were thoroughly and respectfully addressed with...
  • Commented on Private Moose Attributes
    I think this is what you’re after: has request => ( is => 'bare', isa => 'Catalyst::Request', trigger => sub { my ( $self, $value ) = ( shift, @_ ); # extract and store country, language, etc here ......
  • Commented on Upping minimum version for Devel::Cover
    So the question to ask is not: "who is still using 5.6.1 for production code" but "who is developing on 5.6.1 and has only 5.6.1 available on that machine?". So you check code coverage on e.g. 5.22 on your dev...
  • Commented on The Perl Toolchain: PAUSE and CPAN
    Sounds like local::lib to me, not Perlbrew/Berrybrew....
  • Commented on Upping minimum version for Devel::Cover
    That approach privileges the wants of a hypothetical user over the needs of a very real library author. It does? By which mechanism?...
  • Commented on It's never too late to find a bug
    That’s terribly over-clever for my taste. I’d probably just go with the boring approach: my ( $r, @v, @o ) = shift; push @{ ref eq 'HASH' ? \@o : \@v }, $_ for @_; my $v = shift @v;...
  • Commented on More on YAML, syck looks much better
    If the dude writing on that domain now is _why, I’ll eat a straw broom....
  • Commented on Not so new shiny things: LWP::Protocol::PSGI
    [Note also my Plack::Middleware::MockProxyFrontend, which is the same idea in a different context: instead of making every LWP request go to your PSGI app, it makes every request from your browser go to your PSGI app – no matter which...
  • Commented on Alien::Base and Module::Build
    The modules that have configure_requires of Alien::Base are simply wrong. How many are there? If there are only a handful, then OK – I guess we can eat the breakage and move on. But, maybe we still shouldn’t. And if...
  • Commented on Alien::Base and Module::Build
    Can I try to change your mind? The Alien::Base stuff already on BackPAN is never going to be fixed; how about making an Alien::Base::Core (or some such) instead, for the installer-independent logic, and then Alien::Base::MakeMaker for the new EUMM stuff....
  • Commented on A Date with CPAN, Part 6: Time Won't Give Me Time
    Meanwhile the way I actually need it to work right now is not even an option. :-) […] I see how to work around it, thanks to your continued efforts to enlighten me. You’re aware that sentence 2 there directly...
  • Commented on A Date with CPAN, Part 6: Time Won't Give Me Time
    Another try: Then (?: and (?= would mean the exact same thing. Wait ... what? I don't follow that at all. A(?:B) means an "A" followed by a "B." A(?=B) means an "A" followed by a "B," except don't include...
  • Commented on A Date with CPAN, Part 6: Time Won't Give Me Time
    Why, "AC" of course. If tell you to match "ABC" but leave the "B" out, what else could you possibly get? And what would @- and @+ contain?...
  • Commented on A Date with CPAN, Part 6: Time Won't Give Me Time
    That surprise is ignorance leaving your mind. :-) Please do yourself a favour and read Mastering Regular Expressions. You seem to have a mistaken mental model of how regexps work; that book will beat you into shape....
  • Commented on A Date with CPAN, Part 6: Time Won't Give Me Time
    A(?=B) means an "A" followed by a "B," except don't include the "B" in the match string. I'm not sure how the consecutive-ness of anything would impact that. Then if you could write 'ABC' =~ /(A(?=B)C)/ and have it match...
  • Commented on A Date with CPAN, Part 6: Time Won't Give Me Time
    if two consecutive zero-length tokens need to match, they must both match at the same point? Yes. Consecutive tokens should match consecutively, it seems to me, regardless of their length. That wouldn’t make any sense. Then (?: and (?= would...
  • Commented on A Naïve SQL Shell
    If you can install modules, DBI::Shell and you’re done....
  • Commented on Python is The New "Write-Only, Linenoise" Language
    my @list1 = 'a' .. 'h'; my @list2 = <x y>; my $n = 3; # (where did this go in your translation?) say flat roundrobin @list1.rotor($n - 1, :partial), @list2;...
Subscribe to feed Recent Actions from Aristotle

  • Aaron Priven commented on Missing Smart Match

    The construction any(@a) eq $x is just not as comprehensible as $x in @a, even if it does the same thing.

  • Graham Knop commented on Missing Smart Match

    I don't find

    $x in @a
    very comprehensible because it isn't obvious how it will be comparing elements. Will it use string equality or numeric equality? What if you need to pick one or the other?

  • Flavio Poletti commented on Missing Smart Match

    Didn't know about Syntax::Keyword::Junction, that's what you get when you stop to the first module that fits the requirements :). It would be good to have some hint in the Perl6::Junctions docs, anyway, because it seems "more popular" with two reviews and a few more ++'s. Maybe even a new comment would do the trick?

    The new subs in List::Util are OK but they (understandably) follow the syntax of the rest, which is less sugary. This seemed to be an important point in the OP. How much sugar you like is a matter of taste, of course.

    I agree with Graham Knop and I consider any(…

  • Aaron Priven commented on Missing Smart Match

    $x in @m and $y ~> @n are analogous to and just as comprehensible as $x eq $m and $y == $n.

  • Alberto Simões commented on PRC 2016 - Second Trimester

    I see what you mean, thanks Aristotle. Sometimes not easy to know how other will read, mainly when not writing in your own language.

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 hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.