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

12:23 AM
@DaveRandom requirements in games are getting higher... and 16 GB isn't enough to run a VM or two and PoE at the same time ... which I sometimes do ... forgetting that the VMs are running and I'm in the middle of something and don't want to shut them off, but I need a break. Also, PoE eats my CPU rather easily >.<
@Sara poor elephpant :( if you're willing to part with that one, I'll take it. And thank you so much. :D
 
@Crell github.com/php/php-src/pull/6489/commits/… The enum keyword should no longer be breaking. Can we update this in the RFC?
 
 
2 hours later…
2:13 AM
> E_STRICT: Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code.
> E_DEPRECATED: Run-time notices. Enable this to receive warnings about code that will not work in future versions.
They are very similar, and I'm personally fine with having both. Deprecated implies outright removal.
Since they are so similar, that's why Nikita argued for just using E_DEPRECATED. Especially since many of the E_STRICT usages needed reclassified anyway.
 
 
2 hours later…
4:06 AM
@NikiC Once again I'm wanting the already interned lcname of a method to be stored on the op_array. It could speed up every extension that does symbol matching (xdebug, APM products, etc). Is the size of an op_array particularly sensitive?
I'm guessing it is at least somewhat sensitive, unfortunately.
Actually, maybe not -- there are still 6 reserved resources that often go unused.
Could we at least store the interned name as the function name when its already lc'd?
I'm going to guess opcache ruins my dreams, here.
I just spend so much time lowercasing and hashing for doing lookups on symbols; would be really nice if the engine made that bit nicer for me.
 
4:47 AM
Are there any string flags left? Can we possibly mark ones that are already lowercased?
It wouldn't help at all for objects where the convention is UpperCamelCase, but would for methods where quite a few are lowercased already by convention as long as they are a single word.
 
5:08 AM
@Tiffany Happy to send it to a good home! Did you send me an address yet?
 
 
4 hours later…
9:25 AM
@LeviMorrison I'd be fine with storing the lcname
But well, you might want to ask dmitry, he's more sensitive to those extra bytes :D
 
10:16 AM
@Girgias The resource to object migration tracker includes le_ppdo, but it is not exposed to users, is it?
and the same question applies for le_pmysqli
 
 
1 hour later…
11:38 AM
Remove examples from comments as they are invariably insecure ・ OpenSSL related ・ #80843
 
12:32 PM
@MateKocsis NGL I haven't thought about resource to object migrations, but those are the persistant resources right?
 
@Girgias yes, they are.
 
They are exposed to users if they use a persistant flag, but it's just another instance of a singletone in some sense
 
ohh, I haven' known that. :S I'll take a look, but I've just realized that SOAP uses a bunch of dynamic properties. :(
 
If you want more funzies IMAP returns some stdObject for some functions, and the properties are case insensitive :D
which made me not want to work on that anymore
 
 
2 hours later…
2:51 PM
@IluTov Bad link?
Is it legal to update an RFC after the fact like that?
 
@Sara I tried looking around mastodon to see how to DM, but nothing obvious stuck out. I need to troubleshoot it today.
 
3:09 PM
@Tiffany No rush, but here's the HOWTO: Click my user name, then click the three vertical dots next to the Follow/Unfollow button, and it'll be in that drop down.
@Crell Discouraged, but the RFC process is meant to provide guiderails to build consensus, not prevent necessary things from getting done. ANYTHING in the process space is negotiable in the moment if it's getting in the way.
 
@Sara So would you say "change the reserved words section because we managed to make a word not-reserved after the fact" is a negotiably safe change?
 
3:33 PM
I'm missing a ton of context, but... yeah probably. I would say a quick email to the list saying you're going to do it (or have just done) would be prudent though.
 
Nikita already had a thread earlier. He figured out a way to allow "enum Suit { ...}" without making "enum" a fully reserved word that conflicts with class names, which would be good for BC. Sounds like he and Ilija already implemented that trick.
It's just updating the RFC to NOT say "enum is now a reserved word" and instead say "Nikita is smart so enum is not a reserved word, but we may make it one in the future."
 
That should actually be 100% fine.
You're clawing back a restriction that was previously there, but deemed unnecessary during implementation.
 
Cool, just making sure.
 
People are free to assume the word is still reserved and avoid it.
((which, ftr, they should))
 
Agreed, but at least it doesn't mean a hard-break for all of those existing libraries with classes named "Enum".
 
3:37 PM
Now, in compensation for this boon I have granted, you should volunteer to RM the 8.1 release.
@Crell Exactly. The change you're making to the RFC is only a good thing here.
Maybe for 100% transparency, note that this change was made post-voting? Probably unnecessary, but nobody can accuse you of being sneeky.
 
Roger.
 
Woah. I just looked at Niki's workaround and.... I don't like it.
 
I even left the old sentence in there with <del> tags so people can see it.
 
If we made the syntax be enum class Foo {...} then we could be a little less ambiguous with the syntax, but even that feels sketchy af.
Not that string string is ambiguous NOW (as noted), but I worry a lot that we'll fuck ourselves later with this.
Maybe it's time to make a properly context sensitive scanner/parser.
Maybe it's time to also make that stack executor I've been thinking about....
Maybe.... I should admit that I'm not going to put in all that work and that niki's hack is good enough and i'll be overhereinthecornerrockingbackandforth
 
er, under what circumstances does array_diff give a "Array to string conversion" warning?
 
3:49 PM
@Danack Nested arrays?
As it tries to compare the value as a string so the array gets converted to string?
 
That makes sense...but doesn't that make the function not safe to use?
 
yes it does not make it safe to use
 
(this may actually be the first time me attempting to use it).
 
Would need a recursive version of it
 
@Sara Or maybe we should start actually commenting the code base to explain why that hack is there and that it's OK to remove it in a few versions? :-)
 
3:55 PM
@Crell I rebased, ref is probably gone.
The jist of it is that enum can now be used in namespaces, classes, functions and constants again.
 
Yeah, we figured it out from context. :-) And Sara both said it was OK to update the RFC and she hates the fix but can't be arsed to suggest something better. :-)
 
