« first day (1122 days earlier)      last day (3826 days later) » 

11:00 AM
@Jarede Do you have a problem reading?
Because most APIs will come with documentation of implementation
 
@peeHaa the one's i'm using don't specify in the docs the case MUST match
 
And saying it should accept both uppercase as lowercase as 133375p34k as bReEzErspeak is nonsense
 
why so?
 
@Jarede Sure they do. The have example right in the docs? They are cased in some way right?
@Jarede Are you on windows?
 
of course
 
11:03 AM
lol
 
hilarious
 
Nope sad really
 
sorry, i don't buy into linux
 
@Jarede *slaps you*
 
Ofc you don't
 
11:05 AM
sorry, it was instinctive
 
Let the shitstorm begin!
New blogpost! Fluent Interfaces are (often) Evil: http://ocramius.github.io/blog/fluent-interfaces-are-evil/ #php #oop - let me know your opinion!
 
@Ocramius #stating the #obvious
:-)
 
so enlighten me as to why an APi shouldn't accept uppercase/lowercase keys?
 
@Jarede Because /THIS is something else than /this
It's common sense
And also how stuff works according to the spec
 
I don't buy into windows..
 
11:07 AM
@PeeHaa there's a lot of people out there that want fluent interfaces even in the language ;)
 
i feel it more commonsense to lowercase the keys
 
@Ocramius Yeah. There are also people who want PRS-puke in ;)
 
@PeeHaa not familiar with the abbreviation :)
 
@Ocramius, well here is $this->returnSelf() in the PHPUnit
and getMock() only return a NULL object if the class/interface does not exists (and is not found by the autoloader)
 
hm? You still are:

1. assuming it's a fluent interface (and not immutable), therefore granting behavior to a mock
2. having to do that per-method
 
11:17 AM
but point 3 ist not really true
 
@ThomasWeinert so mocking a fluent interface with 100 LOC of mock is legit? I don't agree
I can also unit test singletons if that's the argument - just takes me a lot of time (which is my point)
 
no, testing a fluent interface is just not more difficult
 
@ThomasWeinert so take something like:
$foo
->doBar()
->doBaz()
->setTaz('taz')
->otherCall()
->allTheThings();
 
yes you still have to mock each method call
 
and mock it for me - that's a load of calls for just doing something trivial
yes, and that's my point :)
 
11:22 AM
But it's not what you're writing
 
Then I'll gladly rephrase
 
The main reason I would implement a fluent interface is a DSL api btw
 
@Ocramius sorry PSR-puke :P
 
@ThomasWeinert yep. There's just too many who code everything fluent :-)
@PeeHaa ahh, well, PSR sometimes makes useful stuff. Even if it's not 100% super-flexible, you gotta admit that githubbing became more pleasant since PSR
in core... well, no, it's a "recommendation"
 
@Ocramius yes, but no way in hell that should be added to core :)
@Ocramius that :-)
 
11:30 AM
@ThomasWeinert any pointer to what is confusing in that article? I don't really know what I wrote different than what we discussed...
 
Ocramius the unit testing part. Base it on $this->returnSelf() and if the Fluent-Interface was implemented using __call, you don't have to mock each method, but can mock all at once. Make it more difficult is how a fluent interface is called, not the implementation itself
 
@ThomasWeinert I consider __call as a mistake per-se :P
 
Like in you're example calling a fluent interface involves a lot of chained method calls in one structure, so a low of mocking is needed to test that structure.
 
but yeah, will use $this->returnSelf()
 
this is not unique for fluent interfaces, but fluent interfaces promote it
 
pce
11:49 AM
@Ocramius I think fluent autoboxing of Types in the Core would be nice. Like fluent Scripting Languages support.
js example:
>>> "test".length
4
>>> 123..toString()
"123"
 
Morning all, allow me to help you in waking up:
 
Morning @SweetieBelle
 
@Fabien Hey
 
