« first day (1496 days earlier)      last day (3446 days later) » 

12:22 AM
@tereško when you make collections of Entities in Domain Objects, do you use arrays or you create your own Classes that do that for you?
 
@salathe what's up?
 
12:50 AM
4 hours ago, by salathe
I think I'm the only one here with their name in phpinfo()*smug grin*
 
ah :-D
@AndreaFaulds oh, we ended now up with to_ and try_. not sure, I'll need to rethink that. I definitely agree with Levi that it's function bloat. But maybe that's not so bad that'd it'd be maybe acceptable. Currently ±0 on this.
 
@bwoebi I went for both because I realised that having just one or the other is siding with one use case and not the other
 
@AndreaFaulds I saw what you did there. Not sure if that's the best idea, but worth a try. I need to think about it.
 
I tried combining them with an optional parameter, but it's just... ugly
 
yep
 
12:58 AM
if (to_int($foo, NULL) === NULL) doesn't feel right to me
It's also not a nice type signature
 
same here
I just still am not really sure about that. The one libs will just let cast exception fall through, other will use the try_ variant and throw an unexpectedvalueexception etc..
 
Oh, I kinda see your point there...
But it's alright for libs to handle it specially, I suppose.
 
It sums up to I don't really know why to_* variant with exceptions at all because libs anyway will probably convert the exceptions etc.
 
The point of to_* with exceptions is failsafe input handling
 
well, that we have with NULL too, no?
 
1:05 AM
Well
If you do User::get((int)$_GET['id']) and the URL is ?id=not_an_ID it'll fetch user 0
If you do User::get(to_int($_GET['id'])) and the URL is ?id=not_an_ID, it'll throw an exception
 
and still, it needs to be caught anyway for a nice error message.
 
Oh sure, but it's better than just proceding to do stupid things
 
at that point it's just as easy to use null and it allows specific cases instead of the likely global try/catch
 
You can use try_int when you need it.
 
(btw. that above is also why the "unregistered user" is usually id 0)
my issue with to_* functions is that I really have no idea what people will do with their tooling they're provided.
 
1:09 AM
The point is that doing the lazy thing is safer now. Previously the only lazy way to convert types was (int). And that will coerce any old garbage into a valid value
 
I really don't know whether it's a good idea or not without knowing what'll be done with these functions, how they'll be used in reality.
 
I suppose.
But yeah, the basic idea of to_int is I'd rather we had a function that fails safe instead of returning an apparently correct value, and one short enough that people might actually use it.
Especially people who are way too lazy, like myself.
I guess it's not the "PHP way", though. The idea of failing safe is very... un-PHP
But I think you should be able to fail safe if you want to. It's just not PHP's default approach.
try_int is a very PHP way to do things: Return NULL on failure
I'd say to_int is more Pythonic: Throw an exception on failure
It's probably the C#/Java/C++/whatever way too, but I don't use those languages ;)
 
1:29 AM
^ agree
 
That said, I don't think there's anything wrong with choosing not to do things the "PHP way". We have strict type hints for classes, we have strict comparison, etc.
 
 
1 hour later…
2:39 AM
I actually feel bad for Stas.
His default constructor RFC has been completely derailed :/
 
3:36 AM
anyone here
??
 
3:47 AM
Yes.
 
what is the cost of making such site
I am creating it for an Indian client
 
4:11 AM
Bobs-MacBook-Pro-2 bob$ php -r 'function &a(&$a) { return $a; } $a = []; a($a)[] = 1; var_dump($a);'
array(1) {
  [0]=>
  int(1)
}
Bobs-MacBook-Pro-2 bob$ php -r 'function &a(&$a) { return $a; } $a = 1; a($a)--; var_dump($a);'

Fatal error: Can't use function return value in write context in Command line code on line 1
What's wrong with you, PHP?
Why does the latter not work when the former just works as expected?!
 
user895378
I can't read either one, how should I know ;)
 
@rdlowrey hmm?
 
user895378
I just mean code like that is hard to read.
 
@rdlowrey it's just an example… s/$a/$var/, s/a(/func(/
 
user895378
My SWAG (scientific wild ass guess) is because in the first one you aren't directly modifying the array zval. You're modifying one of its elements.
 