But comments can no longer be used between the enum keyword and the enum name.
 
@Crell no one's actually going to whine too much, but that kind of thing could be put under 'implementation' which is normally where people look for the details after an RFC is passed.
 
1/ I'm okay with that.
2/ Eh? I thought Niki's workaround was just: T_STRING T_STRING, make sure $1=="enum", and keep going. That shouldn't preclude comments (which are stripped* before they reach the parser anyway). ((modulo doc comments which are oddballs))
Oh.... missed your reply completely.
A conditional lex of T_ENUM (when followed by an indentifier) is MUCH preferable for future compat, and I'm far more willing to take the comment restriction (which now makes sense) as a cost there.
IIRC we have that "no comments here" restriction elsewhere.... In variable-variable parsing?
My brand seems to be long periods of AFK interrupted by having a conversation with myself.
 
@Sara that's what it is. Enum must be followed by an identifier, if it's not it will be lexed as T_STRING.
@Crell The keyword is still there. But it is required to be followed by an identifier.
 
4:07 PM
Feel free to adjust the new paragraph to be more precise. :-) I think it's sufficiently descriptive as is, to my understanding.
 
4:36 PM
Hey, noob question: I'm working on a small PR & RFC. Everything was going swimmingly when I was working on the 8.0 branch, but I rebased onto master and it won't compile on a mac. Specifically make fails after this commit: github.com/php/php-src/commit/… with the error "make: *** No rule to make target <path>/php-src/ext/opcache/Optimizer/zend_optimizer.c', needed by ext/opcache/Optimizer/zend_optimizer.lo'. Stop.
are there some build caches I need to clean?
 
@Sara yield from. Not exactly the same thing since it's one token.
 
@MatthewBrown did you make distclean and ./buildocnf after switching? that both usually does it for me
 
@beberlei I didn't run ./buildconf – that seems to have fixed it, thanks!
 
i don't understand all that build system stuff, so i usually bring the big guns and re-do everything from scratch :D
 
Same.
@beberlei Would you have any bandwidth to collaborate on an attributes-related RFC, by which I mean mentor me in doing it since it's above my skill level as is?
 
4:47 PM
@Crell do you have something concrete in mind? i put my open soruce bandwith on Doctrine ORM at the moment, but that share of time is negotioable based on my own impact radar :D
 
