« first day (3244 days earlier)      last day (1720 days later) » 
00:00 - 12:0012:00 - 00:00

cmb
12:00 PM
@Derick, will PHP 7.4.0RC1 be re-tagged?
 
Morning
 
o/
 
Morgen o/
 
@brzuchal what are the current open issues now?
 
1. Not sure if brace initalizer should be right after `new class` before class declaring block or after.
2. At the beginning proposed to use setters in brace initializer block but that was discouraged by @JoeWatkins and @NikiC
 
12:13 PM
Maybe still a bit too verbose, but I was looking at https://wiki.php.net/rfc/pipe-operator and with arrow functions it now becomes possible to shorten it to:

function pipe(
func(),
fn($x) => buildDic($x),
fn($x) => getApp($x),
fn($x) => getRouter($x),
fn($x) => getDispatcher($x, $request),
fn($x) => dispatchBusinessLogic($x, $request, new Response()),
fn($x) => renderResponse($x),
fn($x) => buildPsr7Response($x),
fn($x) => emit($x)
);
 
@brzuchal should be at the place right behind the (optional) constructor arguments
 
3. Not sure if I can handle complete implementation.
@bwoebi Ok, so we agree it would look goofy
 
yes, but I don't think that's that a bad thing actually
 
Ok
 
@brzuchal what do you mean with "setters in brace initializer block" ? Quick line of code example?
 
12:15 PM
Still not convinced why not including setters or other method calls in brace initializer block
 
\o morns
 
@MarkR How is that going to handle exceptions?
@JayIsTooCommon o/
 
@JayIsTooCommon No different than the existing RFC which doesn't eeem to
 
class Consumer {
    private string $email;
    public function setEmail(string $email): void {
        if (valid_email($email)) {
            $this->email;
        }
    }
}
$customer = new Customer {
    setEmail("valid@email.org")
};
 
@MarkR Wrong ping :) But that is kinda my point :P
The example is imo wrong or I am not understanding it
 
12:17 PM
@brzuchal ah, you mean method calls in general, not setters explicitly
 
Yes
 
Oops sorry Jay. There's no exception handling in wiki.php.net/rfc/pipe-operator this one
So it would just be classic, would just throw from wherever the error was
 
@brzuchal I think this is the wrong approach; we should have dedicated property accessors which then handle that transparently
 
@MarkR Yes, but in that specific flow normally you would handle exceptions too
 
i.e. a different concern orthogonal to this RFC @brzuchal
 
12:18 PM
dispatchBusinessLogic is a good candidate which might throw
 
@PeeHaa It's not my example, just the one off the existing RFC
 
I know
 
@bwoebi yes, but for now there are not, Java double brace initialization can deal with that, and currently it'll require to add __set() method to validate that
 
Separate operations (methods) and construction (setting values) @brzuchal
 
:)
Just noting the example is wrong
*imo
 
12:19 PM
@brzuchal let's not introduce a feature which is solved much better by another feature...
 
Aye, I see your point
 
@bwoebi Alright, I'm fine with that. I can prepare some draft RFC but would it be enought to vote against without complete implementation?
 
@brzuchal you certainly can bring it up on internals without complete impl at least...
 
@bwoebi also Nikita and Joe pointed to avoid using ctor + initializer, do you agree?
 
@brzuchal I don't. Sometimes a constructor does have to execute some logic. I think people will mostly prefer to using the initializer, so that they are not going to shoot themselves unnecessarily in their feet.
 
12:24 PM
Which would execute first, constructor or initialiser?
 
ctor, then initializer
 
/me wavea
 
@brzuchal disagree
 
ctor can throw cause of validating some input and that's why I wanted to call it also like $inst = new Email("email@example.com") { name = "John Doe", };
 
First the initializer, then the ctor
then a ctor can use the initializer values
 
12:27 PM
On the other hand, without the constructor, setting dynamic properties invoking __set might hit issues
 
(then you can even fit validations of the initializer values in a ctor)
 
If __set depends on some kind of state from the constructor
 
> The object initializers syntax allows you to create an instance, and after that it assigns the newly created object, with its assigned properties, to the variable in the assignment.
 
yes, I know. It has repeatedly violated my expectations
This is one of the misbehaviors of an otherwise great language
tripped me a few times up
 
