« first day (3862 days earlier)      last day (1077 days later) » 
00:00 - 18:0018:00 - 00:00

6:04 PM
I think so, yes. I don't recall other objections.
 
@salathe hope things are going well for you :)
 
6:21 PM
CDC announces fully vaccinated can go without masks indoors and outdoors.
 
That sounds like a bad idea?
You are not fully immune are you after the shots
?
 
It's all about risk tolerance.
 
I've heard very mixed things on that front.
 
Where I live few people mask up anymore anyway except at schools, but admittedly we are a rural area and things are not so crowded.
 
I've thought some more about named arguments and don't think there's a good reason to include it in the partial right now until reordering of the parameter works. `foo(bar: ?)(bar: 'bar')` is exactly equivalent to `foo(?)(bar: 'bar')` so I'm not sure what the point is of allowing named arguments with partial placeholders.

There would be one benefit for forbidding them: We could introduce reodering of params without BC breaks. Right now, `foo(baz: ?, bar: ?)` works but it probably doesn't do what most people would expect. So I think it might be better to forbit this altogether unless we can
 
6:25 PM
Just stating what they released. Still have to go by local ordinances and mandates.
 
@JoeWatkins @Crell Let me know if you're done talking about the subject. I don't wanna annoy you if you have other things to sort out.
 
@IluTov ? does not bind anything. I'm not sure why bar: ? is allowed as it's the same as ?.
I'm not opposed nor supportive -- just saying that it makes sense based on the principles that (bar: ?) and (?) are the same.
 
I mostly defer to Joe on implementation complexity, but in my view it's more "we have named args now, so... why not?"
Oh wait, because that lets you partial arbitrary functions dynamically. See the test that I linked to Nicolas in the latest email.
$partial = $callable(...$args, ?);
 
@LeviMorrison My reasoning is that since (?) and (bar: ?) are currently the same but probably shouldn't be because reordering is not supported, it might make sense to disallow (bar: ?) until we can sort out reordering.
 
I don't understand why you put reordering in there.
 
6:31 PM
I'm lost there, too.
 
As far as I understand it, "reordering" is already sorted: just use a closure.
 
@LeviMorrison Well that's fine, but why support syntax that looks like it allows reordering when it doesn't.
 
I don't understand what you mean.
 
@LeviMorrison @Crell I'd expect this to work but it does not. 3v4l.org/7CsZE
 
It does work. I don't know what you mean.
It's the same as foo('baz').
? does not create a single argument in the resulting closure signature; it merely says "bind everything else that isn't also a ?"
 
6:34 PM
I wouldn't expect that to do what you apparently think it does. But since using named args means that order doesn't matter anyway, I think what we have now is fine. It's still more capable than any other language's version.
 
You provided no other things to bind, so it's the same as foo(?).
If we think people will get confused from having (bar: ?) then we can forbid it, I suppose.
 
Yeah, I think maybe forbidding named arguments in the partial declaration would be a good idea right now.
The example doesn't work the way I would expect.
This doesn't seem correct: 3v4l.org/pVLkr/rfc#output
 
@LeviMorrison I would expect these two examples to be roughly equivalent: foo(baz: ?)('baz'); vs (function ($baz) { foo(baz: $baz); })('baz'); That's with 0 knowledge how this was implemented. This seems intuitive to me. The semantics don't seem super obvious to me. Since named placeholders provide no additional value I think it's best to forbid them for now.
@Trowski It was specifically mentioned in the RFC that parameter reordering isn't supported. But yeah, it's unintuitive to me as well.
 
I think there will be an expectation for that to work, so probably better to forbid.
 
I guess the question is, is this that way because it's presumed to be the correct behavior or because it was hard to implement? If it's the latter, it should definitely be forbidden.
 
6:46 PM
I wrote the initial RFC years ago, so I forget what changed my mind from ? creates a single argument in the resulting callable to ? binds other non-placeholder args at the respective positions and everything else is left alone.
It had ... for "fill in the rest".
 
