« first day (4066 days earlier)      last day (865 days later) » 

12:38 AM
> The second operand is always passed as $other regardless of whether the called object is the left or right operand. If the called object is the left operand, then $left is true. If the called object is the right operand, then $left is false.
class Number {
    function __construct(int $value) {}

    function __add(Number|int $other, bool $left): Number
    {
        // what do? How to access the '1'?
    }
}

$num = new Number(5);
$val2 = 1 + $num;
@JRL what am I missing in that?
 
JRL
@Danack it should probably say "the corresponding operand". In this case $other would have the int value 1.
that would result in $num->__add(1, false);
 
cool.
 
JRL
what i was trying to express there is that $other doesn't contain any of the information about position, just value of the other operand, and all the information about position is in the $left argument.
 
1:27 AM
@Danack you about on weekend of 18/19th? got "business" in brizzle, up for a beer or two? (either day)
that's sat/sun in ~2wks btw
 
1:49 AM
Does anyone have any recommendations on PHP profiling tools? I was in the process of registering for blackfire but apparently it doesn't support long running processes. I've been using xdebug but its performance penalty is too high to get meaningful results.
 
@DaveRandom up for quite a few beers, and I'm likely to be around, unless I'm not. Basically might decide to to my dad's for a bit, or might not.
 
I'm a big fan of "quite"
 
@MarkR did you try tideways?
 
and yeh sound :-P I'll just whatsapp you nearer the time
 
@MarkR Yeah, TBH I haven't been all that impressed with blackfire after using it last week.
 
1:53 AM
@DaveRandom cool.
 
@Trowski How long did you leave your processes collecting for?
 
@MarkR Typically one minute.
@Danack Tideways is by @beberlei, right?
 
yes.
 
@beberlei Any idea of how Tideways would interact with a long running PHP process? Particularly one running Amp.
 
something something, blackfire is a debugging tool for local dev, tideways is a production monitoring tool that generates info useful for devs. And new relic is a tool for producing large invoices.
 
2:57 AM
^ incorrect, new relic is a tool for running up large bills. the implication it can in some way be used for invoice creation is misleading.
 
3:14 AM
someone who is funnier than me steal this and claim it's the PHP 8.1 launch event: twitter.com/XRYouthBristol/status/1466573959449751554
 
4:04 AM
On tonight issue of Mark does silly things... I spent 4 hours debugigng a performance issue, to discover that I'd missed a function call, turning my 400k function calls into approximately 4 billion.
 
 
2 hours later…
6:15 AM
Is there any way to silence only these specific errors
Fatal error: During inheritance of IteratorAggregate: Uncaught Return type of Symfony\Component\HttpFoundation\HeaderBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
On 8.1
I though switching of PHP would be easy with modern framework, but it's not. Many deprecations and failing tests.
 
6:33 AM
Fixed with E_ALL & ~E_STRICT & ~E_DEPRECATED
 
 
2 hours later…
8:05 AM
@PatrickAllaert can you please announce 8.1.1RC1 ?
 
Wes
8:32 AM
les mornings
 
