« first day (2710 days earlier)      last day (2237 days later) » 

4:03 PM
When will 7.3 be released?
 
@PeeHaa November or so.
 
ooooooh nice
 
and what about 8.0?
 
Plenty of time to finish crazy busy work period and write rfcs
oh yay @Danack is here now
You do swagger right? @Danack
 
4:08 PM
Not what I expected :P
 
I also do the json swagger stuff.
 
Would you recommend swagger for a team where the consumers and producers have a hard time working together? Or is there some other maybe better tooling nowadays?
I realized I know waaay too little about this stuff
 
@PeeHaa I'd recommend it on the basis that it makes consuming and testing apis way easier.....but your problem sounds like a non-technical problem. And so a technical solution isn't likely to solve the underlying problem.
 
Yeah. Right you are. But I don't see the team changing any time soon
Which might very well mean I am SOL
 
Is it possible to say why those two sets of people can't work together better?
 
4:13 PM
I think it's because of two things: working on "islands" and starting work in an ad-hoc way
 
@Danack I recall having to do very weird things in the client because the server had to be stateless
 
I hope the latter can somewhat be solved by some tooling like swagger
Where people have to think before code
But that may very well be wishful thinking
 
@PeeHaa Are you talking about server-server or client-server?
 
client-server
Basically a backend php team and a frontend react team
 
@PeeHaa TypeScript?
 
4:16 PM
Nope
 
Where I am now, we solve this by having well defined API types
async function someCall(callParams: SomeApiCall.Params): Promise<SomeApiCall.Response> {
  // ...
}
Then it's up to the server guy to change SomeApiCall.Response when they change the API
And if they get a compilation error because types don't match anymore, they have to raise a flag (because the build fails)
 
@MadaraUchiha Yeah that;s kinda what happens there too, but it's not wellthought out
 
@PeeHaa It wasn't here either, we made it so.
 
How?
 
Honestly? By communication and making sure we understand that we share the same goal.
 
4:19 PM
yeah
 
I'm a firm believer of communication-by-code, code never lies.
 
8 mins ago, by Danack
@PeeHaa I'd recommend it on the basis that it makes consuming and testing apis way easier.....but your problem sounds like a non-technical problem. And so a technical solution isn't likely to solve the underlying problem.
That basically
 
Documentation gets stale, comments lie, tests get forgotten (either when you don't run them as part of the build, or stop writing them)
Code is always true.
 
Yeah, but this code lies or is lazy and doesn't do what it is suppose to do
Meaning a lot of back and forward
 
An alternative is for client team to write defensively, with an abstraction (adapter) layer between their stores/components and the API response
We had that one for a while as well
async function someCall(callParams: SomeApiCall.Params): Promise<SomeApiCall.Response> {
  // ...
}

function adaptSomeCall(response: SomeApiCall.Response): SomeApiCall.AdaptedResponse {
  // ...
}
Then it's contained
 
4:23 PM
I think they tried something like that in a broken way. It resulted in static jsons on the client and a message to the backend people saying "Oh yeah right. We still need this data. We mocked it on the frontend and forgot about it. Oh btw the project is due in 2 hours"
 
@PeeHaa Hmm, yeah, we've had that problem ourselves with no real solution for a while now.
Still looking.
We're thinking about opening an issue with the server guys when we mock, to make sure they don't forget to implement this
But still haven't done that, as it doesn't happen very often.
Also, if you have any QA process, it helps writing totally imaginary things in the mock, so that it would be impossible for QA to miss.
For example, all my mock links go to /here-be-dragons, and all of my mock texts are "But nobody came."
It's my trademark by this point, so QA knows that if they see that, they're seeing a mock.
 
lol some marker is actually a nice idea
Well it's a start at least
:)
 
Of course you can also be boring and do something like THIS_IS_A_MOCK
 
Why do that when you can have dragons?
 
Indeed, I also found that spirits are better when you do things like that
 
4:28 PM
:P
 
For realz though
 
@bwoebi @NikiC @JoeWatkins Any of you guys remember a discussion around constant redefinition being elevated from notice to warning/error? I thought there was one somewhat recently but can't find it.
 
QA folks see my dragons [( ͡° ͜ʖ ͡°)] and always have a smile on their faces.
Especially in the few times it makes it to production by accident 😃
 
hehe
 
@LeviMorrison I didn't discuss this, at least not recently
 
