« first day (544 days earlier)      last day (4404 days later) » 

12:04 PM
@NikiC you're also sad because my penis post got flagged I presume?
;)
 
good morning
 
@RepWhoringPeeHaa That too ;)
 
hello eveyone, one quick question. How to split string : "cow,bull" to strings "cow" and "bull". Thanks :)
 
thank you, i will check it out :)
 
12:07 PM
@CarrieKendall morning
 
@RepWhoringPeeHaa morning :]
 
morning @Carrie
 
how's it going @NikiC
 
hello @Carrie
 
Yo @NikiC
 
12:19 PM
hey @ircmaxell
 
what's going on? anything?
 
posted on April 12, 2012 by Michael Kimsal

Wasn’t sure what to name this entry, but have had a few discussions with some people over the past month or so about their experiences.  All of them were finishing up “web development” degree programs (under somewhat different nams) at institutions in the area, and all were talking about looking for jobs. I was dismayed (but not necessarily shocked) at how little understanding they had about t

 
@ircmaxell I just rewrote my empty() patch to support isset() too
 
sweet
off to work, later
 
Just want to ask you guys a small question...
Is Lighttpd better, or Apache better for handling a ton of user connections ?
Basically i am building a chat application in php that would be used by more than 1000 users at a time..
 
12:29 PM
[facepalm]
 
So in order to scale my application, i am planning to use Ajax long polling with Lighttpd
@ArtjomKurapov what is facepalm
 
use socket.io
or something that doesn't involve polling with php
especially 1000 persistent connections
 
@ArtjomKurapov is socket.io platform specific?
 
Hey guys
 
its based on node.js
if you don't want that, then.. maybe php daemons with webservices support would do
 
12:34 PM
oh.. so first i have to install Node.js in my OS, and then use socket.io ?
 
i mean websockets
 
ok
 
um.. yes, nodejs and then socket.io on top
didn't have much luck with either of them though :)
@Chris yeah, i was just playing with styling.. i dont think there is any good scrollbar solution
 
Also, I noticed your from Estonia.
A beer tomorrow? :D
 
i dont drink alcohol :)
 
12:41 PM
I wanna see wtf is that :P
 
@ArtjomKurapov Water then?
 
lemonade
 
@dskanth code.google.com/p/phpwebsocket looks interesting
 
I don't meet a lot of smart people so would be nice for a change, just sayin'
 
umm.. im not very friendly and extravert kinda guy
 
12:43 PM
It's okay, I'm an asshole, too.
 
i'm more like @tereško :D
 
@mUnk3y When life gives you lemons, don't make lemonade.
 
So, I'm not attractive enough to talk to, is that it? Because that's really insulting you know!
 
umm.. well, maybe. but i'd prefer talking to everyone at devclub.ee conference
that way i can easily leave the conversation without insulting anyone :)
 
@tRuth: true
 
12:45 PM
@mUnk3y You make life take the lemons back!
 
@truth: !false
 
In Estonia, nobody makes lemonade out of lemons.
 
where is estonia? in africa?
 
@mUnk3y I'm gonna have my engineers invent a combustible lemon, that BURNS you house DOWN!
 
Your a second person I know saying that.
 
12:46 PM
Truth: lies
 
@mUnk3y You ever went to geography in school?
 
Learnt about different types of clouds when i wasnt sleeping
 
@Chris Do you know where it's from?
 
@Truth Nope
 
12:49 PM
I see.
 
If you haven't played that yet, I argue you should get up, finish what you're doing, and play it.
 
please can any body tell how can play video (youtube) without clicking on play button?
 
No thanks, I'm more of a sandbox kind of guy.
autoplay = true, @Sparkx
 
in embedded tag right
 
I guess so.
 
12:52 PM
truth what is that
a computer game?
 
Seems like mario brothers on drugs.
Did they update DOS to support 3D already?
 
installed Diablo2 yesterday
 
