IRC Logs for #circuits Tuesday, 2013-01-08

*** irclogger_ has joined #circuits03:35
*** Osso has joined #circuits04:19
*** Osso has quit IRC05:54
*** Osso has joined #circuits06:17
*** qwebirc173 has joined #circuits10:12
*** Osso_ has joined #circuits10:43
*** Osso has quit IRC10:54
*** qwebirc89556 has joined #circuits14:27
*** qwebirc25899 has joined #circuits14:48
*** qwebirc94476 has joined #circuits14:53
qwebirc94476my name didn't get untaken when I lost my connection. How strange.14:54
*** qwebirc3049 has joined #circuits14:57
*** qwebirc58686 has joined #circuits15:00
qwebirc58686Had hoped it would autologin for me now.15:00
*** marky1991 has joined #circuits15:08
*** marky1991 has quit IRC15:14
*** marky1991 has joined #circuits15:14
*** marky1991 has quit IRC15:19
*** marky1991 has joined #circuits15:20
*** marky1991 has quit IRC15:20
*** marky1991 has joined #circuits15:20
*** marky1991 has joined #circuits15:23
qwebirc58686marky1991: Test15:24
qwebirc58686marky1991:  Test 2.15:25
*** qwebirc91241 has joined #circuits15:28
qwebirc91241marky1991: hELLO.15:28
*** qwebirc58686 has quit IRC15:29
*** marky1991_2 has joined #circuits15:30
*** marky1991 has quit IRC15:31
prologicwhat's going on?15:36
marky1991oh, hey15:40
marky1991I was figuring out an IRC lcient15:40
marky1991To replace the old __tick__ method, I made a new poller that did the code that I needed to be done in its _generate_events method. Is this the right way to do it?15:42
prologicwell yes it is15:43
prologicbut what poller did you have to write?15:43
prologicI'm confused as to why you had to do anything at all :)15:43
marky1991On windows, to do async IO, you make a read/write request, and then periodically check to see if it's done yet15:44
marky1991I have to keep calling the check_if_its_done yet method15:45
prologicthis is for the Windows File component?15:46
prologicsorry I was confused15:46
prologicall the irc examples work fine afaik :)15:46
marky1991oh no, I was figuring out the irc program I use to access this channel15:46
prologicI've marked the Windows Unit Tests story as being worked on by you btw15:46
marky1991as far as i remember, the irc rtests pass : )15:47
prologicare you interested in joining our pivotal tracker project?15:47
marky1991I think it'd be fun15:47
prologichopefully you'll keep us in check with Windows compatibility :)15:48
marky1991if nothing else, i want to make it work so I can get back to the original project i started on15:48
prologicthrow me your email addy (/query pro logic)15:48
prologicand I'll add you to the project15:48
prologicyeah I can understand15:48
prologicand I want to help you :)15:48
prologicI just (unfortunately) am not a Windows dev15:48
marky1991did that work?15:48
prologicand probably never will be15:48
marky1991Seriously new to irc, if you can't tell15:48
prologicyup :)15:49
prologicagh IRC is great :)15:49
prologicbeen around since about 1993 or so15:49
prologicstill alive and kick'n :)15:49
marky1991I'm not <i>really</i> a windows dev (I have no experience with the windows API), but I'm willing to read the windows docs until I figure it out15:50
prologicfollow the email sturctions, etc15:51
prologicand when you login15:51
prologictake that Windows Unit Tests story15:51
marky1991so , back to my question: How should I register the poller with the file object?15:51
marky1991i saw the on_registered command for the original file object15:51
marky1991i don't understand what's going on in the else cluase though15:52
prologicwell I honestly think you should create a WindowsFile component15:52
prologicmaybe subclassing File ?15:52
marky1991that's what i'm trying to do15:52
prologicor refactor it out to a base component15:52
prologicand override the original (UNIX) File to not use the standard pollers15:52
prologicand instead use yours15:52
prologicrefactoring the base functionality would be good15:53
marky1991I was going to just refdifine file if the platform was windows to my windowsFile15:53
prologicand just make File an alias to WindowsFile15:53
prologicor something nice15:53
marky1991that sounds exactly right to me15:53
marky1991but how do i modify the on_registered method to refer to my WindowsPoller?15:54
prologicsorry what don't you understand?15:54
marky1991i just don't understand what the code is doing after the first else clause15:54
prologicno you want to copletely override the registered handler there15:55
prologicthat looks for a poller15:55
prologicbut you don't want that on Windows15:55
marky1991so, just set self._poller to WindowsPoller()?15:55
prologicI assume you have to periodically call windows apis to poll the file?15:55
prologicand can't use select?15:55
marky1991yes, that's exactly what I need tpo do15:55
marky1991that was the problem that made me do this in the first place15:55
prologicmainly because you can't set a file descriptor into async mode on windows afaik15:55
marky1991windows doesn't support using select with files15:56
marky1991Yes you can15:56
marky1991you have to open it usign the windows API though15:56
marky1991that's handled already15:56
prologicself._poller means nothing15:56
prologicit's just a reference - not sure what I use it for15:56
prologicthe point is you don't want to register any of the select/poll/epoll/kqueue pollers at all15:56
prologicyou want to completely have your own polling component15:56
prologicdoes this make sense?15:57
prologicso you're WindowsFile component15:57
prologicshould have it's own generate_events handler15:57
prologicwhere you do the polling of the file15:57
marky1991it shoudl15:57
marky1991that makes it much simpler15:57
prologicof course :)15:57
marky1991i cna just throw out the special poller completely then15:57
prologicwe try to make things simple15:57
marky1991okay, great15:57
prologicGenerateEvents is fired periodically throughout the system15:57
marky1991so generate_events is roughly the same as tick15:57
prologicto ask any components if they wish to produce events15:58
marky1991rtight, that's what i saw in the code15:58
marky1991okay, great15:58
prologicgenerate_events is exactly the same as the old ticks15:58
prologicjust better15:58
marky1991i might have some tests passing tonight then15:58
prologicand we unified the whole concept into one thing15:58
prologicevent handlers15:58
marky1991what did it do percviously?15:58
prologicsweet :)15:58
prologicyes don't call your thing a poller at all15:59
prologicjust do it in a generate_events handler15:59
prologicreason being is I don't really see it as a general purpose poller15:59
prologicit's rather specific to windows async file i/O only15:59
marky1991exactl right15:59
prologicselect obviously is still the poller to use on windows for sockets15:59
marky1991the design was actually pretty ugly15:59
marky1991there was all sorts of shared things15:59
prologictry to share nothing15:59
prologicthat's the circuits/components way16:00
prologicthings should be done via message passing16:00
marky1991okoie doke16:00
prologicaka events16:00
marky1991be back soonish16:00
marky1991oh wait16:01
marky1991one last question16:01
marky1991int he generate events method, what is the event parameter?16:01
marky1991what event is that?16:01
*** qwebirc91241 has quit IRC16:03
prologicgenerate_events handler16:31
prologichandler :)16:31
prologicthat is actually a part of the circuits core16:31
prologicevery handler is capable of receiving the event object that was responsible16:31
prologicit is quite literally the GenerateEvents event in this case16:32
prologicdef _on_read(self, event, *args, **kwargs):16:32
prologic   ...16:32
prologicevent would also be a Read event object16:32
marky1991oh, that was obvious. Stupid question16:47
marky1991PS: First writing test passed16:47
prologicnice work :)16:50
prologicyou're trying to keep the same API right?16:50
prologicand keeping the tests more or less the same?16:50
*** marky1991 has joined #circuits17:06
*** marky1991 has quit IRC17:45
*** marky1991 has joined #circuits17:45
*** marky1991 has quit IRC18:19
*** marky1991 has joined #circuits18:20
*** marky1991 has quit IRC19:37

Generated by 2.11.0 by Marius Gedminas - find it at!