« first day (658 days earlier)      last day (4273 days later) » 

6:00 PM
It is basically an example of what @LeviMorrison is talking about (dependency injection).
 
So is this how Frameworks are built?
 
@LeviMorrison Does it actually crash?
 
@NikiC Stops execution with exit code 255.
 
@hakre nice
 
...such as CodeIgniter
 
6:02 PM
lol
 
@LeviMorrison Do a gdb php and then r theScript.php and see whether it aborts at some signal
 
@NikiC :( On windows.
 
@J-Law frameworks like codeigniter are build by looking at Rails code and making it worse by people who suffer from Dunning–Kruger effect
 
you don't have a linux vm?
 
@J-Law It is probably not the way CI does it. You don't want to do it like CI does it
 
6:04 PM
@tereško Ha, ha...you win, you win.
 
@LeviMorrison Is it code that I can easily test?
 
anyway , what was your original question , @J-Law ?
 
@NikiC Check out PHP-Datastructures and run AVLTreeExample.php Happens during iteration on the Map.
 
or actually , what was the intention of your original question ?
 
@NikiC Not at the moment.
 
6:06 PM
@hakre , it's missing the unicorns and rainbows
 
I was dual booting with Debian but I screwed up Debian badly trying to get some packages from Testing, so I'm flying solo on Windows right now.
 
@tereško To see how to connect classA->function() to classB->function()
 
well , you got quite good answers to that
i was just wondering what was the connection between your question and the bits about frameworks
 
I'd say say!
Because frameworks are essentially large sets of classes.
And those classes often interact with one another.
 
Yo
 
6:09 PM
@LeviMorrison what is it supposed to output?
 
Sorry if I'm not making sense...I have a condition: Dunning–Kruger effect. :P
 
phpcodepad.com is back online :)
 
@Truth rick roll it
 
@J-Law yes , and the way how they interact (global state, static calls) and how they should interact (dependency injection) is not the same
 
@NikiC Well, it certainly isn't supposed to crash.
lol
 
6:10 PM
@J-Law CI's classes don't interact. CI classes are thrown together and glued together with the blood of people who have used it tried to use it
 
@J-Law , you might benefit from watching this lecture: youtube.com/watch?v=RlfLCWKxHJ0
 
@PeeHaa Baha
 
and other lectures from that series
 
THANK you.
 
@PeeHaa , i would have used word "welded" instead of "glued"
 
6:11 PM
@LeviMorrison yeah, but what should it output :P
 
@tereško soldered
 
@NikiC It should print something to the effect of:
 
It's not that solid :)
 
I would even go so far as to say "stapled"
 
Map:
1 => 2
2 => 4
3 => 6
It's somehow getting 1 => 4 but then just crashes.
 
6:12 PM
So what else is going on over here? PHP script issues?
Arrays?
 
8 mins ago, by Levi Morrison
@NikiC Check out PHP-Datastructures and run AVLTreeExample.php Happens during iteration on the Map.
 
Something I might be on the answering side instead of the inquiry side if I knew what was going on ;)
 
@NikiC AHA!
I don't know why it is crashing
But I figured out an error.
I'm comparing apples to oranges.
 
@J-Law , you can always looks at what's new in stackoverflow.com/questions/tagged/…
or watch that lecture
 
Praying that fixes it . . .
 
6:16 PM
Are you trying to say, get outta here? ;)
And yes, I'm watching it.
 
@tereško It's only one of the many emblems that will be available on PHP's packaged version :)
@NikiC thx.
 
7:11 PM
@PeeHaa you got it :P
@rdlowrey you did?
 
user895378
@Lusitanian yeah. There were a couple of issues preventing the raw response messages from being correctly parsed once they were received as well.
 
interesting
did you fix it?
 
user895378
Yeah, locally. I haven't pushed it yet, but I'd be hesitant to say, "everything works 100%" for a couple of days, just because I need to get full test coverage to be completely confident.
 
'tis fine, i won't use it for now
 
user895378
Which was part of the problem in the first place (a lack of complete testing).
 
7:16 PM
understandable...the testing of my oauth lib now covers, in its entirety, the uri clas...
and that's just because @PeeHaa both wrote and tested the class
 
user895378
Ah, the perils of using unstable code that's still under heavy development :)
 
exactly
 
@LeviMorrison and, did it work out?
 
user895378
Of course, it worked perfectly before I decided I needed the extra 10% of features I could access if I manually handled the sockets instead of letting php do it for me :)
 
what are those features btw?
 
