user-pic

E. Choroba

Subscribe to feed Recent Actions from E. Choroba

  • Smylers commented on What happened to Perl 7?

    Thank you for such a clear update. As somebody who only manages intermittently to follow what's happening with the Perl core, this is really useful, and explains several things I'd be wondering about.

  • laurent_r commented on Perl Weekly Challenge 200: Arithmetic Slices and Seven Segment Display

    Hi Choroba, thanks for your comment. It appears that we don't understand the task in the same way. My understanding of the task is that the differences between any three *consecutive* elements of the original array of integers should be the same. 3 7 11 is indeed an arithmetic sequence, but these numbers are not consecutive items in the original 3 5 7 9 11 input sequence.

  • chrisarg commented on Caching & Memoization with state variables

    I am not sure I follow; are you saying that two different named subroutines can't have the same name for their state variables, i.e. it is not possible to have ?
    sub lucas ()
    {
    state $statevar;
    ...
    }

    sub fibo ()
    {
    state $statevar;
    ...
    }

    would

  • Brett Estrade commented on Caching & Memoization with state variables

    I love state variables, but oddly only use them when creating sub based state machine xD - which is typically just for show. But the idea of co-routines in Perl is nifty.

    I think E. Choroba means something like:

    sub foo {
      state $foo = 1;
      ...
      say $foo;
      ++$foo;
    }
    
    

    foreach my $i (1 .. 10) {
    foo();
    }

    versus,

    my $foo = 1;
    foreach my $i (1 .. 10) {
      my $sub = sub {
        my $myfoo = $foo;
        ...
        say $myfoo;
      };
      ++$foo;
      $sub->();
    }
    
  • Aristotle commented on This week in PSC (157) | 2024-08-23

    PHP has the info() function for a very different reason: it tells you ⓐ what options the language has been compiled with because ⓑ you cannot examine them directly without shell access to the host. So it covers a set of requirements that simply do not exist for us, because there is no way to compile a perl with only some of its features. Whether you have any given feature or not depends solely on which version of the perl interpreter you’re running, not how it was compiled. A function that provides this information would just duplicate the documentation at a point where…

Subscribe to feed Responses to Comments from E. Choroba

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.