[00:03:02] ** rdmurray has left IRC ("User disconnected") [00:03:20] ** werneck has left us [02:06:08] gbay|Zzz is now known as gbay [03:31:26] ** jack-e|away has left IRC (wells.freenode.net irc.freenode.net) [03:31:26] ** gbay has left IRC (wells.freenode.net irc.freenode.net) [03:31:26] ** etrepum has left IRC (wells.freenode.net irc.freenode.net) [03:36:25] ** jack-e|away has joined us [03:36:25] ** gbay has joined us [03:36:25] ** etrepum has joined us [04:03:17] [connected at Tue Apr 6 04:03:17 2004] [04:03:17] <> *** Looking up your hostname... [04:03:17] <> *** Checking ident [04:03:17] <> *** Found your hostname [04:04:07] <> *** No identd (auth) response [04:04:08] <> *** Your host is wells.freenode.net[wells.freenode.net/6667], running version dancer-ircd-1.0.35 [04:04:08] [I have joined #peak] [04:04:08] ** wells.freenode.net set the topic to peak - Python Enterprise Application Toolkit | http://peak.telecommunity.com | alpha3 is out !!! [04:53:54] jack-e|away is now known as jack-e [04:53:58] morning [06:11:45] ** gpciceri has joined us [06:30:44] ** vlado has joined us [06:31:24] gbay is now known as gbay|slaving [06:41:14] work = binding.Delegate("vlado") ;-) [06:41:23] err .. gbay :) [06:43:44] jack-e: hehe.. indeed, I don't conform very well to it thoug.. and I'm off quite soon, bla [06:44:07] hehe [06:45:01] silly man =p, nope, I really do need to slave.. adapt(gbay, work) [06:46:39] can't we write a bot that changes our nicks depending on what we try to adapt =) [06:47:33] protocols.adapt(gbay, IWork) ==> /nick gbay|Work =) [06:48:37] don't really know how binding and such works =p [06:48:38] shouldn't be a problem .. only the AHAGA (Automatic Human Activity Guessing Adapter) will be a bit of work ;-) [06:48:39] bye [06:48:54] =) [07:40:00] ** gpciceri has left IRC ("Client exiting") [07:52:51] binding is easy to understand [07:57:40] * vlado wishes to understand how peak.events works (not on theory) but unfortunately there are no stupid examples for silly developers like me :) [07:59:35] hi jack-e, what did you delegate me ?:) [08:01:23] i just misstyped and wanted to make a joke about "gbay|slaving" :) [08:01:47] i use it in nllworkflow (but that's not an easy example :) [08:02:24] it's not too complicated .. but you need to untwist your mind a bit [08:03:42] e.g.: [08:03:52] class SomeComponent(binding.Component): [08:04:07] # processing doActivity [08:04:07] def processDoActivity(self): [08:04:07] """Process the doActivity of the currentState.""" [08:04:08] pi = self.processInstance [08:04:10] yield pi.isStarted; events.resume() [08:04:12] if self.state.doActivity is not None: [08:04:14] # XXX for now require a iterator-like doActivity [08:04:16] yield pi._execAction(self.state.doActivity, contexts={}) [08:04:18] events.resume() [08:04:22] processDoActivity = binding.Make( [08:04:24] events.taskFactory(processDoActivity) [08:04:26] ) [08:04:28] [08:04:38] pi.isStarted is a peak.events.Condition, that is "set()" when the ProcessInstance is Started [08:06:08] events.taskFactory creates and schedules the method in the ISchedule automagically uponAssembly [08:06:21] (err not if uponAssembly is missing) [08:06:45] i call self.processDoActivity to trigger the schedule of this task in some method somewhere else [08:08:43] when you yield to some EventSource, you leaf the execution of your method (other way round than calling a method) till the EventSource publishes an event for you. result = events.resume() then gives you back the result (e.g. the published Event) [08:08:48] can you follow ? [08:09:54] partially yes :) [08:09:57] a task defined as generator is called (iterated) as many times till it raises the StopIteration (is finished). [08:11:02] so you allways do a little (non-blocking) part of your job and then give back control to the schedule [08:14:44] if you use twisted. you can also yield Deferreds to wait for the callback method to happen [08:16:13] * jack-e wishes that peak.web and peak.storage would coop with peak.events nicely .. [08:16:31] no i don't use twisted [08:25:10] hm... you yield to the event source, it notifies ist subscribers and you get "the representation of what they think about the current state of execution" of your method from events.resume() ? [08:25:38] do i understand it correctly ? [08:28:14] basically yes .. except that what the eventSource publishes as Event you get back in events.resume() [08:28:34] err [08:28:36] no [08:28:58] ? [08:29:15] if you yield you basically subscribe to the event-source for one event [08:30:30] the eventsource publishes an event (e.g. because data is available) and you get back to the execution in your method [08:32:56] haha! http://blogs.msdn.com/robmen/category/4625.aspx [08:33:20] microsoft published opensource software :) [08:33:37] on sf.net [08:33:37] yep .. i saw the headline too ... [08:40:10] oh.. i think i started understanding it but i have to find some time for a deeper look [08:41:40] it's cooperative multitasking .. when your task decides, some other job might be done now you yield to some condition, eventsource,... till you get your next data/part of your job (e.g. send next junk of file-data) [08:43:04] so you need to take care that you don't do blocking-calls, polling for something with a "while not : wait(1s)" [08:43:11] or the like [08:43:48] ** gpciceri has joined us [08:44:31] aha thx, gotta run now [08:44:36] cu [08:52:03] ** gpciceri has left IRC ("Client exiting") [09:23:35] ** sremington has joined us [10:26:02] jack-e is now known as jack-e|away [11:45:29] ** vlado_ has joined us [11:45:30] ** vlado has left IRC (Read error: 54 (Connection reset by peer)) [12:09:06] ** vlado_ has left IRC ("Leaving") [13:04:55] ** sremington has left IRC ("Laugh while you can monkey boy!") [14:24:50] ** hazmat has joined us [14:40:45] ** rdmurray has joined us [15:57:35] ** Maniac has joined us [17:35:34] gbay|slaving is now known as gbay [17:44:40] ** Maniac has left IRC ("Client exiting") [17:53:18] ** rdmurray has left IRC (Read error: 110 (Connection timed out)) [19:11:23] gbay is now known as gbay|Zzz [20:31:45] [connected at Tue Apr 6 20:31:45 2004] [20:31:45] <> *** Looking up your hostname... [20:31:45] <> *** Checking ident [20:31:45] <> *** Found your hostname [20:32:29] <> *** No identd (auth) response [20:32:29] <> *** Your host is niven.freenode.net[niven.freenode.osuosl.org/6667], running version dancer-ircd-1.0.35 [20:32:30] [I have joined #peak] [20:32:30] ** niven.freenode.net set the topic to peak - Python Enterprise Application Toolkit | http://peak.telecommunity.com | alpha3 is out !!!