« first day (2658 days earlier)      last day (2290 days later) » 

9:00 AM
mornings
I had to write ~300 lines of code on paper using a pen, at school today
my hands hurt ;-;
 
sounds like a pointless exercise to me
the kind of thing a teacher thinks will teach you something but teaches you nothing
 
quite so
we even had to write it out in the computer... and compile it and everything
but apparently we won't get marks until we write it out in the paper
 
Wes
i mean apart null, true, false, are others all case sensitive?
 
other what?
 
Wes
> are all php core constants case sensitive?
i don't even know how to check apart trying them all :\
 
9:13 AM
like __class__ and __namespace__ or are they more magic than you'd like?
 
Wes
thanks so these too
 
But null, true and false are not case sensitive
TRUE is a const, true is the value of boolean true
;)
 
Wes
irrelevant :D
they look the same
 
Oh, don't forget ::class
or ::CLASS
 
Wes
that counted already thanks
ftr, i use ::CLASS :B unlike you punks
 
9:19 AM
Because you're going through your rebellious phase
You can use whatever coding style you like, even if it's wrong
 
Wes
constants are uppercase :B TRUE FALSE NULL ::CLASS :B
 
I mean why would you want to use a layer of indirection for true, false and null? also Official docs say ::class
So that you can redefine that constant and break things?
 
he's an acolyte of DDD - they are all about pointless indirection
 
I prefer my get-shit-done-so-i-can-have-a-beer driven design.
That's why I have time to talk about pointless crap here :D
 
Anyone know if you can PHPDoc a variable that throws a certain exception?
 
9:31 AM
Yo boys :)
 
variable?
variables do not throw exceptions
this is not ruby
 
That's a good point. I was lost at documenting the variable.
 
Wes
@Leigh it's matter of consistency
 
A variable containing an object, which we call a method on ;)
Sorry for being unclear
$var->method(); // Is a third party asshole that doesn't document what it throws
 
9:41 AM
@Jimbo you could use an adapter
often a good idea anyway with 3rd party code
 
is there a way to achieve this:
 
Wierd behaviour – #75872
 
Yes but not a good solution
 
10:23 AM
Is there a way to do something like that in twig ?
{% set params.gender = "test" %}
 
@Jeeves lolwut
@Jimbo are you trying to get PHP Storm to stop complaining about catching an exception that is never thrown, by any chance?
 
I have a feeling that Allenph pulled an all-nighter
 
morning all.
 
monins o/
 
10:55 AM
\o
 
11:08 AM
@DaveRandom Yep. Newest says that this Bing SDK doesn't throw a \SoapFault. Yes it bloody does
It throws them all the damn time!
Randomly!
 
@Jimbo Yeh when it comes to SoapFault in particular, you are fucked. There is one thing you can do an it's a bit horrible... create a stub of the class, i.e. put a file somewhere in the project with the same FQN, and create stub methods with the correct docblock, and disable the inspection for "duplicate class declaration". I believe it's the lesser of two evils.
The problem is that SoapClient is zomgdynamic and the best static analyser in the word doesn't have a hope of figuring out what's going on underneath
Have I mentioned that SOAP is terrible?
 
@DaveRandom you must be smelly
 
11:25 AM
Is this code at 7:56 WRONG? Im trying to use it and getting "Parse error: syntax error, unexpected '[' Line 7..."
Ive checked and double checked everything and I know my CURL is not making a call
and would appreciate a hand
 
@Stuart you know, you can link us directly to 7:56
 
dont know how
 
rightclick on the timeline
 
@Stuart I'm guessing because you're using a version of PHP which doesn't support shorthand arrays
What version of PHP are you using?
 
in any case: you get the error because your php version is a walking dead and you need to upgrade
 
11:28 AM
Let me write a php_info real quick
brb
 
