« first day (3881 days earlier)      last day (1067 days later) » 
00:00 - 18:0018:00 - 00:00

12:04 AM
> Open Issues
> None.
 
Everything is perfect and there is nothing else to do.
 
@Derick Wait tomorrow? But that's Tuesday... I'm confused now
 
12:19 AM
@Crell Concerning point 1: Agreed. Going to update both the pull request and the RFC accordingly.. I can't see any updates to github.com/php/php-src/pull/6246 after that date. Am I missing them, or were they just not done? /cc @NunoMaduro
 
12:36 AM
@Danack The improvements - suggested by Nikita - are indeed not yet in the patch provided by the RFC. Not sure if that should be "blocking" on moving the RFC into votes, as those improvements have no functional impact on user code.
You'll have way more experience than me in RFC processes - still learning here to be honest. Maybe in RFC needs to always be followed by a complete - and fully ready - pull request.
 
That seems to vary widely, in my experience. Officially it's not required that there even be an implementation, but I've never seen an RFC get close to passing without one. But, for instance, there was a ton of work done on the Enums patch after it passed before it actually got merged. Most of it over my head. I don't think there's any common standard about "how good enough" the implementation has to be before it's safe to vote on it.
 
Thank you for explaining, Crell.
 
RFCs have failed for "I like the idea but not the implementation" before. Sometimes they come back later and pass, sometimes not.
 
1:29 AM
To some extent it depends on whether the stuff is going have any effect in userland or not, and whether people are reasonably confident of being able to address them.
3 hours ago, by bwoebi
@NunoMaduro As Joe wrote, changing what's captured may have subtle side effects on the lifetimes of the closure capture variables, if they outlive their captured variables.
That sounds quite a subtle problem, both in the sense of possibly not being easily solvable, and involves tradeoffs in how it exactly will work, and not everyone is likely to agree which tradeoffs are best.
For stuff like Fibres that had a lot of work done after the vote, my understanding is that a large chunk of that was "Fibres shouldn't cause memory leaks or segfault", and there's less likely to be disagreement there...
 
Well actually...
 
but never zero of course.
But really, if nothing else, the "open issues" bit should have been updated, as if you say you're going to address a problem, it either needs to be addressed, or people need to be aware of exactly what they're voting on.
 
1:44 AM
@NunoMaduro I'm afk for the night. Let me know if you want me to fiddle with anything, although generally you can't edit an RFC during voting. (Pulling and restarting the vote is sometimes allowed.)
 
I (ab)use functions with a metric ton of use args more than most, but I've become more hessitant comparing the idea to JS which has its superior scoping rules
 
2:30 AM
Approximately an hour until my cats murder me for missing feeding them a few times X_X it was nice knowing you all
(and possibly for smelling like Sara's kitty and doggy)
 
2:46 AM
meh, after 4 hours my body told me enough sleep
 
Uh oh... @Tiffany is reporting me for accidentally kidnapping her.
 
@Sara if kitty customs knew how to travel XD
@beberlei hopefully you don't crash the next day
(mental crash, that is)
 
@Tiffany If I read the schedule right, you should be nearly into your home station. About half an hour out?
 
3:01 AM
Little bit less than that, maybe 10-15, possibly 20
 
@Tiffany pretty much can guarantee that this day will be wasted in terms of work effort, i was going to record a talk for symfony world. i will spare the world falling asleep while presenting
 
@Sara Actually was less than five minutes, in car now, it has had a fresh car wash
 
3:20 AM
@beberlei will you be able to nap to supplement maybe?
I'm now home, cats are acquiesced, I'm crashing
 
@Tiffany probably :)
good the cats haven eaten your face or something ;)
you made them sound like they could do anything
 
3:37 AM
XD they vocalize to me when they're unhappy (meowing very loudly to me or each other... I feel bad for my neighbors...) (they also have me trained well...)
 
 
1 hour later…
4:45 AM
@Danack Why would you want to build something nobody needs and will probably never use? I was trying to make a suggestion so that PHP can stay competitive in the Market. Right now Python is skyrocketing because it's focusing on Big Data & AI/ML while PHP is still stuck in the Web world. I'm sorry, but the web is declining, Big Data & AI/ML are the future.
... and by "Market", I mean the Job Market. There are literally 100 to 1000 times more python jobs than PHP jobs which means less & less people & companies are going to use PHP... at this rate (although it's been a few months since I've done serious research).
 
