« first day (1454 days earlier)      last day (3510 days later) » 

12:01 PM
@PeeHaa :D
 
@Ja͢ck string -> long is voluntary
 
?
what do you mean by that?
 
@DaveRandom Are you still there dave?
 
@FlorianMargaine what if you pass a variable that's a string?
 
12:02 PM
@webarto haha saw it, the chorus looks like limp bizkit
 
@HendryTanaka Approximately. Doing real work.
 
@Ja͢ck well that's the point of weak casting, isn't it?
 
ehm .. it shouldn't alter the given offset
 
@ziGi Haha, I think the video is something like Rammstein - Du Hast :)
 
wait, you mean that $test = 'test'; $doc[$test]; will not work the same as $doc['test']?
 
12:03 PM
@DaveRandom Hahaha...Are you developing an web application?
 
it does, but check the type of $test afterwards.
 
it won't be a string anymore.
 
In order to run a request like I was a normal browser what are the min headers I should send?
 
12:04 PM
@Ja͢ck /me hates that shit
 
you mean that $test = 'test'; $doc[$test]; var_dump($test); will give 0?
 
@FlorianMargaine Yes :)
 
@DaveRandom Ohh...my job is calling again. Excuse me, I'll be back soon
 
oh my god
indeed, it's terribly wrong :D
 
@DaveRandom Yeah, it's one of those things :)
 
12:05 PM
@Ja͢ck thanks a lot for the changes
 
@FlorianMargaine Thank @NikiC, he spotted the issues ;-)
 
The domain comany says they can solve it with an I frame
 
>< I was thinking noooooooooo .
 
@NikiC thanks :P
 
12:05 PM
At the very least there should be some macros for that in <7, even if it still just does the copy
 
@DaveRandom I have something for that; it's called convert_to_long_copy() :D
But you still need to declare the temp variable and clean up after yourself.
 
iirc there are some proper API funcs for this in 7 that just run the cast routine without doing the copy and return the primitive instead of the zval?
@Ja͢ck Not if you do it on the stack and wrap the macro in a do{}while(0) ...
I'm sure we've already had this conversation...
Well, obv you still need a temp variable but there's no complicated cleanup shit
 
@DaveRandom In artax how would I set the equivilent of CURLOPT_SSL_VERIFYPEER to false?
 
@Fabien $client->setOption(Client::OP_CRYPTO, ['verify_peer' => false]) I think, can't test now, never actually done it
 
Cool cheers
 
12:12 PM
@Fabien I think that OP_CRYPTO is just raw PHP ctx opts from the ssl wrapper, not 100% certain though
 
Furry muff. I'm just trying to emulate a browser request as best I can. I get different results going directly via browser to what I get with artax.
 
@DaveRandom well yeah, you could declare the primitive type first and then use the macro to populate it.
it would be great for converting to long, which happens quite a bit.
 
That's what I was envisioning really
long/double, probably not a lot of call for char* and zend_is_true already exists
 
doesn't work well for strings unless you can use zend_string heh
 
but everyone should use zend_string anyway :P
 
12:15 PM
they should
 
char* has always been good enou
SIGSEGV
 
:D
convert_to_unsafe_char() :)
 
void *do_you_feel_lucky_punk(zval *zv)
 
12:24 PM
how to refresh the code in phpdbg?
 
@DaveRandom o/
 
@FlorianMargaine hey, assuming the current read_dimension test case only tests the case of the DOM_NODESET .. how to test the others?
 
@Ja͢ck the other what?
 
12:31 PM
well, there's one call to dom_nodelist_xml_item(), one to zend_hash_index_find() and one dom_nodelist_baseobj_item().
 
we should test all those paths ^^
 
ah, true.
yeah
dunno what they're for though
 
haha
so how did you end up with that code then?
ohhh
i see where you got it
There's dom_nodelist_length_read() which has somewhat similar code.
ehh my bad; it's dom_nodelist_item() of course
 
I took the code of item()
yep, that one
couldn't get it to go through these paths, so I just gave up
 
12:36 PM
@FlorianMargaine just \n
 
I was thinking "I should see how..."...
 
that said .. now that i see the function like that .. i wonder if we could simply extract that logic out and share it with the read_dimension :)
 
@FlorianMargaine No, don't try to parse the xml document as a whole for obvious reasons. You need to incrementally parse output. e.g. code like echo 1; sleep(5); echo 2; will output <stream type="stdout">1 then wait 5 seconds and then output 2</stream>.
 
@DaveRandom How about CURLOPT_USERPWD? I have sent stuff with a user and password in the header before but is it a little different for password only?
 