8:57 AM
hmmm.... API breakage in 8.1.1 ? github.com/krakjoe/uopz/issues/159
@JoeWatkins any idea ? (can't find any change....)
 
10:00 AM
git bisect make make crazy... telling me ac96db67673882c6a07cc99a8e0968d1586eed9a is the first bad commit
(only version bump)
 
10:13 AM
@brzuchal what symfony version are you using? IIRC, 4.4, 5.4, and 6.0 are compatible with PHP 8.1
 
symfony/http-foundation            v5.3.6  Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                v5.3.6  Provides a structured process for converting a Request into a Response
 
you can update to 5.4, it doesn't have any BC breaks compared to 5.3 and it should work fine
 
well... git bisect was right....
 
Composer.json says it's supported in 5.3 github.com/symfony/symfony/blob/5.3/src/Symfony/Component/…
:P
 
well, it also claims to support PHP 15
so...
 
10:21 AM
@brzuchal That was a huge controversy a few months ago. Symfony decided to switch to >= for the PHP constraint. The reasoning was that if you're using a supported Symfony version it will always support the newest PHP versions. If Symfony 5.3 doesn't support PHP 8.1 that would turn out to be false.
 
@brzuchal the latest release for 5.3 is 5.3.12, you are using 5.3.6: github.com/symfony/symfony/releases/tag/v5.3.12
 
10:43 AM
I can upgrade and check, thanks
 
11:24 AM
Morning guys
 
morning
 
11:42 AM
I don't understand "Skip this step for non-stable releases after GA of minor or major versions (e.g. announce 7.4.0RC1, but not 7.4.1RC1):" from point 2) of https://github.com/php/php-src/blob/master/docs/release-process.md#user-content-announcing-a-non-stable-release-alphabetarc
@RemiCollet @Sara @Derick how am I suppose to understand ref. to 8.1.1RC1 ?
 
@PatrickAllaert this mean you don't have to create a news on php.net
so, only update qa.php.net + mail
 
@RemiCollet ok, thanks, I wonder for which release it does apply
Because title "Announcing a non stable release" then "Skip this step for non-stable releases..."
 
cmb
you need to announce all QA releases before first GA (x.y.0), but not after the first GA
 
Ok, I may update the text later
thanks Christoph!
 
@SaifEddinGmati I just remembered that it's not all where the issues come from but also the laminas/laminas-code as it's bound to PHP ~8.0
 
11:52 AM
@brzuchal well, that one is on you i suppose :p
 
There is a ticket and a milestone to release v4.5 failing for last ticket AFAIR
 
 
2 hours later…
1:37 PM
yo
I made a simple template engine
https://pastebin.com/gQT7p1NH
 
If you support a modern version of PHP you can drop most exceptions :)
 
Yes I do support new PHP versions, but I want to keep some backwards compatibility.
Why can I drop exceptions tho? Is it because they're caught by the default error handler?
I create exceptions and store it so I can later display them for debugging
 
You are going all kinds of manual type checks instead if simply letting php's type system handle it automatically
 
1:54 PM
Aaaa yes
Well I'm kinda old school lol, I want to keep some backwards compatibility
Will php type system be mandatory in future versions?
 
No, but not using it will prevent people from looking at you code :)
 
lol
 
It's not like parameter types are that new anyway
At least I thought they came in a later 5.x version, but I might be wrong
Then again, scalars were 7.0 ¯\_(ツ)_/¯
 
2:15 PM
o/ happy friday
 
I just got my booster! Science FTW
 
Did you get the one with free mutant upgrades?
I'm expecting to get invited for mine soon, I assume it'll be Pfizer
 
2:35 PM
Mine was Pfizer
 
2:46 PM
My local pharmacies are out of stock I guess. I'm considering scheduling an appointment out of town
 
@Tiffany PHP 7 was released 6 years ago :O Time flies.
 
@IluTov I know! I started hanging around here around when 7.1 came out, so weird that 7.1 is outdated. XD
And I was on 5.3 back then
 
@Derick In Switzerland they stopped recommending anything but Pfizer. My brother had pericarditis from the Moderna vaccine.
 
I don't know what that condition is :-/
I do now. DuckDuckGo FTW
It's not a common side effect I think though?
 
@Derick It's inflammation of the surrounding tissue of the heart. It's a side effect from Moderna that can occur in young men.
 
