« first day (2686 days earlier)      last day (2255 days later) » 
00:00 - 15:0015:00 - 00:00

12:00 AM
@DaveRandom Funny enough, there was a failed proposal by Google to introduce "use sanity"
Which was a stricter version of "use strict"
Though I didn't understand what you mean by scope boundary violations
 
 
3 hours later…
2:47 AM
@MadaraUchiha as in, you can't access things above the current scope unless they are already lexically present. So e.g. if you want to access window it must be passed in to the outermost function in a file as an arg (this is a pretty common pattern already, even though it's not enforced).
 
3:28 AM
 
4:05 AM
o/
 
\o
 
4:55 AM
Anyone hear of Kirby CMS?
I am thinking about taking on some freelance work but I don't know what CMS to use.
 
It looks pretty solid
 
5:12 AM
have you looked at the code?
 
Yeah, I can't find anything in there that immediately looks wrong.
It's file-based instead of database-based, which I can't think of anything wrong with that if I'm making static websites
Maybe I should create my own CMS though
 
@Alesana class A
s/class/exhibit
 
Haha I didn't see that one. It seems pretty redundant but I can't see anything wrong with it. I suppose it's a sign of poor design?
 
you don't have to go much further than seeing he named a class "A"..just "A"
but yes, there is a lot wrong with this codebase
 
5:27 AM
Good point :B
 
it kinda looks like he saw wordpress and wanted to do it "right", but didn't actually understand what was wrong with it
 
I guess I'm not so good at spotting poor quality code since I don't have much confidence in the way I write code. That one file does look a bit off though :P
Should you be putting functions in arrays?
 
I have trouble following it.
 
I mean you can, but keep in mind that public static is just a fancy way of saying global
 
Yeah that just looks like a mess
 
5:39 AM
posted on February 21, 2018

New Cyanide and Happiness Comic

 
Do you have a minimalistic CMS you can recommend for client's websites?
 
I suppose I'll design my own then
But that'll be after I learn a bit more coding :B
 
don't worry, yours will suck too, but at least you won't be paying someone else $90 for the privilege of using it. and it'll be your mess, that you understand and learn from
 
Good point
Hey since you're reviewing the Kirby code would you be interested in looking over the assessment I finished to see if there are any poor practices that are immediately obvious?
 
5:47 AM
i'm not reviewing the kirby code, i just flipped open a couple files
 
San
Allesana,
why cant you go through this link : queness.com/post/14579/6-lightweight-flexible-php-cms
 
I guess it's filled with messy code then :P
@San I'll take a look at it, thanks
 
are you doing the assessment for that company still, or just as practice?
 
I submitted it to the recruiter already
I suppose a little bit of both
 
you get info that made them seem less sketchy?
 
5:53 AM
Yeah, my original google query was "recruiter name scam" which obviously came up with complaints. After looking up the recruiter though it seemed that they were legit.
 
did you get an answer on "this will eventually be ingested into the framework and we want minimal rework later"? nothing you ever do during the pre-employment stage should ever be used by the company, other than contract work
 
> It's just for the purposes of the assessment - we've given this assessment to dozens of candidates.
 
I don't care how many people they give it to
 
Yeah it was a little bit off, however I highly doubt it is going to be used by the company as I think they would give me more information about their classes (eg. Money, Currency) so that I would be able to make mine interact with them better. Worst case scenario it was a great learning experience and I've gained a better understanding of how different objects should interact with each other.
 
6:57 AM
moin
 
\o morning
 
7:19 AM
I registered the pdo package name on npmjs.com to hopefully 1 day post a PDO package for Node.js, but apparently, someone beat me to it, and took the npmjs.com/pdo package name too, cause mine was empty, and the npm decided to give it to them.
 
But they are already developing it?
 
a pdo package for node ... you're not making sense
 
Yeah, the package actually requires PHP to work in node.js
 
omfg
if any kind of marriage should be illegal, and considered immoral, it's that ...
 
lol
 
7:24 AM
I agree. These are not consenting adults.
 
And look at the code too, github.com/mikuso/node-pdo
 
do we have to?
 
I don't think it could be worse
 
let's never speak of this again
 
agree
 
7:49 AM
my computer has frozen three times today, in the last hour ... it's getting on my nerves
 
Restart it...
 
I've reset it every time, no choice ...
 
\o
 
\o
 
7:54 AM
o/
 
\o
 