@pce not sure I understand the advantage... where's the fluent interface there?
 
why the hell option 1 is correct ? oO
 
11:54 AM
*pony change*
 
@AlmaDo we called it "DHTML"
 
?? where can I read this?
 
@HamZa do you jave a nice regex available by any chance to validate dutch phonenumbers?
I'm lazy!
 
@PeeHaa nope
 
boooo
 
pce
11:55 AM
@Ocramius in the core
 
you suck!
:P
 
0
Q: Regular expression for Dutch phone number

FloI'm looking for a regular expression on a Dutch phone number, my requirements: Should start with 0 Contains maximum of 1 (optional) dash "-" character, for now it does not matter where it is, as long as it's not the first character Total length 10 or 11 characters I now have this: ^0+-{1}?([...

tadaaaaaaaaa
 
pce
>>> 123..toString().toUpperCase()
"123"
>>> "foobar".toUpperCase().substr(0,3)
"FOO"
 
lol I thought I've seen a question like that about dutch phone numbers, it turns out I was right and I've even put a comment there
 
:P
Damnit. Being lazy sucks
 
11:59 AM
@pce that's not a fluent interface, that's just having an OOP API to internal types
Additionally, internal types should probably be immutable, so fluent doesn't make much sense anyway
@Eugene correct, that value will be available only after flushing. If you need IDs before a transaction is committed, you either need a second connection with access to a sequence (which means no MySQL, since MySQL is a joke) or a workaround table (if you are still using MySQL) or UUIDs
 
@PeeHaa his question is still pretty good, I've seen questions like "what is sql"
 
pce
@Ocramius ok, method chaining != fluent interface. it's a language feature, but what did you mean "by some people want fluent interfaces in the core" - i thought of Autoboxing wiki.php.net/rfc/autoboxing?
 
@pce no. There's actually some people who actually suggest that a method not returning anything should be fluent by default - afaik, Sapphire even implements that at core level :-)
oh, interesting, there's an errata
 
@thenewseattle ?
 
Oew.. wont be long before we hit 100.000 close vote reviews
 
12:13 PM
@DamienOvereem too many crappy questions
 
Yep
we need artificial intelligence
 
Is it Friday yet?
 
maybe a simple regex.. if tag php and no php code, delete
 
@Fabien no
 
:'(
 
12:15 PM
(:
@Fabien but I've done all my work for all week :p
 
@AlmaDo So you can start next weeks :P
 
SO y u no update my avatar faster?
 
@Fabien there's no tasks yet (or I've not invented them yet) :p
@SweetieBelle reenter..
 
I still see the old one @AlmaDo
 
12:21 PM
Yes, compare to the avatar on my SO
 
I hate ponies..
 
@AlmaDo what you say? You wanna fight? (ง •̀_•́)ง
 
@crypticツ huh .. I'm ready for that :p
 
@AlmaDo How can you hate ponies? :(
 
umm.. that's a long story
 
12:29 PM
@AlmaDo You wanted a ponie for your birthday and your parents never got you one, so now you just hate them because they remind you of it.
 
Nope. Het got kicked in his cojones when he approached one.
 
My /mnt/nas/img/poni folder is > 100GB o_o
 
@crypticツ that's impossible. I've never celebrated it since I start my university studying
 
Ohhh sure.. come out with the p(upp|on)y eyes
 
I did not know.
 
12:33 PM
huge pony :\
 
he-he
 
We need to make an official MLP day for the PHP chat, where all things MLP can be discussed without being binned. =o)
 
@crypticツ Notice: Use of undefined constant MLP - assumed 'MLP'
define that pls :p
 
@AlmaDo define('MLP', 'My Little Ponies');
 
12:37 PM
@Wes Did somebody get to you about that ctor thing you pinged me about?
 
@crypticツ then let that day be 29-th of February, ok?
 
@AlmaDo I see what you did there
 
where?
 
user652649
@cspray nope
 
Well, basically: no, as far as I'm aware there's nothing that forces you to have a similar constructor from extending a class. You can declare whatever ctor signature you want (which is a good thing)
 
12:39 PM
@AlmaDo only leap years
 
If the ctor was declared in an interface that would be different
 
@crypticツ pointless.. I'm a member since this August :p
 
user652649
how about without interfaces? btw how does constructor in an interface make sense? hm
 
It doesn't make sense
Don't put restrictions on how a constructor signature should be defined in most situations
That is an implementation detail
 
@cspray well, it may have sense - i.e. force implementor to have a constructor :p
 
12:43 PM
Seriously.. why do answers like this get + voted at all .. stackoverflow.com/questions/19906498/…
 
user652649
agree, in fact i think it shouldn't be allowed
 
user652649
@AlmaDo still doesn't make sense :P
 
@AlmaDo In very, very rare circumstances. You shouldn't be telling a child class or one that implements an interface the dependencies it needs
How could the dev possibly know that for all implementers?
 
@cspray that was a joke :p no sense in declaring such weird thing
 
ah, ok :)
 
user652649
12:46 PM
anyway im nearly sure that php throwed error on incompatible constructors as well and without using interfaces but maybe was years ago. problem is that only today i realized that this restriction isn't there anymore... which means that i spent years fighting against myself designing compatible constructors xD
 
huh?
 
user652649
i checked 5.2 and there wasn't such restriction, so it must be 5 or 5.1
 
what restriction?
 
/shrug I didn't get into PHP until 5.3
 
I worked with even PHP4...
 
12:48 PM
@crypticツ I agree with MLP Day
 
user652649
@AlmaDo LSP error on constructors
 
Good morning
 
user652649
or maybe my partially functioning mind just made that up
 
user652649
morning
 
hi, @ircmaxell
@SweetieBelle then we'll have it each 29-th of Feb
 
12:50 PM
@AlmaDo I think the context to define MLP day should be if(1) personally.
 
Monday, the day of fixing the problems you ignored over the weekend.
 
user652649
anyway thanks @cspray later ill check better the changelog, it's a curiosity, i want to know if that restriction was actually there or if i am just a fool, which is highly probable
 
@PeeHaa Will you use PHP ?
 
@Fabien why?
 
@AlmaDo Why fix or why ignore? :P
 
12:56 PM
why care :pppppp
 
lol
I do wish I could be rid of this current work project.
Ah well.
I've still got that domain levenshtein one to keep me entertained when I can work on it
 
so what's the problem with it? I though we've resolved that
 
Aye, still got to actually build it and do a bunch of domain import stuff.
 
@HamZa I've already fixed meh shit :)
 
mornin!
 
1:05 PM
hi, @reikyoushin
 
@AlmaDo hello ^_^
 
@PeeHaa ok :)
 
