user-pic

Aristotle

  • Commented on On interpolating stuff into pattern matches
    Yeah, this time, as I was writing a comment on your entry and it was getting longer and longer I did think that hold on, we had this conversation before. 🙂...
  • Posted On interpolating stuff into pattern matches to Aristotle

    Tom Wyant:

    Interestingly (to me, at least) they reported that the removal of the /o modifier made their case 2-3 times slower. This surprised me som…

  • Commented on RFC: new API for Type::Params
    I really dislike marketing/judgy terms like “modern” for this kind of thing. “Modern” conveys nothing about the interface, it’s just what someone thinks of it – or rather, thought of it at the time the term was assigned. Next time...
  • Commented on RFC: new API for Type::Params
    Wouldn’t it be close enough to update the documentation to prominently describe only the new style, and for the old interface just put some stubs near the end of the POD that merely say stuff like (e.g.) this? compile_named_oo(...): does...
  • Commented on Please relicense from "Perl 5" to MIT or Apache 2.0 license
    I was going to ask the same thing. Is the perl interpreter itself going to relicense? “Same terms as Perl 5” is both the default and the best practice, and for obvious good reason. Distributing a module under a different...
  • Commented on Integrated Inconsistencies.
    guess my html tags weren't applied They were, but you used <quote> (which isn’t a thing, and which the tag filter therefore doesn’t permit) rather than <blockquote>. I’ve fixed that for you....
  • Commented on Sorting Subroutine Results
    Agreed....
  • Commented on Sorting Subroutine Results
    There is one more option besides the ones you listed:Put the subroutine call in a do block, e.g. sort do { foo() }And in fact I prefer this option because I feel that it makes it clearer that the code...
  • Commented on Scalar Context: Lists Versus Arrays
    Not only is that clearer, it’s also (potentially far) faster. So there might be some room for something likesub list_return (\@) { wantarray ? @{ $_[0] } : $_[0][-1];}for use in a function whose return expression is in fact just...
  • Commented on MooseX::Extreme Needs a New Name
    MooseX::Std? 😛 (My thanks go to the various community personalities involved for making this car crash of an in-joke possible. 😛)...
  • Commented on The ordering operators
    Question is why at that point you wouldn’t just write this: sub vcmp0 { my ($v1, $v2) = @_; my @v1 = split /[.]/, $v1; my @v2 = split /[.]/, $v2; $v1[0] <=> $v2[0] || $v1[1] <=> $v2[1] || $v1[2]...
  • Commented on The ordering operators
    Mpapec: Certainly a single comparison using a padded number would be simpler. Unfortunately the code has no control over the format of $version because that value comes from an API. So using a single comparison with padded numbers would require...
  • Commented on Начнём пожалуй
    Maybe because basically the entire page is in English except the post title and the one sentence of post content? Presumably that’s not enough to make Chrome guess that the substance of the page is actually in Russian. Oh, and...
  • Posted The ordering operators to Aristotle

    Perl has two operators, cmp and <=>, which are basically never seen outside of sort blocks.

    That doesn’t mean you can’t use them elsewhere, though. Certainly ="prettyprin…

  • Commented on My Favorite Modules: <code>Devel::NYTProf</code>
    Specifically what it’s counting is characters that aren’t combining marks. E.g. if you have an “é”, while it might be encoded as one single codepoint (same as in Latin-1), it might also be encoded as an “e” followed by a...
  • Posted To whom this MySQL UTF-8 news may concern to Aristotle

    Strictly speaking not news exactly, given that it dates from early 2018, but it was news to me, and since I haven’t seen it make the rounds I still find it worth disseminating. From the MySQL 8.0.11…

  • Commented on A (not so) simple matter of privacy
    I would expect the following code to work: Well, yes, obviously, a closure is a different kind of situation. The question would be what happens in a named sub declared inside a method – where I would expect the exact...
  • Commented on A (not so) simple matter of privacy
    # which fields are visible from this eval? Isn’t the answer simply “none”? It seems a trick question. Fields aren’t visible inside a sub, whether it’s lexical or not, no?...
  • Commented on My Favorite Warnings: <code>shadow</code>
    It is hard to come up with a reason why you would want to disable this warning. But it’s easy to see why you would might want to make it fatal without also making everything else in misc fatal –...
  • Commented on Closures
    Perl internally stores lexicals for a scope in what it calls pads (an array of variables, essentially). There is a lot of trickery going on to reuse both whole pads as well as individual entries, and generally as much of...
  • Commented on Addressing CPAN vulnerabilities related to checksums
    Yes – if authors signed their distributions themselves, this would verify the origin of the bits all the way to the source, rather than just up to PAUSE, which would be a worthwhile increase in trust. The only problem is...
  • Commented on Addressing CPAN vulnerabilities related to checksums
    If a malicious person managed to get write access to the filesystem of a trusted mirror Indeed – and I had thought of that but dismissed it: I reasoned it would require the filesystem of either of the two trusted...
  • Commented on Addressing CPAN vulnerabilities related to checksums
    If the mirror is trustworthy and so is the connection to it, does verification of the PAUSE-signed CHECKSUMS serve any remaining purpose? What threat not already covered by the use of a trustworthy origin and channel can be averted by...
  • Commented on Bash perldoc completion tweaks
    Glad it’s useful! Unfortunately I don’t seem to be able reproduce a problem by trying to create a situation similar to what you’ve described. Can you describe what happens in that circumstance in a little more detail than that it...
  • Commented on My Favorite Warnings: <code>deprecated</code>
    No word that I know of on when it will actually be removed. From the perlpolicy definition of “deprecated”: If something in the Perl core is marked as deprecated, we may remove it from the core in the future, though...
  • Commented on My Favorite Warnings: <code>redefine</code>
    I am willing to write it up, no problem. The problem I do have is I don’t know quite what the opening of such an article would look like. Here in this comment section, the choice of facts to outline...
  • Commented on My Favorite Warnings: <code>redefine</code>
    Ah, I didn’t properly register that you were talking about named subs. Yes, named subs aren’t special in any way in this regard. The only thing that distinguishes them from unnamed subs is that they get assigned to a glob...
  • Commented on My Favorite Warnings: <code>redefine</code>
    Correct. If you do something like my ( @getter, @setter ); for my $i ( 'a' .. 'z' ) { my $value = $i; push @getter, sub { $value }; push @setter, sub { $value = $_[0] }; } then...
  • Commented on My Favorite Warnings: <code>redefine</code>
    You seemed to be saying that sub make_adder { my ( $addend ) = @_; return sub { $_[0] + $addend }; } is an example of one closure but sub make_adder_and_setter { my ( $addend ) = @_; return...
  • Commented on My Favorite Warnings: <code>redefine</code>
    Having to retain the value at the time the closure was created is not a requirement I have ever seen in any definition of closures. (If that was required by the definition, then Perl would not have closures, period, because...
Subscribe to feed Recent Actions from Aristotle

  • Randal L. Schwartz commented on Please relicense from "Perl 5" to MIT or Apache 2.0 license

    I concede. Y'all have made good points. I withdraw any objection to the effort.

  • Matthew Persico commented on RFC: new API for Type::Params

    --modern. I could live with that.

  • Matthew Persico commented on RFC: new API for Type::Params

    I agree. At the top you can put a blurb like:

    Note: This module was given a "facelift" in 2022 with a more natural API. These docs have been revamped to feature the new API prominently, but the old API's functions are still documented within, mapped to the new calls.

  • Robert Rothenberg commented on Please relicense from "Perl 5" to MIT or Apache 2.0 license

    This is a problem with the company's procedures, not with Perl's or modules' licenses.

    It is not worth the (mostly unpaid) time of a CPAN author to contact contributors and change the licenses on what may be dozens of modules, because a potential u…

  • Dean commented on Please relicense from "Perl 5" to MIT or Apache 2.0 license

    The assertion that "It isn't worth the (mostly unpaid) time" ignores the reasoning for an author writing and releasing the software in the first place.

    If the author releases the software hoping that supporting it will generate business (consulting, supporting, or even just reputational) then lowering adoption friction is a good thing making the effort worthwhile.

    IMO this is the scenario that most suits the rationale for a permissive license.

    If the software is more oriented to hobby users and not intended for businesses to sell it, then it is more up to the author.…

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 with a graphic design donated by Six Apart, Ltd.