« first day (3848 days earlier)      last day (1114 days later) » 
00:00 - 17:0017:00 - 23:00

5:02 PM
That's what rebasing is for. :-)
 
If it's a non-default branch, perhaps. No rewriting of history of the default branch except for explicit security redaction!
 
git commit --amend --allow-empty -m".."
 
/me does the distclean dance.
 
@NunoMaduro You could also check how common it is to have clashing variable names in closures in existing repositories. If the number is low it's probably not a problem.
 
@IluTov Thank you for the suggestion! :)
 
5:13 PM
@NikiC Is your magical GitHub repo analysis tool open source?
 
@FélixGagnon-Grenier I certainly did. I am unconvinced that everyone has.
 
@IMSoP Nice, thanks. @NunoMaduro Maybe that could be useful to you.
 
Lol, I was just searching for that!
 
I used it recently; make sure you have plenty of time, and plenty of disk space
 
5:19 PM
@IluTov By the way, congrats once again on the enumerations work. People are going nuts! 🥳
 
another way to side-step the capture side-effect issue is if the syntax was more explicitly opt-in; if it goes in as "fn", people will see it as "the new syntax", and then trip up on the details
top 1000 packages weighs in at about 1.5GB, btw
 
@NunoMaduro Thanks! Curious to see what the community will do with it.
@IMSoP That's... way less than I expected honestly.
 
5:34 PM
@IMSoP I don't think people will see it as "the new syntax".

The vast majority of JavaScript developers I've interacted with, know the difference between "function" and "fn". Sometimes, they opt by using the "fn" because they just want to leverage the simplicity of "arrow functions" but with a 2-3 statement body.
 
@IMSoP hm, i probably should check how many will be effected by introducing sealed and permits keywords ..., i doubt there will be many
 
as someone who hasn't written any serious JS for years, I'm a bit lost
does JS have a a "fn" keyword now?
or am I just misreading the comparison?
 
I think he means fn equivalent in JS ( arrow function )
 
isn't that quite a different difference, though? er, if that makes any sense
 
that's what i understood 🤷‍♂️
 
5:42 PM
@NunoMaduro I think you're under-estimating how big a shift this in PHP's scoping rules; either that, or I'm over-estimating it
you see it as a small syntax tweak, that saves a few characters
I see it as "you can no longer look at a function body and know what variables are local"
are arrow functions in JS a similar level of change?
 
Well, arrow functions in JavaScript allow to access the outer scope. The different between the ones we are proposing for PHP is that: JS auto-capture by reference, and we are auto-capturing by value.
 
don't all functions in JS allow access to outer scope?
in JS, all vars are in an outer scope, unless defined with var
in PHP, all vars are in function scope, unless defined with global, use, etc
 
It's been way too long since I last looked at the lexer code...
 
6:04 PM
hi @NunoMaduro
others clearly don't agree, but I think it obvious that you can't extend one line closures to multi-line, which is why I said there's no version of this feature that can just patch the parser ...
 
@IMSoP Yeah, they do. Arrow functions only differ in how this is handled.
 
@IMSoP They do. Just meant that they know the difference between "function" vs "fn".
 
@NunoMaduro "function" and "fn" in what language?
 
@JoeWatkins Right - I see that you probably meant what @NikiC was saying: the static analysis needs to be adapted/improved.
 
yes, I named the function that needs changing :)
I mean it's really basic
 
6:09 PM
@IMSoP In JS they have "function" and "() =>" too. And people don't use the latest just because is new syntax :)
@IMSoP That is what I was trying to say.
@JoeWatkins Thank you Joe!
Going to end the day here, see you all tomorrow. 👍🏻
 
right; I guess I don't know enough about JS arrow functions, because I certainly wouldn't know when not to use one
I have a hazy notion that they have a less weird definition of "this"
 
That’s correct. { bar: 1, foo: () => this.bar }
The foo function won’t refer to the bar property, but to an variable bar in the outer scope here.
 
6:30 PM
they also do not have an arguments object
but JS has proper variadics now so just use them instead
 
/me waves
 
~
 
~_o_~
that's an emoji of a guy holding two lemon pies
or a guy awaiting for the impeding doom of two incoming farts, your choice
 
6:48 PM
I would refrain from what I think it looks like as it is not nearly Friday enough
 
7:03 PM
you should prob see a doctor
 
@ircmaxell!
 
@DaveRandom We both know it's too late for that. Necromancers is what I need
 
never found necks to be particularly romantic but whatever fs your b
 
what's up?
 
Haven't seen you in a while. How goes?
 
7:32 PM
mornings!
 
Well now THIS is new. I've not gotten an error message on run-tests.php itself before when working on core. :-)
 
It's going well. Keeping super busy with work, but doing well :)
 