Using attributes for guard clauses on parameters and object properties.
Specifically, I'm thinking an interface for an attribute that lets you hook in validation logic and either fail or just return false (if you want to use it out of band). Then user space can implement whatever logic it wants, and C can do the same, but have some hooks to be potentially faster since it doesn't have to jump back to user space. Details beyond that TBD.
 
@MatthewBrown Are you the same person that emailed me off list, to say something not particularly nice about people who vote in RFCs?
If you are, I recommend not doing that. Stuff should be said on list or not at all.
 
@Danack Not sure what you're referencing, but Matthew is the creator of Psalm, I invited him here, he's always been very friendly. :)
 
@Danack the not-particularly-nice-thing was actually intended for the list, but when I saw the next day I had not hit reply-all I decided that it was actually better off having not been sent
 
Yes.
 
4:55 PM
Full disclosure: it was in response to the enum vote. I said that I thought some people occasionally voted no to a feature that's sure to pass just so they could say "I told you so" when something about that feature is not perfect
 
People are free to vote however they want on RFCs and trying to manipulate people with emotional language leads to people not wanting to interact with whoever said it anymore.
@MatthewBrown So?
 
as I mentioned, I realised that it was better that it had not been sent to the list
 
btw I stand by this.
 
@Danack Yeah, I suspect a few of people might vote differently today. I would agree that many people who vote don't put enough effort into reading the RFC and contributing to the discussion, just to vote no at the end.
 
@Danack having spent a few minutes thinking about the potential jitted version of my PR code, I'm inclined to agree
 
5:02 PM
That's why I think putting pressure on people to not vote how they think is appropriate, even if the vote is going to pass, is a bad thing as being able to say "I told you so" is actually a healthy thing for the project long term.
 
Voting as a signaling mechanism is never going to go away. That's intrinsic in the concept of voting. I just wish people would be more open about what they're signaling. :-)
 
Yeah, it happens in regular politics all the time. But I agree it wasn't helpful to point out
 
@Crell Yeah, especially if the RFC has a feedback poll, a large portion of the voters don't take the five seconds of filling the second form. But optimally, they'd share their concerns before the RFC goes into voting.
 
@Crell was challenged to mario kart by the wife, will reply later :)
 
@beberlei Ha! Good choice. Smash her and let me know later. :-)
 
5:08 PM
That's PHPStorms rendering that markdown....that is horribly wrong, yes?
 
A guys, quick question. I forked an nginx-example repo here github.com/funkytaco/nginx-ex .... how do i include my api bot code in the same repo, but keep it git revisioned? Is the answer a sub module?
 
@Danack Yeah. You can probably avoid the issue with back ticks around the symbol.
 
Here's the bot. It's really just a few JS files github.com/funkytaco/Turntable-Dancible-Bot
 
@taco So do you wanna merge them into 1 repo or keep them separate?
 
I was gonna keep them seperate, but i think it'll be fine in 1 repo. why waste cpu cycles on this, idk
 
5:15 PM
Here's what I'm working on -- porting over noreturn from Hacklang: github.com/php/php-src/compare/master...muglug:support-noreturn – anyone have any big obvious objections that I haven't considered?
 
@taco Do you really need the 12 commits of the nginx repo? Why not just copy the relevant files?
 
lol
 
idk not a dev anymore
 
@MatthewBrown So, long story short, I think a better path would be to add null as a return type, and then it's appropriate to use void as 'noreturn' rather than what people are doing now, of using it as no return value. Which I also stand by.
 
5:20 PM
@MatthewBrown Is noreturn intended to be a bottom type? If so noreturn should probably be usable as covariant return types.
@Danack Void and noreturn are not the same though. No return means the function terminates the program or throws.
@Danack E.g. noreturn is closer to TypeScript's never type.
 
Nov 3 '15 at 15:28, by Danack
@LeviMorrison Good news! There have already been suggestions to change the behaviour of the language to match the void behaviour!
function never_exits(): void {
  while(true) {
  	$result = foo();
  	if ($result) {
      exit(0);
  	}
  }
}

function never_returns(): void {
  throw new Exception("blah");
}


