« first day (655 days earlier)      last day (4308 days later) » 

10:00 PM
@MikeB having them, or wanting them?
 
user895378
@Lusitanian I would say I'll fix any errors you're getting right now, but I'm in the midst of completely changing how everything works under the hood from the http stream wrapper to sockets.
 
@rdlowrey What did you do to my code?!?!?!
 
It's okay, I can wait; but why the sudden change?
 
IT WORKED BEFORE!!!!!
 
@orourkek having, I think it was @hanleyhansen. I just got my first batch of invites
 
10:01 PM
@LeviMorrison except for me ):
 
user895378
@Lusitanian Well, technically, I need to see some exception output before I'll believe it's the fault of my code :)
 
@Lusitanian I think you are using his code, but not the major update he mentioned.
 
@rdlowrey Yeah I don't think it was, I just rebooted the VM i was working in and it's okay -- I'm not sure why it hung on the client->send call though (which is no longer called send since i just cloned the new version)
@LeviMorrison I am, without the major update
 
user895378
Yeah, what's in the repo should work just fine. The major changes are all on my local machine right now.
 
Hey, @rdlowrey, why are you moving from streams to sockets? I'm also very curious.
 
user895378
10:03 PM
Several reasons ... (forthcoming)
 
user895378
Much finer control over exactly what's happening than you get with the native http:// stream wrapper.
 
okay now it's dying again...what is wrong with my intarnat
 
user895378
The difficult part about using sockets directly is understanding and implementing the HTTP spec, and a lot of that is already taken care of by the standard Artax Http package.
 
user895378
But using sockets directly a client can manage persistent connections internally
 
user895378
As well as make asynchronous requests.
 
10:05 PM
sockets is da bombz
 
user895378
Granted it's not asynchronous like in other languages because PHP doesn't work that way.
 
user895378
But it does allow you to fire off a request and not bother to wait for the response
 
Okay, everytime I call the ->request method, apache2 totally hangs and I need to restart it
Hm
 
user895378
Sockets also allow you to manage requests in parallel
 
so does curl ;D
 
10:07 PM
@Lusitanian And I already know that you think cURL is crappy.
 
user895378
Yeah, but sockets do it without needing the libcurl dependency
 
Hello everybody!
 
user895378
cURL sucks, and it's extremely difficult to get a working libcurl for most windows php distros
 
that is true
 
Does anybody know how to merge these arrays for example?
 
10:08 PM
@Hypn0tizeR array_merge($array1, $array2);
` // Retrieve the response
echo("requesting");
flush();
$response = $client->request( new StdRequest('http://google.com', 'GET') );
die('done');`
 
user895378
In general, "use this extension it will fix your problem" is the wrong answer to a question. As much as possible you should strive to solve problems with the standard distribution.
 
The problem is that I have all the arrays in one variable
 
@Hypn0tizeR what do you mean?
 
user895378
@Lusitanian Ah, I know what the problem is :)
 
$array = array
0 => string 'DE' (length=2)
array
0 => string 'GB' (length=2)
array
0 => string 'SE' (length=2)
array
0 => string 'US' (length=2)
array
0 => string 'US' (length=2)
 
10:09 PM
@rdlowrey seriously??
 
user895378
@Lusitanian Yep. I actually ran into the same thing earlier and have fixed it locally :)
 
@Hypn0tizeR so what do you want the output to be?
 
@Lusitanian You didnt' give a protocol.
?
 
user895378
@LeviMorrison i think chat just turned his url into a link
 
I want my output to be like $array = DE GB SE US US
 
10:09 PM
@LeviMorrison yes I did
the chat just converted my...exactly
 
@rdlowrey Just realized that.
lol
 
@Hypn0tizeR is that supposed to be a string or an array?
 
user895378
@Lusitanian Anyway, here comes a mini-http lesson to explain the problem.
 
it doesn't matter but it will be better if array :)
 
@Lusitanian Use the fixed font button instead of ticks for multiple lines of code.
 
user895378
10:10 PM
@Lusitanian Or would you rather me just post the code that will solve your problem? :)
 