7:48 PM
And... not even a consistent error!
@ircmaxell As long as it's a good busy. :-) What are you doing these days?
 
It's definitely a good busy :)
I'm at Facebook. I am managing the mobile GraphQL infrastructure team (we build a cross-platform data framework for querying and managing data on iOS and Android)
 
You work for Big Evil now???
 
Been here nearly 2 years now, and loving it
 
Oh well. Everyone's got their downsides.
 
@ircmaxell At least the last time I looked at your resume, 2 years was actually a pretty long time. Seems you do like it ;)
 
7:52 PM
Meh, I work with incredible people, get fantastic support, and get to work on really fascinating problems of scale.
 
Well, glad you're enjoying it at least.
 
@LeviMorrison Not really... past 3 companies before this were between 1.5 and 2 years each. Before that was 3.5 and 4.5 years. So looking to make this a trend
 
10 years, then 5 years for me.
 
Must have been those 1.5 and 2 years stints I was remembering :)
 
Just about to start the next.
 
7:54 PM
@Crell Good luck!!!
@Crell that, and backing up the money train is also good ;)
 
I start Monday, officially. Staff Engineer for TYPO3. Full time working on a GPL project.
@ircmaxell There is that, yes.
 
@Crell How many people will be on the team you work with?
 
Congrats! and best of luck with it :)
 
@LeviMorrison I don't even know. I'll mainly be working with Benni. I think there's like a half dozen people that work on core at least half-time, or something like that, plus whatever volunteers feel like it.
My first task is fixing up ancient code so that it runs on PHP 8.0.
 
I didn't realize they brought in that much money.
Good for them! (and you)
 
7:57 PM
They're not all paid directly by the GmbH, I think. Lots of people sponsored by different companies.
"We know you've got experience at dragging ancient codebases into the modern era. Please do that." - Basically my job description.
 
@Crell congrats.
 
@Crell Awesome, congrats!
 
@Crell Is not using typo3 a valid way forward?
:P
 
@PeeHaa My 5 year plan is to rewrite everything.
 
Looks to be using PSR-7 and middlewares, couldn't be that bad…
 
8:13 PM
@Crell yay
 
@Trowski They're in the process of transitioning to it.
 
Can't imagine why they'd hire you for that job, have you even heard of PSRs?
 
That stands for Professional Serious Review, right?
 
Parallel Synchronized Randomness, apparently.
 
:-)
 
8:18 PM
That seems way too sophisticated for urban dictionary, I was expecting something involving penises.
 
brb writing a clever post about penises and PSR
 
It's pronounced "Pissr"?
 
/me waves @ircmaxell
 
9:01 PM
Why am I getting this when I try to run tests?

Fatal error: Generator return type must be a supertype of Generator, void given in /home/crell/Projects/php-src/run-tests.php on line 145
That's the main() function of run-tests.php.
 
somebody snuck a "yield" in while you weren't looking? :/
 
The only changes are in zend_language_parser.y
 
Did you accidentally parse main into a generator?
 
@Crell :P
 
... I AM modifying the definition of function, so... maybe!
 
9:09 PM
remove : void, and check what the generator contains :/
 
