« first day (2594 days earlier)      last day (2337 days later) » 

11:00 AM
@samayo That seems to say that callable is more useful that Closure.
 
Wes
callable checks if a method is visible (public, protected, private) on the declaration, rather than on "retrieval" of the method. basically you can have a $callable passing a callable declaration, and the very same $callable not passing it somewhere else. it is misleading, causes bugs, and it doesn't even work consistently wiki.php.net/rfc/consistent_callables
the "new proper way" (imho but not only imho) is calling Closure::fromCallable() from a valid scope, and passing around the returned closure object where it's needed
if i remember correctly there's a brief explanation here wiki.php.net/rfc/closurefromcallable
 
@jjok it is
in general you just want to know that a thing can be called as a function, you don't care whether it's a closure or a method reference or a bare function name
You might use Closure as a return type but even then there's probably no point.
 
@DaveRandom Yeah. That's what I thought originally.
 
Wes
don't contradict me dave
:B
 
whatever, I do what I want
 
11:11 AM
@DaveRandom is there a callable type?
 
...yes?
 
oh, there is
 
Wes
use closure or wait till "oh now i see why i should've used closure only"
 
@FlorianMargaine since like 5.4 or something :-P
 
@DaveRandom last PHP I compiled was php3
 
11:12 AM
So, is the answer, callable is, in theory, better, but it's too inconstant at the moment. So, until that's fixed use Closure?
 
Wes
it will never be fixed
 
(for realz. I wanted to see if we could host php3 on our platform. Turns out it's hard because no mysql drivers...)
 
@Wes well, I fundamentally disagree with that
 
Wes
the fact that the "callability" is not a fixed property, but it is a property that depends on the calling scope makes it useless
 
@Wes you are such a negative nancy
Make PHP Great Again
 
Wes
11:16 AM
i remember danack ranting about it, i am sure he'd do a better job than me at explaining why callable is evil :B
also it's in the rfc too
 
@Wes Isn't the point of the RFC to fix it?
 
"Has an RFC" is a long way from "will be implemented" :-/
 
@Wes It's not evil, just a bit broken.
 
IMO step 1 to fix this is merging the symtables
 
@DaveRandom That doesn't help with callability.
 
Wes
11:20 AM
by the way, i wanted to rfc "callable" automatically "casting" to Closure when scope changes. e.g.
function foo(){ return "ciao"; }
$foo = functon(): callable{ return "foo"; };
assert($foo() instanceof Closure);
assert($foo() === "ciao");
cc @Danack
 
No, but it paves the way for passing callables as bare names
which would fix pretty much everything in one go
 
Anonymous
bare names bruv
 
because that can be implemented such that scope is no longer relevant, it can just create a closure
 
Wes
that would solve the aforementioned problems
 
@Wes I just wanted to suggest that as well.
 
11:22 AM
@Ocramius I tired to write "Otwell" 4 separate times
the phone kept autocorrecting it
 
Wes
but i don't really care writing Closure::fromCallable(), especially because i don't :B I do:
use const strlen;
assert((strlen) instanceof Closure);
strlen("str");
$s = strlen;
$s("str");
i have an extension that allows me to set closures in constants :B
best thing i ever did
even if joe did it, mostly.
 
it's okay. go ahead. we wont judge for you it.
 
Wes
:B
 
we just want you to be happy
 
Anonymous
that's a lie
 
11:30 AM
Colleague is setting active record properties just looping through $_POST in a foreach. "It's my form, I know what's going into it"
Sometimes it feels like the divide between where this codebase is and where it should be is too big to even try and deal with.. ._.
 
@JayIsTooCommon well yes, but we hope it consoles you
!!lxr str_replace
 
[ /ext/standard/string.c#4165 ] PHP_FUNCTION(str_replace)
 
11:46 AM
 
Ta
 
@JoeWatkins \o/
Amazing!
 
@Sean everything can be fixed. Start by educating the team
my current team didn't know anything about clean code when I started. We are now writing clean DDD/CQRS code with some event sourcing sprinkled in 1.5 years later
still lots of legacy code around though :)
 
12:00 PM
The problem is I reckon I don't enough enough about it myself to teach others
 
@Sean learn together patricklouys.com/resources
and maybe get outside help like from @Ocramius (we had him over for a couple days to help us)
 
yes, @Sean, you have to learn DDD, CQRS and Event Sourcing… it's really great to shoot you in the foot with. all applications should use it :)
 
Wes
lol
 
@Gordon what... no... i was talking about clean code :x
it was the right thing to use in our use case for some parts of the application. but definitely start with clean code...
 
Wes
i'd avoid drastic changes
cqrs + es requires a complete different mindset
 
12:06 PM
ah well. clean code. ok. for that you can just buy the book. read it over it the weekend and remember not put too many args on functions, especially boolean flags and dont chain methods.
 
totally agree
 
see, @Patrick agrees with me
 
I just mentioned ddd etc to show that people can learn (and it doesn't take a lot of time)
@Sean if you have the time to read a book this weekend, check the top starred message ^^
 
Wes
finally youtube rickrolled me! i.imgur.com/jFcXlrq.jpg
 
@Sean Or this google.co.uk/…
@Sean Or this google.co.uk/…
 
12:12 PM
@Sean learning together is actually a good suggestion. read a book together and discuss it or share the topics and have people do short presentations in informal afterwork meetings, get your boss to sponsor pizza and beer
2
 
@Ocramius we just include the build font.css file as a separate CSS file. Theoretically, we could, i) change it to be built into not the final location, ii) include that build CSS file in the entry point JS file with just require('./build/font.css');
 
