« first day (3939 days earlier)      last day (1000 days later) » 
00:00 - 20:0020:00 - 00:00

8:01 PM
@AmorLov I don't use WP, so no idea here. :-) As I said, you'll have better luck with a WP group.
@bwoebi Is it actually used anywhere in core? I couldn't find it.
 
@Crell thanks will ask in another room : ).
 
8:25 PM
@Crell heap.space/… exceptions stack traces
 
Hm. That... OK, kinda looks like what I'm trying to do.
Except I don't have a smart_str, I have a zend_string. (Which is what led Sara to showing me her shenanigans code.)
 
Incident with Webhooks ・ Issues, PRs, Dashboard, Projects has Partial Outage
 
8:42 PM
Hey, anyone know what site had that searchable archive for the mailing list.
 
Google
site:externals.io bla
 
Incident with GitHub Actions and Webhooks ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ GitHub Pages has Partial Outage
 
@Crell How do you format when you have multiple extends
the code format
Sometimes I have some interfaces which extends to others
 
PSR-12?
 
I usually just put it all on one line as normal. PSR-12 says when and how to go multi-line, but i rarely need to.
 
8:50 PM
Looking for a new tech book to read, any suggestions?
 
@SalOrozco "Logic in computer science"
Do the exercises ;)
Alternatively, a softer book but highly recommended: Facts and fallacies in software engingeering.
Available as PDF if you google a little.
 
thanks, I will take a look.
 
@OlleHärstedt thanks
 
9:08 PM
Incident with GitHub Actions and Webhooks ・ GitHub Pages has Partial Outage
All issues have been resolved!
 
@beberlei You still work on Doctrine, yes?
 
9:27 PM
@Crell for some reason I can't push to your pr branches, so I posted a patch ...
 
Guh. Um, OK then.
What's the .s and .a business?
 
smart_str stuff
s = string
a = allocated
use definition search on heap.space to look at struct layouts
 
@JoeWatkins shouldn't we just write smart_str output = {0};?
 
yeah old code does, but we're allowed to do this now, right ?
 
