« first day (2307 days earlier)      last day (2655 days later) » 

http://imgur.com/A9OeJAv
 
Anonymous
\o/
 
Fucking hell
stack.imgur.com/hwokl
 
http://stack.imgur.com/hwokl
 
12:08 PM
http://imgur.com/hwokl
 
Anonymous
:P
 
that's a shame
 
Wes
@kelunik i've found an use case for (unset) :B execute some stuff and return null in a one liner:
return (unset)$this->whatever();
i'm gonna miss (unset) :B
 
@Wes I'm gonna miss punching you in the face
 
@Wes return unset($this->whatever())?
 
Wes
12:10 PM
@PeeHaa did i actually sound serious to you? :B
 
although i don't follow the fixation for one-liners :X
 
@Wes I just cannot be sure with you
:P
 
Wes
@PeeHaa eat a bowl of you know what
 
Anonymous
spaghetti?
 
Wes
:B
@pmmaga hopefully in future unset() will return "if the variable has existed" (cc @bwoebi)
 
12:11 PM
wat why
You better be trolling again
 
wow that makes so little sense to me
No sense at all
 
Why?
 
Why it doesn't make sense?
 
yes
 
Wes
12:15 PM
we can argue it's not a major feature :B
 
$result = isset($var);
unset($var);
return $result;
that's basically what it would do
 
There isn't a use case I can think of where knowing whether it existed is useful
@DaveRandom yes and how often have you done just that?
 
Legacy code is where it is useful, that doesn't mean it's not useful
 
Wes
i don't even use isset anymore
 
@DaveRandom How is that useful?
Why the fuck would you care about that
 
Wes
12:16 PM
@PeeHaa it's just nice to have, not that is absolutely needed
 
You want it gone aaaaand it's gone now
It's all you care about is that it's gone
 
@Wes this. It is zero cost, with potential non-zero gain
 
Sounds too much like change for the sake of change to me
 
@PeeHaa Imagine some legacy code or fucky lib which does something in the dtor of an object which may or may not exist
 
yes
Still don't care whether it did exist
Maybe if you have a real use case you can show I see it, but.... nope
 
12:19 PM
if (isset($this->array[$key])) {
    unset($this->array[$key]);
    // do some cleanup
}
That's from the RFC page
how is that not obviously potentially useful?
if (unset($this->array[$key])) {
    // do some cleanup
}
 
Wes
all "weak remove" functions (ie "ensure absent") usually return whether the thing has existed
unset is weak remove, as it doesn't error if the variable doesn't exist
 
It's just so limited I really don't care about it
 
Wes
so it makes sense
 
The only real thing I can see is the magic unset issue
Sorry ¯\_(ツ)_/¯
 
Essentially what you are saying is for ($gods; $sake; $why) $aaaahhhhhh++;
 
Wes
12:23 PM
with that rfc i think the problem was existing code not returning bool in __unset and offsetUnset
 
@DaveRandom :P
 
If you use more than one question mark and it is not in jest, I will find you and I will block you. I may or may not let you live.
 
dnslib??
 
Anonymous
review??
 
M-M-M-M-ONSTERKILL
 
Wes
12:29 PM
@DaveRandom what do you mean??????????????????????????
 
:p
 
Anonymous
@Wes Is it too late now to say sorry???
 
lol
 
@mods sorry, was just too tempting
 
Anonymous
breath of fresh air
 
12:30 PM
why did you kick @PeeHaa?
 
Wes
@DaveRandom because i'm missing more than just your body <3
 
@Gordon He started it. Also sorry.
 
:D
You're such a grown up kid :D
 
@Wes You are missing my headers as well?
 
12:34 PM
Hi, What is the technical reason why we can't have a method called list() inside of a class?
 
!!docs list
 
[ list() ] Assign variables as if they were an array
 
> Like array(), this is not really a function, but a language construct.
 
But isn't it possible for us to tell the difference between list() and MyClass::list() since one is attached to a class, and the other isn't?
And if it is not attached, then treat it as a language construct?
 
12:36 PM
list is a reserved keyword: php.net/manual/en/reserved.keywords.php
 
@Bowersbros So annoying
Just keep bugging @bwoebi to come up with a solution for that
 
i have issue with trim(stripslashes($theVal)) + 0 giving me 0 if i passed string 3 also to $theVal
 
> These words have special meaning in PHP. Some of them represent things which look like functions, some look like constants, and so on - but they're not, really: they are language constructs. You cannot use any of the following words as constants, class names, function or method names. Using them as variable names is generally OK, but could lead to confusion.
 
There are so many times i've had to create a getList function, instead of having it nicer :P
 
