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

6:02 PM
@Danack @Crell I am ok with closing, or making a v2 of that RFC with the necessary adjustments on the patch.
 
@StatikStasis Dafuq? Still? I thought I resolved that yesterday.
grmbl grmbl Platform.sh...
@NunoMaduro I think the ask is to pull the vote, add a section saying "we know this is inefficient but we think we can fix that later", then restart a new vote. Is that accurate, @Danack?
Unless you have time coming up to do the investigation to make it more efficient. Tell Taylor it's a good investment of time to have you work on it. :-)
 
@Crell I think I would like to invest some of my personal time to investigate the patch. It may take a while tho.
*to investigate ways of making the patch more efficient :)
 
just to be clear, by "more efficient", do you mean more selective in what gets captured?
 
So pull it for now?
 
because if so, that's not just an implementation detail, it's behaviour that needs to be defined
 
6:15 PM
@IMSoP Yes. But Nikita and Dan are concerned that implementation detail may leak subtle behavioral changes, eg, when destructors get called, etc. (I have no strong opinion on the matter.)
 
cmb
 
as I've said all along: this whole RFC is not just a syntax change, it's a behaviour change; the details of that behaviour are a large part of why it wasn't done already
 
We're talking about point 2 right now, mainly. I... have no strong feeling on point 1 and defer to @NunoMaduro.
 
@IMSoP I mean more about having a patch that everyone in the PHP Internals agree in terms of "efficient", "behaviour", etc.
 
@IMSoP Can I assume that the issue is auto-capturing from a large block is way inefficient and edge-case laden than a single expression?
 
6:22 PM
@Trowski I don't think it needs to be "large"; a single expression, unless you really torture it, doesn't have any locally scoped variables
so the chance for confusion or collision between local and captured scope in an existing arrow function is effectively zero
 
@Crell Not sure if "pull the vote" will do any good. For historical reasons, it may be important to have a v2 where the concerns raised on the v1 are totally addressed.
 
Ok, so your objection is the local scoped vars within what looks like a regular block?
 
@NunoMaduro Mainly it's a timing thing. If a vote fails, you aren't allowed to resubmit it for 6 months without "significant" changes (for some undefined definition of significant). It would also need a new discussion period before it could go to a vote.
 
Oooh it's 8.0.7 roll day. I best get on that.
 
Roll tide!
 
6:29 PM
@Crell That's good know (always learning with you). Feel free to pull the vote, and add a note about why we are pulling the vote. Thank you!
 
Roger. People who have done this more than me; Is there a "proper/polite" way to pull a vote, so it doesn't look like a dick move?
(I figure short-functions can stay active, as there's nothing really controversial in the implementation there. It's just a like-or-not vote.)
 
@Trowski PHP's scoping rules are currently quite simple: variables in a function are always function scoped, unless imported with "global", "use", etc; if we're going to change that, the whole RFC should be about justifying that change, and defining exactly what the new rules are
 
cmb
@Crell did you consider nested functions? Would they auto-capture? If not, that would not be consistent with arrow functions.
 
/me points at Nuno again.
 
cmb
I mean short functions.
 
6:35 PM
@IMSoP Makes sense. I'm not sure how I feel about it myself yet. Technically short closures can violate that, but it's much more well defined and less likely to be confused.
 
@cmb On the RFC we talk about that.
 
Short functions don't capture anything.
 
@cmb The => symbol always means “evaluates to the expression on the right,” in all circumstances. (Named functions, anonymous functions, arrays, and match().)
@cmb The fn keyword indicates a function that will auto-capture variables, by value.
 
@Trowski yeah, that's it; I came around to the idea of "read like an expression, run like a function", but that doesn't generalise to function bodies, so I need fresh convincing
 
@IMSoP Here's some shenanigans: 3v4l.org/teerJ
 
6:38 PM
@Crell Existing ones do
$y = 2;
$func = fn($x) => $x + $y; // $y is captured from outer scope
 
Short functions != Arrow functions.
 
wtf is a short function then?
 
function normal() {
$y = 2;
function f($x) => $x + $y; // $y feels like it should capture here.
}
 
That's a syntax error.
 
6:40 PM
Why>?
 
Please read the RFCs. They answer this question. :-)
 
PHP has nested functions
The RFC doesn't actually mention nested functions
 
cmb
@NunoMaduro ah, fair enough.
@Sara ^
 
I... fucking hell, PHP.

It doesn't auto capture, because it's AST identical to the existing function($x) => { return $x + $y; }
 
Yeah, I understand that.
 
6:42 PM
@Trowski someone on Twitter pointed out you can also abuse arrays: 3v4l.org/fQ2lY which led me to write this: 3v4l.org/j2J0B
 
I'm saying: Should the user be expected to predict that?
Because syntactically, it looks pretty similar.
 
