IRC Logs for #circuits Friday, 2014-07-25

pdurbinprologic: first time giving a talk?01:08
prologicpdurbin: yeah01:14
prologicyou?01:14
pdurbinyeah01:14
prologicany tips fo me? :)01:33
prologicI dunno how I’m even going to technically present these slides at all01:33
prologicI was going to bring my MacBook Air01:33
prologicand get some adapters, etc01:33
prologicjust in case ;)01:33
prologicbut never tried to plug a MacBook Air into a oproejctor01:33
prologic(yet)01:33
pdurbinwhen is the talk?01:35
*** robert_ has quit IRC03:04
*** robert_ has joined #circuits03:05
*** robert_ has quit IRC03:05
*** robert_ has joined #circuits03:05
prologicnot this weekend, but next06:50
pdurbinah. soon. no wonder your slides are done (unlike mine)09:31
*** qwebirc77168 has joined #circuits10:12
kdbHeya qwebirc7716810:12
qwebirc77168just writing my first circuit apps. A TCPServer and a TCPClient app.10:14
qwebirc77168a bit surprised. the clinet fires "connected" also if the server is not running...10:15
prologicyeah they're done11:15
prologicbut they could do with a bit more pretiness11:15
prologic*sigh*11:16
prologicoh well :)11:16
prologicI'm an engineer11:16
prologicwhat do you expect :P11:16
prologicqwebirc77168, the TCPClient "connected" event is a little broken - yes11:16
prologicdon't rely on it necessarily11:16
prologicwe need to workon this still11:16
prologicas it turns out not even Twisted do it right11:16
prologicdetermining asynchronously whether or not your tcp esession is conneted or not (regardless of the application protocol turns out to be quite hard11:17
prologicthere is a plan in place11:17
prologicbut likely for circuits 3.111:17
qwebirc77168ah. ok. as I'm starting with circuits it's hard to understand if is my missunderstanding or not...11:34
prologicwhat are you not understanding?11:45
prologicmaybe I can help :)11:45
qwebirc77168I didn't understand if was my fault or not...11:49
qwebirc77168I'm moving first steps here... really like it but some doubts.11:50
prologicwe're here to help11:51
qwebirc77168I'm really glad for this. I'm always the one of the few past days....11:51
qwebirc77168can I change the nic with this webIRC?11:52
prologicno11:53
prologicyou'll have to use a proper irc client11:53
prologiclike Colloquay on OS X11:53
prologicmIRC on Windows or similar11:53
prologicX-Chat on Linux or similar11:53
qwebirc77168ok11:53
prologicsearch for "IRC Client" for your OS/Platfom11:53
qwebirc77168ok11:55
Yamaisnt /nick working?12:00
qwebirc77168not with this webirc... (the one linked on the circuits website). Another question... I'm writing something very similar to the chat server. As an exercise. So 1 server and possibly many clients.12:02
qwebirc77168Is working.12:02
qwebirc77168but, suppose I want a a very silly method on server that is something similar:12:02
qwebirc77168while true:12:03
qwebirc77168     sleep(10)12:03
qwebirc77168       self.broadcast("keepalive")12:03
qwebirc77168is there a method supposed to put these?12:04
qwebirc77168if I put in "started" the server never get messages from clients.12:04
qwebirc77168I know is a silly question, but it is only for study porpuse.12:05
prologicTimer(10, Event.create("keepalive"), persist=True).register(self)12:06
prologicThen create an event handler for "keepalive"12:06
prologic@handler("keepaliave')12:06
kdbUnknown Command: handler("keepaliave')12:06
prologicdef on_keep_alive(self):12:06
prologic   for client in self.clients:12:06
prologic      self.fire(write(client.sock, "Oi!"))12:07
prologicor similar12:07
prologicin other words12:07
prologicuse a Timer :)12:07
qwebirc77168oh.. this case wold work. but was only a silly example.12:07
prologicalso12:07
prologicno event handler should ever be doing what you described above12:07
prologicbecause you block the event loop12:08
prologicevent handlers need to do their "actions" very quickly12:08
qwebirc77168suppose that server has a contiuous routine that sometime output something to send to all12:08
prologicif you're doing some example some large calcuaitions12:08
prologicyou should use a Worker pool12:08
prologicand fire task() events as it12:08
prologicwhich wraps around multiprocessing.Pool12:08
prologicyeah12:09
prologicTimer :)12:09
prologici.e:12:09
prologicevery 10s12:09
prologicfire an event12:09
prologiclisten for the timer event12:09
prologicbroadcast something to all clients12:09
prologicTimer is a bit like the equivilent of the Twisted call_later12:09
qwebirc77168ok. will study deeper! I'm starting..... by the way never looked at Twisted ;) Thanks for the hints. I'm going to have a look.12:10
qwebirc77168so... if I have a handler that fire, for example, 10 events, are they queued ad executed when the handler exits? or as they are fired?12:16
qwebirc77168(or as soon as they are fired)?12:16
qwebirc77168or with another strategy?12:18
prologicwell I'm not advocating you use Twisted :)12:25
prologicI develop and maintainer circuits and continually try to make it better12:25
prologicso of course we want you to use circuits12:25
prologic:P12:25
prologicqwebirc77168> so... if I have a handler that fire, for example, 10 events, are they queued ad executed when the handler exits? or as they are fired? <-- after the event handler has finished12:26
prologicwith the exception of coroutines-style event handlers12:26
prologici.e: event handlers that yield12:26
prologice.g:12:26
prologicx = yield self.call(foo())12:26
prologicyield x12:26
qwebirc77168ok. this info is very useful12:28
*** qwebirc77168 has quit IRC13:30
Yamahi15:12
*** koobs has quit IRC16:38
*** koobs has joined #circuits17:52
kdbWelcome back koobs :)17:52
*** ircnotifier_ has joined #circuits23:22
kdbHey ircnotifier_23:22
*** ircnotifier has quit IRC23:29

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