user895378
7:19 PM
asynchronous requests, persistent connection management across requests and making mutliple requests in parallel.
 
asynchronous requests are very useful
so that's understandable
as are parallel requests
god when i'm a balding old man i'm going to regret this haircut
 
user895378
lol I shaved my head about six weeks ago and said the same thing
 
user895378
I'm happy that I have some hair again :)
 
haha - always good
trying to integrate phpunit into phpstorm...
 
Too shaved for tanning
 
7:23 PM
@NikiC I think so.
New problem
my comparison doesn't work for Pair objects.
 
user895378
I should've known better than to expect the php5.4 webserver to allow persistent connections. It adds a Connection: close header to all responses. Looks like I'm going to have to fire up httpd to test persistent connection management.
 
Trying to isolate it.
 
I see it was successful, @GordonM. You can try this to alter history.
 
user895378
@LeviMorrison How's the progress? Looks like you're stuck on the same issue.
 
@rdlowrey I'm not crashing any more.
I never did figure out why, per se.
 
user895378
7:25 PM
weird.
 
Trying to isolate a problem I have with comparing.
 
@Whisperity Okay, thanks for the pointer. but given the multiple warnings on it, I think I'll learn to live wit ha load of old commits with the wrong attribution.
 
@GordonM Make a full local backup of the repository to somewhere safe, then try to change the history and force push it. If something goes wrong, you can force push the backup and everything is safe again.
 
7:39 PM
LOL: Getting a Pull Request into upstream to make one's answer be the correct one - priceless -- stackoverflow.com/a/11807522/367456
 
@hakre ?
 
@Lusitanian yes?
 
what do you mean?
@PeeHaa why do we have a Uri class now btw -- it seems to me that all that will do is couple the service class to the uri class
 
8:02 PM
I hate it when I can't reproduce a problem in isolation :/
 
@LeviMorrison That means your code is not constructed well
You have some other state that affects the behavior of your program
And if it's not that, than you are royally screwed :D
 
My attempt to reproduce it ended up being failing (the code actually works).
I can't seem to find where my code differs :/
 
@LeviMorrison Your docblocks are confusing the interpreter :P
 
This question is not tagged PHP neither it is PHP specific but i needed a general opinion. stackoverflow.com/questions/11811060/… Is regex the right way to solve such problems?
 
8:07 PM
@LeviMorrison What was the problem in the original code?
-1 0 1 is the expected output
I get it in isolation too
 
I get null
In my real code.
 
@LeviMorrison In all 3 of them?
 
viper-7.com/ZEN8KH // closer reproduction of problem, but still works :/
 
@LeviMorrison might be a stupid question but --- are all of your versions of PHP the same
 
@Truth Lol, that's a great reaction to such a statement. I mean if you can't reproduce you already fear that, right?
 
8:10 PM
@hakre Preservation is a human instinct.
 
@NikiC it seems as though you rarely sleep
 
@hakre Well, you've heard Einstein's definition of insanity right?
 
@Lusitanian No, they are not. But the viper-7 produces the same results in 5.2.x, 5.3.x, 5.4.x and php-trunk.
They are on a different OS.
 
@Lusitanian It seems so?
 
8:11 PM
I'm on windows, but NikiC and rdlowrey both ran the code with the same result.
 
@Lusitanian It's only 10 o'clock over here
 
@LeviMorrison ah okay
@Whisperity lol
@NikiC nevermind, my timezones get very confused easily
 
@Whisperity , that thing goes tits up in opera
 
I get permission denied for everything
lol I think he banned my IP :D
 
I got permission denied on Hello world . . .
 
8:13 PM
Anyone gets anything else?
 
lol
no
 
same
 
i got permission denied
 
So the site works but disabled
So... whatever :D
 
0
Q: Symfony 2 for very beginners in web-dev

Roma BugaianI've began learning php and web development in general, BUT I am a little bit stuck on searching really good literature about web dev. My goal is to learn and use Symfony2. Currentle I am searching for practical books about php and especially which will help me understanding symfony2. So, my q...

 
8:14 PM
@Truth I think the site is dead again.
 
i'm new to development how do i rails or symfony
 
=
=/
 
@Lusitanian ... and jquery
 
@NikiC do you know how i can access my ajax database from symfony and jquery at the same time as my gem?
 
8:16 PM
Have you bothered reading the question at all? — Truth 1 min ago
+1
 
@Lusitanian And now ping everyone in the room asking that :P
 
@Truth Yes, but I don't remember :) - but it was good gg
 