I think so; it says explicitly that the keyword "function" means "no auto capturing happens."
 
Fair
 
"fn" means "auto-capture happens".
So, that situation would be weird, but behaves according to the rules laid out.
And it's only weird because PHP is weird.
 
I'm alright with that as the distincting factor.
 
6:43 PM
to be fair, you could just ban it in nested scope
 
I think that would be worse, tbqh
 
Inconsistent opcache behavior with variables passed by reference to mysqli ・ opcache ・ #81096
 
The rules for both RFCs are:

* => means "evaluates to" (implicit return)
* "function" means no auto-capture.
* "fn" means auto-capture.

And all three are consistent throughout the language.
 
because in actual fact PHP doesn't have nested functions; it has run-time defined global functions
 
Nor should we prohibit conditional declarations:

if (!function_exists('foo')) {
funciton foo() => false;
}
@IMSoP This is true.
 
6:44 PM
@Sara That should work fine with this RFC.
 
cmb
shorter functions with auto-capture: fn foo() => $foo runs
 
Partial shorter auto-capture pipe functions?
 
@Sara That is literally what I'm going for. :-P
 
@Crell lol
 
God damn. Parallel run-tests is sexy af. I keep coming back to my rolls thinking tests didn't run because they finish SO FAST.
 
6:46 PM
$c = fn($x) => $x
  |> foo(?, $bar)
  |> beep(?);
 
Toss some null-safe in there for good measure.
. o O ( Null-safe piping? )
 
$c = fn($x) => $x
  |> foo(?, $bar)
  |> beep(?)
  |> $narf?->stuff(?);
 
$x = 123 |> foo(?) >?| bar(?);
Now taking naming nominations for the >?| token
 
‽> obviously
 
T_NIKITA_FROWNING_AT_YOU
 
6:48 PM
T_PERL
IMSOP: OMG, YES
T_INTEROBANG_PIPE
Well, not quite an interobang
Cause you'd want | + ? not ! + ?
 
an interropipe?
 
Interopipe?
YEAH
T_INTEROPIPE
 
/me still wants to bring back the thorn.
Since Octothorp is already taken in PHP.
 
I don't seem to have the thorn on my mac, even in Opt+ mode
 
the Windows emoji-picker-thing offers me this beauty: ⪒
it's also sticking its tongue out at me ⩌
ah, Unicode, so many hours of fun to be had...
wait, I've found it: |⩼
U+2A7C Greater-Than with Question Mark Above
 
7:01 PM
That's my next RFC, in collaboration with @IluTov.
 
SHIP IT
 
7:16 PM
@Crell It's not just efficiency, it's the actual behaviour and side-effects (as far as I understand). Someone needs to do work of actually figuring that out, and documenting it, not just mislabeling it as an optimization. As I said yesterday, assuming that one of the other maintainers is going to pickup that work and it is pretty.... ill-mannered.
 
@Danack I don't think Nuno is expecting someone else to do the work for him. It's been a question of getting the time to do it himself now vs at some not-yet-specified point in the future.
So what is the procedurally appropriate way to pull the vote for now?
 
Just close it, and say something like one of you realised that when Nuno wrote: "Concerning point 1: Agreed. Going to update both the pull request and the RFC accordingly" that probably set the expectation that Nikic's thoughts would be worked on.
@cmb I should drop support for 5.4 at some point....
The open issue also needs to be updated so that if there are some things that are known limitations, or haven't been addressed that they are listed there. Not as 'optimisations'.
 
@Sara did you just tell me to go F$&# myself?
 
@ircmaxell I believe she did, Anthony.
 
7:41 PM
@NikiC fixed the variance bug, looking into parent/self/static
 
8:00 PM
@NunoMaduro @Danack Is this a fair description for the list?

"After some off-list discussion, we've decided to cancel this vote for now. Reviewing the previous discussion Nuno had agreed to dig into the question of how to capture fewer variables when possible, but hasn't had the opportunity to do so yet. In the interest of honesty we're going to stop the vote for now, and he'll try to do so before the end of June so that we can hopefully bring it back to a vote with an improved implementation, or at least a roadmap for how the implementation can be improved without behavioral changes."
 
Does the engine abstract away the variable names by the time you get to them?
 
@NikiC so yes self/parent work without any issue, but static needs work
 
8:15 PM
@Crell Looks good - maybe replace Nuno/he by *we. As we use *we everywhere on the rfc lol.
 
Oh... I didn't check variance for self/parent
 
kk
Vote officially pulled.
 
Great!
 
AFK for a while now.
 
8:33 PM
thank you
 
No problem Joe.
 
9:02 PM
@Girgias Hmm, what makes you think it's not recent? 😃
 
@MateKocsis Don't know :p seeing some mixed types instead of union types in pasteboard.co/K4BZNN9.png
 
