« first day (3818 days earlier)      last day (1113 days later) » 
01:00 - 20:0020:00 - 00:00

1:09 AM
What would be some examples of methods that would return true from the isUserDefined or isInternal methods of ReflectionFunctionAbstract?
Well, I should ask, methods on a class that is user defined
I imagine all methods on a user defined class would return true and false for isUserDefined and isInternal respectively but I might be missing something
 
I'm attempting to try something out, but I dunno if it'll work
 
1:28 AM
not sure actually... trying to come up with a decent example but I don't have that much experience with Reflection :/
gist.github.com/tiffany-taylor/984b93bf9872e2b11352218ffee7a6c9 this is kinda what I was going with but it's unfinished
 
@hakre Some of my own do, not aware of anything in Internals that does (weird mindset of always trying to keep going even in the face of errors)
 
1:43 AM
@scorgn Yes, exactly. 3v4l.org/t8MOV
 
@Trowski Okay cool, I had imagined so but I didn't want to miss anything
 
@Trowski that is...far simpler than I expected
are there any elephpant logo shirts?
 
2:18 AM
Like one with the classic logo that would actually support the PHP project or someone involved with the PHP project instead of these gimmicky ones that were thrown on there by some profiteer
 
@Tiffany What'd you expect? :p
 
Something that used an abstract class
 
2:56 AM
Hello
 
@Tiffany Not only are there some, but I may even have a couple in a box somewhere (I still owe you an actual elephpant btw, don't think I forgot)
 
@Sara I'm guessing it's too late for the general public to get an elephant?
 
@Sara @scorgn can join our Among PHP group
:D
 
@Tiffany Is it an Among Us PHP group? :o
 
Yes :D every Sunday I think
 
3:07 AM
Ohh I can do that, I know you invited me last Sunday but I was out of the house
 
I think I sent you an invite over discord
 
Oh I haven't logged on discord in a while
I'll check
 
I sent it again
@Sara I would be interested in a shirt :O
 
There we go
 
Any of you ever set up a message queue in any of your projects?
 
3:13 AM
I have
 
Looked into Symfony messenger.
What did you use?
 
I used Laravel at the time, first I used their queue worker they had but that didn't support topics and stuff so I made my package for it
 
what kind of messages were you sending? emails? notifications?
 
I was actually using it to communicate between services
Not sending any notifications of any sort, but to send information down a pipeline
 
@Tiffany I'll try to find one before I send that elephpant. Though that may be awhile. My house is currently a warzone.
 
3:17 AM
Like, hey this person signed up with this information, whoever cares (whoever listens to signups).
Then a profile service, user service would both listen to that topic and create their respective entities
 
The app I'm working on uses no framework. So Ill have to figure out how to incorporate messenger without Symfony.
That's very cool stuff.
 
I don't have much experience with Symfony but I thought they made their packages easy enough to use on their own
 
ha
not that easy
They now have a recipe system. Like if you want to extend twig
for email templates.
It's some other package that creates some recipes in Symfony's configs.
It wires everything automaticly.
It works well when you're using Symfony.
The DI container Seems like an anti-pattern.
But I'm no expert.
 
3:41 AM
Laravel~~~'s DI container~~~ definitely supports a lot of anti-patterns
idk how to do the strikethrough
 
What I don't like about, Symfony seems like they expect you to create all your controllers in one folder.
 
Hmm, that doesn't sound right
 
I think you can change that somehow, but by default, the config is looking into one folder for all the controllers.
 
I'm sure you can register other folders
Does it not check subfolders of that folder?
I would expect it to check folders and subfolders
 
I'm sure you can point to other folders
in the config yaml
But just having it that way by default.
Some people leave it that way.
imagine all the mess lol
 
 
2 hours later…
6:10 AM
 
6:39 AM
Hi
 
6:55 AM
mornings
 
7:11 AM
\o
 
o/
morning
 
@LeviMorrison One example I remember is that you can set a RecursiveIteratorIterator flag to throw on getChild().
@LeviMorrison And one mindest to "keep going in the face of errors" I know about is called "define errors out of existence" for error handling, outlined in "A Philosophy of Software Design" (John Ousterhout).
@SalOrozco You need to compile a Symfony application, the instructions are called DI container and the compiling is called caching. :)
Why does inner platform effect come to my mind?
 
 
4 hours later…
11:01 AM
Hallo
 