fantasticate to make or render fantastic.
 
!!dad
 
Mountains aren't just funny. They're hill areas
 
@Joe was it you who had issues seeing violent, brutal dreams?
This is the 3rd day in a row I am late because I couldn't sleep till 5-6 :-(
So annoying
anyway... /meeting
 
8:07 AM
@Ekin yes
 
were you able to stop it at will somehow? I need to
 
rinse with vodka
guteeeeeen morgeeeeeen
@JoeWatkins that's so phode
 
@Ekin no, it continues, it's been going on since childhood, I don't expect it to stop ...
nothing I do stops it, I don't sleep in the dark, or in silence, but it still happens, I think these things are just my suspicions and don't know if they even help ...
 
I haven't had it in a row like this for a long while
plus this time it is even worse than before for some reason
 
I don't think they are connected to anything about real life, I don't think anything I do while I'm awake can really make any difference ... you're probably stuck with them, but who knows how these things work, it might go away for you ...
 
8:14 AM
OTOH some people don't have any dreams at all :D
 
I certainly hope so
 
I have heard, that you cant snore and dream at the same time. So, just start snoring in your sleep.
 
@Ekin are they "just" violent dreams or are you also punching or kicking?
 
@mega6382 Really? Shit... well I snore like wild boar since I cannot breathe through nose.
 
last night it was someone I know getting murdered but... that was some gore shit to see
the other day it was myself
anyway... need to go present a demo now
 
8:18 AM
let it be
your brain is working through some issues ... probably - stress
 
@DejanMarjanovic There is more to it but this explains it snoringinsights.com/do-you-dream-when-you-snore
 
I am asking because there is a sleep disorder where people are missing motor inhibition and are punching or kicking in their sleep.
 
@Gordon Yeah, my brother does that in his sleep.
 
@mega6382 it's apparently an early symptom of other neurogenerative diseases, like parkinson
 
@mega6382 Thanks, TIL :) I think makes sense since I cannot recall last time I had a dream of any sort... maybe it's related to sleeping 5-6hrs per day and exhaustion :D
 
8:36 AM
mornin
 
\o
 
8:51 AM
o/
 
\o
 
9:10 AM
o/
 
~o
robo-boogie
 
COMBO BREAKER
 
Wes
mornao
 
nice
 
9:33 AM
 
Wes
9:44 AM
someone with configured phpunit in phpstorm that has 5 minutes to try out something?
 
Wes
9:55 AM
in case someone wants to try youtrack.jetbrains.com/issue/WI-40845
i am some versions behind, maybe they fixed this
 
> it’s a young framework it makes use of some newer capabilities that were introduced in PHP 5.3
 
fascinating
 
moin o/
 
10:10 AM
\o
 
10:25 AM
Does anyone use behat in here? Haven't really looked at it properly before
 
DateTime::createFromString() does not work with years > 4 digits – #75992
 
lol^
 
@Sean I have used it. I don't think I particularly have an opinion on whether or not I like it though.
 
Is there possible way to create Android apps using PHP?
 
> Y A full numeric representation of a year, 4 digits
 
10:30 AM
@pmmaga yeah, clearly a RTFM
 
just because it works as an output format, doesn't mean the input parsing has to accept the same things
whether it should or not is another discussion :P
 
php > echo (new DateTime('@'.PHP_INT_MAX))->format('Y-m-d');
292277026596-12-04
php > echo (new DateTime('9999-01-01'))->format('Y-m-d');
9999-01-01
php > echo (new DateTime('10000-01-01'))->format('Y-m-d');
2000-01-01
php > echo (new DateTime('10001-01-01'))->format('Y-m-d');
2001-01-01
 
It's making it really difficult for me to schedule events for the year 292277026596 though.
 
Output formatting with Y looks much more broken to me than createFromFormat
php > echo (new DateTime('9999-12-31'))->format('Y-m-d');
9999-12-31
php > echo (new DateTime('9999-12-31'))->modify('+1 day')->format('Y-m-d');
10000-01-01
so it's looks like the parsing in the construct is broken somehow
 
yup, in the cases above, new DateTime('10000-01-01') is already interpreted as 2000-01-01
so, for output, any number of digits is actually fine, but not for input
 
10:42 AM
php > var_dump(new DateTime('10000-01-01'));
object(DateTime)#1 (3) {
  ["date"]=>
  string(26) "2000-01-01 10:00:00.000000"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "UTC"
}
yup
I suggest to fix that one and in addition, add ¥ as a formatting option allowing the year to be any number
 
