« first day (1219 days earlier)      last day (3745 days later) » 

7:14 PM
what happened? O_o
 
@crypticツ I've broken that :( sorry
 
I almost lost my post, luckily I typed it out in a text editor
 
Woo hoo downtime
 
+1 for foresight! =oD
 
user895378
@crypticツ #FirstWorldProblems
 
7:18 PM
 
Hmm.. so where are you on irc
 
if I recall there's FF addon to fix that problem (and save forms content)
@crypticツ yeah. Something like "Hello! Is this White House on the line?" - "Yes" - "Give me The President, please", "No, that can not wait. We have SO down here"
 
user895378
@RonniSkansing #php.pecl (for php-src stuff) and I just started idling on freenode in ##php, #phpc yesterday ...
 
Okay, Im not php-src so I guess ill jump in #phpc
thanks forgot it existed
 
Who did it
 
7:30 PM
Hmm the environment has improved in here
+1 to all of you
 
user895378
The environment? How so?
 
@rdlowrey yea bad wording. People are "talking" in a more grown sense most of the time
 
user895378
Yeah, I think so too.
 
Not being to disrespectful to noobs etc.
Not getting mad about disagreements various coding subjects
=]
 
fuck I need a favicon...
Where is @salathe???? :P
Is main still down for everyone?
 
7:36 PM
yes
 
user895378
@PeeHaa Use an icon-sized version of the sweeping broom on your gravatar ;)
 
:P Neh I need something that at least kinda relates to oauth :)
 
Double keyhole
 
user895378
Also known as "@Lusitanian's mom"
5
 
:D
 
7:37 PM
lol
 
user895378
9 mins ago, by Ronni Skansing
@rdlowrey yea bad wording. People are "talking" in a more grown sense most of the time
 
:P
 
I did say most of the time... =]
 
yay - still down?
 
Our network provider is experiencing a bit of increased traffic. We and they are investigating.
Aliens...
 
7:45 PM
Meteor shower on their datacenter?
hm - why chat is still up
 
still up isn't right
back up again.
 
=]
I put my money 50/50 on ddos or misconfiguration
 
probably just a typo^^
 
misconfig? that would be painful
 
my money is on Skynet
 
7:48 PM
Damnit all those first google results...
 
> 64 bytes from stackoverflow.com (198.252.206.16): icmp_seq=45 ttl=48 time=42.5 ms
 
I guess in case of misconfig it would be rolled back in 5 seconds
 
Then why is it timing out???
 
How do I get the id of an object in php?
 
@crypticツ so you to blame in DOSing them via ICMP? :p
@PeeHaa spl_object_hash() ?
 
7:49 PM
@AlmaDo often DDos occour from misconfig i ISP
bugs In routing etc.
 
^ that usually is resolved in 5 minutes
 
yea.. I guess your right
 
well, I mean for projects like SO
 
in Lounge<Romance>, 38 secs ago, by sehe
Soooo, what's going on with http://isup.me/stackoverflow.com
 
@AlmaDo Nope I am looking for the resource id (I think I just made them term up). That thing xdebug reports right after the name
Although now that I think about it I don't think I actually need it either way
 
user895378
7:53 PM
@PeeHaa no, you're right -- objects have internal ID#s like resources
 
user895378
But I don't know if they're exposed to userland unless you var_dump the object
 
aha. That explains why my google results are not helping me :P
Meh I can live without it
 
user895378
Yeah I don't know of anyway to access them short of ob_start();var_dump($obj); and parsing the number out of the buffer
 
Yeah that is pretty horrible. That and the fact what I am doing is already pretty horrible so... I just forget about it and continue hacking more important stuff :)
 
Those internal IDs get reused though don't they?
 
7:57 PM
@cspray Yes
Once it is GC'ed
 
Is there some function like is_iterable($var) in PHP?
 
ThW
@bwoebi $var instanceOf Traversable
 
@ThW What about arrays and stdClass and objects not implementing Traversable?
 
yeah, no… I want everything foreach can iterate over…
 
@bwoebi Not that I'm aware of; I normally wind up just implementing my own
 
8:03 PM
Last question posted in the PHP tag was 1hr ago. Get ready for a backlog of shit to flow in.
 