11:55 AM
Create from format does'nt work for february ・ Date/time related ・ #80918
 
hm, that's not technically a bug, just ... surprising.
 
Odd, TIL
@Trowski do you care if I use something like this in the near future as an example? Assuming no one else documents it first.
(would be a good first contribution if someone wanted to take it on, would be nice to have full documentation for Reflection)
 
12:24 PM
Hello everyone. I'd like to ask, is it possible to add all the images of a post on the RSS feed of my website (wordpress)?

I've searched around and I only get results on how to add a featured image, but what I want is all the attachemnts of that post.
 
You'll have to parse the inner elements of the RSS feed and find the images
Unless I'm misunderstanding what you mean by "attachments"
 
Sorry, I just meant that I want the urls of the images to appear on the XML feed
But they are not, by default, I guess
 
Ahh, WordPress side, I can't help with that :/
 
Alright thank you no problem :)
 
1:21 PM
@Derick Only month who has an extra day or not depending on the year perhaps a bug there
 
@ln-s leap years? The date library already accounts for that, I think, and as a result, so does the DateTime classes/interface
There are a lot of things already accommodated for with the date library
 
@ln-s Yes, I also consider the month February to be buggy
 
lol
perhaps a bug due to february being on a leap year or not, I assume that the bugs reported here are checked before being reported here ?
or I can just report a bug with some swear words and it will be posted here
?
@NikiC
I assume yes
lol
 
1:46 PM
@ln-s they're bugs reported to bugs.php.net, Jeeves is a bot which scrapes the site for new bugs
Then sends a message here
 
SO no moderation
ok
while true; do curl .... ; done
If it happens I swear it wasn't me, promise
 
Well, whatever moderation bugs.php.net has
 
I mean there's a small captcha
 
2:15 PM
@ln-s There Is No Bug There.
 
I see
 
@NikiC That's why most algorithms move the start of the year to March 1st, and move it back later.
 
For some reason I thought things were verified before being posted here
I idealize too much
 
the bot isn't pre-moderated any more than you are; but both you and it can be post-moderated, usually by moving messages to a "friendly bin"
 
@Derick oooh, that makes sense
 
2:23 PM
ooh, on the note of Februaries ... any chance of having a replacement for mktime() in the DateTime interface, with sane parameter order?
 
@IMSoP I'd just use \new DateTimeImmutable instead
 
sure, but then you have to format to a string, which feels odd in some use cases
 
@NikiC I should do an article/video on explaining how github.com/derickr/timelib/blob/master/tm2unixtime.c#L425 works
I agree, but does it warrant yet another function?
 
dunno; I thought of it while answer this, which is basically the same as the bug report above, but with mktime(): stackoverflow.com/q/66851868/157957
which garnered the comment:
> FWIW, I think mktime is the perfect function for it, and much more solid than some magic strtotime incantation for instance… but its signature truly sucks.
it would be nice to have a single function that was "any time you're tempted to use mktime(), use this, it's better in every conceivable way"
 
I disagree, as mktime returns a timestamp, for which no local time can be associated with, and relying on an ini setting to convey timezone (date.timezone) is a kludge
 
2:29 PM
well, DateTimeWithoutTimeZone is also something I'd like, but that's a whole other can of worms
 
yes, that's just UTC though.
 
no, not "default timezone", "null timezone"
 
Then you can't do any calculations
 
UTC is null
 
and having a time portion without timezone makes no sense - just a date might do
 
2:32 PM
@Dharman no, UTC is zero; very different
 
please explain
 
see this in the proposed JS extension: tc39.es/proposal-temporal/docs/plaindatetime.html
I work in the travel industry; we frequently deal with things like flight times which are in "local time"; the time zone associated with that might not be known
 