AFAIK ? binds purely on position and the name in the partial is ignored.
 
? doesn't get bound. The other things get bound.
 
Sorry, bound is the wrong word. Passes arguments through based on position.
 
foo(?, ?, 'bar') bar is bound as the 3rd arg (index 2).
This is the only situation where multiple ? changes anything.
foo(?) and foo(?, ?) and foo(?, ?, ?, ?, ?, ?) are all exactly the same.
 
A name could be used to determine position perhaps?
 
6:55 PM
@IluTov Untrue. They do provide additional value.
 
@Crell Can you elaborate?
That sounded kinda arrogant, can you explain? :D
 
If bar: ? meant anything other than what it means today, it would have to be in cases where things overlap with positional args, I think?
f(int $x, int $y){}
f(1, x: ?);
^ something like this should possibly error?
 
Consider foo($bar = 'bar', $baz = 'baz') {...} and $partial = foo(baz: ?); The first argument given to $partial should go to $baz, the rest then fill in-order.
 
See: Zend/tests/partial_function/reflection-resolver.phpt

I don't know how you'd do that without support for named-args-via-variadics.

Or the "named arguments" example in the RFC.
 
@Crell Named arguments on the partial are fine, we're unsure about named params when creating the partial e.g. foo(bar: ?).
 
7:00 PM
Yes, both of those examples include named args when creating the partial.
 
@Crell But the names are meaningless when creating the partial.
 
You mean specifically for the placeholdered bits, then?
 
@Crell I'm looking at Zend/tests/partial_function/reflection-resolver.phpt right now, it does not contain (whatever: ?)
 
in_array(haystack: [1, 2, 3], needle: ?) :-)
 
@Crell I just pulled but don't see it...
 
7:03 PM
That's a new example.
 
@Crell Oh I see. The needle: is completely meaningless. The only thing it is is potentially confusing as there could be another parameter between haystack and needle and you wouldn't notice.
 
@Crell My issue is with this example: 3v4l.org/pVLkr/rfc#output
 
@Crell Oh I realize what you mean now. This errors. 3v4l.org/CtqaK But I'm not sure this restriction actually makes sense for partials.
 
7:33 PM
hmmm... I've just been made aware of the ETag headers. Obviously I'll silver bullet this in all my applications and think about it later.
now, to make the server generate specific headers for images, based on a last modification date...
it would be sooo nice if apache would "just" generate etag values based on the hash of the filesystem's last modified date
... wait that's dumb, hash of the content itself
ty r11, y'all have been excellent rubber ducks
 
7:50 PM
@FĂ©lixGagnon-Grenier you should find someone who has used them well, and get them to write a blogpost on "how to implement etag headers well".
I've never seen an article that says much more than "hey, Etags exist! And are probably good!".
 
@Danack did you use them well? are you partial to booze bribes?
Oh gods it seems like there are multiple nightmares to be had about ETags however. I can barely just parse the first post but it hints at major headaches :P
... I wonder how many decade-old technologies I've never heard about that are actually central to everything I'm working on and would solve many of my problems had I known
 
@FĂ©lixGagnon-Grenier No. If I was going to write a blog post about them, I'd probably go with "Using Etags is as simple as naming things!".
 
On the other hand last modified time is a pretty easy concept.
Well, unless causality breaks down. But that probably would cause more important things to worry about....
 
8:14 PM
HTTP caching is a highly nuanced, advanced, robust, and powerful system that basically no one implements correctly, and everyone implements in a different broken-ass way.
(Context: I wasted much of my life on Drupal 8 trying to make it use HTTP caching correctly.)
 
Lesson: don't waste your time on drupal
:D
 
@Crell Did you try using last modified time everywhere? if yes, how did it go, if not, what seemed wrong with it?
 
8:29 PM
no, it's rather this. it feels very PHP to read the RFC to actually get what's up
 
9:11 PM
Hi guys, it's possible to use array_map or similar with condition?
emulate something like
foreach ($a as $b) { if ($b === 'exit') return false; }
 