if you get a syntax error for [ you are at PHP < 5.4
 
for your curl_setopt_array call, change both sets of shorthand array square brackets from [ ... ] to array( ... ), or just upgrade PHP. (Don't change the square brackets for $_POST[...])
 
Ah... phpinfo() not php_info learning yall...
 
@Stuart Also, make sure you are copying the code right and not forgetting a comma or something.
 
Oh I didnt copy anything. Pecked it out while watching thats how I roll
cant get anything out of phpinfo() still trying
and learning\
 
11:33 AM
echo phpversion();
or in your shell php -v
 
F!! Forgot I was working in wrg directory. Performs poor under pressure
just a sec
 
what pressure?!
 
@kelunik @bwoebi @Trowski can we easily make an option to disable automatic statement deallocation in amp/pg? github.com/amphp/postgres/issues/7
 
@tereško well, you are in the room. that always create pressure for everyone.
 
Pressure I put on myself to answer yall quickly
PHP Version 5.3.29
 
11:36 AM
walking dead
 
For instance, it took me that long to produce PHP Version 5.3.29
Thanks Gordon. Im gonna be contacting InMotion Hosting
 
If the still give their paying users PHP 5.3, I'd just switch away from them
well, even if you are not paying…
 
PHP 5.3, that is like fossil PHP.
 
5.3. entered End of Life 3 years, 5 months ago
 
@mega6382 nah, that's PHP 3
 
11:40 AM
your hosting is shit ... or, if you have a VPS/dedicated server - it's all your fault
 
@DaveRandom coming back to my question from yesterday regarding an API for EoL versions. Having a Json version of php.net/eol.php would suffice
 
Thank yall for the drama free help today
They just set me to 7.1
 
@SaitamaSama Yeah, that and PHP/FI
 
@Gordon that file is super simple. Would be trivial to add a ?json mode to it: github.com/php/web-php/blob/…
 
@DaveRandom booo. You should select it based on header :D
 
11:45 AM
yeh I actually have a really nice Accept: handling lib, but fuck trying to do that in web-php :-P
 
on a side note: someone should just write a wordpress plugin for php so we can move all of php.net onto wordpress :trollface:
 
@Gordon here is the scary part - it might actually be an improvement
 
@tereško I know
 
because right now it is pure "include oriented programming"
 
@tereško that's all of PHP. the autoloader is just a fancy way of doing it :P
 
11:51 AM
I guess I should have called it "include-once oriented programming"
 
12:16 PM
@tereško let's just say it could probably still run on PHP2...
 
yeah, unfortunately, when newbie wants to learn, how to make well-architected site, we cannot tell him/her to "just look at how php.net is made"
 
It's open source, go ahead and make it better :)
 
we gotta pick our battles
and complain about the rest
 
@Leigh that's like giving me a bucket and telling me to stop coastal flooding
 
@FlorianMargaine I pick Agincourt
 
12:22 PM
@Leigh that hurts, man
 
user image
5
 
lol
how old is that :)
 
12:48 PM
@DaveRandom uh, why shouldn't it be deallocated ever?
 
hey...
 
@bwoebi from what I can tell, the remote end is a 3rd party implementation of the pgsql protocol/SQL dialect, but not actually pgsql-backed.
They just don't support DEALLOCATE and it causes the statement to throw on destruction
 
@Leigh congratulations, you've managed to combine racism, with being ignorant. an amazing two-fer.
 
@DaveRandom Just commit the vendor folder and it should work fine. :P
@DaveRandom Then they need to fix that. ;-)
 
indeed, but it doesn't look like they are going to
 
12:56 PM
@Danack I don't think this qualifies as racism
 
surely it can't be too difficult to just optionally make the dealloc callback a no-op
 
just your general national stereotypes
 
can just pass a flag to prepare()
or to the connection ctor
 
@Allenph "they would use it as a service locator 100%." - that would still be a step in a good direction.....it makes then using Auryn as it was intended for be much easier.
 
@DaveRandom It's not about difficulty, but rather maintenance.
 
12:58 PM
@Danack There is a french race?
 
@Patrick tour de france… bicycle race
 
@Patrick "muslim" is being treated as race, so , hell, why not being french too
 
@kelunik connection-level options are a thing in basically every rdbms driver ever...
 
@Patrick don't be obtuse.
 
words are the means for the meaning, @Danack, and you are misusing them
 
12:59 PM
^ this
especially something serious like racism
 
@DaveRandom github.com/amphp/amp/blob/master/…, second bullet.
 
@DaveRandom is there a possibility to feature detect that?
also: we may just ignore exceptions on dealloc
 
I'm not saying there shouldn't be any options, but every new option should be considered and only added if really necessary.
 
bloody hell, you are a fucking developer - you should know how important is to use the correct name for a concept
 
@bwoebi maybe, certainly you could just do PREPARE feature_detect AS SELECT 1; DEALLOCATE feature_detect, there might be a nicer way though
 
1:02 PM
 
@Patrick 4 defeats over 1000 years? not too bad
 
@DaveRandom I mean at runtime - detect that dealloc fails and then stop attemping deallocs
 
@bwoebi maybe. Since each statement gets a callback for dealloc, can just change it to be an empty closure
Haven't fully looked
 
@FlorianMargaine it's def more than 4 xD
 