ThW
needs separate checks, don"t know about a function for all variants
 
hrmpf… okay
 
6
A: Iterable objects and array type hinting?

IsaacI actually had to add a check for stdClass, as instances of stdClass do work in foreach loops, but stdClass does not implement Traversable: function is_iterable($var) { return (is_array($var) || $var instanceof Traversable || $var instanceof stdClass); }

nope the only thing php doesnt have build in :)
 
@PeeHaa great, but SO is down…
 
Works for me
 
8:05 PM
@bwoebi nope
 
can't connect…
 
function is_iterable($var) {
    return (is_array($var) || $var instanceof Traversable || $var instanceof stdClass);
}
 
@PeeHaa Same
 
Did chat Stack Exchange just die a few minutes ago?
 
@MadaraUchiha Yes
 
8:06 PM
@MadaraUchiha "few" ;)
 
We have partially mitigated a DDoS attack against our network. We are continuing to watch traffic.
dossmonkeys
 
@kelunik The universe is 13 billion years old. They were a few minutes.
@PeeHaa I see
 
At least they say it is dossmonkeys
 
How do you fight smurf-attacks anyway?
 
Might as well be incompetence
 
8:08 PM
@MadaraUchiha Planck time is 5 * 10^−44 s. That was a really long time.
 
@bwoebi And yet they were a few minutes.
 
@Fabien with a mallet and never giving up, or this
 
Lovely website :P
 
8:19 PM
@PeeHaa intval() ?
 
@AlmaDo That doesn't even make sense ;)
That will always return 1 ;)
 
well, looked here
didn't check that either..
 
I'm not dealing with a real resource but an object instead :)
 
then - no way
oh, with extension - look here - or spl_object_hash() if you "can live" without that id
anyway - night room
 
night
 
8:24 PM
n
 
9:21 PM
@PeeHaa closing a question that you could spam with your OAuth repo? Bad business model. =oP
 
@crypticツ hehehehehe. We are doing pretty good without having to spam SO ;)
 
*sells off all @PeeHaa stock*
 
I am swimming in intarnetz cred yo :D
We are waiting for the 100k downloads and after that we are going close source and tell everybody all thye annoying issues will be fixed in that version ;)
Vendor lock in FTW!
 
@PeeHaa isn't that what OOP is suppose to look like?
 
9:26 PM
:P
 
@PeeHaa I'm finally done with improving the answer. I think it's now 500 rep worthy...maybe 400.
 
@crypticツ So I offer 500 rep bounty to anyone willing to give a good answer, and you go to PeeHaa?
Have you no shame?
 
@crypticツ Nice job on the cleanup! Will keep the bounty open for now to hopefully attract more votes :)
 
@MadaraUchiha Well to be fair, he offered the bounty beforehand, and then I decided to improve the answer =oP
 
9:30 PM
@crypticツ I'd also do that, but I'm usually afraid no one will answer the call with a sufficient answer and then I'd wasted 500 rep for some repwhore who got most votes because things.
 
most of my answers are crap. I'll try to find one which I can make a lot better =oP
 
I can't access the site
maybe my hostfile
 
@hakre DNS cache? I'm sure they ended up changing DNS or something to avoid the DDoS.
 
Is there anyone willing to take a quick look over my code
I'm pretty sure what I'm doing isn't the greatest approach
 
How many lines of code do I have to wade through?
 
not too many
about 30
 
pastebin that shit
 
its just a jungle of switch statements so you don't really need to read all of it
 
9:40 PM
I hope they are not nested. ^
 
@crypticツ no, I did edit my hosts file for SO some month ago because it didn't work properly. now I needed to comment that line out and it works again. left my votes :)
 
Never really fond of switch()
 
This is why I'm here :P
I'm using this to put all /admin/* requests through to admin.php which is gonna handle the request and include my admin template(s) from it

`RewriteRule ^(admin/.*)$ /admin.php?uri=$1 [NC,QSA,L]`
`RewriteRule ^(admin/?)$ /admin.php?uri=$1 [L]`
 
@PeeHaa you know if the dev branch for the cv-pls plugin is just something Chris is just experimenting with or is it a legit future version?
 