I don't even think half the team would get behind that as great as that is
 
@Ocramius we just include the build font.css file as a separate CSS file. Theoretically, we could, i) change it to be built into not the final location, ii) include that build CSS file in the entry point JS file with just require('./build/font.css');
 
basically, have your own internal usergroup
 
@Sean So you might be able to get half the team with you?
 
12:14 PM
@Sean how many ppl? what's your role in there? what about your boss?
 
Thanks for the resources though, I'm going to get that book. At worst I guess it'll just give me a bit of confidence
 
@Sean get the people together who are actually interested in improving. that's cool. at least you'll work with motivated people
2
 
@Sean how many people in your team?
 
@DaveRandom which is now slightly easier thanks to you too :D
 
@Ocramius but I could not be arsed - we have more important stuff to sort out rather than avoiding a single cached css load.
 
12:18 PM
@Naruto wuzzat?
 
9 including the cto
 
@Danack that's what I ended up doing - I basically want stuff to be statically pre-processed before continuing with any work.
 
> My standard speech to teams large and small is: “Do you really want to suck forever? Is that what your motivation is in life? Because it’s a choice, you know—you don’t have to be that way.” A team has to demand greatness from itself. - Jeff Sutherland, inventor of Scrum
3
@Sean ^ you can tell to those who dont wanna participate
 
@Ocramius btw, fun fact - google don't version their fonts, and they feel free to change them at any time: github.com/google/fonts/issues/1307#issuecomment-342890323
 
you can tell to those who dont wanna participate
 
12:20 PM
@Sean if you want I can give you a free ebook copy of my book to share with your team
(as long as you guys don't share it outside of your team, please ^^)
 
Anonymous
dibs on an illegal copy @Sean
 
@Patrick if you give away your book for free to everyone you wont earn anything from it… but I guess that's fair, given that we gave you all it's content for free, too
 
@Gordon R11 !== everyone :)
 
where's my copy?
 
@Wes although that's cute, it wouldn't be appropriate for strict mode, and adding closure::fromCallable (until we have a bare named solution), doesn't seem like an actual burden....and in fact makes it easier to read code.
 
12:22 PM
@Patrick What's your book about/called?
 
@Gordon gotta proofread the last chapter. You'll get one for sure. Learned quite a few things from you over the years
 
you did? like what? making dad jokes and snarky comments?
actually that's more than I could hope for :D
 
@Gordon can't remember the specifics. but I think we had some discussions that influenced my opinions on some things
 
@Allenph That was probably funnier in your head, than for the person on the receiving end. aka please don't do that.
 
like that one time about collections or something like that? (that was in the book but now I replaced that with query objects I think)
 
Anonymous
12:25 PM
Do I get a free copy based on good looks?
 
damn… I had hoped for dad jokes
@JayIsTooCommon why would you get a book then, babyface?
 
@jjok there's a not brief explanation of the problem with callables as part of wiki.php.net/rfc/consistent_callables
As well as them being slower to check.
 
@Danack Yeah, someone posted that link. I read through the lengthy introduction :P
 
I'm fun at parties, honest.
2
 
12:44 PM
Thanks folks, been a bit rough recently so the advice and resources are appreciated
 
Can confirm, Danack is fun at parties
 
@Leigh lol takes me back to AL/GCP
 
Used to party all the time there too
The only thing I miss is "fucked up fridays" to be honest
 
@Danack Pizza Shiphola is my favorite pizza… just add garlic, jalapenos and extra cheese
right @Wes… riiiiiiight?
 
@Leigh eh, overall it was a good environment. Till they changed my seat -_-
 
@Danack Just signed up to the PHPSW Christmas thing, so we'll see...
 
