« first day (2865 days earlier)      last day (2099 days later) » 
00:00 - 16:0016:00 - 00:00

Wes
4:01 PM
just removed 3 realpath()s
maybe it's a windows issue... do any of you guys have any big test suite you can run on linux with code coverage?
 
<rant> I'm driving myself up a wall
the routing logic in my code base is ridiculous
is it lunch time yet
 
Hi,
 
@Tiffany somewhere, yes.
 
I have some silly contact form, worked for years! Stil working huray! But since a month I receive so much spam on it... I have added a captcha and still, the spam flows into my mailbox.

Is there a way I can block it in a way? Is a 'count 5+3' thingy with a hidden field or something effective?
 
@Wes perhaps you could check down the sides of your sofa for some spare change to buy yourself a real computer?
 
4:09 PM
@PeeHaa hola Señorita o//
 
@Duikboot it's meant to be. just customising the captcha code enough so that standard breaking tools designed for that captcha should be enough e.g. php.net is proteceted by a maths question.
 
Wes
@Danack will i be able to run mssql server on linux?
 
I am using now the 'g-recaptcha' stuff
 
or you could use separate boxes for different tasks...
 
Wes
also, i was asking for a favor, a quick test
 
4:11 PM
@Duikboot check the google backend for it, it should give you analytics of the block rate -- make sure that it's working correctly
 
Wes
and finally, even i get linux doesn't mean i have the time to learn it
 
Oh strange, it's empty oO
 
Wes
asshole
:B
 
@Wes then make it easy for people.....set something up for people to clone and run, rather than asking people to find the reproducible thing for you....
 
brb dinner > need to fix this asap. :p
 
4:13 PM
@bwoebi what's this? ZEND_ENABLE_STATIC_TSRMLS_CACHE
 
Wes
you literally just have to remove 3 realpath() and run coverage, and see if perf improves
if someone has 5 minutes of spare time...
 
@Wes @PeeHaa Try this out youtube.com/…
 
Wes
nice
thanks guys.
 
@JayIsTooCommon heyooo Jay!
 
4:36 PM
@pmmaga pedroooth, hey dude. Missed you <3
 
good to hear you're doing well :)
 
o/
 
@pmmaga Thank you, you're supposed to say you missed me too though
\o
 
@JayIsTooCommon aww, I missed you too <3
 
@Wes I'm home from work as I'm ill and can't think straight. No one else was following the conversation. Putting really simple instructions will make it more likely someone will run it.
 
Wes
5:19 PM
@Danack
1- run test suite (ideally one that takes at least 5 minutes) with code coverage.
2- once it finishes, keep note of the total time it takes
3- go to phpunit\php-code-coverage\src\Filter.php
4- remove realpath() from addFileToWhitelist() (about line 40)
5- remove realpath() from removeFileFromWhitelist() (about line 80)
6- remove realpath() from isFiltered() (about line 110)
7- re-run the test suite with coverage.
8- compare the old time with the new one
 
> ideally one that takes at least 5 minutes
I have none like this - which one would you like?
 
Wes
the biggest test suite you have, or you know
it's the same
i get -40% time with that change alone
realpath_cache_ttl is set to a reasonable value
 
@Wes please just find one project. I just ran it on the biggest project I have and the unit tests run in 4 seconds.
changing those files strangely enough made no real difference.
 
Wes
with code coverage?
 
yes.
 
Wes
5:31 PM
found the problem
realpath_cache_size 16k
set it to 500mb and it finished in less than 2 minutes
all these years
i waited for nothing
so much time wasted
what's your realpath_cache_size value?
 
4096K
but the slow IO on windows is one of the reasons I don't use the machine I'm on for dev work.
 
Wes
do you have a macbook or something?
 
yes. Decompressing php src from zip on my 2011 macbook pro takes about 11 seconds. Decompressing it on my reasonably powerful windows pc takes over 4 minutes.
 
Wes
5:50 PM
you know that's more like the disk's speed than windows?
 
it's a modern ssd.....with the ssd controller on the motherboard.
 
...has anyone written a password generator in PHP? generates a random set of numbers and characters, and it's so fucking long to encourage users to change it to something they prefer
I did something with (string)rand(1000, 9999) three times, concatenated with some other stuff, but wasn't sure if there's something better at randomizing numbers
 
6:17 PM
@Tiffany I normally copy + paste from stackoverflow.com/a/6101969/778719 though remove the i and l letters as they can be indistinguishable for fonts people use.
 
@tereško Genuinely curious how often you have found a game with "Mixed Reviews" that you really liked. On Amazon I rarely buy anything that is below 4 stars. Usually I buy a 3.5 star item if there are very few reviews and the written reviews persuade me. I don't have this down on Steam yet so I'm just curious of your experience.
 
6:45 PM
It's 2018; anyone know of a technique for HTML/CSS tabs that doesn't use JavaScript and is actually functional?
 