Why are all the good PHP guys Russians?
I don't get that.
 
Haha
 
:)
 
12:57 PM
@mUnk3y Yeah, Portal. One of the most ingenious games ever created (and I played a lot of games in my life)
But you must play portal 1 first, if you want to understand Portal 2
 
Then again I once saw a Russian with a college degree using variables like $a, $b, $c, $f, $c1 .. It was really hard to read his code.
 
@Chris I know lots of Estonians that are good with php.. dont flatter us
 
I'm not good.
I'm far from even almost good.
 
@tereško what is Diablo2
 
In fact, if there's a title "amateur". Then I'm that, if you multiply it with 100.
Or if $amateur = 1000;, then $iam = $amateur / 10000;
 
1:01 PM
so, whats your point?
 
I'm awesome, is all.
 
i play quake live
1 time
 
Only games I play are Wolfenstein (RTCW, ET), Quake III, and Portal (not 2)
 
So, your in the 90's?
 
I just love older games, also I don't like games like Call of Duty because they're too easy and are full of little kids
 
1:08 PM
I didn't see any kids in Modern Warfare 3.
 
lol
its full of them
 
Where?
All I saw was bomb dogs, suicide bombers and juggernauts.
 
@dskanth , if you were able to find this channel , you should not have rights to ask that question
how the hell you cannot know what "Diablo 2" is ?!
 
I don't know it either.
I've heard of it, but that's about it.
 
it is like asking "what Doom" is
 
1:14 PM
Doom was awesome back in the day!
 
user895378
Ugh, kids these days
 
or "what Deus Ex/System Shock is ?"
 
user895378
Next you'll say you've never heard of super mario bros.
 
who is this mario fellow all of you have a massive crush on? ;]
 
user895378
hehe
 
1:16 PM
@Chris , if you play any video games , then you SHOULD have played following games: Diablo 2, Deus Ex and Planescape: Torment
 
I get mad if people don't know who Niko Bellic is.
I disagree @tereško, you don't arque about taste. And I happen to have a different one.
 
that is not a matter of taste
it is a matter of knowing the history
 
In that case, I don't care of that part of the history.
 
user895378
ChronoTrigger on the SNES ... still my favorite game ever
 
@tereško well then you can start from playing prince of persia or day of the tentacle.. or even earlier
hell.. tennis and tetris
 
1:20 PM
 
user895378
day of the tentacle is sweet :)
 
I still have my NES along with super mario bros, duckhunt, zelda, and more (with zappers like a real nerd)
 
user895378
Sam 'n Max Hit the Road too
 
also even if someone was at same time you played torment or baldurs gate.. maybe he didnt have all access to entire game database.. so he tried fallout and thats it
i tried playing morrowind again over..
a bit hard to focus with all the graphics
that you expect from games now on
 
user895378
@CarrieKendall I have original NES Final Fantasy mint condition with box/manual/maps ... mint NES games are a fetish of mine :)
 
user895378
1:22 PM
Those stupid cardboard boxes used for NES games make them difficult to find
 
typehinting with Traversable doesn't let me pass an array?!
 
user895378
@Paul nope
 
user895378
or StdClass
 
user895378
it is annoying
 
yes, I guess I'll just use array for now.
 
user895378
1:23 PM
I constantly end up doing this:
 
user895378
        if (!($iterable instanceof StdClass
            || is_array($iterable)
            || $iterable instanceof Traversable)
        ) {
            throw new InvalidArgumentException(
                'Argument 1 passed to addAll must be an array, StdClass or '
                .'implement Traversable '
            );
        }
 
user895378
in place of typehinting
 
@rdlowrey my system and games are far from mint but i love NES. did you find the whistles in smb before the web?
 
yes, that is a good option, hmm that is the flexible way.
 
user895378
@CarrieKendall Nintendo Power magazine yo!
 