@rdlowrey actually, I'm interested in both
so I'll take the lesson :)
(if you don't mind)
 
user895378
Okay, well the issue is not with the library ...
 
Anyone knows how close database connection in magento
 
let me just tell @Hypn0tizeR how to do this real quick: $newArray = array(); foreach($array as $subarray) { $newArray[] = $subarray[0]; }
 
user895378
The client (currently) creates a raw HTTP request message from the exact values specified in the StdRequest object
 
10:12 PM
Okay
 
user895378
It doesn't provide any fixes for missing headers.
 
In your case, it is missing Host.
 
user895378
So with your code, the raw HTTP message it's sending out looks like this:
 
user895378
@LeviMorrison exactly
 
10:12 PM
yeah
 
@Lusitanian Thank you so much for your time! Going to implement it!
 
That's enough for me to know
 
user895378
You need to add a host header
 
yup
so you don't add one by default
I probably should've looked through your code more thoroughly
 
user895378
I do in the latest unpushed changes
 
10:13 PM
Technically if you give an absoluteURI you don't need one.
 
emphasis on technically
 
user895378
yeah. I'm adding lots of features like that currently to make life easier
 
Which is why it failed: something borked because it didn't implement the spec properly.
 
user895378
$response = $client->request( new StdRequest('google.com', 'GET', array('Host'=>'www.google.com')) );
 
10:14 PM
[ 'Host' => parse_url($this->getAccessTokenEndpoint(), PHP_URL_HOST)]
 
user895378
or that :)
 
Time to try again :)
it worked, and also...my autoloader just tried to include an "Interace". I clearly made a typo somewhere
 
user895378
The missing Interace is definitely not my fault :)
 
@rdlowrey $client->request( new StdRequest('/', 'GET', array('Host'=>'www.google.com')) );, right?
 
@rdlowrey neither was my first issue (:
 
10:16 PM
@rdlowrey Will the sockets do HTTPS for you?
 
user895378
wait, no.
 
user895378
@LeviMorrison yes.
 
@rdlowrey Good, if they didn't it would be a show stopper for me. I'm not implementing that!
 
what are you guys talking about ?
 
user895378
@LeviMorrison you have to specify a full uri: StdRequest('http://www.google.com', 'GET', array(...))
 
10:17 PM
Implementing a spec-adherent HTTP client.
 
user895378
^ what he said
 
@rdlowrey Ah, the API requires a full string url, not an HTTP start line url.
 
Oh, there is so a meme in this. bbc.co.uk/news/uk-england-london-19079733
 
user895378
But like I said the in-progress version on my local machine does things like auto-add the host header if it's missing and whatnot.
 
@rdlowrey I'm worried about the amount of things like this you might have to do.
 
user895378
10:19 PM
@LeviMorrison Well, that's the only thing I've come across that most people would miss so far.
 
user895378
I'm keeping the base client as sparse as possible along those lines and then I want to build a very user-friendly client with full cookie support, etc around it.
 
Fatal error: Uncaught exception 'OAuth2\Exception\InvalidTokenResponseException' with message '400: Bad Request' in /var/www/temp/oauth/OAuth2/Service/Google.php on line 33 CURSE YOU GOOGLE
 
user895378
@LeviMorrison Also, I've realized that the php 5.4 webserver does not have a bug. Instead, the deplorable fact that core php provides NO access to the raw http request message means parsing the request URI from $_SERVER is completely nonsensical if the request line uses the full URI.
 
user895378
How hard would it really have been to say, "hey, just in case you're crazy and you want access to the raw HTTP request message, here ya go."
 
@rdlowrey Well, we'll have a good client when we're done :)
@rdlowrey No kidding. PHP 5.5 maybe?
Actually, the problem isn't really PHP's.
 
user895378
10:27 PM
Still, it would be years before you could use that feature in broad-based installs because everyone will still use 5.3 for years.
 
@rdlowrey Or, if you have been following internals, 5.2 for years to come.
PHP 5.2 is the new PHP 4, apparently.
 
user895378
@LeviMorrison The SAPIs then? I don't really care, but it seems like that would have been a no-brainer.
 
user895378
Gross.
 
what the hell
 
@rdlowrey I'm not sure on the details of how PHP hooks into Apache, but I know in CGI PHP isn't even getting the raw request.
 
10:29 PM
I am sending exactly what google wants, and they say i'm missing a param which is required...but it's not required
@LeviMorrison people still use 5.2?
 
*[id*='-count']{display:inline-block !important;}
 
user895378
@Lusitanian My experiences with OAuth of any kind have been ... unpleasant. So I feel your pain.
 
@Lusitanian Many hosting providers (and not just Shared Hosting providers) haven't upgraded to PHP 5.3
 
expensive selector?
damn, you guys are fast
 
@webarto yes
 
10:30 PM
span[id*='-count']
better?
 
@webarto much.
 
jQuery is setting display:block; on fadeIn()
 
Still pretty bad.
@webarto Yes, it's how it works.
 
user895378
@webarto Don't you hate that when you're doing a two-part message and someone else just can't wait to say something? :)
 
yes - wait your turn
 
