« first day (1208 days earlier)      last day (3965 days later) » 

m59
m59
Any suggestion about what "thing" in my api should care about the requested content type?
I mean, regarding whether or not I support it
@m59 What are the available options?
m59
m59
Let's see...
Right now, I get the resource and pass it to the Renderer class, which raise a flag if the type isn't supported
that Exception bubbles up and is caught, the error is handled and then it resets the type to 'json' and runs the Render again
okay, let me rephrase - what are the available content types?
m59
m59
oh, json and xml
I guess the only other choice is the Request class, but I don't feel like it should care what is requested
22:10
Are the JSON and XML semantically identical?
m59
m59
dunno =D
probably
@NikiC heyas
In that case, consider at some point having just the raw data returned, and have the thing that cares about the requested content type transform it accordingly. This might be a huge oversimplification depending on the data, though.
m59
m59
Hmm, that's a cool idea.
@Charles so, what header do I use for that?
@m59 What do you mean?
m59
m59
22:16
I mean if it's not supported
The response code? 400 Bad Request,
m59
m59
I mean the content type header
hm... looks like instanceof is not calling autoload
Maybe 406 Not Acceptable, which is expressly about content types, though that's more about the Accept headers...
oh.. uh... dunno.
m59
m59
there's a header for content type not supported
or maybe I'm wrong =D
22:17
@NikiC ouch, that's really nasty
m59
m59
415 => 'Unsupported Media Type',
@igorw Usually not, because theoretically something can't be an instance of a class that is not loaded
However, because of this my class_alias-in-the-autoloader hack breaks down :(
@NikiC good point :)
heh good ol' reddit. Someone recommend composer and clean code and gets downvoted :D
@Fabien usually the opposite happens which is also some sort of cargo cult behaviour
22:32
@igorw You can either laugh or cry.
I try not to get emotionally involved with the comments in /r/php
:D
m59
m59
for this -> if ($myArr has values)
heh, yes that might be best.
m59
m59
if (count($myArray)) ?
What's the best practice?
@igorw BTW, I'm thinking of making a Cards Against Humanity style project. It'll help familiarise myself with sockets (never touched before). Seeing as you've worked with React. Would you recommend I use it or try to do it all bespoke for greater learning?
22:34
for a toy project... sure, why not
I'd be nice to be more than a toy but I am nay capable of anything on that scale. I'm not even sure how to begin.
there's not so much documentation for react, but you can figure most of it out by looking at the examples and the READMEs in src/React/*
Fair enough. Well written code and examples is all the documentation I need. Unsure if I will actually use it but it's good to know it's not a bad idea.
m59
m59
Hmm, I just noticed I have function isNumericalArray
in a class that makes no sense to have it
should that be in a utility class of it's own? It's the only method like that..
have you considered a function?
m59
m59
22:41
?
@m59 yes. Maybe a Validator
@igorw how is RG?
@Gordon cool place to work, things actually run relatively smoothly, people own the code, we deploy every day. I like it
nice
22:48
@Gordon how about you? did you settle on a new job? what is happening?
@igorw I am still working the job in Munich. Things are not as smooth as I would like them to be, I am still struggling to grok the code and we try to deploy once a week
dafuq
tnx @Gordon :) was just about to get rid of the tag
fwiw, we only do feature deploys once a week as they tend to be a bit larger
Anyone want to see a JS shitstorm :D?
@BenjaminGruenbaum Always
@BenjaminGruenbaum cmd+f "flatmap", I was not disappointed
No you were not. Control+f monad would not disappoint you either :D
23:12
@PeeHaa FYI, although I'm not likely to get time to look at it properly before next week
yay
no worries I'm also pretty busy atm
Aren't we all...
Ok, someone used my name while I was away :)
@rdlowrey Anthony just pointed me here, uh, day before yesterday I think
user895378
@RouvenWeßling cool :)
user895378
Things are generally more relaxed here than most serious chat rooms in my experience. It's a nice place to hang out.
23:24
@rdlowrey I've heard of this mysterious room before. I've never used the stackoverflow chat before though
Not that I'm really active on stackoverflow in general
Lucky I got the reputation to even write here ;)
user895378
Hehe, well, FWIW I've only answered ~5 questions on the stackoverflow site in the past 12-15 months. I use the site almost exclusively for this chat anymore.
ok that's it. I'm done with the fucking idiotic chat search. Imma crawl all the things!
user895378
@PeeHaa The chat search is pretty terrible.
@RouvenWeßling welcome :)
@rdlowrey I'm going to at least download this room's transcript to make searchable. Finding stuff is just plain impossible
@rdlowrey Weird question, but have we communicated before? Your handle rings no bell
user895378
23:28
@RouvenWeßling Probably from the internals list. You sent a mail the other day regarding the TLS RFCs I've been working on pointing out that removing the deprecated stream wrappers in 5.7 would be way too soon :)
I remember the mail, not the name it came from.
user895378
<--- this guy
Reminds me, I need to finish this E-Mail to internals
Kinda weird, that the discussion on my RFC got way more interesting [i]after[/i] the voting started...
No markdown? :(
user895378
italics: *this*
user895378
(inside asterisks)
user895378
23:31
@RouvenWeßling I think that's pretty standard -- no one has time to look hard at a proposal before it comes up for a vote
@RouvenWeßling Every discussion gets more interesting after the voting starts.
And you may have confused markdown with bbcode.
@Danack Uh probably. Context switching is hard.
Traffic to internals has been a lot lately, so I kinda understand.
Btw, number of internals subscribers is ~1300
user895378
> smarty-dev - 201
user895378
^^ We all know @NikiC just subscribed himself to that ~190 times.
23:37
php3 - 2790
WTF?
Ok apparently the last message is from June 2000
What is self-approved used for? Can't find that list.
people passing the response challenge ;)
Hey @NikiC, while I got a hold of you. Could you take a look at github.com/php/php-src/pull/570
IMO would be a shame if 5.6 wen out without this.
yes, that should have been merged long ago
I'll do tomorrow (unless I forget about it, obviously...)
Thanks :)
If you get bored, I have another open one that should be very straight forward: github.com/php/php-src/pull/551
Guys/girls I've read this whole article http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
What intrigues me most is that there are several things that are true
Especially the inconsistency
2
23:58
@NikiC RE your question about my RFC, have you seen this: security.stackexchange.com/questions/49849/…
@rdlowrey Am I blind or can't I set a user agent string in artax?
user895378
@PeeHaa um, I forget. I think it sets it automatically. Don't remember if I allow it to be overridden.
user895378
If not, I can change it.
user895378
$request->setHeader('User-Agent', 'zanzibar');

« first day (1208 days earlier)      last day (3965 days later) »