@Derick are you able to reboot news server or otherwise help it along, or is it someone else ?
 
5:24 AM
@ideaguy3d not sure where you get those numbers, but PHP jobs vastly outnumber python jobs almost everywhere in the world
 
@cmb the originality of the php dev team never fails :')
 
 
1 hour later…
6:57 AM
@MarkR I'd be interested in having autoload_set_classmap, and would vote in favor
 
7:34 AM
@Crell Short functions vote missing an announcement?
 
8 hours ago, by Nuno Maduro
Apparently Crell already have sent those emails, but they seem "stuck".
 
the news server doesn't appear to be working,who manages it @NikiC ?
"manages"
 
@Girgias No, Monday - the 7th :-)
@JoeWatkins I can try...
@JoeWatkins what's wrong with it though? news.php.net feels snappy enough
 
Allegedly emails are not getting delivered
 
isn't news.php.net read only?
 
7:40 AM
@Derick I think by "news" Joe means "whatever handles the mailing list"
 
I haven't had anything for a while, not sure what server is broken, but something seems to be
yeah that
 
.... that's not news.php.net
which only does news://news.php.net and news.php.net
 
then where does ezmlm run?
 
I thought it had an L in the name ^, I dunno what it's called, but no noise is happening
 
@bwoebi not on news ;-)
on smtp4, the log is full of:
Jun 1 00:44:36 php-smtp4 postfix/smtpd[20356]: connect from svn2.php.net[91.199.167.250]
Jun 1 00:44:36 php-smtp4 postfix/smtpd[20356]: NOQUEUE: reject: RCPT from svn2.php.net[91.199.167.250]: 554 5.7.1 <root@svn.php.net>: Relay access denied; from=<root@svn.php.net> to=<root@svn.php.net> proto=SMTP helo=<svn.php.net>
Jun 1 00:44:36 php-smtp4 postfix/smtpd[20356]: disconnect from svn2.php.net[91.199.167.250] helo=1 mail=1 rcpt=0/1 quit=1 commands=3/4
didn't we turn svn off yet?
i can't access svn though
 
7:47 AM
@Derick No, it's only readonly
Why does svn even want something with smtp?
 
it is still trying to send email, a lot
 
@Derick At what rate?
 
1 a second, at least
it's the same thing over and over again
 
huh
@Derick svn2?
 
The lists also run on news. = who knew, but it's qmail and I don't know how to read the logs
@NikiC The error messages mentions svn2 and svn, so... I don't know
@JoeWatkins I give up on this, too much magic - email systems@ and cc sascha ?
 
7:56 AM
Well, the plentiful examples in the short functions RFC have done a really good job of convincing me what a terrible idea this is.
 
:-)
 
@NikiC half of the examples are just too long
 
I do like the auto-capturing ones though.
 
But in general I like the feature very much in C# and would like to see it in PHP. Just because the RFC does a bad job at it, the feature itself isn't bad @NikiC
 
I find it adding too little
 
8:00 AM
Small, but neat? :-D
 
I don't really understand the idea that because there are a number of possible combinations to declare a function, we should have all of them ... I don't want 8 ways to declare a function
 
no, it's just some syntactic sugar and no real new functionality.
 
I still hold that the main problem here is the intellectually challenged PSR-2 style guide.
 
@NikiC even though func() { return 1; } works as an one liner, I'll take func() => 1; over it ā€¦ but okay.
 
@bwoebi Well, given that these examples were put in an RFC, I kinda expect that we'll see code like this in the wild as well
 
8:04 AM
@Derick huh, but you find multi-statement auto capturing closures worthy of a vote in favour ... it's literally syntactic sugar, it's a parser modification that extends the use of arrow functions beyond reasonable ... but whatever ...
 
Like I can see how function getFoo() => $this->foo; is okay, but those match examples ... ugh
@JoeWatkins It doesn't enable anything fundamentally new, but it does have certain benefits at least
 