Please explain how it is relevant without making us read some 40 pages
 
@IMSoP You don't store in GMT ?
 
That just sounds like UTC
 
2:34 PM
cough UTC != GMT cough
 
no, UTC means "we know what time zone this is in; it's in UTC"
 
@Sara It depends too. GMT as used in the UK is UTC+0, but GMT itself is slightly different.
 
This is a bugbear of mine.
 
Alright UTC so it's not a biased date
 
I should say UT+0 really too.
 
2:35 PM
yeah
 
Hola, amigos!
 
a flight landing at LAX at "08:30" is not 08:30 UTC
 
@Derick We're in summer right now, what time is it in London (include the timezone)
 
Iceland is always on GMT then, which they also define as UT+0.
 
THAT'S RIGHT. IT'S BEE ESS TEE, MOFO!
 
2:36 PM
so if the source of data doesn't specify anything else, the correct representation is "08:30 in some time zone we don't know"
 
@IMSoP If you don't know what the timezone is, it's not a date/time, just a random set of numbers.
 
This is my hill, I will get a gentle scratch on it.
 
I think all it matters is having both dates in UTC, then you can calculate local time adding the difference depending on the timezone of the destination
 
@Sara It's a double defnition: GMT = UT+1, BST = GMT + 1
 
@ln-s you can use that as a workaround, but it is incorrect; the time in LAX never has a UTC offset of zero
 
2:37 PM
@IMSoP I see your point FWIW, I just don't know what we can do with it in a programmatic way
 
well, the JS library I linked to is making an attempt
 
"JavaScript the good parts", isn't a terrible thick book
 
THE DEFINITIONS ARE WRONG!
 
PostgreSQL also has "timestamp without time zone" as a type IIRC
 
@Sara When has that every stopped law makers?
 
2:39 PM
 
Ehm timestamps do not have timezones afaik ? It's just the number of seconds starting from January 1 1970
 
a timestamp can be without zone, because per definition it is - just the numbers of seconds since midnight 1970-1-1 UTC
 
that doesn't help
 
yeah
 
what is the correct timestamp for my example?
there is no answer, because to convert to "numbers of seconds since midnight 1970-1-1 UTC" you first need to know what timezone you're converting from
catch-22
 
2:40 PM
@Sara FWIW, I wrote this some time ago, to point people at: derickrethans.nl/leap-seconds-and-what-to-do-with-them.html
 
so, again, you can use numeric timestamps as a workaround, but they won't actually be correct; it's just the same as using an object with the time zone set to UTC
in an ideal world, every time zone input would have unambiguous time zone information attached; sadly, that's not the world I live in
 
I always advice people to store in that case: 2021, 3, 30, 15, 42, 15 (for y...s) and then also "America/Los_Angeles" - or whatever geographical indicator that adds context to the date/time information
 
... what's wrong with unix timestamps?
 
Yeah, aren't we supposed to store all times in UTC and just convert.
Unix runs out... eventually.
 
@Derick right, but how do you pass those around? you could use an array, or you could use some kind of object which had those fields but no timezone field ... which is where we started
 
2:44 PM
@MarkR If you store 2071, 3, 20... as a unix timestamp, you rely on the timezone rules not changing for 50 years - which seems unlikely
 
you literally can't store it as a Unix timestamp
 
@IMSoP PHP's DateTime stores exactly that, the 2021, 3, 30, 15, 42, 15 and America\Los_Angeles
but because it has timezone information, it also stores the unix timestamp
 
I'm not following what the timezone has to do with it
 
@Derick right, so I want to be able to have the "America\Los_Angeles" part as null, because I don't know it
I wish I did, but it's just not given to me
@MarkR if I say "today 18:30 at my house" how do you convert that to a Unix timestamp without knowing what time zone my house is in?
 
@MarkR If you calculate the unix timestamp with the current rules for something in the future, you don't know whether the hour/minute/seconds are going to be the same as you expect, because the rules can change
@IMSoP But without TZID, you can't do anything with the time as it has no exact meaning. So store it as two (or three) numbers for Hour, Minute, and Second.
 
