IRC Logs for #circuits Sunday, 2013-04-14

prologicholy crap00:56
prologicI'm not reading all that :)00:56
prologicsomeone gimme the couple of line summary?00:56
prologic<ronny> prologic, btw, do you have a protocol that feeds lines till an empty line arrives, then switches to raw data? <-- we implement a line protocol which does the first bit, but not the 2nd although at that point you could just listen to read events01:05
*** ronny has joined #circuits06:43
spaceoneprologic: the sentence only refers to my own _on_read implementation and only for the headers08:17
prologicyeah spaceone, ronny08:27
prologicI've read most of what you guys were talking about last night (for me)08:27
prologicI'm sorry but I can't see any sense in rewriting the parser yet again08:27
prologicand dropping http-parser08:28
prologicwhich is a perfectly good parser ihmo08:28
ronnysame here :)08:28
prologicstill happy to continue to "improve" the circuits.web codebase08:28
prologicin terms of tidying things up08:28
prologicmaking APIs more clear08:28
prologicbut to throw entire codebases away saying it's "bullshit"08:28
prologicis just not good enough for me08:28
prologicspaceone, I realize you're only learning08:28
prologicbut I've been doing this for 15 years now08:29
prologicI know when not to rewrite a http parser if I dno't have to08:29
spaceonecurrently circuits.web does things twice... it has two buffers (on in Server, oner in HTTPParser)08:38
prologiclike I said08:38
prologiccleanup :)08:39
prologicnot rewrite08:39
spaceonei did not rewrite08:39
prologicI think there are some internals that aren't being used anymore08:39
spaceonethere are conditions which can't be true08:39
prologicfrom what it looked like from my persepctive08:39
prologicyou claimed to have rewritten the HTTP parser?08:39
spaceonewhat i did:08:39
spaceonei fixed some bugs from http-parser and moved the parsing in the mapping i created08:40
spaceonewe encapsulate in circuits.web http into the wrappers.*08:41
spaceonei am now doing this in direct way08:42
spaceonealso i don't use enums08:42
spaceonei think doing wsgi stuff belongs in a layer above, so i did not care about bringing http into wsgi format in the parser08:43
spaceoneprologic: my implementation allows:08:45
spaceoner = Request()08:45
spaceoner.parse('GET / HTTP/1.1')08:46
spaceoner = Response()08:46
spaceoner.parse('HTTP/1.1 200 OK')08:46
spaceoneprologic: in http-parser you MUST do the whole parsing process of a message08:47
spaceoneh = Headers()08:47
spaceoneh.parse_one('Foo: Bar')08:47
spaceoneallows ISO8859-108:56
spaceoneronny: ^^08:57
spaceoneand: the http-parser has things like should_keep_alive, is_upgrade, this does not belong into a parser, it belongs into a interpreter(something which knows how to handle http)08:59
spaceoneand it has unpythonic methods called 'get_foo'09:00
spaceoneprologic: did you read?09:03
ronnydoes that matter?09:03
spaceoneit is *incorrect*09:06
spaceoneif you think the MUST things of an RFC are no MUSTs it does not matter09:06
ronnynote that there are broken clients and servers one needs to handle09:07
spaceonejeah, but not broken in that way09:07
spaceonebroken means RFC 2616 section 19.309:08
ronnyspaceone, so clients are only broken in the way mentioned in the rfc?09:22
spaceoneronny: of course not, clients would not be broken if the authors would have read the rfc09:23
spaceoneronny: but clients are not that broken so that every arbitary input is allowed09:23
spaceonethese clients are called 'hacker'09:23
spaceonea borken client would not send a r09:24
prologicspaceone, and does your changes pass all tests?09:31
prologicthere will be any number of edge cases in rewriting major parts of any system/library/framework09:32
prologicthis is the problem I have - large changes == large no. of edge cases and bugs09:32
spaceoneprologic: hrhr, i am not finish yet, and i am currently not compatible09:32
spaceoneprologic: i unserstand, and i am fully ok if you say: No i don't want the changes , i am happy with current09:32
spaceoneprologic: another thing the http-parser does not handle: if the compressed body is broken it will raise, this will cause that the buffer for request body will exists in memory until the server is stopped09:39
ronnyspaceone, did you report a bug on that one?09:58
spaceoneronny: currently not, i am waiting until i pass a whole list of bugs10:31
prologicI'm really uncomfortable with large changes to circuits10:36
prologicwe already underwent "huge" changes to replace the http, multipart, querystring parsers in circuits.web10:37
spaceoneas i said... i am ok with not doing it10:37
spaceonei have my fork for my own10:37
prologicas I said, I'm not against improvements10:37
prologicbut changing too much all at once has bad consequences10:38
spaceoneyes, bad consequences for an working and existing framework10:38
prologicwe'll just have to find ways to incorporate your improvements incrementally10:38
prologicwriting new tests as we go along10:38
prologicand ensuring existing tests continue to pass10:38
prologicremember that circuits is tested against 2.6, 2.7, 3.2, 3.2, pypy on Windows, Linux, BSD and OS X10:39
prologicand not by hand, but via py.test and tox and shingingpanda CI10:39
prologicit's very well teste10:40
spaceonebtw: is this line valid in python2.6? 'while len(lines) and lines[0].startswith((" ", "\t")):'10:41
spaceoneotherwise the http parser will fail on py2.610:41
prologicshould be10:45
prologicyou don't have py26 to test with?10:45
spaceoneit is not in my repos10:45
spaceoneokay, it works wtih 2.610:46
ronnylines is a list?11:07
ronnycan you link the code again please?11:07
ronnyi think it can be made faster :)11:08
spaceoneronny: the parser always does b''.join(list_with_one_element); buf = [foo]11:28
spaceonei am now in the train drivin at home11:29
spaceones/now/in a few minutes11:29
spaceonere in 2 hrs11:29
spaceoneronny: how would you do it faster? stripping len() ?11:30
ronnyspaceone, that for one11:35
ronnymatbe more11:35
*** Osso has joined #circuits12:45
*** Osso has quit IRC13:50
*** Osso has joined #circuits14:47
*** Osso has quit IRC15:59
spaceoneronny: FYI:
*** ronny has quit IRC23:06

Generated by 2.11.0 by Marius Gedminas - find it at!