@bwoebi even here in Java wiki.c2.com/?DoubleBraceInitialization
> The first brace creates a new AnonymousInnerClass, the second declares an instance initializer block that is run when the anonymous inner class is instantiated. This type of initializer block is formally called an "instance initializer",
 
12:31 PM
What are the advantages of doing the initializer afterwards?
 
guys, you are shooting your foot off
ctor + initializer is a terrible idea
If a ctor is needed, use a ctor
 
@bwoebi single expression
 
@NikiC why?
 
Any constructor at_all or one with parameters?
 
@NikiC Well, a zero arg constructor is probably okay.
 
12:38 PM
@LeviMorrison what if there are args with default values, still okay?
 
@LeviMorrison A zero arg ctor is decidedly not okay
Not in a language that has no overloading at least
 
How so?
 
If you have a ctor, then the ctor is responsible for initializing the object
I should say, for fully initializing the object
 
// proposed syntax
$customer = new Customer {
    id = Uuid::uuid4(),
    name = "John Doe",
};
// is just a simplification of
$customer = new Customer;
$customer->id = Uuid::uuid4();
$customer->name = "John Doe";
^ Explain how a zero arg constructor could bust this?
 
@LeviMorrison That's an incorrect statement
 
12:40 PM
(or find a new example if needed, but there's one if it works).
 
That is, those two are not equivalent, because the init syntax has additional constraints wrt initialization. It's not just a random set of property assignments.
 
@NikiC And those constraints are?
 
@LeviMorrison That everything must be initialized...
 
So to specify one property using initialization, you must initialize all of them?
 
I'm not saying a zero-arg ctor would technically break it, I'm saying it is semantic nonsense
@MarkR unless they have default values, yes
 
12:43 PM
@NikiC That's not a requirement, per se, though I see the value.
 
1:01 PM
well what's the value of initialization over a normal constructor if it doesn't guarantee that everything is initialized, why not just use a ctor and normal syntax in that case ?
it's more of a case of without that requirement, the value of the feature is reduced I think ...
 
1:42 PM
@NikiC @JoeWatkins @LeviMorrison @bwoebi @MarkR could you proofread RFC draft? gist.github.com/brzuchal/05e8641e95f2402acb225befcb2c20a1 and leave me some comments
 
Sure, will take another read through once i've knocked out some test cases for work.
 
@cmb Do you do any memory corruption testing on windows?
 
cmb
Not reguraly, but usually when debugging.
A few issues are reported for debug builds; an improved checker can be enabled via --enable-crt-debug.
@Jeeves, why don't you report new bugs anymore?
 
\o
Huh, Jeeves doesn't seem to be in the room
 
1:59 PM
fecund fruitful in offspring or vegetation : prolific
 
@Ekin there :)
 
cmb
he's back \o/
 
@Jeeves hey buddy <3
 
Forgot to describe implicitly about support for dynamic undeclared properties
 
@cmb Not sure what happened. Rebooted and told him to stop acting up :)
 
cmb
2:02 PM
@PeeHaa, thanks!
 
There are no rfcs apparently. Are we on a feature freeze? /me has not been following up for a short while
 
cmb
7.4 had feature freeze some weeks ago
 
Cool
 
2:17 PM
Well there is the Engine warning reclassifying RFC
 
array_filter(
$mod->getDropdownAssociativeArray(),
fn ($x) => ($terms->getUserTermsId() === $x),
ARRAY_FILTER_USE_KEY
);

Am I blind or should that auto capture the $terms ? Seems to be working but PHPStorm is complaining about the undefined variable.
 
@Derick I'll see you on Thursday then :D
No need to sign up on meetup, right?
 
@Girgias Yep, seen that one \o/ Specially a yay for Array to string conversion and undefined index being in there
 
I thought they were aimed at 8.0?
 
They are aimed at 8.0
But it is an RFC non a less
 
2:20 PM
Ah
 
Although not sure if having all at once there would effect the outcome rather than small, specific sets
 
I suggested waiting until everyone was asleep then sneaking in undefined var => warning in 7.4 but people seemed to think it was a non starter :P
 
Well the undefined variable one is being split from the rest of them
And I think we still need to decide what to do with references
 
What's to decide on references? (I say with zero voting power)
 
We need to decide how many roads a man must walk down, what brexit means, and the answer to life, the universe and everything (PHP is incompatible with the number 42)
 
2:26 PM
You must have been ignoring Theresa may... "Brexit means brexit" it's recursive like "PHP Hypertext Preprocessor"
 