heads up: not going to happen
 
12:37 PM
/sadface
 
already tried
 
It's pretty much impossibru sadly :(
 
impractribru ...
 
Whats the reason it has to be a construct and not a function?
 
@JoeWatkins Same sad end result though :)
 
12:38 PM
@Bowersbros what ?
 
Oh wait, i see the reason. never mind
I'm assuming because it can be LHS?
 
right
anyway I think I prefer getList to list ...
 
/me is going to do real work again
 
@PeeHaa whatever ...
 
:P
 
12:40 PM
Is it perhaps practical to have another layer of restricted keywords, instead of being a keyword, its a restricted global function name, so you can't create function list(), but as a method, it could be created?
So it stays as a language construct, it can not be overwritten in the global space as a toplevel function, but classes are free to create them as they see fit
 
I just noticed, you are not using PHP 7
use PHP 7 ...
 
Me?
 
yes
 
5.6 /cry
Working on it though
 
12:43 PM
Framework doesn't support 7.
 
then ditch the framework, and burn the author ...
 
@JoeWatkins Still doesnt work for class though
Which is the more useful one
 
->class ?@peehaa
 
it works for a lot of these previously restricted keywords, foreach and list and whatever ...
 
@Bowersbros 3v4l.org/YO48v
 
12:44 PM
I think that's as far as it can go without using something like the thing bob proposed and everyone hated ...
 
@JoeWatkins 4 years into dev. Hard to ditch now, but new bits are being moved slowly into laravel, symfony components, etc
 
You most likely don't want a method called list
A class on the other hand
 
ohhh, I understand
 
@JoeWatkins what?!
 
:o you can name a function foreach.
Madness.
But nice.
Note, syntax highlighters do not like this
 