Yes , and you might read the title and understand that the codeline above answers the question " Checking if an index in a multidimensional array is an array" — Itamar 50 secs ago
 
If you had read the question, you would have known that the OP already tried that, and it didn't work for him. — Truth 28 secs ago
@hakre Performing the same action twice, and expecting different results
 
read_question() === read_question_title() ?
 
8:19 PM
@Whisperity At least that's how the functional folks see it ^^
 
So, if your code does not contain any source of randomness, it should work regardless of system or program state
 
@NikiC okay
@Whisperity do you know how i can access my ajax database from symfony and jquery at the same time as my gem?
@webarto do you know how i can access my ajax database from symfony and jquery at the same time as my gem?
 
Otherwise, the author (a.k.a you) is insane.
@Lusitanian You know, you can ping 2 people at once, @webarto @Whisperity
 
oh...thanks for the protip
 
@Lusitanian Call Jon Skeet.
 
8:20 PM
@Lusitanian yes, load mongodb into the nodejs and do comet
 
@NikiC but then don't i need to install express in order for the websocket to comet the database?
 
@Truth Well in programming/logic there is actually a term for that, but I don't know right now the word.
 
Also you can ping guys not being here at all @Pleasedeleteme.
 
That's the solution for everything, even parsing HTML with regex.
@hakre Global State?
 
@hakre E_PEBKAC.
 
8:21 PM
@hakre It's called a "function" :)
 
Non-deterministic
And a function should not be that.
maybe I mixed it, let me take a look into wikipedia
In computer science, a nondeterministic algorithm is an algorithm that can exhibit different behaviors on different runs, as opposed to a deterministic algorithm. There are several ways an algorithm may behave differently from run to run. A concurrent algorithm can perform differently on different runs due to a race condition. A probabalistic algorithm's behaviors depends on a random number generator. An algorithm that solves a problem in nondeterministic polynomial time can run in polynomial time or exponential time depending on the choices it makes during execution. Use Often in computat...
 
My stupid compare function is returning NULL.
Y U DOING THAT?
 
@StupidFunction y u return null
 
I wonder if it has to do with scope visibility or something like that.
If I return a callable that uses a private method, it might not work.
Although, if you ask me, it should.
It was created in the correct context, let me use it in whatever context I want.
 
it should work ;)
 
8:31 PM
hm. never heard "ID-10T error" before
@LeviMorrison is your broken code in the data structures repo?
 
though wait a sec, wasn't there some kind of magic rebinding going on there...
 
@Lusitanian Yes, I think it has to do with function scope though.
 
hm, yes, but you have too much frustration for one person to revel in alone; thus i'm going to test this too
 
discusses many different proposals and it's unclear which one is implemented
 
Fixed.
It was function scoping issues.
 
8:38 PM
:)
 
@rdlowrey Fixed it. Function scope issues.
How's your project coming?
 
user895378
@LeviMorrison nice.
 
does google expose their unit converter as an api?
more specifically the currency converter
 
@Nile thank you for that...i meant if they expose it knowingly, not if i can find 800 hacky ways of scraping data from their site
 
user895378
8:46 PM
I'm having a difficult time figuring out how to parse pipelined responses without hammering every line with a regex or loading the entire response stream into memory :/
 
did you even look at the list
the first link is this article: motyar.blogspot.com/2011/12/…
 
@rdlowrey This is one reason the Regular expressions are compiled in some languages. You can call it over and over with significantly less cost.
 
please take the time to read it @Lusitanian
 
@Nile I did...it's not an official API
just because it returns json doesn't mean it's official
 
@Lusitanian If it works cross-domain it makes it official.
 
8:48 PM
    $row['text'] = str_replace($matches, $result, $row['text']);
 
@LeviMorrison seriously? /me tries
 
its made by google
 
Why do I get <b>Notice</b>: Array to string conversion in <b>D:\Websites\htdocs\tests\index.php</b> on line <b>23</b><br />
?
 
@Nile obviously, that's not my point
 
what's your point? its a google API that returns what you want!
 
8:49 PM
str_replace should accept arrays as search and replace..
 
i know that! i just don't know if i can use it heavily in a sanctioned manner
thanks for your help, btw :)
 
user895378
@LeviMorrison Yeah ... that would make my life significantly easier ... as it stands I'm not sure how else to do it but load all the responses from a given host into memory and do a big preg_match_all to find where each message status line starts :/
 
@Lusitanian Did you ever think about taking a look at the Google API directory for finding your answer?
 
yes
 
@Lusitanian Did you find a currency API in the Google API directory?
 
