« first day (4365 days earlier)      last day (574 days later) » 

8:06 AM
hey guys i got an issue with installing laravel
even after adding the PATH the command is still not found
you can see i installed laravel successfully and added the path here : https://snipboard.io/BpvM8s.jpg and here https://snipboard.io/7zy6qJ.jpg
 
 
1 hour later…
9:07 AM
@LeviMorrison Would that vec type be typed by its elements? Like Vec<Int> for array of ints?
Because the notation is still not possible :d
@LeviMorrison Good point. I guess that could be solved by allowing array<int>, which is forced to not be a dict/hashtable
@Yanis You should probably ask in a Laravel channel. :) Try IRC, for example (libera server).
Couldn't type hinting work like attributes?
Like you give responsibility to the class to check if it fulfills the type-check? During runtime.
So you could allow the Thing<Foo> syntax, and the make it up to the class to implement the correct attribute to check it.
 
9:32 AM
@OlleHärstedt is there any such channel??? i cant find it really
 
@Yanis irc.libera.chat, /join #laravel
 
cmb
@OlleHärstedt There is a performance issue: if you check if all elements are of a certain type all the time, that is slow. Optimizations are possible, but are hard due to references. Note that there was wiki.php.net/rfc/arrayof quite a while ago, but that was rejected.
 
@cmb Tarballs are now in distributions
My connection is like tar this morning
 
cmb
9:52 AM
ta
 
@cmb Not all the time. You only need to check the supplied argument for a function. But yeah, it's overhead compared to an int compare in C, true.
Maybe that's what you meant with "all the time" ^^'
 
cmb
yep :)
 
So you want it to be at most an int compare? Even with generics? Is that possible even?
Or, what's the best runtime performance imaginable with generics?
 
cmb
10:09 AM
You could check whenever an element is added; references would be a problem though.
Best performance would be with type erasure (although you already can have that with static analyzers).
 
cmb
10:21 AM
@Sara, did you forget to tag 8.0.24, or is this @GabrielCaruso's turn?
 
@cmb What's "added" in this context?
@cmb Sure, but this is PHP :D
 
cmb
10:36 AM
@OlleHärstedt "added" in the broadest sense (might also be a replace operation). Basic idea is that only values of a certain type could ever be added to the vector.
 
11:12 AM
@cmb OK, but then you don't check type at function call? You still have to do that, I think...
Yeah, that's a lot of extra operations :d
 
cmb
11:28 AM
@OlleHärstedt You would only check that a vec<int> is passed to a vec<int>; this exact type would need to be stored internally anyway.
Checking all elements every time would yield a lot of unecessary checks.
 
you'd surely check it when adding things to the vector?
 
cmb
Yes, see discussion above. :)
But, heh, references. :(
 
don't allow them with/to vectors
 
@cmb How would you store that? It would be at least two int compare tho, no?
One for vec, one for the generic <int>
 
cmb
11:48 AM
Depends on whether the implementation would be reified or monomorphized; see github.com/PHPGenerics/php-generics-rfc/issues/44
 
+1
Now I have to learn stuff... ><
Terrible, horrible.
 
12:33 PM
@Sara @GabrielCaruso who is going to take care of 8.0.24 ?
 
1:27 PM
Is this a PHP bug? 3v4l.org/YDJnU "self" in property type is not resolved
Not even when traits aren't involved 3v4l.org/q6978
Oh, it's never resolved, not even for methods. So it's not a bug.
 
cmb
Probably a good idea to improve the documention in this regard (reflection docs are sloppy at best).
 
1:52 PM
@RemiCollet Sara, I've asked her last week - I'm over the USA, and I don't have the bandwidth neither time to take care of the releases this week, I'm sorry!
@cmb I've asked her to take care of this one - I tagged two in a roll, and I'm traveling this week
Worst case scenario, I'll have tonight (San Francisco, CA time) to do it
 
 
1 hour later…
3:13 PM
@OlleHärstedt Ideally, sure. But I don't know if it's time to try and cross that bridge. It's a big bridge.
 
3:40 PM
Right
 
cmb
3:51 PM
@GabrielCaruso she's at it :)
 
Didn't someone suggest to just add the notation, without any functionality? So analyzers could at least use it instead of docblocks.
 
cmb
4:11 PM
@Sara You should also cherry-pick github.com/php/php-src/commit/…; very minor issue, though.
 
4:47 PM
morns
 
5:09 PM
@OlleHärstedt I believe Mark did.....but to me that brings most of the downside (a fixed syntax, having changes need to respect BC with PHPs release schedule) with not many upsides, other than 'inline types are easier to read than doc-block type-hints'.
 
5:25 PM
Hm
Wow, they mention Hack... Different times, 2016. :)
@cmb That RFC is huge :O
Another thing I'd like to ask is if
```use <build-in type> as foo;```
is blocked arbitrarily, or as a design choice, or for technical reasons?
 
