PMXBOT Log file Viewer

Help | Karma | Search:

#dcpython logs for Monday the 27th of August, 2012

(Back to #dcpython overview) (Back to channel listing) (Animate logs)
[09:42:29] <jaraco> !help
[09:42:29] <pmxbot> !8ball (8) !acronym (ac) !anchorman !annoy (a, bother) !bender (bend) !bitchingisuseless (qbiu) !blame !bless !boo !bottom10 (bottom) !calc !chain !cheer (c) !c
[09:42:29] <pmxbot> ompliment (surreal) !ctlaltdel (cad, controlaltdelete, controlaltdelete, quit, restart) !curse !dance (d) !deal !define (def) !demotivate (dm) !disembowel (dis,
[09:42:30] <pmxbot> eviscerate) !duck (ducky) !embowel (reembowel) !featurecreep (fc) !fight !flip !fml !gettowork (gtw) !golfclap (clap) !google (g) !googlecalc (gc) !grail !hal
[09:42:30] <pmxbot> (2001) !hangover !help (h) !hire !imotivate (im, ironicmotivate) !insult !job (card) !karma (k) !keelhaul (kh) !klingon (klingonism) !logo !lunch (lunchpick, lu
[09:42:30] <pmxbot> nchpicker) !meaculpa (apologize, apology) !motivate (appreciate, m, thank, thanks) !murphy (law) !nailedit (n, nail) !nastygram (bcc, nerf, passive) !notify !or
[09:42:31] <pmxbot> egontrail (otrail) !panic (pc) !password (passwd, pw) !paste !pick (p, p:, pick:) !progress !quote (q) !r (r) !roll !rubberstamp (approve) !saysomething !simpso
[09:42:31] <pmxbot> ns (simp) !stab (shank, shiv) !storytime (story) !strategy !strike !tgif !therethere (comfort, poor) !ticker (t) !time !tinytear (cry, tear, tt) !top10 (top) !t
[09:42:31] <pmxbot> ranslate (googletrans, googletranslate, trans) !troutslap (slap, ts) !urbandict (ud, urb, urbandef, urbandefine, urbandictionary, urbdef) !weather (w) !where (l
[09:42:32] <pmxbot> ast, lastseen, seen) !zinger (zing) !zoidberg (zoid)
[09:42:43] <jaraco> !top10
[09:42:43] <pmxbot> (jaraco: 7) (pmxbot: 6) (aclark: 3) (dcpython_hubot: 2) (xrogaan: 2) (pythonpackages.com, pythonpackages.org: 2) (#dcpython: 1) (bigsassy: 1) (mongodb: 1) (supervisord: 1)
[10:38:35] <xrogaan_> jaraco: is that a irclib bot ?
[10:38:52] <jaraco> Yes it is.
[10:39:07] <xrogaan_> how do you manage the command list ?
[10:39:20] <jaraco> python code
[10:39:27] <jaraco> http://bitbucket.org/yougov/pmxbot
[10:39:41] <jaraco> Basically decorators on functions.
[10:40:03] <jaraco> https://bitbucket.org/yougov/pmxbot/src/b26c4e81e194/pmxbot/commands.py
[10:41:05] <xrogaan_> mh
[10:41:48] <xrogaan_> i had no idea one could do that in python
[10:42:18] <jaraco> decorators are pretty powerful.
[10:42:53] <jaraco> The trick for something like pmxbot is that the decorators register the functions as handlers, which can be looked up in a dictionary of commands.
[10:44:38] <xrogaan_> well, i aim to create a modular ircbot. I don't think it would work that way.
[10:44:49] <xrogaan_> see, every module come with its own set of commands
[10:45:06] <jaraco> If you want to add commands to pmxbot, just create a package according to the pmxbot README, and we can install it.
[10:45:42] <xrogaan_> what happens in case of collision ?
[10:45:53] <jaraco> Currently, first registered wins.
[10:46:08] <jaraco> And registration occurs in order of setuptools entry points.
[10:46:14] <xrogaan_> i'm writting my own thing btw
[10:48:23] <xrogaan_> i was just wondering how you came up with the command listing :p
[10:51:41] <jaraco> oh. I see. The bot just cycles through the registry. https://bitbucket.org/yougov/pmxbot/src/b26c4e81e194/pmxbot/commands.py#cl-791
[10:53:38] <xrogaan_> I'm currently thinking about using a "false" dict to manage modules and related commands
[10:55:46] <xrogaan_> which is a bit crazy
[10:56:01] <jaraco> what's a false dict?
[10:58:42] <xrogaan_> well, an object mimicking a dict
[10:58:56] <xrogaan_> behave like one but isn't a dict per say
[10:59:18] <jaraco> aah. Usually I find when I head down that path, I end up subclassing dict anyway.
[10:59:23] <jaraco> bbl
[17:59:10] <iElectric> J1m: what are your plans for buildout 2.x docs?
[18:37:32] <J1m> iElectric, my first choice is for someone else to make the plans. :)
[18:37:44] <J1m> Y'all seem to be off to a good start.
[18:38:53] <J1m> At a high level, I'd like to see a not-to-long introduction on the package page (pypi) that describes the 2 main use cases, and links off to sphinx docs.
[18:39:59] <J1m> My recommendation for the sphinx docs is to have a fairly brief into/getting started page and then 2 high-kevel sections: how-tos and reference docs.
[18:50:12] <iElectric> roger