« first day (3808 days earlier)      last day (1152 days later) » 

4:06 AM
Okay, so I think I've got the variance rules figured out for basic intersection types (more tests are always welcomed tho), but I don't get why the check for types properties works, but not the one for argument/return type checking (https://github.com/php/php-src/compare/master...Girgias:intersection-types#diff-68a4e87248c495a9842703195cdec026814b9518502b6602b756d2f1b5661575R1057-R1061).

@NikiC any clue why the same approach doesn't work there? (it seems like the instanceof_function() doesn't work there for some reason)
 
4:28 AM
Wait the bless test script doesn't handle EXPECTF sections? :(
Ah nah I'm just dumb
 
 
7 hours later…
11:01 AM
@bwoebi Got a question. What's the best way to pass an arbitrary zend_type to an opcode? As a IS_PTR zval? I'm not sure how memory management and opcache would work here. I wanna avoid adding a new zval type.
 
11:27 AM
@IluTov Why do you want to do that?
 
12:13 PM
@NikiC Is expression. It's possible without such an opcode but it would require a bunch of jumps, instanceof and type checks, and since instanceof and typecheck release op1 I'd have to duplicate those so the operand can be reused. I thought a single, separate opcode might be cleaner.
 
1:13 PM
@IluTov Yeah, how do you even imagine this playing along with opcache? operands to vm ops should be only primitive types (scalar or array)
ah well, you can use unresolved zend_types probably
and yeah, use IS_PTR then
 
1:54 PM
@bwoebi Is there a better way to define an op array that is used to initialize the new vm call frame here than defining a new opcode here? I want to call a C function as the initial action in the call frame, seems like there should be a way to do that without defining another opcode.
 
 
2 hours later…
3:40 PM
@Trowski I guess you can call an internal function?
(similarly as to how shutdown handlers are called)
 
@bwoebi It needs to be an op array to pass to zend_vm_init_call_frame.
 
@Trowski Use zend_vm_stack_push_call_frame instead
 
@bwoebi That still requires a zend_function, or op array, whatever you want to call it. Maybe I'm asking the wrong question then. How do I generate a zend_function that invokes a C function?
 
3:57 PM
@Trowski heap.space/xref/php-src/Zend/zend_compile.h?r=269c8dac#482 roll your own - stack alloc some memory for it, fill the fields and call it
with zif_handler being a pointer to your ZEND_FUNCTION() definition
 
4:32 PM
@bwoebi That seems like what I'm looking for, though it fails on this line: heap.space/xref/PHP-8.0/Zend/zend_vm_execute.h?r=6dd85f83#54335
It seems to be expecting an int return value from the handler, but ZEND_FUNCTION is void.
 
@Trowski uhm, you need to call it via zend_call_function()
not via the vm executor
 
@bwoebi Right, I get how to do that with an existing VM stack, but here I'm initializing a new VM stack for the fiber with an initial set of opcodes. I was doing it with a custom opcode.
 
5:05 PM
@bwoebi I think I figured it out. :D Thanks for the help, still trying to entirely wrap my head around all the inner workings of the VM.
 
5:33 PM
@bwoebi Does this look right to you? Seemed too easy to eliminate the custom opcode.
 
5:47 PM
Yep, not that simple. Build fails on Windows. :P
 
 
3 hours later…
8:56 PM
Would anyone mind if I remove this comment? php.net/manual/en/mysqli.real-escape-string.php#113658
Also, I wouldn't mind seeing this one go too. php.net/manual/en/mysqli.real-escape-string.php#119571
 
9:16 PM
I don't think there is much in the way of democratic process for comment auditing, if I see one I don't like I just nuke it, if I can managed to do the correct rain dance to be logged in to master in such a way that the docs notice and give me the option to do so :-P
the point of comments is that they are supposed to be things which belong in the docs but are missing, they are definitely not intended for sharing your shit code samples
there are exceptions to that, but those are noticeably "exceptional"
a bit like the tony the pony HTML/regex question on SO
 
Ok, then I will nuke these two because they are just gibberish in my opinion.
 
9:31 PM
agree on the first and cba deciphering the second which is a pretty good indicator it's useless
 
morns
 
Sam
9:53 PM
Hey guys, might be a little off-topic so feel free to ignore. But, is anyone here familiar with the Laravel monorepo setup? I'm quite interesting in how they use READ ONLY repos to release package with semantic versioning, and just had a few questions around it. Thanks
 
@Sam I don't know anything about it, apart from it's probably called 'git subtree' - and google for that gives stuff like: atlassian.com/git/tutorials/git-subtree
 
Sam
I don't think they do use subtree :) they use something called splitsh-lite in their circleci builds to push sub-folders into other remote repos
 
 
1 hour later…
11:15 PM
I am instantly obsessed with Kate Rusby open.spotify.com/artist/…
hey @Danack you wanna go to Bristol Folk Festival Apr 2022? :-P (assuming covid sanity by then)
typically also a good real ale piss up, folk festivals
 
"piss up" does not sound sanitary
 
I see you have been to a folk festival before
they typically involve sitting on farm equipment, though perhaps not in a city
 
@DaveRandom I haven't, actually
not really my thing
 
fair
 
@DaveRandom Do you have a minute? Could I trouble you to try something on Windows?
 
11:28 PM
does it need building PHP? or just running?
I don't have a PHP 8 build env
 
Needs building a PHP 8 extension.
 
could prob make one pretty rapid tho
I haven't ever done it but I think I prob have all the necessary tooling
 
Tests 13 and 22. Works fine on Github CI and my mac.
 
ahh kk
let me see what I can do now, if not should also have time tomorrow
 
Huh you can't do an instance of check of a union
 
11:33 PM
that...feels like a bug
 
I would agree, @NikiC what's your opinion on that as you made the Union type RFC
 
not sure if this should work either 3v4l.org/VMl22
probably not
 
| is also the binary or operator, which complicates both of those cases.
 
3v4l.org/uVa5N this kinda shows my example is intended... but instanceof should work
 
Using an int with instanceof doesn't make sense though, so potentially that could be changed.
 
11:38 PM
The === equal check I'd disagree as you're checking against a value, but yeah the Rval for instanceof should be a "type"
 
It seems like it should work, but remember that instanceof can be used with expressions.
 
Or just wait for IluTov to add "is"
 
11:49 PM
@Trowski have to update Visual Studio, hold the line please caller
obv I have to update it, I tried to use it for something
 
@DaveRandom Like every time I open my bank's app on my phone.
 
what's the procedure for this, still easiest to just put extn under ext/ in php-src?
 

« first day (3808 days earlier)      last day (1152 days later) »