(Though I didn't do anything with genrators.)
And it doesn't happen on main, so yeah, definitely caused by my change. Weird.
 
wait, does this mean PHP is fully async now? everything's a generator!
 
The fibers have unraveled.
 
unraveled, fibers have
 
we achieved greatness!
 
9:11 PM
greatness, we achieved
 
Ah, without :void I get a core dump. I definitely broke something...
 
you messed up the $things with $numbers in parser
 
Almost certainly.
 
@JoeWatkins the $string with $numbers, you messed up
It's Friday here people. Expect more of this good stuff for another 3 days!
 
look at the first few lines of zend_ast_create_decl, then zend_compile_func_decl to demystify the numbers/structure of the thing
ah I missed the fiber/async jokes ...
 
9:19 PM
fiber missed jokes you async /.
 
We were just processing other data while waiting for Joe to respond.
 
I was busy trying to copy all the data you were waiting for to another thread, badly, and at great expense ...
it's not so simple to just copy a few opcodes, it might be possible in some narrow cases, but in the general case, when pass two sets things like jmp addresses and literal addresses, they are fixed from that point onward ...
I've also been thinking about that, I got nothin ...
nothing that wouldn't be likely too costly anyway ... I notice lots of the R(W) opcodes do check exception, and maybe another branch wouldn't be terrible ... but I find whenever you touch an existing high frequency opcode it just has too much effect on performance, so I'm not suggesting it ...
 
@JoeWatkins In the broad sense I can see that, but it would be limited to just those few _W and _RW instructions.
 
Jesus christ we got a shit load of scripts in doc-base, and no idea if they are useful for anything
 
like when the error is thrown, you could set in globals the target opline you want to insert the HANDLE_DELAYED op, then in the sensitive opcodes replace the CHECK_EXCEPTION with CHECK_ERRORS which does both exception check and check if it's the target ...
 
9:29 PM
Please check my ignorant logic here... function_delcaration_statement looks like this:

function_declaration_statement:
function returns_ref T_STRING backup_doc_comment '(' parameter_list ')' return_type
backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
{ $$ = zend_ast_create_decl(ZEND_AST_FUNC_DECL, $2 | $13, $1, $4,
zend_ast_get_str($3), $6, NULL, $11, $8, NULL); CG(extra_fn_flags) = $9; }
;

I'm trying to factor the function body out to a separate declaration, a la methods, per request from Tyson in the short-functions PR. So... that should be a matter of moving out the { in
So... why is that resulting in hilariously wrong parse errors for all functions?
 
I can't read it, can you format it
I'll just look at the thing
 
@JoeWatkins From my naïve perspective that sounds reasonable. I'm still wrapping my head around the inner workings of the VM.
 
(I originally added another branch to function_declaration_statement itself, and that worked, but Tyson asked me to refactor it, and of course that's breaking.)
 
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index a5758bfda3..8d8b5a4900 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -236,7 +236,8 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
 /* Token used to force a parse error from the lexer */
 %token T_ERROR

-%type <ast> top_statement namespace_name name statement function_declaration_statement
+%type <ast> top_statement namespace_name name statement
+%type <ast> function_declaration_statement function_body
 
9:36 PM
Hm, your version of that first block is different from what I had. I wonder if that's the reason...
I just added function-body to where method_body appeared, in this line:

%type <ast> class_const_list class_const_decl class_name_list trait_adaptations function_body method_body non_empty_for_exprs
What's the starting index for the $ placeholders? I thought it was 0 based, but then by my count it ends at 12, not 13 (in the existing version).
 
$1, and each 'char' is included in count
 
Ah, I was off by 1. No wonder.
What's the difference up in the %type <ast> block? I don't quite follow that section.
 
I took function_declaration_statement from top line and put it on new line with new rule
 
Right, more I don't understand what the syntax signifies.
I can see what the textual change was. It's what it means that I don't get. :-)
 
oh, so %type tells the parser what struct/type the rule parses into, so imagine the scanner doing parse(&type, position) ...
so most rules parse into AST, but some are just numbers, some are strings or other types
 
9:46 PM
So it's telling the parser "when you get to function_declaration_statement, expect a function_body inside it?"
 
oh no, it doesn't matter where you put function_body in that huge block of <ast>
we tend to organize things together is the reason I done it that way ...
 
Now I'm lost again. So just tacking function_body onto the end of the existing line would have worked as well? If so, could it also have been put further down where I put it, with method_body? Or would that have broken in different mysterous ways?
 
no, you can do it like this too
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index a5758bfda3..37eaa469d7 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -259,7 +259,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
 %type <ast> echo_expr_list unset_variables catch_name_list catch_list optional_variable parameter_list class_statement_list
 %type <ast> implements_list case_list if_stmt_without_else
 %type <ast> non_empty_parameter_list argument_list non_empty_argument_list property_list
 
First part: Ah, so I was OK originally. That wasn't the bug.
Second part: Ooo... Folding method body into just delegating to function body seems like a good cleanup here, too.
 
yeah I'm not sure what exactly is trying to be achieved here, but '{' inner_statement_list '}' is recurring pattern, not sure why special casing the function body rule ...
 
9:58 PM
This is in the context of adding support for => expr as a function syntax. Just cleaning up the patch a bit. And that becomes easier if function_body is its own definition everything delegates to, because then the additional syntax is just one line addition in that rule.
 
PR updated. Thanks!
 
yw
I sleep now, nn all
 
cmb
@Girgias "you're halluscinating; have a fresh look later" – and then forget about it, is usually what I'm doing ;)
 
Yeah... might do some cleanup there
I improved the script from the guy
Turns out we got a shitload of section order issues :-(
 
cmb
10:15 PM
having only a shitload of section order issues is actually a relief ;)
 
Wait, is it possible to omit the parameter section?
 
cmb
probably, but it's better to have an "empty" one
 
F; though i can do that now, it looks nice 3v4l.org/Klh5c
 
possibly the cutest thing I've seen all week gfycat.com/madeupsoupyant-kitten-dog
 
@cmb Yeah, that's what I thought, turns out we have about 1k files which has a least an issue of section ordering or section missing
 
00:00 - 17:0017:00 - 23:00

« first day (3848 days earlier)      last day (1114 days later) »