2:47 PM
sure, like I say, the object would just be a way to pass those numbers around
 
@IMSoP You have to know the timezone offset for the input, and the rendering. The unix timestamp element is for storage and calculation, the rest is just for humans
 
.. and I just told you you can't do that for things in the future
 
@MarkR but I don't know it; I just don't; that's the reality
 
Isn't the Unix Timestamp susceptible to the Year 2038 problem?
 
@StatikStasis No
 
2:48 PM
So what is?
 
@StatikStasis only if you put it in a 32 bit signed int
 
the way how it is stored in some systems can be, but not in PHP
 
Oh- so only 32 bit OS's
 
some 64bit OSes have 32bit time_t
so you can't say "32bit OS only"
 
yeah, and any software or DB that has it stored that way
 
2:49 PM
@IMSoP Is your problem that 2pm 30 years from now, might not be 2pm as it's considered now?
 
ah- that's good to know.
 
sorry that was for Derick
 
PHP uses a 64bit type, which allows from 292 billion years in the past...
@MarkR right
that's correct
politicians change the rules
2pm will be a 2pm, but it might not be the same point in time (ie, the same numbers of seconds since the epoch)
 
strtotime will not work at some point though, correct?
 
@Derick you're absolutely right, the only meaningful operations on a "date time with no timezone" object are a) convert to and from string (with no timezone specifier, obviously!); and b) associate a time zone to it to get a "real" datetime...
 
2:51 PM
strtotime works with 64bit timestamps
 
...but having the object would still be useful sometimes
 
Not sure why I was under that impression.
 
I think what IMSoP is looking for is Date class with no time part. Obviously you can't perform any operations on time without knowing its timezone. For storing it you can just use 3 integers. However, a class for manipulating dates without worrying about time could be handy. Of course that would still suffer from timezone problems though.
 
@Dharman that sounds like a differnet thing, as he specifically mentioned just a time.
 
@Dharman no, that's related but different; see my last comment
"just use 3 integers" implies adding three separate parameters to every single function that passes them around; that would be very tedious
 
2:53 PM
@IMSoP Doesn't PHP support classes? ;-)
 
well, yes, I could write my own
I could write my own DateTimeImmutable class, too
just saying, occasionally I wish it existed already, that's all
 
@Derick I know (most of) that intellectually, but I refuse to accept it. Because humans are terrible.
 
I certainly didn't mean to turn this into an argument or demand anything, was just chatting
I should get back to work
 
lol
 
I got that
I just don't think we can get away with a "Date" class :-)
and for the time without timezone bit, a reasonable API...
 
2:57 PM
I want to build a mechanical keyboard... they're expensive but I am obsessed with building one.
 
yeah; if you haven't seen it before, that JS proposal is interesting; it's a muuuuuch bigger API than most, but looks quite well designed
 
cmb
@IMSoP you can use mktime() with named arguments, and in this case likely want to see github.com/php/php-src/pull/6525 being merged.
 
@StatikStasis Do it ?
 
stream wrapper register first params prompt failed If underlined ・ *Directory/Filesystem functions ・ #80919
 
@cmb current policy where I work is to phase out all use of Unix timestamps in favour of DateTimeImmutable; mostly because of an unrecoverable abuse of strtotime() in the past
so my interest in mktime() itself is largely academic; but FWIW that sounds like a sensible change
 
3:02 PM
WOuldn't solve the "mktime( m: 2 );" case though, as "d' would still be 30 today
@cmb Is there a bug report for that PR? That way I'll get to it soonish
 
yeah; if I was designing a replacement, I think I'd default month and day to 1, and hour, minute, second to 0; not sure what to do with year in that case though
 
but then mktime( h: 5, m: 3, s: 16 ); would be what? It ought to be the current date
 
true
 
cmb
@Derick I don't think so; @bwoebi mentioned that issue in this chat a while ago
@IMSoP well, that makes sense :)
 
I hate strtotime
it has so many use cases, it's a mess
 
