« first day (1195 days earlier)      last day (3979 days later) » 

18:01
On the example implementation of an iterator is there any advantage for the $pos property or could you just reimplement the current/next calls by calling current and next on the contained array.
class myIterator implements Iterator {
    private $array = array(
        "firstelement",
        "secondelement",
        "lastelement",
    );

    function rewind() {
        rewind($this->array);
    }

    function current() {

        return current($this->array);
    }

    function key() {
        return key($this->array);
    }

    function next() {
        next($this->array);
    }

    function valid() {
        return valid($this->array);
    }
}
^ like that
user924016
@Orangepill where is the global valid functio you are calling?
user924016
php.net/manual-lookup.php?pattern=valid&scope=quickref closest thing i can find is the Iterator::valid ...
@RonniSkansing yeah... I guess that one doesn't have a native function to proxy to
@Ocramius Holy drama Batman.
user924016
@Orangepill look at the examples in php.. return key($this->myArray) !== null;
user924016
18:09
as valid method
@DanLugg yeah, I get quite aggressive when someone that matters shows no care at all
It's as if Linus Torvalds said "fuck security, YOLO"
Old but god damn
Any of you familiar with backbone.js?
user924016
abit,
18:13
Any recommended tutorials.
I've been given a site to bug fix thats built in it and it is new to me
@ronniSkansing cool... that's pretty close to what I was thinking. Does anyone have any use case where the example implementation on php.net would be preferred?
user924016
@Fabien last time i looked at Backbone i went trough addyosmani.github.io/backbone-fundamentals
Cool thanks. Might be a lot to digest in a night :p
user924016
@Fabien yea it is.
user924016
@Orangepill it is almost exactly as the boilerplate you made =] I do not know when it would be more suited to use a member as a subscript index, but I am sure there are cases =]
18:18
@Orangepill What's advantage of wrapping array in iterator like this?
user924016
" hehe i guess if it is only an array wrapped it would not make much sense =]
@Leri Mainly to pass Traversable Type hints and to enforce contained types within an array.
user924016
I think the Iterator works great for Collection aggregates
@Orangepill Enforcing contained type is not a big deal. You can check containing type and throw invalid argument exception.
Wrapping array in iterator adds overhead and gives nothing really important, imho.
user924016
@Fabien If you have not seen it, here is a resource list github.com/jashkenas/backbone/wiki/…
18:26
Cool cheers @RonniSkansing
user924016
the todoMVC project also gives a great overview on different frontend frameworks approach to the same task
@Ocramius Strange how things come in waves; it seems there's been a particularly large amount of bullshit in the PHP community as of late.
@RonniSkansing I have already quit trying to implement MVC with php.
The only common denominator I can think of is Phil.
user924016
@Leri great idea
18:28
@DanLugg well, there seems to be quite an excess of proudness by some individuals
@RonniSkansing Yep. MVP works great why hurt brain just for shiny status of MVC?
@Ocramius Yea, everybody is getting into the since-sliced-bread game.
Seems more like a "I'm right because I have more github stars" or such :P
user924016
@Leri i have no argument =]
user924016
A pattern that works you can argument for > MVC in a not understandable context.. anytime
18:32
@Ocramius lol, GitHub feature request: Remove repo starring, people can't handle it.
2
You got a star
now go out there and kick asses!
lol The irony!
user924016
When I dig in a gui app like in c# it makes more sense for me to strive for such a thing, but on the web.. it is too complex a puzzle for me compared with small units for patterns that complement each other. Layers are more a "roadsign" for me =]
@RonniSkansing Well, MVC is really great pattern and separates concepts well, however it's huge PITA implementing one with PHP (I'd say with http world). That's why I say that MVP with passive views is better choice for php.
Well, it's just me though.
user924016
@Leri it is a pain in the ass in web..
18:35
Exactly! ^
user924016
hihi
user924016
well choice of the day... "C Modern Approach 2nd ed" or "Enterprise patterns"...
user924016
last time i read in C i got confused by something like (*p)[NUM_ROWS] ...
user924016
guess it will be C... ttyl
if i=0; then how p=++i+ ++i; yields 4? the code::blocks debugger shows three steps first is p=0,i=0, then p=2,i=2 and p=4,i=2. i am using gcc 4.7. when i was calculating i thought the result would be p=1+2=3. but how did it end up to 4?
18:46
@blackbee AFAIK, such structures result in undefined behavior in C
If you guys saw this weather app and didn't see the list of "instruction" on the left. Would you be able to figure out what to do with the app aside from the buttons on the bottom with obvious actions as refresh and add
damn...
what does AFAIK mean??
@blackbee google "sequence point"
or in c++11 the sequenced-before order, but that's a technicality
18:50
As Far As I Know
what the...
PHPUnit_Framework_Error_Warning : preg_replace(): Unknown modifier '+'
O_o suddenly... out of nowhere, all tests fail
wth
wikipedia's article on sequence points, point number 4 is interesting.. btw.. after years i asked a question and got upvoted!! stackoverflow.com/questions/21304775 .. don't start downvoting..
@Ocramius I don't think I can explain it to him any more simply. And this is why I don't like talking to known idiots, even if they're only idiots some of the time.
heh, wish I could be that explicit, but I'll just stay in my own namespaces, I guess
user895378
@Danack You're clearly correct. You cannot just pick code and insert it without attribution. It's unacceptable. And even if you get confirmation from the author that it's okay and they don't mind you had better get it in email format so you can archive it should any disagreement arise down the road.
user895378
19:04
It's never okay to do that. You're only asking for trouble. Learn git or GTFO.
I'm almost tempted to write a non-trivial patch for either laravel or one of Phil's projects, fuck up the white space, then issue a DMCA take down just to prove the point.
But I have a life, so probably won't.
user895378
Well if someone submits a PR riddled with tabs they might deserve it ;)
/actually, don't have a life - just really lazy.
user924016
I wish everything could abit less dramatic and abit more sobber. Twitter is a good source for some stuff, a horrible idea / solution for even more...
@rdlowrey I pull and fix those as well...
user924016
19:08
"lets not "blow" things out of proportion"
actually, currently fixing a bug submitted with tabs
user895378
@Ocramius I do too, I was just making a joke about how terrible tabs are :)
Can I tweet this:
> The entire #php community is in shock. Turns out @philsturgeon is a dick. Who would have thought?!
6
:)
user924016
... lol
user924016
19:11
Hi @PeeHaa
Evening :)
@RonniSkansing The main discussion is on reddit where Phil is saying stupid stuff without the limit of 140 characters.
user924016
@Danack sigh I rarely go to reddit.. but i will do now..
The actual link to my comment - you will need to expand Phil's as it's been voted down.
user924016
thanks
user924016
19:16
Well you make a good point (hakre also)
Aaaaaaand it's out
The entire #php community is in shock. Turns out @philsturgeon is a dick. Who would have thought?!
:-)
Trololololololol.
user924016
I have not really contributed to anything...
user924016
(on github)
19:18
@Danack hehehehe
And that dear room is what twatter was invented for
And he's replied.
lulz
Can we get him on SO now?
What a noob. He replied :)
19:21
LMAO
14 minutes ago
Let's downvote all his posts!
:D
Damn flood protection is really getting on my nerves :(
user895378
@PeeHaa is a troll master.
Troll Master, Porn King, he has many titles.
lol!
boooo he deleted his tweet
Still on my screen if you want it :P
19:23
Make a screendump for me please :)
It's going on my wall of shame
tnx
404's
user652649
aren't you guys @Ocramius @PeeHaa pushing this too much? or just trolling? xD
19:27
Fixed
Trolling, but that doesn't change the fact @philsturgeon is a dick
He replied again
user652649
lol just because he created codeigniter, right?
@Wes no. Patches require attribution
@Wes Nope. Because of the way he acts
19:30
@Wes the other point in this "attack" (or however you wanna call it) is this "don't care" attitude
@Fabien dbad-license.org by "you know who"..
@reikyoushin heh
@Wes The highly ironic thing is that the sale of codeigniter probably failed in part because of the lack of clarity in copyright ownership, due to Phil's lack of dilligence.
You should have tweeted that (what @reikyoushin linked) @PeeHaa
user652649
@Danack LOL
19:33
@Fabien That is what I am referring to ;)
I am hoping for some twatter fireworks first :)
> Being a dick includes - but is not limited to - the following instances:
1a. Outright copyright infringement - Don't just copy this and change the name.
user924016
^
user924016
i translated that to danish 4 months ago..
@Danack Would sending over a PR to change the license to PSIAD (Phil Sturgeon Is A Dick) be too much?
@PeeHaa probably...
19:36
;-)
Also in totally unrelated news. Wooooo it's almost friday!
user652649
**IDGAF License**
1. IDGAF (I Don't Give A Fuck) what you do with my code*.
2. If you claim my code as your own, you will probably just be embarrassing yourself.
* As long as you don't use my code to make nuclear weapons.
user652649
this one suits me perfectly
user652649
xD
hehe
@PeeHaa friday here.. **runs away**
user895378
19:38
That moment when you realize your last three days of work were a waste of time because your abstraction is not (and will never be) fast enough for the setting in which you intended to deploy.
@rdlowrey it were only 2.5 days!
user895378
I dreamed about it some too, which added a few hours ;)
user924016
what is the name of the injection container. Aereys. Areay, Araey... ?
@Robik Is that you. Or are you some other @Robik?
19:42
@RonniSkansing Auryn - but it' not a container.
user924016
loc?
It's a pure dependency injector.
@PeeHaa Both :)
user924016
@Danack that is a new expression for me
user924016
iknow of interface, setter and constructor injection
user924016
19:43
and thanks for helping me getting the name =]
Aha it is you :)
user924016
I am sick of Silex
4
user895378
@RonniSkansing Because of the horrific performance or something else?
user924016
@rdlowrey because of the Application being both router and dependency container
user924016
mostly..
user924016
19:44
I have looked at some other micro frameworks.. seems i af best of hand picking with composer..
user895378
Oh, you don't like passing a single $application "god object" into all your route destinations?
user924016
lol
user895378
Yeah, that's really poor design.
What's the least evil framework IYO @rdlowrey?
user924016
@rdlowrey when i started using silex i was "eh cool, i can setup my own arch" .. but i can not
user924016
19:46
So now I am going back to basics
user895378
@Fabien I don't like any of them TBH.
user924016
(unrelated"i need to find .. "good" router also".. i heard you guys mention Auryn and peeked at the doc abit
user652649
@RonniSkansing the pimple part, right?
user895378
This is what I do:
user895378
$app = (new Application)
    ->route('GET', '/', 'helloFunction')
    ->route('GET', '/lambda', $lambda)
    ->route('GET', '/static-method', 'MyClass::staticMethod')
    ->route('GET', '/ctor-deps', 'CtorDependencies::myInstanceMethod')
    ->route('GET', '/$arg1', 'argFunction')
    ->route('GET', '/$#arg1/$#arg2', 'numericArgsFunction')
    ->run()
;
user924016
19:47
@Wes yes
user652649
i think also @cryptic got confused by that
user924016
it is not confusing it is annoying
user895378
^ Which is why people who know say it's an anti-pattern (among other reasons).
user652649
yeah
user924016
@salathe thanks
19:50
@RonniSkansing it's okay, all the cool kids are "library/package guys" these days.
user924016
Well step one play with Auryn, see if it fits.. then find a router and some other basic components... ttyl
I thought all cool kids were "pear install package guys"
user924016
lol
user652649
how's your framework going @PeeHaa ?
user924016
pyrus
user924016
19:51
hehe
@Wes Pretty stable
user652649
:P are you using it in some project?
@PeeHaa stable in what sense?
Yes. @Wes Using it for my cms
user895378
@RonniSkansing I recommend looking at this section specifically. It allows you to specify route destinations like "MyClass::myMethod" and get dependency injection for free.
19:53
@salathe Think of one of @rdlowrey's libraries only the opposite
user895378
@PeeHaa Yeah, I was gonna say, "hopefully not '@rdlowrey stable'"
user924016
@rdlowrey thank you, much appreciated. I see now that you wrote. Looking forward to try it out and peek and the source
@rdlowrey ;-)
user924016
someone please make a php framework that almost purely relies on generators
user924016
(as in php generators, not code gen)
user895378
19:56
@RonniSkansing lol, I'm way ahead of you.
user652649
today i used generators for the first time stream1.gifsoup.com/view5/4611743/mask-oscar-3-o.gif
user924016
.. oh lol, i will catch up with that when i find some time =]
@Wes hehehehe
user924016
@rdlowrey thanks for putting it on packagist
user924016
saves me time
19:58
hehehehehehehe it's just sooooo rewarding that phil always wants to have the last word. If I would really try I could keep him busy the entire day I think
@RonniSkansing At the risk of people laughing, I use Auryn, this is my router library, this is what my routes look like, and this is the code for serving a page.
user924016
@Danack thanks for sharing, checking it now.
user924016
ah i already looked at this
However, I am on reasonably strong pain medication so some of the code is definitely sub-optimal
user924016
It was the project with the datamappers
user924016
20:00
well it is turning to be quite the study case
Yep - death to ORMs.
It's official. Ubuntu should not be used docs.google.com/… (pdf alert)
@Wes confused about what? I never get confused, I just go full retard.
:-)
@Danack lol
20:05
@PeeHaa lol… OS X is really the only one with no reds
user652649
@crypticツ xD lol, i'm sorry... i meant not because of your fault but because it's a mess xD
@bwoebi Huh? WHat chart are you looking at?
@PeeHaa the one you linked (pdf)
#chartreading #fail?
:P
win 7, win8 and ubuntu ?
SPA Yay or nay?
20:08
@PeeHaa no, you failed.
lol how?
@PeeHaa he's looking for orange/red
@PeeHaa look at the fifth column do you see any reds here?
Yeah?
user924016
it is written by Darryl Weaver

