Brian Ray's Blog

Painting is just another way of keeping a diary. --Picasso

Fri, 11 Nov 2005

November Chipy Meeting

This month's Chipy meeting was a huge success: Good location, great speakers, and amazing turnout.

I can't believe how far we have come from sharing nachos at Goose Island a year and a half ago.

This months topic "Remote, Generic and Random", just like us!

Presentations

Generic Functions (aka RuleDispatch) Ian Bicking

This was Ian's best talk yet: well delivered, fun, interesting, and a strong topic.

Dispatch brings true Polymorphism to Python Functional programming. I always wondered how this could be handled in Python. Basically, Ian revealed how to dispatch used decorators to do type checking on function prototypes. I also found this nice article about PEAK's Dispatch.

From the article, here is a very simple example:

import dispatch

@dispatch.on('foo')
def doIt(foo, other, args):
    "Base generic function of 'doIt()'"

@doIt.when(int)
def doIt(foo, other, args):
    print "foo is an int |", other, args

@doIt.when(str)
def doIt(foo, other, args):
    print "foo is a str |", other, args

doIt( 1, 'this','that')  # -> foo is an int | this that
doIt('x','this','that')  # -> foo is a str | this that

So, doIt now has two prototypes and a default action. Nice generic programming!

Thanks Ian.

The Random module Robert Ramsdell

Robert gave us a good field trip into Random land. He covered all major aspects including the story behind Python's switch to MersenneTwister (original C source) from Wichmann-Hill.

The explanation went into several use cases for random seeds for pair on objects. For example, on nice backreferrece was to Robert's earlier talk on SimPy, a event simulation package. He used a similar seeded random pair to serialize asynchronous events by logging the random output. A creative approach. I imagine the report could remain cleaner and to a higher level of accuracy with a fewer numbers than if a time stamp was used.

PYRO (Python Remote Objects) Fawad Halim

Fawad went into a great detail on how and when to use Python Remote Objects. PYRO comparison to other techniques of remote communication SOAP, XMLrpc, was quite insightful.

Although I have not used PYRO, I can definitely can now see some future applications. PYRO basically allows client server communication between Python applications over TCP on a LAN. I see where PYRO method of pickling Python objects can be lighter weight than using XML. Because the two or chain of computers behave (practically) as one I see where the physical architecture can create a Cluster. To me this means either the possibly of more horsepower or the ability to power peripherally computer operations from a centralized location.

Great talk Fawad. BTW, I now clearly see this PYRO is not this one, although I still bet you I can power my robot with either ;)

All in All

Typically, I find myself nodding off in any meeting longer than 1 1/2 hours. However, this crew kept it exciting. Also, I want to thank Chris McAvoy and Performics for sponsoring the meeting.