tnx anyway :)
 
nope
 
Anyone use Twig here - is it possible to embed proper PHP in a Twig template?
 
1:21 PM
@Danack no, and if you want you, you're missing the entire point of a template
 
@Danack what's proper PHP?
@ircmaxell so mixing php and the template is an instant indicator that there's something wrong?
 
@ircmaxell I realise that would be defeating the point of a template. Was just wondering, as it can be useful in emergencies or debugging.
 
@Danack Questions like that can usually be answered by experimenting and trying for yourself. However, in this case, even if you could, you shouldn't :)
 
meh, PHP is in fact a templating language, you will add twig to it and then php over it
It's like a template in a template in a template
Yo dawg xD
 
@vascowhite I tried - it didn't work, but it's hard to google for something that doesn't exist. There isn't a page that says "You can't embed PHP in Twig".
 
1:24 PM
@HamZa i didn't know templating and scripting languages were the same.. ^_^
 
@Danack So why not trust the result of your own test?
 
I don't like making assumptions about stuff, and it took one minute for someone give me a definite answer?
 
@Danack The result of a test isn't an assumption. How do you think the guy who gave you the answer found out?
 
@reikyoushin if you're using a templating language, yes
@Danack no, because templates are not the place for logic
put logic into a view, which structures data, and the template actually just presents the structured data
 