this is fun 3v4l.org/VJQiK
3
 
ewww
 
I sorta wanna know what 2018-02-22 is all about, but I also mostly don't.
 
wtf..
 
yeah, the results get more odd with every added 0. I understand 10 becoming 2010 though 010 is debatable and ok, when I type 0010 I must have meant 10 AD, but it's really fubar after that
 
10:55 AM
I like that it finally gives up. It should've done so earlier.
 
php > echo (new DateTime('0000-01-01'))->modify('-1 day')->format('Y-m-d');
-0001-12-31
php > echo (new DateTime('0000-00-00'))->format('Y-m-d');
-0001-11-30
this really is fun
php > var_dump(DateTime::createFromFormat('Y-m-d', '4242-42-42'));
object(DateTime)#1 (3) {
  ["date"]=>
  string(26) "4245-07-12 10:59:57.000000"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "UTC"
}
:D
 
@Gordon exploiting the lack of year (and month and day) 0 is cheating
 
I guess we should put a disclaimer or warning into the DateTime docs stating "do not use this library for dates outside your own lifetime"
 
the bus factor would become significantly more important
 
So, this library is not suited for immortals?
 
11:04 AM
@Gordon YYYY-03-0 is a nice easy way to find number of days in Feb
 
I didnt know you can input numbers outside the valid ranges, like that
php > var_dump(DateTime::createFromFormat('Y-m-d', '0000-01-32'));
 
!!> echo (new DateTime('0000-03-00'))->format('Y-m-d');
 
Cool, year zero was a leap year
 
I guess there is a year 0, and it's a leap year
oh god, that immutability rfc has a patch... dude is actually serious about it
 
11:18 AM
@PaulCrovella Mind posting the link?
 
link to the patch is therein, if that's what you meant
 
Thnx
 
the patch as it is will be rejected
 
conceptually or technically?
 
can any one see my question ?

https://stackoverflow.com/questions/48907483/how-to-hide-sub-menu-items-from-other-users-in-yii2?noredirect=1#comment84857686_48907483
 
11:27 AM
both, the patch reflects the concept, and breaks references which was a main beef with typed properties
dmitry won't have it ...
 
@MrFaisal we don't do yii here.. well one guy does, but he's an asshole
 
also, as president of the goto appreciation society ... here is a beautiful way of detecting leap years ...
 
@PaulCrovella who is he ?
 
@JoeWatkins You know that there are only 97 leap days in 400 years, which means not every 4th year is a leap year.
 
read it again
 
11:38 AM
@MrFaisal he is the one who shall not be named
 
@JoeWatkins hahaha, sorry.
 
11:49 AM
nico, the office birdie ...
 
that's a cool looking bird
 
What kind of bird is it?
 
he's a very tiny kind of parrot, a western rosella, but with a genetic mutation that makes him that colour ... and means he can't have a cage mate ...
he's been here a week, but will only just let me get near him to take a photo ... not surprisingly, extremely timid ...
 
Dear Joe, please don't buy caged exotic animals, thanks
 
morning
 
12:00 PM
you can argue that he wouldn't have been born if not for captive breeding, but since he's here, he needs to be looked after, he will never find a mate, and was in a cage that was about 10 inches wide by 10 inches high, now he's in a proper parrot cage, and spends many hours a day flying around a room that is 20 feet long ...
I got an even more exotic bird coming but I'll wait until they are here to show you ... some exotic birds are extinct in the wild you know, it is mostly selfish to keep exotic animals, but these things are here, and some of them are too hard to leave in the pet shops where I find them ...
 
supply and demand, no demand, no cause to breed in craptivity
 
okay, but he's here now ... and needs a home ...
 
