« first day (1224 days earlier)      last day (3949 days later) » 

user895378
22:00
The idea of "negotiation" seems a little unnecessary for HTTP.
Accept-Datetime might conceivably have a different controller for fetching from the archive, but that's getting into extremely niche use cases
Thinking out-loud: the Accept-* headers could be associated with, but not directly tied to the parsing and dispatching on routes. I'm working on a not-so-fast router for small-scale, and I use pre/post-handlers that essentially decorate the resolved callback. By associating with, you could decorate the callback with the matching accept-header-pre/post handlers, which could inject the appropriate i18n services etc.
If there is no match on the route header "meta-data", a catch-all fires from which you could theoretically abort with a 406, etc.
I might start requesting pages from betting sites with an Accept-Datetime value in the future
2
youtube.com/watch?v=Vs9J3gIV6KE <-- this evening's recommeded listening (yes, I have been drinking)
user895378
22:04
I dunno. After this conversation I may just hold off on including the http header routing. It's pretty straightforward to take whatever request data structure you're using and handle the negotiation yourself if you want to.
I like the idea of incorporating Accept-* headers into the routing process, but the URI represents the resource, and headers are meta-data about the desired representation.
@rdlowrey Just provide some kind of utility for interpolation of the headers
Utils::$tatic ftw
/hides
The Utils class: The programming equivalent of the cupboard under the stairs where you put stuff that doesn't belong anywhere but you don't want to throw away.
^ Alternative definition: the PHP global namespace.
ThW
ThW
@DaveRandom I completed the css to xpath converter, don't have an hint of an idea how to transform the rest. github.com/ThomasWeinert/PhpCss
Serious question: what's the advantage of incorporating HTTP header evaluation into the routing process? In other words, what problem is incorporating solving?
22:13
@ThW For :before and :after I would say it would be valid to insert an empty text node and return it
Nice job btw, I plan to have a serious play with that very soon (as see if I can break it :-P)
Who had starred/pinned a cv-pls?! ... unstarred… :o
ThW
ThW
An empty node?
a textnode?
@ThW Well yeh, that's basically what they're for, right?
@bwoebi Uh, you had a look at that question, right?
@DanLugg no… I assume it was closed… 5 stars?
22:15
@bwoebi lol, I don't think it's closed; not yet anyway.
ThW
ThW
but that would be manipulation, not traversing (I have it in the FluentDOM api)
@DanLugg well… anyway… then star it again… but nobody needs a cv-pls pinned…
@bwoebi *shrug* it's pretty funny, and relevant.
Then there wouldn't have been a cv-pls?!
22:17
@bwoebi Just because it's cv doesn't mean it's not funny, or even easily closable delete-able.
ThW
ThW
@DaveRandom I would appreciate that :-)
@ThW Granted, but if people are wanting to use it then that's what I'd expect. Basically what I'm imagining is $xpath->query(PhpCss::toXpath('el:after'))->item(0)->data = 'foo';
Although actually that's not possible
ignore me, I've been drinking :-P
ThW
ThW
@DaveRandom I see no way to implement that, I generate an Xpath expression without knowing which document is used on.
@DanLugg starred is okay, but pinned!?
ThW
ThW
@DaveRandom I am in a bar, just got my second small wine
22:21
@bwoebi *sigh*
I think I should have just unpinned the question
ThW
ThW
@DaveRandom btw forget query(), use evaluate()
@ThW Yeh I realised that after I wrote it. I think the whole concept of CSS selectors in PHP just breaks my brain because of the number of f*cking terrible implementations there have been
@bwoebi I've been trolling; it's a damn Friday link.
@ThW I used to, then I screwed myself over a few times and now I generally query/foreach for everything. Although granted in that example eval would have been better, the magic "may return node, may return list" is actually pretty useless for fluency because you are liable to call methods that don't exist
Even when I'm only expecting one result, I still get a list and loop over it because you don't lose much and you gain knowledge that everything you expect to be a node really is a node
ThW
ThW
22:26
query() always returns a list, evaluate() returns a scalar or a list depending on the expression
the result type is always fix based on the expression
but query() can not work with any expression
No, it returns scalar or list or Node (doesn't it?)
ThW
ThW
nope always DOMNodeList or scalar
you can not select a single node with an xpath expression
it is always a list (part of the concept)
@DanLugg well… even better I unstarred it.
@DanLugg and you still not realized I knew all the time that it was some ugly youtube link? you've been trolled, not me.
@bwoebi lol, touchy touchy; calm down bro :-P
@ThW I just looked back over some old code (and particularly comments) and am now wanting to punch myself in the face. I have done so much work with DOM and xpath over the last few years and yet I still seem to have missed some fundamental API details
@PeeHaa you win this round, but I will be back. She will love me again.
ThW
ThW
22:33
@DaveRandom :-)
Merry Friday folks; off to the home-stead.
ThW
ThW
an xpath expression is actually a sequence of expressions separated by /, each returning a list
@DanLugg See you in a couple of hours when you get bored of being at home
@DanLugg hehehe
@ThW Yeh I do get that much, it was just the fact that evaluate() handles wrapping function return values
Although i now wonder what else I missed
ThW
ThW
22:38
hehe
Can I register an own implementation of a DOMNodelist somehow?
Fatal error: DOMDocument::registerNodeClass(): Class DOMNodeList is not derived from DOMNode ... so much for that idea
@DaveRandom never heard of punycode before :)
@ThW No
@Jack It's how non-ASCII chars are encoded into things that are valid domain names
I think specifically unicode code points, I don't think it's arbitrary data
(I don't know that much about it myself)
That makes two of us :)
So what, we have to convert Unicode to punycode before comparison?
Basically if either CN or CN_match contain a char > 0x7f then it needs to be converted to punycode before the comp (I think)
ThW
ThW
@DaveRandom tried to implement some array access syntax sugar for the node list/maps. revert
22:46
Actually if both contain a non-ASCII then no conv necessary
maybe a manual strcmp impl might be worth while here so you could return on no match and convert to punycode on invalid code point
@ThW the easiest thing to do would be decorate the DOMNodeList, for want of a better alternative
morning
ThW
ThW
I already have that, FluentDOM::Query has ArrayAccess, but I am added some lightweigth DOM class extensions to the project, this would have been some nice feature.
I am reading W3 content accessibility page and I am wondering, do you keep documentation on what to tell to a client regarding what the web interface require as a browser?
sometime I work with people saying html5 works great and IE8 in the same sentence
ThW
ThW
lol
22:52
They pretend they know, on lot of topic but they have the money
@DaveRandom Well, which side can contain unicode? not the cert, right? :)
@Jack The CN can contain Unicode, the SAN is IA5String so it cannot
Great, just what we need :)
inorite
should I charge more money to support IE8?
23:02
I hope that this is purely academic, because if you code like that for real, despite not being your boss I would fire you :) — Jack 26 secs ago
You should charge blood to support IE8
until recently I did had a situation where IE 8 support was a was a prerequisite
awake at night, asleep in the morning = vampire == me(sleepnow). [large yawn] btw, morning y'all. :)
In practice, IE8 support still is a prerequisite for commercial sites
23:18
for a very small app I need to store some data (url slug + text) for about 3 hours after it has been submitted. What should I use? SQLite? Flatfiles? something else?
@Patrick The issue is not time but volume
Shouldn't be too much
Then basically anything that works should be fine
I'd tend to avoid flat file storage though, because the 70's called and they want their storage medium back
@happy I need it to be accessible for other users
@Patrick okay :)
23:21
Just a small pastebin that I want to create for myself without annoying ads etc :)
Unfortunately you do have to install ruby though
:-P
@DaveRandom I think it's a nice little side project. I need to put something on my github... :D
Oh didn't you hear? There's no point in putting stuff on github any more, I recently won the intarnet
oomg, just gave the dogs baths for the first time. We usually take them to groomers, huge mess all over. Now I gotta give both cats baths... =o\ *puts on body armor*
@crypticツ That is a seriously bad idea, FYI
23:26
Ahoy hoy
Cats are notoriously clean animals and notoriously disdainful towards large quantities of water, and I can personally attest that the latter is very much the case.
@DaveRandom I don't get it :)
@DaveRandom exit abuser!!!
@DaveRandom it's going to be in one of those closed showers. Well gotta give them baths, we got flea problem.
@ircmaxell If I say it's @PeeHaa's fault for buffering includes for template rendering does that make it any better?
23:31
no :-P
@crypticツ You want to get one of those dropper things you put on their necks, they really work wonders, all you need to do is go off and do something that would be really inconvenient if you had a cat sitting on you so that the cat will come and sit on you and it's dead easy
My cat gets one of those every 6 mths or so and this is a persistently flea-free household
(at one point she did have fleas and that saw them off within a week)
@ircmaxell You're right. Next time I'll include the binary file and then call an infinitely recursive function. Nothing like a good segfault to terminate execution.
@DaveRandom LOL
Meant more like header('X-SendFile: ' . $file); die();
Actually that's true, I threw that PR together in about 5 minutes, never bothered to look into how the storage layer works
@DaveRandom Y'know... you don't have to be right all the time.
23:42
I'm rather pleased with my beard progress. It seems to have slowed, but it's still steady.
@DanLugg You know it's Friday night, you could just go out drinking...
@DaveRandom Actually, I'm making some food, then heading to the liquor store.
@DanLugg I just tend to find that I wake up one day and Abe Lincoln has moved in to my house and then I get bored and cut it off
It has a tendency to just grow outwards after a while
@DaveRandom we got those as well, but trying to wash off as many eggs and flea poop before applying it. I got one cat done. The 8month old, she was easy to do. Once she was wet she sat there and just cried like she was dying. The worst is over as she was the one who has claws.
What are we talking about tonight?)
23:52
@Eugene flea control using vanilla PHP
fms?
@DaveRandom Yea, I gotta trim the sides; it's getting... spindly.

« first day (1224 days earlier)      last day (3949 days later) »