1:26 PM
@rdlowrey haha, and what was this saved game state that these kids talk about? :P
 
@rdlowrey b**** please! Super Mario Bros for SNES ♥.
 
user895378
@Truth One of the greatest games ever ... but SMB3 for NES was unbelievable too
 
different subject, what is up with all of the stupid starring?
 
user895378
@CarrieKendall I was wondering the same thing.
 
Yeah
 
1:27 PM
@rdlowrey Yeah, that sucks (but PHP doesn't do anything for you there)
what type hint would you like? iterable?
 
user895378
No, I know there's nothing to be done about it.
 
@ArtjomKurapov been there done that
 
user895378
Although StdClass seems like it should be covered by Traversable ...
 
there should be starring privileges :P
7
 
@ircmaxell that was for me, I was trying Traversable for an array.
 
1:28 PM
@CarrieKendall Now THAT deserves a star!
 
user895378
Regardless, it only means a little extra boilerplate like the check above with an InvalidArgumentException
 
@CarrieKendall it is extremely annoying when people start the answers to simple questions
 
Yes, either that or have it locked down to an array typehint, which i might do.
 
user895378
@Paul The only thing is you limit how someone could use your code when you only allow arrays ...
 
user895378
Sometimes it doesn't matter but there are other times where it would be really annoying if I wanted to use an object for something
 
1:31 PM
Yes, in this case it shouldn't be too bad. In fact the more I think about it in this situation it should rarely be used anyway.
 
@tereško yeah, it is annoying that useful/funny starred messages get knocked off because some idiot found the 5Up3R c00L 5t4r 3utt0n
3
 
what!? i got a star? for that? i hadn't noticed.
 
Yes... Apparently I got one too
 
user895378
I wonder if people understand that stars aren't just for their own personal "favorites" list ...
 
i'm gonna have to use arrays for everything after that.
 
user895378
1:36 PM
@LeviMorrison Well, it started as a way to instantiate classes as listeners from strings and grew from there. I expect people will inject it into classes and make it a service locator, but I guess you can't really help if people use it incorrectly. The custom definitions for when you typehint interfaces or abstract classes still seem a bit clunky. I've considered making the custom definitions map to variable names instead of requiring an ordered list matching all the constructor arguments.
 
I'd like to see more weight given to the number of stars, then we could keep the interesting stuff. Down-voting stars would be good too.
 
user895378
@Paul Yeah, it would be nice to be able to "downvote" or "unstar" things ...
 
downvoting/closevoting.. it will be hard to implement such uncharted territory though on SE :P
 
user895378
hehe
 
1:40 PM
lol, exactly.
and then the magic happens!
 
@CarrieKendall there are unstarring privileges...
 
a wise man once said:
> objects don't really "depend" on scalar values as they don't expose any functionality.
 
hola
 
So, constructing an object shouldn't require any scalar parameters. Why are scalar values considered harmful?
@rdlowrey Those were your words I believe?
 
1:55 PM
do people still use iFrames?
 
Objects do depend on scalar values. Those scalar values hold the object's state...
 
So, constructing an object using scalar values would be ok? @ircmaxell
 
absolutely
 
user895378
I prefer that about 75% of my objects don't use scalar constructor parameters
 
user895378
You're always going to have "basic" objects that are what people call "newable"
 
1:59 PM
I see, cause I have been thinking about Provider a lot. I'd really like a way to inject scalars into it.
 
user895378
@Paul Yeah, I've been considering changing that
 
I'm guessing it becomes harder slotting it into the correct argument number.
 
woo, bitching about starred messages got me the outspoken badge, how ironic
 
user895378
@Paul Yeah, but it's fairly easy to use named parameters instead of ordered parameters
 
user895378
So you use an associative array matching keys to the constructor parameter's variable name
 
2:03 PM
The Clean Code Talks is surprisingly something I can even understand.
 
its already awesome, that would make it unbeatable.
 
user895378
I'm going on vacation after work today, but I'll push an altered version up to a dev branch before I leave and send you a link
 
user895378
I've been mulling that change for a while now.
 
user895378
It would also allow you to specify custom injection definitions using only the argument that needs to be customized instead of being forced to define each argument in the constructor
 
2:06 PM
wow, that'd be nice. Yes, I have never seen anything nearly as nice as it. It will be the ultimate when it can handle absolutely any possibility.
 
@hakre that reminds of a client I got who wanted me to secure they're admin area, they said posts delete themselves and so forth. I then found out that there's no login panel and google bot was crawling delete links.
 
user895378
@Paul So you could do this, for example:
 
user895378
class Test
{
    public function __construct(MyClass $cls, array $myArr)
    {
    }
}

$test = $provider->make('Test', ['myArr'=>[1,2,3]]);
 
yes, that would be awesome.
 
anyone tried out graph databases?
 
user895378
2:08 PM
@Paul Allright, well, I'll make sure I get to that before the end of the day. Now, back to work :)
 
@ArtjomKurapov , you will have to elaborate (sounds like you are using the wrong words for the thing you are trying to do)
 
@rdlowrey cheers, no rush, and if you don't manage it, let me know and I might have a look and see if I can do it for you.
 
@tereško neo4j or something like that
 
in that case: never had a need for something like this
 
So, static is global and global can be unpredictable. Now, finally, I get the bloody answer.
 
2:13 PM
@Chris static also causes people to write tightly coupled code.
 
yup.. its a pain to decouple it when you want to reuse just part of something
 
"This is something I wrestled with a lot when developing Laravel. It's not that I don't know about dependency injection and inversion of control, etc. It's just that, at least in a PHP framework context, it's difficult to thoroughly implement that without ending up with very verbose syntax. PHP has a ton of inherent global state. The amount of global functions in PHP is ridiculous." - Taylor Otwell
 
@Chris
 
I'm struggling to think of a global function in PHP which modifies the global state. I guess there is extract. Most functions get passed parameters and return a value of some sort. Either that or they interact with an external entity like a file or database.
(and I would never use extract)
 
there is compact, which is cool
 
2:21 PM
compact doesn't necessarily affect the global state. It will affect the scope that you are in.
 
@Paul extract also doesnt affect global state, unless you run it globally
 
yup, extract compact list are "similar"
 
ahh, good point. I misunderstood its use. Thanks @ArtjomKurapov
 
i think he means that php functions are in global state.. like str_replace
and that it doesn't correspond to some general String.replace
 
I guess they could be separate statements in the quote. But it doesn't make sense to complain about each individually.
 
2:37 PM
@paul how can refresh the data in a page in php?
 
that question does not have enough details in it to make sense.
 
as in I'm echoing a variable I need to refresh that variable on submit how can I do that?
 
find $_GET and $_POST in the manual pages.
 
I find Zend routes disgusting :S
 
2:46 PM
sometimes i get amazed by what people answer, and even more that it gets accepted as a valid answer
 
user895378
@Chris I disagree that you can't implement abstract functionality in a framework context without getting verbose. Is it more time consuming and does it require more thought/effort to do so? Yeah, but that doesn't mean it's not feasible.
 
user895378
Global state is a cop-out used in place of good design.
 
I was more interested in the "verbose" part as in the syntax get's awful.
 
user895378
I would say that doing so necessarily means the syntax becomes object oriented ... you can't use arrays for everything ... but that doesn't === awful
 
user895378
or verbose
 
2:49 PM
@Chris , did you watch that video i sent you
 
Yes
Ugly code is good
Beautiful code is bad.
Statics are global
global is bad
 
user895378
@Chris, it sounds like you confuse global with "easy"
 
user895378
Just because something is easy to do doesn't mean it's beautiful.
 
user895378
You said something similar yesterday.
 
2:51 PM
$class->function() is uglier than class::function(), also $class is something you need "global" everywhere whereas class:: is something you don't, because it already is global. Therefore, ugly is good, beautiful is bad.
 
user895378
Your logic ... it doesn't make any sense.
 
some people just aren't meant to (shouldn't be allowed to) write OO code.
 
