« first day (4364 days earlier)      last day (580 days later) » 

5:24 AM
hello do you have any book that suggest for clean rest api architecture on laravel
 
 
5 hours later…
10:06 AM
@AmmarDje I can recommend amazon.de/REST-Practice-Hypermedia-Systems-Architecture/dp/…. I have lost touch a bit with REST so I cant tell how current it still is. But back in the days this felt like the definite book to read short of reading Roy Fielding's doctoral dissertation directly. It does not cover Laravel though.
 
cmb
@Derick If I'm not mistaken, we're tagging GA releases today. Would we also have 7.4.31 with sec fixes? I'm asking because Dale is sick, so the Windows builds might be an issue.
 
did wordpress slow down when too much options?
 
10:29 AM
@cmb RC3, not GA, yes?
Or maybe you mean security releases ^_^
 
cmb
@LeviMorrison yeah, I'm referring to 7.4-8.1
 
10:48 AM
RE
https://stackoverflow.com/questions/73859546/i-changed-my-php-mysql-statement-to-a-prepared-statement-and-floats-changed-dec
What does setlocale affect in PHP?
I can reproduce what OP is seeing with var_dump, but not with echo
 
cmb
@Dharman prior to PHP 8.0.0, float to string conversion was locale dependend; see wiki.php.net/rfc/locale_independent_float_to_string
 
ohh, I didn't know that
thanks
I wonder why var_dump still applies the conversion
 
cmb
It's not supposed to: 3v4l.org/IZsbO
Hmm, are these even floats, or are they fetched as string?
 
Ahh, it's xDebug as usual
when I switched xDebug off, it shows them properly
 
cmb
11:04 AM
Consider to use a real debugger: dd() :p
 
11:21 AM
@cmb I can make tarballs, yes. I think we should.
@Dharman Can you summarise for me? setlocale shouldn't affect Xdebug's output either
 
@cmb I'm struggling to split out stuff from the type declaration page into the introduction. It doesn't feel like I should be talking about mixed, never, void and those things in there? But maybe it should? However stuff like literal types really do feel out of place
 
cmb
@Girgias Types which are only useful for declarations shouldn't be mentioned in the introduction (or maybe just a short note that these do exists). So basically, introduction should be about types reported by get_debug_type().
 
Okay huuuum, I feel I don't need to really amend the declaration page but more add more information to the introduction
 
cmb
And, yeah, I know this is an ugly "refactoring", but it seems worthwhile particular wrt. translations (otherwise I'd be fine with doing that piecemeal).
 
11:35 AM
wtf is this trailing whitespace script on GH not actually working...
 
cmb
I just commented there (TL;DR: just squash the commits).
 
bruh okay, well the build wasn't validating, but that's a pretty dumb script...
 
11:58 AM
@Derick When xDebug is enabled, it changes the output of var_dump. Apparently, it applies the locale conversion, which changes floats. I use xDebug v3.1.5
So I see something like C:\...\rubbish.php:13:
double(42,54)
 
Didn't someone wrote a guide on how to create an RFC? Like a scaffold? Was it @Crell?
 
@OlleHärstedt A new RFC wiki page will automatically be filled with a template.
 
@TimWolla Hm, is that a "good" template...? o0
Also, I don't have karma, so
 
I've created all my RFCs based on the template.
 
12:03 PM
@cmb Thanks +1
 
@Dharman It really does a comma? Odd - I should fix that.
(fwiw, I can reproduce this)
 
cmb
@Derick See wiki.php.net/rfc/locale_independent_float_to_string (changed as of PHP 8.0.0).
 
Oh, I know. I just didn't update Xdebug.
 
.youtube.com/watch?v=W4Mcuh38wyM Digital AI Creations
This tech gets more and more amazing.
 
12:21 PM
I mean... it's an easy fix, but now I need to add tests.
 
cmb
12:40 PM
@Derick Could you also assign CVEs? (see wiki.php.net/cve)
 
I've no idea how to do that
(yet)
 
cmb
There are detailed instructions: wiki.php.net/cve#for_php_developers
 
yes, reading... but doing some other things first
 
1:01 PM
@cmb Right, let me do this - do I understand right that 8.0.x and 8.1x need to pul lin my changes too, right?
 
cmb
@Derick Usually, you commit and merge up to the "higher" branches.
RMs can then cherry-pick to the release branches.
 
yes
but they need to do that before tagging GA
 
cmb
Also a mail to RMs would be good.
@Derick Right.
 
@cmb Do you think both fixes need a CVE?
 
cmb
@Derick IMO, yes. @RemiCollet, what do you think? bugs.php.net/bug.php?id=81726 and bugs.php.net/bug.php?id=81727
 
1:08 PM
I also agree, so i've added them.
 
IMHO (I already talk about) phar should be consired as "low" no CVE
phar is code... so unstrusted phar = untrusted code...
 
too late now :-)
 
cmb
That phar issue also affects PharData, and people might use this for tgz unpacking (especially since tar ext is PECL).
 
@OlleHärstedt I really strongly recommend putting draft words on Github or some other place that accepts PRs. There is a blank rfc markdown file here - github.com/Danack/PHP_blank_RFC
Not supporting PRs is one of the worst things about the wiki....the other being the dockwiki formating.
 
@Danack Great, thanks :)
 
