user-pic

Aristotle

  • Commented on Which edges cases could perl shed to make it easier to parse?
    It's about making a grammar that something else can use. Oh. Hmm. PPI?...
  • Commented on Which edges cases could perl shed to make it easier to parse?
    Isn’t that more or less what Kurila was? Also, the Perl-alike Stevan wanted to attempt. And at least two other projects whose names escape me. I’m pretty sure there were more of them before my time as well. History says...
  • Commented on Could anybody explain this code?
    Merlyn: The bit at the end is not meaningless. It works with the -s switch that’s passed to the perl call. It makes the value of the -i switch into the value of the variable $i in the code. And...
  • Commented on Could anybody explain this code?
    As others have said, your script looks like an unfinished attempt to solve a problem, and doesn’t actually do much. It just uncompresses the *dat.gz files in the current directory. For each of the files it also prints a line...
  • Commented on A widespread and broken Perl idiom
    Oh, wow. I had to go all the way to $_ = [ __FILE__ ] for local *ARGV; to make it work in a single statement. Even something like *{ \local *ARGV } = [ __FILE__ ]; wouldn’t work, despite...
  • Commented on A widespread and broken Perl idiom
    I became aware of this as far back as my PerlMonks days, so at least 15 years ago. Namely, I memorised that I should be writing the idiom like this: my $content = do { local ( *ARGV, $/ )...
  • Commented on Wallflower improvements and issues
    what if the application generated a list of links that are expected to exist I was going to shout “sitemaps!” before I read on and saw you already have that covered. 😊 X-No-Archive An HTTP application should not be looking...
  • Commented on Wallflower improvements and issues
    The most helpful tip I saw is to think of 12:01. Is that in the AM or PM block? Well the hour is in the same block. That means 12AM is midnight, because 1 minute after midnight is AM, and...
  • Commented on At Perl Station
    There are posts on here that annoy me (which I just skip – I’m not the police and don’t play it on reddit) but this isn’t one of them....
  • Commented on StackOverflow that!
    Sure, feel free. 😊...
  • Commented on Proposed new data structure: Pile
    First I thought this was silly. Then I saw it was a joke, but I thought it was a stupid one. Then I got to the end. Hah! 😊...
  • Posted Plack::Middleware::RedirectSSL to Aristotle

    I just shipped 1.300 of this module to the CPAN and it occurs to me that I’ve never talked about it here. I suppose I figured that what it does is so simple that there’s not much to say about it. But it‘s useful if you need what it does, and I wrote it because nobody else had.

  • Posted Try::Tiny::Tiny to Aristotle

    Last year I released this new module.

    I want to talk about its purpose briefly, because in the time since, people have published benchmarks of how it performs compared to other modules that offer alternatives to…

  • Commented on Dist::Zilla Check License
    You are using a file from outside the repository to build the distribution. Nobody else has that file stored in that path on their computer, so nobody else can build the distribution. If that fact counts as undocumented on account...
  • Commented on App-RemoteCommand
    May I suggest using SpeakerDeck instead? It doesn‘t make your readers sign up for an account in order to be able to download the slides....
  • Commented on Simple (Date) Range Overlap Detection
    The way I prefer to think of it is NOT ( rangeB.end < rangeA.start OR rangeB.start > rangeA.end ) The prose version of that is the the most natural way I can think of to express this logic in human...
  • Commented on Smartmatch in 5.27.7
    Yes, autoderef came to my mind as well....
  • Commented on Smartmatch in 5.27.7
    I think the first problem was the introduction of smartmatch at all without much more discussion. Oh there was no dearth of discussion at the time. And I argued against it strenuously. Nobody seemed to hear, though. 5.10 was the...
  • Commented on Why I wrote Keyword::DEVELOPMENT
    Some dev comes along as says "why are we using the old constant pragma?" So they "fix" the code: Might I suggest not hiring people who will dis-improve the code by rote rule-following? 😊 But also, if that’s your problem:...
  • Posted Perl&#160;5’s list-flattening and reference-taking design choices to Aristotle

    Eevee:

    Perl has the strange property that its data structures try very hard to spill their contents all over the place. Despite having dedicated syntax for arrays –

  • Commented on /Fizz|Buzz/
    my $fizz = grep { 1 while s![147][258]|[258][147]|[147]{3}|[258]{3}!!g; "" eq $_; } s![0369]!!gr; This can also be written as a recursive pattern but I didn’t have sufficient chops×persistence to puzzle it out....
  • Commented on The not-so-great escape
    [The double-quote] should probably be escaped too, in case the text is going to appear in an attribute value. And so should the single quote, for the same reason. So there are 5 characters in total that you need to...
  • Commented on Another reason not to use each()
    fireartist: I’m afraid everything you said is wrong, and your entire analysis is mistaken. In the best case, it would be redundant with bigfoot’s own analysis, who had already identified the problem correctly in the followup section of the post....
  • Commented on Converting glob patterns to efficient regexes in Perl and JavaScript
    The short-for-me/long-for-you version of the answer would be “read the Friedl book”. 😊...
  • Commented on Converting glob patterns to efficient regexes in Perl and JavaScript
    Because of (*PRUNE). The .* requires backtracking to match: it gobbles up everything first, then relies on backtracking to give up enough of the matched string to make the match pass. (That’s why they say “death to dot star”.) But...
  • Commented on \d does not validate numbers
    That’s what /a is for....
  • Posted Alan Kay’s critique of the TPF grants program to Aristotle

    Alan Kay:

    ="https://www.quora.com/What-made-Xerox-PARC-special-Who-else-today-is-like…
  • Commented on How fast can you try?
    Well, now. That does indeed look a lot more plausible. TT vs TTM differ only in whether the SV returned from caller gets assigned to an SV on the pad, which is clearly going to be a noise-level difference. But...
  • Commented on How fast can you try?
    Actually, on repeated look, it seems this benchmark is probably entirely bogus… ☹️ The current results say that without the catch clause, CPAN Try::Tiny is slower than master (with or without renaming (i.e. TTT)), but with the catch clause, CPAN...
  • Commented on How fast can you try?
    Had I left it out I'm sure I would have caught flak for that instead. Not from me, at least. :-) Any flak from my part was limited to the omission of eval, because that’s what TTT is for –...
Subscribe to feed Recent Actions from Aristotle

  • brian d foy commented on Which edges cases could perl shed to make it easier to parse?

    Kurila wants to do new things. That's not what I'm proposing. I'm not interested in making a new language. Anyone can still use Perl just as it is.

    I like the language I have now, but there are parts of it that I don't use that I think are probably causing a lot of pain to support and limits lateral development (like Perl on the JVM or something).

    It's a false dichotomy though. I don't need to start from scratch. Perl is already doing this, for what it's worth, by removing features deprecated since 5.0, and that has some value.

  • Joel Berger commented on Which edges cases could perl shed to make it easier to parse?

    As I was a part of that conversation too, I'd just like to tag on that while some people are (rightly) interested in changing the grammar to improve parsers, I'm much more inclined to change it to improve the experience for newcomers. Things like removing indirect object notation, single quote package separator (`perl -E '$name = "Joel"; say "This is $name's computer"'` anyone?) and (IMO) the map EXPR, LIST form (because it is hard to teach/explain how that EXPR is deferred), etc.

    Most of us monks don't use these because we know them for the footguns that they are, and even still los…

  • E. Choroba commented on Which edges cases could perl shed to make it easier to parse?

    Indirect object notation and Package'Separator should be gone. I would be sad for most of the other proposed changes.

    What about the difference between


    sort(find_records(@key));
    sort(find_records (@key));

    etc.?

  • Ovid commented on Which edges cases could perl shed to make it easier to parse?

    I would love to see some of this worked on. However, to do that, we'd have to get P5P to agree to a policy on how to introduce backward-compatible changes. That seems like the biggest first obstacle.

  • Toby Inkster commented on Which edges cases could perl shed to make it easier to parse?

    I use map EXPR, LIST pretty often because it runs faster than map { BLOCK } LIST.

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.