uglier because of syntax?
 
Yes.
 
@Chris , if you "need" class::function() , then you should be using namespace\function()
 
2:52 PM
well trucks are also ugly
that doesnt mean that you have to drive potatoes in a ferrari
 
@ArtjomKurapov so your more than happy with writing ugly-ass monstrosity?
Good for you, not good for me.
 
php cant just change its syntax to be new ruby
 
user895378
I assert that $$$$$$ is beautiful syntax because it reminds me of money. I will now prefix all of my variables with several $ signs.
 
even namespaces had to use last available symbol
 
2:54 PM
@ArtjomKurapov , you got your metaphor wrong , it should be trucks and pure-bred hourses
 
well i like to think of -> as a ferrari :)
 
pretty/ugly code has nothing to do with how APPEALING to the eye it is.. it has more to do with the functionality, readability, structure, etc. of the code.
 
As far as I know, pretty is something you see, so is ugly. A woman is pretty, A woman is ugly.
Functionality is just that, functionality.
 
user895378
@Chris But just because you think a woman is ugly doesn't mean she's not much better at everything than the woman you think is pretty.
 
mehehehe.. code.. cars.. women
 
2:58 PM
Yes, but I like pretty. If pretty has great content, too .. well, even better.
Now if I choose ugly, I'll be looking at pretty for the rest of my life wondering "What if I chose differently?"
 