3:08 PM
Dude.... Derick is RIGHT THERE.
 
:D
hahaha
 
lol
 
Sorry @Derick I <3 you (plus I had no idea you made it)
 
I hate it too though, nothing should use unix timestamps in APIs
 
3:12 PM
My first PHP push direct to github and.... IT WORKS
 
Props on that
 
Props to Niki
Man's been all over this shit.
 
Porps to props
For sure, props to the man
/me bows
 
props to Niki for, basically, everything
 
props-holding-up-other-props.gif
A couple of recent articles called him PHP's lead developer and I'm like... yeah, fair cop
 
3:13 PM
Yo dawg, I heard you like props
 
@Sara What do I need to do locally to switch my stuff over?
 
Show me your git remote -v output
 
yeesh, cursed image
 
hahaha
 
3:15 PM
In all likelihood this:
git remote set-url origin git://github.com/php/php-src
git remote set-url origin --push git@github.com:php/php-src

But I wanna see what you have first since you may not have a "bog standard" setup.
 
I just told my gf that the electrician should be doing something else but not bothering around my working place, the guy comes, throws unintentionally the pool table, cuts my ethernet wire
I went bat shit crazy
 
I have a bog standard setup, so thanks for typing that out so I can copy pasta that
 
That's anonymous pull with authenticated push.
A simpler (marginally more secure) version would be:
git remote set-url origin git@github.com:php/php-src
But personally I don't cache my key in memory and I don't wanna type my password that often.
That second version will authenticate and encrypt both ways, but I figure the commit hash covers 99% of attack vectors so yolo
I do clone over ssh though
 
@Sara do you have it set up to where it remembers your GPG passphrase, but you have to type your SSH key passphrase?
 
I do allow it to cache gpg key for up to 30 seconds (because I have multiple signatures in my release process).
 
3:18 PM
ah
 
I quite like having to type my password for pushing though, as it prevents "OH FUCK, DON'T ACTUALLY PUSH THAT GARBAGE!" from happening
Well, not entirely prevents, but makes less likely.
 
I'm wondering if it's worth me trying to figure out a way so that I only have to type my SSH passphrase but it's probably better that I'm forced to enter my GPG passphrase as well
yeah, same reason why I'm considering leaving it as is XD
lessens the chance of "oh fuck... didn't mean to do that... REVERT REVERT REVERT"
like accidentally overwriting cmb's changes :(
 
It's all a matter of deciding what level of convenience versus security is right for you.
Like, asking people to sign all commits makes things a little less convenient, but a little more secure (in a trade-off that I deem worthy).
If individuals choose to keep their gpg key cached and auto-sign all commits, then their workflow needn't change at all, because they've chosen that level of convenience/security tradeoff.
 
Security more than makes up for the inconvenience. Less chance of an imposter Rasmus pushing a backdoor and an imposter Nikita reverting the revert of the backdoor
@Sara ahh, gotcha
 
3:28 PM
All the posts I've read so far suggest that phpstorm can't display anything for entering the PGP unlock password when working through the UI
 
@MarkR That sounds like a problem for PHPStorm users.
IF ONLY WE KNEW SOMEONE INVESTED IN PHP THAT WORKED FOR JETBRAINS
 
... so I've installed NordPass to get into the future present of using password managers and I've managed to lock me out of the new account somehow I didn't write the correct password in the field. fml.
I guess I'll get better with it as time goes...
 
Is there a feature request already present on jetbrains issue tracker for pgp/gpg support?
 
I dunno, I use vim.
VIM ALL THE THINGS
 
1 hour to pull the database
great work everyone!
I will log my time
as
 
3:41 PM
Keep it clean
 
I tihink it's feasible
@Derick Yes of course
hahahaha sorry
 
1 message moved to Trash can
 
oh, I see. ok. it felt a bit in the "non-ok" zone but not completely in, I'll move my mental goalposts :)
 
I thought Derick was making a joke for a second
 
Test bug ・ *General Issues ・ #80920
 
4:21 PM
@Tiffany for git?
 