cmb
5:49 PM
I don't think there is a technical reason to not allow this (although, only changing the parser won't work); it is probably not supported because the use cases seem doubtful. If you want a length, use a value object (this way you can even support different units).
 
@cmb Why not only the parser? A type is a type...? Maybe not
Use-case is part of allowing union types too... :d
 
cmb
Builtin types are handled differently than class (etc.) names.
 
Alright
 
@OlleHärstedt If you allow aliasing, then in general there are a bunch of short-circuits we can no longer take. For example, if we have a type check $foo instanceof Bar, and Bar doesn't even exist, then we know $foo can't be Bar. With the alias, this is no longer true and we'll have to trigger an autoload first, and then see if it's a Bar. Something to be aware of.
 
@LeviMorrison Hmm, is this related to allowing built-in types? Or does that problem already exist?
Or wait, you mean with union types?
 
6:12 PM
What I want is not necessarily "type alias" (not sure how it's defined), but just to extend use-statements for built-in types and union types.
 
6:52 PM
@cmb I actually did notice that in testing and decided I was okay with 8.0.24 having a "failing" test. VERY minor issue, after all.
@RemiCollet Yeah, sorry, yesterday was tiring...
 
cmb
@Sara yup, no problem :)
 
cmb
7:25 PM
@Derick I've been told a few hours ago that the 7.4.32 Windows builds have been started, but no further info since then.
 
7:38 PM
I'm really struggling when it comes to arrays and transpile-php-to-c ><
I'd like to have fixed-size array, tuples, dynamic arrays, hashtable, and possibly lists
You can somewhat infer it from usage
But which notation is best if user wants to enforce, say, tuple return type?
/**
* @return tuple{0: int, 1: string}
*/
function foo(): return array
Thing is, it must return array to enable destructoring, like [$a, $b] = foo();
But then `@return` is different than the actually hinted return type. And Psalm would freak.
One solution to this is to always annotate unions, like `@return tuple|array` and
function foo(): return array|tuple
where tuple is a dummy class
And if you replace all with classes, you lose the handy [1, 2, 3] array notation.
I could imitate Psalm, to add my own annotations, like @param-pholly vec<int>
Then Psalm/Phpstan wouldn't be affected, and type annotation could differ to docblock. :d
 
uwuify
fastest text uwuifier in the west

transforms

Hey, I think I really love you. Do you want a headpat?
into

hey, (ꈍᴗꈍ) i think i weawwy wuv you. ^•ﻌ•^ do y-you want a headpat?
uwuify - PHP is lagging.
 
@Danack It appears the repository is nicely split into library and binary, so you could build a PHP extension linking to that library.
 
oh my thawt iws wondewfuw.
 
7:56 PM
It appears I made a mistake. I am sorry. I meant: it appeaws the wepositowy is nyicewy s-spwit into wibwawy a-and binawy, o.O s-so you couwd b-buiwd a php extension w-winking to t-that wibwawy. (U ᵕ U❁)
 
Right, time to invite internals people to this room then.
4
 
Should this code work? https://3v4l.org/8aQvJ
Destructuring reference array return type
 
It makes sense that it works, and also you're a bad person for doing it.
 
8:11 PM
https://www.php.net/manual/en/language.references.return.php#80776
This explains it, had no idea references were "optional", lmao
@Crell Transpile-to-c. That's my excuse for everything.
 
@OlleHärstedt I think that varies with the language version. Note the date on that comment.
 
Hmmmm. Lemme try it in 3v4l then
3v4l.org/798n5 Looks the same for 7.4+
Kinda quirky :)
RETURN_BY_REF only applies together with ASSIGN_REF, it seems
 
 
3 hours later…
10:57 PM
@cmb just learned that Windows DLL builds are broken via news-web.php.net/php.internals.win/1241. Was there any discussion about this since the last mailing list post in July? news-web.php.net/php.internals.win/1246
 

« first day (4365 days earlier)      last day (574 days later) »