user895378
4:22 AM
But in the second you're directly modifying the zval returned from the function.
 
user895378
(array dereferencing FTW)
 
@rdlowrey to be precise, I add an element, not modify ;-)
IMO both should work…
Introduce in PHP 5.5+: Fixed bug which caused fatal error when having function returning by ref on the left hand side
It's a bug, I'm right, no? :-)
 
user895378
Ha!
 
5:15 AM
@AndreaFaulds I noticed a couple issues with the Safe Cast RFC:
1. The proposal section still says that a positive sign isn't accepted for to_int and to_float
2. The top of the RFC lists version 0.1.7, while the changelog shows v0.1.8.
 
5:33 AM
@TheodoreBrown Fixed :)
 
6:10 AM
Hi Friends
 
6:30 AM
helllo
 
7:06 AM
hi
 
have you been up all night @AndreaFaulds ?
 
@rdlowrey What have you done? ;-)
 
@JoeWatkins That's correct, unfortunately. If I'm unable to sleep beyond a certain point, instead of wasting hours trying to fall asleep and failing, I'll just get up.
 
My sleep() feature is very robust :)
 
Mine is, but if I ruin my sleep cycle by staying up too late several nights in a row... I won't have an easy time sleeping.
 
7:12 AM
mine isn't, every signal interrupts it ...
 
You seem to have sleep problems, is that something you've always had? :(
 
since we moved into this new house really
there must be something going on at night that wakes me up ... it's nothing in the house, we shut all the windows and mute phones and computers ...
we are really close to the ferry port, I think it must be that ... sleep is so regularly broken that it must be something that's happening ... signals ...
/me begins to think wearing a foil hat is a good idea ...
 
lack of sleep causes some really bad health problems ie obesity ..... man you are in trouble :-/
 
7:30 AM
posted on November 20, 2014 by kbironneau

/* by ACey */

 
@JoeWatkins Talk to your GP?
 
yeah I did try that before, and they got me to do a diabetes test and blood tests and what not, nothing showed up ...
don't want to have to take sleeping pills ...
 
How about some opium then?
 
the only sleeping pills we have that work are opiates ... I don't want them ...
 
Oh okay, I thought you were talking about Melatonin lol
 
7:41 AM
hmm
never heard of that ...
 
It's what your body naturally produces when it's about time to sleep
This is the synthesised version of it.
It's mostly effective for short-term issues such as jet lag though, basically restoring your circadian rhythm.
 
seems like you need a prescription or buy from internet ...
 
melatonin? hmm, i believe you can just buy it from any drug store ... maybe singapore is different in that respect? ;-)
 
yeah controlled in the eu
 
8:19 AM
@Feeds that's basically my daily life
 
goodm eurning
 
8:37 AM
yo
 
8:52 AM
Anyone in here into security research?
 
Morning
 
Morning. Who here likes to go through the C of PHP?
 
morning
 
is that a bot ?
 
@user3148596 what do you mean?
 
8:54 AM
PHP is written in C.
 
@user3148596 there is no C in 'PHP'?
 
yes
there are people here who write C for PHP, yes
 
@Naruto there is no I in team
 
@AndreaFaulds touché, altough there is, but it's hidden xD
 
No, PHP is wirtten in C. Look at the source code of PHP and you will see what language it is written in.
 
8:55 AM
C you say ... interesting ...
 
@user3148596 yep, I know. There are people here who contribute to php, if you're asking
 
Yeah, we write C's of code.
 
.. and you have been talking to 2 (if not more) of then already
 
(4, actually)
 
I think you're forgetting the As and Bs
 
8:56 AM
Andrea, Joe, Jack and I :P
 
Cool. So, if I found a potential buffer overflow what would you want me to do with it?
 
The ABCs of PHP code
 
@user3148596 Potential?
 
Mor nings
 
@user3148596 show me
 
8:57 AM
I believe there is a security ML?
 
moin @RonniSkansing
 
@user3148596 Responsible disclosure?
 
yeah there is, but not easy to subscribe ... they refused @ircmaxell
 
@JoeWatkins wat
 
(because they are fucking mad)
 
8:57 AM
@user3148596 github.com/php/php-src if you want an easy-to-link resource
 
I only say potential because I haven't exploited it yet.
 
@JoeWatkins you can still send
 
