[04:58:22] [connected at Tue Jul 25 04:58:22 2006] [04:58:22] <> *** Looking up your hostname... [04:58:22] <> *** Checking ident [04:58:23] <> *** No identd (auth) response [04:58:23] <> *** Found your hostname [04:58:23] <> *** Your host is calvino.freenode.net[calvino.freenode.net/6667], running version hyperion-1.0.2 [04:58:23] [I have joined #peak] [09:35:54] ** coderanger_ has joined us [09:58:46] ** bitmvnch has joined us [11:24:14] whit_ is now known as whit [11:45:24] ** __doc__ has joined us [11:46:09] <__doc__> hi, I'd like to dispatch one call to a function to different functions depending on the value of an argument. [11:46:20] <__doc__> what piece of peak makes this easy for me? [11:46:40] * __doc__ guesses dispatch [11:46:54] ** bitmvnch has left IRC () [11:47:13] Yep, RuleDispatch. [11:47:36] It's been split off as a separate package, and I forget if it's still called RuleDispatch. [11:48:50] <__doc__> hm, that'd be the DecoratorTools according to cheeseshop [11:50:12] <__doc__> http://peak.telecommunity.com/DevCenter/DecoratorTools doesn't list documentation for dispatching I think. or am I not seeing the obvious? [11:50:44] I don't think it's DecoratorTools. [11:50:47] Let me look… [11:51:26] PEAK Rules? [11:51:44] Ah. from dispatch import generic [11:51:48] So dispatch. [11:52:12] Then you do junk like this (from the mailing list): [11:52:13] @foo.when("bar > 2") [11:52:13] def foo_gt_2(bar): [11:52:13] return "bar > 2" [11:52:13] @foo.when("bar == 2") [11:52:13] def foo_gt_2(bar, baz=24): [11:52:15] return baz [11:52:26] And before hand, you do this: [11:52:27] @generic() [11:52:27] def foo(bar): [11:52:27] pass [11:52:47] <__doc__> ErikRose: right, and what's the package that lives in? [11:54:38] <__doc__> ErikRose: afais I can pick between PyProtocols and Peak, I'm now wildly guessing peak is a dependency of pyprotocols. [11:55:18] http://svn.eby-sarna.com/RuleDispatch/src/ [11:55:57] As far as PEAK and PyProtocols go, I don't remember their relationship. [11:56:47] I don't think RuleDispatch needs PyProtocols, though. [11:56:50] <__doc__> as far as I can tell the svn tree you gave me there isn't a package [11:56:54] it does [11:56:57] <__doc__> well, not a distribution ready one [11:57:08] RuleDispatch depend on PyProt [11:57:16] Thx, whit [11:57:21] np [11:57:33] __doc__: this is the package: http://svn.eby-sarna.com/RuleDispatch/src/dispatch/ [11:58:06] All that stuff outside src is just ez_setup detritus. [11:58:16] <__doc__> http://www.python.org/pypi/RuleDispatch [11:58:21] <__doc__> oO [11:58:36] <__doc__> yes I know, ok see here's my problem. [11:58:55] <__doc__> I need to make something ready for production. I don't much like going against svn versions of something. [11:59:07] There are Debian packages of RuleDispatch. [11:59:19] <__doc__> the little reassurance I get out of it that somebody deems something fixed enough to package is what I find incredibly nice. [11:59:23] But frankly, if you want to use much of Eby's stuff, you'll need to get over that fear. :-) [11:59:49] <__doc__> ErikRose: alright, I just decided I just line that two lines of if/else [12:00:40] k [12:01:13] RuleDispatch *has* been around forever. It's probably the most polished thing Eby's got going right now. Well, that and ez_setup. [12:03:48] <__doc__> Ok look, here's the deal. I've had a hard time around finding the stuff, there's no documentation about it online I saw so far, it's not on the PyPi. Now you tell me I need to get it from a trunk SVN repository. See, since at the end of the day I got to deliver software I stand accountable for, that's a few to many of the redlights. [12:04:56] <__doc__> Ohyeah, and just for the record, using *any* distribution specific package installation mechanism is a big nono because 1) distributors don't "get" python and 2) it's inflexible against multiple packages of the same version, which is what you deal with and which setuptools does a great job btw. [12:05:18] You do know ez_setup is effectively a package manager itself, right? [12:05:42] <__doc__> ErikRose: so? [12:05:53] Well, it's a package manager that "gets" python. [12:06:05] Aside from that, I can't extinguish any of your redlights. [12:06:12] <__doc__> ErikRose: right, as opposed to a package manager (as in debian packages) that do not "get" python [12:06:25] <__doc__> ErikRose: no you can't [12:07:22] I used PEAK for 2 years, and I had to read the source and the mailing list all the time. [12:07:39] The available examples are all out of date. [12:07:54] <__doc__> ErikRose: you do see that's not going to do right? [12:08:09] Hey, you don't have to justify yourself to me. :-) [12:08:22] <__doc__> ErikRose: It's an ah, attitude, I find annoying in projects, at best. [12:08:31] It did work great in my product, for what it's worth. [12:09:14] It's got the most flexible, powerful storage layer I've ever seen in Python. [12:09:18] <__doc__> ErikRose: it's codesmell when documentation and fix releases as well as established packages are missing or out of date. [12:09:40] I agree, it's not ideal. [12:09:40] <__doc__> ErikRose: I stay a waaaaay clear of codesmell. [12:10:33] ** pje has joined us [12:10:50] <__doc__> ErikRose: it basically works the same way like a webframework trying to sell itself to me but has an unusable website. [12:10:56] <__doc__> ErikRose: like say zope [12:11:35] <__doc__> I figure you get the concept. anyway, good day to 2 you. [12:11:38] ** __doc__ has left us [12:12:00] * whit is always amazed by the righteous whiners [12:12:05] Heh, pje, you missed a fun little firefight. [12:12:31] whit, yeah, I had a big fight with my sysadmin when we started using PEAK—over the "alpha" label, no less [12:13:09] The code and design quality are great, but I do miss docs and examples. :-) [12:13:38] yeah...did you ever think about writing up your experiences with the peak storage layer? [12:13:47] What would be your ideal, whit? [12:13:56] i.e. what would you like to see in a writeup? [12:14:11] basic examples of how to set stuff up [12:14:18] Hmm, good idea. [12:14:36] a couple of us plone peeps were considering looking at it for ideas for AT [12:14:47] but really didn't know where to start [12:14:55] Actually, I did publish this: http://peak.telecommunity.com/DevCenter/SqlDm [12:15:02] cool! thanks [12:15:18] It's not docs; it's a SQL object-relational mapper for it. [12:15:27] But it is moderately documented. [12:15:37] I wonder if it's up to date... [12:15:42] Let me make sure. [12:16:02] * whit chuckles at seeing ulrichs code [12:16:13] Yeah, there's not much left of his. [12:16:21] Just that metaclass (which has to go). [12:19:04] Nope, not up to date. Fixing… [12:20:11] :) [12:20:16] thanks ErikRose [12:20:23] Thanks for reminding me. :-) [12:22:45] Okay, posted. [12:22:52] I didn't update the version history, tho. [12:23:50] Ewww. [12:23:53] Wait. This is screwed up. [12:26:36] Re-fixing… [12:28:27] Okay, it's great. [12:28:40] It turned out it wasn't out of date after all. [12:28:56] I made a wrong turn in the recent past and didn't want to publish that disaster. ;-) [12:32:49] danke! [12:32:52] bitte! [16:17:11] pje is now known as pje_mtg [16:42:00] pje_mtg is now known as pje [17:38:17] ** bitmvnch has joined us [18:39:14] ** coderanger_ has left IRC (Read error: 110 (Connection timed out)) [19:14:13] ** coderanger_ has joined us [19:37:39] ** coderanger_ has left IRC (Read error: 110 (Connection timed out)) [20:58:41] ** pje has left IRC ("Client exiting") [23:10:18] ** bitmonk has joined us [23:19:31] ** bitmvnch_ has joined us [23:25:19] ** bitmvnch has left IRC (Read error: 110 (Connection timed out)) [23:28:11] ** whit has left IRC () [23:35:15] ** bitmonk has left IRC (Read error: 110 (Connection timed out)) [23:41:35] bitmvnch_ is now known as bitmonk