10:32 PM
Array ( [grant_type] => authorization_code [client_id] =>xxx [client_secret] => xxxxxxxxx [code] => xxx )
and redirect_uri...and i get missing response_type from google
but according to their docs, you shouldn't send that...and if i do with any number of values, i still get an error
 
user895378
Oh, you weren't interrupting anything, I thought we interrupted you :)
 
:4764617 The reply-to feature helps in this situation. It's one of two major reasons it is better than IRC.
 
I was joking :)
 
@rdlowrey ah no man, I read between the lines :D
cool thing this reply
 
Unless it confuses @Mike for every Mike in the room :(
 
10:36 PM
Does anyone have Larry Page's phone number?
 
404 bad request on that
minus.com/m3DC4reOe/2 < here are the ping sounds from chat room
2
@MikeB you got me there :D
I should start to be sirius
@rdlowrey @LeviMorrison have you thought about websocket implementation? in your voodoo codes
 
@rdlowrey yeah this oauth2 "experience" is actually more painful than shoving nails in my arms...i'm really, really close to use some shoddily coded library and being done with it
 
user895378
@webarto I haven't gotten that far yet :)
 
especially because this "hybridauth" supports oauth1/oauth2/openid and every social service in existence
 
user895378
@Lusitanian yeah ... I'm kinda with you on oauth until I can take the time to sit down and write my own client that doesn't suck. It's a PITA.
 
10:42 PM
@PeeHaa if you're here, which you aren't; i'm postponing development of this and just using hybridauth
fortunately someone's actually proposing that this be much cleaner
 
@rdlowrey cool, would be nice if you get there... I found it easy to work with it and PHP (easy when you get to know it, like everything else)... I refused to use Node.js etc, because I can reuse PHP code with this... I just don't know how it scales, if it does, but I don't have need for that...
 
You don't care if it exists until you need it (;
Well, now that I'm done being masochistic with OAuth, I'm going to write a helper library for adding emoticons to HTML forms and submit it as a pull request to Artax
 
no, really, 50 users at tops, all on latest Gecko/Webkit, and server is eating little children for breakfast... it would probably crash like tower from cards in "real world"...
public function emoticons()
{
    $emoticons = Kohana::$config->load('emoticons');
    foreach($emoticons as $key => $value)
    {
        $this->_post = str_replace(
            $key,
            HTML::image('static/gfx/emoticons/'.$value, array('alt' => '')),
            $this->_post
        );
    }
}
just don't do it like this ;D
 
ew kohana
 
meh, does the job for me
 
10:51 PM
don't you feel dirty using it though?
 
I'm using ZF now, comparing to that, I miss Kohana...
what options does one have?
 
Not using a framework comes to mind as one
 
@webarto One thing's for sure - at least it's not CodeIgniter
 
Kohana was based on it though
 
it is an option, but not really when you work in a team, because no one wants to learn your coding style or methods...
v2 was upgrade, v3 is rewrite, it does look like ZF though...
 
10:54 PM
so use the least-bad framework
 
@orourkek not even similar now :)
@Lusitanian symfony?
 
version 2, yeah
 
@webarto I use ZF everyday. What are your gripes about it? I'm not asking to defend ZF, just curious
 
@Lusitanian True, but Kohana is basically CodeIgniter with the worst parts replaced by less bad parts
 
one thing I like about Kohana is that it has its own ORM, which just works... opposite to Doctrine 1.2 were you hunt bugs for weeks...
 
10:55 PM
@webarto Doctrine 1.2 is ancient and sucked because it was activerecord (I hate activerecord and therefore it is bad)
On PHP 5.4, ActiveRecord would actually be doable with traits
 
user895378
activerecord is bad
 
@rdlowrey in PHP 5.4 I can see it not being ugly, to be honest
 
@MikeB nothing in particular now, I like it, and would settle for it, it pays good :) (I bought a voucher to take exam for fun)
@Lusitanian yes, but you cannot even remotely adapt queries from Doctrine 1 to 2, you have to rewrite everything and setup new models, which are even not called that way... so if that must be done... I'll wait for complete rewrite...
 
user895378
@Lusitanian It's less about that for me than it is about how I feel about ORMs in general. Simple DataMappers or Gateways are a much more testable solution. Also, I think ORMs are a leaky abstraction because you just can't model relational data with objects.
 
Eh, why do you say it can't be modeled with objects? Simple relational data can be -- and clearly is in many cases.
Simple relational data can be.
 
10:59 PM
 
ActiveRecord is just one more case where CI is astoundingly bad
 
let's say 10 queries for 1 ticket, 200 for 20... all magic...
 
user895378
@Lusitanian Summarizes my feelings on ORM: seldo.com/weblog/2011/08/11/orm_is_an_antipattern
 