Wes
12:45 PM
[PHP Fatal error: Class 'PHPUnit_Framework_TestCase' not found :B time to update to phpunit 6 \o/
 
Upgrade you text editor / ide
 
@Gordon ikr, some of these were lifted in 7.0 ... you could dig about in parser.y if you can be bothered ... I can't :D
 
@Bowersbros he said "ditch the framework" not make it worse by adding laravel
 
Laravel is a vast improvement on our current setup
Whether its the best is beside the point. It is a huge improvement on the current setup
We can't even do DI in our current one
 
is it, really ... oh really ... is it ... oh really ...
 
12:47 PM
There is a $_classes array on models, but no documentation on how to override, how they work, or even if they work
No tests on that as far as I have found to help me determine how it works, so, our tests are hacky jobs
And all models are static methods, so you can't easily test / mock the db layer
 
imagine you had a pile of shit, an actual pile of turds ... would it be better to build a box, made also of shit, to put your pile of shit inside ??!??!!?? I think it would not be better ...
 
this is the best teaser trailer I have seen for any film in a long time
 
Many issues like that. + php 7 support is pretty recent and still alpha
since last christmas (2015)
@JoeWatkins What is the actual problem with using Laravel?
As far as I can tell, it follows some decent modern standards, testability, injectability, etc
 
nothing, it's great, I love it ...
 
Oh, sorry. meant @gordon
 
12:49 PM
I can't be bothered to have that conversation again ... sorry ... if you already made up your mind it's great, then there is no changing your mind ...
 
@Bowersbros well, it has lots of statics and it calls things facades that are not facades
 
and it actively promotes bad practices "because easier"
 
I'm by no means sold on it being perfect, but it is a vast improvement on our current setup; I am willing to be convinced that it isn't that good, but every argument i've seen so far has been against its "facades" being untestable, which as far as I can tell, are both optional, and testable
 
nobody will say that here, but we will say that it promotes their use, because it's easier ... it's fine to say they are optional, but if the vast majority of your examples and documentations are using them, what do you think people are going to do ?
 
Anyone know htaccess? any ideas: stackoverflow.com/questions/42113602/…
 
12:51 PM
and if they do use them, do they have testable code ? are they optional ? or are you stuck with them, all over everything ?
 
They are still testable right though? It just aliases calls through __callStatic and some various other resolvers
Facades are testable yes
 
i tried a few snippets but nothings working
 
the facades themselves are testable, obviously ...
 
But its just a wrapper around your own code to make them "static"
 
I really can't be bothered ...
 
12:53 PM
The underlying class that the facade is pretending to be is swappable in the container, so dependency injection isn't an issue, mocking isn't an issue and testing isn't any issue; or atleast no more so than any other code
 
why use them at all ?
 
@Bowersbros Do you know the term hidden depedencies?
 
guys is anyone here experienced with xampp and my sql? im trying to make a database and need a little bit of help please
 
Saves you having to inject in, for example, cache into every method / class that may use the cache. If you change the dependency, you'd want it changed globally anyway, so you change it in the container, and all instances of cache are resolved regardless.
@peehaa Yes, and I agree that because it isn't in the signature they are hidden
 
> Saves you having to inject in
 
12:56 PM
@RachelDockter xampp is crap. install vagrant and then go to phansible.com to click your dev box together.
 
i have to use xampp for my uni assignment
 
> you'd want it changed globally anyway, so you change it in the container
 
@RachelDockter OK then can you be more specific about your problem please
 
so just change the definition of the dependency injector
 
12:57 PM
@RachelDockter Chances are they won't care / know if you don't use xampp, they probably said that as an easy install guide
 
Nothing in there says use "facades"
 
I don't think there is way to convince anyone who decided that laravel is harmless that it's anything other than harmless ...
 
i think i figured out how to make one but it was also the logic behind it like does it get saved to a file in my htdocs? how can i access it from a seperate website project
 
mysql gets stored deep inside the machine, not inside htdocs
 
I'm going to do real work, where I can make real progress, and I don't have to hear about lara fucking vel ...
 
12:57 PM
You access it through mysqli_, PDO, etc functions
 
i mean the database i make with mysql
does that get saved as a file
 
yes
 
@JoeWatkins, absolute pleasure talking to you. Won't bother in future.
 
@RachelDockter since you are just now learning it all, leave learning about DBs till the weekend
 
Thanks @gordon though, you actually helped me understand why some people have issues with laravel, i'll think on them
 
12:59 PM
@Bowersbros it's not you, it's the million people who came before you with the same arguments, and who never listen to anything anyone has to say ...
 
thats the whole assignment lol
 
you have to actually learn the language basics, before you start poking around databases
 
also another thing i was curious about, we have to make like a live twitter feed, would i store everyones posts in a database?
 
@RachelDockter You can export a .sql file to share it around
 
alright
 
1:00 PM
@RachelDockter yes
 
i dont think this will be too hard
 
@RachelDockter they ask you to use xampp. of course it will be hard
 
:D
 
There are thousands of guides on Google about live twitter feeds in php etc, so if you're new, might be a good time to look over them and get ideas
(but don't copy them. teachers know)
 
i think i got the hang of xampp
 
user7172542
1:00 PM
Is it possible to redirect all people that come from a Google search result to a certain page of my website?
 
i will look that up bowerbros
 
@Dan yes
 
user7172542
Using PHP.
 
user7172542
@Gor
 
@Dan Pretty sure you could do it on HTTP_REFERRER
 
user7172542
1:01 PM
@Gordon what is the besy way to do that?
 
or whatever apache bastardised the name to be
 
Nope you can't
ssl prevents that
 
Someones answer didnt work, know htaccesss works though since i have working redirects
 
you shouldn't use php for that ...
 
Oh sure it's simple.
1) Configure
2) Wonder why it didn't do what you told it to
3) Go to step 1
 
user7172542
1:02 PM
@Bowersbros I can't use HTTP_REFERRER because they would need to be on a page for me to use it. I need to almost redirect them before they get to anything on my website.
 
/me tries to work v2
 
@Dan haproxy / other proxies?
 
/me joins you v42
 
By the way though, google will probably penalise you if you send their traffic to a page that they didn't send them to
 
@donaeldunready, Lichfield
The best early medieval King out there. I'm just great. I'm the bretwalda. The bestwalda. I've got great swords, everyone says so. Make Mercia Great Again.
171 tweets, 63.9k followers, following 138 users
 
1:03 PM
If they expect the user to end up on example.com/blog/page1 and they end up on example.com/blog/from-google
They will probably penalise you
 
@RachelDockter the first step would be to test whether http://localhost/test.php shows you "1", if the file in htdocs contains <?php echo 3-2;
you get that working, it means that you can actually start doing something
 
1:17 PM
say what you will about docker being crap… at least it does most of the things it claims to do… unlike runc… grrrrr
 
@PeeHaa wut? That's already working since PHP 7.0?
 
@bwoebi No it's not
 
@PeeHaa huh?
 
39 mins ago, by PeeHaa
@JoeWatkins Still doesnt work for class though
39 mins ago, by PeeHaa
Which is the more useful one
 
ah class names
 
1:23 PM
:(
I still am thankful though :D
Don't get me wrong :P
 
:-P
 
@PeeHaa why would I ever need to name a method class()?
 
hey dad
 
Hmmm..
Class, SchoolClass
Group, SchoolGroup
 
then name them schoolClass :P
 
1:30 PM
thats what I did
=)
And a union became SchoolGang
 
