Tuesday, 2009-06-16

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
*** mithro has joined #tp00:00
*** llnz2_64 is now known as llnz00:06
alanptansell: guess for what?00:17
alanpohh, the tube thing, ok00:17
Greywhindtansell: hmm... question00:17
tansellGreywhind, shoot00:18
Greywhindtansell: i added a class to extra as follows00:19
Greywhindfrom wx.lib.foldpanelbar import FoldPanelBar00:19
Greywhindclass wxFoldPanelBar(FoldPanelBar):00:19
Greywhinddef __init__(self):00:19
GreywhindFoldPanelBar.__init__(self)00:19
tansellhrm...00:25
tansellyou want to be doing the following00:26
tansellfrom wx.gizmos import EditableListBox00:26
tansellclass EditableListBoxXmlHandler(xrc.XmlResourceHandler):00:26
tansellthat stuff00:26
tansellbrb00:26
Greywhindtansell: sorry, got distracted00:26
Greywhindlet me know when you're back00:26
llnzbbl00:32
*** llnz has quit IRC00:32
tansell-laptopback00:35
tansell-laptopyou want to be doing the ResourceHandler stuff00:35
Greywhindtansell: ah00:36
tansell-laptopGreywhind, make more sense?00:47
Greywhindtansell-laptop: still working on it00:47
tansell-laptopGreywhind, your basically making a class which handles creation of a foldbar as XRC doesn't know how too00:47
Greywhindtansell-laptop: odd that it's in the menu if it doesn't know how00:50
tansell-laptopGreywhind, sadly yeah00:50
Greywhindtansell-laptop: ok, so after creating the class, what do i do to get it to work?00:58
Greywhindwhat do i add in XRCED?00:58
tansell-laptopGreywhind, you shouldn't need to add anything in XRCed, it imports the code in extra and should pick up the new handler00:59
Greywhindtansell-laptop: where will it appear?01:00
tansell-laptopwhere will what appear?01:00
Greywhindtansell-laptop: the new class01:01
tansell-laptopGreywhind, I still have no idea what you mean?01:02
Greywhindtansell-laptop: well, i made the new handler01:03
tansell-laptopyeah01:03
Greywhindtansell-laptop: then in XRCed, i don't see any different controls to put in01:04
tansell-laptopso now when loading the xrc file you should no longer get the "unable to load class of type x" error01:04
Greywhindtansell-laptop: but if i try to put in the wx.lib.foldpanelbar.FoldPanelBar like it was before, i still get the same error01:04
tansell-laptopGreywhind, then your handler class is not working properly01:04
Greywhindoh, i think i might see what i was missing01:05
Greywhindtansell-laptop:   File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/foldpanelbar.py", line 1181, in OnSizePanel01:15
Greywhind    if self._extraStyle & FPB_COLLAPSE_TO_BOTTOM or self._extraStyle & FPB_EXCLUSIVE_FOLD:01:15
GreywhindTypeError: unsupported operand type(s) for &: 'unicode' and 'int'01:15
Greywhindtansell-laptop: any ideas?01:22
Greywhindi've done things like this: self.AddStyle("FPB_DEFAULT_STYLE", wx.lib.foldpanelbar.FPB_DEFAULT_STYLE)01:23
tansell-laptopyou can't and a string and an int?01:24
tansell-laptopconvert self._extraStyle to an int first?01:24
Greywhindtansell-laptop: but that's inside the wx library01:24
Greywhindtansell-laptop: i'm adding the styles the same way the other class seems to do it.01:27
tansell-laptopsomewhere you are giving is a string rather then an int01:37
tansellif you upload the Cl, I can probably point you to the right location01:37
Greywhindtansell: let me paste the class01:39
Greywhindhttp://pastebin.com/d4fa3342801:40
tpbTitle: pastebin - collaborative debugging tool (at pastebin.com)01:40
tansellyour constructor is wrong I think01:44
tansell    def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize,01:44
tansell                 style=FPB_DEFAULT_STYLE, extraStyle=FPB_DEFAULT_EXTRASTYLE):01:44
tansellyour giving the name as style01:44
tansells/style/extraStyle/01:44
Greywhindah01:44
Greywhindtansell: yeah, that fixed it01:48
Greywhindtansell: how can i get the panel to have a scrollbar?02:01
tansellnot sure02:03
tanselladd it inside a scrollable window?02:03
Greywhindtansell: well, when it was using a tree it seemed to have a scrollbar automatically02:04
tansellthe tree probably has an embedded scrollbar02:04
Greywhindtansell: replacing the panel with a scrolled window doesn't seem to have any effect02:07
tansellyou need to set the inner size to be big enough to scroll02:11
tansellsee the demo02:11
Greywhindok02:11
Greywhindtansell: blog posted, i'm stopping for today02:50
Greywhindtansell: could you look at http://codereview.mithis.com/4001 sometime?02:51
tpbTitle: Issue 4001: Fixed method of determining when to show "you have no objects" warning for tp04. - Code Review (at codereview.mithis.com)02:51
tansellGreywhind, done02:53
tansellepyon, poke me when you get up02:54
*** llnz has joined #tp03:07
*** jnengland77 has quit IRC03:09
*** greenlion has joined #tp03:10
*** nash_ has quit IRC03:19
*** Greywhind has quit IRC04:05
*** peres has left #tp04:47
*** peres has joined #tp05:22
*** llnz2 has joined #tp05:22
*** llnz has quit IRC05:22
*** llnz2 is now known as llnz05:22
*** greenlion has quit IRC05:26
*** greenlion has joined #tp05:53
* llnz wanders off07:59
llnzlater all07:59
*** llnz has quit IRC07:59
*** mithro has quit IRC08:35
epyontansell: poke09:30
*** bddebian has joined #tp10:02
CIA-46joelboh tpclient-pyweb * r0a75a37e9bd6 /frontend/scripts/map.js: Frontend: Fixed login bug.10:30
epyonO.o10:34
toteo.O?10:35
*** peres has quit IRC11:10
toteim lost, how does orders work in libtpproto-py and libtpclient-py :/11:18
cherezI don't know, and I'm writing them right now. :/11:27
CIA-46epyon tpserver-cpp-refactor * re1d40bf53c74 /tpserver/playertcpconn.cpp:11:40
CIA-46PlayerTcpConnection preliminary cleanup11:40
CIA-46* style cleanup11:40
CIA-46* logging messages update11:40
CIA-46* shorthands for failframes11:40
*** greenlion has quit IRC11:43
*** greenlion has joined #tp11:43
totecan you only see your own orders?11:47
totecherez: what are you working on?12:14
cherezlibtpproto2-py.12:14
toteis it for tp04?12:16
cherezIt can pretty easily support tp03 or tp04.12:17
cherezWell, it *will* pretty easily support either.12:18
totelibtpproto2 is a rewrite?12:18
cherezYeah.12:18
totecool :)12:21
cherezI like to think so.12:21
*** alanp has quit IRC12:28
*** Erroneous has joined #tp13:05
*** jnengland77 has joined #tp13:07
Landonyay I have power back!13:23
*** Greywhind has joined #tp13:33
*** alanp has joined #tp13:37
*** alanp has quit IRC15:19
*** Greywhind has quit IRC15:47
*** jnengland77 has quit IRC15:58
*** llnz has joined #tp16:02
*** Greywhind has joined #tp16:21
*** bddebian has quit IRC16:41
*** jnengland77 has joined #tp16:58
*** alanp has joined #tp17:33
*** greenlion has quit IRC17:44
*** mhilmi has joined #tp18:21
*** nash has joined #tp19:03
*** Arpman has quit IRC19:12
*** peres has joined #tp19:34
*** CIA-46 has quit IRC19:35
*** CIA-21 has joined #tp19:40
*** bddebian has joined #tp19:53
chereztansell: Ping?20:34
tansell-laptopcherez, pong20:37
cherezAny objections to me rewriting the parser to use DOM?20:37
cherezI am focusing on maintainability and I find DOM XML models to be much easier to grok.20:37
tansell-laptopdepends20:38
tansell-laptopa DOM model has a large number of downsides20:38
cherezMore memory usage and more CPU usage come to mind, am I overlooking anything else?20:40
tansellless validation20:41
tansellIE it's preferrable that the system dies when there is something it doesn't understand20:42
tansellthe whole fail where the failure is idea20:42
tansellit's very easy to prove with a SAX parser that you didn't get any unknown values20:44
cherezMmm.20:44
tansellwhat about the current parser is confusing?20:45
cherezNothing in particular, it was mostly just keeping all of the list that had to keep state straight.20:46
cherezIt also doesn't at present support Enumerations or parametersets, and implementing those would require adding code in quite a few places.20:48
tansellit does? I would think it should only be a small amount of code?20:48
cherezEnumeration wouldn't be too bad.20:48
cherezBut the code at several points assumes all structures are in packets.20:49
cherezSo I'd have to revise those to make parametersets work.20:49
Greywhindtansell: so i've got a question. the foldpanels don't seem to ever resize themselves back down as the window changes size or their contents collapse, even if they don't need all the space they're using. how can i fix that?20:50
tansellGreywhind, you might have to poke them with a SetSize or something20:50
tansellGreywhind, I have no experiance with foldpanels20:50
tansellcherez, almost ready for our weekly meeting?20:51
cherezAlmost.20:51
cherezI was waiting on your call on DOM or no-DOM before writing up my weekly summary.20:52
tansellwell - I have not really said no yet - but you need to do a better job of convincing me :)20:53
cherezI don't think the CPU or memory overhead in DOM would be significant, and I think even with validation the code complexity would be more readily manageable, but it's your call.20:53
cherezThe full DOM model of protocol.xml is about 2.7 megs, which I think will be less than most the clients would need anyway after the DOM model will be GCed.20:55
tansellcherez, I would also suggest you use something like simplexml rather then the full annoying dom20:56
cherezWell, in about an hour I wrote a parser that is on-par with the old one for functionality using minidom.20:57
tansellhow available is minidom?20:57
cherezStandard library.20:57
cherezSince 2.0.20:58
tansellgreat21:01
cherezIn code it's about half as many lines, but I don't have much validation yet, so that's probably overstating the size difference.21:01
tansellwhat about time to parse the file?21:04
cherezWasn't perceivable to me; I can timeit if you want numbers.21:05
cherez.06 seconds on my system.21:09
tansell60ms?21:15
*** mithro has joined #tp21:15
cherezYeah.21:15
cherezI don't think that would be restrictive on any at all modern systems.21:19
tansellcherez, okay21:24
tansellcherez, so where are you at?21:24
tansellwhat have you done in the past week?21:24
cherezWell, I've been sick the last few days, so I admit my productivity has been way down since then.21:26
cherezI made unit tests that cover most everything except parametersets (and thus Object and Order), and made quite a few cleanups throughout parser.21:27
epyonBTW, tansell, any complaints on my work as a GSoC student?21:28
epyonAnything I could improve on?21:28
cherezAnd this morning, since my brain was sharp as a damp noodle I was getting nowhere adding functionality to the parser, so I did the DOM rewrite.21:28
tansellcherez, do you have a CL that you can show me?21:29
tanselland new coverage reports?21:29
tansellepyon, you going to be around in 15 minutes? or are you heading out?21:29
epyonBasically it's 4:05 here, so I should be long ago asleep, but I think I'll still be here ;)21:30
epyonDuh 3:33, my bad21:30
alanphaha21:30
cherezWell, parser chokes on parameterlists, so I can't give very useful coverage reports yet.21:31
epyonsince I dropped my full-time job I have a tendency to stay up late again ^_^21:31
tansellcherez, just comment it out? :P21:31
tansellepyon, I think one of the biggest things you could to to improve tpserver-cpp would be to remove all the hand parsing of protocol packets21:31
epyonHand parsing?21:32
alanpI think XML importation of properties & components needs to be pushed into every ruleset that is still under development (all?)21:32
llnzepyon: ignore tansell, does doesn't know what he is talking about21:33
tansellepyon, the parseInt stuff21:33
llnzyou mean packInt, unpackInt, etc21:33
epyonD:21:33
tansellyeah those21:33
chereztansell: 83% coverage on the SAX parser and 90% on the DOM.21:34
llnzwhy?21:34
llnzit works fine currently21:34
tansellllnz, it's a mess, it's hard to maintain and it's leaking everywhere in the codebase21:34
llnzit would be far more work to setup anything else21:34
cherezI haven't looked very closely at the coverage yet, been more focused on getting all the functionality first.21:34
tansellthere is no reason it couldn't all be hidden by the network layer21:34
tansellcherez, okay21:34
epyonI'll think about it21:35
tansellit's specially going to get more annoying if you have ASIO21:35
epyonASIO had something that could be useful afaik21:36
llnztansell: asio doesn't make a difference21:37
tansellllnz, sure it does, it means you can never block on reading from the socket21:37
llnzthe pack and unpack occur into *Buffers*, not on or off the wire21:37
llnzwe don't block now21:37
tansellso when reading the headers you don't block?21:38
llnzyes, we don't block21:38
tanselland why should the ruleset modules care about the network protocol?21:39
llnztansell: they don't, except for tp03 support21:39
llnzwhich was required because you didn't get around to tp0421:40
llnztpserver-cpp has been non-blocking since feburary 200721:41
epyon:D21:41
tansellcherez, soo... where is this blog report?21:44
tansellcherez, you can upload "inprogress" cl's too21:44
chereztansell: I put up the report, but there's not really much that I didn't just tell you.21:51
tansellso the last commit to the repository was 4 days ago?21:54
tansellit would be better if you worked on smaller commits21:56
tansellas well when you do a squash commit the first line should be a description of the commit did21:56
cherezAlright.21:56
tansellso how do you think you are progressing?22:03
tanselldo you think you'll have a finished libtpproto2-py by the end of GSoC?22:03
tanselldo you think you'll have time to start porting libtpclient-py to the new protocol library?22:03
tansellwe are roughly 1/3 of the way through GSoC22:04
cherezI think so.22:05
cherezIf I understand correctly I'm through a large portion of the core.22:06
cherezThere's quite a few discover modules to write, but I imagine I'll get the hang of those and be able to knock them off pretty quickly once I get up to speed.22:08
cherezWhoa, something is really weird with Group in the SAX parser.22:13
epyonOk I'm heading to sleep *yawn* g'night!22:22
*** Erroneous has quit IRC22:46
tansellcherez, so in the overall picture what do you think you have left to do?22:48
cherezWell, the files I haven't gotten to are "protocol2dicts" which doesn't look too bad, then "common" and "client", and I believe I need to write a "server" too.22:51
cherezCommon and Client look like they'll have quite a bit of code to test, and I imagine server will be similar.22:52
cherezThen I believe there were 4 different discover protocols that need to be ported (along with their common interface).22:53
cherezProbably quite a bit of work, but I imagine there will be a lot of overlap between them.22:54
cherezThree of them are Zeroconf implementations, after all, so I expect there will be crossover knowledge.22:55
tansellany plans on how to test it?22:55
tanselldo you have a mac?22:55
cherezNo; I think I could hunt one down if I really need one.22:56
tansellthe bonjour stuff only runs on Mac23:05
cherezRight, Bonjour is Apple's....23:07
cherezWell, I have time to track down a shell on a Mac.23:07
*** jnengland77 has quit IRC23:11
*** jnengland77 has joined #tp23:12
*** jnengland77 has joined #tp23:14
*** jnengland77 has joined #tp23:15
ezodtansell: ping?23:23
tansellezod, pong?23:23
alanphey23:23
ezodi guess i'll let alanp ask since he's here23:24
ezodbasically, how does one limit how many components can be added to a design based on the size of the thing they're being added to?23:25
ezod(i think?)23:25
alanpwe want to support multiple tubes/racks/etc up to a limit of the ship size23:25
alanphow do i make sure the design doesn't exceed the ship size23:26
alanpbasically23:26
ezodi was about to look at winDesign.py - i'm not very familiar with the design stuff really23:27
tanselllook at the ncl.php stuff on the web23:29
ezodhttp://www.thousandparsec.net/tp/dev/documents/ncl.php23:30
tpb<http://ln-s.net/J7d> (at www.thousandparsec.net)23:30
alanphow will this work on the client end?  are the messages passed back to the client?23:31
alanpand if so, don't they just go to the message box ?23:32
tansellTPCL Requirement function23:33
tanselltake a look at that23:33
alanpright, i use that for the components already23:33
alanphmm23:34
alanpI guess I could decrement the Size property of the ship on each component add?23:34
llnzalanp: other way around23:35
alanpadd to it?23:35
llnzeach component should have it's size, and the requirements functino of the hull requires that it's less than the hull size23:36
alanpright23:36
llnzthe size property should just add the component size together23:36
alanpbe incremented with each component?23:37
alanpby the size of the component, i mean23:37
llnzyeah23:41
alanpand then check maxsize23:41
alanpon each component add23:41
llnzno, not on each component add23:41
alanpon final?23:42
llnzthe properties of each component are evaluated, then the properties for the design are calcuated, then the requirement functions tested23:42
alanpok23:43
alanpso, a battle scout is of size 8823:43
alanpis any of that size reserved?23:43
llnzthese calcuations are already done for you23:43
llnzalanp: as far as i know, no23:44
alanpok23:44
alanpso size is actually kind of like "expansion size"23:45
llnzso the battle scout hull will check in the requirements func whether size <= 88.023:45
alanpawesome23:45
alanpthat makes things a lot clearer for me, thank you23:45

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!