« first day (3569 days earlier)      last day (1362 days later) » 
05:00 - 19:0019:00 - 00:00

7:03 PM
@NikiC I want to be able to trace a generator in the sense that every time it starts or suspends I call begin or end respectively. I'm not sure what actually resumes the generator though. I think I can get the very first call through regular fcall handler, the final end through GENERATOR_RETURN, and ZEND_YIELD gives suspend... (I think). Not sure what does resume, though.
 
@LeviMorrison zend_generator_resume?
 
Thanks. I'm still working through how $x = yield actually works; it's never been intuitive to me, but need to be sure I understand it >.<
It both accepts a value, and yields a new one, which seems weird.
 
@salathe my sincerest apologies that this has happened. I hope things improve for you.
 
You have to provide a value without knowing what you are going to get.
 
is there a formal process for nominating someone for primary doc editor? or is there a plan for that?
 
7:25 PM
I also need to figure out what tracing a generator that has a yield from in it is supposed to do.
 
@LeviMorrison Requests some arbitrary number?
 
@LeviMorrison when done in zend_execute it looks like multiple calls
 
@beberlei A call in the outer generator and one in the inner one? What do you mean?
 
until yield its one zend_execute, then until the next yield its another zend_execute and so on until return
 
8:25 PM
Progress:
function yields_array(array $array) {
        echo "Begin array\n";
        yield from $array;
        echo "End array\n";
}

function yields_generator(Generator $generator) {
        echo "Begin generator\n";
        yield 0;
        yield from $generator;
        yield 4;
        echo "End generator\n";
}

foreach(yields_generator(yields_array([1, 2, 3])) as $value) {
        var_dump($value);
}
<yields_array 0x107416150>
  <yields_generator 0x1074160c0>
    <yields_generator 0x107483000>
Begin generator
    </yields_generator 0x107483000>
int(0)
    <yields_generator 0x107483000>
      <yields_array 0x107482000>
Begin array
int(1)
int(2)
int(3)
        <yields_array 0x107482000>
End array
        </yields_array 0x107482000>
        <yields_generator 0x107483000>
        </yields_generator 0x107483000>
int(4)
        <yields_generator 0x107483000>
End generator
        </yields_generator 0x107483000>
Two obvious issues 1) the initial fcall doesn't close 2) the yield from array didn't get traced as it went in/out
It seems zend_execute_ex does not trigger on each independent yield for yield from $array o.O
 
I'm having one of those days where there's a million things I want to do, I have the energy and motivation to do all of them, but I'm trying to prioritize which to do first. ._.
 
I suggest fair dice roll :)
If you don't know the priority then hopefully it doesn't matter, so just do one.
 
@LeviMorrison it shouldn't trigger at all
There's no code executing there
Err, no user code that is
 
Sure there is: yield from.
 
8:41 PM
@cmb can you be nominated to be the lead? is that how it works? :S (and would you want to be the lead?)
(i.e., if you're willing, I think you should do it, you're excellent at it)
 
@NikiC Code of some kind is definitely running; we're going in and out of a generator. Neither execute_ex nor execute_internal catches this.
If I use yield from on a generator I do see the inner generator. This might make sense to only trace the inner-most generator, but in the yield from $array case I think that the generator doing the yield from should show up as going in/out.
Probably, anyway. I haven't built the things these are probably use-cases for yet.
 
9:05 PM
Night all o/
 
@Derick It used to be true for sure, but since official Docker images are available for pre-releases, it is no longer the case IMO. A few years ago I asked them to upload Docker images for RCs, but now even alphas are in the repository on the day of the release. That's a really significant change I think.
 
9:30 PM
I ran all the testing for our latest launch in the 7.4 RC phase, we were going to be moving to it anyway, made sense to start testing sooner. Found a few bugs in the process. I could only do that because of docker though.
 
 
2 hours later…
11:38 PM
@LeviMorrison this might be a dumb thing to say without context, but shouldn't yield from $foo result in the same ops as foreach ($foo as $k => $v) yield $k => $v ?
(I'm assuming that "trace" is tied to ops on the stack in such a way that ^ still holds true)
I was under the impression that yield from was pure syntax sugar, not executed differently
oh wait no, auto key generation works differently
 
05:00 - 19:0019:00 - 00:00

« first day (3569 days earlier)      last day (1362 days later) »