they'll do what's in the rfc, and worse besides if they can think of it ... because we support this thing, why should they not ... it won't only be a rarity in the wild it will be common place ...
 
@JoeWatkins IMO it allows for auto-capture with more a more complicated body. It doesn't use the => at all.
 
Though I need to re-read it, not sure what went to vote
 
@NikiC It didn't change since I spoke to @Crell and @NunoMaduro about it, much.
 
8:08 AM
I'm not saying I don't like the idea of auto capture, but not this way
 
Anyone used autotools to setup new PHP project from template using .in files to create and substitute files like composer.json, Makefile, some phpunit, php_codesniffer, psalm etc. XML config files etc. ?
 
the reasons short arrow functions are short still hold, the capturing being used is suitable for that, can't lead to much surprise, extending beyond one statement without at least finding out how we may improve capturing makes no sense ... the vote is extremely premature ...
 
@Derick Which means that the feedback I gave was completely ignored, meh
 
@NikiC what was that feedback?
 
8:12 AM
that's what I said, and was told it wasn't ignored and that it doesn't matter
 
You're advocating for adding references support in your first point? :-þ And the second one is I think fair (and was ignored)
 
8:27 AM
TBH I did not expect any actual change to the capture algorithm, but I did expect that the RFC would at least discuss the issue and explicitly allow a future change.
 
> Additionally, it is quite possible that the auto-capture logic could be improved to be smarter about what variables to capture and which not to. Such an optimization can be done at any time as it has no functional impact on user code.
the RFC says, but it's wrong in stating no functional impacts
 
morning šŸ‘‹šŸ»
 
/me breaks silence
 
Well, itā€™s loud and clear that in order to this RFC have some sort of consensus here, the patch needs to ideally contain all the required changes upfront. That was not clear for me at first.
 
8:43 AM
@JoeWatkins IMHO partials really need to support __call etc. Otherwise it's not usable as a generic feature
 
acknowledging the problem in the RFC will go a long way to pleasing some people, not me personally, but nikita just said he doesn't expect this patch to change the aglorithm ... what I want is to know that this has been looked at properly, that what has been found is documented in the rfc, and ever the optimist I hope that work may lead to something we may use that makes the problem just a little less worse ...
@NikiC okay, I'll go back and think again ... what do we do about argument names and reflection ? make them up so reflection works, or change reflection so it works ?
 
@JoeWatkins How does it currently work for variadics wrt argument names?
function foo(...$args) and foo(?, ?, ?) what does that produce?
 
Function [ <user> partial function foo ] {
  @@ /opt/src/php-src/compile.php 4 - 4

  - Parameters [1] {
    Parameter #0 [ <required> ...$args ]
  }
}
 
Does foo(?, ?, ?) require three args though? I'm not up to date on the latest version
 
yeah
 
8:49 AM
hm okay that's slightly weird
As the signature makes it look like none are required
 
it's all checked but reflection doesn't know what to do with "three arguments required into a variadic list" ...
 
Me neither :D
 
me neither
still though, I can do this, and then we can look at making reflection show more detail ?
 
Good Morning!
 
@Crell hold on pa please, I need more time it seems ...
\o
 
8:58 AM
@Girgias > As this change drops the T_AMPERSAND token the PHP constant is aliased to T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG to keep existing tooling functioning with this change.
I don't understand what you're referring to there
 
9:16 AM
@Girgias > An intersection I_1&...&I_n is a subtype of J_1&...&J_m if for all J_k, I_l is not a supertype of J_k.
I'm missing some quantifiers here
 
9:31 AM
@Girgias Please do not take it as a revenge for you voting no on my final const RFC, but I think i'll also vote no for intersection types :D
 
@Girgias I would suggest to split up this rule into two: A is a subtype of B_1&...&B_n if for all B_i, A is a subtype of B_i and A_1&...&A_n is a subtype of B if there exists an A_i such that A_i is a subtype of B. Assuming I got those right...
 
