« first day (4068 days earlier)      last day (863 days later) » 

JRL
12:57 AM
I wish there was an easy way to figure out which VM handler was called for a given opline
 
morning
 
JRL
o/
there should be some kind of free in this code if Z_TYPE_P(var_ptr) == IS_OBJECT, but im not sure what or where
 
JRL
1:23 AM
yep, finally, resolved
+1 for guess and check i suppose
 
JRL
1:59 AM
goddammit, lol
i fixed my mystery memory leak and created some segfaults in other edge cases
 
Sounds like a productive evening.
 
JRL
it's like whack-a-mole. honestly, feel like fucking off from working on this and going to play some poker.
 
 
6 hours later…
7:45 AM
Guys, which one is correct? (English perspective)
- Having two files inside the root
- Having two files on the root
- Having two files in the root
- Having two files at the root
 
8:39 AM
Either two files inside the root / two files in the root. Having something 'on' root suggests that it's attached to it, having two files at the root suggests proximity but not necessarily within.
Most people would understand them all given sufficient context
 
 
2 hours later…
10:17 AM
I see, thhanks
 
Wes
if i didn't renew phpstorm for a year i need to pay the 90 dollars again? gah
 
 
1 hour later…
11:32 AM
@Crell youtube.com/watch?v=bpBeRnyqaIQ Seems like you might enjoy this about functional code fans.
 
 
4 hours later…
3:36 PM
What's Generator::__wakeup() used for? The documentation is minimal, thinking about sticking an example in it.
__wakeup() seems counterintuitive to what generators are used for
Unless an event loop was paused indefinitely? But why?
 
@Tiffany The magic method doesn't actually exist. I assume the intension was to document how Generators cannot be serialized. Maybe remove that page and add a note to the generator intro page?
 
Probably
 
Ah, it did exist in the past, but that behavior has since been replaced by flags on the ce.
 
I think the note should probably be a warning box
> Throws an exception as generators can't be serialized.
Or maybe stick an example to show that it throws an error exception
 
Well, the method page should probably be removed now. Fatal error: Uncaught Error: Call to undefined method Generator::__wakeup()
You could add a warning about not being able to serialize to the warning box on the Generator front page about not being able to instantiate Generator.
 
3:53 PM
@Trowski yeah, but it was still available in PHP 7, no?
I dunno, I defer decision to remove it. If it was a PHP 5.5 behavior that was removed in PHP 7.x, I'd be more willing to remove it
 
Yeah, true. I'm not sure what the protocol is on documenting magic methods, particularly ones that always throw and have been removed.
 
I think thorough is better, at least to state that something will not work to reduce confusion of "but this method exists in PHP 7.0, where is it documented?"
Annoying, sure. Probably annoying for translators, also sure. :/
 
cmb
4:10 PM
Generator::__wakeup() is apparently removed as of PHP 7.4.0; we should document that, but state that unserialization is still not supported.
 
Blarg
 
blorg
 
4:25 PM
Hey, I said what I said.
 
:P
 
@Sara So, doing Advent of Code functional-style has inadvertently turned into the strongest case I can make for the pipe operator. :-)
 
@Crell Have you applied to work 20% on pushing pipe operator through, funded by the foundation? :)
 
No, because TYPO3 is already OK with me spending a bit of time on Internals on their clock, as long as it would be beneficial to TYPO3. :-)
(It's also a solid case for PFA, but I don't know if I want to open that can of worms again.)
 
going by doc.php.net/tutorial/structure.php, the version list near the top of a manual page is generated by a versions.xml file, I'm guessing, but that's mainly for extensions... is there a similar file for non-extension manual pages?
I saw print-version-for but that gets built in phd... I don't see how phd would assign the value
brb
 
JRL
4:53 PM
the starting point for new documentation is the RFC that passed right?
 
Typically, yes.
And stealing liberally from the RFC for the docs is welcome and encouraged.
(The enum docs are basically the RFC with page breaks added.)
 
cmb
@Tiffany What are you looking for exactly?
 
@IluTov Do you have merge right on php-src?
 
5:23 PM
@Girgias Sure
I was waiting for a review but I'll merge now
 
Okay, was just asking as I didn't know if you needed someone else to merge it
 
@cmb i.stack.imgur.com/LH0Qs.png where this can be changed
 
versions.xml
 
cmb
there is also version.xml for builtin stuff
 
ahhh, I was looking in the wrong place, cheers
 
5:35 PM
@Girgias It's merged now.
 