@Naruto dunno, he shows a picture conveniently leaving out all the wins (like, where's WWI?), so I thought it was an exhaustive list
 
1:09 PM
From reddit: 424 instances of 'defeat'
(and 723 instances of 'victory' but shhhh)
Stop fighting garcons :(
 
didn't know the french won WW2, I thought it was everyone else that did the job ^^
 
@Naruto WWI != WW2
 
ow I read the ? as a I, apologies
make love, not war :)
 
there also was this Bonaparte guy
 
who stole a bunch of stuff from italy
 
1:11 PM
not only Italy
 
@DaveRandom like that, yeah
 
1:27 PM
hi guys, I am configuring service in dependency injection container in Yii2, is there a way how to pass to each model container automatically so that model can access it like $this->di, instead of Yii::$app->di?
I have Yii configuration, can I put there this 'helpers' => [
'class' => 'fantomx1Helpers\helpers',
], , but could I register in config index of another service or container class itself, or if I put there automatic constructor injection like auto-wiring is it enough to put it into single parent class for all objects?
instead of Yii::$container
 
the reason why it's called a DI container is because it contains the dependencies to inject. If it was meant to be injected as a whole and then pull out things, it would have been called Injectable Dependency PullOut Container
 
in Zend 1 it used to be injected as a whole
but maybe I let it as it is, Yii::$container, although $this->container way looked more independent to me
 
as far as I remember, there was no DIC in ZF 1
 
there was something that looked very native to it, unless it was own work of my former colleagues
 
@FantomX1 that's not dependency injection. watch the video above to see how DI should be done
 
1:41 PM
ZF1 made heavy use of the Registry pattern and you'd bootstrap your stuff via Zend_Application to put things into the registry to pull out later. The Zend_DI component wasnt added unless ZF 2
 
@FantomX1 Service Locator, anti-pattern
 
@Patrick I know what is dependency injection, but also Yii2 calls that dependency container yiiframework.com/doc-2.0/guide-concept-di-container.html , other frameworks call it ioc container and I dont know if service locator is synonym
 
Industry standard terms, regardless of what frameworks name them
Laravel when it first came out labelled itself as
MVC
 
@Jimbo maybe I am not skilled enough but only other way I see is dynamic creation or static classes, or should I use factories?
and indeed all frameworks are MVP
 
@FantomX1 Auto-wiring containers use reflection to look at method and constructor signatures before building them to figure out what needs to be built. Before everyone used to use Auryn (GitHub), now Symfony and even Laravel and other frameworks use this
If you're interested, I did a talk last year talking all about DI and then moving onto Auto DI, specifically 26 minutes in
 
1:48 PM
@Jimbo thank you, appreciated I will test it just right now
 
fwiw, while I see the convenience of an auto-wiring DIC, you dont need such things at all when your packages have proper boundaries. There is nothing wrong with having a factory inside your package to instantiate and compose objects.
DI is all great… but DICs…meh
 
ok I agree with factories, but then, there is dependency on those factories , isnt it?
 
Yep, you always have to pass things around otherwise how do they talk to each other?
 
yes, I am just wondering if factories are better than DIC
 
@Jimbo message queues :P
 
1:55 PM
message queues between class themselves not just apis? :D
 
@Gordon Still have to declare a type on the receivers end
 
@FantomX1 I was joking
 
@Gordon joke accepted into FIFO queue
 
lol
 
A DIC has a dependency to all the things because otherwise it could not instantiate them. It's effectively a giant superfactory. Dedicated factories only have a dependency on the things they built. And the consumers depend on the factory, but you can hide them behind a facade and then the consumers only depend on the facade and anything that passes through that boundary
 
2:02 PM
@FantomX1 if you are looking at Yii for "best practices", then you are in for a surprise
 
:D
 
8 mins ago, by FantomX1
yes, I am just wondering if factories are better than DIC
 
well said Gordon, teresko come on, Yii 2 has improved significantly recently imho, though not sure if could contest against laravel symfony in these terms
 
@Gordon I worked with a guy for a short amount of time that came from a company where they had no DIC and only factories (they had consulting from sebastian bergmann etc). He was really happy about the DIC because he had so much less boiler plate code to write.
 
@tereško argument valid
 
2:03 PM
@FantomX1 no, it has not
 
And we use Symfony... I think their DIC sucks compared to Auryn for example
 
@Patrick some large online shop?
 
@FantomX1 It is still REALLY bad from a clean code perspective
@Gordon yes
he used to frequent R11 a long time ago
 
@Patrick I actually find the Symfony's approach to be a lot cleaner.
 
@Patrick why, it is in my opnion only seldomly used boilerplate MVP, its upon you how you organise code, isnt it?
 
2:05 PM
what is "it"
 
@tereško it is better with the newest version where you can use the FQN as a service identifier
Before you always had to repeat yourself
But yml
 
@Patrick you write all the setup in PHP, if that is your fetish
 
@Patrick if we are talking about the same online shop, then I worked there as well for a few months. IIRC it was one giant factory. I liked that approach at the time then. I would still favor that over adding a DIC.
 
you are not yii2 fans, but is there common bootstrap for Yii2 common, backend, frontend modules?
 
@Gordon in switzerland?
 
2:08 PM
@Patrick yes
@Patrick yes
 
How long ago? I applied there a while ago but it didn't end up working out. Too far away from Zurich and they didn't like homeoffice.
 
@FantomX1 have you actually looked how it is made? Can you really defend the insane inheritance tree of github.com/yiisoft/yii2/blob/master/framework/base/… or any code that it contains?
 
RSA key in authorized_keys is different than RSA key in my .ssh folder. I'm connected to my VPS via a web applet through browser but it doesn't allow pasting. Should I go the slow, painful way of typing it by hand?
 
do you know how many levels of inheritance that class even has @FantomX1 ?
 
@tereško not much yet, but I start to see shortcoming of not having common bootstrap, or boilerplate code inheriting common object for introducing common functionality of single DIC into each object
 
2:13 PM
can't think of any other way to get it transferred over without my home computer, or enabling root (which I'd rather not)
 
