« first day (2660 days earlier)      last day (2285 days later) » 
00:00 - 16:0016:00 - 00:00

12:07 AM
Should you be good at shell scripting.
 
12:20 AM
Sigh.. haalpp.. -__- stackoverflow.com/questions/48471359/… (larahell)
 
12:33 AM
@Darius You should only store names in one place. Why are you sticking random data on a pivot table anyway?
 
because "client"
 
That's not a good answer at all. I don't think you even can do this with Eloquent without building a separate class for that pivot table and doing a ton of translation.
You're using Eloquent and your DB schema is terrible.
 
To give an explanation, they wanted to tie one user account to multiple buildings (they're tenants). Inside each building, they want to allow the staff members to change the name of the user, but not affect the name throughout the whole system, only within that one building.
So, because the relation is there, I thought i'd plug it in there, and not have to create a new table.
 
No. Make a new table. You can solve this better by making a name table and adding relations that way rather than duplicating those columns.
And also don't blame the client. That's a behavior they requested not a reason to just design a crappy schema.
 
I blame the client because the requested it and it was pushed onto me by the project manager the DAY the project is due..
so I'm just pissed.
"oh and we need this in 1 hour"..
 
12:38 AM
I digress.
 
But k, i'll separate out, into separate table. Thanks
 
12:57 AM
posted on January 26, 2018

New Cyanide and Happiness Comic

 
1:10 AM
> [...] accept that Trump is more full of shit than the combined intestinal tract of the entire fat acceptance movement.
beautiful. youtube.com/…
 
lol
what's the best cipher encryption currently? AES 256? I'm assuming there's something better
 
Wes
1:44 AM
morno
 
 
1 hour later…
2:59 AM
Ello
 
3:31 AM
morning
 
 
2 hours later…
5:22 AM
again morning.
 
Sup Linus
 
ohai
too much cold.
 
Where do you live?
 
India.
 
It'
It's been cold out here California too.
 
Wes
5:35 AM
in india? california? you have no idea what cold is :D
 
@Wes :P yeah.
 
lol
Is been colder than most years.
@Wes where do you live?
 
Wes
near the alps :P
 
dang
 
6:13 AM
posted on January 27, 2018

New Cyanide and Happiness Comic

 
tomorrow I find out if I can make magic happen with jquerytypeahead
 
        $sql = "INSERT INTO User (Name, Email, Phone, PasswordHash, Gender, AuthenticationID, College)
                     VALUES (:name, :email, :phone, :passwordHash, :gender, authID, :college)";

        $statement = $this->connection->prepare($sql);
why does it give me a Warning: PDO::prepare() expects parameter 2 to be array, null given in /var/www/Vitopia/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrateg‌​y/EvaluatingGeneratorStrategy.php(68) : eval()'d code on line 32
 
Wes
6:33 AM
@CoderDudeTwodee probably because of wrong reflection. hold on
 
Wes
nope, then may be a bug with how proxy manager determines the value for optional parameter
can you set up a simple repo with proxy manager installed, and exactly how you are calling that prepare?
should be a easy fix
 
@Wes On it.
 
7:01 AM
Something's wrong with ProxyManager. Removing that works fine.
@Wes What kind of a repo?
 
Wes
github
with composer, so that i can clone and test it
 
7:15 AM
@Wes The repo is on github. A private one. I might be able to add you as a contributor.
 
Wes
handle is Netmosfera
 
I removed the proxy in front of PDO, just add it when you need to test.
Also, good luck dealing with the ugly code.
:P
 
Wes
repo url? but i meant make a repo with the isolated issue
 
@Wes Okay, I will create a separate repo for that, gimme some time.
 
Wes
ok
 
7:28 AM
yo
 
@PaulCrovella o/
 
Wes
yo
 
8:00 AM
flakelet a small flake, as of snow.
 
Wes
couldn't you isolate the error only? :B
 
Umm, the root goes to registration.
So, you can directly find that. I am in class right now. Sorry.
 
Wes
where is the line of code that causes the isuse?
 
Try +91 9436129002 for the phone number
@Wes UserMapper::store()
In Vitopia\Model\Mapper @Wes
 
9:04 AM
mornin
 
Wes
installs proxymanager -> twig comes in too
you guys and your dependencies
 
9:18 AM
@Wes Ah, was testing with twig, forgot to remove that. :P
 
Wes
it's a dependency in in proxy manager itself, or rather it's a dependency of one of its dependencies :B
 
morning tereško
 
Wes
ok found the problem
might need to ping @Ocramius
so, when the default argument could not be found, it uses null https://github.com/zendframework/zend-code/blob/6b1059db5b368db769e4392c6cb6cc139e56640d/src/Generator/ParameterGenerator.php#L81 if i'm not wrong. which doesn't work well if the parameter declaration is:
(Array $array = []) (remember, the default argument cannot be retrieved)
in that case you can't pass null to it, only array, or no argument
this very thing is the reason i created github.com/PHPToolBucket/arguments
    $obj = new class($dsn, $user, $password) extends PDO{
        function prepare($a, $b = []){ return parent::prepare($a, $b); }
    };

@CoderDudeTwodee this should fix it imho
clearly it should be solved by making the default argument of builtin functions available in reflection
but in case @Ocramius wants to solve it userland, he can do it with that thing i created :B
lemme know if it worked @CoderDudeTwodee
actually, i think i didn't solve that problem with the arguments() thing
already forgot everything about it :(
yeah now i recall, i tried but there was no solution
so scratch that
annoying this thing
 
Wes
9:48 AM
i might have a solution
 
10:05 AM
array key duplicate with integer and string – #75880
 
Wes
10:20 AM
on that note, we might consider allowing
class Foo{ public function xxx(int $x){} }
class Bar extends Foo{ public function xxx(){} }
cc @kelunik @pmmaga
the declaration in bar::xxx is contravariantly valid
allows anything or none
also cc @bwoebi @NikiC opinions? ^
 
@Wes I'll try it out once after I'm done with my math class.
 
Wes
k
 
Maybe @Ocramius could fix it?
If thats a bug in proxymanager itself.
 
Wes
i proposed a solution but it's a dirty one
now use that. i doubt he'll like it
it's actually a php problem, it's unable to retrieve default argument from core functions
 
Maybe I'll just skip lazy loading on PDO this time. Which, I would have done but that error seemed interesting.
 
Wes
10:31 AM
the solution i've proposed is 3 lines of code
i'm sure that will work
well, almost sure :P
i agree it's annoying tho
brb groceries
 
11:04 AM
morniongs
 
11:15 AM
I wish you could temporarily mute people on twitter
like "mute for 48hrs" or sth
 
wat happened?
 
Just Jenny Wong (miss_jwo) who I like very much and want to continue following, but she live tweets all the talks she's in at any conference she goes to, which completely saturates my timeline, usually with stuff I don't give a crap about
 
heh, guess you could unfollow her and set a reminder in your phone to follow her in 48 hours? :D
 
she's done it for ages and a lot of people follow here specifically for that, so I'm not going to complain to her about it, I'd just like to be able to silence here over a conference weekend and automatically unsilence her after so I don't forget
@SaitamaSama Yeh I'd just like to take that element out of it
that's what I have done befor
with a couple of other people as well
I might build a service
 
or... you could write a php script :B, yeah that ^
probably set a cron job maybe?
 
11:25 AM
I might build a proper actual service that anyone can use
assuming the API has mute/unmute calls
 
oh that'd be pretty nice as well
?? o.O
 
@Wes isn't that already allowed?
 
you get an E_WARNING
That allows widening, it doesn't allow the parameter to be unspecified
you get a fatal if the parent is an interface
 
Wes
12:01 PM
@bwoebi only to no type, not to no declaration entirely
also:
class Foo{ public function xxx(int $x, float $z){} }
class Bar extends Foo{ public function xxx(...$z){} }
 
Wes
class Foo{ public function xxx(int $x, int $z){} }
class Bar extends Foo{ public function xxx(int ...$z){} }
is there more?
 
@Wes ah, missed that. Well, I'm not opposed to that, given PHPs semantics
 
eh
change for the sake of change
and one we can't take back
I'd wait at least until internal functions start accepting more arguments
And we actually commit to allowing that forever
 
12:17 PM
We do; I actually wish to have that one for years - still haven't changed my opinion
@NikiC we should allow that one too
 
Get that landed, then we can talk about this again
 
Yeah I agree
 
Wes
i have had use cases though. for example when i do wrappers:
function override(...$args){
   return $this->wrappee->override(...$args);
}
the type checks are not necessary because i'm delegating to the same type, but more importantly, i can't be arsed to type them twice :D
it's not a killer feature, but why not...
i'd use it if it was possible to use it
 
@Wes That's just super shitty
Good reason not to allow this
The point of widening is that you might want to genuinely accept a larger set of inputs, not that you still have exactly the same type constraints and are too lazy to spell them out
Your API is just lying now
 
Wes
12:36 PM
yes but again in that case it's acceptable, since the check happens anyway
consider the following case
class A{ bar($foo = 123){} }
class B extends A{ bar($foo = ???){} }
i don't want to redefine the default arg, i want to leave the one in A
so when i do this
function override(...$args){
return $this->wrappee->override(...$args);
}
i mean literally delegate to that other object, it's its job to check stuff
i can live with the error trace slightly incorrect if i'm avoiding writing parameters twice
in fact i think i prefer having the error pointing to the actual function rather than the function that delegated to it
 
@Wes It makes checks a lot more complicated. We shouldn't allow that.
Consider: class A { function foo(int $x); } class B extends A { function foo(); } class C extends B { function foo(WTF $x = null); }
 
Wes
well that wouldn't be allowed anyway
 
C is now compatible to B, but no longer to A. Currently it's enough to check the signature of the direct parent.
 
> the declaration in bar::xxx is contravariantly valid
wat
eeeeew
 
Wes
@kelunik the union WTF|null is not contravariantly valid to mixed
@PeeHaa only appears when it's time to insult my ideas
dat bich
 
12:43 PM
:P
 
Wes
it's not that i'm a big fan of it, but it's not wrong :B
 
Wes
wtf lol
 
Which is perfectly fine, except that we don't throw for passing to many arguments.
With makes it, well, ... break.
 
Wes
i stopped caring about it
next question?
:B
 
12:46 PM
@kelunik oh right, that's a thing as well
that's a good argument for why we shouldn't allow passing more args than declared...
 
Wes
i never did that
 
either that, or disallow that
 
@NikiC I should probably add a test for it, just in case @Wes or somebody else wants to RFC it.
 
Wes
scared eh
:B
 
@NikiC Disallowing that will break a lot of code I guess. Throwing for too many arguments might also break code, but might also uncover bugs.
 
Wes
12:49 PM
.@AMD I haven't bought any of your hardware for more than ten years, and this sort of crap is why ... What the fuck is the point in a RAID array that can only be recognized by the controller that created it, don't you see how dumb that is? ... You get what you pay for @AMDRyzen
joe is still fighting with hardware it seems
he sounds very angry
 
huh, Ryzen is nice tho
(from what I've heard)
 
Wes
/me is converting array-oriented code to proper code
in my defense i didn't know what i was doing
i got so many classes to create, and code to change. agh
i might have a decent design tho, and i might have made something useful [for a limited amount of people]
[very limited]
 
@Wes We do the same in Amp libraries everywhere now.
 
@kelunik does amp/dns directly use any record types other than A/AAAA/DNAME?
#lazyweb
 
1:00 PM
@DaveRandom no, it just realiases them into its own scope
 
I ask because I have have implemented encode/decode for those but missing a lot of other rn, I'm assuming that typically very few applications do anything more than resolve()
Just want to test this code against a real-ish application
I will obviously be implementing everything as it was before release
more, in fact
one thing that you specifically might find useful actually @kelunik is that it will now be trivial for me to implement CAA
previously it wasn't because the typedef system was ridiculous
 
@DaveRandom My ACME client queries MX and will need to query CAA soon.
 
MX is already there
all of RFC 1035 is done, plus AAAA and DNAME
the rest of it just requires looking up the format and adding the defs
and writing tests
lots and lots and lots and lots of tests
I am not looking forward to that bit...
everything here which references a name instead of a number is done
plus DNAME which I haven't pushed yet
 
What's a dname record?
 
It's like a CNAME, but for a whole zone
 
1:10 PM
k
 
for clarity, if you DNAME foo.daverandom.com. foo.com. it means that a query for bar.foo.daverandom.com is resolved against bar.foo.com
 
kk
 
1:23 PM
Any plans for hesoid or chaos? :D
 
I don't really know what they are, they seem to just be different classes?
It looks like they are just TXT records with a different class
in which case they would work fine now if you create queries with the right class ID, there just isn't a defined constant for them
but sure, can add constants
 
morning
I wouldn't be awake this early usually on a weekend, but fucking cat woke me up
 
1:54 PM
Trying to setup symfony, composer create-project symfony/skeleton my_project installs v3.4... while a video I'm looking at installs 4.. how come?
 
Because your symfony skeleton is v3.4
You can force the version with "symfony/skeleton:^4" I believe
 
So, composer create-project symfony/skeleton:^4 my_project ?
Ahh, thanks.
 
Might need the quotes
 
Wes
i was waiting in line to pay and i watched a guy eating an entire roasted chicken at the restaurant that is in the shopping center
just wanted to share it with someone
 
sounds gross
 
2:00 PM
how long was the line?
 
Wes
not very long
the guy was very hungry for sure
 
" Could not find package symfony/skeleton with version 4 in a version installable using your PHP version 7.1.1" such bs...
 
did he have anything with it?
 
Wes
like what
 
also, why does the restaurant even serve whole roast chickens
i dunno, chips or something
maybe some vegetables
something other than just fat and protein
 
2:02 PM
@Wes could've watched me wait for 45 mins for mcdonald's order at 1am earlier.
 
Wes
it's fast food kinda things. people eat there on lunch break
not a classy restaurant :P
 
evenin r11
 
how is a whole roast chicken "fast food"?
 
@Darius Symfony 4.0 requires PHP 7.1.3 or higher
upgrade
 
Wes
i think they are meant for families
:B
but he ate it all, and fast
 
2:03 PM
Blah, i read 7.1.0 kk thanks
 
do the give you a carving knife or what?
or do you have to cut it with that shit plastic cutlery
 
Wes
with bare hands.
like, chicken leg in one hand
the head in the plate, almost
 
are you sure this wasn't a dream/drug induced hallucination?
 
Wes
:B
the guy was seriously big though, like 1.90, 100kg or something like that
i suppose that makes it less impressive
 
Feeling when you need to wait for a deployment to finish, so you can deploy a hotfix for an issue with the current deployment
 
2:05 PM
I think of Italian men in expensive suits with expensive cigarettes riding scooters and saying "ciao" to attractive ladies with unshaven armpits, not face-down in a plate of chicken
 
Wes
we got those too
 
nothing like a good stereotype
 
Wes
also unshaven armpits = french
 
I doubt that's true either tbh
or at least, no more so than anywhere else
 
Wes
:B
we say that's french. we all say it's someone else :B
and at the end he licked his fingers
:B:B
one by one.
i mean, sucked them
:B
 
2:08 PM
That's how you know it wasn't a dream, because in your dream it's your fingers, not his...
 
Wes
:B
 
Would anyone mind sharing with me why I might have installed this line of code long ago while lost in tutorials. ini_set('user_agent', null);
 
well fair enough I guess, if you are going to consume an entire chicken in public then you may as well go for it full steam
 
Cleaning up code and have not been too sure why I have this line for some time
 
2:10 PM
@Stuart that's the default value and I don't think many people bother to set it
 
Oh. Thanks @DaveRandom
 
looks like either working around some problem with badly configured shared hosting, or just a misguided attempt to fix some unrelated problem
 
Believe it or not; Googling ini_set('user_agent', null); doesnt bring up anything useful
 
Typically you would need to set it to a specific value rather than clearing it
and even if you did need to do that, setting it in php.ini is probably a bad place to do it
 
Hmmm... Looks like it's getting commented out for a while to make sure all is clear b4 deleting it and trying to rmbr what I removed later
 
2:12 PM
afaik basically every place where that value might be used provides a saner way to pass it
 
+1 Its a goner. Thanks
 
all this roasted chicken talk made me hungry :<
 
I ate roughly half a kilo of cornflakes this morning so I'm probably good til dinner
 
/me goes out for kfc
 
@SaitamaSama don't do it, you have so much left to live for
 
2:14 PM
:B
now that I think about it, it's been weeks since I had dem colonel's fried chicken
 
<insert some shit joke based on the phrase "cold turkey" here>
 
Infact @DaveRandom based on what u said about "Typically you would need to set it to a specific value rather than clearing it
and even if you did need to do that, setting it in php.ini is probably a bad place to do it" Its a goner. Not just commented out, Gone!! Thanks. Also got my PHP7.2 setup on my live shared hosting site
 
I think the only time I have ever needed to set user_agent to a specific value is when scraping google search results, because they don't give you UTF-8 unless you look like a browser
also maybe some wikimedia API requires it I think?
 
which places me at about .01% of what anyone on shared hosting takes advantage of which in turn places me MILES ahead of the competition. Espec with being PHP7 now.
 
other than that it's basically a useless setting
 
2:20 PM
+1 Dave
Kinda looked like it
Getting a 96 on Google Page Speed Insights. I suppose thats pretty good
 
the mobile side is the tricky bit, I find
I just let it be someone else's problem though :-P
 
and ive learned a TON over the past few years
which you have been very instrumental in. (Not sure if you saw the drama laden post I posted yesterday) and I appreciate your help. Thanks a ton. Not everyone is cool here and Im one to always speak up for whats right See aforementioned post
Yall have a great weekend
@DaveRandom are you in the USA?
 
no, UK
 
@Wes got a minute?
 
Ah. I thought I rmbrd you saying so. Too far for a burger
Yall take care and best to everyone
 
2:30 PM
:-)
 
Wes
yes, but i'm knocked out. i hate the standing desk
i need a chair. i tried
need to move the computer on the desk tomorrow
 
Why can't you get one?
 
Wes
need to move monitor etc. it's a pain in the ass
 
Maybe rest for sometime. You're actually doing yourself a favor by not sitting on your ass the entire day.
 
Wes
it wouldn't be a problem standing, but heels hurt so much
 
2:32 PM
Well, eh. I can feel you. Umm, could you join me in a private chat? Had to talk to you about the bug thing.
Or whatever kind of one on one chat room feature SO allows.
 
Wes
we can talk here
 
Uh, yeah. So, you read some of the code. Any pointers where I should improve so that you don't have trouble reading through the next time?
 
Wes
didn't read your code, just looked at proxymanager
 
Ah, okay. Well then.
 
2:59 PM
Does const FOO = Bar::OTHER_CONST trigger autoloading of Bar?
 
@DaveRandom yes, at the time the constant is accessed
 
right, I meant "at parse time"
so in that context the answer is "no" I suppose
 
@DaveRandom That will automatically run that code then, no?
 
I mean like if I define a class full of constants that point to constants in lots of other classes, loading the top-level class doesn't cause every other class to be loaded
I'm actually going to invert this anyway for other reasons, just wondered
 
@DaveRandom correct. Constants are only loaded upon first access.
 
3:11 PM
If I have two methods evaluating constant expressions, one doing so directly (may throw Errors or warnings) and one converting all errors and warnings to a certain exception type, what do I call those methods?
 
Should I be changing to Argon2i from Bcrypt in PHP7.2 for password hashing?
 
@CoderDudeTwodee no
 
Didn't it win the password hashing competition?
What could be the reasons to not use it yet?
 
Wes
I HAZ CHAIR
standing is hard if you can't recover daily
 
@Wes congratulations!
 
Wes
3:24 PM
means that my legs started hurting 10 days ago and in 10 days i couldn't recover :\
 
nite all have a happy Sunday.
 
Wes
cables are on the floor right now but i'll fix them later
 
Wait, why don't you use a laptop?
 
Wes
programming with a laptop?
need a proper keyboard, a proper monitor
 
Maybe try something like Emacs, you could get a lot of monitor space.
 
Wes
3:35 PM
meh
also have you tried using photoshop on a laptop
the minimum toolbars take half of the screen
 
@CoderDudeTwodee because bcrypt is good enough
You might want to start a new project on argon2i (read: don't bother), but there is definitely no point in migrating existing passwords
 
3:51 PM
Symfony 4, stackoverflow.com/questions/48304155/… this guy having same issue as me, no correct answer yet.
 
@NikiC gotcha
@Wes I have been using photoshop in a laptop for the last 6 years of my life.
 
Found the solution :p
 
Haven't really had an issue till now. Except maybe with the lassos.
 
@CoderDudeTwodee I was in the same vote, until I got tired of the 17 inch screen. Work is so much easier on the eyes on a desktop. And .. my bad habit, I tend to sit on the couch or bed with the tv infront when on laptop. Desk seems to be like "ok.. it's work time"
 
@Darius Well, I like to sit on the bed and work on the laptop. Sitting on a desk for more than 30 minutes gives a hard time to my butt.
:P
How do you check for errors like non-unique insertion in a unique column from pdo exceptions? Do you read the error code? Also, how do you get which column it is referring to?
 
00:00 - 16:0016:00 - 00:00

« first day (2660 days earlier)      last day (2285 days later) »