*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** mithro has joined #tp | 00:00 | |
*** llnz2_64 is now known as llnz | 00:06 | |
alanp | tansell: guess for what? | 00:17 |
---|---|---|
alanp | ohh, the tube thing, ok | 00:17 |
Greywhind | tansell: hmm... question | 00:17 |
tansell | Greywhind, shoot | 00:18 |
Greywhind | tansell: i added a class to extra as follows | 00:19 |
Greywhind | from wx.lib.foldpanelbar import FoldPanelBar | 00:19 |
Greywhind | class wxFoldPanelBar(FoldPanelBar): | 00:19 |
Greywhind | def __init__(self): | 00:19 |
Greywhind | FoldPanelBar.__init__(self) | 00:19 |
tansell | hrm... | 00:25 |
tansell | you want to be doing the following | 00:26 |
tansell | from wx.gizmos import EditableListBox | 00:26 |
tansell | class EditableListBoxXmlHandler(xrc.XmlResourceHandler): | 00:26 |
tansell | that stuff | 00:26 |
tansell | brb | 00:26 |
Greywhind | tansell: sorry, got distracted | 00:26 |
Greywhind | let me know when you're back | 00:26 |
llnz | bbl | 00:32 |
*** llnz has quit IRC | 00:32 | |
tansell-laptop | back | 00:35 |
tansell-laptop | you want to be doing the ResourceHandler stuff | 00:35 |
Greywhind | tansell: ah | 00:36 |
tansell-laptop | Greywhind, make more sense? | 00:47 |
Greywhind | tansell-laptop: still working on it | 00:47 |
tansell-laptop | Greywhind, your basically making a class which handles creation of a foldbar as XRC doesn't know how too | 00:47 |
Greywhind | tansell-laptop: odd that it's in the menu if it doesn't know how | 00:50 |
tansell-laptop | Greywhind, sadly yeah | 00:50 |
Greywhind | tansell-laptop: ok, so after creating the class, what do i do to get it to work? | 00:58 |
Greywhind | what do i add in XRCED? | 00:58 |
tansell-laptop | Greywhind, you shouldn't need to add anything in XRCed, it imports the code in extra and should pick up the new handler | 00:59 |
Greywhind | tansell-laptop: where will it appear? | 01:00 |
tansell-laptop | where will what appear? | 01:00 |
Greywhind | tansell-laptop: the new class | 01:01 |
tansell-laptop | Greywhind, I still have no idea what you mean? | 01:02 |
Greywhind | tansell-laptop: well, i made the new handler | 01:03 |
tansell-laptop | yeah | 01:03 |
Greywhind | tansell-laptop: then in XRCed, i don't see any different controls to put in | 01:04 |
tansell-laptop | so now when loading the xrc file you should no longer get the "unable to load class of type x" error | 01:04 |
Greywhind | tansell-laptop: but if i try to put in the wx.lib.foldpanelbar.FoldPanelBar like it was before, i still get the same error | 01:04 |
tansell-laptop | Greywhind, then your handler class is not working properly | 01:04 |
Greywhind | oh, i think i might see what i was missing | 01:05 |
Greywhind | tansell-laptop: File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/foldpanelbar.py", line 1181, in OnSizePanel | 01:15 |
Greywhind | if self._extraStyle & FPB_COLLAPSE_TO_BOTTOM or self._extraStyle & FPB_EXCLUSIVE_FOLD: | 01:15 |
Greywhind | TypeError: unsupported operand type(s) for &: 'unicode' and 'int' | 01:15 |
Greywhind | tansell-laptop: any ideas? | 01:22 |
Greywhind | i've done things like this: self.AddStyle("FPB_DEFAULT_STYLE", wx.lib.foldpanelbar.FPB_DEFAULT_STYLE) | 01:23 |
tansell-laptop | you can't and a string and an int? | 01:24 |
tansell-laptop | convert self._extraStyle to an int first? | 01:24 |
Greywhind | tansell-laptop: but that's inside the wx library | 01:24 |
Greywhind | tansell-laptop: i'm adding the styles the same way the other class seems to do it. | 01:27 |
tansell-laptop | somewhere you are giving is a string rather then an int | 01:37 |
tansell | if you upload the Cl, I can probably point you to the right location | 01:37 |
Greywhind | tansell: let me paste the class | 01:39 |
Greywhind | http://pastebin.com/d4fa33428 | 01:40 |
tpb | Title: pastebin - collaborative debugging tool (at pastebin.com) | 01:40 |
tansell | your constructor is wrong I think | 01: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 |
tansell | your giving the name as style | 01:44 |
tansell | s/style/extraStyle/ | 01:44 |
Greywhind | ah | 01:44 |
Greywhind | tansell: yeah, that fixed it | 01:48 |
Greywhind | tansell: how can i get the panel to have a scrollbar? | 02:01 |
tansell | not sure | 02:03 |
tansell | add it inside a scrollable window? | 02:03 |
Greywhind | tansell: well, when it was using a tree it seemed to have a scrollbar automatically | 02:04 |
tansell | the tree probably has an embedded scrollbar | 02:04 |
Greywhind | tansell: replacing the panel with a scrolled window doesn't seem to have any effect | 02:07 |
tansell | you need to set the inner size to be big enough to scroll | 02:11 |
tansell | see the demo | 02:11 |
Greywhind | ok | 02:11 |
Greywhind | tansell: blog posted, i'm stopping for today | 02:50 |
Greywhind | tansell: could you look at http://codereview.mithis.com/4001 sometime? | 02:51 |
tpb | Title: Issue 4001: Fixed method of determining when to show "you have no objects" warning for tp04. - Code Review (at codereview.mithis.com) | 02:51 |
tansell | Greywhind, done | 02:53 |
tansell | epyon, poke me when you get up | 02:54 |
*** llnz has joined #tp | 03:07 | |
*** jnengland77 has quit IRC | 03:09 | |
*** greenlion has joined #tp | 03:10 | |
*** nash_ has quit IRC | 03:19 | |
*** Greywhind has quit IRC | 04:05 | |
*** peres has left #tp | 04:47 | |
*** peres has joined #tp | 05:22 | |
*** llnz2 has joined #tp | 05:22 | |
*** llnz has quit IRC | 05:22 | |
*** llnz2 is now known as llnz | 05:22 | |
*** greenlion has quit IRC | 05:26 | |
*** greenlion has joined #tp | 05:53 | |
* llnz wanders off | 07:59 | |
llnz | later all | 07:59 |
*** llnz has quit IRC | 07:59 | |
*** mithro has quit IRC | 08:35 | |
epyon | tansell: poke | 09:30 |
*** bddebian has joined #tp | 10:02 | |
CIA-46 | joelboh tpclient-pyweb * r0a75a37e9bd6 /frontend/scripts/map.js: Frontend: Fixed login bug. | 10:30 |
epyon | O.o | 10:34 |
tote | o.O? | 10:35 |
*** peres has quit IRC | 11:10 | |
tote | im lost, how does orders work in libtpproto-py and libtpclient-py :/ | 11:18 |
cherez | I don't know, and I'm writing them right now. :/ | 11:27 |
CIA-46 | epyon tpserver-cpp-refactor * re1d40bf53c74 /tpserver/playertcpconn.cpp: | 11:40 |
CIA-46 | PlayerTcpConnection preliminary cleanup | 11:40 |
CIA-46 | * style cleanup | 11:40 |
CIA-46 | * logging messages update | 11:40 |
CIA-46 | * shorthands for failframes | 11:40 |
*** greenlion has quit IRC | 11:43 | |
*** greenlion has joined #tp | 11:43 | |
tote | can you only see your own orders? | 11:47 |
tote | cherez: what are you working on? | 12:14 |
cherez | libtpproto2-py. | 12:14 |
tote | is it for tp04? | 12:16 |
cherez | It can pretty easily support tp03 or tp04. | 12:17 |
cherez | Well, it *will* pretty easily support either. | 12:18 |
tote | libtpproto2 is a rewrite? | 12:18 |
cherez | Yeah. | 12:18 |
tote | cool :) | 12:21 |
cherez | I like to think so. | 12:21 |
*** alanp has quit IRC | 12:28 | |
*** Erroneous has joined #tp | 13:05 | |
*** jnengland77 has joined #tp | 13:07 | |
Landon | yay I have power back! | 13:23 |
*** Greywhind has joined #tp | 13:33 | |
*** alanp has joined #tp | 13:37 | |
*** alanp has quit IRC | 15:19 | |
*** Greywhind has quit IRC | 15:47 | |
*** jnengland77 has quit IRC | 15:58 | |
*** llnz has joined #tp | 16:02 | |
*** Greywhind has joined #tp | 16:21 | |
*** bddebian has quit IRC | 16:41 | |
*** jnengland77 has joined #tp | 16:58 | |
*** alanp has joined #tp | 17:33 | |
*** greenlion has quit IRC | 17:44 | |
*** mhilmi has joined #tp | 18:21 | |
*** nash has joined #tp | 19:03 | |
*** Arpman has quit IRC | 19:12 | |
*** peres has joined #tp | 19:34 | |
*** CIA-46 has quit IRC | 19:35 | |
*** CIA-21 has joined #tp | 19:40 | |
*** bddebian has joined #tp | 19:53 | |
cherez | tansell: Ping? | 20:34 |
tansell-laptop | cherez, pong | 20:37 |
cherez | Any objections to me rewriting the parser to use DOM? | 20:37 |
cherez | I am focusing on maintainability and I find DOM XML models to be much easier to grok. | 20:37 |
tansell-laptop | depends | 20:38 |
tansell-laptop | a DOM model has a large number of downsides | 20:38 |
cherez | More memory usage and more CPU usage come to mind, am I overlooking anything else? | 20:40 |
tansell | less validation | 20:41 |
tansell | IE it's preferrable that the system dies when there is something it doesn't understand | 20:42 |
tansell | the whole fail where the failure is idea | 20:42 |
tansell | it's very easy to prove with a SAX parser that you didn't get any unknown values | 20:44 |
cherez | Mmm. | 20:44 |
tansell | what about the current parser is confusing? | 20:45 |
cherez | Nothing in particular, it was mostly just keeping all of the list that had to keep state straight. | 20:46 |
cherez | It also doesn't at present support Enumerations or parametersets, and implementing those would require adding code in quite a few places. | 20:48 |
tansell | it does? I would think it should only be a small amount of code? | 20:48 |
cherez | Enumeration wouldn't be too bad. | 20:48 |
cherez | But the code at several points assumes all structures are in packets. | 20:49 |
cherez | So I'd have to revise those to make parametersets work. | 20:49 |
Greywhind | tansell: 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 |
tansell | Greywhind, you might have to poke them with a SetSize or something | 20:50 |
tansell | Greywhind, I have no experiance with foldpanels | 20:50 |
tansell | cherez, almost ready for our weekly meeting? | 20:51 |
cherez | Almost. | 20:51 |
cherez | I was waiting on your call on DOM or no-DOM before writing up my weekly summary. | 20:52 |
tansell | well - I have not really said no yet - but you need to do a better job of convincing me :) | 20:53 |
cherez | I 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 |
cherez | The 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 |
tansell | cherez, I would also suggest you use something like simplexml rather then the full annoying dom | 20:56 |
cherez | Well, in about an hour I wrote a parser that is on-par with the old one for functionality using minidom. | 20:57 |
tansell | how available is minidom? | 20:57 |
cherez | Standard library. | 20:57 |
cherez | Since 2.0. | 20:58 |
tansell | great | 21:01 |
cherez | In 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 |
tansell | what about time to parse the file? | 21:04 |
cherez | Wasn't perceivable to me; I can timeit if you want numbers. | 21:05 |
cherez | .06 seconds on my system. | 21:09 |
tansell | 60ms? | 21:15 |
*** mithro has joined #tp | 21:15 | |
cherez | Yeah. | 21:15 |
cherez | I don't think that would be restrictive on any at all modern systems. | 21:19 |
tansell | cherez, okay | 21:24 |
tansell | cherez, so where are you at? | 21:24 |
tansell | what have you done in the past week? | 21:24 |
cherez | Well, I've been sick the last few days, so I admit my productivity has been way down since then. | 21:26 |
cherez | I made unit tests that cover most everything except parametersets (and thus Object and Order), and made quite a few cleanups throughout parser. | 21:27 |
epyon | BTW, tansell, any complaints on my work as a GSoC student? | 21:28 |
epyon | Anything I could improve on? | 21:28 |
cherez | And 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 |
tansell | cherez, do you have a CL that you can show me? | 21:29 |
tansell | and new coverage reports? | 21:29 |
tansell | epyon, you going to be around in 15 minutes? or are you heading out? | 21:29 |
epyon | Basically it's 4:05 here, so I should be long ago asleep, but I think I'll still be here ;) | 21:30 |
epyon | Duh 3:33, my bad | 21:30 |
alanp | haha | 21:30 |
cherez | Well, parser chokes on parameterlists, so I can't give very useful coverage reports yet. | 21:31 |
epyon | since I dropped my full-time job I have a tendency to stay up late again ^_^ | 21:31 |
tansell | cherez, just comment it out? :P | 21:31 |
tansell | epyon, I think one of the biggest things you could to to improve tpserver-cpp would be to remove all the hand parsing of protocol packets | 21:31 |
epyon | Hand parsing? | 21:32 |
alanp | I think XML importation of properties & components needs to be pushed into every ruleset that is still under development (all?) | 21:32 |
llnz | epyon: ignore tansell, does doesn't know what he is talking about | 21:33 |
tansell | epyon, the parseInt stuff | 21:33 |
llnz | you mean packInt, unpackInt, etc | 21:33 |
epyon | D: | 21:33 |
tansell | yeah those | 21:33 |
cherez | tansell: 83% coverage on the SAX parser and 90% on the DOM. | 21:34 |
llnz | why? | 21:34 |
llnz | it works fine currently | 21:34 |
tansell | llnz, it's a mess, it's hard to maintain and it's leaking everywhere in the codebase | 21:34 |
llnz | it would be far more work to setup anything else | 21:34 |
cherez | I haven't looked very closely at the coverage yet, been more focused on getting all the functionality first. | 21:34 |
tansell | there is no reason it couldn't all be hidden by the network layer | 21:34 |
tansell | cherez, okay | 21:34 |
epyon | I'll think about it | 21:35 |
tansell | it's specially going to get more annoying if you have ASIO | 21:35 |
epyon | ASIO had something that could be useful afaik | 21:36 |
llnz | tansell: asio doesn't make a difference | 21:37 |
tansell | llnz, sure it does, it means you can never block on reading from the socket | 21:37 |
llnz | the pack and unpack occur into *Buffers*, not on or off the wire | 21:37 |
llnz | we don't block now | 21:37 |
tansell | so when reading the headers you don't block? | 21:38 |
llnz | yes, we don't block | 21:38 |
tansell | and why should the ruleset modules care about the network protocol? | 21:39 |
llnz | tansell: they don't, except for tp03 support | 21:39 |
llnz | which was required because you didn't get around to tp04 | 21:40 |
llnz | tpserver-cpp has been non-blocking since feburary 2007 | 21:41 |
epyon | :D | 21:41 |
tansell | cherez, soo... where is this blog report? | 21:44 |
tansell | cherez, you can upload "inprogress" cl's too | 21:44 |
cherez | tansell: I put up the report, but there's not really much that I didn't just tell you. | 21:51 |
tansell | so the last commit to the repository was 4 days ago? | 21:54 |
tansell | it would be better if you worked on smaller commits | 21:56 |
tansell | as well when you do a squash commit the first line should be a description of the commit did | 21:56 |
cherez | Alright. | 21:56 |
tansell | so how do you think you are progressing? | 22:03 |
tansell | do you think you'll have a finished libtpproto2-py by the end of GSoC? | 22:03 |
tansell | do you think you'll have time to start porting libtpclient-py to the new protocol library? | 22:03 |
tansell | we are roughly 1/3 of the way through GSoC | 22:04 |
cherez | I think so. | 22:05 |
cherez | If I understand correctly I'm through a large portion of the core. | 22:06 |
cherez | There'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 |
cherez | Whoa, something is really weird with Group in the SAX parser. | 22:13 |
epyon | Ok I'm heading to sleep *yawn* g'night! | 22:22 |
*** Erroneous has quit IRC | 22:46 | |
tansell | cherez, so in the overall picture what do you think you have left to do? | 22:48 |
cherez | Well, 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 |
cherez | Common and Client look like they'll have quite a bit of code to test, and I imagine server will be similar. | 22:52 |
cherez | Then I believe there were 4 different discover protocols that need to be ported (along with their common interface). | 22:53 |
cherez | Probably quite a bit of work, but I imagine there will be a lot of overlap between them. | 22:54 |
cherez | Three of them are Zeroconf implementations, after all, so I expect there will be crossover knowledge. | 22:55 |
tansell | any plans on how to test it? | 22:55 |
tansell | do you have a mac? | 22:55 |
cherez | No; I think I could hunt one down if I really need one. | 22:56 |
tansell | the bonjour stuff only runs on Mac | 23:05 |
cherez | Right, Bonjour is Apple's.... | 23:07 |
cherez | Well, I have time to track down a shell on a Mac. | 23:07 |
*** jnengland77 has quit IRC | 23:11 | |
*** jnengland77 has joined #tp | 23:12 | |
*** jnengland77 has joined #tp | 23:14 | |
*** jnengland77 has joined #tp | 23:15 | |
ezod | tansell: ping? | 23:23 |
tansell | ezod, pong? | 23:23 |
alanp | hey | 23:23 |
ezod | i guess i'll let alanp ask since he's here | 23:24 |
ezod | basically, 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 |
alanp | we want to support multiple tubes/racks/etc up to a limit of the ship size | 23:25 |
alanp | how do i make sure the design doesn't exceed the ship size | 23:26 |
alanp | basically | 23:26 |
ezod | i was about to look at winDesign.py - i'm not very familiar with the design stuff really | 23:27 |
tansell | look at the ncl.php stuff on the web | 23:29 |
ezod | http://www.thousandparsec.net/tp/dev/documents/ncl.php | 23:30 |
tpb | <http://ln-s.net/J7d> (at www.thousandparsec.net) | 23:30 |
alanp | how will this work on the client end? are the messages passed back to the client? | 23:31 |
alanp | and if so, don't they just go to the message box ? | 23:32 |
tansell | TPCL Requirement function | 23:33 |
tansell | take a look at that | 23:33 |
alanp | right, i use that for the components already | 23:33 |
alanp | hmm | 23:34 |
alanp | I guess I could decrement the Size property of the ship on each component add? | 23:34 |
llnz | alanp: other way around | 23:35 |
alanp | add to it? | 23:35 |
llnz | each component should have it's size, and the requirements functino of the hull requires that it's less than the hull size | 23:36 |
alanp | right | 23:36 |
llnz | the size property should just add the component size together | 23:36 |
alanp | be incremented with each component? | 23:37 |
alanp | by the size of the component, i mean | 23:37 |
llnz | yeah | 23:41 |
alanp | and then check maxsize | 23:41 |
alanp | on each component add | 23:41 |
llnz | no, not on each component add | 23:41 |
alanp | on final? | 23:42 |
llnz | the properties of each component are evaluated, then the properties for the design are calcuated, then the requirement functions tested | 23:42 |
alanp | ok | 23:43 |
alanp | so, a battle scout is of size 88 | 23:43 |
alanp | is any of that size reserved? | 23:43 |
llnz | these calcuations are already done for you | 23:43 |
llnz | alanp: as far as i know, no | 23:44 |
alanp | ok | 23:44 |
alanp | so size is actually kind of like "expansion size" | 23:45 |
llnz | so the battle scout hull will check in the requirements func whether size <= 88.0 | 23:45 |
alanp | awesome | 23:45 |
alanp | that makes things a lot clearer for me, thank you | 23:45 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!