12:41 PM
@Fabien "Password only" is identical to "username is empty string"
 
Furry muff
 
@DaveRandom You must be an expert dave
 
12:52 PM
Not really...
 
Is it a good idea to built your own router?
 
@bwoebi ooooh I see
@bwoebi so it means I just can't rely on an xml parser
and have to write my own, so-to speak
well, not "so-to-speak", even literally
 
If your xml parser accepts incremental output, no…
 
@Duikboot What do you mean by building? Create a new one and set your name as it's brand?
 
No to learn how routing works. Something like this: github.com/dannyvankooten/AltoRouter/blob/master/AltoRouter.php but then minimized
 
12:57 PM
@bwoebi I don't think there is a js one..
 
@KevinMGranger tb?
 
@FlorianMargaine well, then you need to write your own.
 
anyone here knowig stuff about symfony2 ?
 
@bwoebi having an incremental parser doesn't fix the fact that the newlines aren't well escaped, right?
 
1:00 PM
ah that link, thx :)
 
@FlorianMargaine in html one doesn't have to escape them?? // afk
 
html !== xml :P
45
A: How to save newlines in XML attribute?

TomalakIn a compliant DOM API, there is nothing you need to do. Simply save actual newline characters to the attribute, the API will encode them correctly on its own (see Canonical XML spec, section 5.2). If you do your own encoding (i.e. replacing \n with &#10; before saving the attribute value), the ...

 
@DaveRandom Have we create the .htaccess file in every folder in our web root dir?
 
htaccess does not work with IIS
 
@DaveRandom No, I'm not using IIS right now. I'm using Apache
 
1:03 PM
Oh OK
Well usually I would only have 1 htaccess file in the document root
And route all requests through index.php, and use $_SERVER['REQUEST_URI'] to do the routing in PHP
 
@DaveRandom Wow, is that the best way to do that?
 
Depends on exactly what you are doing, but it's pretty common practice
Having a bunch of complicated rewrite rules can be hard to manage and is often pretty slow
 
@DaveRandom Yeah, you're right. I'm following this site codingforums.com/apache-configuration/…
@DaveRandom Thanksgod, I saved my recently application structure for my college developed using Apache and I can start here..
 
@DaveRandom IIS7 and later do support something very similar to htaccess (MS finally figured out they needed to keep up)
 
@DaveRandom Do you generate the PHP router yourself or do you use a framework/class/lib for it?
 
1:12 PM
@Machavity I'm using IIS7. Is that true?
 
@Machavity IMO that's almost a step backwards...
 
@HendryTanaka Click the link and see for yourself
 
Throw in a few extra pre-request stat() calls for the hell of it...
 
Don't mistake my mentioning it as an endorsement of IIS tho :P
 
@Machavity Thanks for your info. Fiuh...you make me must choose between IIS and Apache now. haha...
 
1:20 PM
Good lawd the Bing API docs are a piece of wank.
 
@DaveRandom Rewrite method is very useful just like you said!
 
@Fabien given the amount of chapters left to it, I'd say it's going to be quick and dirty.
 
ThW
1:37 PM
@hakre This might be an bug in XMLWriter, what do you think? eval.in/private/779deb7dc020fb
 
@FlorianMargaine It's on my todo list to xml escape all < 0x20 chars
 
@bwoebi ok
 
g'mornin'
 
@ThW very much looks like, yes. ouch. have you checked bugs.php.net if it is already reported?
 
ThW
not yet
 
1:40 PM
btw. why is xml so complicated? :-(
 
ThW
@bwoebi in this case BC
 
yo dawg, i heard you like cdata
 
@ThW why was xml designed in such a complicated way then?
 
ThW
@hakre can't find one, I will add it.
 
@bwoebi It was designed as a vastly simplified SGML. It succeeded there.
 
1:46 PM
Don't pear accounts work as well for bugs.php.net?
 
@bwoebi *cough* phpdbg should use JSON *cough*
 
@DaveRandom json has the same problem, it requires encoding of control chars too
 
@bwoebi Yeh but you could just bundle a nice lightweight lib then, make some nice tidy data structures and forget about it. Using XML you have to either do it manually like this or bundle libxml, which... no
 
Good afternoon everyone
 
@DaveRandom I cannot bundle a json lib, because it needs to be able to handle incomplete data.
 
1:52 PM
@bwoebi define "incomplete data"?
You mean an incremental parser?
 
yeah
 
Because I'm pretty sure evil json has one of those
 
Output is incremental too
never seen one.
for parsing, yes, but not for output
 
Quick question, 3mb would be 3.000.000 bytes but for an upload script wasn't there a more specific number?
A little bit above 3 million in bytes?
 
@bwoebi That should be easy enough to do, I would have thought. At worst you could just buffer in order to get it over the line
Can worry about the niceties of the impl once it works...
 
1:55 PM
life is so unfair... I have to migrate an app to work on IIS
 
@DaveRandom well, xml impl works too. That what I do now are also only the "niceties"
 
I hope all I have to change is .htaccess
 
user895378
morning
 
user895378
lol IIS
 
@DavidH Depends what your definition of a MB is, I personally would say it's 3 * 1024 * 1024 = 3145728
 
1:56 PM
@DaveRandom Yes thank you I wanted to be certain of that, I was pretty sure it wasn't just 3 million.
 
I think there's actually some official standard which now states that it's 1000 KB in a MB etc, but screw those guys
 
QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv.
 
^ not again
 
I have three projects which each use one package . When I make some changes to the package, I perform a composer update on the three projects to fetch the latest copy of the package
 
Morning
 
1:58 PM
is there any alternative to this?
the three projects are laravel proejct
 
@meWantToLearn Use a central repo instead?
 
Speaking of the varvar and extract debacle:
10
A: What is so wrong with extract()?

dr Hannibal LecterCome on now. People blame the tool instead of the user. That's like talking against unlink() because you can delete files with it. extract() is a function like any other, use it wisely and responsibly. But don't claim it's bad per se, that's just ignorant.

 
do you have any link to it?
The problem atm is composer update takes a very long time
 
Link to what? A tutorial on where to put files in a single directory and use it?
 
2:01 PM
@meWantToLearn Shouldn't it cache everything and not take as long?
 
three projects A,B and C . These three use a package named "Water". Whenever I make a change on Water, I have to perform composer update on these three projects A,B ad C
each projects are in different server
I dont know about that. It takes a very logn time
 
You could add your local repo as a composer source in your global composer config
 
@KevinMGranger this is what is happening right now
 
@meWantToLearn A, B, and C use D WATER!
 
2:02 PM
yes, WATER is a package
i gave it as an example
 
@meWantToLearn package locally and push the packages to each server then.
 
do you know any tool to execute a command across multiple servers?
 
Foo, Bar, and Baz use Qux SuperFantasticHappyGoLuckyFunHouseBananaBoat
 
@ThW yeah, sometimes this is sad. IIRC XMLWriter is from libxml, probably the problem is upstream?
 
@meWantToLearn ssh and a for loop
 
ThW
2:04 PM
@hakre DOM is libxml, too.
 
@meWantToLearn Or some sort of server orchestration tool
 
@ThW but those are different modules in libxml IIRC.
 
posted on October 09, 2014 by kbironneau

/* by mouseas */

6
 
right in time the feed again.
 
:-)
 
2:05 PM
pfffffffff
 
@FlorianMargaine escaped control chars
 
awesome
 
ThW
@hakre it is a problem imho - not because of invalid XML, but it allows to manipulate the XML, too.
"XML Injections"
 
@ThW I need a little break, break down some things and then I'll review this. I can check if this is upstream or not and then this needs to be escalated I think because it makes no sense that that method does it wrong.
Or it's the writeRaw version of CDATA.
But that just makes no sense.
 
Blah im totally confused today -_-'
 
ThW
2:08 PM
@hakre Thanks, and no startCDATA(), text(), ...produces the same result
 
Hmmm, damn google. Giving me different results when I scrape it to when I view it in browser :'(
 
set the user agent
 
@Fabien Click the globe icon and you should get the same results
search bubble FTW
 
Other way around. The browser results are the ones I am after :)
 