Sales Engineer, EMEA,

Canonical
user924016
20:11
..
argh
???????
You drunk bro? :P
okay, I failed =D
heheheheheheheh :-)
I'm blind but not drunk^^
20:12
;)
chrrm… chrrm… =D
Best post ever!
@PHPeeHaa @philsturgeon @bitfalls Looks like a case of someone with 28 followers trying to get noticed.
awwww pooor me. Only 28 rep followers :P
user924016
lol
@RonniSkansing lol nice find
You actually read the thing :P
@PeeHaa That comment got you two more followers :)
20:14
@PeeHaa the stars theory raises
I think with the above proof it is no longer just a theory
user895378
@PeeHaa Looks like a klouchebag projecting his own insecurities onto you.
@rdlowrey :P
user924016
@PeeHaa =] yea, the article is quite biased. But this is pretty readable gov.uk/government/publications/… (one of the refers)
@PeeHaa lmao
@PeeHaa clearly your twitter-peen is too small
20:18
:D
which is your fault for not following me back ;)
@PHPeeHaa
PHP developer with a passionate hate for crap.
57 tweets, 31 followers, following 8 users
2
31 followers :)
you're turning into quite the bada$$
@Lusitanian fixed :)
@PeeHaa who the heck is this weirdo who just requested to follow me i didn't solicit this wtf
and lol
why is phil trying to defend himself
instead of just apologizing
20:21
Thoroughly un-British
i've never liked him but c'mon
We usually start with apologising.
user895378
@Lusitanian Yeah, the correct response would clearly be, "I mean, of course you shouldn't do that ever. I was just talking out of my ass."
user895378
It makes no sense to defend an untenable position like "copying without attribution is okay."
@rdlowrey i have no issues with him manually implementing the content of a pull request BUT HOW CAN HE JUSTIFY A LACK OF ATTRIBUTION
user895378
20:22
You can't. The end.
right. it's not your code to claim. a (C) 2014 the contributors might legally cover your ass
but it's just such a dick move
@Fabien I'm sorry. We do what? :)
so if I go to Google and type in site:mysite.com it shows up my website in the search result, but if I just type in the Title of my website and some keywords from the website in the search box, my website is no where to be found. :(
@Fabien Are you Canadian?
20:23
Nah, but its my 3rd choice if I had any.
@PeeHaa Americans do it differently. We start by invading you to correct your behavior and then apologize later.
@Lusitanian Because he loves winning arguments, which is why he spends almost all of his time arguing on the internet with other people who love arguing?
Guys, can someone tell me what you mean by "attribution"?
@Lusitanian hahahahaha
credit
20:24
Is keeping the git commit authorship information sufficient attribution?
@NikiC yes.
@NikiC Totally
@NikiC That's fine, or a comment, or really anything
@NikiC why not?
Aint gonna put "Mr Foo Bar contributed a line here" to my files, ya know...
20:25
Unless I screwed something up (again) in which case I don´t want my name on it
@NikiC Yeah that'd get rather silly
@NikiC git blame is fine…
@NikiC Ain't no one got time for that.
@PeeHaa git blame PhilSturgeon
okay, wasn't sure what you mean
because git does that authorship thing pretty automatically, so not sure what the problem is?
20:25
I'm pretty sure you can sign also patches...
@NikiC precisely which is why it shouldn't be an issue
but phil has made it into one
@NikiC he's copy-pasting patches
@Ocramius How can you copy paste a patch?
@NikiC The real use case is when a project wants to change it's license - everyone who has contributed needs to be contacted to confirm the license change is acceptable. The git history is the canonical history for who owns what.
user895378
Yeah that's the point: there's no need to copy-paste if you know how to use git.
user924016
20:26
new file << paste
You mean manually fetching the remote and cherry picking?
I don't always want attribution, but when I do I want it to say root
@NikiC by copying the code from a diff and pasting it in his editor?
Oh, you mean like literally doing a copy and paste?!
also: wtf
20:27
@NikiC yup
@NikiC Yeah
@NikiC exactly that…
But doesn't that usually break your whitespace and everything?
can't copy&paste from github at least...
meh - select block of code, reformat.
@NikiC C&P from raw.github.com?
20:28
well, I aint using git to go copy pasting code from patches afterwards...
I watch that show
@nikic - some context ?
@salathe Yep that's me :)
Tek
Tek
Good day gentlemen, I could use some help with Symfony2 tokens. I implemented a custom authenticator using SimpleFormAuthenticatorInterface and I just wanted to know where createToken is getting it's parameters from?
20:34
Blown, my mind is. -- Oh Myyy http://t.co/Jwsk3LG5CR
user924016
hehe nice
@Danack I've been trying to stay out of that drama although it is hard because it gets me riled up
@cspray I try and stay out of drama because I can't be arsed, but for someone of Phil's experience to be this wrong......
Well, I'm glad my first two OSS pull requests didn't go like apotheos's did
@Danack then there would be a connotation that "since pros do it, it's okay for us newbs too" =P
20:59
Man, I wish I could see the edit history of questions that aren't tagged a tag any longer. Someone got a bit angry earlier...

« first day (1195 days earlier)      last day (3979 days later) »