:)
Trying to figure out why an exception is not being caught by a corresponding catch, not having fun with it :(
 
JRL
5:53 PM
okay, who can i pay to teach me some about this zend mm, lol
like, this can't be something that only 3 people in the world understand or it'll be really hard to keep PHP running long term
 
@JRL As we all look away from your awkwardly and shuffle our feet...
 
😝
 
JRL
lol
i had a variable that wasn't being gc'd correctly, so i added a zend_ptr_dtor() to zend_vm_def in the appropriate handlers if the zval was an object
but apparently it was being gc'd correctly for certain objects, because i destroyed the pointer while it was still used for other functions and now segfaulted like 30 tests
i should document the things i've been discovering/learning in doing this RFC
only thing is that i'm apparently learning them wrong since i keep encountering these subtle bugs
 
JRL
6:10 PM
well, i think i have a way to fix the segfaults but its kind of ugly and unoptimized
 
6:22 PM
BLEH
I needed to just add SAVE_OPLINE() :(
 
JRL
what does SAVE_OPLINE() do?
 
It saves the opline so that when you throw an exception in it, it is possible to go to the correct catch block
IIRC that's only why you need it
> As such, before performing any operation that might possibly throw, the local opline must be written back into the execute data (SAVE_OPLINE operation). Similarly, after any potentially throwing operation the local opline must be populated from execute data (mostly a CHECK_EXCEPTION operation).
 
JRL
im "fixing" this memory issue by manually checking the ce for function handler defs depending on opcode inside the vm handler prior to dtor-ing the pointer, because i don't see another way to do it
which feels... so brute force
 
That feels wrong
 
JRL
yes
 
6:32 PM
What are the test cases where you get the segfaults?
 
JRL
bug54305, compound_assign_failture, exception_from_toString, gc_038, bug76675... there's like 15-20 of them
 
Might be something which is related to cleanup_unfinished_calls() ?
As this is called to cleanup stuff after an exception is thrown
 
JRL
possibly
i was testing the operator overloads for the cases of assign_ops
in the form $obj += 1 or something similar
the code was executing correctly but zend mm was complaining about a memory leak that it automatically cleaned up which was failing the tests
in the VM handlers for those ops, the var_ptr was dangling if it was an object for some reason
so I added this to end of the handlers:

if (Z_TYPE_P(var_ptr) == IS_OBJECT) {zval_ptr_dtor(var_ptr);}
adding that fixed my failed tests, but failed all these other ones
so that if statement needs to check more than just if its an object i presume, which is what im trying now
$obj = $obj + 1 did not produce zend mm errors, so it was definitely the handler for the ASSIGN_OP
 
You could try building with Clang and --enable-memory-sanitizer for configure to enable MSAN
Or using ASAN as it might be a use after free (--enable-address-sanitizer)
ASAN and UBSAN do work on GCC too
 
JRL
6:48 PM
i had my brute force solution nearly finished, so im going to at least see if that resolves the test failures, but this is pretty far outside my skillset and may need to wait until the RFC is accepted for someone else to actually spend time on it
i just don't want to dump something that is half finished on the RMs for 8.2 if it did get accepted
or for that to be a reason that people vote no
 
JRL
7:48 PM
well it did resolve the failing tests
but my god is it ugly
 
@cmb Just checking: github.com/php/php-src/issues/7719#issuecomment-986282125 Are you unable to transfer the issue or were you waiting for more input there?
 
 
1 hour later…
9:09 PM
@Wes oh nice, didn't know you could do any filesystem stuff at all
 
cmb
9:28 PM
@NikiC I can transfer, but want to wait on feedback first. :)
 
9:55 PM
@cmb Okay great, wasn't sure if there are permissions issues
I guess in this case it probably makes more sense to open a new issue that says what needs to be documented, so one doesn't have to filter through that guys life story and opinions ;)
 
There's still no way to turn off the emoji reactions on github issues is there?
 
just like it doesn't seem to be possible to turn off reviews from people who don't have write access
 
@Tiffany actually, they changed that recently I think...
 
hmmm
 
cmb
10:15 PM
@NikiC yeah, terrible bug report; github.com/php/doc-en/commit/… might already solve the doc issue
@Danack I prefer an emoji reaction over a separate comment with thumbs-up/down and some babbling any time. :)
 
@Danack it's already enabled
 
first one is probably before the change was implemented at github, but that one should've been prevented
hmmm
 
cmb
10:33 PM
@Tiffany nope, still not enabled for doc-en :/
 
@Tiffany Ah okay, enabled for doc-en as well
 
thanks
 
Should I enable it at the org level?
 
yes, imo.
 
cmb
ACK
(no pun intended)
 
10:41 PM
The name's Ack, Dan Ack.
 
not to be confused with awk
 
11:16 PM
@Tiffany Cute, but I much prefer the time Picard serenaded my cousin: youtube.com/watch?v=BG1l7MjVpW0
 
what's the opinion of using "like" to give an example in the manual? For example, "As of PHP 8.0, instanceof can now be used with arbitrary expressions, like $obj instanceof (expression)."
I think it should be different, but I can't think of what phrasing to use instead
 
11:32 PM
@Tiffany just 'i.e.'? or just nothing after 'expressions'?
 
yeh I feel like "for example" is much better there, and prob needs some actual examples
 
@Danack well, that should be e.g., not i.e., but I think "for example" is better
 
also, "can now be used with arbitrary expressions on the right hand side"
 
@DaveRandom it does, I just didn't include it in the question :P (from github.com/php/doc-en/pull/1155, but it has been updated)
the example provided is pretty good
 
"examples or it didn't happen" :-P
but yeh cool :-)
 
"As of PHP 8.0, instanceof can now be used with arbitrary expressions, i.e. $obj instanceof (expression)."
"As of PHP 8.0, instanceof can now be used with arbitrary expressions, e.g. $obj instanceof $foo."
 
$obj instanceof stdClass
 
$dave instanceof Pedant
 
also, $tiffany instanceof Pedant
 
yeh you better edit
 
11:40 PM
:P
I rarely get things right the first time
 
lol ffs I am actually drunk (vs "have been drinking") and going to bed
got hiccups and everything
nn x
 
lol
 
11:58 PM
`type PickyTiff = Tiffany & Pedant;`
WARNING: Redundant type intersection, 'Tiffany` is already an instance of 'Pedant' on line 1
5
 

« first day (4068 days earlier)      last day (863 days later) »