Last 6 notice/warnings to reclassify wiki.php.net/rfc/engine_warnings
 
@DaveRandom and how to respond to Jayistoocommon, Christopher.
 
@Girgias Where's the RFC for your pile of PRs for warnings-to-errors?
 
Nowhere, Nikita just told that those should be promoted unconditionally to Errors
 
Oh if Nikita told you, that's okay.
 
2:32 PM
:D
sorry for flooding emails
 
RFC: Strict Slapdowns for Sloppy Parameters?
 
Don't forget the UPGRADING and/or NEWS (I never remember which) entries
 
I think i've got a dozen of them pending but I need to change the location of the helper before they can be merged
 
Well I've talked about it with cmb and he said one general statement should be fine
As it's going to affect a lot of functions
 
@salathe The RFC is wiki.php.net/rfc/consistent_type_errors plus some liberal interpretation ^^
> Functions that manually handle parameters, because they have more complex
> requirements, should preferably also be switched to always generate TypeError.
 
2:35 PM
Btw does PHP's git only accept RSA keys?
I can't seem to be able to pull the repo from my laptop which has an ECDH key
 
Error: noun, the process of telling PHPStorm to turn 5,000 of your docblock property types into PHP 7.4 types, forgetting that object properties cannot be null by default.
 
I'm just bitter because why have a process when "because Nikita said so" means you can ignore it.
 
Weeeellllll he did say that on a PR
 
/home/vsts/work/1/s/Zend/zend_execute_API.c:683:45: runtime error: member access within misaligned address 0x000000000002 for type 'const struct zend_op', which requires 8 byte alignment
 
Also @brzuchal I'm not a fan of the proposal but can see the usage, however I do agree with Nikita that or you have an initializer OR a constructor not both as it doesn't make sense IMHO, moreover I'm totally confused by what you are doing with __set()
 
2:42 PM
I believe he is using __set to bypass the protected access restriction.
 
Ohhh, yeah not a fan of that
I'd say use a value object in that case but that's me
 
@Girgias it's best to sign up on meetup.com
 
Okay will do that then
 
@JoeWatkins Is php-announce mailing list still used?
 
cmb
@NikiC, RMs send GA announcements there. Not sure if they come through, though.
 
2:52 PM
They don't seem to...
At least the last set of releases is missing
 
They're moderated
 
cmb
There have been massive spam issues on that ML (https://externals.io/message/105743),
and for quite a while I don't look after moderation requests anymore. :(
 
user2286243
case 1 || 2:
 
user2286243
Why does it fails when () are missing?
 
ThW
because switch/case down not work that way
 
user2286243
3:03 PM
But how does PHP reads it?
 
@VarunAgw 1 || 2 evaluates to true
So you wrote case true:
 
ThW
switch ($value) {
case 1:
case 2:
  // ... code
  break;
}
 
What you're looking for is likely case 1: case 2:
 
user2286243
ok gotcha. Thanks.
 
@NikiC: Typo: "For example, for "42" we choose int, while for "42.0" we chosoe float." — "chosoe". However, does that stringy-ness check also include range checks? (ie, if it's larger than 2^63, chose a float) ?
never mind the question, I see it in the example
 
Having mixed types will be a welcome benefit to indicate the parameter has actually been typed.
 
Yay union types :D
Wasn't sure about the order Int -> Float -> String -> Bool in the beginning but it does make the most sense
 
why special case false and not just allow arbitrary value types? Then it could be used to make ENUMs :D
 
3:32 PM
Hum, how long does it take for PHP.net to propagate an SSH key?
 
(and just kidding about value types... or am I)...
 
Looks alright to me. I'd be tempted to add an isUnion(): bool to the base ReflectionType so it's more immediately obviousthan using InstanceOf, but at least InstanceOf will help type-hint for IDEs
 
@ircmaxell I actually think value types aren't such a bad idea ... but a separate proposal ;)
 
@NikiC "The types may be returned in an arbitrary order that does not match the original type declaration. The types may also be subject to equivalence transformations."

That might be worth another consideration if possible, I'm thinking of the case of things like dependency injections that are autowiring based on types. They would presumably try to find a service in order of written priority.
 
@NikiC well, is it worth special-casing false then? or just going straight to the second proposal? ;)
 
3:41 PM
@ircmaxell It's worth :P
 
fair enough :D
 
Through sheer quantity ^^
For the more general feature, I think a reasonable person may argue that we should be supporting enums instead
 
well, I guess I was implying that value types would be more controversial without that clear cut usecase
 
const Monday = 1;
const Tuesday = 2;
// ...
type Weekday = Monday|Tuesday|...;
 
@NikiC but an enum could just be syntactic sugar over top of value types ;)
 
