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

5:02 PM
I was asked to link this for your reading "enjoyment"... a tutorial I happened across and worked through... which includes two failing tests... laravel-news.com/your-first-laravel-application
And a couple other issues I managed to resolve on my own by googling... a lot...
My attempt working through the tutorial, with issues I encountered documented in the README: github.com/tiffany-taylor/laravel-links-tutorial/blob/master/…
 
Does running php -r 'dns_get_mx("qa.php.net", $x);' result in a multi second hang for anyone else?
 
Does the OS matter to test it on?
 
No, but...

$ time sapi/cli/php -r 'var_dump(dns_get_mx("qa.php.net", $x), $x);'
bool(false)
array(0) {
}

real 0m0.114s
user 0m0.016s
sys 0m0.015s
So it's quick. Failing, but quick.
 
Also fast on windows
 
fine here too
I would like to chat about the match expression for the podcast... any takers?
 
5:26 PM
Seems like @IluTov is a good candidate to explain the reason behind the madness :)
 
/me points at @IluTov
 
I've asked him before.
 
Jul 17 at 11:02, by IluTov
@Derick Nah probably not ^^ Public speaking (no matter the setting) makes me very uncomfortable. Since I'm working on php-src in my free time I want it to be fun instead of becoming a chore.
 
Yup, and that's totally fine.
 
Ah that's totes fair
 
5:44 PM
@Derick Probably best candidate is Nikita. He was quite involved with some of the technical difficulties. He's also pro-blocks, maybe he can also change your mind on them :D Obviously Nikita has a lot going on, not sure if he has the time and/or is willing to do it. Another one is Tyson Andre, he also did a ton of reviews and knows quite well how it works.
 
Tyson also declined to talk with me. And I just edited an ep with Nikita! I like him, but I also like some variation :-)
 
So you are saying you need more new RFCs to fill the gap? :P
 
> RFC: Use OpenAI-generated RFCs to ensure that at least one RFC per day is published
Jun 5 '15 at 12:33, by DaveRandom
More errors occur on Friday than Monday
 
@DaveRandom ah, well that explains "Objects can be declared falsifiable"
 
fraid not buddy, that pos was all biology
feeding OpenAI just a TOC and abstract of an RFC sounds like fun
 
5:55 PM
We could have GPT-3 write the code. Then, if the code that generates the RFCs was written in PHP, then it could be a self-expanding language
Feed it r/php and other popular forums to work out what developers want
 
definitely do not get mixed up and feed r/php into GPT-3
you will not go to space today
 
@AllenJB ok satan
 
I prefer "OK boomer", that's a little on the nose
 
ok zoomer
 
...I don't even know what you are trying to imply with that
 
5:59 PM
My computer's performance has taken a hit. I need more memory.
 
though I will admit that I do still have zoom open from the other day so... fair enough
@SalOrozco what does "taken a hit" actually mean in terms of cause and impact?
 
@DaveRandom How did we all end up using zoom?
 
it turned out to be the least shit
 
What wicked black marketing made that broken thing a thing that everybody us using?
@DaveRandom I disagree :P
Even skype is better
 
all of the ones that actually "work properly" that I have seen are not granny friendly
@PeeHaa steady now
I get what you mean, and I'm all for hyperbole, but there are limits
 
6:02 PM
Come at be bruv
 
@Derick You're just afraid Nikita will convert you to pro-block :P Haha sorry it's not my fault Nikita is involved in practically everything when it comes to PHP :D
 
We are a fucking tech company. No grannies involved
 
except you
 
To many chrome and firefox tabs, run VM's and other stuff. It used to handle this. Now it just slows to a crawl.
 
Even after the 100th huge fuckup they still think it works
 
6:03 PM
@PeeHaa if I attempted to do so over skype you would have died of old age before it had rendered me saying "come on then"
 
:D
 
seriously though, zoom isn't that bad
I have to use Teams at work
man that thing can seriously go blow itself out of it's own asshole
 
We use google meets.
Is alright.
 