9:47 AM
@Girgias > Only class types (interfaces and class names) are supported by intersection types, this is because it is impossible for a value to be 2 different standard types at the same time.
This is a reasonable decision, but the reasoning for it is wrong, and I think this deserves some more explicit discussion in the RFC
Examples of types that could be valid are callable&string, mixed&T and iterable&Countable.
Valid as in non-vacuous
Of course, int&string could also be valid and equivalent to never
I don't think it makes sense to support any of that, but the RFC should be more explicit about it
 
 
2 hours later…
11:59 AM
@Derick Okay good lol
@MateKocsis There are more reasons to vote against Pure intersection types than yours so that's totally fine
@NikiC Probably shouldn't add sentences in a hush hush manner, but what I mean by it that the T_AMPERSAND doesn't exist anymore with the current parser changes, so I'm aliasing the constant to the new T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG token
@NikiC I need to think about this again, I'm pretty bad at phrasing this
@NikiC Right, will expand on this
 
@Girgias But T_AMPERSAND has never existed?
 
@NikiC Then I'm confused by what Tyson was saying
 
cmb
@Derick, @OndřejMirtes, you may be interested in bugs.php.net/81041; there are different things going on depending on whether Xdebug is loaded, and it's related to PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper
 
12:18 PM
I have so many spams from my @php.net email :(
 
Hi everyone! I'm learning about creating a way to import an .xls file into a database. But I'm afraid that I'm missing something on the array_values and flip as it doesn't work. You can find my code here 3v4l.org/V1LGA. If anyone has any advice, it would be great! Thank you! Have a great day everyone!
 
@Luchiii What does that array_values($_POST) do in there? I mean, why $_POST?
 
12:34 PM
@NikiC you are totally right, could be just array_values(). I use it to convert the array otherwise I can't flip it. But I'm afraid it is not working
 
cmb
12:44 PM
!!debugger
 
Hey folks
Whats good
 
cmb
@Derick, @Sara, a gentle reminder that GAs are supposed to be tagged today (no sec fixes).
 
1:03 PM
so, one e-mail from Nikita has made it to the list, but the vote announcements are still AWOL; did the server eat them? :/
 
@cmb I'll have a look when there is a small reproducible case ;-)
 
cmb
fair enough :)
 
Hello All
need some suggestions regarding active directory checking using php
 
ldap_* functions
 
according to me, the logic is like this
1 . I need to login into AD using ldap
right?
 
1:18 PM
have you googled for an example yet?
 
is there any way I can check the authentication of the user without ldap?
 
@JoeWatkins Mornin'. Holding. I don't want to post it until the mailing list is unb0rked, anyway. :-)
 
@muniya there may be some PHP library somewhere that can facilitate, but I used ldap_* functions in the past
 
cmb
I wouldn't hold my breath ;)
 
@cmb :P
it's been awhile since I worked with a code base that interacted with AD, but IIRC, the PHP code base required an account created in AD that allowed for searching AD DNs/OUs
 
1:22 PM
@Tiffany yes I searched. all of them suggests use ldap
 
@muniya Depending on what you are doing, the adapter pattern would be a very good approach for what you are trying to do
 
@Tiffany thank you :-)
 
also, be sure to make use of php.net/manual/en/function.ldap-error.php and php.net/manual/en/function.ldap-errno.php - these will help you diagnose errors that AD returns
 
thank you
 
1:24 PM
just using a generic error message of your own because you think you understand what happened will end up in a world of troubleshooting pain
 
interface AuthenticationInterface { public function authenticate(string $user, string $secret) }
class LDAPAuth implements AuthentcationInterface{ ... }
class NativeAuth implements AuthenticationInterface{ ... }
 
@ln-s the code base I worked on did it all in the front controller XD
 
if!!!!
:D
I've seen worse
 
like 10-20 lines of ldap functions, I forget I added proper error reporting functionality at one point
 
Doesn't really matters if it's 5 or 100, the idea behind adapters is that you can have a single unit of code which can be injected in different places, so if you want to auth in a console command, sure you can do it
or services for that matter
 
1:27 PM
yeah...
 
:)
 
I've shown you the method that used eval, right?
 
lol no
 
eval with $_POST or $_GET for MAXIMUM security!
damn
 
1:28 PM
mind you, there were several cases of eval... I think I managed to purge them out
 
I used to work at a place were they sent classes as get parameters and then went on serializing
What could go wrong!
It's great
 
no dynamically write code to a file and include it, eval is bad everyone knows that
 