@BruceOverflow php.net/array_filter
Although that might not be what you're looking for either now that I look at it closer
I think what you have there is the correct implementation imo
 
Exact, array_filter isn't what I want ...
ok thanks
 
huh, I would very much like external validation about my understanding of that sentence :
> The "ETag" header field in a response provides the current entity-tag
for the selected representation, as determined at the conclusion of
handling the request.
 
@BruceOverflow put an example of your input and hoped for output somewhere...
 
I was worried, earlier, about the time it would take for the server to generate said etag, presumably from the content of the resource
But considering that once that value is sent, clients would send it back with requests, hitting cache along the way
Does it mean that the time of generating a hash of a big file (like 10 mb) would not be an actual thing to consider in the process?
 
9:24 PM
 
> hoped for output
so [1, 2, 4] ?
 
mmm no But the problem I think is in the original code base
it's a simple early exit ... from function
For this, I think that the filter not working fine
 
@FĂ©lixGagnon-Grenier ETag is basically a git hash representing a file rather than a commit
it's a globally unique identifier than represents the current version of a specific resource
i.e. a fast way for the server to check "is this the same file, is this the same version of it"
 
not globally, as two different resources can have the same identifier, but yes
 
ah yeh sorry bad terminology
wow 4 attempts
 
9:36 PM
"it's a globally unique identifier" - "Using Etags is as simple as naming things!".
2
 
cmb
@BruceOverflow I think your looking for a funtion any() or some(); there is nothing in PHP like this yet.
 
@Danack hahaha. yeah, that was a good premonition!
 
> Well, unless causality breaks down
fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu........................................................................................................ck.
 
@Danack oh no, I think reality is on the blink again
it must be a wednesday. I never could get the hang of wednesdays.
 
9:41 PM
s/wednesdays/*days <- me
 
base reality? yeah....I screwed up changing over DNS provider.....
 
not in a way that cost you a domain tho surely?
 
@Crell I can confirm. Reported two semi-related bugs in Safari this week.
 
no, just a few days email.
 
@Danack ah k well if your life experience is even vaguely near mine that is a positive thing
also psa: if you are not totally confident about a DNS change you are about to make, ping me :-P
 
9:44 PM
can I also ping you if I want to know how I can make my first ipv6 request from a local server and send things back?
 
@DaveRandom the issue was...... "congratulations your domain transfer is complete!". Two days later "you urgently need to verify your email address or your dns will be deactivated until verified". On an email account I don't check every day.
 
oh, that's a bit wanky but also probably objectively your fault :-P
 
@Danack One of my back shelf projects is an AI that just manages all my emails, social media accounts, and generally all notifications, calls, messages, and really just gently tells me when there are things I really need to know about, but otherwise let me have a calm checking-what-folks-have-told-me experience
or maybe that's a dream
 
potato quality but still:
Also, someone needs to clean their monitor...
 
10:13 PM
@Stephen Not since 3.0.0 - except that I think I fixed a bug related to it.
 
10:25 PM
wow. so I had git issues lately and I moved stuff around, and past me found an extremely clever way to troll me, my working directory is now named tmp_codebase
 
 
1 hour later…
11:50 PM
@Crell my position on named arguments has not changed, when you look at these examples that use named parameters in the application site, and ordered parameters in the call site, it looks like something is wrong, however, named parameters are only meant to provide benefit when you use them, and they are not being used at the call site ... partial application is not a short cut to re-declaration, nor should it be ... named parameters are handled at all application sites (partial and call)
in exactly the same way as the engine handles them now, because it's exactly the same code doing it in exactly the same way ...
also, this idea that partials should be transparent is short sighted, it only seems like a good idea when the call follows the application directly, in real world code these things may be in different files, and you do not want to loose the information in the trace at all ...
 
00:00 - 18:0018:00 - 00:00

« first day (3862 days earlier)      last day (1077 days later) »