If I have an array like this:
Array
(
[1] => Array
(
[0] = test
)
)
I can use array_search on test to get the key 0 returned to me. But how do I get the key 1 (first level) returned instead?
Appearently ctrl+k doesn't work on partial code in msg. Sry about that
 
Wes
foreach($a as $k => $v){
    foreach($v as $v_k => $v_k){
        if( ... ) { }
    }
}
with appropriate break; or break 2; when search is finished
 
Hmm. Thanks I'll see what I can do with that
 
7:06 PM
my boyfriend is finally taking programming classes in his degree
soon I'll be able to complain about programming to him and he'll understand
and I'll complain less in here
 
@Wes Thanks a lot! That worked like a charm :)
 
@Wes does this get into specifics of setting up the debugger? I skimmed through the first couple of minutes, and it seemed like it was explaining how to use the debugger, which isn't what I need help with, I don't believe.
 
Wes
but you did set it up
 
not correctly
well, not in a way that it's aware of stuff
like it's throwing an error that the PDO driver doesn't exist -- but it does -- and I have the ini file pointing to the ext directory, and the driver is included in the extension list
and I think it's throwing the error because of the improvised way I have my project and settings pointed to different mapped drives
maybe I'll go back to opening the project from W:\
....kill me
 
7:35 PM
hey hey hey!
and @Tiffany, no, we shant kill thee
 
@Wes I'm really annoyed that css selectors level 4 introduces a separation between live and snapshot profile
 
Wes
@bwoebi not really sure about the implications of that... doesn't just delay rendering, or something?
ah it's async
bleh
 
7:52 PM
@Wes It means that it can't be used for css selectors, only for querySelector() & co
 
Wes
ah. but you can avoid :has in css... you don't need that stuff
 
@Wes yeah, as long as I use extra javascript for that
 
Wes
you can design css to avoid using it :B
 
function bar($foo) { }; bar($stuff);
is $foo a reference to $stuff? If I change $stuff in the function will $foo be changed?
 
@JBis The answer is "depends"
"reference" sadly can refer to two things.
 
7:57 PM
what two things?
 
Variables in PHP are, by default, pass-by-value, meaning, that if $stuff is a number, changing $foo inside of the function wouldn't change the value of $stuff.
You can change that by explicitly saying that bar is "pass-by-reference"
Like so
 
@Wes not really … e.g. a :checked input to display a div … the input needs to be before the node and its parents, and not within a subnode
 
function bar(&$bar) { ... }
However, The "value" of an object, however, is also called a "reference", and mutating an object will mutate the object outside of the function
 
& says pass as reference?
 
Wes
@bwoebi but that's a hack
 
7:59 PM
Yes
 
can't even place the input in a div or such @Wes
 
Wes
check web components?
 
@Wes I do use details and summary
 
But, reassigning inside of the function would change the "reference" you have of the object, and the outside object would not be affected.
It's easier with an example:
 
Wes
i mean custom web components
 
8:00 PM
@MadaraUchiha huh?
 
function foo($bar) {
  $bar->x = 42; // imagine that $bar is an object of some kind with public $x;
}

$stuff = new SomethingWithX(43);
foo($stuff);

echo $stuff->x; // 42
But...
function foo($bar) {
  $bar = new SomethingWithX(42);
}

$stuff = new SomethingWithX(43);
foo($stuff);

echo $stuff->x; // still 43.
Think of passing by reference as passing the variable itself, and not the value of the variable.
But objects and arrays can still be mutated even when they aren't passed by reference.
 
<?php
function foo(&$var)
{
    $GLOBALS['a']++;
    echo $var;
   //What will it echo?
}

$a=5;
foo($a);
?>
 
People kill me sending resumes with misspelled words. It's a resume. It's your one shot to present yourself and you're not going to spellcheck it?!?
 
@JBis Yes
@StatikStasis We got those all the times.
 
@MadaraUchiha What will echo $var echo?
 
8:04 PM
@JBis Try it and see ;)
@StatikStasis Sometimes it's little things like javaScript or nodejs, sometimes it's bigger things.
 
@MadaraUchiha interesting: 6
 
@MadaraUchiha They misspelled their last employer. The name of the employer has "Little" in the name and they substituted it with "Lil" and then misspelled the other parts of the name.
 
@MadaraUchiha change &$var$var and it becomes 5
 
Indeed
Because in one case, you're passing "the variable" and in the other, you're passing the value "5"
 
yep
thanks
should a mysqli connection variable be sent as a reference?
@StatikStasis is that a joke?
 
8:13 PM
No, definitely not.
 
Besides- who jokes on a resume by misspelling.
I'm aware of the shortened version but I am looking for professionals.
Plus the misspellings continued. Everyone has spellcheck. Doesn't make sense to have misspelled words on a resume.
 
@StatikStasis Depending on who the person worked for it could be their stage name or the actual name they go by. Many rappers shorten Little to Lil. Not calling them Lil would be incorrect and maybe received as an insult.
 