@Chris Do you like procedural code or OO?
 
user895378
Yeah, pretty is great until you marry her (write all your code with static) and realize, "woah, I made a big mistake and I have to get a divorce and completely change my life because this isn't working"
 
I am too newbie to judge any of them.
 
* nope, i think im the same
 
@Chris wrong, when people who KNOW what they're talking about refer to code as ugly/pretty it is a circumlocution.
 
3:00 PM
Writing static is pretending that the man you are marrying is really a woman.
4
 
user895378
@Paul lol
 
@paul lulz
 
That is just ... wrong
 
hehe, exactly
 
I guess I'm way too nobody to shout out my opinion, so the only thing to do is swallow it down like a man and end up coding horrible code that eventually will eat out my sanity and I'll be one of those uber-frustrated almost-gonna-kill-someone evil coders out there.
Which I guess doesn't sound that bad.
 
3:02 PM
it seems you're on the right path with such opinions ;]
 
user895378
Uh, or just listen and learn ... and not write bad code
 
user895378
People aren't trying to berate you, they're trying to help you.
 
and //comment things for future reference
 
I don't consider forcing religion on someone as help, but whatever.
 
LOL we hereby FORCE you to use good code with our phpchat power
 
user895378
3:03 PM
There's a difference between religion and science. What we're advocating is a known commodity that will improve the maintainability of your code.
 
user895378
It's not an opinion.
 
Your right, it's opinionated science.
Just a note; Yes I am an impossible individual.
 
i think this is the problem with "knowledge without wisdom" .. you can tell people: 'this is the proper way to write object -oriented code' , but they have no experience to measure it against
 
@Chris I would have no chance of using something that rdlowrey wrote if it wasn't for the fact that his code does not have any static in it tightly coupling the class that I want to the rest of his code. As it is we are able to share code from two different frameworks without any hassle.
 
user895378
I'm not saying, "Don't eat pigs because pigs are bad and you have to listen to me." I'm saying, "Don't eat pigs because it's the year 2000 B.C.E. and eating pigs is a good way to die of disease."
 
user895378
3:06 PM
I'm trying to keep your code from rotting.
 
not that I have yet, but the Provider is gold.
 
I do eat pigs.
They're delicious.
 