serialize is as bad but not too many people notice it
 
@ln-s I was very much a junior programmer at the time, trying to refactor that code base to work on PHP 7.x (it worked on 5.3), and it was way over my head. A lot of stuff seemed like magic, and there were way too many static methods... almost every method was static.
 
been there too
In my case classes were used as some sort of namespace or code unit instead of a template to create objects
if everything is static just go with namespaces and regular functions, I'd accept that
 
@ln-s depending on the age of the code base, that's perfectly reasonable; don't forget that PHP didn't have namespaces until 5.3, but had classes since 3.0 (not sure if they had static methods straight away, but certainly 4.x did)
 
(oh? I thought classes were a PHP 4 concept)
 
Classes were added in PHP 4. Classes were rewritten to not suck in PHP 5. Sara told me over the weekend that they very tail end of PHP 3 had the first vestiges of experimental classes, but it was undocumented so no one but Andi and Zeev knew about it.
 
nope, classes are definitely pre-4.0
here's the readme for PHP 3:
	Classes and inheritance are supported to a limited extent in PHP 3.0.
	Here's how to declare a simple class:

		class simple_class {
			var $property1,$property2;
			var $property3=5;

			function display() {
				printf("p1=%d, p2=%d, p3=%d\n",
					$this->property1,
					$this->property2,
					$this->property3);
			}
			function init($p1,$p2) {
				$this->property1 = $p1;
				$this->property2 = $p2;
			}
		};
 
where can I read up on string lookup tables?
is that something available in the internals book?
 
1:49 PM
lolz: "As with expressions, it's impossible to teach OOP in a few lines, and
personally I'm unclear as to how useful this would be in day to day
scripting. If you like this, play with this until you figure it out :)"
 
@Crell It doesn't seem to be borked (anymore?)
 
@NikiC I've not gotten any email there since the 30th, but I know there's at least 2 messages from me and one from someone else that should be there.
 
externals.io has two recent mails
From me and from Tyson
So it seems to work fine
 
Wha?
 
yeah, I received those two, as well
 
1:52 PM
Fine as in "works for me" :P
 
Then we'll ship your machine. :-)
I've not gotten message from either of you yet.
 
pretty sure my inbox matches up with news-web.php.net/php.internals
maybe the server just doesn't like you any more :P
 
@NikiC amended the RFC on GitHub, does this look good to you now? github.com/Girgias/intersection-types (dropped the T_AMPERSAND thing too)
 
> Using self, static, or parent is also forbidden in an intersection type as these correspond to concrete classes.
I don't get that part
 
Well, self&T is useless because self is concrete, same with parent you can't add an interface to it, and I extend that to static, but I don't really know how to formulate it
 
1:59 PM
@Crell Looking.
Did all the examples get put into tests?
 
Not yet; Joe changed his mind and said not to.
 
> Over many years there have been numerous requests/incomplete proposals for partial function application in PHP. Many of these ideas have been radically divergent with little consensus on scope or purpose, and typically lack a sample implementation. Nonetheless, the concept of partial application is highly powerful, and PHP would benefit from a native syntax for supporting it.
I would delete this whole paragraph.
 
@Girgias Well, technically self&A could either be redundant if self is subtype of A, or it could require that a subtype of self that implements A is required
It doesn't seem particularly useful, but at least in principle it would produce a valid type
 
> In order to better understand the terminology in this document and the feature being proposed here we need to lay some groundwork. We intend to use the verb ā€œapplicationā€ in a very specific context for PHP.
 
Does allowing these types carry an implementation cost? I'd assume for static it does, and not the other ones?
 
2:03 PM
I edited this to use "verb" instead of "word" -- for whatever reason I first thought of the noun version, and was confused ^_^
But still, it's quite wordy and should be cut down. I sense a theme through the doc this way.
 
hmm, I wonder a bit how well thought-through the Stringable RFC is. Class names in PHP are case-insensitive, so stringable is taken by it, too.
 
@Crell Did you run them, at least?
 
The naming appears suspect to me for another reason, it is more a ToStringHaving or ToStringCastAble.
 