I know the company. It wasn't. Very well known.
 
Ok. Well if they themselves changed Little to Lil then yeah thats stupid.
 
8:16 PM
Damn route tables and subnets -_-
 
@Fabor Whats wrong?
 
I got a subnet pointing to my NAT instance, And then the NAT instance connects to the outside world.

Problem is I can't connect to the outside world from within a server using that subnet.
 
thats a very general problem
 
Yeah, some route or security group is wrong.
I got another (Private) subnet that routes to the NAT instance which can connect to the outside world through it but it's private. So outside world can't connect to it.
 
ah
 
8:22 PM
Routes:
Private 0.0.0.0/0 -> NAT instance.
Public 0.0.0.0/0 -> Internet Gateway

NAT instance is on public subnet.

Create server on public subnet. Use a security group to point all traffic outbound to NAT instance. Can't connect to outside world. But can be accessed by outside world (Nginx default page loads)
Create server on private subnet. Same security group as above. Can connect to outside world.
 
idk
 
It'll be something dumb. For sure.
 
8:38 PM
Did this today.
 
@Fabor looks kind of warm?
 
@Fabor That's your video?
You're in Vietnam?
 
@StatikStasis he's been there over a year
 
@MadaraUchiha can you see what email address is used on SO logins of people?
 
@Fabor I've been watching this incredible documentary by Ken Burns on Vietnam on Netflix.
 
8:41 PM
how much chocolate is too much in one day?
 
@MadaraUchiha Do you have the power to remove my name from a dumb question I asked a long time ago. =)
@Tiffany Figure out what makes you vomit and then back it up just a little bit.
 
Thanks Tiff
=p
Yes.
 
why bother?
 
@StatikStasis we can just delete it ourselves. As it is a dupe of a dupe of a dupe anyway no harm would be done
 
8:44 PM
That would be great.
 
@StatikStasis Yup
 
@Danack Because... vanity.
 
@Danack Yeah about 36c. Two of the guys got like 3 shades darker driving there.
 
@PeeHaa I can, yes.
@StatikStasis No, only SO staff can. Use the contact-us form.
 
8:47 PM
It's my firstname @ firstnamelastname.com right?
 
@Tiffany There's no limit.
 
Actually I might expedite that process a bit
Let me check
Yeah, I could send a request in your name, it might be handled faster if I do it
What post do you wish to dissociate? (If you don't want it publicly, you can invite me to a room and I'll make it private)
@PeeHaa Yes, it is.
 
tnx sire
 
@PeeHaa You also have another login associated with your account
You can look at all of them in your Settings >> My Logins
 
8:50 PM
ah there it is
Old gmail account. Is it safe to just burninate that one?
 
@PeeHaa You tell me vOv
 
I don't put too much trust in SO's account management:P
 
If you're not using a credential, it's better to remove it.
I'd pick one or the other, and stick with it.
 
If I go silent I killed my account
 
Note that there's a difference between the email used to login, and the "contact email" you have on your profile (visible only to you and mods)
(I'm unsure why, seeing as we can see both, but eh)
 
8:52 PM
kk
\o/
I am still alive
<3
 
Congrats @PeeHaa
 
tnx
 
9:04 PM
You burnt @PeeHaa?
 
Not anymore. Getting white again :(
 
Come to Vietnam, you'll brown up a bit
 
:D
 
Wes
does it make sense to use 0 or more, or 0 or 1 quantifier on positive lookahead?
like q(?=u)?
 
9:23 PM
Heading home. later.
 
Wes
10:01 PM
the default selection of phpstorm's autocomplete drives me insane
 
I haven't really hated too much on XML over the years, and occasionally advocate for its merits. However, MathML is horribly verbose and awkward. Yuck.
 
Wes
10:19 PM
/^(.*)(?=xxx)?/
i want to capture all the things before an occurrence of xxx is encountered
if there is no xxx, i want to capture all the string.
the above doesn't work, any idea how to do that correctly?
/^.*(?=xxx)|^.*/ doesn't look like a good idea
the last one works but is likely slow?
 
Wes
10:33 PM
anyway, gn \o
 
@Wes almost certain that was covered in Jordi's talk he gave at our user group once: phpsw.uk/talks/… slides are in there.
 
11:20 PM
posted on August 20, 2018

New Cyanide and Happiness Comic

 
@pmmaga Congrats in the talk on SymfonyCon (lisbon2018.symfony.com/speakers) about contributing to core. I'll also have one in the same topic at phpCE 2018.phpce.eu/en/#agenda. Looking foward to see new contributors :)
 
11:37 PM
@GabrielCaruso hey! thanks! :) Yeah, I'm thinking of going to CE as well. It should be nice
 
Nice, we keep in touch to hang out there :+1:
 
I'll be there also. But will mostly be heckling.
 
@Danack As long as you don't disturb my talks :P
 
00:00 - 16:0016:00 - 00:00

« first day (2865 days earlier)      last day (2099 days later) »