« first day (3946 days earlier)      last day (984 days later) » 

12:26 AM
@Tiffany ehmagawdddd
 
 
3 hours later…
3:17 AM
What are your thoughts on this one 3v4l.org/VOoa3/rfc ?
While the RFC of `never` return type did not mention `trigger_error` function. It behaves exactly like `exit` and `die` inside a never-returning function.
So should we be worried about this? is there any plan of deprecating `trigger_error`? if this function will be alive in future versions then we need to make sure an explicit `exit` is always there in E_USER_ERROR case. Or probably an implicit?
 
 
1 hour later…
4:21 AM
@Rain It doesn't behave exactly like exit. It behaves like a thrown exception
 
4:58 AM
@PeeHaa What I meant is that in a never returning function trigger_error matches exit, die and also a thrown exception in that it ends a function execution without returning.
 
 
2 hours later…
7:01 AM
urn: URIs are not validated properly ・ URL related ・ #81332
 
7:58 AM
What's the latest on "?X&Y" — @Girgias ?
@MarkR I didn't know you spoke welsh!
 
 
1 hour later…
9:29 AM
@Derick No idea, I'm not the author, I still think it's a terrible idea but
 
I meant like is it coming up for a vote? Wondering whether I should have it on the podcast (I think not... but)
 
No idea either, I would have expected but eh
 
10:05 AM
Morning
 
11:02 AM
Morning
 