// Both these lines are wrong
$foo = never_exits();
$bar = never_returns();
php functions always return a value. And that is null when there isn't an explicit return statement.
 
They return a value IF THEY RETURN.
 
@Danack But void can also return without terminating. Those are two separate problems. I agree that PHP always returning null is unfortunate. But void would be the wrong solution here.
 
"I agree that PHP always returning null is unfortunate." - No. It's awesome.
 
return here essentially means go back to the caller. noreturn never goes back to the caller. The function will throw or terminate the application, or run infinitely.
 
5:29 PM
8 mins ago, by Danack
@MatthewBrown So, long story short, I think a better path would be to add null as a return type, and then it's appropriate to use void as 'noreturn' rather than what people are doing now, of using it as no return value. Which I also stand by.
 
@Danack noreturn indicates the end of the function will never be reached, i.e., it will always throw or exit.
 
@Trowski that should have been void.
 
@Danack Void is not used that way in other languages though, too confusing IMO.
 
@Danack void universally means return without a value, not never return. Some return a unit value, some don't. But they all return.
 
If we have null and void return types, there is no need for a separate "no return". And we should have null.
 
5:31 PM
(I actually agree that I don't really think noreturn is needed as a type check. But it's not technically exactly the same as void.)
 
@IluTov yup I’ll add that rule!
 
And null in PHP is actually a unit value, so we're not even too far off.
@MatthewBrown Is noreturn not a bottom type in Hack? Why do they also have nothing?
 
@Trowski But PHP isn't other languages. The way that functions always returns a value, is one of the best things about the language, as it eliminates a whole load of undefined behaviour and edge-cases/
 
Assigning the return value of a void function to a value is an error, no?
 
@Crell No.
 
5:32 PM
Huh. I thought it was.
 
@Crell No
Nov 3 '15 at 15:28, by Danack
@LeviMorrison Good news! There have already been suggestions to change the behaviour of the language to match the void behaviour!
 
@Crell Your static analyzer probably yells at you.
 
That's probably what I am remembering.
 
@Trowski and that's an appropriate place for it:
function foo(): void{}
function bar(): null{}

$value1 = foo(); //always error
$value2 = bar(); //not necessarily an error
someFunctionThatTakesAnInt($value2); // Oh, you're using null where int is expected, that's an error.
But someFunctionThatCanAcceptNull($value2); is not an error.
 
Which is a good argument to allow null as a standalone return type.
Particularly if implementing an interface with a nullable return, using null alone can be informative.
 
5:46 PM
@Danack I'd support a null return type (probably along with other literal types) but noreturn is still something completely different than void.
At least in other languages. Changing the meaning for PHP, especially since we already have it, would be way too confusing.
Could could probably make PHP error when you're using the result of a void function in an expression. But I'm not sure that's worthwihle.
Also, there are common cases like every($array, fn($x) => voidFunc($x)); where that's probably not wanted.
 
@Crell your guard use-case to me sounds like an extension and not something for core as you can hook into the right places with an observer extension or with object/property handlers. its not something I can see myself working on to be honest :(
i can give you some pointers what to do though if you want to try
 
Array destructuring for mysqli_result ・ MySQLi related ・ #80844
 
@beberlei Well, Nikita had proposed putting guard routines right on properties. My thinking was the idea was sound and good in core, but attributes would allow it to be out-of-band and thus not conflict with constructor promotion.
 
i don't know about how to hook into property access tbh, never done that myself, only function calls
 
Hrm. That would be the more interesting one.
 
5:59 PM
@Crell I think attributes are great for metadata and user land behavior, but for most internal things I think native syntax is preferable. That said, you can create custom property handers if you want to hook info gettings/setting of properties of a particular class. github.com/iluuu1994/php-src/blob/enums/Zend/…
 
How would you do property guards then in a way that doesn't conflict with constructor promotion? (That's the main thing I'd be interested in. Attributes just seemed like a useful way to do that.)
And there's been plenty of talk of internals-affecting attributes in the future.
 
@Crell I wouldn't. I'd use constructor property promotion only for small immutable classes. I've been using it for constructor DI in services. But if they are mutated or have behavior I'd move them out of the constructor.
 
I see it more for evolvable objects. The ability to enforce extra rules on a property was one of the gaps i found in the clone-with/asymmetric-visibility analysis I did.
 
@Crell just saying that this can be done without having to change core, so it would need some place in ext/ anyways and you can build this without relying on core, an RFC and whatnot first. :)
 