1:17 PM
@JRL short version, I'm not sure. Senior developer version, what problem do you think you're solving by using traits, and what problem do you want to solve now that you're using traits? Meh version, the problem those libraries is addressing is quite a complex one.....and the complexity in the code you've written seems kind of appropriate to the difficulty of the problem.
About the only alternatives that I think would make sense is putting most of the code currently in the traits into 'just' functions, and then wrap those functions directly in the classes that need them, rather than pulling them in as traits.
At least then you'd have flatter classes, and I find that easier to think about than trying to understand hierarchies.
 
2:06 PM
@OlleHärstedt Nope, wasn't me. I just use the template in the Wiki.
 
2:51 PM
@cmb I hope I did that CVE submission right
 
cmb
"derickr is not recognized currently as an account participating in the Git Pilot."
Any news about Stas? I hope he's doing well.
 
i don't know
 
@cmb @Derick seems like that Phar fix broke some tests on CI?
 
works locally
link?
 
3:03 PM
@cmb ANy idea? You've made these tests :-)
 
cmb
bug81726.phpt is harmless; that is just the change of "failed" to "Failed" (as of PHP-8.0.0 probably)
exists_as_phar.phpt might fail due to deeper recursion; I'll have a look
I love sec fixes. Not.
 
cmb
3:46 PM
@Derick github.com/php/php-src/pull/9620 should fix the issue (someone should have a closer look at that code generally – or maybe not).
 
@cmb Ugh, duh.
@cmb Can you merge that, and merge up and email the RMs?
 
cmb
I'll merge after at least some CI went green (hopefully). Also, a fix for bug81726.phpt (PHP 8.0 and 8.1) is pending; working on that.
 
k
 
4:05 PM
@cmb I might skip 7.4.31 and tag it as 7.4.32 though... otherwise I have to do it all by hand and I'm lazy
 
cmb
@Derick Fine for me. :)
 
thank you @Gordon
 
@cmb >I'll merge after at least some CI went green (hopefully). => it seems 2 are green ;)
 
4:25 PM
gah... found a bug/issue in PhpStorm and a bug in Xdebug while recording a video
 
cmb
@RemiCollet done now. :)
 
JRL
5:17 PM
@Danack Yeah, the main problem that I thought I was solving by using traits was that different types of numbers share different combinations of properties and different versions/concepts of operations. So each of them might be composed differently, but without traits it would involve classes that are monstrously large, or a lot of repeated code that might be harder to maintain since bugs might be multiple places.
 
 
2 hours later…
7:00 PM
HI
 
'ello.
 
 
3 hours later…
10:14 PM
Would it make sense to implement "generics" for array type-hinting as a pre-step? Like array<int> for list of ints, or array<string, int> for hashtable string => int
 
JRL
for the engine you mean?
 
php-src yes
 
It's basically the same complexity
 
JRL
honestly, no idea then. every time i've seen discussion about simplifying generics into steps, someone with much more knowledge then me has explained some reason that can't work.
 
10:16 PM
and on that note I'm off to bed
 
10:26 PM
The "array" type-hint is really such a sore thumb... Too unprecise.
imprecise*
 
10:43 PM
@OlleHärstedt fyi, you can edit messages for 3 minutes. Either by clicking edit, or pressing up, on the keyboard. But be warned, it pings. For each edit. Which can get annoying. If the person doesn't like pings.
 
@OlleHärstedt Yes, if I get the mental energy I'd really like to work on a Vec type which can be trivially converted from an array. It would give up some efficiency to do so, but the inter-operation is probably worth it, at least in the short term.
 
JRL
wouldn't ext-ds offer most of such an implementation @LeviMorrison? or is there some functionality that it doesn't offer that would be difficult?
 
Ideally I'd have the ability for internal types at least to be able to implement be clone-on-write, just like arrays. It might already be possible by always checking the refcount internally on method calls and things, I haven't tried.
@JRL ds offers functionality of a Vec, and a way to convert from an array, but it has to copy it. It's also not copy-on-write like an array, and I think that's actually a nice property to have.
 
JRL
ah i see. i wasn't aware that distinction would affect the implementation so much.
 
10:58 PM
In my head I think it would be nice to have two implementation of Vec internally, and to choose one based on runtime conditions. For instance, if the Vec is constructed with an array that already meets the criteria of a Vec, then we choose the array-backed and proxy to the array. If, however, a copy needs to be made, then we choose an implementation that's more like ds's version (a contiguous chunk of memory).
The array based version avoids needless copying at the expense of slowing down some other operations. However, if you do an operation that takes a Vec and returns a Vec, then it's likely the result will be using the efficient version.
 
JRL
hmmmm. so you'd need to inspect for copy events forward to tell whether to substitute the ds-style Vec for the argument?
or would that substitution happen from a different parameter type and the engine doesn't need to look ahead?
 
These days, PHP arrays internally know if they meet the requirements; see array_is_list. In some cases it might need to be repacked; I'm not sure how common that is and whether it is worth repacking or proxying; I'd have to see. So whenever we make a Vec from a PHP array, we can just inspect the property.
 
JRL
oh well that's super nifty
actually yeah, if internally that's already the case, it's kinda curious that it doesn't already do that sort of optimization
i mean, i guess, you know someone has to actually implement it at some point
 
11:20 PM
It sort of does, but the trouble is that you can't represent those facts in the type system.
For instance, the type system can't represent an interface which requires you to return an array which meets the array_is_list requirements.
 

« first day (4364 days earlier)      last day (580 days later) »