4:35 PM
@LeviMorrison Can remember something, but maybe a year ago or so, elevating it to an exception.
 
4:46 PM
@PeeHaa you can convert from json schema objects into flow types, which will result in compile errors (somewhere) if there is discrepancy in what the api produces and the front end code wants to consume.
that part at least is a technical problem which could be solved.
 
Anyone have a tip for how to convert a "Time ago" time back to a date?
 
@AlexCastro It'll never be fully accurate.
 
Thats okay
Its for a scraper
 
Most of these (I'm assuming you get them from scraping) include the actual date in ISO form right next to the "time ago" text
 
I have a "Time ago" but want to save a date in my database
 
4:48 PM
I'd look for that.
 
@MadaraUchiha @AlexCastro this
Double check the html
@Danack kk
 
usually it's there
 
@AlexCastro 3v4l.org/n5SJG - but you are in a world of pain.
 
Ah lol, strtotime supports that?
 
For the sake of BC I'm okay with producing a notice/warning type thing on redefinition of the same value but for 8.0 we should consider doing the same thing that happens when a class is redefined, which I believe is a fatal error.
 
4:49 PM
That seems.... brittle
 
lol didn't even know that myself
So whats the world of pain here?
 
or exciting.
 
@AlexCastro If things aren't in the exact format supported by strtotime, you're going to have a bad time.
And by a bad time I'm talking about corrupted data and weird edge cases
 
Although it might be brittle because determine sameness is not straightforward all the time, but maybe on const-exprs it would be fine.
 
Thanks guy
 
4:51 PM
@LeviMorrison As constants must be constant, it'll be easy?
 
@AlexCastro Seriously, look for the accurate time in the HTML
 
The data we have seems to follow their format so we're good there
 
90% that it's in there.
 
It's not there
 
@kelunik Arrays with other constants in them?
 
4:52 PM
@AlexCastro Do you have a linky?
 
@LeviMorrison They must exist at evaluation time, no?
 
@PeeHaa @Madara
time ago on listings
 
@kelunik Don't remember, exactly.
You would think so.
 
I'm not 100% sure either.
 
Checking
hehe yep you are fucked :)
 
4:54 PM
yeah especially since I have to see if there is a difference
 
Was hoping they did some xhr calls
Yep that's the fucked up part
You need to know the timezone it uses
 
so I wont get the same time
probably new york est
 
Rendering the time like that serverside is weird
Because it will be the server TZ always
Unless they pass your tz info to the server
no
nvm I am stupid :P
 
haha
 
Yeah, you are :D
 
4:55 PM
:D
 
dang so how should I do this
 
That's the one case where timezone is irrelevant
 
I am so happy I stopped myself
Yep :P
 
btw If I was going to code that, I'd do a preg match against know formats, and then choose the appropriate decode function for the known type, and log the unknown formats elsewhere, as something that needs to be supported.
 
Ohhhh how much shit we've eaten to make it work properly on our end
 
4:56 PM
@MadaraUchiha Make what work?
 
@PeeHaa The other side of that
 
ah :)
 
Make everyone see 20 hours
And not "8 hours from now" for some timezones
 
I think I'm gonna be able to do it but it's gonna be more about logic to check for updates than precise times
thanks guys
 
Right, I'm off as well
Have a good one guys
 
4:58 PM
o/
 
Wes
\o
 
\o
 
user9098366
do you drink alcoholic drinks regularly in order to get over a burnout / "clear the cache", would this be normal?
 
user9098366
regular thing to do for people in this line of work
 
user9098366
5:02 PM
I've been stuck for 60 full days now and cant continue; last time somebody told me to do some drinking and it helped
 
I wanted to suggest meth, but I feel like somebody already beat me to it
 
user9098366
60 days sucks
 
user9098366
and this is not getting better, full 60 days off with no edu at all, stuck
 
if your best metaphor for getting over a burnout is "clearing your cache"
 
user9098366
dont have $$$ for drinking too, but some money is coming in
 
5:06 PM
you need to go outside
 
user9098366
I do that too, I do sport, different kinds
 
Go outside
you're here now
others aren't
 
user9098366
I have a break from going outside, I started running and it was not good for one of my legs, I am overweight, like 30 kg (not a lot, I was 60kg but I dropped that)
 
user9098366
I have a plan, learning php / mysql is the priority, and I am just wondering, do you regularly dring? this may be a good thing to do
 
