IRC Logs for #circuits Thursday, 2014-10-09

robert_prologic: hi.00:21
prologicrobert_: hi00:21
robert_had a chance to look at my code? :p00:21
prologicno I’m sorry I had a big day yesterday and was quite exhausted00:30
prologicdid you make any progress on it yourself?00:30
prologichappy to help in any way I can just can’t look at code right now :)00:30
robert_it's fine, and is there any way I can dive into circuits to figure out what's wrong?00:31
prologicyes absolutely00:36
prologicstick a few prints in the dispatcher :)00:36
prologicbut the Debugger() should really help here too00:37
robert_yeah00:37
prologicbut the flows can be traced00:37
prologicthere’s no magic going on :)00:37
robert_Debugger() told me it wasn't being registered.00:37
robert_I need to figure out why now.00:37
robert_I need to look at safeimport00:39
prologicand no exceptions are being thrown anywhere?00:46
robert_weird. sometimes the loader works on another channel="" and sometimes it doesn't.00:56
prologicbug?00:59
prologicI do use it succesfully for kdb00:59
prologicirc bot00:59
prologicbut haven’t really used it in many other places yet00:59
robert_yeah01:09
robert_like some places01:09
prologicfind out what’s going on :)01:10
prologicpudb/pdb ftw :)01:10
robert_you could add channel='*' to loader, or a note into the loader's documentation that if you use other channels, you need to fire to the loader channel.01:10
prologicall Loader does btw is just impmort the module01:10
robert_yeah01:10
prologicfind componnets and register them (optionally)01:10
robert_yeah01:10
prologicit’s quite simple what it does01:10
robert_it was firing the load[] event, but it was channel MainApplication. :p01:11
prologicrobert_: you could add channel='*' to loader, or a note into the loader's documentation that if you use other channels, you need to fire to the loader channel. <— that’s implied everywhere in circuits01:11
prologicif a component has a channel you must reference that channel when fireing events at it01:11
prologicit’s sort of like an address :)01:11
robert_indeed.01:11
prologicso that was the problem all along?01:12
robert_And I sort of knew that, but forgot it. :p01:12
robert_yeah.01:12
prologicahh cool :)01:12
robert_big herp on my part.01:12
prologicsee told you Debugger() would help :)01:12
robert_I should walk around with a billboard that says "I herp'd." behind my head. :p01:12
robert_okay, another issue.01:19
robert_components won't start unless their channel is '*'01:20
robert_so I have to manually start them.01:20
prologicsorry what?01:24
prologicdefine “start"?01:24
prologicyou *should* only start a component graph01:24
prologicnot individual componnets01:25
robert_oh, okay.01:25
robert_that actually makes sense.01:25
prologicas long as your “pluggable” components are part of your main system (component graph)01:25
prologicthey will participate in events01:25
prologicif you *really* want to run things separately01:25
prologicyou should think about other design patterns01:25
prologiclike multiprocessing01:25
prologicclustering01:25
robert_indeed.01:25
prologicetc01:25
prologiccircuits has Worker() for that very reason01:26
prologicwhich wraps around multiprocessing01:26
prologicwhereby you fire task() events at it with a function, args and kwargs01:26
prologicand the function will run in a process pool01:26
prologiccomponents *can* be started as a subprocess and *linked* up to their parent process by wey of the Bridge01:26
robert_oh, okay.01:26
prologicbut this is advanced stuff :)01:26
robert_yeah01:26
prologicevents travel in both directions transparettly01:27
prologicthere is also circuits.node for distirbuted processing of multi-node/host commuincations01:27
robert_I like EventLog() being part of my component graph, because then I don't have to worry about housekeeping for when components get loaded. :D01:28
robert_as you load new components, new event channels are created seamlessly. :D01:29
prologichow does EventLog differ from Debugger?01:31
robert_my EventLog listens for registered events and creates logger instances for each registered component so when it goes to send logs to it, it can either buffer the entries appropriately or dump them to screen. :D01:35
prologicso you essentially get separate logs per component?01:37
prologicare you wrapping around logging.Logger? (python std. lib)?01:37
robert_yes.01:38
robert_because I have different active parts doing different things01:38
robert_I don't want to be in say, the middle of dumping an exception when some other component comes in and "Oh, I found a new eligibility file. I'm going to pick it up."01:38
robert_Done that. It's rather nasty.01:39
robert_(logging that way.)01:39
prologicsure01:42
robert_it's been in the middle of printing when Ruby's just come in and inserted type over top of what another thread was going. :p01:52
*** Osso has quit IRC02:00
prologicyou do realize that circuits is event-driven right?02:02
prologicand asynchronous02:02
prologicthat means events are fired and handled in the order they are receieved02:02
prologicFIFO02:02
prologicit _is not_ possible for an event ot come in the midele of some other event02:02
prologicconcurrency != paralell02:03
robert_yeah.02:07
robert_I didn't mean with circuits, though.02:08
robert_I was just saying that I had that experience with Ruby, and that it wasn't fun.02:08
robert_:P02:08
prologicright02:14
robert_prologic: ERROR <handler[loader.load_done] (Application._on_done)> (<load_done[loader] (<Scheduler/Scheduler 75450:MainThread (queued=0) [S]> )>) (<class 'KeyError'>): KeyError('task_event',)04:23
prologicooh04:24
prologicinteresting04:24
prologictask_event is part of the internal machinery04:24
prologichow did you trigger this bug?04:24
prologicI’d like a stripped down test case please04:24
prologicit’s either a bug or incorrect usage04:24
prologicif the later it should be guarded against04:24
robert_basically, list(self.call(Event.create("load", args), "loader")04:25
robert_er, list(self.call(Event.create("load", args), "loader"))04:25
robert_I'll write up a testcase and submit it to bitbucket. it'll be public.04:28
prologicplease04:47
prologicbut please try to strip it back down as much as you can04:47
prologiconly the bare essentials to demonstrate the bug04:47
*** Romster has quit IRC07:14
*** Romster has joined #circuits07:29
*** Osso has joined #circuits08:05
*** techdragon has joined #circuits08:30
*** FSX has quit IRC11:55
*** FSX has joined #circuits12:11
Yamahi15:51
robert_hi.17:14
Yamagn822:49

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