Zoom is more leaky that your mothers watering can
 
lol
 
6:05 PM
@SalOrozco well that's google all over, simple, functional and not particularly feature rich
 
You guys are real pals.
 
@PeeHaa they're called "knickers" in english
 
lol
 
So the kid who hacked a bunch of verified Twitter accounts, his court hearing was done over Zoom... and as you expect, people hacked in, and at one point porn was played over the call
 
haha
I read the story about how they were able to break in.
 
6:11 PM
he stood on another kid's shoulders with a trenchcoat over them?
 
hahha
That guys face
 
"hacked in" is often a strong term for these cases - frequently they're just left public (or "anyone who has the URL" with predictably sequenced URLs)
 
Yeah, I couldn't think of a better wording for that so just went with the easiest/laziest
 
NO @AllenJB hAcKed!!!1111
 
6:15 PM
lol
 
"accessed"
 
Hacked is any unauthorized access.
 
6:29 PM
@IluTov I don't mind blocks in general, but there wasn't a thought out general plan to also support it with the short arrow "fn" functions
 
apparently they set their username to "John, BBC News" and were approved for access.
 
lol
amateurs
 
@Tiffany So....I don't like those tests, but the exception isn't the real issue. The two problems are i) the controller doing the validating, rather than it being a separately test-able piece of code. I know that's common across both Symfony and Laravel, but I hate it.
 
Dan Ackroyd, Actor
 
@Derick I realize I did a bad job at communicating the first time. There was actually quite a bit of thought I put into this. We can support blocks language wide, but we probably shouldn't. Blocks for match, blocks for fn and blocks in general should probably all have slightly different semantics. The main complaint was that blocks shouldn't have special rules but most likely even if we do language wide blocks that would still be the case.
 
6:33 PM
ii) The tests having to know the details of the validation exception object.....that could be fixed by having a custom assert to use like this: github.com/Danack/Params/blob/master/test/ParamsTest/…
which also makes the tests easier to write and maintain....
 
@IluTov why should we not?
 
But I'll try to explain that better for 8.1 :)
 
@PeeHaa and apparently conspiracy theorist....
 
fn($x) => match ($x) { $x => {do a thing; $this; } };

Loophole!
 
@IluTov also, why should they have different semantics?
 
6:36 PM
@bwoebi externals.io/message/109590#109645 At that point, people probably stopped reading :)
Oh sorry, wrong link.
 
Nude model even. That's the best M in MVC
 
> She should not be confused with pornographic actress Tiffany Taylor.
I have a common name I guess
 
@bwoebi Phew, that took some effort to find ^^ mail-archive.com/internals@lists.php.net/msg102137.html
The one workaround here would be to make all blocks implicitly return void. But in my option that would not be a great solution.
 
...talking of zoom bombing, my local user group this week:
> In this talk we'll look outside the box at some things PHP provides like references, autoloading and magic methods and explore how using them in an unconventional way can benefit our own code.
 
6:54 PM
@IluTov Well, wouldn't it be simple: require the return value, if the value is read - can be easily determined at compile time. If you start distinguishing contexts (match, fn, ...) well, then you make your own life complicated for no gain
And yes, free-standing block expressions are usually not that easy, but at the same time we can introduce:
$val = if ($cond) {
    return $foo;
} else {
    return $nothing;
}
which may be more explicit that just repeating the $val assignment twice
 
@bwoebi How do you determine in a fn if a return value is required?
 
@IluTov in fn return value is never required (functions have a default null retval)
but that's not specific to fn
 
@bwoebi Yes, but that's a special case again. It's a nested expression so if we don't want special cases we would have to require a value.
 
@IluTov well, I'd say this is just trivial function semantics, not a new special case
fn() {} and function() {} would be virtually identical except for parameter binding
 
@bwoebi There are really two cases where a return value is not required. In match that doesn't make use of it, and in void functions. All other cases require a return value.
 
7:01 PM
@IluTov free standing blocks as well as blocks which are part of a construct (i.e. if, for, etc.) do not require a retval either
 
