« first day (3904 days earlier)      last day (1035 days later) » 
00:00 - 22:0022:00 - 00:00

10:00 PM
So that is my question, why? In my head I'm struggling to understand why the call cannot be completed but instead of calling the original function, it calls an internal function which returns a closure-like object?
 
that is what happens
like I said, we leave the stack in a state that looks like we completed the call
 
However that's done with a new opcode, ZEND_DO_FCALL_PARTIAL, which creates a problem if I'm understanding correctly?
An optimization problem, or otherwise?
 
Okay, you saying it "looks like" we completed the call suggests that it didn't actually really complete the call.
 
oh I see what's going on ... no, I used that as an example of a thing that exposes edges and creates complexity - but not huge complexity by itself, in isolation - by changing assumptions in the engine ... like it's not as simple as just add the new opcode, you have to go audit other parts of the engine, like cleanup_unfinished_calls .. the problem is not one edge, the problem is the whole thing ....
like nikita said "can't be materially simplified", he's saying we can go change one detail and that detail might look better, but it won't change the net result, the thing is complicated ... even if you make every detail as simple as it could be (and I like to think at least some of them are) you are still left with something complicated
 
But the implementation of foo(...) doesn't present similar problems?
 
10:11 PM
Let me ask this, let's say you start with a closure using Nikita's foo(...) -> Closure...

Could you write a method of closure e.g. foo(...)->makePartal(/*...*/) that would accept placeholders _as actual normal arguments_ (see userland example) and return a new invokable object that could be called, and would internally fill them in, then forward?
 
no, it's syntax sugar
@MarkR urm yes, but I'm not sure why you think that remarkably different from anything that we're doing, it changes a couple of details, but if the aim is to achieve the same result we achieve now, there's no remarkable difference ...
 
I'm trying to discover why it's different Joe, not proclaiming that it is. I'm trying to understand why all these special cases need to be considered.
Because I assume such an approach wouldn't require any special opcodes etc.
 
@Girgias "Implicit bool to string coercion is deprecated" Do we need any more details in that message?
 
I don't see the way out of replacing the do fcall family of opcodes with one that does the partial. It's inherently different.
 
10:30 PM
@Trowski I just got why you were thinking this maybe ... in the (...) case, no exceptions were thrown during ... and there are definitely no arguments on the stack, the only exception that may be raised is before ( ie - function not found, which we're already prepared for ... no edges to consider there, and that's basically the whole feature ....
 
@MateKocsis btw what about wiki.php.net/rfc/max_execution_wall_time ?
 
10:47 PM
3v4l.org/QiBk4/rfc#focus=git.master heh, got chaining working in a v. inefficient way. Could make it better but I'd have to convert it to an object to access the metadata
 
@JoeWatkins I was thinking more of "if we treated foo(5, ?, 6) as purely syntactic sugar for building out a short lambda, would that even work?" I know there's still some work to do there so it's not trivial, but would that mean less engine impact?
 
it might be even more complicated :D
 
How?
 
building a function in userland is easy, you just write the function ... internally, there's no assembler like facility ....
 
The engine doesn't have a way to build a zend_function from scratch? o.O
 
11:01 PM
noooo
way out of scope
 
No IR builders in PHP.
 
So... how does a short lambda even work? Don't all anon functions compile to a class internally anyway?
 
@Crell Short lambda walks the expression and determines what to bind, and lowers it to a regular closure in the AST. I think. Been a while.
 
But a regular closure is a class, no?
 
11:05 PM
@LeviMorrison no, it's arrow function in ast
it walks the ast, but doesn't transform it, it outputs opcode directly
 
Ah, right.
The same thing |> should do if it passes so that it's a sequence point, which means the left-hand side of the |> is evaluated before the right-hand side.
 
Which I'm fine with but still need help doing. Though it looks like that's not going to be relevant for 8.1. ;-(
So I still don't grok how partials can't do the same thing as a long closure does, but I need to go for tonight. TTYT.
 
I think if we make |> an AST node and do a sequence point it could have a chance at passing, partials notwithstanding.
Maybe that's unjustified optimism ^_^
It doesn't really hurt to try; worse case we just vote on it again in 8.2 era.
 
11:20 PM
@beberlei Unfortunately, this RFC lacked feedback (externals.io/message/112492#113210), and I didn't want to proceed until these questions are settled down.
 
Deleted? That seems awfully unambitious
 
00:00 - 22:0022:00 - 00:00

« first day (3904 days earlier)      last day (1035 days later) »