IRC Logs for #circuits-dev Tuesday, 2013-01-22

*** marky1991 has quit IRC00:12
*** marky1991 has joined #circuits-dev00:12
*** Osso has joined #circuits-dev00:33
prologicOsso, marky1991 hey guys00:36
marky1991hrey00:36
Ossobb soon00:41
Ossogoing to work00:41
*** Osso has quit IRC00:41
*** Osso has joined #circuits-dev00:42
*** Ossoleil has joined #circuits-dev01:05
Ossoleilprologic: yes it should take into account subcomponents01:24
Ossoleil(talking about .handles())01:24
*** Osso has quit IRC01:42
*** Osso_ has joined #circuits-dev01:56
mehereYou'd also have to decide whether handlers() returns only the "structural" handlers (it's currently a class method) or the current handler "state" which includes the handlers added with component.addHandler() at run time.02:30
*** marky1991 has quit IRC02:30
*** Ossoleil has joined #circuits-dev02:37
prologicOsso: I agree - I'll improve it tonight03:43
prologicmehere, this is a good point03:44
prologicbut one of which I'm unsure on03:44
prologicon one hand03:44
prologic.addHandler(...) call on a component will in fact bind a new method to that component03:45
prologicso in theory you should get any dynamically added handlers as well03:45
prologicI will have to write more unit tests to confirm03:45
*** Osso has joined #circuits-dev04:03
*** Ossoleil has joined #circuits-dev04:25
prologicOsso, check it out04:52
prologictests/core/test_interface_query.py04:52
prologic>>> File.handlers()04:53
prologic['close', 'init', 'seek', 'write']04:53
prologic>>>04:53
prologiccool04:53
prologic>>> from circuits.web import Server04:53
prologic>>> Server.handlers()04:53
prologic[]04:53
prologicas you'd expect :)04:53
prologic>>> from circuits.net.sockets import TCPServer04:54
prologic>>> TCPServer.handlers()04:54
prologic['broadcast', 'close', 'parse_bind_parameter', 'write']04:54
prologic>>>04:54
prologichmm04:54
Ossoleilindeed it works04:54
prologicparse_bind_parameter is an event handler?04:54
prologicoookay :)04:54
prologicproly shouldn't be right?04:54
Ossoleilindeed04:55
prologicwhile fixing ipv6 issues on a broken ipv6 network on osx today04:55
prologicI also discovered some issues with udp and bad file descriptor errors04:55
prologicweren't causing any real problems per say04:56
prologicbut probably should look into that04:56
Ossoleilwe don't have a "not a handler"04:56
Ossoleildecorator04:56
prologicoh but we do04:57
prologic@handler(False)04:57
prologic>>> from circuits.net.sockets import TCPServer05:05
prologic>>> TCPServer.handlers()05:05
prologic['prepare_unregister_complete', 'read_value_changed', 'registered', 'started', 'stopped', 'unregister', 'close', 'write']05:05
prologic>>>05:05
prologicthat's better?05:05
*** Osso has quit IRC05:08
prologicOsso, ping?05:14
Ossocertinaly05:15
prologic>>> from circuits.net.sockets import TCPClient, TCPServer05:15
prologic>>> TCPClient.handlers()05:15
prologic['read_value_changed', 'registered', 'started', 'stopped', 'unregister', 'close', 'connect', 'write']05:15
prologic>>> TCPServer.handlers()05:15
prologic['read_value_changed', 'registered', 'started', 'stopped', 'unregister', 'close', 'write']05:15
prologic>>>05:15
prologicsome modifications to circuits.net.sockets05:15
prologicand circuits.core.components05:15
prologicmaking PrepareUnregister a private event05:15
prologicI do have a few concerns though05:16
prologicit hardly makes any sense to say that TCPServer's interface includes a "register" event handler05:17
prologicit doesn't exactly comply with a tcp server's behavior05:17
prologicit's more for setup of the component05:17
prologicthis is potentially common05:17
prologicI would expect:05:18
prologicTCPServer.handlers()05:18
prologic["close", "write"]05:18
prologicand05:18
prologicTCPClient.handlers()05:18
prologic["close", "connect", "write"]05:18
prologicam I making sense?05:19
Ossono :D05:19
prologicrats :)05:19
Ossowe register the poller there05:19
OssoI think that makes more sense05:19
prologicof course05:19
Ossosince we do stuff it should be there in the handlers05:19
prologichowever it doesn't make up the behavior of a tcp server specifically05:19
prologicit aids in it's setup05:19
prologicok05:20
prologicwell if that's the stance you take05:20
prologicI can agree :)05:20
prologicit just seems more private api05:20
prologicthan public api05:20
prologicif that makes sense? :P05:20
Ossoyes it does05:20
prologicleave it like this for now?05:20
prologicall tests pass too05:20
Ossoyep I think so05:21
prologica side affect05:21
OssoI am not sure it's so useful05:21
prologicDebugger.handlers()05:21
prologicwhat's not so useful?05:21
Ossoto have some hidden handlers for a private api05:21
prologicis .handles(*names) more useful?05:21
prologicbeing able to ask whether a component respond to the given named events in *names ?05:22
prologicoh05:22
prologicwell we do have a very few (mind you) private handlers05:22
prologicspecifically _read and _write in the pollers05:22
prologicconvention of course05:22
Ossoyes, your use case would be checking05:23
Ossofor the api of some component05:24
prologicyeap05:24
prologicwell .handles(*names)05:24
prologicrelies on .handlers()05:24
prologicso I'm happy with it for now05:24
prologicit works so we'll see how useful it really is05:24
prologicI've put in a circuits-2.1.0 release story in for the end of this sprint (17th Feb)05:26
prologicwe okay with that?05:26
Ossoyeah it's good to have the new changes in05:27
prologicyeap05:27
OssoI did not touch the generate event05:27
prologicagreed05:27
Ossowe had a race condition there05:28
Ossowas it fixed ?05:28
prologicwe don't have anything much left in the backlog or current05:28
prologicso we'll finish what we've got05:28
prologicand work on updating docs, changes, release notes, etc05:28
prologicI've added all the tasks to the release story I think we need to complete before release05:28
prologicI believe mehere fixed all the generate_events stuff05:28
Ossook cool05:28
prologiche's done a wonderful job of that (again!) :)05:28
prologiceven optimizations of 10-20% or so05:29
prologicwhat have you found with your memory leaks story?05:29
prologicI've been toying around with this too05:29
prologicand haven't found any conclusive problems with the core or web05:29
OssoI haven't progressed there05:30
prologicyou've seen some of the code I've been mucking around with?05:30
prologicand comments, etc?05:30
prologicI'm nowhere with it either05:31
prologicI cannot conclusively say circuits suffers or does not suffer from memory leaks05:31
Ossoit's quite impossible to be sure a 100%05:32
Ossono I haven't seen the code05:32
prologicit's in the top level05:34
prologictest_memory_leaks.py05:34
Ossook05:44
OssoI'll have to try while firing more events05:45
prologictime to feed my girl06:16
prologicg'night06:16
Ossogn06:18
mehereOsso?08:09
Osso< here08:09
mehereAre the test still working for you?08:09
mehereThey stopped starting up after I pulled in prologic's last 8 changes08:10
mehereIs this my personal problem?08:10
*** pl_test has joined #circuits-dev08:10
mehere"Stopped starting up" means I don't get any output...08:10
pl_testsweet08:10
pl_testtotally works08:10
pl_testpushed08:10
pl_testand in examples/08:10
pl_testcheck it out08:11
pl_testcirc.py08:11
prologicmehere, tests are all passing here08:11
mehereOK. I'll check what going wrong. I start it from within Eclipse maybe that's the cause.08:12
mehereBut until now it never showed problems...08:12
prologicLInux 2.6.6, OSX 2.7.308:12
prologicodd08:12
prologicI didn't really change too much08:12
prologicjust a bunch of ipv6 fixes08:12
prologicand a few other minor trivial changes08:12
pl_testloving this examples I revivedbackspacebackspacebackspace08:13
prologicooops :)08:13
prologicsome of hte ui could do with some polishing :)08:13
prologicI'm amazed I got it working at all08:13
mehereOK, works from the command line, must be something with with Eclipse.08:16
*** pl_test has quit IRC08:18
prologicrude08:22
prologicI lost connectivity to my server in the US for a few mins08:22
prologichey you two08:24
prologichttp://codepad.org/PsR7RMNt08:24
prologicis this a good example to add to examples/web/ ?08:24
prologicreally demonstrates yielding and waiting in an event handler08:24
prologicwhich handles concurrency really well08:24
mehereIt's an example that you have to do cooperative multitasking when using circuits.08:31
prologicso good to add that in?08:31
prologicit was a question posed to #python a few weeks ago08:31
prologicI sought it as a challenge08:31
prologichow to write such a simple web app that did someo async thing with a file08:31
Ossoups sorry mehere I got distracted08:33
OssoI have 2 failed tests here08:34
Ossotests/io/test_process.py:21: AssertionError08:34
Osso_08:34
Ossoand tests/node/test_node.py:59: AssertionError08:34
prologicwhat's your enviornment?08:35
prologicand you're at tip right?08:35
prologicodd08:36
prologicI didn't touch anything to do with those08:36
prologicbut everything passes here on Linux and OSX08:36
OssoI am at tip08:46
Ossomac os08:46
Osso10.808:46
prologichttps://www.pivotaltracker.com/story/show/40071339 - Multi App WSGI Gateway09:18
prologicI believe I have an implementation for this09:18
prologicOsso, system python or compiled from source?09:19
prologicI'm using brew on my macbook air09:19
Ossocompiled with macports09:21
prologicahh k09:22
prologicwell idk then :/09:22
mehereWas a personal problem with Eclipse, tests are working here.10:51
mehereOsso, your failing test cases are both related to inter process communication. As I cannot reproduce them here (Linux) I cannot analyse them, must be something special with OSX.10:54
*** Osso has joined #circuits-dev11:17
mehereLooked a bit at test_process.py after all. I think the test case isn't OK. There is no guarantee that the Stopped event is fired before the Read event with "Hello World!". Could you retry with a sleep(0.1) before checking p.stdout.getValue().11:54
*** Osso has quit IRC12:18
*** Osso has joined #circuits-dev14:51
*** Osso has quit IRC15:45
*** Osso has joined #circuits-dev15:48
prologicmehere, funny as I can't reproduce Osso's issue with that test on any of my systems including OSX16:14
prologicbut you could be right16:14
*** marky1991 has joined #circuits-dev16:22
marky1991hmm. I feel useless. I can't figure out where the heck remote is connecting to the server in test_logger16:25
marky1991I've grepped everyhting and added print statements everywhere, but as far as I can tell, no connect calls are being made16:25
marky1991but the accept call in sockets.Server._accept returns a socket16:26
marky1991and I can't figure out where that socket connected from16:26
*** Osso has quit IRC16:48
prologicmarky1991, are you sure?17:52
prologic:)17:52
prologicSample output: http://codepad.org/mJilOPwL17:55
prologicModified test (adding Debugger): http://codepad.org/HyWBslCd17:55
marky1991ah, i forgot the debugger. So stupid17:59
marky1991i'll look at that17:59
prologic:)18:00
marky1991hmm.18:03
marky1991How is there a read  before there is a connect?18:04
marky1991that doesn't really matter here though18:04
marky1991would you happen to know where that client socket is created at?18:05
marky1991I'm seeing the accept call and I've put print statements before every single socket.connect call, but I'm getting the accept but no connect calls made18:07
marky1991obviously, there must be a connnect call somewhere18:07
marky1991but me and grep aren't finding it.18:07
prologicthere is a _read before the connect18:07
prologicthat's the poller _read event18:07
prologicto say the socket has data to be read18:07
prologicahh18:08
prologicno18:08
prologicthis test uses urllib's urlopen18:08
prologicI'm pretty sure18:08
prologicyou're barking up the wrong tree so to speak :)18:08
marky1991oooh, is urlopen the one creating the client socket?18:09
prologicurllib.urlopen in this case is the client18:09
prologiccorrect18:09
marky1991aaahhhh18:09
prologicwe use it a lot in the web tests18:09
prologicthere are only a few tests that use the circuits.web.client client18:09
prologicobviously to test the client itself :)18:10
marky1991I see now.18:10
prologicwe have an async http client component as well18:10
marky1991Now to figure out whjy urlopen usres the wrong addess18:10
marky1991but now I know where to look18:10
prologic:)18:10
marky1991thanks18:10
prologic:)18:10
prologicsorry!18:10
marky1991no, it's obvious when i think about it now18:10
prologicif I had realized what you were trying to look for and why18:10
prologicI'd have just said so :)18:10
prologiceverything is already obvious after the fact :)18:10
prologicexperience is learned not taught!18:11
marky1991alright, off to go fix this now.18:11
marky1991bye for now18:11
*** marky1991 has quit IRC18:11
prologicmehere, ping?18:23
prologicDo you guys get/read the comments I post on stories in pt?19:23
jgiorgiprologic: what specifically is preventing 3.x compatibility, i might need to make use of some 3.x features19:41
prologicspecifically nothing19:44
prologictime/effort19:44
prologicwe have Mark Young working on it19:45
prologicas well as Windows compatibility19:45
prologicbut I think he's more focused on Python 3 compatibility19:45
prologicsomeone remind me to create a story for that19:45
prologicand get Mark to take it up19:45
jgiorgialright i'll take a look at his work and see if i can help19:45
jgiorgibetter handling of binary strings might be worth the effort19:45
prologicyeah I'm not sure where his branch is though19:45
prologicI'll ask19:46
prologicwell19:46
prologicif you'd like to put the effort in too19:46
prologicthat would be mighty handy19:46
prologicI do have Python 3.3 here19:46
prologicso I can help as well19:46
prologicwe might be able to sqeeze it in before 2.1.019:46
prologic17th Feb we have that scheduled in for19:46
jgiorgii have 3 deadlines on feb 28th so not sure about that19:47
prologicwe can achieve it :)19:48
prologicit's not impossiblly hard19:48
jgiorgivery true19:49
jgiorgiatm im trying to shave some memory load with numpy, hopefully that will be enough19:49
prologicok19:49
prologicI'll write up a story for this19:53
prologicand we shall support Python 3.1 3.2 and 3.319:53
prologicbut not 3.019:53
prologicit's end of life19:53
jgiorgiand it sucked20:02
jgiorgimajorly20:02
prologick20:03
prologicI'm building crux ports for python 3.1 3.2 and 3.320:03
prologicI should have them installed here and up and running soon20:03
jgiorgicool, i think the repos have 3.2 for me20:04
jgiorgiseems that's going to have to be it, numpy just wont work20:04
jgiorgii really wish there was an integer data type that adjusted it's memory footprint based on it's value20:05
prologicthere isn't20:05
prologicnot in any language20:05
jgiorgii know :(20:06
prologicnot even assembly20:06
jgiorgieven if i had to specify the length in bits, or even bytes i'd be happy20:06
jgiorgibut even numpy can only drop to 16 bits and then i have to do a lot of conversions and manual editing20:06
jgiorgisaving memory at the cost of processing makes little sense20:07
jgiorgibtw, i have 3.2.3, i'll grab a copy of 3.3 later20:09
jgiorgi... in theory a variable in C can be any length in full bytes, i could write a datatype with a specifiable size in bytes, if the size needed to be changed you could just create a new object20:15
prologicwhy are you trying to asve on memory anyway?20:29
prologicram is cheap20:29
prologiccan't you use python's struct library?20:30
*** marky1991 has joined #circuits-dev22:23
marky1991oops.22:27
marky1991Wrote what I meant to write in here in the regular circuits channel.22:27
marky1991Solved the problem, I think, in any case.22:27
marky1991now to remove about 100 print statements from the stdlib22:27

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!