@Fabien you can't resent google for protecting their business though...
 
2:11 PM
@Fabien Mimic the browser request exactly (including user agent cookies etc)
 
@FlorianMargaine Nope. It's understandable but none the less a crimp in my development plan.
@PeeHaa I was curious as to what that would entail.
Here is what I am setting./
 
Just inspect a request you make in your browser and copy it exactly
 
@FlorianMargaine if there are further issues, just ping me :-)
 
@ThW which at least gives some indication of the cause if writeCDATA is wrapping some subroutines... .
 
Furry
 
2:14 PM
@bwoebi will do, thanks
 
@FlorianMargaine How is the project going? (I will be finishing opcache v1 soon) :-)
 
@bwoebi just thought of one
socket closing
hahaha <3
 
:-P
 
@Fabien At least throw in the cookies
 
heh aye
 
2:14 PM
@PeeHaa I just need to parse the XML I get correctly, then display it
and some css
the "display correctly" is easy
the "parse the XML correctly" is... harder
the architecture is done though, I just need to get coding :)
 
awesomesauce
 
but yeah, I can connect/disconnect, run some commands and display some
the tedious part is coming now
 
@FlorianMargaine I'd consider to parse it like html? I assume the html parser won't complain so much about not-yet-closed tags?
 
@bwoebi nah... html considers unknown tags as not-self closing tags
 
