IRC Logs for #circuits Friday, 2015-03-27

pdurbinprologic: so did you do all that community stuff?00:16
prologicthere are lots of things left to do00:19
prologichttps://github.com/circuits/circuits/issues/700:21
pdurbinso I see00:26
pdurbingood progress though00:26
prologicfeel free to pickup some stuff :)00:27
prologicwe also need to build a new website I think00:27
prologicmaybe you could do that based on our existing content00:28
prologicand use a static site generator/tool00:28
prologicwith a nice theme00:28
prologicinitially get it going with circuits.github.io and we can setup a CNAME once it's done/finished00:28
pdurbinI should get my hands dirty with circuits first. Should work on my podcast feed thing. It broke the other day and I had to fix it. Would like to design it properly this time. Rather that just letting the lines of Ruby accrete.00:28
prologic*nods800:30
prologicgo fer it :)00:30
*** Workster has quit IRC00:32
pdurbinI wonder if I should process the RSS feeds myself or if I can pip install something.00:32
prologicyou can00:32
prologicpip install feedparser00:32
prologicpip install requests00:32
prologicpip install circuits00:33
prologicbefore that though00:33
prologicmkvirtualenv podcastupdater00:33
prologic:)00:33
prologicone any one of my projects as a nice skeleton00:33
prologichttps://github.com/prologic/hipachectl00:33
prologicthis is a good minimal one00:33
prologicrequirements.txt setup.py and package structure00:33
prologicwith cli parsing you can just use as-is and modifyu00:34
prologicmodify*00:34
prologicand if you use hipachectl as a basis/template for your project00:34
prologicyou can trivially Dockerize and publish it for others to use as a general purpose tool of some kind :)00:34
prologichttps://github.com/circuits/circuits/blob/master/examples/timers.py00:35
prologicTrivial example of using Timer() in circuits00:35
pdurbinright now I fire off the scripts every midnight with cron00:49
pdurbinwith Circuits you're saying you would use a timer? and the app would always be running? as a daemon?00:49
prologicsure why not00:51
prologiccircuits consumes no CPU when it's idle00:51
prologica portable micro services00:52
pdurbinhmm00:52
prologicrather than some non-portable script hard tied to crond00:52
prologic:)00:52
pdurbinmeh, it's ruby using only standard libs. pretty portable. just ugly code is all00:53
pdurbinthe idea was to have a pipeline00:53
pdurbinthe input file is the OMPL export from my android podcatcher, basically a list of RSS feeds00:54
pdurbinfrom those feeds you download the XML files every night. they sit there on disk00:54
pdurbinthen you process those files. this is the part that can take a while :)00:54
pdurbinbut it happens when I'm sleeping :)00:55
pdurbinI'll have to keep thinking of more Circuits-sized holes in my life.00:56
pdurbinI mean, Circuits is best for daemons, I imagine. Typically you start it up and just let it run.00:57
prologicyeah00:57
prologicso combine this with a Worker() process pool00:57
prologicWorker(process=True).register(app)00:57
prologicand fire off task(s) when you have processes to do00:57
prologicperhaps one per input file00:57
prologicself.fire(task(process_feed, filename), "worker")00:58
prologicwell really circuits is good at I/O and event'ing00:58
pdurbinmaybe I'll write an IRC bot then. I dunno00:59
prologicit's just the way it's designed gives you a nice way of evolving a loosely coupled design and architecture from the start00:59
prologiclol00:59
prologicdo both :)00:59
prologicjust start now :)00:59
prologichaha00:59
prologicand go from there00:59
pdurbinI'm such a static site guy I just don't run that many daemons.00:59
pdurbinI have my little IRC logging bot.00:59
pdurbinand an IRC bot that I use for Google searches01:01
pdurbin(I could send searchbot in here if people want.)01:01
prologicOh believe my I am too01:04
prologic-but- I strongly believe in micro services01:04
prologicthat serve useful reusable purposes01:04
prologicthat's why I wrote up that Docker-based mini-PaaS :)01:04
pdurbin:)01:04
prologicso that's it's trivial to spin up web apps and other web based services01:05
prologicbasically a one liner01:05
prologicit could not be easier01:05
pdurbinI imagine Circuits is a fine platform for writing REST APIs in.01:15
prologicIt sure is01:16
prologichttp://ccav.terranova.org.au/api/ http://ccav.terranova.org.au/apidocs/01:16
prologicRESTful and self-documenting JSON HyperSchema API01:17
prologicwrittein in circuits01:17
pdurbinvery nice01:19
pdurbinprologic: you might enjoy #rest01:19
prologicmaybe01:20
prologicbut I'm on too many channels as it is :)01:20
pdurbinheh01:20
*** Workster has joined #circuits02:32
prologicwoot woot05:36
prologicmy nas has finally arrived05:36
prologic:)05:36
prologicbe setting that up this weekend and playing with zfs05:36
*** ninkotech has joined #circuits11:09
riotprologic: grats :)12:09
riotis there a good example of how to handle many different events between two components? I mean with websockets, i'm feeling like i'm missing some of the advantages of AJAX (GET, PUT, DELETE, etc encapsulated nicely, so i don't have to rewrite that all the time)12:10
riotthis part kind of looks very unnice to me: https://github.com/Hackerfleet/hfos/blob/master/hfos/mapviewstorage.py#L11712:12
rioti have it on a few other components and it looks plain unelegant12:12
riote.g. code is not well structured, yeah, i could divide that into methods, but i'd always have this kinda-hacky string comparison in there.12:13
riot(also notice how this is almost completely wrapped in try-except... i always run into recursive stack-killing problems when theres an uncaught exception thrown!)12:15
riot(not nice.. :/)12:15
prologichmm12:41
prologicuncaught exceptions in an event handler shouldn't blow the stack12:41
prologicor cause event recursion really12:41
prologicunless there's also an error in the exception event handler12:42
prologicas to your code structure12:42
prologicsounds like you want a dispatch pattern there12:42
prologicor further split up your "work" into more events of varying kinds12:42
prologicbased on the request type12:42
*** Romster has quit IRC13:47
*** Romster has joined #circuits14:00
spaceoneprologic: is the code on github the most recent? Next week i will try the 3rd-party-path-thing again, i think i can solve it.14:17
prologicyes14:22
prologiccool14:22
*** green1 has joined #circuits17:03
*** green1 has quit IRC17:22
*** tariq786 has joined #circuits21:18
*** Aylan has joined #circuits23:01
*** green1 has joined #circuits23:04
*** Aylan has quit IRC23:22

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