@AndreaFaulds inorite, and he was all like "yeah I agree" ... I don't get it ...
 
@user3148596 you can probably just link to the offending line of code from the source on github and paste that link in this chat
 
the day before friday... not bad at all =]
 
8:59 AM
if it really is dangerous then we can delete it so it won't get seen by google, and then you should probably use security mailing list ...
 
yeah
 
@RonniSkansing I got a date with phil sturgeon tomorrow ...
 
@RonniSkansing most of us call it "thursday"
 
Hey guys, I got some OnePlus phone invites if anyone is in the phone market atm.
 
@JoeWatkins [= sexy...
 
9:01 AM
Thor's day.
 
@webarto Did you ask me for a oneplus invite a while back?
 
@JoeWatkins don't forget the condoms.
 
@Fabor for past 48h the net has been flooded with plusone invites
 
@JoeWatkins Where you meeting Phil?
 
London
 
9:02 AM
@tereško Yeah, the released 3 to every current customer.
 
anyway, I am pretty happy with my Z2 ... oneplus-one would be a downgrade
 
@JoeWatkins I will test it out to make sure I am correct then send it in using responsible disclosure.
 
Yeah, those are nice
 
@user3148596 that's also a good idea ... but you walked in the room and said "want to see something?" and then when we all said "yeah", you said "no" ... which is a bit shitty ... #justsayin
 
^ I was pretty excited
 
9:06 AM
@Fabor well , z3 is out .. but the general consensus is that it's just a "newer z2 with a larger battery"
 
Actually @joe
 
@tereško An apple style new phone then
 
Actually @joewatkins what I said was "Cool. So, if I found a potential buffer overflow what would you want me to do with it?"
The consensus was to use responsible disclosure.
 
@user3148596 and we told you: "show us, we'll tell you if it's an issue. If it is, we delete your message, and you can send responsible disclosure."
 
@Fabor probably. Then again, I think sony has released only 4 phones this season: Z (flagship), E (cheap one), M (phablet) and C (selfie phone)
 
9:09 AM
I remember when they released the PSP one. That was pretty awesome.
 
... unlike 56 released by samsung
 
@user3148596 also good, but I wanna see it ... I can delete messages ... if you had said "I found a buffer overflow that is explotable" it would be a no brainer, go to the list, but there is still the question of whether you have found something worth posting to security list ...
 
@joewatkins is there a PM in this chatroom? I'll send it to you that way.
 
there isn't
 
yeah there's not ...
 
9:10 AM
Drat. Well, thank you for being helpful.
 
@user3148596 There's such a thing as email, though; it shouldn't be too hard to figure out what Joe's email address is :)
 
if I would make a guess, it's krakjoe on php.net
 
correct
 
ugh, what's wrong with wiki now ...
 
shared seems to be struggling @Jack
 
9:14 AM
@Ja͢ck is dattibaw at php.net?
 
indeed
 
@FlorianMargaine almost ...
 
damn
what did I get wrong? D:
 
single t double b
 
9:14 AM
:)
 
it's that word though ... not sure what that word is ...
 
datibbaw... is a weird word
 
reminds me abit of babadook..
 
reverse from third letter onwards, makes it easier to remember
 
it's 9 o'clock in the morning @Jack ... you reverse it ...
 
9:16 AM
@FlorianMargaine probably similar to "Hctib Elttil" (lfgcomic.com reference)
 
dat wabit
did I do it ?
 
dat wabbi
still doesn't make sense :D
but easier to remember, I'll give you that
 
we clearly have no idea how your name works @Jack ...
 
sigh ... from third letter onwards = "tibbaw" :)
 
@tereško I'm ignorant, sorry...
da wabbit?
you're a rabbit?!
 
9:18 AM
Yup
 
I prefer the rabbit and speech impediment one ...
 
Yeah, there was a time where we liked to reverse all the things.
 
(and were comfortable mocking speech impediments)
so I guess we're not going to get to see the buffer overflow then ...
 
Nah, WB beat us to that :)
I didn't know that Elmer Fudd was known as Egghead ... learned something new
 
@FlorianMargaine it's actually an entertaining webcomic which started out in WoW era
 
9:21 AM
ah
never played wow
 
how about any generic RPG ?
 
OMFG
 