3:43 PM
I guess that would kinda work as an enum, but only a "weak" one
While probably "newtype" semantics would be preferred
 
class Monday {}
class Tuesday {}
type Weekday = Monday | Tuesday | ... ;
 
heh
The difference to Monday implements Weekday would be that it's sealed?
 
yup (that's what I was just typing)
 
How would you map them back to values for actual storage?
 
@MarkR the proof is left as an exercise to the reader
:P
 
3:47 PM
:D
 
Re: reflection, I could see a situation in which, for example, two different file handling services were passed, which didn't share a common interface:

public function __construct(GoogleClient|AmazonClient $client);

Common sense would suggest wrapping each one in an adapter that exposed a common interface, but I usually don't assume people have common sense, including myself... especially including myself :P
 
not jjuust common sense, but practicality. Implementing a facade for every dependency is rather a pita unless you plan on actively developing that interface.
 
I like the idea of moving RFC to github was even thinking of implementing github app for polls cause the only one available in GitHub Apps allows non authorized users to vote so I thought I could be better on that and allow only github users from a team or from the list in file on repository
 
@NikiC Which property would actually matter for things like Optional, although in practice that would probably just be one final class.
Internally it would definitely just be one final class, because it could use IS_UNDEF and require no extra storage.
 
4:36 PM
I really like the typescript typesystem … great if php moves towards it.
 
Bleh. I am setting an opcode handler and would like to call the engine's handler when I'm done. The trouble is, during MINIT when I save the original handler, it's null.
 
 
2 hours later…
6:24 PM
Hey, does anyone know if there's a Fedora stackoverflow chat on here? I just searched but I couldn't find one. Perhaps it's under a different name?
 
7:14 PM
@NikiC So parens are forbidden, except where they are required?
I really think we should adopt null.
Aside from ?, there's also the stupid void issue.
 
null and void would be distinct even if we had null
 
... and there's also allowsNull...
 
allowsNull is a blight. The whole ReflectionType thing is a blight
 
@NikiC I still think this is a pointless distinction. Continuing to carry it makes everything more complicated.
It's just simpler to have type Null, where it has only one value, and it's type-checked just the same as everything else.
 
8:17 PM
@MadaraUchiha ping
 
IMO a null type makes a lot of sense. One question, would null (the symbol) be a value, a type, or both? Just looking to possible first-class-typeness stuff well into the future
 
9:07 PM
@samayo pong
 
9:37 PM
@MadaraUchiha i wanna ask you something
I finally decided to bing FMA but not sure if the book is better than the anime
 
FMA: Brotherhood is faithful to the manga
And it's amazing.
 
So the book is better?
I prefer to watch unless the book is way way better
I have been saving it for a special time
 
No, FMA: Brotherhood is the anime
And it's good.
 
Thanks.
Do you know a goos link with English audio?
 
IMO use a sub, not a dub. The voice acting is usually sub-par in the un-original languages.
 
9:44 PM
Teresko suggested the same thing but I find it a bit distracting to watch and read at the same time. It just takes away some of the exprience, engadgement from watching it
Maybe it just me, but I say this from watching normal movies, like French, Chinese dubbed in English
 
10:38 PM
oh that's one of the classic ones that I need to see
 
I binge watched all of season 1 of One punch man yesterday and it felt like it only took a couple of hours. I think I'm going to re-watch Helsing Ultimate Abridged
 
S1 of OPM is good
Haven't seen S2 but some friends described to me as "The manga is more animated than the anime" soooooooooooooo
 
... class constants can use an array ... why did I not know this
 
Well yeah
 
I assumed it couldn't have constants used to define its keys for some reason
 
10:54 PM
Well now you know :D
 
Yup. Already replacing all the static arrays with it in my codebase
 
11:38 PM
With zend_extensions and the extended fcall begin and end -- is there an easy way to share state between those opcodes? Related: is there a cache line in PHP 5? Would be good to cache whether I need to trace that fcall or not.
/cc @JoeWatkins
 
00:00 - 12:0012:00 - 00:00

« first day (3244 days earlier)      last day (1720 days later) »