6:13 PM
just reading (some of) the discussion about void vs noreturn, and might I suggest not calling it that; currently, the one thing that void does is stop you returning things, so that confusion isn't going to go away
never is clearer, IMHO: "What does this return? It never does!"
 
6:38 PM
@beberlei It may be possible, but I think unwise. It would drastically change how you write code, so you'd have code that's mutually incompatible with or without that extension.
 
Just throwing it out there, but is it worth coming up with some kind of "long term goals" for 9.0 to aid the context of these discussions?
 
I'd say yes, but I think PHP is structurally incapable of it.
 
RFC wise, yes, but the people in here represent 80%+ of the driving force behind PHP's development so everyone in here getting on roughly the same page would be a big benefit
 
6:58 PM
But will the people here be 80% of the team in 4-5 years when PHP 9 is on the table?
 
Well who decides when there's been enough minors anyway?
 
Tradition! (Cue Tevya.)
 
I've tried to make that point before, but people seem to like the idea that there's a mystical force which causes major releases to appear on the horizon
in fact, they seem to be quite consistent at one every 5 years (if you count 5.3 as "major" in place of 6.0)
 
Would certainly help long term planning and prioratisation no doubt to say that 9.0 would be in 3 years
 
Every attempt to put some order to the PHP development process has run into a wall of "but I like the current disorganized chaos."
 
7:08 PM
Aye, I feel like we're edging towards "fundamental changes" territory and we don't want something like... symbol table merging to land in 8.4 and then show up in 9.0 to give people a chance to moan a bout only a year
 
the tendency I've seen is the other way "oh, can we just bend the compatibility rules, 9.0 might be years away"
giving people a chance to migrate can always be done by increasing the support lifetime, rather than inserting an extra release
 
 
1 hour later…
8:16 PM
Anyone have a suggestion for github.com/php/doc-en/pull/479 ?
 
What is WeakMap in core part of?
I'm assuming a new page would need to be created under where it's best suited
WeakMap and WeakRef are things I want to understand better as my boss expressed interest in them, and I don't fully understand how they work. I need to spend time one weekend and go through them :P
 
@Tiffany its in Zend/ so in the "Core" extension if thats what you mean
 
@beberlei a little bit. Trying to think of where the best place it'd go within the manual. That gives a hint.
 
8:31 PM
The core (no pun intended) issue is that the same class name is already used by an extension. So, I don't know if that will cause issues for the documentation and unique IDs.
 
Could we prefix it with something so its given a different designation and won't interfere with uniqueness?
It seems like a hacky solution in my opinion... I'm not sure
 
9:22 PM
Have to reset my macos and I have no external drive
This should be fun
 
9:52 PM
@Sara I was able to find it and message you, but if I view your full profile, the three dots don't appear...
now I'm trying to remember where I went to to get the the different profile view that had the three dots :|
interesting, I think I figured it out. Frustrating I have to jump through hoops to find the right view though.
 
10:15 PM
@Crell maybe there should be some sort of disambiguation page ....i.e. what wikipedia do. Or at the top have "This is referring to the extension weakref. For the class added to core, see here" and vice-versa.
 
10:38 PM
@Danack Possibly, but that's above my pay grade.
I think I'm leaning toward something similar to what @Tiffany suggested. Probably renaming the extention's weakmap class page to something else and stealing class.weakmap for core.
 
10:49 PM
@Crell I like that idea... I guess a minor concern would be broken links, if someone accesses one of the former extension pages, maybe redirect to the new location?
 
If it were an extension I thought people actually used I'd be concerned about that... :-)
 
@Tiffany shrug Technology is broken, unlike back in MY DAY...
 
11:22 PM
@Sara 😂
 
cmb
@Crell ext/weakref does no longer work as of 7.something. Still, just put a not into the method descriptions, referring to each other (nothing fancy, just a few words and a link). Should also review existing <classname>WeakMap</classname> and <type>WeakMap</type>.
 

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