I kind of see Joe as Big Cat Rescue in this situation
providing a home for an exotic animal that can't survive in the wild because it grew up in captivity
and giving it a life it otherwise wouldn't have
(if I'm judging right, I just woke up)
 
Or, letting it be the sacrificial one that nobody buys, so others are not bred and the suffering is not multiplied
 
how bout them white tigers...
 
12:05 PM
that are not bred to be housepets, how about them?
 
you missed the bit where it will never breed, these animals need to live with a mate, they are sociable creatures, because of it's genetics this one will never be able to socialise with other birds, nobody is going to buy him, he would live and die in a 10 inch by 10 inch space that's not deep enough to even stretch his wings, he would never have known what it was to fly ... sorry, I can't leave him in a cage, I didn't go to the pet shop for him ...
 
white tigers are a mutation that people will breed for because they're "different" but it requires a lot of inbreeding
so you have like 3/4s retarded animals for the 1/4 pretty animal that can be shown off
 
Is this conversation getting too serious or what?
 
getting?
 
well, I don't have to go into work until later
open delay due to inclement weather
 
12:09 PM
I used to have a hamster.
 
I used to have a gimp
 
my hamster ate my sister's hamster
 
errr morning I mean
 
\o
 
it was gruesome
 
12:11 PM
Is this preferable for database process cleaning stackoverflow.com/a/30365783 ??
 
How is that cleaning?
What is database process cleaning?
 
drop database ? :P
 
I want to clean processes who are in sleep mode
 
Why?
 
@Akshay Read the comments on that.
 
12:12 PM
mysql_* in 2015
 
I read them
But I wanted to remove connections who are in sleep mod
 
1 min ago, by PeeHaa
Why?
 
So finding a way
 
@PeeHaa Because there are hundreds of processes which mostly there in sleep mode.
 
12:13 PM
@Akshay no
 
@Akshay So?
 
Fix the cause, not the effect
 
hire a sysadmin
or stop using mysql_*
 
It's causing site wait time. Sever is going to the high limit of connections
 
Hvaing persistent connection will do that. So does having a long time out. So does crappy clients
Fix the problem (if there even is any) instead of whatever it is you want to do
 
12:16 PM
I'm going to put my money on.... sessions stored in the database
 
Wes
PeeHaa mornong. do you have phpunit configured in phpstorm? got a minute to test if this works? youtrack.jetbrains.com/issue/WI-40845
 
@Wes I don't. But I can set it up for you if you want
 
@Leigh I was thinking more along the lines of mysql_close() not being called in the shitpile he calls his codebase
 
@tereško hmmm... Whole project is coded with mysql_* :p
 
End of script should close the handle
 
Wes
12:17 PM
that would be amazing :B thanks
 
sec let me start up
 
I.e. implicitly closed on termination of the script
 
Wes
if that works in newer versions i'm going to update
 
@Akshay Then change that.
 
Wes
it's always tragic updating phpstorm, so need a good reason to do that :D
 
12:18 PM
@Akshay congratulations, now you can migrate it to something, that is not deprecated in 5.5 and removed in 7.0
 
@Wes Yeah I stopped updating without a backup of my settings
 
Wes
last time it couldn't even import settings :( had to reset all the things
 
And for every inspection they fix they break two others
 
Wes
maybe i skipped too many versions
 
@Wes ugh
 
12:20 PM
 
Wes
i was switching from 9 to 2017
 
@tereško I know but it takes long to do system wide and f*** client is not approving the budget! :D
 
@Gordon awww yis, good old days
 
then you can go hunt down, where are all of your missing mysql_close() calls
 
@tereško Agree :'(
 
12:22 PM
and, FYI, the support for last PHP version, that includes mysql_* will end the support this year
you should start the migration process ASAP
 
@tereško makes sense. Will try again to convince otherwise up to him(client).
 
@Leigh yeah, loved it. But I never managed to win it.
 
@Gordon Whaaa!? I've never seen that before. I was googling for "Freddie Starr ate my hamster" earlier this week though.
 
@Wes Mine looks totally different
 
Wes
screenshot?
 
12:31 PM
working on it
I don't have any children in the list. Or am I doing it wrong?
oh wait it's about the other method isn;t it?
 
Wes
need to configure phpunit or it won't show up i think, go in settings > languages and frameworks > php > phpunit
enter "user composer autoloader"
 
@Leigh sjw for pets?
 
I did that
 
Wes
and locate it, autoload.php
 
However I get the same as you if I finger the giveData method
 
12:34 PM
 
Wes
then set the test runner's default configuration file to phpunit.xml
 
That is on the actual giveData method
 
Wes
i'm confused. does it run the test, with the progressbar and everything?
ahhh ok, great. so it does the same thing
i was looking at the old gif
wait... on giveData? :\ bah
looks like a bug
 
Wanna teamviewer my machine for a sec to double check?
 
Wes
yes, thanks
my teamviewer must be ages old
i bet it will update...
 
12:40 PM
You would need to update it probably.
Yeah
 
12:51 PM
@Naruto idiot?
 
Mm, kind of a strange answer to a yes - no question..
 
1:13 PM
i am upset by ueue
ueue also makes your life miserable because you always have to remember how to spell it properly
 
oh @rlemon is here
That's early :P
 
1:33 PM
!!dad
 
I was unable to repair the installation of a PDF reader on my computer. I am now officially of no fixed adobe.
 
I don't get it..
 
.. I think I just might change my name on SO.
 
@mega6382 me neither
 
Wes
@FélixGagnon-Grenier can we choose a name for you
 
1:41 PM
you can make suggestions, yes ;)
I was thinking of "fractal", since it's always been my irl nickname
 