@LeviMorrison Why verb? Is it really verbed in this case? As for wordiness, most of the first few sections are directly from Joe and he got very cranky at me trying to restate anything. :-)
 
Given it is introduced for forward compatibility, this doesn't look well in my eyes. Perhaps this was driven by the need but the name was considered not in PHP but outside?
Wondering the name could be changed before release.
 
2:11 PM
@hakre "Stringable" was already released in 8.0. It's not changeable at this point.
 
@Crell oh damne. wasn't there an upgrade path consisered (in terms to a stringable pseudo type?
 
what do you mean by "upgrade path"?
 
@hakre The consensus seemed to be that string|Stringable was sufficient and a pseudo-type was unlikely to be included later.
 
And a bit impressed from the partial application RFC, today I played with functions that have no parameters and return string which are also stringable.
sort of a nice pendant what generator functions are for Iterator could these be for (now) Stringable.
 
I'm not a fan of the "Stringable" feature in first place, but pretty much everything in PHP is actually stringable if you just mean "won't error when passed to a string cast"
 
2:16 PM
Stringable is for a rather specific use-case and not intended to be plastered all over your APIs (like iterable). It's not a matter of "replace all your string with Stringable"
 
far too specific, a use case, IMO ¯_(惄)_/¯
 
@IMSoP That may well be
 
"there's this one weird Symfony library that likes to pretend things are strings but aren't, can we add a keyword for it"
2
 
well given I even missed it is in PHP 8.0 already, I was not concerned much about its usability. Perhaps its not even of practical use in its current form.
accepting mixed and casting to string is fine. PHP has useful assertions since PHP 7.0 so not an issue practically. and types can be hinted with comments so expectations can normally be expressed, for that Stringable might be of use then.
 
@hakre even if there is a clash, people can change the name of their class on their current version of PHP, before upgrading.
 
2:20 PM
@IMSoP I didn't know the concrete library, but Symfony was in my nose somehow, don't know why. Maybe because of the RFC author.
@Danack This boat is sailing already as I'm now aware it is in PHP 8.0 already. I might have missed the year of the RFC and thought it's this January.
 
@IMSoP "but pretty much everything in PHP is actually stringable" - yeah, but that's the problem it addresses, as far as I understand it. It allows you to use a static analyser to check that you're only casting objects that are explicitly castable to strings, to strings.
@hakre yeah, but still in general. If you can make your code be ready to upgrade, on the current version of PHP, then that's okay. Problems with upgrading are worse when you can't make your code be ready for upgrading on the current version.
 
@Danack no, I'm mean things like int and float; a string cast is just fine for those, but "stringable" doesn't include them
@hakre we all know the year 2020 didn't exist :P
 
Those are not "just fine" if you're in strict mode. By design.
 
@Crell strict mode is by the caller, so not by design.
 
function foo(stringable $x) {var_dump((string)$x);}
foo(42); // TypeError
foo(new class { function __toString(){return 42;} }); // tHiS Is FiNe
 
2:29 PM
/** @param <define types for stringable here> $s */
function impl($s) { assert($str = (string) $s); $str ??= (string) $s; ...
the assertion just must be warning free for the hinted types, then you can verify just with assertions on and looking for errors.
like every test-suite normally does.
the rest is undefined behaviour.
 
@Girgias I think your RFC would also benefit from some more examples where this is useful
The value proposition is a lot less obvious than for union types
 
2 messages moved to Trash can
 
i've been opressed
 
2:48 PM
@NikiC I haven't even tried, will look into that if it is hard or not, will also try to come up with some good examples
 
@Crell I guess it isn't a verb, urgh. Too sleepy.
 
The only use-case where I'd use intersection types is when a mocked object is stored as a property (we do this at work a lot). E.g.:

private MockObject&LoggerInterface $logger;

But in this case, I'm perfectly happy with union types. So this is exactly my main issue with intersection types that I don't see much benefit of having it.
 
3:12 PM
@Girgias The variance implementation really fries your brain
 
@NikiC It does, and I tried making it as simple as possible
 
The main case I see for intersection types is mixing interfaces without forcing all objects to implement a third combined interface. Eg:

function handleLinkedRequest(RequestInterface&LinkProviderInterface $request) { ... }

That's exactly the example out of the FIG specs that I want to use. :-)
 
@MateKocsis The amount of people who have complained to me that intersection types are way better then union types is rather significant, it's also a different use case for example Traversable&Countable
Or a Traversable&Seekable
 
Because that avoids making a LinkProviderRequestInterface and hoping that every implementer bothers to implement that, too, just for the sake of having it.
 
Moreover, having intersection types could allow us to potentially fix the mess with streams which has implicit interfaces which is utter garbage
 
www.conf file bug 惻 *Web Server problem 惻 #81094
 
Why is X&Y a subtype of X ?
it's a narrower type, surely?
 
That's what subtype means ^^
 
yeah :D
 
I like to picture variance as like a baby's shape sorter: an X&Y shaped thing would fit through a X|Z shaped hole
 
3:26 PM
 
@NikiC Do you know what you're doing with accessors yet? (Derick's podcast reminded me that was still an open question.)
 