@vascowhite By having used Twig. I don't use it so it's possible for me to be wrong about it.
 
1:26 PM
if you have a load of different concrete classes, is it better to rely on them setting their own configurations or letting the parent/builder to pass in these configuration values when these objects are created?
 
@ircmaxell I know! I was just checking whether it is possible. I don't actually embed PHP in my templates.
 
@MackieeE finally, there you are.. how's your gf? we were not affected here but mid and south PH were struck hard..
 
Why would anybody do this? My eyes are watering just thinking about it!
 
@reikyoushin Thanks Reikyoushin =) Her family was safe, Thankfully Cebu was fairly safe compared to Leyte(?)
Massive damage there :(
Just devastating, although she's sad that she had friends live in Cebu working, that were from Tacloban city
 
@MackieeE good to know.
 
1:34 PM
I did hear that there is a new Typhoon forming though, just not fair.. !
 
really? who upvoted this Oo ..
 
I'm a cyber criminal.
@reikyoushin you're alive! :)
 
huh..
 
@webarto lol.. it didn't affect us much. though not like these guys..
 
1:44 PM
@reikyoushin Hope you and your extended family is okay too =)
 
@webarto ooh, there are a lot of numbers and letters there, what do i do with them? haha
 
@vascowhite Fucking ouch.
 
@crypticツ btw.. how to delv?
 
@MackieeE all of us are from up north.. thanks though. :)
 
@AlmaDo I don't know, I don't have the privs for it =o(
 
1:45 PM
@crypticツ I have it now (heh, ~2 mins ago) - but I don't see any controls to do that
 
that thread just needs half the answers deleted.
 
I think you need 20k.
 
ah, got that
 
You can only vote to delete an answer if it has negative votes. What score did the answer have? — ChrisF Jan 10 '12 at 22:23
 
@SweetieBelle That just about sums it up!
 
1:48 PM
@webarto but it has -1..
 
huh, then another 100 days and it's done :p
 
But maybe -3 + ...
Dunno.
> Voting to delete answers with score of -1 or lower
 
@webarto I see, yes, thank you
so that's an easy part :p
tomorrow I'll turn my 100-th day here :p so easy to count that it's ~100 rep. a day :p
 
I got to 10k so I can laugh at funny deleted questions.
 
@webarto not only. there's some thing with flagged question I can't get into yet
 
1:51 PM
Yes, but it should be non-linear, I think you'll get to 20k faster at the current pace.
 
i.e. I didn't get what is it
@webarto not sure. May be I will not have hours per day to spend on answering SO
but I though 10k would be harder to achieve ..
yay, my first tag silver badge today also!! :p
 
It's not hard, you just have to be stupidity tolerant and don't give up.
 
@MackieeE Amazing.
 
@webarto huh.. in any case I'm doing nothing on my work :p
and also it's posted here that questions deletion votes casting available since 10k but that's not true
 
Hello everyone..
Is there any PHP security ninja here?
 
2:07 PM
@KamranAhmed well, it isn't good to point to someone.. but.. php? security?
        |
        v
--> @ircmaxell <--
        ^
        |
 
Just checked the profile. @ircmaxell really seems to be the guy. Well I'm not going to ask anything that complicated...
 
@CarrieKendall Roll Tide!
 
@cspray what a game!
and dat hug, though :P how's it going?
 
@CarrieKendall I know. It was a pretty good one; particularly liked the way they came out in the second half and really just imposed their will.
@CarrieKendall That was probably the happiest I've ever seen Nick; that's counting holding up three NC trophies :P
It is going pretty good. My last week at my current job before I go start a new journey :)
 
oh yeah? where ya headed?
 