Wes
in my head you are a french canadian (red coat, moose, and the characteristic hat) version of this
 
Environment permanently breaks for worker process. – #75994
 
@Wes that's one of the most beautiful things that have been said of me
 
Wes
ahah
 
do you use php EA? do you leave the unhandled exception warning? I find it bothering, so mostly deactivate it, but then I realize that I might have a wrong idea about exception handling.
I generally try catch all over everything, and have very few local try catches.
in this case, I have return new Symfony\Http-Foundation\Response, which can throw an InvalidArgumentException, but many things can throw that. Do you live with the underlining warning? supress it?
 
2:03 PM
@FélixGagnon-Grenier If you add a @throws annotation in the docblock it also suppresses it.
It is annoying though.
 
heh, good point. I never like annotations, but yep, that sounsd like a good compromise between having the warning keeping me thinking about it and removing some yellow lines
 
The idea is that you either handle the exception yourself, or your let whoever is calling the code that it might thrown an exception, so they can handle it themselves.
 
2:16 PM
@FélixGagnon-Grenier Pretty much everyone in our team deactivated it
Although you can disable InvalidArgument and Runtime exceptions warnings separately I think, the thing itself is incredibly annoying
 
;) yeah, it is
... ok, this regex strangely does what I want (match lines in a string), but I feel dumb /([^\r\n]+)(?:[\r\n]+)/m
at the same time, it's quintessentially a line: anything that's not endline characters, followd by endline characters
 
Miliseconds return 4 digits until 3 – #75995
 
@FélixGagnon-Grenier The same can be written as /.+(?=[\r\n])/m too.
or /(.+)(?=[\r\n])/m to capture as well
 
heh, almost. you see, the catch is I want to match the line itself, but not the endline
also, that would fail with windows endlines (both \r and \n at the same time)
 
2:32 PM
@Jeeves wow...
 
currently at /([^\r\n]+)(?:\r?\n|\r\n?)/m
s/match/capture for use/
and yeah, the problem with (.+) as first capturing group, is that the following (?:\r?\n|\r\n?) being non-greedy (as far as I understand?), in the case of windows \r\n, the \r gets captured in the first group
 
@FélixGagnon-Grenier I may be missing something but wouldn't /^(.*)$/m do the trick?
 
cold pizza ... stupid skydsl rang and I had to school them on the meaning of the words oversold and restricted ...
 
@pmmaga indeed it would. but it also matches the endline character, which I do not want in the resulting array. I could also trim these characters with php
 
@kelunik are there any limitations to phars besides not being able to write data to it by default?
 
2:39 PM
but doing it all at once in the regex felt cooler ;)
 
ahh I see :)
 
@PeeHaa Yes, e.g. OpenSSL can't read from that.
And you can't execute other binaries inside the PHAR as separate processes without copying the file out.
 
A guy is trying to log someone out of facebook and then capture the login details later on... Is this grounds to remove the thread?
 
@IsThisJavascript link?
 
-1
Q: Logout from Facebook programmatically javascript

Pratik PatelI'm developing one application in that if the user comes to my application then it should log out from facebook automatically in the background if he already logged in facebook or facebook session exists & then after he can use my application. I am trying to log out from Facebook programmaticall...

He tagged it under PHP for some reason
 
2:47 PM
testReaderDoesNotChokeOnLinesWithoutEndlineCharacters
 
@kelunik k coolio. tnx
 
@FélixGagnon-Grenier testReaderHandlesUnterminatedLines
 
@Ekin ha
 
ooooo..... !
@DaveRandom now you make this look easy ;)
 
Evenings.
 
00:00 - 15:0015:00 - 00:00

« first day (2686 days earlier)      last day (2255 days later) »