« first day (1853 days earlier)      last day (3092 days later) » 

11:00 PM
@RonniSkansing For reasons I cannot explain it reminds me of youtube.com/watch?v=jIBcarAwsjw
 
listening to it now
@PeeHaa awesome
the start of that one reminded me of youtube.com/watch?v=rVqAdIMQZlk
 
cool
 
From quick glance looks like a legit issue
 
isn't that expected behavior?
you're yield-from'ing a generator that's invalid
hence the "value" that gets yielded should be invalid
 
what do you mean by "invalid"?
g2 is never advanced and it has at least the yield 3. So this should either infinite loop, or it should error
 
11:14 PM
why would it infinite loop?
 
yeah, it should inf loop… took me a minute to realize that it was $g1->next() and $g2->valid()...
 
you're trying to yield from an invalid iterator
which should itself be an invalid operation
 
@ircmaxell because $g2 will be always valid… it has finished yielding from $g1
 
why will g2 always be valid?
you're delegating the yield value to g1
which is invalid
 
uhm?
 
11:15 PM
@ircmaxell Why is g1 invalid?
 
because you've advanced it beyond it's valid value
 
sure, so, it returns inside g2
g2 is now still valid, it should have detached from g1 now.
 
well, then it should continue executing and get to yield 3
because the yield-from becomes invalid
 
but we're calling next() on g1, not g2
 
@ircmaxell exactly. At which point it stays valid forever
 
11:17 PM
so?
@NikiC and infinite loops at yield 3
 
@ircmaxell exactly
 
yeah, sorry, confused myself as to what you meant by infinite looped
 
@NikiC I bet if you put a yield before the yield from, it will work properly
let me try…
 
you mean put a yield and do one next call?
 
11:20 PM
otherwise it would just be completely unrelated to yield from
 
yep…
yeah, obviously
 
k
 
the point is that we're not taking over the generator->value from parent when detaching
hence in the 3v4l example I just posted, we're returning int(0) all the time in the loop.
(instead of int(2))
 
you're not advancing the generator in the event that yield-from is invalid
though there's question if you should (->current() should be idempotent)
 
@bwoebi Right
 
11:22 PM
I'd error if you yield-from an invalid generator
 
nah, I'm not copying the last yield … that's the issue.
 
I… forget that StackOverflow Chat doesn't expand links. ^^ RFC for ext/curl support of HTTP/2 push
 
@DaveyShafik uhm, please do not optionally pass by ref :-/ it's possible via prefer_ref, but uuuuhm…
 
@bwoebi to what are you refering? :)
 
I prefer to limit C land where not necessary to what userland can do too.
> curl_multi_setopt($mh, CURLMOPT_PUSHDATA, &$user_data); // Not sure this is possible, I assume C-land can do this
 
11:29 PM
@bwoebi the libcurl implementation has you passing in a pointer that will be passed into the callback, how best to bring that to user land?
 
@DaveyShafik Oooh, that's kinda sexy. Get it through so I can match it in HHVM plox.
 
@Sara I need help :(
@Sara currently, H2 support isn't working at all in ext/curl, even 7.0 AFAICT, which is bad.
 
Is the const really CURLMOPT_* or CURLOPT_* ?
 
@DaveyShafik Simply: don't. Take everything by value, and if they need something reference like, they can use an object instance.
 
@bwoebi CURLMOPT
 
11:31 PM
@DaveyShafik that M is weird…
 
@Sara that seems… OK. I guess.
@bwoebi it's a curl multi option, not a curl handler option…
 
oh
makes some sense.
 
yeah ;)
 
@DaveyShafik I suggest just having another callback for the finished server push?
 
@Sara Why do you need any value at all? Isn't this already covered by closures?
 
11:34 PM
@NikiC Excellent point.
 
@bwoebi the callback is just for determining if the push is accepted or rejected, it's then added to the multi handle as if it were requested by the client
 
@DaveyShafik Listen to @NikiC, he's a smart dude.
 
