IRC Logs for #circuits Wednesday, 2013-05-08

*** jgiorgi has quit IRC04:35
*** EasyMac_ has joined #circuits04:37
*** EasyMac_ has quit IRC05:46
*** EasyMac_ has joined #circuits05:48
*** EasyMac_ has quit IRC06:40
*** jgiorgi has joined #circuits06:55
*** jgiorgi has quit IRC06:55
*** jgiorgi has joined #circuits06:55
*** Osso has joined #circuits07:49
*** koobs` has joined #circuits09:09
*** koobs has quit IRC09:21
*** qwebirc73330 has joined #circuits11:55
prologichey ricochet12:04
prologicwhat can we help you with?12:04
ricochetheeey )12:05
prologicsaw your question a day or so ago12:05
prologicFirst of all. I don't recommend using anything earlier than 2.x12:06
prologicPlease upgrade to 2.1.0 (current release)12:06
prologicOr preferably the dev branch (which we keep fully tested)12:06
ricochetoh...but it's default in ubuntu12:07
prologicCan I ask why you're interested in circuits internals?12:07
prologicyou're using Ubuntu/Debian packaging12:07
prologicLooks like the Debian/Ubuntu maintainers are a bit out of date :)12:07
prologicI recommend you install pip12:07
prologicand just:12:07
prologic$ pip install circuits12:07
ricocheti'm looking into circuits guts because of two reasons12:08
ricochet1. lack details in docs12:08
ricochet2. i'm curious12:09
prologicOk :)12:09
prologic1) *nods* Yes this is largely still a problem12:09
prologicHowever we're continually improving the docs all the time12:09
prologicLatest dev docs at
ricochetand btw did i say "thank you", ))12:09
prologicWhat pray tell has circuits helped you achieve? :)12:10
prologicAlso, bare any lack of specific details in docs.12:10
prologicWe do try and keep thoroughly documented and well tested examples12:11
ricocheti spent a week trying to figure how it works and then made what i wanted in 2 days with a lot of fun12:11
prologicHmm :)12:11
prologicWas/Is there something circuits doesn't do for you?12:11
prologicOr this 2-day project was just for fun?12:11
ricochetit is now JUST for fun. but it is not commercial12:12
prologicWell perhaps hopefully we can encourage you to utilize circuits in your next project?12:12
ricochetmy project is not over yet ))12:13
ricochetyou asked me what circuits doesn't do for me. i coulnd find a proper way to connect smoothly async and sync components. so i end up with a custom priority queue component12:15
prologicwhat does your sync component do?12:16
ricochetmy sync component is sending commands to the stdout, waiting for results.  it's asterisk sync AGI interface12:18
prologicoh hmm12:18
prologicwhy then aren't you using the File component?12:18
prologicand doing it all asynchronsouly?12:18
prologicI've never found a situation where a synchornized Queue is ever necessary12:19
ricochetwell i have two versions of this component: one using File and other - without File, but both utilize Queue12:20
ricochetFile is slow in 1.612:20
prologicFile should be as fast as your system can do I/O12:21
prologicWhat does a Queue solve for you?12:21
prologicyou define a read event handler for your File component (perhaps listening on a channel called "agi")12:21
prologicyou parse the response and fire an appropriate event12:21
ricocheti suppose File is slow because it use with timeout=0.4s12:21
prologicYes ok12:22
prologicThis is why you need to use 2.x :)12:22
prologicWe got rid of all that crap12:22
prologicand greatly improved performance overall with all components that do async I/O12:22
prologicwhilst not chewing significant CPU12:22
prologici.e: the system will idle correctly if there is nothing to do12:22
prologicI really cannot recommend using <2.x at all12:23
ricochetok )12:23
prologicthere are just simply too many significant improvements between 1.6 and 2.212:23
ricochetis it based on Poller components?12:23
ricocheti mean File12:23
prologicwhich means you can configure the system to use EPoll if you want12:24
ricochetok but File is not a big problem for me12:24
prologicand there is no hard coded timeout rubbish12:24
prologicit'll react as fast as possible12:24
prologicYeah your whole Queue thing I think is unnecessary12:24
prologiccircuits 2.x has builtin synchronization primitives12:25
prologiccalled call/wait12:25
prologicwhich let you build simple coroutines out of event handlers12:25
prologicAlso as circuits is _not_ multithreaded a Queue.Queue is useless in every sense12:25
prologicunless you are running some custom threads somewhere with shared data that needs synchronized access12:26
ricochet _priority_ queue )12:26
prologicHmm i see12:27
ricochetit allows to handle some events earlier then other12:27
prologicCan you generalize what it's doing?12:27
prologicPerhaps we can build a component in the core that does this in a general way?12:28
prologiccircuits has priority event handlers12:28
prologicbut not priority events12:28
prologicPerhaps adding this support could be easily done without breaking anything?12:28
prologice.g:12:28, priority=2.0)12:29
ricochetevery event come to this queue has its priority. events with higher priorities pops from queue before events with lower priorities12:29
prologicI know what a priority queue is :)12:29
prologicI'm pondering whether we can add this to circuits 2.2 in the core somehow12:29
ricochet)) sure you do12:29
ricochetand another one feature of this component12:30
ricochetevent may have an "obsolete" mark12:30
prologicgo on...12:31
ricochetif it come to the queue all events with the same type are deleted from the queue12:31
prologicI don't like the name or concept though12:33
ricochetso if any event spent too much time in queue and fresh one comes it will replace old one12:33
prologicbut the mechanism makes sense12:33
prologicI have to get to bed, work tomorrow12:34
prologicBut how would you feel about forking circuits-dev12:34
prologicand adding the first feature to circuits.core ?12:34
ricochetwhy not? if you thonk it's worth making into circuits...12:35
prologicJust thinking about your 2nd feature - I believe this can be done with application logic by building a component that implements a high priority event handler that listens to all events on all channels - watching for this "obsolete" mark. If it finds one, it passes through the first instance of such an event, but filters the rest.12:36
prologicSo in that sense I'm not inclined to add something like that to the core that could be done as a component - part of some application library or part of circuits.contrib12:36
prologicI do - the 1st feature - priority events12:36
prologicI would very much like you to add that to circuits :)12:37
prologicI'm interested in anything that makes circuits the right "tool" for the job12:37
prologicWe've tried to documented our development processes as best we can12:37
prologicSo knock yourself out :)12:37
prologicWe use BitBucket and Mercurial for development12:37
ricochetgood night12:37
prologicpytest, Tox and Shining Panda for for testing and continous integration12:38
ricochethonestly i'm not a python developer it's just a hobby but i'12:40
ricochet..will try to get all this tools working for me )12:41
prologicnps :)12:42
prologicIf you do12:42
prologicI highly recommend you look into virtualenvwrapper12:43
prologicG'night :)12:43
ricochetsee ya12:43
*** EasyMac_ has joined #circuits18:29
*** Osso has quit IRC19:02
*** EasyMac_ has quit IRC19:05
*** jgiorgi has quit IRC20:55

Generated by 2.11.0 by Marius Gedminas - find it at!