cmb
@Derick, no PHP 7.4.20 today? :)
 
@cmb Is it midnight yet?
I do have to do work ... occasionally.
 
cmb
okay, fine :)
 
@NikiC Ah sorry for not responding there, but I agree with the issues you pointed out, and I'll add more tests as well as adapt the implementation ASAP (though I'm a bit slower these days)
 
3:35 PM
@NikiC Erf, okay I've got some work to do on that still, I thought I covered that case >_>
 
@cmb If I email the doc ML now regarding github.com/php/phd/pull/38 will the mail server deliver the messages? :D
 
cmb
roll a dice ;)
 
/shrug
I've still gotten nothing in 2 days, including my own messages. Did anyone else get my emails?
 
cmb
I think news-web.php.net/php.internals is accurate
 
nope, I only got the ones from Nikita and Go Kudo
 
cmb
3:40 PM
and Tyson's?
 
Well poopy.
 
@Crell Maybe you only had a dream about sending them? :P
 
ah yes, his as well
 
@NikiC They're in my Sent box.
 
cmb
well, maybe email systems@ :p
 
3:41 PM
The last 5 times I emailed them nothing happened.
(I still get a reject email every time I delete a comment on docs, rather than a message to the notes list as it should do.)
 
I've just found out there's a mail list for SOAP developers as well :D
 
Jun 1 12:43 +0200 Nikita Popov is my last email, I think
yes
 
wtf...
 
My last email is from Go Kudo, opening a new thread for the Random class.
Tue, 1 Jun 2021 10:28:22 -0400 (EDT)
There's another from tyson andre between the one from Nikita that Derick referenced.
 
He didn't open a new thread, he replied to an old one with a new subject :-/
 
3:56 PM
Segmentation fault in preg_match 惻 PCRE related 惻 #81095
 
it's a new thread as far as mail headers are concerned
 
there were two by him, one was OK, the other was not
i got confused :)
 
How do I know when I should use OBJ_RELEASE vs. GC_DELREF? Seems if I don't assign something to a zval, I need to use OBJ_RELEASE, but if it's ever assigned to a zval then I get an assertion error if I don't use GC_DELREF.
 
cmb
zval_ptr_dtor() instead?
 
I'm holding the object ref within another with a pointer to the zend_object.
Should I be assigning it to a zval instead?
 
4:03 PM
@Trowski You can use GC_DELREF if you know that this is not the last reference (including the last non-cycle reference)
 
@NikiC How can I tell if it's not the last reference?
The parent object may be destroyed before the object it was holding.
I'm writing a Deferred that holds a Promise.
	if (GC_REFCOUNT(&deferred->future->std) == 1) {
		OBJ_RELEASE(&deferred->future->std);
	} else {
		GC_DELREF(&deferred->future->std);
	}
 
@cmb Happy now? ;-)
 
cmb
yes :)
 
make the most of it.
 
4:20 PM
@Trowski if in doubt use OBJ_RELEASE()
no need to distinguish, OBJ_RELEASE() essentially is if(--rc == 0) then release
 
if (GC_DELREF(&deferred->future->std) == 0) {
	OBJ_RELEASE(&deferred->future->std);
}
Results in Assertion failed: (p->refcount > 0), function zend_gc_delref, file /usr/local/include/php/Zend/zend_types.h, line 1187.
 