please, make it go away
 
lol
 
@tereško well... I did play an mmorpg for some time
 
9:23 AM
lol
this is just terrible ...
 
To the Adam West mobile!
 
@JoeWatkins Seems pretty awesome to me :P
 
@Fabor you spelled "fucking crazy" wrong ...
 
moin @Jimbo
 
9:30 AM
Mornbo. You wan sum blog? If yes what email?
 
juh muh underscore see 'curly-c' jay at hot mayul dot com
 
Man that makes little sense :P.
 
Your slum bog made little sense too.
 
Was a play on that "u wan sum", "I'll give it ya" video :(
 
posted on November 20, 2014 by kbironneau

/* by Jana */

 
9:39 AM
heh, poor armadillo.
Got it.
Should have something sent to it now.
 
Dammit @Fabor. I have had enough of your viagra ads.
 
But you're my best customer :(
Did it actually arrive though? heh.
 
lol xD
 
@Fabor Yeah I got it (Y)
 
Coolio. It's just basics atm while we make it nice.
 
9:47 AM
good moomins
 
Morning @salathe
Need a Room 11 logo/crest and favicon. One we can all eventually get tattood on to our shoulders :P
 
@Fabor Does that become the access key to this chatroom? :P
 
ThW
morning
 
i11uminati.
Damn. I should have used that as the blog name.
 
@Fabor the php logo is tattooed on my wrist ...
morning @salathe
 
9:53 AM
@JoeWatkins heh nice. I'll have to check it next time we meet.
 
@JoeWatkins proof or gtfo
 
10:07 AM
 
@JoeWatkins This is indeed awesomeness.
 
@JoeWatkins Do you ever look at your tattoo and wonder what "dyd" means?
12
 
lol
He has DBG on the other wrist.
 
hehe, I don't ... all of the writing on me is upside down ...
except one word
 
10:15 AM
do you do them because it signifies what you have dedicated part of your life to?
 
or because they are cool pictures, or because I like to be stabbed a few hundred times a minute with 7-10 needles at a time ... take your pick ...
 
0
A: PHP static vs self variables and inheritance

JimboLate Static Binding PHP's Late Static Binding is a pretty awesome concept when you get your head around it. In effect it allows you to code an object to handle the data contained within a child (extending) class. You can then change out the child class and as a result the parent (base) class wil...

 
Morning
/me is very angry
 
Aids catching up with your face?
Wait what?
 
10:21 AM
@Leri /explain
 
@HamZa My company has changed whole network interface without notifying me and morning started by yelling at me why does not most of the products work properly.
 
@Leri my condolences...
 
@Jimbo dynamic constant resolution smells really bad
imo
 
@SergeyTelshevsky pretty awesome story :) the part where I upgraded the server but didn't touch...sounds so familiar.. :D
 
@nikita2206 How come? What's your opinion on a better way?
 
10:24 AM
@nikita2206 dynamic constant? Sounds like wrong term
 
I think the answer sums up pretty good @Jimbo +1
 
Dynamically inherited
 
@Jimbo I think public function getTableName() would be better
 
@Leri Aren't you changing soon?
 
@Leri dynamic resolution, constant is a noun to which "dynamic resolution" applies
 
10:25 AM
@nikita2206 And where does it get the variable name from within getTableName()
 
@Fabor Changing what?
 
@Jimbo it can be hard coded in getTableName definition or it can get it from anywhere
 
Jobs
 
@nikita2206 So if it's hardcoded, I'd suggest putting it as a constant at the top of the class because it's hardcoded at the clearest possible point
 
@Jimbo one of the things to consider - you can not enforce protocol using constants. using abstract method you could say that this method should be overriden
 
10:26 AM
Yeah, shame there's no "you must override this property"
although you can write code to do that for you
 
@Fabor Once I finish rewriting all internal stuff. btw, are you former Fabien?
 
@Leri He's Fabien v0.2 now
 
lol
 
@Leri Correct. The artist formerly known as Fabien
 
Piss artist
 
10:28 AM
lol
 