@bwoebi Yeah sorry I was referring to the block expressions. The terminology here is hard which I guess caused most of the confusion.
 
@IluTov we will be able to simplify block statements to block expressions later on
 
We have to decide, do we keep block expressions and statement lists separate or unify them? Unifying them causes semicolon ambiguity, not unifying them means we have to specifically allow statement lists in match and fn.
 
and if we do that, we have essentially three types of blocks: blocks where the expression result is read somewhere, block where it isn't and blocks which are part of function/method decls
@IluTov which semicolon ambiguity?
example?
 
@bwoebi Free-standing blocks would now be expressions, but would not require a semicolon.
{
    foo();
}
 
7:04 PM
right, is that a problem?
yes, it is.
 
@bwoebi It can be solved, but people had a very very hard time understanding when the semicolon is required.
 
{ foo(); } + 1;
 
@bwoebi Anytime a block would appear first thing in a statement it would be considered a statement list. In every other case a block expression. People had trouble understanding that. And yes the grammar for that is quite ugly.
 
@IluTov that sounds like a horrible hack
 
@bwoebi Basically explained here: wiki.php.net/rfc/…
@bwoebi Maybe, although Rust does the same.
Something else that is quite annoying is that terminating blocks don't really require a return value but we can't possibly check that at compile time.
echo match ($foo) {
    'bar' => {
        // This should be fine.
        throw new Exception();
    }
};
 
7:15 PM
Well, throw is an expression now, so it IS fine.... sort of
 
@Sara Only if you don't do the braces.
Same thing would happen with functionThatAlwaysTerminates();.
throw we could even add as a special case but function calls we can't.
 
7:29 PM
What is the expected released date of 7.4.10 @Derick?
 
4 weeks after 7.4.9, so September 3rd
 
Awesome tnx <3
 
7:49 PM
@PeeHaa why?
 
I am hoping I can nudge you in the meantime re @Ekin's dns issue :D
I promise we will all renew our phpstorm licenses when it is up again <3
 
ZOMG \o/
 
Though, I just noticed that I somehow managed to typo a one line change
 
Hey you can typo all you want if you fix our system this fast <3
 
7:52 PM
omg you did it \o/ yay
thanks and sorry that I added this on top of your monday :-P
 
8:06 PM
@Crell Just of out curiosity, do you still feel the same about blocks, especially out plans with enums?
 
Hm, what?
/me tries to catch up.
 
@Crell Oh you don't have to read everything, the answer might just be "yes"
(match blocks specifically)
 
My main thing is "don't special case this one place, that's just confusing."
 
@Crell Ok, then maybe you do have to read the whole thing above :) There's no way around special cases.
 
A broader solution I am open to discussing, but I am concerned about it resulting in even more unmaintainable code and our own special version of callback hell.
 
8:13 PM
@Crell I think that's like saying ifs are bad because can nest them. Sure, you can, but you also can not :)
 
If you have several nested ifs, I'll tell you to refactor it to use filter. :-)
Or break some out into sub-functions to handle part of the logic.
 
@Crell That's absolutely valid. But we wouldn't say if statements are bad, never use if, because you can write code that's bad that uses if statements :)
 
@Danack Was maybe interested in that specific talk
 
I didn't say we should never have multi-statement expressions, just that my concern is people effectively writing ES5 Javascript with it. :-) If we can come up with a good way of getting benefits without the downsides, I'm open to it.
"More things should be expressions, not statements" is a general concept I can get behind.
 
@Crell "If we can come up with a good way of getting benefits without the downsides, I'm open to it." Can you elaborate on that? The downside being deep nesting / too much code in a block. We can't really limit either of those.
 
8:18 PM
Honestly having been working mostly in Typescript recently, auto capturing variables for multiline statements is fantastic. I value the implicit return of short closures, but for PHP I think

function() use (...) {

}

and letting it auto capture would be brilliant.
 
@MarkR Well, we'd probably want to re-use the short closure syntax, so fn() {} or fn() => {}.
(Since short closures already do auto capturing)
 