because obj_release itself reduces the refcount already
do only OBJ_RELEASE()
 
But only if GC_REFCOUNT is 1?
 
always
 
Hmm, then I get Assertion failed: (zval_gc_type((ref)->gc.u.type_info) == 7 || zval_gc_type((ref)->gc.u.type_info) == 8), function gc_possible_root, file /Users/aaron/Developer/php-src/Zend/zend_gc.c, line 646.
 
4:24 PM
@Trowski heap.space/xref/PHP-8.0/Zend/zend_objects_API.h?r=6276dd82#72 look at it - it does the distinction for you
 
Yeah, ok, that seems to make sense, but I've gotten the above assertion error before when attempting to use OBJ_RELEASE, which is why I've probably avoided it.
 
@Trowski that means that somewhere the rc gets decreased where it shouldn't or a ref was not added somewhere
the broken code is likely somewhere else
can be nasty to track down at times, possibly you'll have to set a watchpoint on the rc and observeā€¦
 
@bwoebi I think there's some fundamental thing I'm missing about the GC yet. This is pretty simple: deferred.c. $deferred = new Revolt\Deferred; leaks the internal future.
revolt_create_future is just calling ce->create_object and returning the pointer.
 
...revolt? Please don't use that word right now in the US...
 
4:39 PM
@Crell It evolved from using volt. That didn't really occur to me.
 
Is there a reasonable way to test if a symbol has been defined in a header or not?
 
"segvolt"?
 
cmb
@MateKocsis apparently :)
 
@MateKocsis you might want to make a build with a more recent version of doc-en locally :p
 
4:59 PM
@bwoebi Now I'm really confused, as that assertion isn't coming from freeing the future object, but rather an exception object, but that doesn't occur if I remove the unused deferred object from the script.
So yes, OBJ_RELEASE is what I was looking for, thank you.
But my actual problem is a lot more complicated it seems, lol
I should have learned by now that when I get GC errors, the problem isn't actually anywhere near the code I just wrote :P
@IMSoP Maybe, certainly unique. We're looking for a name for an organization for shared event-loop and promise/future libraries.
 
that's surely crying out for a time travel reference, like "delorean" or something - lots of alternative futures
 
So who is going to work on the Docs? sunglasses
 
groan
I'll say this on the list once you manage to get it to publish the voting announcement, but I think the auto-capture closures RFC underplays how big a change it's making to the language, and doesn't justify it or explore the implications nearly enough
 
5:16 PM
@Crell @NunoMaduro Are either of you going to close the vote on auto-capture until the RFC contains all the relevant info?
 
Right now I can't do much of anything until the mailing list is sorted out. Other than that, I defer to Nuno.
 
oh! I just got the e-mail!
yep, it's on externals as well! externals.io/message/114683
 
Boom! I just got one from Tyson, one from Go Kudo and one from me. 15 min ago.
But not the other one from me opening short-functions.
 
@Crell The wiki is working. Either of you can close the vote, and leave a note about why there.
 
@NunoMaduro?
 
5:23 PM
the Short Functions announcement just arrived as well :)
 
Whelp, I guess the list is back.
Although I don't see the message someone else sent that reminded me of short-functions...
 
cmb
[php-ml] all issues are resolved
 
They're not all resolved until I can delete doc comments without getting spammed with bounce messages. :-)
 
@cmb [tag:]
 
5:42 PM
21 hours ago, by Danack
====================================================================
========= WELCOME TO THE FUTURE: run-tests PARALLEL EDITION =========
anyone happen to know what the minimum version of PHP for which run-tests is parallelisable?
 
I'm not sure, I did some cursory google searches and couldn't find any information on it
Also, on an unrelated note, does anyone know if NumberFormatter can be used to convert numbers to their "nth" form? Like "1" becomes "First", "8" becomes "Eighth", etc
 
@Crell Your certificate date for your website seems to be invalid.
 
cmb
@Tiffany thanks!
@Danack you need run-tests.php of PHP 7.4 or later, but I think that works with older versions (7.2?) as well
 
00:00 - 18:0018:00 - 00:00

« first day (3881 days earlier)      last day (1067 days later) »