@Girgias I'm on a very recent version of the master branch, so I'm not sure why the types are archaic :O
 
Did you rebuild the manual?
(using configure)
 
hmm, no. what's that? :D
 
In doc-base, the manual needs to be regenerated, just run php base/configure
You can add a --with-lang=code if you want a translation :)
 
9:12 PM
ah, thanks!
 
9:30 PM
DateTimeZone silently falls back to UTC when providing an offset with seconds ・ Date/time related ・ #81097
 
which is better: using private const properties or string literals? I thought it was the former, but I wasn't sure if there were some exceptions to this...
or what the exception using a private const property is
 
morns
 
10:01 PM
@Tiffany Are you reusing it? No? then no private const for you
 
thanks
 
Inject them into the email via constructor args :p
 
10:22 PM
@MarkR what in the ever loving hell o_O
 
@Tiffany ok fine, inject them into the constructor via email args then
omfg
 
@Tiffany same link twice?
 
oops
 
I just remembered there is a proper official standards track spec for SOAP-over-SMTP
 
@Tiffany Basing it on your example, but constants describing a product are almost never source-of-truthy within the class itself. The software name / display name is typically stored in a configuration file somewhere.
 
10:24 PM
ah can't find it maybe it was just a proposal, nevertheless one of the craziest ideas I have ever encountered
 
@Danack and I don't have the other 3v4l in my browser history :|
 
So it would typically be SomeGlobalConfig::SOFTWARE_NAME SomeGlobalConfig::EMAIL_DISPLAY_NAME or accepting them via injection
 
3v4l.org/EZI04 is what string literals should have linked too
 
are they legit const?
though also I am generally a fan of proxy getters with constants
 
I always knew they were proper const them lot.
 
10:27 PM
the method is literally that
like it's just a return 'email'; as the method body
 
@Danack that guardian headline/subsequent letter tho
 
wat
 
@Tiffany for a reason I cannot explain (thus probably invalid) I prefer the separate private const def
they are functionally identical and actually I thing the string literal is more readable in the case of a small-ish class
 
A big file that contains all the messages/names for something like this one is pretty easy to work with.
as Mark suggested.
 
10:29 PM
I wonder if that's something I can implement...
not sure if it's "in scope" ... might be able to wing it though
 
@Danack that's kinda the visual studio way (in my mind) and I've never got on with it, tho again can't explain why so I may be wrong
 
Sometimes a level of indirection is required e.g. Messages::$text[Messages::MESSAGE_ID_HERE] although 9/10 I usually inject a helper with them so im not using static, and can better respond to missing text etc
 
@DaveRandom well, have a video about high speed trains to distract you.
 
I'm like 4hrs deep in an outage and listening to elastica
(currently waiting for chkdsk)
but staying out of distracting media for now :-P
 
10:45 PM
Then I will just say, the black country living museum on tiktok is worth checking out ....later.
 
o/
 
11:04 PM
\o
@Danack random: I saw a clip of a docu series around the transport museum in york that looked lit might be decent, narrated by sanjeev bashkar which is how it came up on my twitter, not watched it but trailer looked at least it would pass the time
not york sorry brooklands
 
@cmb you email to the doc list has both references point to the same link
 
cmb
ta
 
Jeez that's a lot of methods
 
cmb
and GdImage has too few
 
11:21 PM
Well yes, but that one is new lol
 
brb just saving that msg to throw back at you in 5 yrs
 
I don't maintain the GD extension, and if no one can be arsed to make an RFC to utilize that object, not my fault :p
 
cmb
@Kalle has a repo about this, but GdImage needs careful design (maybe even drop palette image support).
 
I think most of these new opaque objects want to go careful design
 
cmb
oh, sure! :)
 
11:29 PM
is Pierre still involved? his historical work was invaluable but last time I touched it I basically got verbally beaten to death by one of the angriest people I have ever encoluntered
and that is me saying that...
(in ext/gd I mean)
 
cmb
no, Pierre left GD (and PHP) ~5 years ago
 
orly?
 
Any reason or?
 
shows how much attention I pay :-P
 
@NikiC adding support for static is super annoying... I can't just use the arena directly for one ;-;
 
11:33 PM
probably got fedup with everyone asking i) how to prounce pecl? ii) why the absolute fuck did you name the successor project 'pickle'?
 
ouch
 
Mar 10 '15 at 13:36, by Danack
@m6w6 I don't have time to look at that properly, but have you been talking to Pierre about his 'Pickle' (not a euphemism), or is this a completely different use case?
 
cmb
probably more RL reasons (AFAIK he's running his own company now :)
oh, didn't know about that meaning; in Germany, mixed pickles are well known, though
 
> mixed pickles are well known
ಠ_ಠ
 
00:00 - 18:0018:00 - 00:00

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