what are you trying to name?
also, I would just call it "Course"
 
A collection of users with the role of student in context of a class
Already have the course name used for courses
Well actually its not a collection of users =)
nvm anyway [=
 
you really need a separate name?
 
not really, it is a legacy project, it had lots of screwed up naming
 
class StudentCollection extends Components\Collection
 
1:34 PM
and mixed concepts
it was a reaction to Gordon's question
How are you btw
gotten back to working or chilling it out?
 
me?
 
I just noticed that one can use make instead of all this grunt/gulp shit
 
user895378
1:49 PM
morning
 
'nin
@PeeHaa did gitamp fail lately? Or is this the longest it's been running without an issue :P
I didn't restart since we moved
 
@Trucy that sounds like trading a fork in your eye for a fork in the other eye, because then you have to build a makefile
 
@Ekin I think I restarted it once. IIRC it was when you were on the plane
So this is probably the longest run ever anyway
\o/
 
user895378
@DaveRandom I am agree with all
 
@PeeHaa \o/ good. Was it the same issue? I don't remember
 
user895378
1:57 PM
"Ooh I get to use make ... yay!" -- No one, ever
5
 
Oh wait. I think that was the one where the logs got purged
 
@DaveRandom nvm, in fact you can just use npm
 
So dunno what the cause was
 
user895378
^ swapping out the fork in the eye for a pinecone in the eye
 
let's just blame @DaveRandom
 
1:57 PM
the idiotic thing with gulp/grunt it that it depends on EVEN MORE plugins
@rdlowrey the only solution is to NOT code in js
 
Ah right yeah I remember that time, was again on the old droplet
K, it's fine :P
 
:D
 
@Trucy That's not really a solution, more of a prerequisite
 
@DaveRandom So you're saying that this project is a failure before even the first staging?
 
@PeeHaa I think the last time I touched it was weeks ago
 
2:00 PM
Sounds like your tipical project :(
 
@DaveRandom exactly :P
 
@DaveRandom oh the IP changed btw, still has all the keys
 
@Trucy I don't believe I have ever once finished a project
@Ekin I think my session was using the name anyway, I assume there's a dyn dns?
 
@rdlowrey seen my ping from yesterday?
 
@rdlowrey "Man I can't wait to do JS" — No one sane, ever :D
 
2:02 PM
@Trucy stop assuming that we're sane…
you mean "Man I can't wait to do JS - No one insane, ever"
 
@DaveRandom Not sure, but probably yeah
lol wat. DO banned my current IP
 
@Ekin wat? :P
 
Dunno I got 1007 Access denied saying they banned my IP :D I didn't even use any DO links today so far, lol...
 
@bwoebi "Man I can't wait to do PHP" — No one, especially the php-src devs, ever
 
@Trucy psssssht
 
2:06 PM
"Man I can't wait to do @PeeHaa's mother" -- Everyone, ever
4
 
@Ekin do you need me to do something in the control panel?
 
Neh I will just switch to another
 
kk
 
user895378
@bwoebi I did, but I still don't agree
 
@rdlowrey Have you read my subsequent discussion with Aaron and Dor?
 
user895378
2:11 PM
I have a very specific use case and changing the name of the method from connect() to ping() doesn't impact it ... I still need to verify that I can, in fact, connect to the server without actually performing any operations
 
user895378
@bwoebi hmm didn't continue reading ... will do so now
 
No, I meant regarding the Promise return in particular
 
user895378
@Trucy when you said npm my eyes just glazed over and I stopped participating lol
 
user895378
@bwoebi well, you definitely won't convince me that the promise is unnecessary
 
@rdlowrey feel free to have ping - but connect() implies that you're required to do it manually.
 
user895378
2:13 PM
@bwoebi I think you're right about that ... I'll rename it to ping()
 
@rdlowrey Well, I managed to convince Madara and Trowski
 
user895378
@bwoebi lol okay, well I'll read the discussion with an open mind
 
user895378
The only problem with not having a dedicated connect() method is now I have to expose lots of backoff options as part of the client implementation
 
@rdlowrey maybe, but just set sane defaults which satisfy 99%
 
user895378
because in my long-running application where some dependency may periodically be unavailable I need control over the logic for how connect retries are attempted to avoid the stampede effect
 
2:15 PM
I like makefiles, they are cutting edge and extremely hi-tech ...
 
user895378
@JoeWatkins sure, but are they webscale !?
 
lol
and yes, of course, and they support sharding
 
user895378
okay good.
 
user895378
now I'm allowed to implement makefiles
 
fyi no-one has used the term "hi-tech" seriously since the 80s, which is appropriate for the subject matter
 
2:15 PM
agile makefiles ftw
I'm not the only one ... see
/me is afk, school run ...
 
@DaveRandom "noone who is not on TV"
btw, did something change in session management going from 5.3 to 7.0 ?
 
user895378
We replaced "high-tech" with "cyber"
 
oh, right
 
Well it went via "digital"
 
@tereško yes
Guess who fucked it all up?
 
2:23 PM
well, what were the areas of the change?
 
@rdlowrey did you also replace foreign database keys with american keys?
 
@DaveRandom FYI we use "digital" also in french. Except that "digital" refers to everything about fingers…
 
I have no idea I just assume yasuo fucked soemthing up by default
 
user895378
@Gordon you must be referring to freedom keys ... and the answer is, "Yes, @Gordon, we totally did."
 
@rdlowrey do you have a firewall at work? and do make the mexicans pay for it?
 
user895378
2:27 PM
Absolutely. It's the best-looking wall. Our wall is better than everyone else's. It's a beautiful wall. It's the best.
 
did you also start removing the database migrations for which there was no proper docs?
they are the worst. like really bad. all these records that migrated into the database.
 
we have a potluck today, I made japanese beef curry. My office smells amazing
 
German WiFi is the Wurst... imgur.com/gallery/rMSaZ
 
user895378
@Gordon we suspended the db migrations, but a lot of folks on the team were unhappy about it so we've temporarily resumed using them. I suspect, though, that the anti-migrations group will eventually win out
 
@Gordon
 
2:36 PM
@Tiffany please don't mention asian food when I'm here :(
I miss it :(
 
:)
 
"Why is my computer running really slo... oh I left Wireshark running for 3 days again"
 
@DaveRandom Haha, I know that feel :-D
 
@Trucy I just used curry seasoning I got from the store. I had a bowl this morning, and the seasoning seems to be irritating my throat >.<
 
@Tiffany that's what you get for mentionning good food when I can't have it :(
Seriously, the major downside here is that there aren't any restaurants
(apart from a mcdonalds somewhere and some brasseries…)
 
2:49 PM
I bought the stuff from the store
(recipe below comic)
 
@Tiffany p-pumpkin?
Now that'd interest my gf
(just have to replace the chicken by a non-meat alternative)
 
I used the beef recipe
haven't tried the pumpkin and chicken curry
beef curry though <3
 
3:11 PM
dunno .. beef is better in chili
 
Wes
3:22 PM
do you ever get the sensation that programming books are intentionally pumped up with words because otherwise they would be way, way shorter
and nobody would trust a 50 pages only book
 
Hi everyone
 
Wes
this is killing me god (effective unit testing 2nd edition)
 
did anyone used laravel 5.3 or 5.4 here?
 
Wes
we don't do laravel here
 
do you know anyone who is using it @Wes
 
Wes
3:27 PM
pretty much -> sorry if that sounded mean but i ensure you there aren't many laravel users in here. in fact there are probably none
 
@Wes oh fine.. are they in any chat session now?
 
yes, all none of them
I mean ... just ...
try to reform question so that it is not laravel specific and you'll have more luck getting an answer
 
oopss.. Thank you both. have to find someone now who is familiar with laravel
 
Most users with laravel questions can't ask their questions in "Php form" as opposed to a "Laravel" question
 
user895378
laravel is a fucking plague
 
user895378
3:39 PM
sorry, but it is.
 
well .. their marketing has been extremely successful.
they have managed to scoop up all of the codeigniter/fuel/cake users and a large portion of yii community
 
It's not hard to see why either.
People raise eyebrows when you tell them something which works isn't good
Case in point: WordPress
 
@Sean btw my company got hacked: blog.sucuri.net/2017/02/…
 
@Danack probably how antifa page got fucked over few days ago
 
Ouch
 
3:49 PM
Also, my last day here is a week on Friday so ¯\_(ツ)_/¯
 
I feel like 90% of the wordpress sites could be just static pages
 
Anyone know if there's a way at the db-level to enforce a bi-directional unique constraint. e.g. imagine a table with 2 columns, parentId and childId. To avoid cyclic relationships I obviously want to avoid scenarios where a child can be a parent of it's parent (i.e. rows like 1,2 and 2,1)
 
@Trucy in effect most of them are, due to the amount of caching that is required to make them not fall over when they have more than 1 visitor at a time.
 
I can obviously do it at the app level, but it's far more work
 
@Leigh the unique composite key thing should work - what went wrong with it?
 

« first day (2307 days earlier)      last day (2655 days later) »