IRC Logs for #circuits Saturday, 2014-09-20

prologicy0no, Timer()00:05
prologicy0no, I mean something like:00:06
prologic@handler("connect")00:06
prologicdef _on_connect(...);00:07
prologic   while True:00:07
prologic      yield00:07
prologic      ...00:07
prologicbasically any event handler that returns a generator is turned into a coroutine by the manager00:07
prologicand works like a coroutine00:07
prologicso we should be able to use this to determine when we're actually connected I think00:07
prologicand not block the event loop in the process00:07
*** cfarmer_ has joined #circuits01:18
*** at0mat has joined #circuits01:26
*** cfarmer_ has quit IRC01:48
*** at0mat has left #circuits ()04:05
*** cfarmer_ has joined #circuits07:01
*** cfarmer_ has quit IRC07:05
Yamahi10:15
pdurbinprologic: perl -ne 'print if /^\?\?\?$/../^---$/' index.html > $SPEECH14:09
*** cfarmer_ has joined #circuits14:26
*** cfarmer_ has quit IRC14:47
*** cfarmer_ has joined #circuits14:48
*** cfarmer_ has quit IRC14:52
*** cfarmer_ has joined #circuits15:29
*** cfarmer_ has quit IRC15:35
*** cfarmer_ has joined #circuits16:21
*** cfarmer_ has quit IRC18:13
Yamahi18:55
*** cfarmer_ has joined #circuits19:10
*** cfarmer_ has quit IRC19:44
*** cfarmer_ has joined #circuits20:04
cfarmer_Hey gang, I've managed to solve most of my previous problem (http://circuits.codepad.org/lrHPHumJ), but for some reason I can't figure out why this script (http://circuits.codepad.org/H7QwVLCX) ignores KeyboardInturrupt if there is no Debugger? Any thoughts?20:10
*** cfarmer_ has quit IRC20:23
*** cfarmer_ has joined #circuits21:49
*** cfarmer_ has quit IRC21:52
prologicpdurbin, wt?22:07
prologiccfarmer, hey22:07
prologicyour sample you posted the other day works just fine22:07
prologic:)22:07
prologichttps://gist.github.com/2b7b733c4a4a9c2350b522:08
prologicalthough I kinda would have done this the other way around22:08
prologicwhere the subprocess polls the stream22:08
prologicand fires data events back to the parent22:08
y0noHey prologic ! I have updated my Pull request =)22:10
prologicwhere are you handling SIGINT?22:10
prologicy0no, ahh :)22:10
prologicand it works? :)22:10
prologic:)22:13
y0no=)22:17
prologichmmm22:18
prologiclots of broken tests :(22:18
y0nooh and it's not the same without my modifications ?22:19
prologichmm22:20
prologichttps://bitbucket.org/y0no/circuits/commits/a1dd08e00b390e18e0d64a6d027c38141133484622:20
prologicyour PR contained a commit fixing HEAD reqeusts on circuits.web too22:20
prologicthis may have broken some behaviors :)22:20
prologichold on :)22:20
prologicI'll try and work out what's broken22:20
y0noyep I have tried something but I was not aware that my commits will update the pull request x)22:22
prologicyeah it does :)22:23
prologicunless you create a diffrent branch I guess22:24
prologicPull Requests are basically a way of saying "Please pul my branch in"22:24
prologicok so it's not as bad as I thought22:25
prologicI hope :)22:25
prologictests/core/test_bridge.py for some strange reason or another (since a few revisions ago) causes other tests to break horribly22:26
prologicno idea why yet22:26
prologichttps://gist.github.com/therealprologic/ce7feb281f5ad28bfa1222:32
*** cfarmer_ has joined #circuits22:46
pdurbinprologic: workin' on my $SPEECH22:48
cfarmer_prologic, the snippet i posted worked for you? ok, that's good... actually, i think my second example is more likely the way you suggested... however, i still can't figure out why i can't Ctrl+C to stop without a Debugger?22:50
prologicpdurbin, oh :)22:50
prologichaha22:50
prologicperl is disgusting :)22:51
pdurbinmeh. good for extracting and concatenating my notes from each of my slides in remark.js22:51
prologiccfarmer, odd you can't stop the process via ^C22:51
prologiccfarmer, does it work normally for you?22:51
prologicwhat if you run (for example) circuits.web somewhere22:51
cfarmer_yup22:52
prologic"circuits.web" is an installed script/entrypoint by circuits22:52
prologicit does work?22:52
cfarmer_normally it does work... just this particular script without  Debugger...22:52
prologicchangeset:   4368:4b8309c13b1e22:53
prologicuser:        James Mills <prologic@shortcircuit.net.au>22:53
prologicdate:        Wed Aug 20 23:50:41 2014 +100022:53
prologicsummary:     Add a default signal handler to the Debugger22:53
prologicchangeset:   4367:db542ff97d7822:53
prologicuser:        James Mills <prologic@shortcircuit.net.au>22:53
prologicdate:        Tue Aug 19 14:49:08 2014 +100022:53
prologicsummary:     Use the new custom signal event handling to cleanly shutdown the ci22:53
prologic^^^22:53
prologicinteresting22:53
prologicI wonder if somehow your app is overriding the signal event22:53
prologicwhat's the url for it again?22:53
prologicYou could try adding https://gist.github.com/ce484b5978018db9b279 to your app22:54
prologicI changed this in recent dev because there was no way of overriding signals22:54
prologicnow there is22:54
cfarmer_Here's the link: http://circuits.codepad.org/H7QwVLCX22:55
prologicbut if something eats the signal event22:55
prologicI suspect ^C will be silently ignored :)22:55
cfarmer_hmm, I'll check to make sure I'm not catching the signal event... though I don't think anything I wrote is doing that :-p22:55
prologicgimme a sec22:56
prologicwill test here :)22:56
prologicweird22:57
prologicyou're right22:57
prologicahh22:57
prologicI think I know what is22:57
prologicthe Bridge is eating it22:57
prologic:)22:57
prologicand passing it on to the subprocess22:57
prologicI'm 99% certain this is what's going on22:57
prologicthe circuits/core/mangers.py logic works something like this22:58
prologicif we see a signal() event22:58
prologicand we notice there are no event handlers that are going to process it22:58
prologicregister temporarily the fallback handler22:58
prologicwhich is in circuits/core/helpers.py22:58
prologicbecause the Bridge() listens to all events22:58
prologicthis logic falls through22:58
prologicso in this instance you will need an explicit signal handler22:59
prologicalso making the Bridge ignore "signal" events wno't work either :)22:59
prologichttps://gist.github.com/7de9ef42672003d1f3bd23:01
prologicthis fixes it :)23:01
prologic$ ./test.py23:02
prologicContainer was started23:02
prologicStreamer was started23:02
prologic1411254185.723:02
prologic1411254186.223:02
prologic1411254186.723:02
prologic^CContainer was stopped23:02
prologicbtw23:02
prologicI really like your 2nd approach to this problem23:02
prologicit feels/looks quite nice23:02
cfarmer_woot! that fixes it :-)23:03
prologicthe nice thing about all this is that is consumes little to no cpu time23:03
cfarmer_thanks, glad you liked it... yes, the second version feels much more 'circuitly' ;-)23:03
prologicand is all event-driven23:03
prologichaha23:03
prologicwe'll add that to the urban dictionary shall we :)23:03
cfarmer_sounds good... i gotta say, i'm loving the structure of circuits... i'm learning a lot about it quickly23:04
prologic:)23:04
prologicthanks23:04
cfarmer_i'll probably be collecting quite a few examples of doing things like the above script, so i'll start thinking about some pull requests for more examples like it?23:04
prologicany improvements are welcome too btw23:04
prologicsure :)23:05
cfarmer_cool, i have also thrown together a nice (at least I think so) API for connecting components together... i'm not quite sure it really 'belongs' in circuits, but once i have a few more examples working with it, i'll show you and you can decide if it might be useful to others?23:06
prologicconnecting components how?23:13
prologicthat's what register() and + and ++ do now :)23:13
prologicis this over IPC or Remote Ndoes?23:14
*** cfarmer_ has quit IRC23:14
*** cfarmer_ has joined #circuits23:14
prologicprologic> connecting components how?23:16
prologic<prologic> that's what register() and + and ++ do now :)23:16
*** cfarmer_ has quit IRC23:16
prologic<prologic> is this over IPC or Remote Ndoes?23:16
*** cfarmer_ has joined #circuits23:17
prologicprologic> connecting components how?23:18
prologic<prologic> that's what register() and + and ++ do now :)23:18
prologic<prologic> is this over IPC or Remote Ndoes?23:18
prologicare you getting disconnected? :)23:18
cfarmer_yeh i keep getting disconnected, but its at my end... you'd link nyc internet would be more reliable :-p23:19
prologicheh23:20
cfarmer_prologic: its more of an *alternative* api than a replacement one...23:20
prologiccan I see examples yet?23:20
cfarmer_though i wasn't aware of ++? what's that for?23:20
prologicsorry23:20
prologic+ and +=23:20
prologicconvenience around .register()23:20
cfarmer_ah ok, right23:21
cfarmer_no examples yet (too embarracing at this stage), but i'll for sure send along something soon... if anything it'll provide several cool components to play with streaming apis23:21
prologicok nps :)23:22
prologicok well I'm going out for a while with the family23:30
prologicso I'll bll23:30
prologicbbl*23:30
*** cfarmer_ has quit IRC23:32
pdurbindisgusting but useful. #perl :)23:38
Yamagn823:42
cfarmerprologic: cheers, and thanks again!23:48

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