fn() => { } would also be rather ambiguous on the return would it not? That didn't seem to go down well the first attempt for match
 
I've never been convinced why auto-capture and short closures need to be coupled together
 
@IMSoP Convenience, encouraging more functional code.
 
I'd likely prefer to keep fn() => (single expression) and function() use (<syntax tbd>) { ... } to be auto captured. Then again, I'm fine to changing my mind so long as there's no implicit return fuckery.
 
8:25 PM
short closure syntax as a special case for "this is a single expression, you don't need to worry about scope, and return values, and all that jazz" works really well IMHO
multi-statement functions that have auto-capture are a completely different feature
but then, I'm still not convinced about auto-capture full stop
 
Thinking more about it though, the shortest form would be fn() => (expr) which would be different from fn() => { (statement_list) } .... so I actually retract my preference
 
PHP's scope rules are so much simpler than a lot of languages, and I like that
 
@IMSoP Are other languages' scoping rules really hard though? I think the concept is usually pretty easy for beginners to grasp.
 
take a look in the [js] tag on stack overflow, and tell me how long you go before you hit someone misunderstanding nested scopes
 
@IMSoP Isn't that more because var didn't do what people actually expected?
 
8:31 PM
Yes, yes it is.
 
isn't that the same thing as saying the scoping rules are complicated?
 
@IMSoP Not really, it's just that people thought the language was smart enough to implement scoping in a sane way.
 
so... let's not do that in PHP then
and right now, we have neither block scope nor an equivalent for let
 
@IMSoP Yeah sorry, this discussion probably isn't for PHP, the ship for PHP and block scoping has probably sailed.
 
I wasn't talking about block scoping, though, I was talking about the fact that auto-capturing closures would completely change PHP's scoping model
 
8:34 PM
I wouldn't go that far... I imagine eventually PHP will need to add variable typing, at which point that would open up let / const / scoping
 
oh look, a discussion about short clousure syntax.
self-defenestration intensifies.
 
heh
 
@IMSoP Well ok, it's actually mostly about implicit variable declaration. This is the only reason auto-capturing for PHP is kind of dangerous.
 
no, that's not it either; right now, PHP's scope is "inside-first" - a variable is always local unless you've explicitly mentioned some other scope
pretty much the only exception are superglobals
 
@IMSoP There's only one scope per function for all local variables.
 
8:38 PM
we can't access properties of the current object without going via $this, we can't access global variables without importing with global (or $GLOBALS), and we can't access captured state in a closure without importing with use
@IluTov but variables captured by a closure aren't local variables any more; they're teleported in from the outer scope
 
@IMSoP Yes. If we had to explicitly declare variables we could differentiate between vars we want to define inside the closures and those we want to capture.
 
well they're copied by-val, so teleported is maybe the wrong word, it's not the same var
 
$x = 10;
$callable = fn() {
    $x = 20;
};

// what we meant was actually

let $x = 10;
$callable = fn() {
    let $x = 20;
};
Because there's no such thing as a variable declaration any variable that by chance has the same name in the outer scope will be captured.
 
I think the question in my mind is why adding those lets to keep the variables separate is any better than adding the use when you want to keep them the same
 
@MarkR Oh I forgot, the above wouldn't even do anything bad.
@IMSoP Explicit variable declarations also protect from typos and shadowing variables can also be useful.
 
8:44 PM
@MarkR that has been subject to debate, though; some people want to completely replace function()use() with something as short as possible
 
I'm not overly fussed about if it's function() or fn(), but what does annoy me no end is when I have a list of use (...) statements across half the screen
 
@IluTov We could if we had a @@NoReturn attribute :)
 
@IluTov fair point; do you see mine, though? people talk about auto-capture as though PHP's scoping rules are broken, but I really don't get it
 
@Sara But not if the function is a user-land function right?
 
Why not?
 
8:47 PM
@MarkR I can't remember if it was you I said this to before, but isn't that just like having a long list of function parameters?
 