1:03 PM
@Danack They were starting to be a bit assholey themselves, but I guess you got the truth of the matter.
 
@Gordon If that fails try this .
 
Wes
can confirm @Danack is fun at parties youtu.be/lDpJqJ62faY?t=30
 
He sure is. Lovingly staring at @DaveRandom
Well lovingly or psychotically. I am not sure.
 
Wes
lol
 
I am not sure I have seen a picture of @DaveRandom where he doesnt look stoned
 
1:16 PM
> unorganized pieces of amphibian shit
quality insults there
 
@Fabor open these two links, listen to youtube.com/watch?v=3NiEFX7fTxg + watch jsfiddle.net/mqdzwn6n/1
6
 
@Danack I did not. Thanks <3
 
@JoeWatkins Added support to instanceof
Now that we have it on two ops I think it's a good time to work out how to change it so we can more gracefully support int and friends.
If this passes we'll probably want to add a function that checks if a given value will satisfy a type. Works for ints, bools, callable, classes, interfaces, etc.
Really annoying that we don't have it now but once we have type parameters it becomes more important.
 
Morning
 
lol @Danack
At first it's like "Please help" then the longer you wait the more you realise it is "I'm stealing your soul"
 
1:31 PM
@Fabor Shit! When was this!?
 
Wes
AHAH jsfiddle.net/mqdzwn6n/5 guess who did this
 
Didn't we also have a jaws soundtrack one?
 
@Fabor did you find some time to read yet? ^^
 
@Danack That is amazing
 
@Wes oh geez, lol
 
Wes
1:42 PM
in my defense, i was drinking sparkling wine or something like that
i hate that the hardest things to name are the simplest things. i did an iterator wrapper class that simply applies a function to key() and current()
new Whatever($originalIterator, function($key){ return $key + 100; }, function($current){ return $current + 1938; });
that adds 100 to each key() and 1938 to each current()
how'd you call it?
 
what do the 100 and 1938 mean?
what's their purpose?
 
@Wes array_walk?
 
If we speed up array_walk would it become array_run ?
 
Wes
@Leigh they don't mean anything. it's a generic iterator wrapper, sort of
 
@Jimbo PHPSC 2016 :D
 
1:48 PM
I'd probably make something less generic, so I'd get new Whatever($originalIterator); // This is also an iterator
 
Wes
the two functions can do anything
 
but make Whatever specific to a purpose
 
Wes
not needed in my case. i'd have a bunch of classes that are used just once
 
That's OK
 
Wes
also i like the idea of reading what each callback function does
TransformIterator, WalkIterator, MapIterator
or a generic IteratorWrapper
 
1:51 PM
@Wes nothing wrong with that. most of my classes are only used once
 