user9098366
of course with healthy lifestyle at the same time food / sport / sleep, but some drinking in the mix, I was taking lecitine, magnesium, lineseed oil (for Omega 3) but I stopped that now
 
user9098366
5:10 PM
but anything that helps would be good, and I am wondering about the "booze" (something good or ok, no low quality stuff); could this be a regular thing for people in this line of work?
 
user9098366
"3 Reasons It's A Good Idea To Drink Alcohol While You Study For An Exam"
 
user9098366
have not read anything on the Net yet, but it could be a part of the mix
 
user9098366
when needed though
 
user9098366
I dont mean like every day or every weekend, but when needed - could be
 
user9098366
5:13 PM
on the other hand drinking booz is not very good as far as "healthy lifestyle" and I want to follow that now
 
5:45 PM
You know whats super annoying? Saying it like "dub dub dub", it just sounds so stupid.
 
6:26 PM
/o 'mornin
 
7:02 PM
 
7:21 PM
I think I need to power up my droplet today
 
7:34 PM
@PeeHaa are you of the opinion that null represents the "absence of something" and where null is used, instead, the absence of something should be used? e.g. $var = ''; or $var = 0;
@JoeWatkins happy birthday
 
@Tiffany It very much depends on the use case
 
I would think if it has to be a string/has to be an integer, that you would use var = ''/var = 0, but sometimes you just need a null , I would think repetition
 
But NULL is "something", why should it be used as "absence of something"?
 
null is nothing
 
But it is a value nonetheless.
So, you can't use it as absence of value.
 
@mega6382 But, it does represent the absence of a value, does it not?
 
Now in this case where definition is like function x(int $bar = 2){echo $bar;}. Should x() and x(null) have the same results?
@Alesana ^^
 
you can represent null as an empty string (assuming that you're going to be using a string), or a false boolean, numeric 0 or 1, there are many ways to represent null where you don't actually need null
@mega6382 why use null in that scenario? what benefit does it have, over say, using 0?
 
@Tiffany Lets say you are calling a function like x(foo()) where foo() usually returns a number, but in special case foo() returns null.
So, it kind of is like an empty string but more readable, and different.
 
except it can cause issues
whereas, an empty string probably wouldn't
 
7:45 PM
@mega6382 It doesn't represent the absence of a variable, it represents the absence of a value
 
@mega6382 destroyallsoftware.com/talks/ideology - skip to 13:35, this is the point I'm trying to make
 
Anonymous
it's sunday people ... we shouldn't even be thinking about code :)
 
@Alesana null doesn't mean there is no value it just means that value is unknown.
 
@samayo as @Wes said, weekend is for side projects :P
Feb 10 at 16:58, by Wes
weekend is for side projects, everybody knows that :B
 
@mega6382 Can you explain that further? I'm not disagreeing, I'm just not familiar with that concept.
 
Anonymous
7:49 PM
oh .. not for me. I do my side projects at work when the boss isn't looking @Tiffany
 
what about your assigned work at your job? lol
 
Anonymous
I do that when the boss is looking
 
@Alesana I believe I read that somewhere, give me a sec to track down the source.
Well it is more from the SQL point of view, but still.
 
@mega6382 Ah yeah it does make sense in SQL context, and I suppose it could also apply to some PHP cases
 
Well I do agree that PHP does not use null the same way most other languages does, like Java, where null is more like undefined in JS, but it still have a use in PHP.
 
7:55 PM
but then you have null called somewhere deep in a stack trace... causes an error, that's no where near the origination
 
In a circle, are H, K, and R assumed to be center.pointX, center.PointY, and Radius respectively?
 
@samayo how's your reading assignment progressing?
 
This thing just tells me to put in H, K, and R of the circle I'm like wut
 
Anonymous
Not yet, been too busy today cleaning my new studio and cooking @tereško
 
don't slack, read at least a chapter ... probably in your case - the foreword
 
8:00 PM
@mega6382 Why should a function that usually returns a number ever return null?
 
:P
 
@IROEGBU Well, shit happens.
 
then don't use null...
 
shit shouldn't happen...
 
But still alot of functions default to null as output.
 
8:02 PM
@mega6382 function with void "return type" is not the same as returning null
 
@IROEGBU But in PHP it is 3v4l.org/Kg6JT
 
you can change the default value
 
