IRC Logs for #circuits Friday, 2014-02-28

*** irclogger_ has joined #circuits13:23
qwebirc15491so when i close from the client side13:23
prologicRomster, yeah I'm going fix it's reconnection issue soon13:24
qwebirc15491it looks like the server is firing a read event13:24
prologicstill testing the patch out13:24
qwebirc15491and then an error13:24
prologiccorrect it does13:24
prologicit should fire a _read event13:24
prologicand then realize the client disconnected13:24
prologic_read is the internal/priate poller I/O event13:25
prologicnot an actual read event with data13:25
prologicthis may all behave slightly different for you on Windows13:25
prologicI get no error here13:25
prologicjust a _read13:25
prologicand disconnected13:25
qwebirc15491hmm13:25
qwebirc15491here, let me paste13:25
qwebirc15491<Read[server._read] (<socket.socket object, fd=556, family=2, type=1, proto=0> )>13:25
qwebirc15491<Error[*.error] (<class 'OverflowError'>, OverflowError('no printf formatter to display the socket descriptor in decimal',)13:26
prologic<_read[server] (<socket._socketobject object at 0x2764050> )>13:26
prologic<disconnect[server] (<socket._socketobject object at 0x2764050> )>13:26
prologicsorry disconnect13:26
Romsterall your stuff needs watchdog timers13:26
prologicwow13:26
prologicwhat a weird error13:26
prologicin any case13:26
qwebirc15491it continues on with the file and line number within the framework if you want13:26
Romsterand a way to handle ghosting nicks on irc.13:26
prologicdid the client connection close okay?13:26
Romsterand possibility of reconnecting on two sides of a netsplit13:27
prologicqwebirc15491, that's jut the Debugger output13:27
prologicof the error event13:27
prologicno big deal13:27
prologicRomster, first I'll deal with reconenction after a lost connection - easy - have it solved for ircnotifier13:27
prologicI'll deal with solving netsplits later13:28
prologicby way of adding/managing a list of servers the bot knows about13:28
prologicand cycle through each on various conditions13:28
Romsterya13:28
prologicprobably tackle the first and most obvious13:29
prologicif in reconnecting we get an error whislt connecting13:29
prologicwe cycle to the next server13:29
prologicuntil we succeed13:29
Romstera good programmer always checks for errors and not leave any ways for a program to throw a unhanded exception13:29
prologicthe next part - detecting netsplits would be much harder13:29
prologicRomster, not in the case of circuits13:29
prologicthere are some exceptions/errors that do and can happen13:30
prologicthat are quite normal13:30
Romsteror not allowing the bot to reconnect more than once.13:30
prologicand you can safely ignore them13:30
prologicthat's why circuits handles all exceptions13:30
prologicand silently logs them and keeps going13:30
qwebirc15491it looks like the client fires a close, disconnect, and then another close13:30
Romsteras long as they are not fatal yeah.13:30
prologicnot really possible to connect twice13:30
qwebirc15491and then hangs13:30
prologica TCPClient instance is like a session13:31
prologicyou'd have to spin up a 2nd instnace to get a 2nd connection13:31
prologicTCPClient doesn't support multiple seessions/connections13:31
Romstercan't act as a session object and have multiples?13:31
prologicqwebirc15491, sounds about right13:31
prologicit won't hand per say13:31
prologicit *should* then idle13:31
prologicwith nothing left to do13:32
prologicat that point you'd want your code do so:13:32
prologicraise SystemExit(0)13:32
prologicor self.stop()13:32
prologicor similar13:32
prologicRomster, could13:32
prologicbut at this stage it might break API compatibility13:32
prologicmight end up writing a new multi-session client component in circuits.net.sockets at some point13:32
prologicprobably to support use caes like13:33
prologicweb crawling13:33
prologicconcurrently13:33
prologici.e: web crawl thousands of links at once simultaneously13:33
qwebirc15491okay, so i just have a close handler that calls self.stop()13:34
qwebirc15491and that seems to work. awesome!13:34
Romsterwell i wanna use your spider on versionsort.com and in a docker container. with circuits and my python apps for the version sorting i have now.13:34
prologicqwebirc15491, great :)13:34
Romsteranyways chat with qwebirc15491 i'm making it too hard for prologic.13:34
prologicyou're (to be honest) the first I think taht's "gotteN" circuits13:35
prologicand how it's meant to work13:35
prologiccongrats :)13:35
prologicRomster, http://shortcircuit.net.au/~prologic/blog/article/2014/02/28/mqtt-python-pluggable-notifications-mqttwarn/13:36
qwebirc15491yeah, the metaprogramming was kind of hard to wrap my head around, but i'm having a lot of fun with this project :)13:38
prologicwell the metaprogramming is quite minimal13:39
prologicbut should really be ignored13:39
prologicit's what gives circuits it's elegance13:39
prologicwithout it, it would be lots of boilerplate crap13:39
prologichorrible setups13:39
prologiccallbacks, errbacks13:39
qwebirc15491yeah, totally worth it, just never have done anything similar13:40
prologicand all sorts of unmaintainable spagetti code13:40
prologicwe provide BaseComponent for those whiners :)13:40
prologicthat like to be more explicit13:40
prologicbut honestly I tend to use Component most of the time anyway13:40
prologicas after a while you get sick of writing13:40
prologic@handler("blah")13:40
prologicdef _on_blah(...):13:41
prologic   ... some code ...13:41
prologicso you just inherit from Component13:41
prologicand write13:41
prologicdef blah(...):13:41
prologic   ... some code ...13:41
Romsterdoesn't circuits do this somewhat now?13:41
prologicwell it uses a mix :)13:41
prologicwhere it's appropriate13:41
prologicsometimes you don't want implicit event handlers13:41
prologiceverything about circuits is all about building more complex behaviors on top of simpler components13:42
Romsterlooking at mqtt13:42
prologice.g: http://shortcircuit.net.au/~prologic/tmp/Manager.png <-- the component graph of http://sahriswiki.org/13:42
qwebirc15491one more thing: my server disconnect handler definitely gets called b/c it's handling d/c'ed users correctly, but these events don't show up in the debugger output13:43
prologicRomster, I used and run an mqtt broker here on my desktop (will Dockerize it soon) and Owntracks on my wife's iOS/iPhone and my Android Nexus 7 so we can track each other privately and securely - it's awesome :)13:43
prologicI'm planning on using MQTT for just about all sorts of things13:44
prologichence the mqttwarn blog post13:44
Romsterah13:44
Romsteri'm pretty burned out i'll continueon docker on sunday as i'll be out saturday13:45
prologichmm13:45
prologicthat's odd13:45
prologicyou're quite right13:46
prologicI recall that was working13:46
prologicif Debugger doen't show it13:46
prologicthe event handler didn't get caled then13:46
prologicodd13:46
prologiccould be a regression with dev branch13:46
qwebirc15491btw, still on 2.1.013:46
prologichttp://codepad.org/IuofOpi113:48
prologichmm nope13:48
prologicI was mistaken13:48
prologiccan't reproduce it here13:49
prologicare you sure you're not getting the disconnect event?13:49
prologicwhen the client disconnects?13:49
prologicoh?13:49
prologicdamnit :)13:49
prologicgo uninstall 2.1.0 :)13:49
prologicyou might have to delete it's directory13:49
prologicand edit the *.pth file(s) in site-packatges13:49
prologicsite-packagtes13:49
prologicsite-packages*13:49
prologicmaybe C:\Python3.3\Lib\Site-Packages13:50
prologicor something13:50
prologicI don't use Windows :/13:50
prologicpython13:50
prologic>>> import circuits13:50
prologic>>> print circuits.__version__13:50
prologicshould print13:50
prologic3.0.0.dev13:50
prologicI really don't reommend you use 2.1.0 at all :)13:50
prologictoo old13:50
qwebirc15491okey dokey, got 3.0.0 dev up13:51
qwebirc15491and yeah, you were right on that directory13:51
prologicsweet :)13:51
prologicI've been _forced_ to use Widows as a dev works tation int he past13:52
prologicand did Python on it too13:52
prologicso maybe my memory isn't that bad :)13:52
Romstermy short term is shot13:53
Romsteryet i can remember stuff over a few decades ago13:53
qwebirc15491Connect should be in circuits.net.sockets still right?13:53
prologicyes13:55
prologicbut it's "connect"13:55
prologiclowercase13:55
prologicin 3.0 we renamed all the events13:55
prologicthey're all lowercase class names13:55
prologiclong story short13:55
prologicin <=2.1.0 we had this notation of13:55
prologicclass FooBar(Event):13:55
Romsterprologic, went mental with sharaswiki in circuits :D13:55
prologictranslated to an event handler like13:56
prologic@handler("foo_bar")13:56
prologicit was confusing to new users13:56
prologicso we dropped all that in 3.013:56
prologicnow13:56
prologicclass foobar(Event):13:56
prologictranslated to simply13:56
prologic@handler("foobar")13:56
qwebirc15491ah, yeah, that was a bit confusing13:57
prologicsahriswiki is actually a really nicely designed and implemented wiki/cms engine13:57
prologicmyself and a ui designer basically whipped it up in 2 weeks flat13:57
prologicand it's been stable ever since13:57
prologicpowered all my websites :)13:57
prologicpowers*13:57
Romsteri remember i miss those old irc days...13:57
qwebirc15491do user defined events also follow this lowercase convention?14:02
prologicwell ok14:03
prologicso to clarify14:03
prologicthey are named the same way you name your event classes14:03
prologicso14:03
prologicclass FooBar(Event)> --> @handler("FooBar")14:03
prologicclass foobar(Event): --> @handler("foobar")14:03
qwebirc15491gotcha14:05
*** ninkotech has joined #circuits14:17
prologicon that note I'm off to bed14:19
prologicunless you have a quick question? (orw teo) ?14:19
Romsteryeah i am off too g'night14:25
*** qwebirc37162 has joined #circuits14:26
qwebirc37162sorry, had to restart my computer14:27
qwebirc37162just wanted to thank you for all of your help!14:27
prologicah no worries14:32
prologicget yourself a real irc client14:32
prologicand stick around :)14:32
prologicwe're always about14:32
*** ninkotech has quit IRC14:34
*** Roomster has joined #circuits14:42
*** ninkotech has joined #circuits14:47
*** Ossoleil has joined #circuits14:50
*** qwebirc37162 has quit IRC14:58
*** Roomster has quit IRC15:00
*** Ossoleil has quit IRC15:01
*** Ossoleil has joined #circuits15:10
*** Ossoleil has quit IRC15:23
*** Ossoleil has joined #circuits15:24
*** Ossoleil has quit IRC15:24
*** irclogger_ has joined #circuits17:49
*** Romster has joined #circuits17:51
*** ninkotech has joined #circuits17:51
*** c45y has joined #circuits17:51
*** realzies has joined #circuits17:51
*** FSX has joined #circuits17:51
*** ircnotifier has joined #circuits17:51
*** koobs has joined #circuits17:51
*** prologic has joined #circuits17:51
*** LeuX_ has joined #circuits17:51
*** spaceone has joined #circuits17:51
*** pdurbin has joined #circuits17:51
*** An_Ony_Moose has joined #circuits17:51
*** anunnaki_ has joined #circuits17:51
*** annunaki has joined #circuits17:51
*** eriknw has joined #circuits17:51
*** ChanServ has joined #circuits17:51
*** zleap has joined #circuits19:17
*** anunnaki_ has quit IRC21:31
*** anunnaki has joined #circuits21:31
*** anunnaki has quit IRC21:53
*** anunnaki has joined #circuits21:53
*** irclogger_ has quit IRC21:53
*** irclogger_ has joined #circuits21:53
*** irclogger_ has quit IRC21:58

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