« first day (4734 days earlier)      last day (434 days later) » 

01:55
o/
 
9 hours later…
10:41
@IluTov Unsolicited opinion, but imo anything other than the obvious default should be explicit, so we would need some way to indicate auto-capture: $c = function() use (..., &$matches) { ... }
@MarkR The message is referring to externals.io/message/121022#121055, which proposes using blocks as a global solution including arrow functions. So yes, I would agree that by-ref capturing should remain explicit.
ahhh, the match thing...
That seems like a good idea, but I still think another keyword will be required.
If you add the keyword you can re-use-use (heh) and end up with $x = iife use (&$x) { ... } or treat everything after ( as an explicit capture list e.g. $x = iffe (&$x) { ... } but I might be wayyyy off on what Levi is thinking
 
2 hours later…
12:27
@MarkR Levi suggested allowing blocks in all closures with the proposed capturing mechanism, not just immediately executing ones. Limiting this mechanism to iifes would be too restrictive, given that one could not even combine them with arrow functions (fn () => iife use (&$x) {}), given that &$x needs to be captured by-ref in the outer scope (relative to the arrow function). It's also incredibly hard to read.
12:45
@IluTov why would fn() => be a block here instead of fn() use (&$x) { ... } ?
@MarkR You suggested a different keyword. I might've been missing your point.
Levi suggested adding blocks to the language globally, so that we have blocks for arrow functions automatically. He suggested then extending them with auto-by-ref-capturing using the & syntax. This avoids the need for special fn() {} syntax.
@IluTov Ah, yeah if blocks were to become generic things which could be used in the form $x = { ... } as the rust docs linked in that post mentioned, we would likely need something to switch the tokenizer into a mode to accept auto-capture overrides.
13:06
0/
 
2 hours later…
15:18
\o
@IluTov Reasonable objections. I'll think more before responding.
15:32
@LeviMorrison Thank you. I will wait for your response before posting to the ML.
16:15
@bwoebi as you are the generator person I know, doesn't this look like a bug: twitter.com/FredBouchery/status/1707767818249244760 ?
I would expect the return to be called first?
16:42
@Girgias This behavior makes perfect sense to me.
@TimWolla That it does nothing?
Because the function body contains a yield, the function is a Generator and that's what the return type is.
Because the generator does not emit anything (the function returns before the first yield), the output is empty.
The return value can be retrieved with php.net/manual/en/generator.getreturn.php
tbf, JavaScript is better here, because generators require a special syntax during declaration: function* foo(), instead of making it implicit.
Right, okay yeah no that makes sense, it's just confusing AF because of the mixture of thngs
That's the case with all those Quizzes on Social Media.
Though for this one the behavior is at least reasonable (even though it can be confusing if you don't know how Generators work).
I'd also say that using return with a value in a generator is just asking for trouble :-D
Very true lol
16:57
PHP is 1-7 Monday to Sunday while sql server is Sunday to Saturday?
17:08
It depends
Sunday can also be 0
if(date('N', strtotime(' - 1 days')) == 7){ vs SELECT DATEPART(weekday, dateadd(day, -1, getdate())) which returns 1
Does PHP have a 'in set' conditional?
Looks like in_array() is the trick
you probably want idate in that case, and besides N, there is also w (sun = 0, sat = 6)
The N is from the ISO 8601 week calendar spec, which does Mon = 1, Sun = 7
ah, ok, Thanks for that Derick
17:33
@IluTov I wrote a comment but still thinking about the rest.
 
1 hour later…
11:11 for the value...
@TimWolla You didn't express an opinion for the secondary vote.
@Derick Are you referring to the BCrypt RFC or the HTML 5 RFC?
If the former, I voted for the secondary vote, but specified the tie breaker to be "11" in this email: externals.io/message/121115#121116
If the latter, I don't care about the secondary vote.
 
4 hours later…
23:16
the html5 one... you're the author, you should have an opinion :-þ

« first day (4734 days earlier)      last day (434 days later) »