[00:07] *** erikcw has joined #kamaelia
[08:40] *** Uraeus has joined #kamaelia
[09:21] *** MS- has joined #kamaelia
[09:21] < MS-> greetings
[09:28] < Lawouach> heya mate
[09:29] < MS-> How's things?
[09:37] < Lawouach> good
[09:37] < Lawouach> sitting at home on the bench
[09:38] < Lawouach> watching Ramsay's kitchen nightmare
[09:38] < Lawouach> while coding
[09:40] *** MS- nods
[09:40] < MS-> That's good to hear
[09:40] < MS-> Today I'm mostly working on polishing up and packaging some work code
[09:41] < MS-> (packaging up ideally so I never have to work on again)
[09:42] < Lawouach> :)
[09:42] < MS-> The kamaelia bits (where interesting) will get merged onto somewhere convenient
[09:42] < Lawouach> okay
[09:43] < MS-> This time of year is both good & bad at r&d. If you're working on a good project, it's bad - you risk it being shutdown in favour of something else.
[09:43] < MS-> If you're working on a bad project, it's good - you're likely to be able to move over to something better :)
[09:44] < MS-> I'm in the latter camp at the moment :)
[09:44] < Lawouach> ah ah
[09:44] < Lawouach> great :)
[09:44] < Lawouach> well today I'll be coding on amplee (atompub lib)
[09:44] < Lawouach> the next version is going to be more like an atom toolbox
[09:45] < Lawouach> stripped down of all the useless bits
[09:45] < Lawouach> also switching to amara2 which is rather great (even if still in early beta stage)
[09:45] < Lawouach> I've been using whoosh to index atom documents
[09:46] < Lawouach> and though whoosh has great stuff it also suffers from a lack of feedback in its API IMO
[09:46] < Lawouach> I'm fighting against it at the moment
[09:55] < MS-> interesting
[09:56] < MS-> makes sense. Is whoosh that recent pure python search thingy ?
[09:56] < Lawouach> yes
[09:56] < Lawouach> but internally the code is not that efficient
[09:56] < Lawouach> not just in terms of speed but in the way it does things
[09:56] *** MS- nods
[09:57] < Lawouach> what pisses me off right now is the following use case
[09:57] < Lawouach> I index atom entries using their aom id as the unique key to distinguish between them
[09:57] < Lawouach> but when I want to update the indexed values for that atom entry, what whoosh does is a "delete+add"
[09:58] < Lawouach> the problem is that if you try to delete several times the same indexed document, it'll raise an error
[09:58] < Lawouach> but if you don't delete it, you end up with several indexed documents all pointing at the same entity so to speak
[09:59] < Lawouach> it's just inconvenient
[09:59] *** MS- nods
[09:59] < MS-> seems a little odd
[09:59] < Lawouach> yeah
[09:59] < MS-> probably matches some original usecase/scenario they had at a guess
[09:59] < Lawouach> My thoughts too
[10:00] < MS-> or at least as a boundary case or perhaps a "gap behind the sofa" case (ie didn't think of it and code fell down the back... :) )
[10:00] < Lawouach> yeah
[10:01] < Lawouach> but what interests me in whoosh is its various index and query algorithms
[10:01] < Lawouach> I could index entries myself but I wouldn't do that as well
[10:01] *** MS- nods
[10:06] < Lawouach> oh MS-
[10:06] < MS-> ?
[10:06] < Lawouach> I have something that could be fun with Kamaelia
[10:06] < Lawouach> hang on
[10:06] *** MS- waits :)
[10:07] < Lawouach> http://pyevolve.sourceforge.net/wordpress/?p=203
[10:07] < Lawouach> could that be done with K?
[10:07] < Lawouach> I found it fun :)
[10:08] *** MS- looks
[10:09] < Lawouach> brb
[10:10] < MS-> yes. Definitely. Using Chong's new 3D topology code.
[10:31] < Lawouach> indeed
[10:32] < Lawouach> and I was thinking, you could display the messages of a user then click on one to be read aloud by a synthetiser voice
[10:32] < Lawouach> could be quite fun
[10:32] < MS-> heh, that could be quite fun
[10:32] < MS-> Quite simple too
[10:32] < Lawouach> indeed
[10:32] < Lawouach> most of the code is probably there
[10:33] < MS-> interesting. Thinking about it that's the sort of thing that many people would not consider simple.
[10:33] < MS-> I like that
[10:33] < MS-> (that's the underlying core goal I have with all code that I write really)
[10:33] < MS-> (if it doesn't make it easy to do hard stuff, it doesn't add)
[10:34] < Lawouach> indeed
[10:35] < MS-> I'll try not to spend today writing that, but I think I ought to write that example up. :)
[10:35] < MS-> esp given the twitter API makes this sort of thing easy.
[10:36] < Lawouach> sorry if I kill your efficiency :)
[10:37] < MS-> hehe
[10:37] < MS-> It's hard to concentrate on annoying things when interesting things are thrown your way ;-) :-D
[10:37] < MS-> But I would rather get the interesting things thrown my way rather than not :)
[10:41] < Lawouach> :p
[12:39] < MS-> Ha! Have now figured out (finally) the config options on my mobile for sending MMS :-)
[12:40] < MS-> (since it wasn't ever configured for my mobile network I feeling vaguely happy about that :-) )
[12:56] < Lawouach> :p
[15:31] *** eikenberry has joined #kamaelia
[16:31] *** MS- leaves for home
[16:31] < MS-> back later
[16:31] *** MS- has parted #kamaelia
[16:52] *** vmlemon_ has joined #kamaelia
[18:50] *** Davbo has joined #kamaelia
[18:51] < Davbo> Hey all
[19:11] *** MS- has joined #kamaelia
[19:12] < MS-> evening
[19:21] < Davbo> Hey MS-
[20:48] *** TheBashar has joined #kamaelia
[20:49] < TheBashar> I'm new to kamaelia. I'd like to write a simple tcp server bound to multiple ports. I can do this easily with twisted ( http://pastebin.com/m764fb662 ), but my brain doesn't fit twisted in general. Is there an analogous way to do this in Kamaelia?
[22:21] < Patrick`> sounds easy enough
[22:27] < TheBashar> Any pointers on how to bind a simple server to a block of ports?
[22:28] < MS-> Oh, just seen this q.
[22:30] < MS-> 2 secs
[22:31] < MS-> OK, given a protocol handler getting created either by a class or factory function:
[22:31] < MS-> ie
[22:31] < MS-> def myProtocol():
[22:31] < MS-> ...
[22:31] < MS-> or
[22:31] < MS-> class myProtoco(...)
[22:31] < MS-> ...
[22:31] < MS-> http://pastebin.com/m48140445
[22:32] < MS-> ie simply loop through the ports you wish to listen on an pass it the same factory
[22:32] < MS-> If you wanted you could customise them such that it knows which port the handers are created on as well
[22:34] < TheBashar> Thank you. That helps. For resource conservation, is there any way to have a single handler listen on all the ports? As apposed to creating a bunch of individual handlers.
[22:35] < MS-> Well, under the hood what's really happening is you're creating a socket and each socket in practice only listens to one port
[22:35] < MS-> As a result TCPServer which is the raw component that creates the listener socket only watches one such socket
[22:35] < TheBashar> I see, so there's no really way to multiplex to a single handler.
[22:35] < MS-> In practice though that's then handed back to a select statement which them will listen to it
[22:36] < MS-> Well, if you want to send all the inputs on all ports to a single component, then the easiest way to do that is to use a backplane component
[22:36] < MS-> Backplane is kinda a swiss army component for plumbing things
[22:37] < MS-> Backplane("somename") creates a backplane
[22:37] < MS-> PublishTo("somename") does the obvious
[22:37] < MS-> SubscribeTo("somename") also does the obvious
[22:37] < MS-> so if you really want every connection to end up going to one place you can do that
[22:38] *** MS- finds a link to a splitting server
[22:38] < MS-> from the systems perspective though btw, whether you have 10 connections on one port or 10 on different ones it doesn't make much difference :)
[22:39] < MS-> (if you hook them up to a backplane that is)
[22:39] < TheBashar> I'll give that a shot. Thank you for the help!
[22:40] < MS-> you're welcome :)
[22:40] < MS-> btw, simple swarming radio source:
[22:40] < MS-> http://code.google.com/p/kamaelia/source/browse/trunk/Sketches/MPS/Examples/LUGRadio/SimpleSwarmRadioSource.py
[22:40] < MS-> This is the generic client: http://code.google.com/p/kamaelia/source/browse/trunk/Sketches/MPS/Examples/LUGRadio/SimpleSwarm.py
[22:41] < TheBashar> Yes, true. I'm just trying to make a very simple QOTD type server that can listen on blocks of ports. Then I'll use my client to scan through the ports trying to connect to the server. The idea is to find any ports that my corporate firewall will let me get out on.
[22:41] < MS-> Ahhhh. I see :)
[22:44] < MS-> untested, but perhaps what you want:
[22:44] < MS-> http://pastebin.com/m4e34eb3a
[22:46] < TheBashar> Yes, that looks like it. Thank you very much. I know it's a silly little thing, but as things get more complicated twisted really buries me, so I'm trying to start with the little things with kamaelia. Thanks so much!
[22:46] < MS-> You're very welcome :)
[22:47] < MS-> It's nice to make people's lives simpler :)
[22:48] < MS-> OK, I'm calling it a night :) If you have further q's btw, the channel is logged and there's also the mailing list :)
[22:48] < TheBashar> Thanks!
[22:48] *** MS- is now known as ms-afk
[22:49] *** TheBashar has parted #kamaelia
[23:50] *** TheBashar has joined #kamaelia
[23:52] < TheBashar> I can't install kamaelia on vista with python 2.6.1. Anybody seen this problem before?
[23:52] < TheBashar> File "C:\Program Files\Python26\lib\distutils\util.py", line 164, in convert_p
[23:52] < TheBashar> ath
[23:52] < TheBashar> raise ValueError, "path '%s' cannot be absolute" % pathname
[23:52] < TheBashar> ValueError: path '/usr/local/share/kamaelia' cannot be absolute