2:13 PM
@AlmaDo @ircmaxell @tereško
I just want to write a script in PHP that will analyse the site for Sql Injection Attack. How may I go about doing that? Here is what in my mind:

1. Make the website submit the form with ambiguous input and anlyse the result using regular expression or what ever. If the site contains any keywords such as sql error or whatever, the site is vulnerable to SQL Injection attack.

Any guesses? Am I right or wrong in doing this? What would be the better way of doing this?
 
@CarrieKendall Vermont. Gonna be a lead web developer for an investment group
 
@cspray ah, cool.. i drove around a lot in vermont on my way to maine last spring break.. its really beautiful up there :D
 
@CarrieKendall Yea, it is. The wife and I are really excited about it
 
@KamranAhmed first of, read our chatroom pact please. Second - there are standard tools that implement your issue at least partly
 
@cspray that's awesome :] i hope the transition is smooth
also, did you see them show shelby hall on CBS? that's where i work :D
 
2:17 PM
@AlmaDo thanks. I've read it.. And I don't want to use any kind of tool but to write it on my own... What about the algo that I've suggested. Is it OK? or is there anyother better way?
 
@CarrieKendall I didn't see it on TV but I did visit when my sister was enrolled at school there. I'm still jealous by the way
 
@KamranAhmed but that would break on a site with sql contents.. like a blog or something..
 
@reikyoushin yes it would.. Any other way of doing it?
 
@KamranAhmed i dont know how they do it too.. ^_^
@KamranAhmed seen this? i didn't read it full but seems it might give you and idea..
 
@reikyoushin thanks. I will read it :-)
 
2:27 PM
@KamranAhmed I won't help people build a tool that's primary use I feel is bad (hacking). I don't really care if it's not being used for that, but if I think it might, I generally don't help
 
@ircmaxell I'm still watching you lecture - so it that PHPMD so good? (seems to be some kind of 'silver bullet' for me - from presentation pictures and your explanation)
 
it's quite good
there is no silver bullet
 
@ircmaxell that's really a good thing that you'd do. I just asked if my algo was OK or you or anyone may propose a better idea.
 
@ircmaxell I know there's no silver bullet, but we can define any specific rule, right? SO we can adjust it for certain codebase
 
@AlmaDo where may I find it (this lecture)? ^_^
 
2:30 PM
@KamranAhmed here
 
@AlmaDo ok thanks.
 
@AlmaDo I don't know about any, but you can define custom rules
 
@ircmaxell yes, so that's my point. I've never heard about it before - and it's just 'wow' about how useful it may be. I'll try it
 
@ircmaxell do you have any lectures on security as well? ^_^
 
2:34 PM
@ircmaxell well, I've always though that there are no ways to test how good is code - but only to analyze it with my own eyes
Now I see that I was wrong
 
Well, only half
these tools are awesome, but they are only heuristics. Great code can fail them, just because of the specific problem
so as anything, you need a human to look and say "Good" vs "Good Enough"
 
@ircmaxell yes, I understand this - but they still can save plenty of time
also I have a question - you've mentioned that you're running PHPLOC each ~10 commits. Is that just your preferences or you've discovered that in some experimental way?
 
@AlmaDo No, that was just to generate those graphs
in a real project, I would do every commit
 
ok, thanks, I misunderstood then
 
skipping 10 commits let me generate those graphs in a reasonable time (about 1 day per project)
 
2:38 PM
I see
 
@Fabien that's an old blog, actually used to appreciate that long way back for the efforts he took to create that blog, he is from a village ;)
 
@ircmaxell only one thing - some graphics and charts are near invisible on the video :( but thanks for at least publishing it
 
the slides are available
 
@Mr.Alien a blog about his pic.. XP
 
huh?
 
2:42 PM
 
good morning
 
he is actually quiet popular
 
Aye
 
> He seems to have put up as many different multimedia effects he possibly could, making his blog the online equivalent of a freak show.
 
haha whatever it is, he made it to the top atleast for a day
 
2:45 PM
new blog post going live in 15 minutes :-D
 
:D
 
@ircmaxell good :p
 
@reikyoushin is the weather better now :/
 
@reikyoushin It's approaching rainy season again isn't it now? :s
 
@happy we were far from the affected areas.. ;)
 