(for reasons I find this more readable, especially as I don't want to even wonder what a is when reading the code)
 
9:33 PM
Z_TYPE_P(value) < IS_STRING - wat?
 
we are, but when the trivial initialization of a C structure is just zeroing it, I prefer to use = {0} … dunno
 
no really strong opinion ... you could swap it ... just showing the/a way ...
 
@Crell everything < IS_STRING is not refcountable (trivial scalar)
@JoeWatkins sure, me neither, just discussing what looks nicer
 
@bwoebi So... that's the equivalent of the IS_LONG: IS_DOUBLE part of my version?
 
@Crell including IS_NULL, yes
@JoeWatkins though your patch is missing the if (ZSTR_LEN(input) > length) around adding the trailing "..."
 
9:37 PM
yeah I noticed foo... in test ...
I sorta think it wants to be string(actualLength) \"thingUpToLimit[...]\" ... but not sure if that's too leaky or verbose ... fiddle as necessary :)
 
@Crell i do
 
Uh, yeah, this is now over my head. No idea what ZEND_COLD is. I mean, I vaguely follow the logic, but...
 
@Crell ZEND_COLD is just a marker that puts functions into more distant regions of the object file and prevents inlining typically
micro-optimizing thing you can ignore
 
yeah just following conventions, safe to ignore ...
if you are comfortable, commit that and I'll merge the patch and then fix the "foo..." thing in core because I can't push to your repo (probably something broken my end with smartcard or auth)
 
I am attempting to run ORM on 8.1 beta1, and running into a weird error when I try to run a PHPUnit test.

"Fatal error: Class "PHPUnit\Framework\TestFailure" not found in /usr/src/myapp/vendor/doctrine/persistence/lib/Doctrine/Persistence/Reflection/RuntimePublicReflectionProperty.php on line 0"

Except... both of those classes exist right where they're supposed to be, the Doctrine class has no mention of the PHPUnit class (obviously), and line 0?

Have you seen this at all?
The "foo..." thing?
 
9:44 PM
@Crell look at the test in joes patch
 
@Crell no, we don't test for 8.1 yet, usually wait for RCs
 
@Crell line 0 sounds weird in any case … possibly a bug in php-src
 
@beberlei Ah. Hrm. Well, heads up that this is apparently a thing. :-/. (I was trying to experiment and see what Doctrine did with public readonly and if it could replace something else I've been working on, but...)
@bwoebi Also a possibility I was considering. I'm not sure how to narrow that down, though.
I'm running latest-stable PHPUnit and Doctrine ORM. Just using PHPUnit as a test script environment, basically. But it did work on another experiment on 8.1 previously so it's not just a PHPUnit/8.1 issue. Or at least not an easily tripped one.
 
@Crell break on zend_throw_error and dump the backtrace as a starting point
 
^^
source .gdbinit
 
9:49 PM
Uh. I'm running 8.1 through a docker container, not a custom build. I can't debug core at this point.
 
zbacktrace
^^ this will show you something like a user backtrace, you'll be able to read it
 
In what, the docker container?
 
what is a docker ?
hehe, I have no clue how that works
 
I barely do. :-P
 
@Crell you can also nsenter into the container namespace and execute gdb from there … though starting the container as privileged should be enough
 
9:51 PM
I don't think it's installed in the image.
 
apt install is quickly done
(though I wish valgrind, strace and gdb were always installed in docker containers, including helper tools like e.g. libcap2-bin etc. … sucks to install them manually each time via apt)
 
OK, well, that's installed, but I've no idea what to do with it. I don't have php sources in this thing.
 
just a C backtrace for starters
break zend_throw_error, run and bt
 
@JoeWatkins Re the match patch, honestly, with your diff there's nothing of mine left in it, except a rudimentary test. If you're going to go that route with it you may as well just make your own PR to fix the bug.
@bwoebi You are at this point just rattling off words that I can mostly pronounce. I don't have the slightest idea what you're saying.
 
@Crell you run gdb --args php yourfile.php
 
Then you type break zend_throw_error, enter. run, enter. Should then reach the breakpoint. Now you type bt, enter to get the stacktrace.
 
So... where does the air go after it ends up in the eye of that storm
 
@Danack where is it headed?
 
@Crell er ... sorry, didn't mean to step on toes, was trying to be helpful ...
 
@bwoebi at some campsites apparently - bbc.co.uk/news/uk-england-cornwall-58010633
 
9:58 PM
@JoeWatkins I think you are helpful, but it seems it's just a bit over his head. I think you just should do what he says - open your own PR with that patch :-D
 
@MarkR up, I believe.
 
It's not just over my head. (I can mostly read it, kinda). It's that I've been trying for a year to get more useful in php-src, and so far all I've managed to accomplish is convincing myself that I should just avoid anything that ends in .c. And an air-dropped complete rewrite of a small patch really does nothing to help with education or ego. But yeah, you've got a better approach to fix the bug, please go use it, because the bug should be fixed either way.
 
@Crell No idea whether I'm wrong, but perhaps you should get a bit more familiar with C itself. I get the impression, you are barely managing with C and then completely struggling when having to interact with the zend engine. (I do not know why, are you not curious enough to look the definitions of the macros up, how the structures are made up…? Find usages of places where things are used and get aha moments.)
 
Shed a tear for all those who try to right click > go to declaration on a macro and clion laughs at you :P
 
You can read the code - well, you have a couple questions, that's okay … but if you have these questions, you maybe should just try to find the answer to these questions yourself. e.g. the php-src code quite often exploits the concrete ordering of the IS_* types.
@MarkR I have no idea what you're doing wrong, I find clion quite powerful. And while it rarely does not follow it, you can just do a quick global search for #define macroname and find what you want.
At least compared to 1-2 years ago… It's gotten much much better
 
10:08 PM
That's usually what I have to resort to, but outside of Zend/ the intellisense and indexing seems to fall completely flat.
So if you've got a config that is more reliable im all ears. It's possible for sure because I know we have several websites that can do it
 
@MarkR dunno? The only thing I have to do is running configure once so that it can interpret the Makefile and find all sources
 
@bwoebi Odd, I have the makefile there and have completed a full build, but even so if I do something as simple as trying to view IS_TRUE it complains it can't find the declaration although it's sitting right there in zend_types
 
@MarkR Then I have no idea what's up … it … just worked for me once I ./configure'd
 
I'm not sure either, I've heard a similar story about not being able to navigate easily from a decent number of people now
 
@bwoebi Yes, my C is weak. The last time pre-php-src I dealt with C regularly was in 2004 for Palm OS. Frankly I hate it as a language. But PHP is so built up on top of C that it's basically a language unto itself, and one with no obvious onramps. I go back to the paltry documentation. "Just randomly read bits of code until you understand it" is the least efficient way to learn something, and... I recently got engaged. I have way better things to do with my time.

I'm just very frustrated, and it really doesn't help that my latest attempt at doing *something* useful, including "go fin
So yeah, I'm signing off for the night, because this is really not good for my head right now.
 
10:14 PM
:-/
 
@bwoebi It was working for me, but then seemed to break. No idea why.
 
@Crell I can tell you that this also happens to me. (most recently because I did not properly look ZEND_MAP_PTR up… and then Nikita came and rewrote 50%)
 
@bwoebi It's an excellent way to ensure PHP's bus number remains small.
 
It is frustrating … but you somehow have to prevent the frustration from getting at you :-/
it's very hard to get proficient at php-src. Either you are spending many many hours with the codebase. Or you will not do many things in the engine.
 
I think for me the biggest issue (other than easy navigation) is the sheer amount of nested macros. I find it really difficult to get context on what something is doing and in many ways have to resort to: it's magic don't question it
 
10:22 PM
take a deep breath @Crell, I understand you 100%. I truly do. Count on me whenever you want to do pair studying or programming into php-src, I'm still learning it too and would love to share knowledge with whoever wants to :)
 
@Crell If I think back … what made me understand the code was hunting bugs. It can be bugs in your own code … but preferably it's bugs in the engine.
@MarkR clion can expand macros for you on hover, I find that helpful :-D
 
@bwoebi Same for me. I triaged bugs on bugs.php.net for a while, and investigated ones that looked easy. That's when I learned there are a lot of subtleties in the engine, ha. But I did fix a few.
 
That would be helpful... if I could make clion find the damned things :P It seems fine within the same module. There has to be something that's making it jut give up
 
@Crell I didn't really intend to hurt your ego, what I expected to happen, happened ... I posted the patch and you started asking questions, then bob and I answered them all ... that's what I wanted ... that's the best way I/we have of helping ...
people correct niki
 
@MarkR I'm not caught up, but did you try the latest update? Has improvements for autotooling, supposedly.
 
10:26 PM
not often, but it happens, it should not hurt your ego when someone shows a better way, or even tells you you're wrong ...
 
@LeviMorrison I just grabbed 2021.2, no joy unfortunately. It's got the makefile and the cmakelists
... son of a
I wonder if it's choking because the makefile is referencing the WSL2 paths
 
I finally narrowed down a bug in my application, but I am absolutely clueless why it's not working like I want. Does anyone have any brilliant ideas why my name is not removed using the regex: 3v4l.org/t3QUE
 
It's not that there is a better way. Or shown a better way. But you didn't *show* a better way. You just airdropped a replacement. There's no meaningful educational value in that. All it does is reiterate that you know way more about this than I do (which is unquestionably true, and in itself fine).

I'm still ramping up on TYPO3, it's also a big and ugly codebase I'm not familiar with, and that process has been 100x more pleasant.

Whatever, I said I was leaving for the night. Good night.
 
I was afk for a few hours and noticed you hadn't made any progress, and there'd been discussion about escaping and you said you wanted to do it that way, so I showed you ... the patch wasn't polished or complete ... I figured we'd walk you through it and you'd finish it off ... it wasn't an intentional "airdrop", and wasn't meant to be a hostile act, I was trying to help ...
 
sigh
Well happy Friday all :)
 
10:38 PM
Friday??
I didn't get the memo :o
 
You are in the wrongest of timezones fo that :D Sorry!
To soften it up for you it's going to be Friday for much longer
 
I need to go over to the Netherlands if it means Friday starts at 6pm on Thursday
 
s/NL/TR/ :)
 
Ah that's right, I knew that
 
I keep moving further east so my Fridays start earlier
 
10:40 PM
Keep doing that and it'll eventually backfire :p
 
:D
 
10:58 PM
@Dharman because \r is not matched by $, only \n is
 
>$
Matches the end of a string without consuming any characters. If multiline mode is used, this will also match immediately before a newline character.
How can I match \r too?
 
(?=\r|$) maybe?
or…
@Dharman use (*ANYCRLF) at the start of the pattern
@Dharman see Newline conventions section of pcre.org/pcre2.txt
 
@bwoebi WOW, both of these work. Thank you so much
I really didn't know $ doesn't match \r
 
@Dharman CRLF considered harmful. (TBH nowadays there's not much reason left for using crlf, except if you want to open things in windows notepad I think :-D)
 
I don't control input
The JSON comes from API
This is also why in my tests the regex worked
 
Yeah, that bug was there for over a year, but it happened so rarely that I left it alone.
 
00:00 - 20:0020:00 - 00:00

« first day (3939 days earlier)      last day (1000 days later) »