9:42 PM
We have a dev branch?
Ow wait. I think I know what it is
If you have installed the dev version of the plugin you are basically our crash test dummy
 
O_o
 
I'll let @PeeHaa handle that switch() routing statement :P
 
Didn't you read the contract where it states we are not liable for any damage down to you, your pc or your cats?
 
@BillyMathews Take a look at dispatchers/routers.
 
@BillyMathews Holy sideways christmas tree
 
9:45 PM
Also, you're not really correctly using switch().
as in its not a good case for it.
 
@PeeHaa Haha. I thought as much
@Fabien Please, explain?
I don't quite understand.. plus I want to know how to use switch() 'correctly'
@Leri Thanks, having a look now
 
@BillyMathews switches aren't really the correct tool for routing
 
@BillyMathews I'm interested in knowing what root_require() does seeing the arguments passed to it.
 
@BillyMathews Well for one, you only have 1 single case in each switch.
 
@BillyMathews The only case where I find switch really useful is network programming. For routing they are just very hard to maintain.
 
9:48 PM
Sorry that was longer than I thought
 
In fact there's no difference between switch dispatching and having separate page for each request.
 
@Fabien I've only just started.. more would be added
 
The most basic routing would just be a simple if / elseif / else tree, but that gets also messy real fast. How many "routes" are we talking about?
But at least you have a decent path you can follow instead of your current jumping around
 
@BillyMathews nested switching isn't very clean. Also having lots of stuff going on inside each case isn't easy to maintain/readable.
 
9:49 PM
Routes!? Obligatory link to Arya from @rdlowrey github.com/rdlowrey/Arya !
 
But the main issue as people are suggesting is your approach to url routing.
 
@BillyMathews You love switch, don't you? :p
 
@bwoebi As good as Arya is, it would be quite difficult to understand for a new-ish person.
 
BTW I think it is the alpha branch @crypticツ that gets pushed to our crashtest dummies
 
@PeeHaa Not too many.. probably something like '/users' - list users '/users/edit' edit a users 'pages/' and '/pages/edit' - same as users and one other '/settings'
 
9:51 PM
@Fabien yes, yes, first learn people the bad things…
 
@Leri it's useful.. Why would I use if/elseif/elseif/else instead of switch()?
@PeeHaa ^^
 
user895378
@Fabien probably ... but new-ish people aren't really my intended audience ;)
 
@bwoebi Well maybe not so much. Just a better tutorials on why rather than how.
 
@BillyMathews Because your rules are just tested from top to bottom instead of top to bottom left to right inside out and turned around ;)
 
@rdlowrey I know :) but this is for @BillyMathews
 
9:52 PM
@BillyMathews How about organizing your code so that you use neither (well, I mean not that much)?
 
@BillyMathews you really like using switch() O_o
 
Yo dawg, we heard you like switch()
 