> piss artist. a person whos pre-occupation is to consume large quantities of alcohol on a regular basis,but who's body cant cope as well as an alcoholic's can [for non-english ppls, otherwise it'd sound prettty weird]
 
@Fabor Nice avatar.
 
@nikita2206 Hmm, so abstract getTableName(), as it must be inherited, forces the user to implement their own version of somehow getting the relevant table name
I like it. But even if I used that, I'd simply return the class constant within it, so then that can easily be changed
(at the top)
@RonniSkansing danke :-)
 
@Naruto yeah, this happens all the time
 
@Jimbo though you use it in the sense of someone who just wastes time
 
10:32 AM
@ziGi Yep, that's pretty much what @Fabor does ;-)
 
@Jimbo be it hardcoded in getter or hardcoded in constant it still is hardcoded somehow:)
 
@nikita2206 Yep yep, I just put constants at the top, then props, then getters, constructor, methods. So knowing "this object referrs to this table" right at the top is preferable to me, (although that's leaky, perhaps a config mapper for entities -> tables?). I guess either way is good, it's just an example for lsb anyway
 
@Leri heh cheers. Wife and I in Mexico a while back.
 
Mexico? Living on a ranch? Oh wait, that sounds more Texas :)
 
@Jimbo du bist velkommen (my danish-german)
 
10:39 AM
Can any of you recommend tools for remote collaboration with a focus on group video, whiteboard and screensharing that works on Lin/Win/Mac?
 
hangouts
 
screensharing works pretty well on join.me. There's some more advanced features there too.
 
@Gordon I was going to say hangouts, but whiteboard... hm...
 
@FlorianMargaine there is 3rd party addons for hangouts that provide whiteboards
 
Whiteboard is just an app. I personally just use my real whiteboard during calls
 
10:40 AM
@Ocramius no one can read it then ;)
 
nobody can read my writing anyway :P
 
@Gordon must it be free?
 
it's crypto-secure
 
lol
 
@RonniSkansing no
we tried rocketboard.it recently, but it's mac only
 
10:42 AM
@Gordon how about them top google results like www.groupboard.com
 
@RonniSkansing yeah, I could google those but then I have to try those. I was hoping some of you already did and would like to share their experience
 
@Gordon consider that we use hangouts also for conferences with clients, as we can invite them to the call via their phone number :P
/me pitches someone else's product...
 
@Ocramius we tried hangouts a few times but the quality varies wildly
not sure if its a hardware or connection problem
 
@Ocramius you can invite via a phone number?
 
or inherent
 
10:44 AM
i.e. you can call hangouts with a phone?
 
@FlorianMargaine you can call a phone with hangouts, from a group hangout or whatever
and we spent ~10$ in a year on that :P
 
@Gordon most probably connection. For linux users, I'm aware that their video encoder is not the best :-\
 
@Ocramius linux user successfully using hangouts
 
@FlorianMargaine also here, but video quality is not the best there
 
10:46 AM
we used to use skype but skype on linux cannot do group video and their screensharing sucks monkey scrotums
 
plus CPU usage is high, but I can live with that
@Gordon skype sucks scrotums anyway
 
true
 
(oh, the fine language!)
 
@Ocramius yeh, use miaou
there is webrtc video, but not group video yet :(
 
10:50 AM
@Naruto done
 
@Gordon ty
 
@Fabor Sounds like a place I'd like to visit.
 
@Leri Just be careful picking time and place :)
 
@Fabor How should I choose time and place? :)
 
@FlorianMargaine we thought about building our own WebRTC thing, but we're a PHP consulting company, not a "build the hipster tool again"-company
 
10:55 AM
@Ocramius try out github.com/Canop/miaou
or dystroy.org/miaou for a live version
 
Wondering about hipchat instead
 
using it at my company (hipchat)
audio/video isn't group, and it has never worked for me
 
chat for hipsters?
 
we always go on skype/hangouts...
 
10:57 AM
@Leri Always check the FCO site. And read around a lot, go by recent stuff too.
 
We use Flowdock for now; it's developer centric and ties into our repos and qa processes.
 
and miaou supports markdown :P
 
Example Syria
 
@Gordon Hey, what could be the cause of someone unable to delete their answer besides hitting the daily delete limit?
 
@Leri It's like most things though. Sometimes shit happens, but more often than not you just trust your gut. Like walking through any rough area, albeit a country or a street.
Travelling with someone helps too.
 

« first day (1496 days earlier)      last day (3446 days later) »