« first day (2287 days earlier)      last day (2886 days later) » 

00:00
so it'll be like
so, if you have your separate $options you can likely skip the call to unset, first off, since you don't need to extract it from the headers
if ($this->hasAttachments($options))
{
  $attachments = $options['attachments'];
  //make the new var, $attachments, an array, without using a ternary operator
}
why the ternary operator hate?
at least that's my preference, because it seems silly using a ternary operator to check the type of something, and if it isn't the correct type, then make it that type
it's actually setting a default value if the type doesn't match
00:02
but why not do that from the get-go?
why bother with a ternary operator?
@Dereleased there was a tweet today, with a graph... it had "schneier predicts" vs "experts predict"... quite provocative
@Leigh link?
twitter.com
@Leigh ...thanks bro
still not a link
00:03
lol
like I can be arsed to trawl through all that shit
If I could star two messages so that context for one existed...
@PaulCrovella nobody cares
Tiffany cares mostly about penises
who has the time to highlight text and right-click, right?
I care. Is this what you wanted?
@Leigh do you have an opinion on my question that you could voice?
@Tiffany it seems like you're trying to simplify something in a way that doesn't really make a lot of sense
00:07
Ok clippy!
$thing = array(); // default value
if ( is_array($options['attachment']) ) {
    $thing = $options['attachment'];
}
is that better?
you'll still have to do the check to make sure it exists, mind
so wrap the whole thing in if (array_key_exists('attachment', $options)) { ... }
I mean, remove the ternary operator altogether and just make the variable an array, after it receives the assignment from first array's value
here's the problem with that
you can do $thing = (array)$thing;, but that probably doesn't do what you expect
for example, if $thing is null, the result is not array(), it is array(null), i.e. a 1-element array whose first index/offset is null
avoid casting
00:10
i.e., count((array)null) == 1
wait
provide and deliver the types you expect and desire
I want to argue that it couldn't be null because it's wrapped in a condition that will assume it's true.... but code can do weird stuff.
@Dereleased that seems to have fixed about 95% of the problem, still seems to dislike something in a CSs link or a external resource link as I got some div's and jquery stuff that has stopped. But i'll figure it out from here, thanks for the help
I was wrong: null will become an empty array, but false will not
avoid casting :)
00:12
@DMSJax NP good luck =)
unless you have one of those rigid json motherfuckers, then totally (object)[ .. shit .. ]
@Leigh could you explain casting? I understand it in the barest sense, but not enough to grasp it.
@Tiffany casting is a forced type conversion
@Leigh casting is lovely, you can turn false into true! (bool)(array)false === true
(int)false = 0
(int)"0" = 0
etc.
00:13
@Dereleased 2+2=5
@Leigh Thanks.
I cede then, I will use the ternary operator :P
@Tiffany using(swiss cheese) {
more cheese = more holes
more holes = less cheese
more cheese = less cheese
}
I'd rather use if/else over ternary, and I try and avoid else
@Leigh you sound like a hipster *ducks*
I read an article that took a really dogmatic approach to that effect
I don't have the moustache capability to be a hipster
have a think about it, if you have to use an "else" you can probably break your function down into a more atomic piece of code
@Leigh but that takes woooooooooork
whiiiiines
00:18
less work than it took you to write that
whaaah
I have to understaaaaaand how to break it down further
I'm being petulant, btw.
you don't say
@Leigh I agree with you for the most part, I'm just not very dogmatic about it
@PaulCrovella how my brain is on some days. "Work? but whhhhhhhhhhhhy...."
@Tiffany remember it was your brain that told you it was in charge in the first place
00:21
@Leigh my problem is I'm not experienced enough to break it down further. Most of the time I'm lucky to write something that works. That is, until I get a better grip of things.
you are, you convince yourself you're not
@Leigh I think it tends to happen organically anyway. I just grabbed a logging module I wrote a while ago, 11 ifs, 1 else.
@PaulCrovella ADHD is weird. There are days where my brain is literally a petulant child that I have to fight. Other days, like today, I'm so productive that I lost track of time and it's now almost an hour and a half after closing time.
function x(blah) { if (cond) { return stuff} return other }
you have an else in there, but it's hidden
if you're using "else" in your code, you could probably have extracted it to another function
this aids testability
@Leigh mmm, my brain will reach a block if I don't understand it/can't figure it out, until I beat my head with the information long enough. "The beatings will continue..."
00:24
@Tiffany did you ever read about object calisthenics?
I have not. Whazzat?
Yeah, that was the name of the thing I read
I don't even have to google it for you.. ^ :)
Again, I like a lot of it, I'm just not that dogmatic. Not every single different possibility needs the overhead of another function call
00:25
This site can’t be reached