@NikiC oh… just use use? :)
 
@DaveyShafik yeah… and have another callback for finished data
 
@bwoebi no, it's indistinguishable from concurrent requests from the client end, and would be handled the same way
 
11:35 PM
 
oh wait… you are pushing to the closure and to the curl mopt? why both? @DaveyShafik
 
@bwoebi I think you're overthinking that bit
@bwoebi eh?
@NikiC OK, I like the idea of just dropping the support for CURLMOPT_PUSHDATA, but what should I do if the user tries to use it? ignore it?
 
@DaveyShafik the fifth arg of the Closure
 
@bwoebi libcurl passes the value for CURLMOPT_PUSHDATA into the callback, as the 5th arg
(the value being a pointer)
it's for you to do with whatever you wish though
 
so, well then it's redundant… Okay… that's what Nikita is saying.
got it…
 
11:39 PM
well, the difference is perhaps scope though?
 
@Sara o/
 
@DaveyShafik use statements as he said…
 
@DaveyShafik Well, technically you, internally need to use the CURLMOPT_PUSHDATA field as it is, because that's where the reference to your closure goes. So yeah, just make trying to use that in userspace an error.
 
@bwoebi you can't specify a use later on though, it'll always be taken from the scope at definition of the closure, as opposed to whatever you set it to with the curl_multi_setopt at wherever. I'm not opposed to that.
 
php > $f = function (&$bar) use (&$bar) {};
php > $baz = 1;
php > $f($baz);
php > var_dump($bar);
NULL
:-( … Is this a bug or not?
 
11:40 PM
You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
qa.php.net/reports and news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
Is this going to be actually useful for anyone?
 
@PeeHaa Not in the past decade or so as far as I'm aware.
But it makes people feel productive.
 
k
 
wait… you mean nobody reads those?
 
@DaveyShafik Somebody might.... maybe
PHP is pretty public about all its data, so I imagine someone somewhere sees it.
 
@bwoebi why would it be?
 
11:43 PM
@ircmaxell don't know… I'd expect $bar to be int(1) … or $baz to be NULL at the very least, depending on what overwrites what
 
that's true...
hmmm...
stop playing with references
 
:-D
 
RFC for 7.1: Using a reference raises an E_STAHP_IT error
7
 
+1
 
references <3 bug generators </3
Somehow nobody seems to have told you that references actually are the holy grail of programming… @ircmaxell
 
11:46 PM
OK, so that solves one issue — but now to figure out why HTTP/2 doesn't seem to work
 
There's perfectly legitimate uses for references
 
@Leigh yes there are, to prove to others that people can't abstract their code properly :-P
 
@ircmaxell by-object is anyway just a poor mans reference usage…
 
@bwoebi um, no. The first-class-function is the holy grail. References are just a scar
@bwoebi not at all. by-object preserves type between variable boundaries.
 
@ircmaxell yeah, I'm just being sarcastic.
 
11:48 PM
@bwoebi I know
ok, I'm off to go see Derick and Jenny. Later!
 
Have fun :-)
 
@Sara for anyone wondering - qa.php.net/reports/run_tests.php
 
I'm playing.
 
But it doesn't seem to get data for extensions....
 
       Fuzzers alive : 8
      Total run time : 0 days, 1 hours
         Total execs : 0 million
    Cumulative speed : 1397 execs/sec
 
11:50 PM
which is actually a bit annoying.
 
Aerys uses references in exactly 37 places (tests excluded)
 
walking trees without references... you want me to... recurse?
 
Assertion failed: ((ref)->gc.u.v.type == 7 || (ref)->gc.u.v.type == 8), function gc_possible_root, file /Users/dshafik/src/php-src/Zend/zend_gc.c, line 226.
 
And I happily admit that it's me who introduces 80% of the references in Aerys.
@rdlowrey is really too sane for that :-D
 

« first day (1853 days earlier)      last day (3092 days later) »