4:47 PM
use the config $ git config commit.gpgsign true - no need for -S with git-commit(1) any longer (requires git 2.0+), ref stackoverflow.com/a/20628522/367456
 
@PeeHaa I missed your birthday Friday- Happy Birthday!
9
 
@cmb You win the internets today.
 
cmb
:D
 
5:14 PM
> Returning by reference with a noreturn type is allowed as well.
... did this never get discussed, really?
 
morns
 
dads
 
5:33 PM
@Tiffany for gpg agent? I've read it does, also with yubi key etc. when using the commit dialog. here
 
 
1 hour later…
The RFC should have been updated to mention why, because at first glance it's totally bonkers.
 
^ this
The first question that I ask myself is how does noreturn differs from void
 
@ln-s noreturn will not return at all, think exit.
 
I think exit | die ok
so it's exit ? what ...
 
@LeviMorrison yeah, I think the example was added, but could have done with more explanation
 
7:05 PM
"not returning at all" vs "returning nothing"
 
A no return method/function is supposed to throw ? What is it supposed to do
 
I think people over-estimate how obvious examples are a lot
reading through old mailing list threads about short closures, I found a lot of "but what about this: <code sample>" followed by "what am I actually looking at here?"
 
I suppose if custom union types are allowed the noreturn keyword must be taken in consideration
 
!!lxr proc_terminate
 
Don't know if there's an RFC for custom union types or if it was just an idea mentioned here
 
7:06 PM
@ln-s Imagine the return type of exit itself -- it's irrelevant, because it never will return.
noreturn is for such cases.
 
the example I've had in real code is a function that triggers an immediate HTTP redirect
 
so when you call a function that returns : noreturn

fnWithNoReturn(); // Dies here ?
fn();
 
function redirect(string $url): noreturn {
    header("Location: $url", 301);
    exit;
}
 
eh
 
What's the working LXR? :D
 
7:09 PM
heap.space
 
Jeeves having issues (my guess)
 
the differences between "void", "null", and "noreturn" are more theoretical than practical in PHP's dynamic runtime-only type system
 
@IMSoP there's a distinct difference between null and void though
 
@IMSoP noreturn will throw if you accidentally return.
 
Ok so that's the benefit
 
7:12 PM
yeah, I should have said "mostly" theoretical
 
My main concern was about the benefit of it
 
under static analysis, the difference is much more relevant: a void function should never appear on the right-hand side of an assignment; and a statement immediately following a noreturn function is known to be dead code
but PHP doesn't do that level of analysis natively
 
@LeviMorrison thx
 
7:39 PM
if I find a typo in the manual... would I be yelled at if I edit the file directly in github to fix the typo...
 
@IMSoP The optimizer actually does dead code elimination. It could be extended to support noreturn.
 
@IluTov would be restricted to the same module though if I remember what you've said in the past?
 
@MarkR Yeah.
 
@IluTov hm removing this kind of dead code that follows a noreturn function seems pretty pointless to me. optimizing something that costs nothing
 
somehow messed up my gpg key -_-
 
7:54 PM
@IMSoP if you call it IncompleteTime, or TimeButWeDontKnowTheTimeZoneSoCantCompareItAgainstTimesThatDoHaveTimezones, people might get it a bit more.
 
I bet Derick doesn't even account for relativistic effects in his library. I mean, it's not SpaceTimeImmutable.
 
My server is doppler shifted.
 
@Danack TBWDKRRZSCCIATTDHT for short :P
 
@Sara It gets more Ghz when you're running towards it?
 
💡 Huh. LEO sats probably need their clocks updated frequently...
 
7:58 PM
GPS famously accounts for relativity
 
They do. GPS has to be constantly synchronised or it would be out by about 50m
 
Well, GPS obviously. But like... other LEO sats that aren't doing GPS
They'd get out of sync really quickly
Or I guess you just adjust the oscillators, but still
 
Which protocol do satellites use these days ?
 
01:00 - 20:0020:00 - 00:00

« first day (3818 days earlier)      last day (1113 days later) »