@Tiffany Did you compare to id_rsa or id_rsa.pub?
 
@kelunik id_rsa.pub
 
@Patrick in 2012
 
@tereško so once again am I following faqguotes framework practices?
 
It's probably easier putting that key somewhere else you have access to and use a secure transfer method to download it then.
 
2:14 PM
wat
 
@kelunik alright
 
@tereško so far I considered Yii2 code practices to be worth of idol to follow but I am sobering to see they might be nto
 
@Tiffany there should be some method for any VPS to put a key on the server.....contact their support?
 
@Tiffany If you have your key on GitHub, you can just download it from api.github.com/users/kelunik/keys
 
2:16 PM
@Danack I can when I initially set the VPS up, but after that, I have to do it through the VPS, at least that I've seen
 
@kelunik oh, didn't know they provided a JSON API
 
@kelunik I'll do that, beats trying to hide it on the backup webserver for five minutes
 
@FantomX1 most framework code is full of warts. It's usually better to learn about clean code from books and other resources.
 
@FantomX1 what you need to start with is understanding what global state is .. this might help: youtube.com/watch?v=-FRm3VPhseI
 
2:17 PM
In MySQL if I am increasing the max length of a varchar column, is it a heavy operation (on a large table) or unaffected by number of rows?
 
@Fabor I think if you're going from <= 255 bytes, to more than that it might need to touch each of the rows.
 
@danack, 2000 -> 15000
 
> String Type Storage Requirements
> VARCHAR(M), VARBINARY(M) L + 1 bytes if column values require 0 − 255 bytes, L + 2 bytes if values may require more than 255 bytes
 
@tereško @Patrick thanks will check appreciated, Misko Hevery is from the same country as me, no causality though
 
Okay, thanks @Danack
 
2:32 PM
o/
 
@FlorianMargaine TIL.
 
Dammit, im a bit stuck with .htaccess again >< I try to redirect a website but keep the URL in the address bar. Which fails.
It does the redirect but doesn't keep the URL in the address bar.
kopy.io/q7S1Q This is what I've tried so faar.
 
@Allenph why does it looks like you code has been indented using random generator?
 
@Duikboot A "redirect" implies you are changing the URL in the browser
you might want a "reverse proxy", but first you should examine why you are doing this
reverse proxy is typically going to be problematic unless you are doing it with an entire domain, even then it can get a bit hairy if the website behind isn't built to work that way
 
2:41 PM
Hmmm I can test it? domain1.com that should go to domain2.com/page-493/ should have in the address bar domain1.com

* Domain1.com has no other functionality.
 
That's likely going to have some weird effects, unless the site on domain2.com is built exactly right
do you control both sites?
more importantly... why are you doing this? If it's purely for cosmetic reasons, most likely don't bother. 99.9% of users don't pay any attention to what's in the address bar.
 
@DaveRandom ... did you mean case-insensitive?
 
@kelunik yes, I commented on the PR
 
@FlorianMargaine idea for project... scrape all SSH keys on the internet... scrape all github keys, intersect, find out which servers might have what code on them
 
2:46 PM
I'm not going to amend it now because there's a review in the diff for that commit, will fix before merge
 
find bugs, ????, profit
 
@Leigh yeah, the "find bugs" part is a bit hard
also the "scrape all SSH keys on the internet"
that might take a while
 
@DaveRandom I think GitHub doesn't care about that.
 
I think it's associated with the hash, I know I've done it before where I've rebased and pushed a commit where the diff is identical and it ate all the diff comments
 
@DaveRandom Yes, but only if you comment on the commit, not if you comment on the PR, no?
 
ı was a php developer once
 
@kelunik it's a review on the diff, I assume it's associated with the commit. I may experiment with it at some point but not on that because I cba right now (maybe later tonight if no response by then)
 

« first day (2658 days earlier)      last day (2290 days later) »