@Sara Because we don't have that information available at compile time.
 
as in, why do all those functions need to capture so much context?
 
@@NoReturn
function tableFlip() {
  throw new (╯°□°)╯︵ ┻━┻;
}
2
Right. Fecking late binding.
 
@IMSoP I do see your point. Both solutions require more boilerplate, just in different places.
 
That's a point, is it too late to add a standardised annotation for throws before 8.0?
 
8:49 PM
@MarkR @IluTov makes a good point that it wouldn't necessarily be actionable
Particularly with object methods.

$foo->bar(); // What class even is $foo??? VERY hard to know at compile time.
 
same reason we don't actually enforce void on the calling side
 
@IMSoP Exactly. For the same reason we can't know if a match block needs to return a value :/
 
I'm more thinking that it's super-common and can be clearly expressed. The community is going to try and make one up otherwise and chances are they're going to want to dump it in the root, and apparently we're cursed to live there forever so we might help the community long-term if we take the initative and standardise it
 
@MarkR Any reason not to make it an actual type instead though?
 
@IluTov Not sure I follow
 
8:51 PM
In type theory, a theory within mathematical logic, the bottom type is the type that has no values. It is also called the zero or empty type, and is sometimes denoted with the up tack (⊥) symbol. A function whose return type is bottom cannot return any value, not even the zero size unit type. Therefore a function whose return type is the bottom type cannot return. In the Curry–Howard correspondence, the bottom type corresponds to falsity. == Computer science applications == In subtyping systems, the bottom type is the subtype of all types. (However, the converse is not true—a subtype of all types...
 
but like void, the really interesting parts of that relying on knowing it on the calling side
 
I was thinking more towards IDE-focused annotations and hints rather than directly functional.

@[Throws(MyException::class)]
function doSomething(int $x): float {
  if ($x <= 0) throw MyException();
  return sqrt($x)
}
 
@MarkR I see. Those two are slightly different, it could also just exit which is still terminating.
 
What I think we want to avoid is every different major package out there coming up with their own versions for all the common things. This is partly why I was hoping for namespaces so we could just throw dozens of them into a \PHP\Attributes NS and be standardised out the door
 
@MarkR Also, something can throw in some cases but not in others.
 
8:57 PM
@MarkR there's pros and cons to having a big standard library; sometimes, providing the tools and letting the users innovate and share is more powerful than trying to design everything up front
 
I'm just concerned that reconciliation between them all is going to cause an unnecessary lag.. it needs either a PSR\ or a PHP\
 
if the implementations all end up identical, it won't matter; if they don't end up identical, maybe there are design decisions we're quite likely to get wrong
 
Well they have to be referenced by name so it'll matter somewhat.
 
matter to whom?
 
Anything that needs to use the metadata, such as IDEs.
 
9:06 PM
I guess, but mostly those kind of tools just get patched to recognise all the variants
 
and that's where it starts to get confusing and inefficient, hence the advantage of standardisation.
 
@IMSoP True. And if we do get it wrong, chances are high user-land implementations will pop up either way.
 
@MarkR sometimes; sometimes everyone just ends up agreeing that no new implementations are needed, and you get a standard by default
other times, it becomes a mess, and somebody has to bang some heads together to sort it out
 
@MarkR or intersection types...
 
9:21 PM
@Danack #[Symfony\Throws|Doctrine\Throws (MyException::class)] ...?
or did I missunderstand what you meant
 
@MarkR ArrayAccess&Countable is an intersection type
 
oh intersection, my bad. Brain was working on what we already had
 
10:01 PM
I have a leak when I do make test that doesn't occur when I use run-tests.php. After figuring out the disparities between them, the offending bit is... CC="cc". Somehow setting this for the test makes the test (or maybe valgrind itself) to leak. WTF.
 
10:31 PM
Memory leak in zend_string ・ Scripting Engine problem ・ #79951
 
00:00 - 17:0017:00 - 23:00

« first day (3586 days earlier)      last day (1353 days later) »