@mega6382 It would've been a stupid thing... But, it's clearly stated in the manual
@Tiffany You shouldn't do that... If I'm not expecting anything from the function your return statement is useless.
 
@IROEGBU that raises the question to me that why write it like that? instead of using isset() why not $var === 0?
blah, lol...
I guess I'm splitting hairs though. But null can make it harder to debug in the long run.
 
@Tiffany I don't understand this
 
8:10 PM
@IROEGBU Yes, I get it that void is not being considered as null.
 
@IROEGBU this is completely representative of my knowledge of PHP (in that it's not very deep), but why write the statement where you're not expecting anything, and instead, have it expect something that in essence, means nothing
 
Interesting 3v4l.org/Re1lv
 
why is null necessary? that's the question I'm wondering
back to cleaning
 
Maybe someone from the internals can explain what is the true purpose of NULL in php.
 
You can't say $bar is empty string/0/false or anything at all... It is null
 
8:23 PM
is there any place null is useful outside of a conditional?
 
@Tiffany You can't look at it that way
Using the last example I gave... it means there is a bar somewhere I just don't know what or where it is yet
 
dear god I sound like a child... but why?
 
You don't... Actually, your question is difficult to answer (I have never thought of it before now)
 
my understanding is that you would want to use null so that you can compare something to it, to see if if something exists/isset, but you could also represent the same thing by comparing if the thing has an empty value/0. It requires a bit more control and understanding of the code, what your intentions are, but I think the long term benefit is worth it
or maybe it isn't worth it, because using an empty value may cause the same issues anyway
 
@Tiffany Sure you could do that when return type is a string or int or flat, but what when it is an object or resource, sending "" or 0 will not satisfy the return type, but null will.
 
8:33 PM
@Tiffany You can't do that... For example use Date of death, some people have it some don't (those who don't, don't have it for different reasons - either the person is dead and the date is not known or the person isn't dead)
Forget about the type (DateTime)... it applies to any data type.
 
what if they're a zombie?
I understand what you're saying now
 
@Tiffany Don't be racist. It's undead
 
wat
 
lol
 
xD
 
8:36 PM
I am bad at jokes today...
Or even more so today
 
I did laugh
going through all the goddamn paperwork I've put off
I HATE PAPER MAIL
 
Paperwork sucks
 
especially when 90% of it goes to the trash or the shredder
 
Thank God, I don't have to deal with shit like paperwork. I don't even put serious thought into my task estimations, I jsut put in random numbers.
 
I just wasted a good bit of time assuming that ^ in PHP did what ** turned out to do
 
8:41 PM
@mega6382 aren't you a minor?
 
@Tiffany I am 20. So, not exactly a minor.
 
so in between where you don't have to worry about it, and when you start signing up for stuff that sends you everyfuckingthing
 
lol
 
@Alesana That's a rare thing... Can't remember the last time I needed **
 
@IROEGBU I'm dealing with geometry here :P
 
9:07 PM
@Alesana ^ is typically bitwise OR.
 
well now I know that :P
 
If you haven't done a lot of programming, that is probably surprising.
 
9:22 PM
@Trowski No, | is typically bitwise OR, ^ is XOR.
 
@kelunik Whoops, yes, that's what I meant.
 
@Trowski See IRC, please.
 
Quick Question: How would I make a php variable = html input field and return the input field output?
Can some on fix this? `<?php $x = <input type="hidden" size='5' id="p-charge" name="p-charge" type="number">; ?>`
Output `{{$x}}`
 
wat
 
10:04 PM
Is this too long of a description for the data when I'm making a dataProvider for a PHPUnit test?
            yield 'intersecting circles with float radii and both float and integer coordinates for both circles center' => [
                [[19, 20.4], 6.1],
                [[11.1, 13], 5.2],
                true
            ];
I would think being as descriptive as possible is best but I'm not sure if that is too much
or even longer... yield 'non intersecting concentric circles with differing radii and negative x coordinates for both circles center' => [
 
10:32 PM
@Alesana everythings trade-offs; that function name is too long; use a comment, mate.
 
@Danack Comments aren't returned with PHPUnit's output though. The function name itself is test_Intersects_DetectTwoCirclesIntersection_Boolean, but that is just a way for me to describe each set of data with a key. I guess I can put it back into a regular non-keyed array if necessary.
This is how the data/test are together. I hope I'm not misunderstanding something
 

« first day (2710 days earlier)      last day (2237 days later) »