user895378
One of the great PHP rites of passage is trying to create your own super awesome framework. Is it a waste of time? Almost certainly. But you'll learn a ton that way. I wouldn't ever discourage someone from trying their hand at creating a framework (unless they can't afford to waste time or are a serious security liability).
 
^^ this is exactly my aim.
@Fabien haha
 
How can we know what's good if we don't know what's bad :)
 
9:54 PM
I put a switch() in my switch() so I can switch() while I switch()
 
user895378
> So here's how the status codes will work now with the HTTP2 updates:
 
@Leri That is why I asked here before I carried on writing like that
 
user895378
+------+------------------------------+-----------+---------------+
| Code | Meaning                      | Duration  | Method Change |
+------+------------------------------+-----------+---------------+
| 301  | Who the heck knows.          | Permanent | Surprise Me   |
| 302  | Who the heck knows.          | Temporary | Surprise Me   |
| 303  | Process and move on.         | Temporary | Yes           |
| 307  | The true 302!                | Temporary | No            |
| 308  | The true 301!                | Permanent | No            |
 
user895378
lol (source)
 
lol
 
user895378
9:57 PM
> I'm now dubbing HTTP 308 as Incompetence Expected, as that's clearly the only meaning it has. Or maybe that should be the official name for HTTP2 and the team behind it, I'll let you decide.
3
 
user895378
that ^
 
@PeeHaa seriously though, I thought a switch statement was pretty much the same as using if/elseif/elseif/elseif/else - except intended, nay, created for that exact purpose (lots of if/else on the same variable)
 
@BillyMathews With that nested stuff you are creating branches of branches or branches
 
yeah.. but so long as we never enter that case, that code will never be executed.. what's the problem?
I do believe you.. I just like to thoroughly understand things..
 
It's insanely hard to follow
And to debug
 
@BillyMathews The general recommendation (read: my recommendation) is to use switch if and only if you make use of the fall-through behavior
 
It's the difference between
and
 
@BillyMathews the problem is that it increases cyclomatic and npath complexity, e.g.the possible execution paths through a function. this makes code harder to understand and maintain. Unless a switch/case is in a factory, it's recommended to Refactor Conditionals with Polymorphism (as per the pattern in Fowlers Refactoring book).
 
@PeeHaa Hey! After following your advice the other day, I still got errors with the OAuth library: groups.google.com/forum/#!topic/etsy-api-v2/cklIJq3ZGLQ
 
10:05 PM
@Gordon I think I'm going to have to study that sentence for a while..
 
@BillyMathews It's an interesting idea; I have used it in a few of my projects to drastically simplify conditionals.
 
@samyb8 what happens when you entirely drop
	$token = $storage->retrieveAccessToken('Etsy');

	// This was a callback request from Etsy, get the token
    $etsyService->requestAccessToken(
	$_GET['oauth_token'],
	$_GET['oauth_verifier'],
	$token->getRequestTokenSecret()
    );
And just do:
if ($storage->hasAccessToken('Etsy') === true) $result2 = json_decode($etsyService->request('/receipts/125799390'));
 
@PeeHaa this last one looks far more interesting!
 
:-)
 
@PeeHaa well… I've found the way with my eyes in 20 secs^^ still too easy
 
10:09 PM
So.. as I am understanding.. subtyping or polymorphism is putting things in a logical order/way so it's easier to interpret..?
 
@PeeHaa What happens is that it finally works!
 
@samyb8 :-)
@samyb8 FWIW I am building a demo site so troubleshooting, example code and docs are will be better defined.
Will be finished in 6 to 8 weeks ;)
 
@PeeHaa Sounds great. Already your work is invaluable for many of us! Thanks!
 
thanks for you support :)
 
10:23 PM
well that's one way to do it =oP
 
Thanks for your help @PeeHaa @Gordon @Fabien @leri (and anyone I missed), I've got some good stuff to learn and utilize :D
 
@crypticツ :-D
@BillyMathews np
 
I fucking love the internet
Geniuses, at my disposal >:)
 
@BillyMathews Glad that helped. You're welcome. ;)
 
@Gordon You approve of SourceMaking?
I've read some of their design patterns stuff.
 
But room 11 has me sceptical of online resources.
 
@Fabien they are copy cats. all content there is 1:1 copies of books. The refactoring stuff is taken directly from the Fowler book
 