user895378
I was only using your religion metaphor. Pork is delicious.
 
Hi guys
 
Hi user int(6)
 
3:09 PM
welcome @user1308414
 
3:32 PM
Hallo, some weeks ago I saw a question here on SO about how to write out one character hundred times without using a loop but I can't find it now. Any ideas?
 
hey, we face this problem all the time
 
echo str_repeat($char, 100);
 
Thx ;) there it was ;)
 
no worries :-)
 
If I want to start with PHP OO, where would you recommend I start?
 
3:42 PM
stdClass :)
* just joking
 
Haha
 
what do you need OO for :)
 
I've just heard its better for larger programs.
 
@iyrag how long have you been using php?
and do you have any other experience with programming
other languages that is
 
3:44 PM
About 2 years with PHP, using frameworks etc.
some experience with Java and C
 
ok java is oo
which framework
they most probably use object orientated
 
I've done CodeIgniter and CakePHP
which are OO, but I don't know how to write my own OO stuff
I only know how to write code in the frameworks
 
oh right, well you should be quite comfortable with creating classes then
 
I'll have a go using the PHP manual
 
posted on April 12, 2012 by Pádraic Brady

A stereotypical caricature of a pirate. (Photo credit: Wikipedia) This is a train of thought article (i.e. it may make sense…or not). You’ve been warned in advance. The CL;DR will be posted to Twitter when Hell freezes over, pigs fly, and Hollywood makes an ensemble casted DC Universe movie. This is what happens when you have a laptop, an editor, a train ride home, and have just

 
3:51 PM
Wow, talk about passive aggressive. stackoverflow.com/questions/10126931/…
 
@GordonM lol
 
@rdlowrey gets mentioned too!
 
lol
 
user895378
@GordonM what are we talking about?
 
Look at the question I just linked. You made an impression apparently!
 
user895378
3:55 PM
oh lol. too bad he misspelled my nick :)
 
I think it was intentional ;)
 
Hi people
When I compile PHP on CentOS it doesn't generate a php.ini file
Well, if it does, I can't find it
is there a php.ini-recomended somewhere in the sources I haven't foun dyet.
 
@rdlowrey 'Morning.
 
user895378
@LeviMorrison Hola
 
Or was I missing a --with-php-ini-whatever at ./configure
 
3:58 PM
@rdlowrey Nearly done with my project.
 
@BenjaminBrizzi have you tried locate php | grep ini?
 
(btw, @ircmaxell congrats for your popular article, it was a nice read)
 
or have you tried checking out phpinfo()?
 
@RepWhoringPeeHaa I'm working on locationg 'locate'
php -i says "no ini file parsed"
 
@BenjaminBrizzi what does that mean? "I'm working on locationg 'locate'"
 
3:59 PM
@BenjaminBrizzi Thanks! It's blowing me away how many views it's getting
 
[root@localhost php-5.3.9]# locate
locate: no pattern to search for specified
 
user895378
@LeviMorrison Nice -- @Paul has convinced me to allow scalar constructor definitions on a per-parameter basis in the Provider. I'm going to push it to a dev branch before I leave for vacation this afternoon. I need your thoughts on it ... (it'll take me a minute to type up)
 
ah nvm looks like it's working
 
@rdlowrey Okay, then in that time let me switch computers. Be back in a few.
 
@BenjaminBrizzi locate by itself won't do anything
 
3:59 PM
yeah my bad
 
@BenjaminBrizzi locate php.ini
 
I/usr/local/include/php/Zend/zend_ini.h
/usr/local/include/php/Zend/zend_ini_parser.h
/usr/local/include/php/Zend/zend_ini_scanner.h
/usr/local/include/php/Zend/zend_ini_scanner_defs.h
/usr/local/include/php/main/php_ini.h
/var/www/html/SamSupervisor/install/initDatabaseTools.php
 

« first day (544 days earlier)      last day (4404 days later) »