2:52 PM
I don't fall in the category of "young men" either any more :-)
Or :-(
 
I saw they'd identified the problem with the AZ vaccine earlier this week, a rare autoimmune response if it leaks into the blood
 
I have my booster scheduled for Sunday. Moderna again for me.
 
@MarkR Ah, I didn't see that. "Neat"
 
bbc.co.uk/news/health-59418123 pretty good scientific detective work
 
I got two AZ and a Pfizer. ... got to catch them all!
 
2:56 PM
I've had two Pfizer and my next will be Pfizer
 
@Derick I'll be the same, they withdraw AZ from my age range 1 day after I had my first, then gave me the second one anyway
 
Again: I don't fall in the category of "young men" either any more :-)
 
I just read the latest newsletter, sorry to hear funding is falling.
 
Slowly... mostly not everybody renews.
Wondering whether I should do a fund raiser for redoing the profiler. But I'm also working on "Secret Project Y"
 
I'll likely be doing the same, I'm aiming to get the company to pay for it instead.
 
3:01 PM
"doing the same" ?
 
@Derick I can chip in some money, could maybe encourage my new employer to do so as well :P
 
@Derick It's relatively rare. My brother also has preexisting health issues. But there's still a risk that from what I've heard is lower with Pfizer.
 
@Derick Not renewing
 
@Tiffany I'd prefer companies funding things, not individuals.
@IluTov Fair enough. Is your brother well now though?
 
@Derick In that regard yes. He has other health issues...
 
3:28 PM
any advices to a programmer to find its first job !?
I'm using php(for 1.5 y) and laravel for 1 year now
 
Have a GitHub with some projects you are proud of and don't focus on just Laravel
 
I'm working on a forum website for more than 6 months (no zero days)
I feel kind of confused
whether continue or learn other tech
 
Pray
jk
 
among the following tech; which one should I go for and give it my time :
- master git
- API
- TESTING
- Learn javascript framework
 
testing
git
 
3:34 PM
@SalOrozco It is pretty tough to find my first job without segree isn't it !? any tips to keep motivated and learn techs the right way
 
Find an intership
That can turn into a fulltime job.
Findsomeone in here that will mentor you.
That can save you many years of frustrations.
Contribute to PHP
that can look good on your resume.
 
Yeah here in morocco we don't have internships
I think you mean ONLine ones as well right
 
Remote
We are based in California. I have looked at Latin America, India for talent.
 
Ahh okey, thanks fro your advices
 
Most important of all learn the skills to communicate properly.
You never know you might make a friend that is in a high place somewhere. That can get you in somewhere.
 
3:43 PM
Yeah I'm working on my soft skills everyday
and always try to communicate properly, that's a good point thanks you
 
4:04 PM
 
Note to self: Ask @bwoebi about implementing async/await when the time comes.
 
@Trowski haha why :-D
 
From the looks of it, you'll do it in a tenth the time it would take me to figure it out.
 
@bwoebi What is the <ident> in a line such as github.com/bwoebi/php-src/commit/… for?
 
@Derick it then stores the string representation of the token along with it on parser side
 
4:09 PM
ah, ok
 
@SalOrozco :D
(this worked out for me recently)
 
@Tiffany yeah, I was thinking of you when I wrote that.
 
JRL
4:45 PM
@bwoebi wow, that's amazing. :) thanks! i'll include this. now that you did the hard part it pointed out the areas I'd need to look at, so I think I could make updates if necessary.
do you want to add yourself to the RFC as an author?
 
@JRL feel free to add a small note to thank, but I'm not authoring your RFC :-)
 
JRL
haha, fair enough
overall, im very happy with this RFC at this point. still have some JIT stuff that isn't exactly correct, but it's by far the most serious, comprehensive attempt so far, and it's obvious from the patch and the way it has been done that it isn't a half-assed attempt to push through the feature without thinking about implementation
which is something i wanted to come through in the RFC
what should i list the name as? just bwoebi?
 
@JRL Bob
 
JRL
5:34 PM
well @Danack that also means that i'll need to update the RFC, since it won't be based on magic methods anymore
 
@JRL see how it goes.....although that is definitely cuter, quite a good chance that people will have a negative gut reaction to it.
btw, do you have a good example of a non-commutative operator where using it like:
$result = 1 / $some_object;
is a sensible thing to do.
I was thinking of complex numbers....but that's kind of complicated for an example snippet of code.
 
JRL
you mean an operator that isn't commutative where the commutativity affects its interaction with scalars?
 
yes, probably. or to put it another way, an example where what happens inside the function depends on whether $left is true or false.
 
JRL
most of the good examples of that involve two objects
but it would probably be matrix multiplication
where it can accept a multi-dimensional array as a "matrix"
so $result = [1, 0, 1] * $matrix
since rows of matrix A needs to equal columns of matrix B
also regarding people having a negative gut reaction to it, that's totally possible, but this is the more maintainable way to handle it that will have the least impact on other things and have the fewest limitations in the future.
 
JRL
5:57 PM
it appears that the parser changes failed the show_echo_as_identifier.phpt test @bwoebi
 
6:20 PM
@JRL Ah right.
@JRL force pushed a fix on my branch
 
@JRL possibly a different starting point: github.com/Danack/RfcOperatorOverloads/blob/master/rfc_words.md
though obviously now out of date vs implementation.
 
JRL
6:38 PM
ah, i see what you were aiming for now as far as changes to the RFC
basically, there's a lot of effort in the RFC to try and present all my research and educate everyone on the domain itself, but that probably doens't belong in the RFC, it belongs in the mailing list thread and in a references link section
 
yeah.....and the problem with trying to educate people (at least on a project where most people are volunteering their time, rather than being paid to read docs in full) is that most people will skim read anything that's difficult.
So setting up why some problem needs to be solved, and why this particular solution is the right one, needs to be done in a way where each bit is simple and sounds correct.
 
JRL
tbf, i did have a lot of fun in the initial conversations linking the RFC, having someone make an objection, and then replying "the RFC I linked explains why that's wrong in section X". so a different object is raised. "the RFC i linked explains why that's wrong in section Y".
"fun"
 
"RTFM or GTFO"
Personally I absorb documentation by printing it off, putting it in a food blender along with water, then laying in a bathtub with it hoping to absorb it via osmosis from higher concentrations of knowledge into myself.
3
 
lol
Comment of the year maybe.
 
JRL
@bwoebi i presume from looking at the parser that the operator keyword actually respects things such as public or private, as well as modifiers like static? I think they would be meaningless in this context, because you can't actually call the method on the object (the parser will choke on the call).
and the public vs private also wouldn't matter except for inheritance, because the function is called directly from the ce without checking those flags
 
6:53 PM
@JRL yes. It may make sense to only allow T_ABSTRACT here
and force operators to be always public
 
JRL
that would involve separating operator from function in the attributed class statements, wouldn't it?
 
@JRL not sure what you mean here?
 
JRL
ohhhh. i was reading the code wrong. i didn't see at a glance that line 933 of zend_language_parser.y actually was separated into a different condition block
so i can change the modifiers independently from method signatures
 
@JRL one thing I should mention also......if you find that people are reading an RFC and then assuming wrong things about it, just adding a new section to correct them doesn't usually work......instead you have to go back, figure out how they reached that wrong belief, and then rework the text to lead them down the correct path instead.
/probably clear as mud.
 
JRL
no @Danack that's a point I usually harp on. generally, the person trying to convey information is responsible for presenting it in a way where it can be received, because the other party doesn't have a motivation to make effort to understand you. you're the one trying to convey information.
 
6:58 PM
@JRL if you want to yes, though it may make sense to catch that in compiler.
 
> PHP is expecting this to be arm64 (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')). ...... MacOS with ARM64 CPU.
 
I.e. check whether the flags mask does not match ~(public | abstract) for operators
 
Apple silicon is named as ARM64 ?
 
JRL
@bwoebi why would that be preferrable?
 
@JRL to give a more specific error message like "must always be public" or such, rather than telling the user unexpected T_STATIC or such
 
JRL
7:00 PM
ahhhh, that's a really good point
well many thanks to both of you for the assistance in improving this :)
 
@Danack yes
 
cool.
 
7:26 PM
@Danack it's coming together :D php-standard-library.github.io/#/components/channel ( documented 5 components out of 39 so far lol )
 
7:51 PM
@IluTov 7 years ago?!?! !!!!!! I'm having an existential crisis X_x
 
JRL
8:34 PM
Would you like on the list of authors @Danack for the work on the RFC document? Or just the "Help From" section.
 
9:22 PM
@JRL nah, for various reasons, not listing me is fine.
 
JRL
heh, the rats are abandoning ship!
you don't think a 'use cases' section would be helpful?
 
@JRL probably not as a section....but distributed as the example classes used to clarify the details. e.g. the "When to use $left" section could have the matrix example.
@SaifEddinGmati cool .....btw 'reciver' though....
 
huh, just noticed :D thank you
 
JRL
do you not want your name on it at all, or just not in the authors section?
 
not on it at all.......none of the credit, none of the blame, and free of constraint.
 
JRL
9:32 PM
gotcha
 
I will ping @crell though, just in case he's also re-drafting it: chat.stackoverflow.com/transcript/message/53579993#53579993
 
vibrates
 
Who's this Glash Gnome person on the docs list?
 
9:49 PM
@Danack Looks quite reasonable. I can run with that. Although converting from Markdown to docukwiki is going to make me cry. :-(
 
@Crell I'd recommend forking it and editing it in markdown..........because yes.
 
I also still need to resync it with whatever @JRL has done with the code recently.
It's going to have to become Docuwiki at some point to become an RFC again.
 
JRL
im doing the straight copy right now
 
(Can someone get sponsored by the Foundation to replace Docuwiki with something created this century? Please?)
 
JRL
the it can be tidied, improved, etc.
 
9:51 PM
@Crell 🤔
 
cmb
10:02 PM
@Tiffany I think the same as github.com/SVGAnimate.
 
Bueno!
 
cmb
@Crell Generally keeping DokuWiki seems okay (for now), but the RFCs need to be moved to a suitable platform. That's a total mess, and it gets worse with every new RFC.
 
Sometime this weekend, I hope, I will go through the tests in the branch and see if any updates are needed.
 
JRL
i need many more tests
i've been focusing on resolving existing tests before i add more new ones
and i still have a few JIT related ones failing because I basically stumbled my way through the assembly
 
10:11 PM
You're still braver than I...
 
JRL
closest i've come to writing assembly is writing MIPS programs for integrated circuits in the video game stationeers
though bwoebi was kind enough to update all my existing tests when the changes were made to the parser
which are all currently passing
 
cmb
@SaifEddinGmati, not an immediate solution for ProxyManager, but in the long run, all internal functions should get rid of UNKNOWN defaults.
 
@bwoebi Your amp socket transfer code is sexy.
in a doctor who tardis kinda way
 
10:30 PM
@cmb 🤞
 
JRL
besides declarign the operator static or protected/private, i can't think of any other function flags that would be disallowed
 
10:52 PM
@bwoebi I reused the server socket transfer code you wrote some years ago to transfer client processes too. Glad you wrote that, because otherwise I'd have assumed that was impossible in PHP.
 
@Tiffany I believe he's what we'd call a bit of a wanker...
 
11:06 PM
@Trowski heh, believe me, it was a lot of man page browsing and php-src source reading involved to understand it…
 
@bwoebi After seeing the code, and reading the sendmsg docs a bit, and looking at php-src, I'm still not fully understanding how that works.
My naïve interpretation is sendmsg is sending a fd number and some flags. PHP's version is doing some magic to unwrap the stream resource to the FD before sending.
 
@Trowski sort of, yes.
 
Is there something I can do to not need to hold onto a reference to the socket in the parent? Seems otherwise PHP is fclosing it automatically.
 
@Trowski I don't think so. short of using ffi though
 
That sounds harder than it's worth. I have a messing system set up between parent and child, so I'm just passing a close message back to the parent to release the reference.
@bwoebi Any edge case issues I should be aware of doing the socket transfer?
 
11:22 PM
@JRL you know I'm going to prefer the words I wrote, ......right?
 
JRL
yep, though i didn't change much
 
@Trowski Not that I'm aware off my head
 
@bwoebi Cool. It's worked quite well thus far.
 
cmb
TIL: beware of get_resources().
 
That feels like it needs some context :p
 
11:32 PM
@JRL @Danack Don't worry, I can change it more as needed. :-)
 
@cmb what....
@MarkR feels like it needs to be removed :p
 
cmb
@MarkR I better not get into details in a public chat. :)
 
Random thought: We've put so much extra tooling around null lately that it almost starts to feel like a dscount-bin Result from Rust. It's not, but it feels kinda close.
 
@Crell You mean other than the giant hole that is generics? :P
 
That thing. :-)
I guess I'm more thinking of Rust's try! macro.
I'm doing stuff like this a lot, and I kinda like it, despite it being built on nulls, which I traditionally hate:
return $this->getOverrideMapFor($field->phpType)
            ?? $field->typeMap
            ?? $this->typeMapForClass($field->phpType);
 