@bwoebi You xml is not valid?
 
2:18 PM
so it nests every tag it finds
 
@PeeHaa the xml is valid (except that it has no header/root), but the xml isn't completely output at once.
 
2 hours ago, by bwoebi
@FlorianMargaine No, don't try to parse the xml document as a whole for obvious reasons. You need to incrementally parse output. e.g. code like echo 1; sleep(5); echo 2; will output <stream type="stdout">1 then wait 5 seconds and then output 2</stream>.
 
Ah I see. Makes me wonder whether xml is really the corect format to use :P
 
I'm gonna have a hard time...
 
@PeeHaa well, better than JSON for that at least.
 
2:20 PM
@PeeHaa Still the same
 
user895378
I'm with Bob; I see no reason not to use xml here.
 
yeah the problem is not xml
JSON would be worse at this
 
@rdlowrey Because it is a PITA / impossible to actually validate and damn hard to parse that way
 
user895378
@PeeHaa JSON is worse.
 
@Fabien I might have a shot at it later today.
 
2:21 PM
@PeeHaa I guarantee that there are no incomplete tags or entities, just incomplete closing tags.
 
@PeeHaa No worries
 
@rdlowrey Yeah, that's why I never said json ;)
 
user895378
And those are really the only two good valid options :/
 
to put it that way: xml is shit, json is great, but for that job, JSON is unusable, so, we need shitty xml.
 
WE NEED A NEW FORMAT!!!!
Send over yaml ALL THE THINGS!
:P
 
user895378
2:23 PM
XML is a PITA bc you can't parse it without a lib
 
@rdlowrey XML is a PITA, because you don't get closing tags
 
user895378
But you really can't represent console output (which could contain anything) with a simple format. Markup is your only real option.
 
user895378
Well, I say that.
 
user895378
Something with length delimiters might be a good alternative.
 
user895378
2:25 PM
But that's non-standard.
 
@PeeHaa I want to make: YAXML <- Yaml serialized over XML... because
 
I don't want to live on this planet anymore
:P
 
@rdlowrey so, you want to reinvent xml over websockets?
 
@FlorianMargaine you know what, i think we can simplify read/has_dimension a great deal by just using the item() method and length property :)
 
user895378
@bwoebi No, but a good strategy for any protocol is to make it easy to parse in a language like C without third-party libs.
 
2:27 PM
@rdlowrey well, what I did now is easy to parse in C. IMO.
 
@FlorianMargaine It would reduce the code to simply this.
 
user895378
i.e. pack the length into the first 2-4 bytes (like rfc6455 protocol) so people can just read a predetermined number of bytes.
 
user895378
Otherwise you need complicated parsing libs.
 
@Ja͢ck doesn't that add a lot of overhead?
 
not more than ->item() already has.
 
2:28 PM
(i.e. going twice through the "call a php function")
 
no, it doesn't .. only once
the advantage is ... class extensions heh
though, not very likely scenario
 
the first thing I tried was indeed to internally call the item function... but someone told me it would add a lot of overhead
can't remember who...
 
<rant>If you are designing an XML-based API, and you have a standard message header that includes a "status" block, fucking include it in every message, not just when something goes wrong.</rant>
 
Every sane person has a static directory in which all their web projects are in right? (be it /var/www or something else)?
 
@PeeHaa Possibly, but assuming that every person is sane won't work out so well.
 
2:35 PM
True that
 
@PeeHaa Your question is unclear - I don't have a shared common directory that is accessible to all projects - I tend to do /home/project1, /home/project2 and have the permissions locked to the projects home folder.
 
@Danack Yeh but everything is under /home
It's not like you put some random projects in /home and some in /usr/share for shits and giggles
 
^ that
 
well, everything is under / as far as that goes
 
Yes, they just can't access /home.
 
2:36 PM
@FlorianMargaine there's some overhead, sure; basically, using array indices will not be faster than just calling ->item($x).
 
@PaulCrovella true story
 
Basically I am thinking about "cropping" paths of cached scripts where possible
@PaulCrovella Mind blown :P
 
That said, surely you won't iterate a DOMNodeList using a simple for loop, right?
 
@Ja͢ck I mean, I've heard many times here than a very slow thing in php is the function call overhead
and that calling item() internally would double that overhead
 