@rdlowrey The one issue I do have is overuse...85% of sites that use MySQL would be much better served by MongoDB or even a key value store in some cases.
I've read that post
 
user895378
@Lusitanian Agreed. Most people don't have relational data.
 
11:03 PM
I'm working on a financial system right now -- THAT has relational data
 
user895378
I believe you :)
 
First project I've used SQL for in a while
heh, it's just a point. financial systems are kind of a traditional example of relational data
"There's no law that says Step One of writing any web app is installing MySQL. "
 
user895378
Hey, if it's good enough for WordPress, who are we to disagree? :)
 
which was released in 2003 - before PHP5 and widespread use of NoSQL data stores
 
user895378
all sarcasm :) WP is a god-awful spaghetti mess.
 
11:09 PM
ah right, sorry, my sarcasm detector occasionally fails
The Doctrine MongoDB "ODM" drives me nuts
What is the point in mapping objects to MongoDB when MongoDB lets you store objects
 
<- spent an hour debugging a permissions issue - turns out I had a typo in the path (╯°□°)╯︵ ┻━┻
 
The library is like putting an ugly mask on (insert favorite supermodel/actress here)
 
just so it's clear...mongodb doesn't store objects -- it stores bson "documents" -- sets of key-value pairs that have no real type
 
user895378
@Lusitanian So true. But if Doctrine is the only way you know how to interface with a data store I guess that's what you do ...
 
I know, I know; but you can json_encode($anyDamnObject);
 
11:11 PM
you still need to turn those key-value pairs into an object
 
then json_decode($mongo->getAnyDamnObject())
 
but in doing so, you lose the type info
 
@cHao I'm trying to illustrate a point in a really simple manner -- bear with me :P
 
mongo "objects" are no more objects than rows in a relational db table
 
Zar
BlowFish/Bcrypt stores the salt within the hash itself, which removes the need for user specific salt columns in my user database table -- correct?
 
11:20 PM
pretty sure bcrypt does, but not sure enough to suggest you take my word for it :)
 
bcrypt does
@rdlowrey the PHP HTTP client thing brings me back about 6 years...the first time I wrote a HTTP library in PHP (by library I mean a class with two functions around cURL) it was for a point generator on some virtual pet site -- i will forever have a youth driven soft spot for scripted http clients because they let me cheat on games when i was 11
 
@MikeB i was asking about invites
@MikeB feeling generous?
 
$running = -1;
do
{
    $master->connect('192.168.0.102', 31337, '/site5', $running);
}
while($running != 1);
 
lol
 
@rdlowrey is there a way to wait until stream connects (not execute any code after)
lol it is
I'm not kidding, if I call fread after fsockopen it doesn't work unless I wait for it to connect (which is usually ~1s)
I mean, it returns empty...
 
11:34 PM
stream_set_blocking
but it should be blocking by default
 
thanks, let me check
$this->_Socket = fsockopen($host, $port, $errno, $errstr, 5);

if( ! $this->_Socket)
	die($errno);

socket_set_timeout($this->_Socket, 5);
stream_set_blocking($this->_Socket, 1);

fwrite($this->_Socket, $header);

$response = fread($this->_Socket, 8192);
@Lusitanian seems legit now
 
does it work
 
yes it does, it worked before also, but sometimes I get empty response and response is sent... probably blocking was set to non-blocking... haven't considered that...
2012-08-02 05:43:50 [info] [client 192.168.0.102:56477] Connected
2012-08-02 05:43:50 [info] [client 192.168.0.102:56477] Performing handshake
2012-08-02 05:43:51 [info] [client 192.168.0.102:56477] Logged In
2012-08-02 05:43:51 [info] [client 192.168.0.102:56477] Handshake sent
Array
(
    [action] => notifications
    [data] => :)
)
2012-08-02 05:43:56 [info] [client 192.168.0.102:56477] Disconnected
51 + 5s timeout = 56
so it kind of works
 Notice: Undefined offset: 1 in /var/www/helpdesk/public/WebSocketClient.php on line 97
and here we go again...
 
11:50 PM
damn where'd @MikeB go? I thought i would get lucky and he would hook me up with an invite lol
 
@hanleyhansen careers?
 
@orourkek yeah
 
I've got 5 if you want one
 
@orourkek i would really appreciate it
 
first 5 people to use this link get SO Careers invites :]
@hanleyhansen ^
 
11:53 PM
@orourkek sweet! thanks!!!
 
np
 
@Lusitanian I'm returning to $runlolarun method :) dunno wtf is going on
 

« first day (655 days earlier)      last day (4308 days later) »