11:40 PM
I really want a primative for undefined =\ it keeps giving me a rough time, null is just so universal a concept
or some other scalar
 
If we can get ADTs, we have a result type, ish, even without generics. Just not as cool as generic.
 
It would be possible to implement it in user-land, but honestly, types that require generics, shouldn't make it into PHP without generics ( e.g: Result, Option, Either ), unless it's not possible to implement them in user land.
 
I am still curious why generics would be impossible to implement by essentially just sticking an optional flag on a class and then materializing extra assertion checks into various places. I'm assuming it's more complicated than I make it sound or Nikita would have done it already. :-)
 
Nikita did it already: github.com/nikic/php-src/pull/3 there's some notes here about what the issues are: github.com/PHPGenerics/php-generics-rfc/issues/45
 
Hm, not quite what I was describing, but does highlight other issues that would make it more complex.
 
11:54 PM
IMO we (internals) should consider allowing the syntax and then just ignoring it
 
That's been suggested numerous times.
 
Many times by me :p
 
And others. :-)
 
that still means we shouldn't have generic types in core.
 
No we definitely do want them in core, but if Nikita couldn't make it work in the time he was willing to give it, then it would probably take someone else years
In the team time, 90% of docblocks can be removed if we could add them directly into code
 
11:56 PM
i want them too, but we shouldn't.

If we get Either in core, without generics, later when generics hopefully lands, i guarantee that type will never be migrated to use generics.

same issue if we get syntax only
 
@Crell This would be easier as markdown on github, until there's fewer large changes happening...
imo, i) The first paragraph only confuses people, and doesn't setup the rest of the text at all. The RFC is stronger without it.

ii) The Permissions example is probably bad there....it's a bit too much code that's too hard to read, and people are going to legitmately object to that as a use case.

iii) The 'Use Cases' section should be moved to FAQ, as it breaks up the flow, and people might object to some of the use cases.
 
@SaifEddinGmati I would agree about a mixed/untyped Either, but if it's using an elided syntax, why would making the syntax non-elided later be a problem?
@Danack Hm, wait, did @JRL just move your version to the wiki or no? I thought that's what he implied before.
 
class A { public function foo(): void { ... } }
class B { public function foo(): void { ... } }

/**
* @return Option<A>
*/
function foo(): Option {
return Some(new B()); // works at runtime.
}

$foo = foo();
$a = $foo->unwarp();
$a->foo(); // works, $a is actually B and B::foo() exists as well.
 

« first day (4066 days earlier)      last day (865 days later) »