2:49 PM
@reikyoushin good
 
@MackieeE rainy season is from august to november.. so it should be fine in the next months.. we only get one awful storm once a year.. this year is already due.. it's christmas season now.. you can expect some rains but not strong typhoons..
don't worry too much, she'll be fine.. (i hope too.. ;) )
 
Oh she will be :D She lives here in England with me =) although her family!
 
@MackieeE ahh, ok. ;)
 
Yea, as I've learnt now - there's alot more Filipinos around the world when I first noticed hehe ;)
you ever thought about moving & developing abroad?
 
just a sec..
@MackieeE there, i've created a room so we wont be too off-topic
 
3:01 PM
Well, here is the next part of my "Beyond" series: http://blog.ircmaxell.com/2013/11/beyond-object-oriented-programming.html
 
You know your shit :P
 
SO down? Or internet in whole?
 
Not for me.
 
me neither
 
3:10 PM
its up
 
I block connecting
Ahhh, it's [ajax.googleapis.com/ajax/libs/jquery/1.7.1] that's blocking
 
Oh, noes, what are we going to do without jQ.
Can you blog more, so I can learn something new once in a while? :P @ircmaxell
 
lol
 
@ircmaxell Can you blog less, so I can read everything? :)
 
less? that was 1 week between posts
I was doing 3 posts a week for a while
 
3:21 PM
@ircmaxell I've read maybe 3 of your blog posts, ever. :P
 
:-(
 
@igorw didn't know you're C dweller, kudos.
 
ARG
 
@salathe what about: you read faster?
 
3:32 PM
@ircmaxell too long :P
 
E_TL_DR
 
Funny.
E_TOO_LONG_DIDN...
 
@Gordon I almost didn't do it as a blog post, and almost made it into a book
 
Do you have a schedule for a book, or just when time comes?
 
@ircmaxell tell me about the book. You write so well, when you explain something it's clear :)
 
3:34 PM
@ircmaxell your book's are too long, too ;)
 
I have no book in progress. Well, significant progress anyway
I have tons of ideas, and scratch concepts for them
but nothing significant
 
still
 
@Gordon you should read this one though ;-)
 
Just Jeremy Clarkson it and put all your blog posts in one paper-back place. :P
 
@ircmaxell i've read the beginning. make it one quarter the words :P
 
3:37 PM
@Fabien I had thought about doing that
 
@PeeHaa I pressure u
 
@Gordon read the whole thing, I think you'll like it :-P
 
@ircmaxell I like it when you cut down on words ;)
 
@ircmaxell the first part was more interesting… with the behaviours. The current part is something I somehow feel to know already…
 
3:44 PM
@bwoebi most of it shouldn't sound overly new. It should all feel familiar. Because it's not a massive shift. It's a subtle but powerful one
hmmm, need 2 more upvotes today to hit repcap
 
mysql or postgresql?
 
postgresql
 
iOS or Android?
 
Android
 
@iroegbu
 
3:49 PM
Whichever one you're more productive with.
 
ok, how about this one: red or blue?
 
lols
 
whichever one misses your point ;]
 
I'm more comfortable with MySQL though
 
3:51 PM
@ircmaxell that maybe are the important things, but not the things the readers feel as the interesting things ;-) (need more new things.)
 
IMO when someone with that much experience care to write something it is already above the interesting level to me
 
Morning.
 
@Leri morning
 
@bwoebi that's why the posts build. Each adding a layer
 
@ircmaxell any other post now scheduled for next Monday? (or earlier! :-))
 
3:59 PM
not yet
but I'm going to think on it
and I want to see the reaction to this one
 

« first day (1122 days earlier)      last day (3826 days later) »