8:51 PM
@rdlowrey You are doing 1 socket for all connections?
 
no, which doesn't necessarily answer the question
it could be a lab api or some weird semi-open api,e tc
but it seems to me it's not officially sanctioned, so i'll have to use something else
 
user895378
@LeviMorrison no -- but HTTP/1.1 supports pipelining on a single connection -- so if you do a requestMulti call with say, three different URIs at google.com, you can open a single connection and pump all three requests up that socket and the remote server will return them in the order they were requested on the one connection.
 
Oh, gotcha.
 
user895378
The problem is determining where each message starts and ends when reading the stream of response info the remote server sends back.
 
user895378
I guess all of the responses are going to be loaded into memory anyway at some point, so it shouldn't be a big deal to just read all the contents of the stream into a string and do a single preg_match_all to find where the individual messages begin and end.
 
8:58 PM
@rdlowrey Should the first message start at the beginning?
In this case, just parse it, and whatever is left should be the beginning of the next message, right?
Or am I misunderstanding something?
Also, I'm not sure how beneficial it would be to pipeline them.
It's only really useful on high latency connections, right?
 
user895378
@LeviMorrison No, you're right, but the problem is chunked transfer encodings. They apply only to the entity body and you can't decode them unless you know where they end ...
 
user895378
I don't know ... I'm considering not doing pipelining because it makes it wayyyyyyyyy harder.
 
i hate it when people think "nosql" means "no references, store everything in one collection"
 
@Lusitanian noob, that is what it means.
:)
 
lol
i'm looking at the "schema" for a recipe site wherein the user document has a cook profile document embedded in it which has a restaurant document embedded which has an address document embedded and the cook profile also has multiple recipes embedded in it which each have several ingredients embedded along with their quanitities with the units embedded, alongside an embedded video in gridfs
what the hell
 
9:05 PM
I got lost along the way, but I think I get your point.
 
yeah...now i get to explain why this is a bad idea for performance
 
user895378
Actually, I might be dumb. I may be able to do this after all.
 
how so? (i've been silently following your conversation :P )
 
@rdlowrey Well, power to you if you succeed. I don't personally feel like that type of coding atm.
 
user895378
@LeviMorrison It's really a PITA. If I weren't trying to do stupid pipelining I would've been finished yesterday.
 
9:07 PM
you'll feel better when it's all finished
or when you give up on pipelining and declare it finished w/o pipelining support
 
@Lusitanian clearly you should be using codeigniter because symfony sucks
 
but how do i convert it to a gem in order to utilize the jquery asynchronous ruby functionality
ah gnu units is perfect, it supports currency (and 2000 some other measurement units)
 
user895378
@LeviMorrison Woot! Just what I needed to justify killing my pipelining efforts: HTTP Pipelining: A security risk without real performance benefits
 
@rdlowrey pfff, excuses :P
 
if for a chat functionality if the messages from user1 are sent to the database of user2 and then user2 sees the chat messages after they are fetched from his database and vice versa............. will this make the chatting system slower?
 
How the hell did this question get 300+ upvotes and only one downvote?
(2 now, one from me)
 
9:32 PM
or should i generate an xml and store and retrive the messages from it
 
@truth done
 
10:10 PM
hello
 
10:30 PM
Sorry if this isn't the right place to ask, normally I see a "vote to close" or similar room, but can't find one today.
My question about how PHP's mail function works was closed: stackoverflow.com/questions/11811711/how-does-phps-mail-work
I understand that some people think using mail is wrong, or that it is better to use something like SES, but shouldn't have bearing on whether my question is downvoted or closed.
The close reason says "It's difficult to tell what is being asked here." but I disagree.
The clue is in the title: "How does PHP's mail work?"
From the FAQ: "However, if your motivation is “I would like others to explain ______ to me”, then you are probably OK."
I see no reason why my question doesn't fall within the scope of the SO FAQ.
It is not ambiguous or unclear at all.
 
10:45 PM
it works differently everywhere. the funcion is processed differently on different types of servers
 
11:00 PM
@Lusitanian we can throw a factory in there to decouple it. It's neater than some loose public domain function ;) and it will make it more easy to generate a signature for oauth1 requests
and evening for eveybody who is still awake
 
I was told meta is the more appropriate place to ask my question: meta.stackoverflow.com/questions/142298/…
 
@TomMarthenal it can send mail using sendmail (or a drop in replacement like postfix)
 
@PeeHaa that's my understanding from what the person who answered told me before it was closed, I just don't understand why the question was closed since I tried to follow all the rules.
 
lemme check the question :-)
Well... Your original question was a bit vague @TomMarthenal hence the reason it probably got closed as NARQ: "It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ."
 
