[02:03] *** bcarlyon|laptop has joined #kamaelia |
[07:14] < Lawouach_> morning |
[07:16] < Lawouach_> Received my daily spam and this morning one has the following subject |
[07:16] < Lawouach_> Too hard to overcome hangovers? |
[07:17] < Lawouach_> Which is damn appropriate this morning |
[07:51] *** mhrd-afk is now known as mhrd |
[08:15] *** mhrd is now known as mhrd-afk |
[08:16] *** mhrd-afk is now known as mhrd |
[08:22] *** Uraeus has joined #kamaelia |
[09:14] *** mhrd is now known as mhrd-afk |
[10:12] *** orphans has joined #kamaelia |
[10:23] *** bcarlyon|laptop has joined #kamaelia |
[10:31] *** Davbo has joined #kamaelia |
[10:32] *** vmlemon_ has joined #kamaelia |
[11:20] *** matthew-p has joined #kamaelia |
[12:03] < vmlemon_> Hi |
[12:08] < Davbo> Hi vmlemon_ |
[12:10] < bcarlyon|laptop> HI! |
[12:51] *** Davbo can't work out why this method isn't running |
[12:51] < Davbo> I'm probably doing something stupid could someone take a look please? |
[12:51] < Davbo> http://davbo.pastebin.com/d3adfa64b |
[12:53] < Davbo> when i call self.addLayer() nothing happens |
[13:01] < orphans> do you need to break out of waitBox? |
[13:01] *** orphans forgets how it works |
[13:02] < Davbo> it doesn't even print "adding layer" when i call it though |
[13:03] < Davbo> seems odd |
[13:04] < orphans> ahh |
[13:04] < orphans> you got a bigger snippet? |
[13:05] < Davbo> it's commited if you want to update and have a look |
[13:05] < orphans> file? |
[13:05] < Davbo> Paint.py |
[13:06] < orphans> cool, will have a gander now |
[13:06] < Davbo> alternately http://davbo.pastebin.com/d7eb916e8 |
[13:06] < Davbo> thanks orphans |
[13:08] < orphans> :) |
[13:08] < orphans> got it |
[13:08] < orphans> it is working - it should be self.activeLayer = self.layers[0] on line 187 |
[13:09] < orphans> zero indexing is funnnn |
[13:09] < orphans> ohh, but it still doesn't print I don't think - hmm |
[13:10] < Davbo> nah it's not that |
[13:10] < Davbo> there should be 2 things on the list |
[13:10] < orphans> oh, sorry, I'm being an idiot |
[13:10] < orphans> I should really read the code :) |
[13:10] < Davbo> nah it's ugly code just in stages of "getting to work" |
[13:12] < vmlemon_> Hah, http://paster.dazjorz.com/?p=3344 |
[13:14] < orphans> ahh, Davbo, it's cause it's a generator |
[13:14] < Davbo> thought it might have been |
[13:14] *** Davbo was still expecting it to print |
[13:15] < orphans> try changing it to self.addLayer().next() |
[13:16] < Davbo> Okay, it's doing something now lol |
[13:16] < Davbo> Thanks orphans |
[13:16] < orphans> not entirely sure that's right still, but at least it prints :D |
[13:17] < orphans> despite writing them every day I'm still a bit hazy on generators |
[13:17] < orphans> should really read some stuff :) |
[13:18] < Davbo> Yeah me too |
[13:26] < vmlemon_> Ugh, RISC OS has the worst CLI of any OS I've ever used. "Clunky" and "Archaic" spring to mind as the only way I can think of to describe it... |
[13:42] *** MS- has joined #kamaelia |
[14:05] < Davbo> Hah, http://blog.micropledge.com/2008/07/adobe-reader-9/ |
[14:05] < Davbo> (via reddit) |
[14:10] < Lawouach_> Yeah I saw that |
[14:11] < Lawouach_> funny but so true |
[14:11] < Lawouach_> I have switched to Foxit long ago |
[14:13] < vmlemon_> Hah, "You broke my sarcasmeter." |
[14:14] *** vmlemon_ is still using Adobe Reader 8 on Linux, seeing as it's one of the few apps that actually renders PDFs properly in a predictable manner |
[14:14] < Davbo> never had a problem with kpdf |
[14:19] < Lawouach_> me neither |
[14:20] < Davbo> Lawouach_: you busy? |
[14:21] < Davbo> nevermind! :) |
[14:21] < Lawouach_> oh well |
[14:33] < Davbo> Lawouach_ could you have a look at some code for me when you get chance? |
[14:35] < Davbo> http://kamaelia.svn.sourceforge.net/viewvc/kamaelia/trunk/Sketches/DK/Kamaelia-Paint/App/Paint.py?view=markup |
[14:37] < Lawouach_> what am I looking at? |
[14:38] < Davbo> Around line 117 |
[14:38] < Davbo> i wanted an alternative to that little method |
[14:39] < Davbo> because like that it just yields 1 and breaks leaves the method when the data is ready |
[14:40] < Lawouach_> why have you wrapped the dataReady into a new method? |
[14:40] < Lawouach_> why not: |
[14:41] < Lawouach_> while not self.dataReady('callback'): self.pause() |
[14:42] < Davbo> Ahh! |
[14:43] < Davbo> I'd tried doing that earlier but was still treating it like a generatoer |
[14:43] < Davbo> it's not a generator without the yield is it (of course) |
[14:44] < Davbo> oh the waitbox is there for something else i just though I could use it here too |
[14:46] < Davbo> heh, thought i'd already tried that |
[14:46] < Davbo> it pauses it indefinitely |
[15:04] < j_baker> Hey Lawouach_: Does headstock use the selector for anything other than the CSA? |
[15:05] *** MS- has joined #kamaelia |
[15:05] *** MS- is likely to remove checkin privileges from Pablo this weekend |
[15:05] < MS-> I've not had one status update |
[15:06] < MS-> or heard what he actually plans to do next |
[15:06] < MS-> After all: |
[15:06] < MS-> [14:09] < MS-> Can I have daily (short) status updates to the list for the next week in that case as well? [14:09] < MS-> (Or at minimum every other day?) [14:09] < Trun> ok |
[15:06] < MS-> Actually I'll do that now |
[15:07] < Davbo> Removing checkin privileges == kicking off project / GSoC? |
[15:07] < MS-> No. |
[15:08] < MS-> Forcing him to actually communicate what he's doing |
[15:08] < Davbo> Ah good idea then |
[15:08] < MS-> rather than check in a load of crap that no-ones going to use |
[15:08] < MS-> He's still checking in KamPlanet stuff after the rather extensive conversation earlier in the week |
[15:09] < Davbo> Yeah i noticed those ci's when i updated |
[15:10] < j_baker> What exactly is KamPlanet anyway? |
[15:10] < Davbo> it's a blog aggregator thing |
[15:10] < Davbo> like Python Planet |
[15:11] < Davbo> gsoc planet etc |
[15:11] < MS-> j_baker: It was intended to be a *small* test system for Pablo to experiment with |
[15:12] < Davbo> You would expect him to listen more, since you could just sit back let him do whatever then just fail him on SoC |
[15:12] < MS-> Which would enable him to start testing his test frameowrk |
[15:12] < Davbo> but since he's getting so much feedback he's not really got an excuse |
[15:12] < MS-> However he's ending up building a test framework for KamPlanet, rather than a testing framework useful to the rest of us. |
[15:12] < j_baker> I don't think just sitting back and failing him on his project would be in MS-'s best interest anyway. |
[15:13] < MS-> No, not particularly |
[15:13] < MS-> He's working hard and producing code, but hasn't learnt a lesson yet - that he needs to listen and actually look for what people need |
[15:13] < MS-> (in his code) |
[15:13] < Davbo> I agree, just saying he should take on board what is being said more |
[15:14] *** mhrd-afk has joined #kamaelia |
[15:15] < Davbo> it sounded like he understands TDD, i don't see why he's wasting time KamPlanet. Although it's true when some people work on a project they get attached and end up endlessly fixing bugs with it and playing with it |
[15:18] < j_baker> Either that or he's not quite sure how to proceed and is too afraid to ask for help. |
[15:18] < MS-> j_baker: He's producing too much code for that to be the case |
[15:18] < MS-> Davbo: Much more likely IMO |
[15:18] < MS-> The problem is, that he hasn't bothered researching what test suites we *DO* already have |
[15:19] < Davbo> What I was talking about does tend to happen over years not weeks heh |
[15:20] < MS-> and what parts of continuous integration type stuff we do have |
[15:20] < MS-> For example |
[15:20] < MS-> http://kamaelia.sourceforge.net/Docs/Axon/Axon.Component.html |
[15:20] < MS-> has a section: |
[15:20] < MS-> Test documentation |
[15:20] < MS-> which has stuff like |
[15:20] < MS-> Tests passed: |
[15:20] < MS-> * __init__ - Class constructor is expected to be called without arguments. |
[15:20] < MS-> * __addChild - Registers the component as a child of the component. Internal function. ttbw |
[15:20] < MS-> * __str__ - Returns a string that contains the fact that it is a component object and the name of it. |
[15:20] < MS-> * _closeDownMicroprocess - Checks the message returned is None (no knockons). |
[15:20] < MS-> * _closeDownMicroprocess - Returns a shutdownMicroprocess. Internal Function. |
[15:21] < MS-> * addChildren - All arguments are added as child components of the component. |
[15:21] < MS-> Which is actually generated *directly* from the test suite |
[15:21] < MS-> (the output from it) |
[15:21] < MS-> ~/kamaelia/trunk/Tests/Python/Axon> ./test_Component.py -v |
[15:21] < MS-> __init__ - Class constructor is expected to be called without arguments. ... ok |
[15:21] < MS-> __addChild - Registers the component as a child of the component. Internal function. ttbw ... ok |
[15:21] < MS-> __str__ - Returns a string that contains the fact that it is a component object and the name of it. ... ok |
[15:21] < MS-> __str__ - Returns a string representation of the component- consisting of Component,representation of inboxes, representation of outboxes. ... FAIL |
[15:22] < MS-> And the irony is that THAT uses unittest |
[15:22] < Davbo> Yeah, I had a look through quite a bit of the testing stuff just OOI |
[15:23] < Davbo> (when i got the email about them failing or something) |
[15:24] < Davbo> I've got layers now MS- btw. Seems to be fine with just using Pygame Surfaces (which is good news) just implementing them properly now (but stuck a bit atm) |
[15:25] < MS-> cool |
[15:38] *** vmlemon__ has joined #kamaelia |
[15:39] < Davbo> MS-: what boxes does self.pause() check? |
[15:39] < Davbo> inbox/control/outbox/signal? |
[15:40] *** vmlemon__ is now known as vmlemon_ |
[15:40] < MS-> self.pause() sets a flag in the microprocess that says "OK, pause me" |
[15:40] < MS-> to the scheduler |
[15:40] < MS-> a delivery to any inbox |
[15:40] < MS-> or a delivery from any outbox |
[15:41] < MS-> calls the components unpause() |
[15:41] < MS-> method |
[15:41] < MS-> That's why you should do |
[15:41] < MS-> if not self.anyReady(): |
[15:41] < MS-> self.pause() |
[15:41] < MS-> rather than |
[15:41] < MS-> just self.pause() |
[15:41] < Lawouach_> indeed |
[15:42] *** Davbo wonders why his code wont work then :-( |
[15:42] < Lawouach_> goto home |
[15:42] < MS-> comment out your self.pause() lines |
[15:43] < MS-> self.pause() is an optimisation to make the system more friendly |
[15:43] < MS-> optimisations come later, so commenting it out may make things clearer |
[15:43] < j_baker> Just out of curiosity, how could data go out on an outbox if the component is paused? |
[15:44] < MS-> zero copy delivery |
[15:44] < MS-> for Axon.Component's |
[15:44] < MS-> an inbox is implemented as a list |
[15:44] < Davbo> self.send( self.layer, "display_signal") |
[15:44] < Davbo> if not self.dataReady('callback'): |
[15:44] < Davbo> self.pause() |
[15:44] < Davbo> x = self.recv("callback") |
[15:44] < MS-> that list is safe to share between Axon.Components |
[15:44] < MS-> since they run in the same thread |
[15:44] < Davbo> says i'm popping from an empty list MS-, must be something on another box? |
[15:45] < MS-> and can't accidentally be updating the list simultaeniously |
[15:45] < MS-> self.pause() sets a flag |
[15:45] < MS-> it doesn't pause you |
[15:45] < MS-> It's perhaps a misleading name |
[15:45] < MS-> (it is one of the oldest names) |
[15:45] < MS-> self.pauseNextTimeIYield() |
[15:45] < MS-> is more accurate |
[15:46] < MS-> j_baker: when you do self.link |
[15:46] < MS-> under the hood essentially what happens is the inbox and outbox actually end up sharing the same list |
[15:46] < MS-> as a result under all the metaphors the implementation boils down to generators connected by a single list |
[15:47] < MS-> called on one side and inbox and outbox on the other side. |
[15:47] < MS-> If we'd known we were going to do that originally, we'd've just called it "Box" |
[15:47] < MS-> I suspect |
[15:47] < MS-> (which is what the underlying code now does, and what the mini-axon tutorial encourages) |
[15:48] < j_baker> Meh, it helps keep me from doing stupid things like self.send(data, 'inbox') if you have separate inboxes and outboxes. |
[15:48] < j_baker> Or does it? |
[15:48] < MS-> That's actually encouraging to hear :) |
[15:48] < MS-> to me that sounds reasonable :) |
[15:49] < MS-> I've wondered in recent weeks what an inbox/outbox metaphor would look like if we used bidirectional request/response semantics (ie more like HTTP than like UDP) |
[15:50] < j_baker> Davbo: did you try doing while not self.dataReady('callback'): self.pause(); yield 1; ? |
[15:50] < MS-> incidentally.... |
[15:50] < j_baker> I think stackless python does that, doesn't it? |
[15:50] < j_baker> (the bidirectional thing) |
[15:51] < MS-> (Not sure actually) |
[15:51] < MS-> while self.dataReady("inbox"): |
[15:51] < MS-> message = self.recv("inbox") |
[15:51] < MS-> #do something with mesage |
[15:51] < MS-> can also now be written: |
[15:51] < MS-> for message in self.Inbox("inbox"): |
[15:51] < MS-> #do something with |
[15:52] < MS-> Doesn't really help Davbo's example above, but worth bearing in mind |
[15:53] < j_baker> That's actually pretty helpful. I'd been using a getInbox method that returns an iterator over the inbox. |
[15:53] < Davbo> j_baker: that causes another problem :-( |
[15:54] < Davbo> MS-: is it okay if i commit this and you take a look when you get chance please? |
[15:54] < MS-> sure |
[15:54] < MS-> It'll be more obvious if you do |
[15:54] < MS-> :) |
[15:54] < Davbo> thanks |
[15:55] *** Davbo is really sick of this little bit of code |
[15:55] < Davbo> Lawouach and orphans and now j_baker has all helped me with it too lol :-) |
[15:56] < j_baker> Is it possible for a selector to be created but not register itself with the CAT? I'm getting a weird MultipleServiceDeletion exception. |
[16:00] < MS-> I think you'd need to look at the source tbh |
[16:01] < j_baker> I'll look at it more in depth. The thing is that I'm not entirely sure what part of the code is using the selector (other than the CSA). |
[16:02] < MS-> TCPServer, TCPClient & CSA |
[16:02] < MS-> And UnixProcess |
[16:02] < MS-> all have a relationship with it |
[16:02] < MS-> depending on what you're looking at |
[16:03] < j_baker> I think headstock uses the TCPClient. |
[16:03] < Davbo> Hah I think I had the same problem the other day j_baker, registering 2 pygame displays with CAT. That was a problem in my code though |
[16:04] < j_baker> I don't see any reason for headstock to use it any other place, but that's sheer conjecture. |
[16:06] < MS-> dumb q if the answer is yes - do you know how to use grep? |
[16:06] < MS-> (not a dumb q if you do know :-) ) |
[16:06] < MS-> (not a dumb q if you DON'T know I mean) |
[16:07] < Lawouach> back |
[16:08] < j_baker> TBH, I've only used it once or twice for trivial tasks |
[16:18] < j_baker> Ah, I figured it out. I'm just using an outdated version of the selector. :) |
[16:19] < MS-> *slap* |
[16:19] < MS-> :-) |
[16:20] < MS-> Just realised |
[16:20] < MS-> j_baker: Are you working today because you want to, or because you feel you should? |
[16:20] < MS-> If its the former, very cool. If it's the latter very uncool |
[16:21] < MS-> Happy Independence Day :) |
[16:21] < j_baker> Because I want to. :) I honestly hadn't even noticed it was July 4. |
[16:21] < MS-> Cool :) |
[16:21] < MS-> Just checking. :) |
[16:22] < MS-> fwiw, I often end up doing kamaelia stuff on holidays, but that's for "because I want to" reasons rather than "because I should" |
[16:23] < j_baker> Yeah. Plus I'm actually kind of looking forward to what I get with this. |
[16:23] < MS-> Cool :) |
[16:23] < MS-> Now that we've looked in more detail about the specifics of what you actually meant by using XMPP and how it integrates, |
[16:23] < j_baker> Lawouach's done a pretty good job of making headstock fairly easy to use and making sure I actually know how to use it. |
[16:24] < MS-> I'm really interested about how your project can work and some of the possibilities |
[16:24] < MS-> That was always a bit hazy for me :) |
[16:24] < MS-> But the WSGI work part was the primary compelling part - combined with the fact it looked like at least you understood what you wanted ;) |
[16:24] < MS-> :-) |
[16:25] < j_baker> I understand. I now kinda realize that I had focused on a lot of the wrong areas in my application at least in regards to the technical aspects. |
[16:26] < j_baker> (and part of that was my own lack of knowledge of XMPP. I wasn't sure exactly how to use it, but I knew that the model it uses is basically my "peer"/"intermediary" model.) |
[16:27] < MS-> There were weaknesses there, but there was the strength that you sat down and started building stuff, and turning round and saying "how does this look, does that make sense" |
[16:27] < MS-> :) |
[16:30] < j_baker> Yeah. Plus I think the "sandboxed" filesystem idea was kinda cool. Even if it would be kind of difficult technically. |
[16:33] < j_baker> In regards to the AdaptiveCommsComponent, if I set a resource to track, I notice it puts it in a dictionary for tracking (that begins with a _). Is there any reason why I can't access that directly? |
[16:34] < j_baker> Like suppose I want to iterate over the resources I've stored. |
[16:59] *** vmlemon_ has joined #kamaelia |
[18:01] < vmlemon_> o.O http://news.bbc.co.uk/1/hi/business/7490346.stm |
[18:01] < vmlemon_> How strange... |
[19:03] < MS-> Interesting: http://www.jvuletich.org/Squeak/IntroductionToMorphic/Morphic.html |
[19:03] *** Lawouach has joined #kamaelia |
[19:04] < Lawouach> evening |
[19:04] < MS-> evening |
[19:19] < MS-> Chong's system is certainly getting there |
[19:20] < MS-> The rotation is a little odd at present - which I'm sure he knows - but he's definitely making progress |
[19:30] < MS-> One for Davbo: http://bomomo.com/ |
[19:40] < vmlemon_> kamaeliabot: ecky |
[19:40] Reply: Ptang! |
[20:21] *** j_baker-laptop has joined #kamaelia |
[21:28] *** vmlemon__ has joined #kamaelia |
[21:30] *** vmlemon__ is now known as vmlemon_ |
[22:58] *** vmlemon__ has joined #kamaelia |
[22:58] *** vmlemon__ is now known as vmlemon_ |