Wednesday, 2010-07-14

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
*** StrangerDanger has quit IRC00:13
*** StrangerDanger has joined #tp00:27
*** Agon-laptop has quit IRC00:40
*** verhoevenv has quit IRC02:21
*** ezod has quit IRC02:26
*** ezod has joined #tp02:33
*** nash has joined #tp02:46
*** StupidIncarnate has joined #tp03:16
*** glew has quit IRC03:44
*** mithro has joined #tp03:59
llnzbbl04:32
*** llnz has quit IRC04:32
*** bisc has joined #tp05:06
matthewdStupidIncarnate: hey05:35
bisctansell: ping05:40
tansellbisc, pong05:40
bisctansell: I'd like to have your review for http://codereview.mithis.com/8500105:41
tpbTitle: Issue 85001: Halfway patch for right click menu. - Code Review (at codereview.mithis.com)05:41
tansellbisc, you can revert the change to windows/main/panelOrder.py05:43
biscoops, haven't noticed it. Just a second.05:44
StupidIncarnatetey there matthewd05:47
bisctansell: updated this issue.05:48
tanselllooking at it now05:48
tansellbisc, looking pretty good - some comments added05:53
matthewdStupidIncarnate: So, I agree that you still seem to be a bit ahead of schedule, which is great05:58
tansellmatthewd / StupidIncarnate: do you have a demo up somewhere people can test with?05:59
StupidIncarnatenope. if you set me up some server space i can06:01
matthewdtansell: Good idea... I'll set it up on my server06:01
matthewdIt'll give me a chance to try out the new from-scratch install instructions, too06:01
bisctansell: what's the generic way to find object's coordinates? Through objectutils.getPositionList?06:04
tansellbisc, yeah06:05
tansellI'm not sure of the correct way to handle the fact that objects might have multiple positions06:05
tansell(IE a wormhole has two positions)06:05
*** cahirwpz has joined #tp06:06
matthewdLooks like I'm about 0.2ms away from verbal, so I don't foresee latency issues :)06:06
bisctansell: ok, I think we can postpone decisions about multiple positions now.06:06
tansellcahirwpz, ping?06:07
StupidIncarnateso anything have to happen for midterm matthewd?06:08
StupidIncarnatewant anything from me?*06:08
bisctansell: can you have a look at updated game info window http://codereview.mithis.com/79001 ?06:08
tpbTitle: Issue 79001: Game info window. - Code Review (at codereview.mithis.com)06:08
matthewdStupidIncarnate: Don't think so06:09
StupidIncarnatek then just the survey thing06:09
matthewdStupidIncarnate: I guess now's probably a good time to ask, how are you feeling about your overall progress etc?06:10
matthewdI guess the fact you're ahead of schedule suggests you wouldn't feel terrible :)06:11
tansellbisc, LGTM06:11
StupidIncarnateit's been good, being ahead is better than when I was behind at the start06:11
matthewdBut yeah... are you enjoying what you're doing, feeling accomplishment, that sort of thing06:12
StupidIncarnateprobably when I get the design panel done06:12
StupidIncarnatei mean the redesign felt accomplishmenty I suppose, though it's not completely done06:13
cahirwpztansell, pong - it's 8 am here, I'm trying to wake up ;)06:13
tansellStupidIncarnate, we should sit down sometime and work through the problems you are having libtpclient-py06:13
StupidIncarnateam I having problems with it?06:14
StupidIncarnatedon't remember06:14
tansellStupidIncarnate, with the cache stuff06:14
StupidIncarnateoh ya.... I put that out of mind06:14
bisctansell: I've got problems with wrapping in Information panel. The problem is that wx.StaticText doesn't want to resize vertically for wrapping in automatic mode. It either takes all size that it can get, or doesn't resize at all. Have you ever confronted such a problem?06:19
tansellbisc, possibly but it was a long time ago06:20
bisctansell: small patch for moving a method http://codereview.mithis.com/87001. Just though it's better to place it in objectutils.06:24
bisctansell: what do you think about placing a checkbox 'automatically close' in Update window? I already hate clicking it myself, and any player won't like it as well.06:32
cahirwpztansell, ping?06:45
*** llnz has joined #tp06:54
llnzhi all06:54
cahirwpzhi llnz :)06:56
llnzhi cahirwpz07:02
cahirwpzllnz, I found very interesting article about protocol serialization / deserialization frameworks - you might want to read it07:04
cahirwpzhttp://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking07:04
tpb<http://ln-s.net/7Fk-> (at code.google.com)07:05
llnzcahirwpz: will have a look07:06
cahirwpzllnz, I don't know how exactly protocol handling looks like in C++ tpserver version, but Google Protocol Buffer might be an inspiration if you look to perform some refactoring there07:07
cahirwpzlook at the code here: http://code.google.com/p/protobuf/07:07
tpbTitle: protobuf - Project Hosting on Google Code (at code.google.com)07:07
llnzcahirwpz: currently Eypon is working on porting to boost ASIO07:10
llnzas part of GSoC07:10
*** StupidIncarnate has quit IRC07:22
*** bisc has quit IRC07:31
*** Greywhind has quit IRC07:50
*** Greywhind has joined #tp07:51
*** bisc has joined #tp08:57
*** bisc has quit IRC09:00
*** bisc has joined #tp09:07
* llnz finds the root cause of a MTSec bug09:26
*** null_000 has joined #tp09:26
tansellcahirwpz, pong09:37
cahirwpztansell, hi09:37
tansellso we should continue from our last conversation09:37
cahirwpztansell, I need some help - I don't exactly understand what was the purpose of 'public', 'protected', 'private' access level in attributes09:38
tansellpublic == send/receive the raw value straight from the packet09:39
tansellprotected == send/recieve a value from a packet after processing09:39
tansellprivate - only used server side09:39
cahirwpzI almost finished attributes / parameters stuff and I'll move to logging / configuration soon09:39
tansellwhat is the attributes/parameter stuff?09:41
cahirwpzhttp://github.com/cahirwpz/tpserver-py/blob/master/tp/server/rules/base/objects/Fleet.py09:42
tpb<http://ln-s.net/7Fn7> (at github.com)09:42
cahirwpzlines 13-2809:42
cahirwpzit's replacement for SQLTypedBase / Attribute09:42
cahirwpztansell, why did you introduce public / protected / private access level - what did you want to achieve by that ?09:45
tansellwe needed a system which describes what properties an object/order had09:48
tansellwhich is needed for both the packet serialisation and the database stuff09:48
tansellthe09:50
tanselldef desc_packet(cls, sequence, typeno):09:50
tansellmethod uses this information to build a description of an order09:50
tansellthe same was planned for the object09:50
tansellwhen tp04 support was added09:50
tansellunderstand?09:52
cahirwpzlets say I need to read sources once again09:53
cahirwpzI have some clues, but not the answer09:53
tansellcahirwpz, the functions you want to look at are09:54
tansellhttp://github.com/thousandparsec/tpserver-py/blob/master/tp/server/bases/SQL.py#L32709:55
tpb<http://ln-s.net/7FnS> (at github.com)09:55
CIA-29llnz tpserver-cpp * rda756453eb39 /modules/games/mtsec/buildfleet.cpp:09:55
CIA-29Fixed BuildFleet in MTSec, now works again.09:55
CIA-29Over aggressive updating during merge of refactoring of last year's GSoC.09:55
tansellhttp://github.com/thousandparsec/tpserver-py/blob/master/tp/server/bases/SQL.py#L36909:55
tpb<http://ln-s.net/7FnT> (at github.com)09:55
tansellcahirwpz, those two functions use the Attribute information to serialise/unserialise the DB09:56
cahirwpztansell, that has actually been already replaced in my fork09:58
tansellcahirwpz, the other functions which use the information are09:58
tansellhttp://github.com/thousandparsec/tpserver-py/blob/master/tp/server/bases/SQL.py#L43709:59
tpb<http://ln-s.net/7FnX> (at github.com)09:59
tanselland09:59
tansellhttp://github.com/thousandparsec/tpserver-py/blob/master/tp/server/bases/SQL.py#L46809:59
tpb<http://ln-s.net/7FnY> (at github.com)09:59
tansellwhich are the to/from packet methods09:59
cahirwpz... I see09:59
cahirwpzI need to think about this for a while10:00
cahirwpzthis might be related to the idea of separating protocol from model implementation10:01
tansellthe idea is that they are doing two very similar things10:02
tansellconverting from the internal objects to another protocol10:02
tansell(Either SQL or Thousand Parsec protocol)10:02
*** cahirwpz_ has joined #tp10:04
*** cahirwpz has quit IRC10:05
*** cahirwpz_ is now known as cahirwpz10:05
cahirwpztansell, lets leave the topic for now10:05
*** nash has quit IRC10:05
cahirwpztansell, what about finishing the discussion from Monday ?10:06
tansellso we where discussing the twisted change and the ORM change10:09
tansellI iterated why I'm concerned with the ORM change10:10
tansellcahirwpz, we also discussed some future things which the ORM would need to support10:12
cahirwpzmhm... I remember now10:13
cahirwpzregarding object versioning I came up with idea of Model View10:14
* llnz wanders off10:15
llnzlater all10:15
*** llnz has quit IRC10:15
cahirwpzI still think about it and it's very vague at the moment - but it will be flexible enough to implement fog of war, and other weird ideas10:15
cahirwpzbasically - what we want is to create many views on objects in universe, possibly assigning each player a different view10:16
cahirwpzif players are in kind of military union we might need to merge their views10:16
cahirwpzso in fact there should be some mechanism (in ruleset probably) which knows how to generate a model view10:18
cahirwpzeach model view should be represented in database by kind of DB snapshot10:19
cahirwpzprobably read only10:19
cahirwpzI generally have high-level idea how to do it - I some more time to think about details10:20
cahirwpzsqlalchemy.orm is in fact able to map any class, set of classes, python built-in collection, so we're only limited by the design - ie. we're able to achieve exactly the same results not using DB at all but without persistence10:25
cahirwpzI believe that if we prepare a good design of model (one that avoids O(n log n) or O(n^2) and slower algorithms) we can effectively map in onto database using ORM10:28
cahirwpzhmm... model view can introduce some really interesting ideas like illusionary star systems, space cloning, whatever you can imagine...10:33
cahirwpztansell, I also noticed that sooner or later we will need some solid vector / matrix library in rulesets - what do you think about that?10:35
tansellcahirwpz, why?10:36
cahirwpzto catch some structures and functions into method and object (vector3d, length, move, etc.)10:40
cahirwpzlook at: http://github.com/cahirwpz/tpserver-py/blob/master/tp/server/rules/minisec/orders/Move.py10:40
tpb<http://ln-s.net/7FoO> (at github.com)10:40
cahirwpzfor example line 5510:40
cahirwpzwouldn't be clearer to write "d = self.pos - obj.pos" ?10:41
cahirwpzline 111:10:42
cahirwpz"distance = d.length()"10:42
cahirwpzor even for lines 110-111:  "distance= ( self.pos - obj.pos ).length()"10:43
tansellcahirwpz, sure - but a trivial vector class would do - why need a full matrix/vector library?10:43
cahirwpztansell, I did not suggest any big solution ;-)10:44
cahirwpztansell, I only suggested that there's need to find a library to shorten such code10:44
cahirwpzmaybe something small like that: http://code.google.com/p/pyeuclid/10:45
tpbTitle: pyeuclid - Project Hosting on Google Code (at code.google.com)10:45
cahirwpzit fits in a single file10:45
cahirwpzI would prefer to leave decision up to you10:46
cahirwpzyou probably have got a better idea what kind of 3d math library is needed in tpserver-py10:47
cahirwpztansell, quick question10:52
cahirwpzhttp://github.com/cahirwpz/tpserver-py/blob/master/tp/server/rules/base/objects/Fleet.py10:52
tpb<http://ln-s.net/7Fn7> (at github.com)10:52
cahirwpzlines 38-4210:52
cahirwpzis it a list of actions that can be applied to an object (Fleet in this case) ?10:53
tansellcahirwpz, I want something which doesn't require an external dependency10:53
tansellcahirwpz, preferably something which is short too10:53
cahirwpztansell, euclid looks perfect - single file, imports only standard python modules10:54
cahirwpzhttp://pyeuclid.googlecode.com/svn/trunk/euclid.py10:55
tpb<http://ln-s.net/7Fo_> (at pyeuclid.googlecode.com)10:55
tansellcahirwpz, it's a list of orders which are valid for an object10:56
cahirwpzwe can do it (math library) ourselves but obviously it's reinventing a wheel and a huge waste of time10:56
cahirwpztansell, valid == applicable ?10:57
cahirwpztansell, because I cannot say that splitting one ship fleet is valid action10:58
cahirwpzyou can apply such action to the fleet, but it should return that request is invalid10:59
tansellcahirwpz, it's not that easy10:59
cahirwpzO.o10:59
tansellthere might be a merge fleet order before the split fleet order10:59
cahirwpzaahhh... that's another thing I don't like - Order class responsibilities is mixed with Action class stuff11:03
cahirwpz* are11:03
cahirwpzI'd like to separate classes that represent data (Orders) from classes that operate on data (Actions)11:04
cahirwpzthat seems more logical to me11:05
tansellActions are things which only happen server side11:12
tanselland are generally more general11:12
tansellthings like cleaning up dead objects from the universe11:13
tanselland such11:13
tansellorders are specific things that an object does11:13
cahirwpzAFAIK each order is associated with an action11:15
cahirwpztansell, have a look at http://github.com/cahirwpz/tpserver-py/blob/master/tp/server/rules/base/orders/Colonise.py11:16
tpb<http://ln-s.net/7Fp1> (at github.com)11:16
tansellI'm using Actions/Order in the terms tpserver-py does11:16
cahirwpzIMHO do() method should be put into separate class (ColoniseAction?) and should require a reference to ColoniseOrder when called11:17
tansellcahirwpz, why would that help?11:17
tansellcahirwpz, everything the ColoniseAction needs is in the ColoniseOrder11:17
cahirwpztansell, separation of concern, cleaning up class hierarchy11:18
tansellthere is no point in an Order which has no effect11:19
cahirwpzColoniseOrder does inherit Object (implicitly)11:19
cahirwpzin old tp-server explicitly11:19
cahirwpzbut should also inherit Action11:19
cahirwpzouch...11:20
cahirwpzColoniseOrder inherits Order, of course11:20
cahirwpzso in the end ColoniseOrder should inherit Order and Action - possibly having too much of responsibility11:21
cahirwpz"everything the ColoniseAction needs is in the ColoniseOrder" - I'd rather say that some Actions are associated with Orders, and some not - that's exactly the place you should introduce two kind of different Action classes11:23
cahirwpzhttp://stackoverflow.com/questions/760473/inheritance-vs-composition-for-testability - I think they describe what I really mean11:26
tpb<http://ln-s.net/7FpE> (at stackoverflow.com)11:26
cahirwpzI would avoid deriving ColoniseOrder from Order and Action, and I'd split it in into two classes11:27
cahirwpzColoniseAction would comprise ColoniseOrder11:28
cahirwpzI'd gladly see most of Orders reorganized in this way11:29
cahirwpzmoreover - Actions does not need to be represented in model, where Orders do - that makes them quite different11:31
*** null_000 has quit IRC11:31
tansellwell I need to head out now11:37
tansellcahirwpz, it seems to me to add just another level of complexity for no gain11:38
cahirwpzplease read stackoverflow link11:38
tansellcahirwpz, I did and it is not very convincing11:38
cahirwpzhmm...11:38
cahirwpzcoloniseAction.order = coloniseOrder, and changing few lines in do() body - from self.attribute to self.order.attribute - that's not very complicated11:42
cahirwpzanyway - for now it's not crucial but I'll return to this topic soon11:43
tansellbut what is the advantage?11:44
*** mithro has quit IRC11:44
cahirwpztansell, smaller classes, cleaner responsibility, class hierarchy based on single inheritance11:44
cahirwpztansell, purely non-functional improvements11:45
cahirwpztansell, try to think of it in following terms: Order is not an Action, order placing is an action; after order is placed it will be served by some action in near future; depending on order type some action is selected to satisfy it; action may need data contained in order to perform11:58
*** Agon has joined #tp11:59
*** mithro has joined #tp12:21
*** Agon has quit IRC13:39
*** null_000 has joined #tp14:04
null_000hi everyone14:04
null_000alanp: ping14:04
*** verhoevenv has joined #tp14:13
*** mithro has quit IRC14:43
alanpnull_000: pong14:50
null_000alanp: hey14:56
alanpwhat's up, i just saw on twitter that llnz committed something to mtsec14:56
null_000alanp: have to check it out14:56
null_000midterm evaluations have started14:57
alanp=D14:57
null_000is there anything special I need to do? (apart from the questionnaire)14:57
alanphis commit message is fixed buildfleet, i';ll take a look at what happened14:58
alanpno, i don't think so14:58
null_000I'll compile and test it... hope it works15:00
alanpi think it's on the main branch though15:00
alanpare you still having problems with it?15:00
null_000build fleet bug was one of the main problems15:05
null_000I'll have to check if there is anything else preventing me from using it15:05
alanpcool15:07
alanpi'll start killing some of the smaller bugs as well15:09
alanplet me know how the master branch is working for you now15:09
*** ezod has quit IRC15:25
*** Agon has joined #tp15:49
*** Epyon has joined #tp15:55
*** bisc has quit IRC16:57
*** Erroneous has joined #tp17:06
*** cahirwpz has quit IRC17:24
*** glew has joined #tp17:44
*** ezod has joined #tp17:51
*** StrangerDanger has quit IRC18:25
*** StrangerDanger has joined #tp18:37
*** StupidIncarnate has joined #tp19:16
*** null_000 has quit IRC19:22
*** llnz has joined #tp19:22
llnzmorning all19:22
StupidIncarnatemorning19:26
Agonhello19:26
llnzhi Agon19:33
llnzsee my comment on your commit (on github)?19:33
* llnz trys to remember who was having trouble with MTSec19:37
Agonyes, I do. I changed the code. Is it normal that double x = 0.001D; C++ code cant be compiled, because my compiler does?19:37
llnzi don't know19:38
llnzwhat compiler are you using?19:38
AgonI have problems with minisec, libtpproto-cpp and objects with size of 019:38
Agongcc (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292]19:38
llnzg++ (Debian 4.4.4-6) 4.4.4 here19:42
llnzoh?19:43
*** Epyon has quit IRC19:46
Agonyes, if the getName() method of a ObjectParameter returns "Size" I do a static_cast<SizeObjectParam*> cast on the ObjectParameter and the debuger tells me the value size is 0. Name and description are correct.19:47
llnzodd, but you shouldn't use the parameter name to determin the type19:48
llnzusing a dynamic_cast or the ObjectParameterVisitor19:49
AgonI read that dynamic_cast requires some kind of tracking, I dont know much about type casting.19:50
*** StrangerDanger has quit IRC19:52
AgonI will adjust my code and use the ObjectParameterVisitor, its a nice idea.19:54
*** epyon-sa1ura has joined #tp19:57
alanpllnz: we were having issues with submitting orders on a planet once colonized20:01
llnzright, what branch and what client?20:02
llnz(and what dev work is being done?)20:02
*** StrangerDanger has joined #tp20:09
alanpan older mtsec branch20:10
alanpi'll test latest tonight20:10
alanpwhat do you mean, what dev work is being done?  on the problem?20:10
alanpi've had my hands tied with other stuff lately, but some of that is coming to a conclusion now20:10
alanpalthough i'm going on vaca in a week20:10
llnzso master branch has a number of fixes for mtsec, but a few bugs still20:11
llnzcan20:11
llnzcan't test some because of libtpclient-py bugs20:11
llnz(in tp04)20:11
alanpwhich?20:12
alanpwhich bugs in master, which in tp?20:12
alanptp04*20:12
alanpi can devote probably ~6 hours this weekend20:13
llnzso i can't test the problem you are having because the tpclient-pywx branch tp04 has had it's reference to libtpclient-py updated for the hack around20:15
alanphack around?20:17
llnzor not, hold on20:17
alanpi remember there benig some problem with a reference20:17
alanpi think i just had an older tpclient20:17
llnzi just pulled that update, didn't make a difference20:23
epyon-sa1uradammit20:25
llnzgetting "ValueError: The object isn't new enough to update the dictionary with! Current 2010-07-15 08:22:38, update 2010-07-15 08:19:01" when downloading universe info for after when a fleet arrives20:25
llnzhi epyon-sa1ura20:25
epyon-sa1urallnz: I'll join you later, my main PC just died...20:26
llnzok20:26
epyon-sa1urahonestly, things can't get much worse dammit20:26
Agonllnz: How is the ObjectParameterVisitor designed to use? I overloaded the class and all its functions, called the visitObjectParameter method with a ObjectParameter value but the compiler doesn't like ambiguous overloaded calls.20:33
llnzAgon: the other way around, pass you ObjectParameterVisitor to the visit method of the ObjectParameter20:35
llnzthe objectParameter will then call the correct method from the ObjectParameterVisitor20:39
Agonah thanks20:40
llnzepyon-sa1ura: just compiled up your code20:51
llnzonly thing to fix is the move the mysql includes from mysqlpersistence.cpp to mysqlpersistence.h20:52
llnz*after* the include for boost mutex20:52
epyon-sa1urallnz: there aren't many changes20:52
epyon-sa1uramain work is on that damn PC I'm trying to bring up now20:53
llnzi'm happy with you committing non-working code to your repo20:55
llnzif you want20:55
llnzmight be a good idea20:55
epyon-sa1uraI'll try to recover the files at least20:55
epyon-sa1urallnz: how about I setup a separate folder for the new core?20:55
epyon-sa1urait will be temporary -- afterwards I'll move the files into the normal folder20:56
llnzthat's a good idea, but don't move it back afterwards20:57
llnzsplit the core of the server into logical directories20:58
llnz(or modules, if you will, but not loadable modules)20:58
llnzwe already have tinyxml and battlexml directories20:59
llnzhaving a server directory is a good move21:00
epyon-sa1urahmm21:08
Agonllnz: I am using the ObjectParameterVisitor, now, great idea. But I am still getting object sizes of 0 and ResourceLists with 0 items.21:13
llnzAgon: what object?21:14
llnzoh, must be a planet21:14
llnzwhich planet?21:15
Agonall objects I receive which have a Position3dObjectParam21:17
Agonand for the size of 0: all objects which have a SizeObjectParam21:18
AgonAnd I receive same positions for multiple objects21:19
llnzok, will look into it21:21
llnzit is possible for multiple objects to be at the same position21:21
llnzAgon: what ruleset?21:25
*** StupidIncarnate has quit IRC21:25
Agonllnz: quickstart-minisec.conf21:26
llnzthe universe should have a size of 100000000000021:30
llnzplanets have a size of 221:30
llnzand star systems around 30000-9000021:31
Agonoh so I cant use the size to draw different sized planets :(21:33
llnzwell, the size could change22:00
llnzbe different for different planets22:01
*** Agon has quit IRC22:08
*** Agon-laptop has joined #tp22:09
llnzbbs, going to work22:22
*** llnz has quit IRC22:22
*** StrangerDanger has quit IRC22:52
*** StrangerDanger has joined #tp22:54
*** llnz has joined #tp23:37

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