10:29 PM
@Gordon No credit either :( but on a brighter not at least its a good choice to copy from
 
How do you find all of these?
 
@BillyMathews good question :o
 
Stack Exchange Data Explorer
 
Also, does anyone feel that the rep reward for reviewing new posts is kinda shitty
 
10:39 PM
@crypticツ which query?
 
select top 200 p.Id AS [Post Link]
from posts as p
inner join [users] as u on u.id = p.owneruserid
where posttypeid = 2
and (body like '%can anybody%' or
     body like '%can anyone%' or
     body like '%can someone%' or
     body like '%someone please%')
and u.reputation < 300
and p.CreationDate < '2011-1-01'
and p.CreationDate > '1998-1-01'
and p.score < 1
order by p.CreationDate desc
I gotta do it in blocks otherwise query times out
 
@BillyMathews Considering the plethora of terrible questions that are easily answer by a simple google. Nope.
Wonder if it would help if rep was removed/not awarded for answers if the question is removed or negatively scored.
 
But when there is a good/fair question that is just badly written, and I take time to review it and make it clearer/better and I get 2 rep for it it's a bit :/
and there's rarely posts to be reviewed anyway (I can only review First posts and Late answers)
@Fabien No, I don't agree. Just because a question is badly formatted or something else that should mean it is down voted, doesn't mean the question can't be answered well..?
http://stackoverflow.com/a/14520212/1879895
 
some one help me here please
my brain is hurting trying to understand what the hell is going on in that code
 
10:55 PM
I love this storage thing in html5
 
@BillyMathews badly formatted questions are only helpful to the person asking who understands the issue. It nulls the point of keeping the question on the site if it's not helpful to others that have the same issue.
Also the point is to not reward people who answer such low quality questions. Too many bad answers.
high quality answer for high quality questions is the goal IMO
 
I don't disagree
 
Erm… who has starred that abomination of shitty code I pasted in here a few hours ago… I see it just now on the stars list on the right…
 
but I what I meant before is that there might be a good question that is worth keeping that is just poorly formatted. That's what the review function is for :) We do flag posts that are only helpful to the person asking, but we improve posts that could be beneficial for others
 
If its a good question then it wont suffer a bad score. The asker should reformat, increasing its quality to give it some credence.
 
Jeff Atwood on May 17, 2009

We believe deeply in community moderation. That’s why we appoint Pro Tempore Moderators and, ideally, democratically elected community moderators for every site in our network. But what do community moderators do? The short answer is, as little as possible!

From the very first version of Stack Overflow faq way back in mid-2008, our goal has always been to give power back to the community:

Stack Overflow is run by you! If you want to help us run Stack Overflow, you’ll need reputation first. Reputation is a (very) rough measurement of how much the Stack Overflow community trusts you. R …

 
OK @crypticツ I just pushed the last feature I'm planning to add. There's a very minor BC break in it (renamed the PARAM_* constants and moved them up to the connection class, like PDO).
I'm not really planning to ever touch it again except bugfixes (if any)
Maybe add some tests at some point
But in any case, I regard that as "finished"
 
@DaveRandom are we talking at DataSE or cv-pls plugin?
 
@crypticツ DataSE
 
11:13 PM
ah ok, cause I posted comment on plugin. Are you currently running DataSE anywhere?
 
No I basically only made it because you said you wanted it and it sounded interesting
 
I'll see about setting it up and having it run every few hours to grab stuff the API can't get easily, but will have to be 3.0+. Thanks for making it.
 
AaAAAhhhHH
I just planned with my business partner to extend the weekend 2 days
 
@crypticツ IIRC data.SE is only updated once a mth anyway...
 
really??
 
11:17 PM
In Denmark, the following week in called "Winter vacation" and is a seasonal where schools are closed
yea
 
(maybe they made that more often by now, certainly used to be though)
 
@DaveRandom Still once a month AFAIK
 
@crypticツ I have a notification on github for a comment but it just points me to one of my ancient commits and I don't see a comment :-S
Have you got a permalink?
 
@DaveRandom looks like real-time now. I just ran query and it shows posts from today.
 
> The data is updated early every Monday morning around 3:00 UTC. The last update was 17 hours ago.
 
11:27 PM
@DaveRandom Weekly then
 
ah so just caught the update. Weekly run of DataSE should be painless then.
 
Yup :-)
@crypticツ We can do that at some point soon. I need to pick up the plugin dev again but I really can't remember where we got up to with it, it's so long since I did any work on it. Will the current URL continue to work for a while? /cc Uncle @Gordon
 
How long/often would you say is decent for backing up a database for a normal site? Like once every 24 hours but also a weekly copy for a month? Or something else?
 
Also, does that new URL still return the same JSON in the same format according to the Accept: header?
 
@DaveRandom it will until I release the new backlog as current one relies on it still.
 
11:31 PM
Grrr. PHP Fatal error: Cannot use object of type stdClass as array is my least favorite error.
 
What's your favorite?
 
Hmm... the expected semicolon one. That one's easy.
$charcoalinvurl = 'https://stackexchange.com/questions/' . $question->{"question_id"} . '/edit';
$charcoaldata = array('key' => "6Z09liTt4uTQU*a4DYOXVQ((", 'access_token' => $access_token, 'id' => $question->{"question_id"}, 'title' => $question->{"title"}, 'body' => $question{"body_markdown"});
 