11:21 AM
This multisort method is a work of art (from circa 2005 according to the CHANGELOG - someone posted this in Libera #php asking for help updating it): github.com/Machiel80/User-manager-for-PureFTPd/blob/…
 
That's a relic
 
Hide it before Nicolas Cage steals it.
 
 
2 hours later…
cmb
1:08 PM
@Tiffany, if you write something like Fix #81328 … in the commit message, the respective bug report is closed automatically on commit. :)
 
2:02 PM
@MarkR about type erasure ... first, type erasure would not excuse us from implementing generics in the proper (reified) way, there's no escaping that so it doesn't simplify generics (actually it makes them more complicated with the option to "erase" them)
second, we can't actually erase types, there's so much code dependent on it - all dynamic code, inheritance, the jit ...
third, I've come at it from every direction I can think of, and the complexity of it balloons as you near a complete solution, and I can't even think up nice ways to implement that complete solution ...
/*
  +----------------------------------------------------------------------+
  | Zend Erasure                                                         |
  +----------------------------------------------------------------------+
  | Copyright (c) Joe Watkins 2021                                       |
  +----------------------------------------------------------------------+
  | This source file is subject to version 3.01 of the PHP license,      |
  | that is bundled with this package in the file LICENSE, and is        |
this is not bad (it looks simple), but only ignores return and param types on strict code, doesn't handle property types (because ballooning) ...
this just doesn't seem worth it, it looks like yet another way to complicate the type system ... complexity which isn't really worth it ... imo we're stuck with runtime type checks, it's on us to make them fast, removing them doesn't make a lot of sense
also that code I posted breaks the JIT (or rather, has no effect in jit), I couldn't be bothered to take it further, because I'm pretty convinced this is a dead end ...
 
@JoeWatkins Would you consider code that eliminates having to check zval types in favour of direct optimizations to be erasure?
 
Incident with GitHub Actions
Incident with GitHub Actions ・ GitHub Pages has Partial Outage
 
@MarkR consider anything that results in type checks not being performed as erasure ... technically I guess erasure can either mean the actual type information is erased, or that the instruction that verified the type info is erased (no-op'd) ... there isn't really nice ways to do either of those things and not break everything
but what we can do is specialise vm instructions to ignore types, which is what I've done there ^
 
@JoeWatkins The Q I asked in the later conversation was about skipping type checks on parameter receive, for example, if the caller could guarantee that the parameters would be of the right type. And how a large constraint seemed to be that optimizations could only be made one module at a time.
 
if the code is tested in strict mode, you have that guarantee ... or you can make the assumption that RECV doesn't need to check because it would have errored in testing ...
if you're talking about specializing SEND, I'm not sure where the win is (you would still have to check types, just on the other side of the function boundary, which is sometimes impossible) ...
also, I tested on the phpunit test suite, with a debug build which is not the best env for testing, but it wasn't even worth a second (out of ~1m 14s) to erase/ignore return/param types ... it really looks like a dead end ...
 
2:18 PM
My thought was there's 3 main places where type checks get performed, on receive, on return type, and on setting properties. If opcache can already optimize away the return type, if whole-application state were possible, it should be doable for the sender to guarantee at compile tiime that the sending params are of the right type, and skip over the recv type checks entirely
Perhaps I'm feeling a little bit spoiled with TS
From what little I know it seems you could do that within the same module, but as soon as you use the return type of say, another class, or a user defined function, you're out of luck.
But re: performance, I am more thinking of if PHP ever gets things like TS's per-variable types e.g. let int $foo = 123; $foo = '567' // nope @ compile
 
imo going down this road doesn't lead to an actual win ... only complexity by the shit load, for so little gain that its not really worth considering as a solution ... and it solves a problem that absolutely nobody has, I can say with extremely high confidence that type checking isn't bottle necking your application ...
 
Is unboxing possible in PHP, theoretically?
That is, non-reference counted variables.
Kind of related topic (I hope)
 
@JoeWatkins It isn't now, but isn't performance one of the larger obstacles to generics?
 
pretty confident that reified generics will not be a bottle neck, you will be able to measure an impact, there's more instructions ... but if we're looking for things to optimize, it should be things that make an actual difference, and type checking is never ever going to be the thing that makes a difference
 
Any comments on Go's approach for that? You can use type-checking in combination with other stuff.
 
2:33 PM
FYI, one of the main bottlenecks of php-terminal-nes-emulator is type checking. If you have a really, really CPU-bound application, it can make a difference. But I think it's true that there are not many such applications in PHP at the moment.
 
So you're saying that performance will not be the blocker to generics?
 
also, I don't really want generics, but that's besides the point ... I don't want it because I don't really think there's a reasonable implementation possible, I might be wrong about that ... any implementation is going to add considerable complexity, a simple one is not really possible, and I don't think the win is very big, I don't find myself wanting generics every other day ...
 
Complexity in LSP, memory (i.e., redefining a class for each generic type), autoloading, etc. was the blocker as far as my understanding.
 
@Trowski not for me, for me it would be complexity that blocks it regardless of how it performs ...
 
@JoeWatkins Do you not use anything that handles collections, orm etc?
 
2:36 PM
@JoeWatkins Maybe it's time to make "type hints" just hints...
We can still have formal behavior, but the engine doesn't have to enforce it at runtime, which can be hard.
 
Static analysis has reached a point where if PhpStorm isn't complaining, my runtime problems are not going to be due to types.
 
The one thing TS is missing is an external data type, something that can reflect and do runtime checks.
 
@MarkR yes, and I've also worked on enterprise java applications, and the manipulation of collections is not less complicated there, it just uses a different paradigm in generics ... so when I work with these things today, I don't view generics as a magical solution to reducing complexity, I view it as quite the opposite - a route to even more complexity ...
 
@MarkR PHP doesn't have shapes, so I'm not sure how relevant that is for PHP.
 
@JoeWatkins Haven't generics been a thing in Java for like... 20 years?
 
2:40 PM
yes
well not quite, it's been a while ...
I think you misunderstood what I said ...
 
That reminds me, Joe did I ask you to come up with a ballpark figure for shapes?
 
don't think that was mentioned to me ...
 
humm, okay
 
@MarkR Thinking implied implements on objects?
+ public properties as API contract.
 
@Trowski To a degree, but starting off with something that was exclusively named (to get around the constructor positional problem) and could be inlined.
 
3:03 PM
Honestly, named args + readonly/asymmetric visibility + clone-with == shapes, to any meaningful degree.
 
3:36 PM
o/
 
3:51 PM
\o
 
\o/
 
Hello, any one familiar with this phpstan error, I checked it out and suggested it was upper case variable name or missing a $ but it's none of these and there is no | in the file ParseError (syntax error, unexpected '|', expecting variable (T_VARIABLE)) thrown while autoloading
 
4:23 PM
@KerrialBeckettNewham there's a typo in a file somewhere....
or you're using the wrong version of PHP.
 
4:52 PM
@Derick hah, thanks for sharing that bit of nostalgia. Digging into your bug report that alerted me to this also highlighted various other work required for wiki.php.net/rfc/internal_method_return_types
 
@PeeHaa 1 day and a half to go until vacation...
 
That's awesome
You still busy with work or already half way in your vacation? :)
 
5:35 PM
@cmb cheers
@cmb does it need to be in the message "header" or can it be in the "body"?
 
cmb
@Tiffany not sure; I usually just use Fix #12345: <title of bug report> (and shorten the title of the bug report if necessary (line should not exceed 69 characters)
 
Nice
 
cmb
but feel free to try it out :) (also there is some issue regarding GH issues, because these also would get a comment about the fix; fortunately, we have some time until this becomes an issue)
 
@cmb seen the libxml2 maintainer is stepping down?
 
All issues have been resolved!
 
it's sad to see some of the biggest companies in the world heavily relying in open source but having little/no commitment to fund it..
 
@PeeHaa I was trying to be in vacation mode mentally... but I have had too many unplanned events come up that is cause for some minor fire fighting. Almost there...
 
6:07 PM
it's 23 degrees here... at the beginning of August...
it's usually 35+ (bit of an exaggeration, but usually like 28-35+)
 
 
2 hours later…
7:49 PM
hello everyone
 
 
1 hour later…
9:11 PM
Does anyone have any opinion on which one is better here? github.com/php/doc-en/pull/770#pullrequestreview-723738199
 
cmb
@beberlei yep (I'm subscribed to the ML); to "good" thing: no more need to submit PRs or file bug reports
 
 
2 hours later…
11:28 PM
youtube.com/watch?v=bvAznN_MPWQ regarding climate change, worth a watch
 
11:53 PM
How to kill your cicd pipeline: Shove it on a single core and ask psalm to run over 200k lines.
 
o_O
 
im sure it'll finish... any hour now
hmm that's not so bad, once caching kicks in it completes in 1 minute 25, better than the 15 minutes before
 

« first day (3946 days earlier)      last day (984 days later) »