I edited it and continued receiving downvotes and close votes, though. I really don't think it's that ambiguous, especially after the edit.
 
11:08 PM
@TomMarthenal The question (in the current state) was edited after the close votes
@TomMarthenal and you can thank @hakre for reopening it :)
 
ok, thanks
I don't really care that much but I just don't understand why some questions are closed and some are OK (I'm sure I could find a heavily upvoted one more ambiguous than mine)
 
@TomMarthenal One of your "mistakes" also was mentioning the reliability of it.
which can be subjective
 
I understand people not liking the question or the premise, but seems grounds for it to be ignored, not closed/downvoted
 
@TomMarthenal Well as I stated your original question was vague
 
@TomMarthenal Sometimes we all wonder. Sometimes the dumbest answers get upvotes up in the sky, and I sit there watching that and thinking: this is so wrong ;)
 
11:11 PM
@hakre I didn't know you were in here, thanks for re-opening
 
best thing you can do is to ask, come to chat, and meta is a good place, too.
 
And open a good bottle of whiskey also helps :)
 
whiskey?
nah, drinking tea
 
@PeeHaa I'm 17 but thanks for the idea :)
 
@TomMarthenal Never too young to start with it my firend :)
@hakre coffee > tea
:D
 
11:15 PM
this happens when I drink whiskey instead of coffee
or I drank both, can't remember
 
:P
 
@PeeHaa dude, it's late. right now it's tea for me.
 
color is from lip gloss
@hakre hah lol noice
 
@hakre I'm going to have soo much fun using that in answer the upcoming dayd :D
days that is
and answers* :P
 
I might create a hoax github project with website and such
you can then reference in answers ^^
 
11:19 PM
can I suggest you add pink... this silver kind of looks like my rims...
everybody loves pink and globals :D
 
It's a silver bullet.
 
@hakre Even better :)
 
It's the answer of all problems in software development.
Historically you have been told that there are no silver bullets in software development.
But that picture is the proof that such silver bullets actually exist.
 
@hakre , just like bible is proof of god and the amazing spideman comic are proof of spiderman's existence
 
11:25 PM
@rdlowrey Yeah, I knew the performance benefit was centered around high latency connections.
I'm not as eloquent or sure as whoever wrote that article.
But all in all, no need to pipeline.
 
user image
2
 
@PeeHaa good point
@PeeHaa and lol i was just frustrated and trying to test something -- btw your Uri class was broken ;D
do you want to write up a phpunit config
 
@Lusitanian hahah sorry about that. ;) I was pushing and github broke down :P
 
lol i fixed it [and the testcase] it seems like github has been broken a lot this week
also, how should we handle scopes
my class constants are hacky
i think we should use a global registry with a static array
 
11:41 PM
@Lusitanian Will be tomorrow if you don't do it before that I'm pretty wasted right now :)
 
@Lusitanian Finally you are talking sense
 
hahahaha
 
:P
 
$GLOBALS['google_scopes']['email']['name']
 
11:41 PM
@Lusitanian perfect
Lemme read the v2 spec tomorrow so I have an idea what I am talking about :)
 
okay
we need a service factory too
but i'll worry about it later, i'm working on a commercial project right now lol
and why the hell is there smoke outside of my window
 
:P
 
@Lusitanian Last time I looked out the window and I saw smoke my yard was on fire.
 
@CharlesSprayberry fortunately this was just a neighbor barbecuing
but that was my first thought
0
Q: Triggering a jQuery event using PHP (echo)?

user1576720I've been trying to trigger an effect through PHP. Basically, when the user enters an invalid password, I want to make the submit button shake. To do that, I need to go through PHP, and attempt to validate the user in my database, if that fails, the following code is supposed to trigger a jQuery ...

i want to cry
 
me too, it's getting too late:
 
11:57 PM
lol
 
i dont get it, what are all of these images?
 
these image all contain the answer to every PHP programmers question.
 
you answer their questions with bullets?
 
Regardless of what the question is, the answer will be the super::$tatic silver bullet.
 
@rdlowrey How goes it?
 
11:59 PM
oh
 
I just 'purchased' about 50 classics for the kindle for free.
Awesome.
 
arent all classics free on amazon kidnle
 
user895378
My kindle just up and died a few days ago :(
 

« first day (658 days earlier)      last day (4273 days later) »