It won't double it.
Because doing [0] is not the same as ->item(0) twice.
 
2:40 PM
if that is so, then indeed it is best to go your way
less code to maintain = all the best
 
Btw, I think the node list is also used for attributes.
which might explain the three different ways of finding things.
 
@FlorianMargaine it's not that slow
 
dom_nodelist_item is used for attributes?
 
I think so
 
I am covered in red dots. What a strange morning.
 
2:42 PM
Trying it now.
 
@LeviMorrison chicken-pox?
 
SWAT team?
 
RFC: should a projects repo also track said proejcts ./tests/* in the same branch(es) as the application?
 
Yes
 
almost always, yes
 
2:45 PM
@FlorianMargaine Oh `DomElement::attributes` can be dereferenced as an array .. however, doing so causes `
Warning: var_dump(): Not yet implemented in ...`
But it yields the object anyway.
 
\o/ ... almost there
 
I guess support should be properly added for them too...
 
hmm, i'm actually not sure what's not implemented yet ... I can do $anchor->attributes[0]->name :D
 
you can add the handler where the class is initialized
lol
 
2:47 PM
Perhaps it's DOMAttr::__debugInfo() ?
 
How worth it is it moving from SVN to git?
 
There are so many things not implemented, I can't be sure.
 
@Fabien not much
@Ja͢ck you're getting into weird territory...
 
@DaveRandom <rant><status>Angry</status> ERMEHGERD</rant>
 
I can't help you right now :(
 
2:48 PM
@FlorianMargaine How come?
 
Yes, I support mixed content; deal with it.
 
@Fabien because it requires a lot of changes, and the benefits are not so great. SVN works very well.
 
@Fabien That really depends on how much SVN dependent code / tools you have right now
 
@PaulCrovella Would you track the test code in a separate branch, or have a special commit msg for test case changes?
 
We've only used SVN.
 
2:49 PM
@PaulCrovella *see last response
 
@Fabien also, is one of you really used to git?
 
I'm fairly comfortable in git.
Use tortoise SVN for svn
I'm the only developer.
The CEO does the odd tweak but he's not a developer. He has no real git experience.
 
honestly... don't bother
 
And if you or other developers really like git, use git as an SVN client :P
 
@Pheagey I would never use a separate branch. I may use a submodule if a test suite applied to multiple projects, like github.com/html5lib/html5lib-tests (which is used by various html5 parsers in different languages)
 
2:52 PM
git svn is pretty cool; you can work with Git while the rest still works with SVN :)
Once you feel everybody can move over, well, you already have the Git repo :D
 
Everybody is just me basically :P
We rebuild a lot of our applications. I could start new builds in Git and retain the svn repo for a long while.
But realistically I am wondering whether it's worth it. As @FlorianMargaine says might be more bother than really worth.
 
you got better things to do honestly... svn is a fine tool
git is better, yes, but it requires more developers training (new devs too)
however, it won't give you a big productivity boost...
 
@PaulCrovella So your test case history is embedded with your code commits?
 
business-speaking, there's no reason...
 
@Pheagey Yes.
 
2:56 PM
now if it's a new project and you want to use git, sure, go for it if you have no time to spend on migrating old stuff
 
@Pheagey Your tests are (imo) part of your project
 
@FlorianMargaine are there many providers that support SVN for repo hosting?
 
just make sure to admit defeat and revert to svn quickly if you think it's not working out greatly
@Ja͢ck I assume he has internal hosting
also, I know a couple of them yes...
 
@PaulCrovella valid
@PeeHaa both valid.
 
assembla comes to mind
 
2:57 PM
Was mixed about if I should keep the tests abstracted or integrated.
 
@FlorianMargaine For my company, we outsource the repo ;-)
But I agree about the training though .. it's not very straightforward.
 
@PeeHaa well. I had it distributed over various /home dirs previously. Then I changed it and now everything new is in some static /webserver/domain.tld/subdomain/@/ directory (or domain.tld/*/). But the /home dirs still persist because too many hardcoded paths :-/
 
That said, the local branching model did come in handy on many occasions :D
 
@bwoebi hehe tnx
 
@FlorianMargaine Cool thanks. Probably will for new stuff and eventually move old over when there's time but not in the near future. We plan on hiring more devs but they're hard to find. A dev who prefers cli over browser is apparently not easy to find. :P
php dev*
 
2:59 PM
@Pheagey Keep them integrated. Your "project" is your code and things like tests, documentation, etc. that apply to it. A project is not just an application in isolation.
 

« first day (1454 days earlier)      last day (3510 days later) »