williamdurand.fr took too long to respond.
:(
it's good advice, if it doesn't fit, ignore it, but at least consider it
might be blocked at work
It's a good read, absolutely
usually the error I get if we have a site or region blocked via firewall
ouch, uhm the content is surely replicated elsewhere - honestly google the term
"object calisthenics" .. go!
00:26
I think I have myself logged into chat at home, so I can just grab the link when I get home.
Also, if you don't get something, ping Ocramius
he likes to hint at it in talks without ever going into detail :)
The spouse just called, I need to get home and start cooking dinner before I am murdered
catch you cool cats tomorrow probably
/me leaves awkwardly

"nailed it"
maybe
anyway, since I've made tangible progress on this project that I can show tomorrow, I'm going home.
00:27
@Dereleased rip
safe trip Tiff
@Leigh thanks :)
I don't have a spouse to worry about, but I have whiny cats.
I have neither, so it's nice to wish safe trips on others ;)
(even if you don't mean it - cackles)
no, honestly, don't die in a fire... that would... spoil you
.markdown .. really takes that "don't abbreviate" thing seriously
 
1 hour later…
02:41
I have a GitHub account but I don't know how to make a gist. I'm on the GitHub Gist page. I don't see how to paste in my code. Where do I paste in my code? I also see a place to Add File,but when I click on it nothing happens. Can someone help me out here, please.
03:25
@Wes is the voting open again?
@Wes ok, done, vote changed :P
Now go mine the other votes.
Well, it's actually passing right now. Let me see if I can contact one extra voter so we can have some margin ahead.
needs 4 more to be passing
@PaulCrovella oh, it's 2/3 I inferred that for a simple change like this wes would choose simple majority.
03:41
there's been a bit of a trend toward making everything 2/3
nice, and it's a great trend IMMO
indeed
it's super tempting to put forward an rfc to formalize it, removing the 50%+1 option; but I wouldn't be able to resist trying to make that vote 50%+1 for the laugh
Morning r11
03:57
Hi
is anyone there
i need help filling in the gap of this sentence
Aspect-oriented programming is to cross cutting concerns as object-oriented programming is to ____________?
 
1 hour later…
05:04
Anyone has ever faced service timeout issue before?
05:24
\o
@tereško Happy Birthday to the most extraordinary.
Have a blast.
morning all
@kelunik poke poke poke
Happy Birthday @tereško
22
05:41
@Ekin here's a more complete video of our orchestra. I... kinda like it. Sounds almost recordable.
06:17
@FélixGagnon-Grenier I enjoyed that ...
glad you did
we'll be trying to post a few more after our next concert on february 2nd
Wes
Wes
mornings
Wes
Wes
12:8 only 4 votes and it'll pass! :B
06:31
can i ask a question on the pros here
whats best for socket.oi , save in ajax data then omit on socket oi? or you wait on the socket to connect then save the data?
any thoughts?
Happy birthday @tereško
everyone! it's we-all-get-a-free-ping-on-@tereško day! enjoy! it's only once a year.
... I love you too.
Wes
Wes
06:57
but he's not here. you are wasting your free ping if it doesn't annoy him @FélixGagnon-Grenier
@JoeWatkins i'm seriously considering buying a city car :B at least for now
yesterday i realized my car is consuming even more oil
i should service her :\
also there is a ball bearing somewhere making funny noises when the car is cold
how did it go with the porsche? did you buy it :B
@Wes ... yeah....
07:27
moioiioiong
07:43
@JoeWatkins We need to fix more critical things first, it's probably best to copy the new OpenSSL verification for auth levels to php-src.
@Wes Could you please add the voting dates to your RFC?
Wes
Wes
i don't know anymore @kelunik i think we started about at the same time, should i use your date?
@Wes Use the date you announced
Wes
Wes
but that doesn't count as ml was down for more than half of the time
Your first one is too short anyway, it's only one week.
Just go with two weeks + 1 day after the 11th and announce it again to make sure everybody knows the dates.
Wes
Wes
i think ml has been down for more than one day @kelunik though i'm announcing 27 jan. would that be ok?
07:55
@Wes @JoeWatkins sent the all green announcement on January 11th. It has been down or not for 1st to 10th.
@Wes That's more than two weeks, sure.
Wes
Wes
@kelunik so i didn't convince you to vote yes? :B in fact i think you are more against it :B
@Wes I don't have voting rights. :D
Wes
Wes
to be honest i 1- don't care as long it gets resolved somehow 2- there are actually good points against it, like it should be "stringable"
@kelunik wtf?
how do you gain voting rights?
@Wes no, finance got refused :(
Wes
Wes
08:03
@bwoebi @JoeWatkins we need to get kelunik voting rights. it doesn't exist he can't vote :|
@kelunik sounds good, maybe you could move on that then ? I poked because 1.1.2017 has gone by already
Wes
Wes
@JoeWatkins so, a subaru? :B
@JoeWatkins Consensus was that it's rather something for 7.2 only anyway.
@Wes the problem with finance wasn't be, but the age of the car ... I don't like new subarus at all ... I'll just wait for the weather to warm up ... no car has anything on motorcycles anyway ...
@kelunik ah, I see
@kelunik how many patches have you done for PHP ?
/s/be/me/ ^^
gotta go afk, school run ...
R.P
R.P
Morning. When will 7.1.1 be released?
08:09
today
/me really is afk now
What's the meaning of this? "Bring on the Donald"
@Shafizadeh how is this related to php?
it isn't ..!
@Shafizadeh then maybe you picked the wrong room?
maybe :-)
Wes
Wes
@kelunik seriously, you should try to get voting rights :B you are one of the brightest in here and i'm not the only thinking that... you should be able to vote... @JoeWatkins also there's his work with the async stuff. that sure counts for the community...
08:35
moarning
yawn
alright first question on SO, hope it won't get downvoted to hell
link here, so we can shoot it down if needed ;)
Here you go: stackoverflow.com/questions/41737211/… (for the record, I'm not posting my question here for answers/upvotes, just for editing advices)
well the question is fine in my opinion
Wes
Wes
08:52
more a programmers.SE question imo :B
Well I hesitated, but the software engineering.SE about in the StackExchange Dropdown reads "[…] working within the systems development life cycle who care about creating, delivering, and maintaining software responsibly.
And it's not about creating, delivering or maintaining software, and even less responsibly
hello every onne
@kelunik apply for vcs account
mornes! o/
Wes
Wes
09:05
repstatic.it/content/nazionale/img/2017/01/19/… avalanche hit a huge hotel, moved it by ten meters... dozens of people were in it.... fucking snow
Anonymous
morn
Anonymous
@Wes :( Saw it this morning, hopefully there's survivors
Wes
Wes
i hope that too... if they were lucky they can still breath as it's unlikely that the snow filled up the inside entirely... that's the most important thing i think
mornin
Wes
Wes
\o
09:12
o/
@rdlowrey I could swear that we added a userland ssl/verify_callback context option, did I dream it? I can find no trace of it.
morning
Anonymous
09:29
\o
09:43
mornin
Anonymous
@tereško happy day of birth
long may you writhe
no way
Happy BIRFDAY @tereško!! Our condolences and may your days be filled with Laravel, CodeIgniter and legacy applications
Happy birthday @tereško ! May your future be void of PHP frameworks
09:50
;D
Oh.. The irony: i.imgur.com/ZCzbO8t.jpg
11
Happy birthday, @tereško!
@FélixGagnon-Grenier hey, that was a good one indeed! Congratz :-) Yeah it'd be awesome if recorded well
@Jimbo it's still unpaid, isn't it?
So, the people at work have found this app... meitu
09:58
Oh, happy birthday @tereško :-)
Also, morning 11
@Gordon yep
I mean they hid the irony
I just saw the screenshots of the meitu app and oh god
Anonymous
moin ekins
09:59
(also moing newly awakes)
Anonymous
@Leigh please tell me they did you...
/me beavers like a beaver
@Leigh I'm scared
@JayIsTooCommon they did
Anonymous
You must share.
I must not
Anonymous
10:05
no, you must
I don't want you too ... it will be like I saw you in a porn film next time I see you IRL ...
I concur with Jay
But I definitely think we need to do Joe :)
you can't, I'm hiding ...
So, here's a thing I learned today that is, afaict, completely undocumented: joining a multicast group is done at the interface level. Binding the local socket to 0.0.0.0 doesn't behave the same way as it does when you are doing a TCP listen.
Anonymous
10:09
2 days ago, by JayIsTooCommon
just common sense really
@DaveRandom Not sure what you mean, you bind to 0.0.0.0 to listen on all interfaces...
@JoeWatkins I'll have a look, currently I don't really need one. That may change if a (partial) web-bugs rewrite will happen.
@kelunik that's what I asked you to request for ... you need to be able to get on with it ...
it will happen if you do it ...
you know changes to bugsweb are just deployed, no extra action needed ... just update the repo
@Leigh Actually no, you don't, You bind on 0.0.0.0 to let the OS choose what you bind to. Usually this translates to "all addresses on all interfaces", however when you join a multicast group you have to do it on a specific interface (IP_MULTICAST_IF). If you don't specify the interface the OS chooses one seemingly at random (I guess the lowest index in however it chooses to enumerate them)
@JoeWatkins Really? What if we need to do migrations because of new database entries?
10:15
that's never happened ... imagine you took off in a microlite, and you are going to rebuild in the air to be an airbus a380 ... that's what is going to happen ...
I mean it does make logical sense but the abstraction of address vs interface (if can have more than one addr) is poor in every API I have ever used
@JoeWatkins I really need moar time to do all the things.
once you have access, you can write a script to dump schemas without needing access to the server directly ... that's what rasmus done the other day afaik ... I have a copy of bugsweb schema somewhere, which is mostly all you need to make it work ...
@kelunik fair enough ... but we could do with a couple of tools that wouldn't take very long ... just to add new responses/statuses ...
mornign
Anonymous
morgee pee
10:20
yohaa
hehehehe
I hate you ...
<3
Anonymous
amazing
10:22
You are now the prettiest core developer
what can I say
pffft, I always was the prettiest ...
You're the prettiestest now
yesterday, by DaveRandom
Also, if you don't might me saying, AAAAAAAAAAaaaaaaaaaaaaaaaaaarrrrrrrrrgggghhhhhzomgwtfbbq
@Leigh I LOVE this
Watkins-saaaaaaaan *_*
@Leigh does it work on avatars?
10:29
user image
8
...aaaaaaand I'm out.
now it's funny ... and erotic ...
3
Now he looks like a japanese teenager playing women roles in plays
Aaand meeting
Anonymous
@JoeWatkins lol
10:29
stumbled upon this interesting artice... philsturgeon.uk/php/2012/03/06/packages-the-way-forward-for-php the read might be worth...
it was interesting ... 5 years ago ;)
@Leigh fuck my actual life
Also, i'd tap that
@Jimbo me too
<3
I can't switch to this chat any more until that
has gone off
the top of the screen
"Oh James you look beautiful" - ffs
your
screen
now
it
could
be
anyone
...
gone ?
10:42
If you want to make some noise just
!!get krakjoe.ninja
Request must specify a valid HTTP URI
Anonymous
:P
Now THIS is failing
@Jeeves sing a song for Trucy please
10:43
@Ekin Only if you sing a song first.
But still, Jimbo's pretty face is gone now
@Jeeves not happening
@Ekin Why not?
Anonymous
@Jeeves I will never say never
@Trucy oh no ... indelibly burned into memory
10:43
@JayIsTooCommon You just did.
Anonymous
i was singing.
Sounds like Jeeve's not cooperating
@Jeeves It's friday, friday, gotta get down on friday
@Trucy You are annoying.
rude, @Jeeves
:(
10:44
@Ekin Ah, Jeeves. Like a butler.
stupidity is annoying, we knew that ... but who knew the electronic kind, and the squishy meaty watery kind are equally annoying ...
@Tiffany What are you looking for in specific? We have !!command list and !!plugin list
can we alias help with command list ?
I do help also ... because that's what it should be called
!!command alias help list
@Ekin Command 'list' is not currently mapped
10:51
errm, dunno
I meant !!help -> !!command list
!!alias
Anonymous
not sure if you can alias commands with parameters
yeah, that
ok ... I'll wait ...
@JayIsTooCommon Never tried it / looked into it tbh
!!command alias help command list
!!command list
10:53
3 messages moved to Trash
!!plugin list
Yeh it doesn't work like bash aliases, unfortunately
I tried to make it do that once at there was some reason it was difficult
However I could modify the Command built-in to handle !!help like that if you want
2 messages moved to Trash
@DaveRandom I do want ...
10:55
Yeah do that to make @JoeWatkins happy
I have seen other people try it too
a great deal of programming involves apologizing to future me and grumbling about past me
> [sigs done: 501]
seems like a reason for a day off work ?
Hi guys,

Is there any API to detect the current city location when mobile is not on WiFi, I am using PHP
?

« first day (2287 days earlier)      last day (2886 days later) »