@DaveRandom um, no. But I can make it. Also the format you are wanting is just a JSON array of question ids?
 
Does anyone have any ideas?
 
@crypticツ OK cool. Well I still think we need to provide an intermediate web service that does the actual collating of the backlog data, that the plugin and the backlog can use it as a unified data source and it can be decoupled from the actual applications
 
11:34 PM
@DaveRandom summer project? CVRing Summer of Code
 
@undo $question{"body_markdown"}
 
@Fabien Ah, thanks!
My eyes got all glazed over from staring at it.
 
@Undo why are you writing your properties like that?
 
@crypticツ Because I don't know any better way - this is coming from JSON. Is there a better way?
 
@Undo example: $question->question_id
 
11:36 PM
$question->body_markdown
 
Ah. ok, thanks.
changes code
 
Although I think {} looks cool... not saying I use it unless I need to. I still like the look.
 
@crypticツ :-)
@crypticツ requestable.pieterhordijk.com/IYd7o (note that it doesn't seem to be displaying correctly in my chrome, but if you inspect element then the content of the <pre> seems to be correct /cc @PeeHaa)
 
@DaveRandom Are you using the title field?
Titles can change, but the ID does not, so values in file may not be accurate
 
Does anyone know how to debug a 400 Bad Request error from a file_get_contents call?
It just fails without giving me my error message from SE.
 
11:43 PM
@crypticツ closed_date, title and link (github.com/cv-pls/cv-pls/blob/master/src/CvBacklog.js#L8). tbh it doesn't really matter about the title, it's just used as the display text for the links
It's pretty simple (stupid) logic, it dates back to long before your magic logic in the current backlog UI
@Undo Code? What are you actually doing?
 
$charcoalinvurl = 'https://api.stackexchange.com/2.2/questions/' . $question->{"question_id"} . '/edit';
$charcoaldata = array('key' => "6Z09liTt4uTQU*a4DYOXVQ((", 'access_token' => $access_token, 'title' => $question->title, 'body' => $question->body_markdown, 'tags' => $taglist, 'comment' => 'rm [' . $tag . '] tag');
$options = array(
	'http' => array(
	'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
	'method'  => 'POST',
	'content' => http_build_query($charcoaldata),
	),
);
Give me a PHP Warning: file_get_contents(https://api.stackexchange.com/2.2/questions/21818334/edit): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
 
Just a moment...
 
@Undo You might want to enable "ignore_errors" for the stream context, so you can see why SE thinks it's a bad request
 
While we're here I will take the chance to plug Artax @Undo
 
^ also this
 
11:48 PM
E.g. api.stackexchange.com/2.2/questions/21818334 gives a 400 too, with a useful error message
 
@Undo oh the familiar 400 Bad Request error.
 
Although tbh you might also want to think about not using the least user-friendly possible method of making an HTTP request in PHP, as well
 
@DaveRandom he's not using cURL :P
 
heh
 
@Undo what does $taglist contain? an array? or string list, if so what is the format?
Also maybe you should look into creating a filter to simplify things
 
11:53 PM
@salathe cURL is more user friendly than stream contexts, IMO. At least it doesn't rely on a magic variable being suddenly defined in the current scope in order to get the response headers
I mean don't get me wrong, cURL has major API problems of its own
 
@DaveRandom That's fine, I'll agree to disagree. :)
Let's all plug Artax, that seems like the cool thing to do.
 
Doesn't really matter, any sane codebase will abstract the underlying mechanism into some kind of OO wrapper that actually makes sense
@salathe Or yes, just be an OO API that actually makes sense in the first place
 
Lets just build a php chip
and feed it raw hex
 
@DaveRandom am I allowed to respond with "LOL", and leave it at that?
 
and embed hvvm
 
11:56 PM
(I am anyway, g'night all)
 
Night @salathe
 
@salathe You may, although I'm not promising I won't bring it up again later
:-P
 
lastly get drunk and smash into a well 400mph
 
nite
 
Night Salathe
 

« first day (1219 days earlier)      last day (3745 days later) »