Wes
class IteratorWrapper<OK, OC, NK, NC> implements Iterator<NK, NC>{
    function __construct(Iterator<OK, OC> $original, Closure(OK):NK $applyKey, Closure(OC):NC $applyContent){ ...
 
@Wes Definitely needs Assoc, because keys ;)
 
If I'm no longer using an email address, I should probably revoke the gpg uid it's used on, right?
 
or just remove the address from the gpg key?
 
I would say that's tidy
 
1:57 PM
you can edit the list of addresses on a gpg key
 
Oh yea, you can add your new and remove the old and keep using it
Good point Florian
 
I've done that a couple of times
(job changes)
 
Yeah, our company email addresses have changed over here
 
heyy guys how are u?
:D
 
@Patrick I am a few chapters in. Nothing grand to report so far. Probably my only real critique atm which is subjective is the use of Trackpad for examples. :P Maybe add some stuff like "Who is this book for?". Mention the PHP version used in the book near the start.
 
2:04 PM
so @Patrick's book is called "Mastering PHP 6" ?
 
i have question
i have build contact form by using php and it's working
some hosting are working
some aren't
 
Hi All!
Evening
 
have you guys experience same like i did ?
 
What is the point of strict mode in mysql?
 
2:09 PM
Sounds like a good question for google.
!!? What is the point of strict mode in mysql?
 
Search for "What is the point of strict mode in mysql? -site:w3schools.com" (https://www.google.com/search?q=What+is+the+point+of+strict+mode+in+mysql%3F+-site%3Aw3schools.com&lr=lang_en)
• MySQL :: MySQL 5.7 Reference Manual :: 5.1.8 Serv… - Comparison of the IGNORE Keyword and Strict SQL Mode …. removed in a future MySQL release, at which… (https://dev.mysql.com/doc/en/sql-mode.html)
• Upgrading to MySQL 5.7? Beware of the new STRICT… - 18 okt. 2016 - This blog post discusses the ramifications of STRICT mode in MySQL 5.7. (https://www.percona.com/blog/2016/10/18/upgrading-to-mysql-5-7-bew
 
@Fiido93 need more specifics... what hosting, code sample, any errors?
 
@mega6382 point
 
@Tiffany hi tiffany well it's successfully sended, some hosting are working like godaddy
 
@AlmaDo Sure I read all that, but that is so frustrating sometimes like sending '' in an integer column even when there is a default value set. Don't you think? Especially on dev server.
 
2:11 PM
i'm using the same code like i did at godaddy and tried other hosting.
and the email doesnt receive
 
is there an error message? check logs? check junk mail?
 
nope
where to check it ?
the logs
?
 
I only know where IIS keeps logs :S not familiar enough with Apache or nginx
 
@Jeeves Do not rely too much on w3schools.com
 
2:16 PM
@mega6382 W3Schools should not be trusted as a reliable resource. Click here to read why.
@mega6382 That's disappointing.
 
@mega6382 Jeeves is a bot
 
@Tiffany Hahaha, did not know that.
 
@Tiffany no, he's not.
@Jeeves are you a bot?
 
@Jeeves are you a bot?
 
@Gordon Step aside you filthy human.
@Tiffany Step aside you filthy human.
 
2:17 PM
@mega6382 how is it "relaying", if the site was specifically excluded in the query?
 
:D
 
do you not know how to use google?
 
@Jeeves kiss my shiny metal ass
 
@Tiffany You can make a salad out of symphonic metal?
 
@tereško Did not see the - before site:. Thought @Jeeves was querying that site. :)
 
2:18 PM
@mega6382 Skepta is a grime artist.
 
@mega6382 That's what I said. Do you like Ron Weasley?
 
please, stop pinging the fucking bot
 
@Jeeves annoy @tereško
 
@Gordon I know you are but what am I?
 
2:20 PM
!!error
 
@Jeeves a lovable bunch of code
 
It's @PeeHaa's fault
@Gordon How was your Christmas?
 
@Jeeves plentiful
 
@Gordon Estupido.
 
@Gordon Hahaha @Jeeves
 
2:21 PM
@mega6382 I lied, I am Skynet.
7
 
... and that's how you end up in the ignore list
 
@Jeeves is the 1000 monkeys at a 1000 typewriters for 1000 years incarnate.
 
@Fabor Why is a raven like a writing desk?
 
@Fabor yeah that chapter was written really early... I'll see if I can maybe rewrite that. is there any other version than 7.1? ^^
 
Not that I have come across, just nice to mention.
 
Wes
2:26 PM
@Jeeves i knew it!
 
@Wes What do you know about time lords?
 
Also maybe it's just because I am using chrome as my reader but page numbers :P
So congress have asked for an investigation in to Ajit Pai
 
What part of congress :P
 
> Two members of the US House of Representatives have sent a formal letter to the Federal Communications Commission Inspector General calling for an investigation of Chairman Ajit Pai. - Source
 
Can they even do that?
Well obviously they can send letters all they want
 
Wes
2:31 PM
@Jeeves they come from a distant anywhen
 
@Wes Like you?
 
But the majority of congress is still rep afaik
 
@Fabor the purpose of congressional investigations it to find nothing
 
Anonymous
Here's an unpopular opinion: I'm actually not at all concerned about innocent men losing their jobs over false sexual assault/harassment allegations.
 
Anonymous
 
2:31 PM
Shrug, but decentralised web for me please
 
^ hm.. please don't start..
 
Don't stop! Believing!
 
@JayIsTooCommon saw this already. She's one of those "by any means necessary" people, deeply invested into her religion.
 
@Fabor I have seen that term a lot lately. How would that even work? :P
 
@PeeHaa Pong
 
2:33 PM
 
@JayIsTooCommon perfect example of setting the feminist movement back -_-
 
brb dance party to @Gordon's song
 
@Fabor They lost me after mentioning blockchain
And invalidated the entire article
 
Ignore
 
@PeeHaa it wouldn't. The internet would be destroyed and instead we would get cable-tv model of "subscription packages"
 
2:35 PM
find it funny that opposition to net neutrality is "it's for a free market!"
 
Black chain, AI, deep learning
Any of those terms as a solution to problem X is a lie
 
@PeeHaa Blockchain
With cool scrolling
 
@Tiffany seeing how in USA there is no free market, when it comes to telecom, yeah .. hilarious :(
 
I know what a blockchain is
 
@PeeHaa "I'm gonna learn you deeeeep" (c)
 
2:36 PM
hence I invalidated the article when I saw it in the first sentence
 
It's a ledger basically
 
I know
Again
1 min ago, by PeeHaa
I know what a blockchain is
But you cannot sprinkle a word on something and solve all the problems :P
 
Wes
@Jeeves are you saying that i am old
 
@Wes Well... Who's your favourite singer?
 
@PeeHaa Basically like a big book of transactions everyone uses
 
2:39 PM
lol
Now you are just trolling :D
 
:D
 
damn you
:D
Now if you were to somehow combine: AI, deep learning, blockchain and agile to make a new web
You are golden
 
Anonymous
!!wotd
 
bakemeat Obsolete. pastry; pie.
 
Anonymous
php bakemeat
 
2:41 PM
@tereško Wouldn't there be a heavy incentive for some providers to be net neutral? Wouldn't we overwhelmingly value net neutrality in their service to such an extent that regardless of legislation there would always be a neutral service provider?
 
hahahahahahhaha
muhahahahahhahaha
whahahahaha
Wait
You were serious?
 
Anonymous
@TomasZubiri pssst say no
 
Why not?
 
AFAIK lots of places in the US have either a monopoly or a duopoly of one of the big telcos
 
Someone explained it pretty well by saying "Imagine if EA owned the internet"
or "Ryan air"
 
2:43 PM
So in practice a lot of people simply will not have the choice you think they will have
 
I'd be most concerned about the fact that competition against established services like facebook or spotify would be even harder.
 
@Fabor lol. Lootbox based internet
Genius!
Aaaah damnit. I already had the whatsapp lootcard
 
@PeeHaa Are these government granted monopolies?
 
there's like three or four major ISPs throughout US... they don't compete with each other, so they can skyrocket prices
 
@TomasZubiri In a way yes
 
2:45 PM
basically the only hope we have are local telecoms laying out fiber
 
Not so obvious, but the regulation is weak
 
exactly
 
Not with pai the regulation is not there at all
In the past bell has been split up
 
there's no merger between the companies, but the companies have agreed to not compete with each other
 
However it's all come back again in another form
 
2:46 PM
@TomasZubiri not in USA
 
@PeeHaa actually that's what I do. It's a new project and the ICO will start soon. But there will be a token presale. Don't miss out. It will be worth shitloads more once the ICO is public.
 
@TomasZubiri there is no official monopoly, but the "serviced areas" have no (or close to none) overlap
 
Kinda reminds me of the end speech on The Dictator
 
@Gordon Of all the ICOs. Yours sounds most trustworthy. Thanks for the headsup!
 
@PeeHaa it'll keep coming back until congress puts something in place, but it doesn't seem likely with our current administration. However, on the other hand, even if FCC gets their shit passed, it'll be at least a year or two before it can be implemented because it will be held up in court.
 
2:48 PM
I would love myself some gordocoin
 
@Tiffany and there are laws being pushed through to outlaw it
 
its not called gordocoin, but baclavaCoin because its so sweet
 
@Tiffany Court is what gave them title II status to begin with :D
 
@tereško yeah :/ saw some of the stuff going through Colorado, Comcast trying to outlaw cities rolling out their own fiber network
 
@Tiffany would there be any chance of an actual investigation and finding something that would stick regarding pai (maybe after the current administration)?
My guess is nope
But I don't know exactly how merica works
 
2:52 PM
@PeeHaa it depends on if he's received money on the side to impose this. It's a possibility. I'm not certain if they'll turn anything up though...
 
No way that will turn up anything
He is to lawery for something that stupid to happen I think
 
Land of the free*

*if you have lots of money
2
 
I need to read up on what the investigation is about before I give a concrete answer though
 
I don't think he is actually incompetent at all.
 
He just has a conflict of interest
 
2:54 PM
It's just that he is on the wrong team
yeah exactly
 
he used to lobby for ISPs...
 
verizon
 
he has shitty advisers
 
@tereško he really doesn't
The ISPs are the perfect advisers for him :D
 
why?
I would assume that he is arrogant enough to want to be called "best president of century" ... wouldn't you think so?
 
Wes
2:57 PM
 
@tereško We are talking about the fcc and pai
 
ah .. I thought that you were talking about Trump, who put that sockpuppet in FCC
 
I think we can all agree that fox news are bad advisers :P
 
okay, reading an article about the investigation, so the basis is that with the FCC ruling, it would allow for a merger between two companies that have a significant ownership of cable TV in the US
 
@PeeHaa that actually would be true for all news channels
 
2:59 PM
effectively giving one company a near-monopoly
 
@tereško Yes. Agree there totally
 

« first day (2594 days earlier)      last day (2337 days later) »