Saturday, 2009-03-07

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
mithroezod: poke poke?00:08
CIA-69mithro libtpclient-py-singleplayer * rd7e6101a92dc /tp/client/SinglePlayer.py: Make the code a little clearer.00:45
CIA-69mithro tpclient-pywx-singleplayer * r696226a0eabb /windows/winConnect.py: First steps towards cleaning up the single player code.00:45
*** Greywhind has quit IRC02:55
*** peres has joined #tp04:32
*** bdefreese2 has joined #tp10:56
*** welterde has quit IRC10:57
*** Demitar has quit IRC10:57
*** ezod has quit IRC10:57
*** gau_veldt has quit IRC10:57
*** tuna-fish has quit IRC10:57
*** shenki has quit IRC10:57
*** mithro has quit IRC10:57
*** DTRemenak has quit IRC10:57
*** JLP has quit IRC10:57
*** mithro has joined #tp10:57
*** tuna-fish has joined #tp10:57
*** JLP has joined #tp10:57
*** DTRemenak has joined #tp10:57
*** Demitar has joined #tp10:57
*** welterde has joined #tp10:57
*** ezod has joined #tp10:57
*** gau_veldt has joined #tp10:57
*** shenki has joined #tp10:57
*** bddebian has quit IRC11:12
*** gau_veldt has quit IRC11:33
*** gau_veldt has joined #tp11:34
*** Greywhind has joined #tp12:23
*** zzorn has quit IRC15:06
*** zzorn has joined #tp15:12
*** peres has left #tp15:13
*** Demitar has quit IRC15:46
ezodhackathon!18:01
*** Iwanowitch has joined #tp18:03
ezodmithro: ping18:11
mithrohey18:32
mithrosorry I'm late18:32
ezodhi18:33
ezodno worries18:34
mithroso I'm getting errors all over the place18:34
mithrohey Iwanowitch18:34
ezoderrors from what?18:34
IwanowitchHeya.18:35
mithroezod: single player stuff when running through the wizard18:35
mithrodang - xdotx bailed :(18:37
mithroezod: do you want me to walk through them?18:38
ezodsure18:39
ezodoh, i see one now - this might be coming from the changes to SinglePlayer.py, it's possible i didn't catch everything18:40
mithrohttp://pastebin.com/da15a4b818:41
tpbTitle: pastebin - collaborative debugging tool (at pastebin.com)18:41
mithrothats the first one18:42
mithrothe next one is caused by the rinfo being none when selecting a ruleset18:42
Greywhindhey guys - anything i can do to help?18:44
ezodfixing #118:46
mithroGreywhind: sure - check out the server, AI and client and see if you can play a game of risk locally18:47
Greywhindok18:47
mithroezod: a couple of other things18:48
mithro1) all strings should be wrapped in _() so they get translated18:49
mithro2) Where you have multiple substitutions it's better for translation to use the dictionary form of string interpolation18:51
mithroezod: did you see a little bit of the cleanup I did last night?18:52
ezodyes18:52
mithroI was thinking maybe we should rename these files .tpconfig rather then .xml18:53
mithroI noticed that you are currently opening all the build.xml files :)18:54
mithrodo we have versioning on these files?18:54
ezodno, we probably should18:56
mithroIE If we change the file in a backwards incompatible way we should be able to tell18:56
mithroGreywhind: are you still on a mac?18:56
ezodSinglePlayer.py checks that the dtd is tpconfig, but yes it does open probably a lot of other files it doesn't need to18:57
mithroI'm not sure if ET is opportunistic loading the file - hence a large .xml could hang the client for a long time19:00
Greywhindmithro: nope19:01
Greywhindmithro: i'm on Fedora 1019:01
Greywhindmithro: what should i do to start the server for single player?19:06
JLPahoy everyone, sorry for being late19:06
mithroGreywhind: it should be started by the wizard19:08
mithroif you check out everything in the same directory19:08
mithroand then build it19:08
Greywhindmithro: wizard?19:08
mithroGreywhind: okay lets start from the beginning19:09
Greywhindk19:09
mithro1) checkout tpclient-pywx19:09
Greywhinddone19:09
mithro2) switch to the singleplayer branch19:09
Greywhindcan't remember the command for that19:09
mithro3) python requirements.py19:09
ezodhi JLP19:09
mithrogit checkout origin/singleplayer -b singleplayer19:10
mithrogive that a try19:10
Greywhindok, done19:10
Greywhindrequirements seem fine19:11
mithrocd libtpclient-py19:11
mithroand switch to the singleplayer branch19:11
Greywhindcheck19:11
mithrookay19:12
mithronow if you run ./tpclient-pywx there should be a singleplayer button19:12
mithroGreywhind: that work?19:13
ezodmithro: winConnect.py line 553 - why did you change == to !=?19:14
mithroezod: in trying to fix the error19:15
Greywhindyeah, the single-player button is there19:15
mithrookay now you click it19:15
Greywhindi did - says the server isn't htere19:15
Greywhind*there19:16
ezodmithro: ok, ill take care of that19:16
mithrookay19:16
mithroso if you go up a level19:16
GreywhindBraga tells you, "(You're not even there, she understands me.)"19:16
Greywhinderr19:16
mithroin that directory should should have tpserver-cpp directory19:17
Greywhindyeah19:17
mithrogo into that and do a ./configure and a make (no need to make install)19:17
Greywhindok, configuring.19:17
mithroyou'll also want to checkout daneel-ai so that you have someone to play against19:18
ezodhrm, something is wrong with the rulesets in the new SinglePlayer.py19:21
ezodruleset_info is not working19:25
mithro:/ - any idea why?19:25
mithroIt didn't seem to find any of the ruleset xml files?19:25
mithroFound single player xml file at ../tpserver-cpp/../tpserver-cpp/devserver.xml19:25
mithroFound single player xml file at ../tpserver-cpp/../tpserver-cpp/tpserver-cpp.xml19:25
mithroFound single player xml file at ../daneel-ai/../daneel-ai/devai.xml19:25
mithroFound single player xml file at ../daneel-ai/../daneel-ai/daneel-ai.xml19:25
Greywhindok, hmm - it's still not seeing any servers19:26
ezodlooking into it, ill push the fix shortly19:26
Greywhindthe client is in /Programming/ThousandParsec/tpclient-pywx/19:26
Greywhindthe server is in /Programming/ThousandParsec/tpserver-cpp/19:26
IwanowitchStrangem it seems to check the parent folder fine here.19:27
Iwanowitch*Strange, ...19:27
IwanowitchIs there a tpserver-cpp.xml in the tpserver-cpp dir?19:28
JLPfound my server installed systemwide, but didn't find  ../daneel-ai after adding a couple of opponents19:29
GreywhindIwanowitch: yes19:29
CIA-69mavrinac libtpclient-py-singleplayer * r646b8ede4401 /tp/client/SinglePlayer.py: Show proper path in 'found XML file' message.19:30
ezodlooks like it isn't ruleset_info after all19:30
Greywhindany ideas on what i might be doing wrong?19:34
Greywhinddo i need a specific branch of tpserver-cpp?19:35
CIA-69mithro libtpclient-py-singleplayer * r0eecbc201849 /tp/client/SinglePlayer.py: Make the searching log more.19:35
mithroGreywhind: just pushing some stuff which should make it easier to figure out what is going on19:35
mithrogive that a try and pastebin the output19:35
Greywhind[Greywhind@localhost tpclient-pywx]$ git pull19:36
GreywhindAlready up-to-date.19:36
mithrolibtpclient-py19:37
Greywhindoh... maybe i have to do it in the libtpclient-py subdir19:37
Greywhindright19:37
Greywhindoh - now it seems to see the server19:37
Greywhindodd19:37
ezodalways need to do git submodule update19:39
Greywhindhttp://rafb.net/p/F1bBmc63.html19:39
tpbTitle: Nopaste - No description (at rafb.net)19:39
Greywhind^ it saw the server, but didn't seem to find an AI19:40
IwanowitchHmm. Install path display would perhaps be kind of cool when selecting a server/AI client. And the last few windows of the wizard are a bit buggy it seems.19:40
mithroFound single player xml file at ../daneel-ai/../daneel-ai/devai.xml - including19:40
Greywhindyeah, but there were no options on the "add players" screen19:41
ezodmajor storm here, hoping for no power outages19:41
mithroyeah - that appears to be related to this bug19:41
Greywhindok19:41
mithroTraceback (most recent call last):19:41
mithro  File "./windows/winConnect.py", line 242, in OnRuleset19:41
mithro    self.next.OnServer(None)19:41
mithro  File "./windows/winConnect.py", line 295, in OnServer19:41
mithro    self.ServerRulesetDesc.SetLabel(_("Implements %(longname)s version %(version)s.") % rinfo)19:41
mithroTypeError: format requires a mapping19:41
mithroezod: no UPSes?19:41
ezodmithro: negative19:41
mithroezod: any thoughts on that error?19:43
mithroezod: it means that rinfo is none rather then a dictionary19:43
ezodyes, i haven't figured out why19:44
ezodthis is really strange19:44
ezodanyway, its my focus right now19:44
mithrorinfo = self.parent.game.ruleset_info()19:46
IwanowitchI'm also getting19:46
mithrothat is the problem function19:46
Iwanowitch  File "./windows/winConnect.py", line 250, in OnRuleset19:46
Iwanowitch    Configure options for the %(longname)s ruleset (leave blank to use default):""") % self.parent.game.ruleset_info(self.parent.game.rname)['longname'])19:46
IwanowitchTypeError: format requires a mapping19:46
IwanowitchA bit earlier.19:46
mithromy guess is this19:47
mithrotry:19:47
mithroreturn self.locallist['server'][sname]['ruleset'][rname]19:47
mithroexcept KeyError:19:47
mithroreturn None19:47
ezodIwanowitch: that's related19:47
ezodmithro: i think i got it19:47
IwanowitchKay.19:47
ezodmithro: the server name is apparently not being set properly, fixing19:48
ezodOnServer is being called at the wrong time it seems19:50
ezodactually19:52
ezodah, now i have you19:52
mithroso...19:59
ezodstill something wrong20:01
ezodmain problem is fixed though20:01
mithroezod: main enough problem that we can start a game?20:02
mithroIwanowitch: btw - did you need some help with the risk ruleset?20:05
mithros/risk/rfts/20:05
mithroJLP: where is the translation of tpclient-pywx at?20:07
CIA-69mavrinac tpclient-pywx-singleplayer * rcdabdccc78bb /windows/winConnect.py: Fix bugs related to server and ruleset info.20:08
Iwanowitchmithro: Hmm, I haven't really thouht about it anymore.20:08
JLPmithro: you mean in locale/sl? or the finished one?20:09
ezodmithro: there were actually 2 separate bugs, hence the confusion20:09
mithroezod: ah20:09
ezodwith astonishingly similar effects20:09
mithroIwanowitch: do you think we could work to find the bug you where hitting before?20:09
mithroIwanowitch: also - could we add minisec support?20:09
mithro(minisec support should be *really* trivial for you)20:09
CIA-69mithro daneel-ai * r4e4601d1b89e /debian/control: Fixed the dependency for daneel-ai deb packages.20:10
IwanowitchRight, that rfts bug, I'll take a look at it now.20:10
IwanowitchMinisec should be pretty possible yes.20:10
JLPaha, ruleset options showed up and everything was found and the game started now20:12
mithroezod:20:12
mithroTraceback (most recent call last):20:12
mithro  File "./windows/winConnect.py", line 558, in OnPageChanging20:12
mithro    event.GetPage().next.OnRuleset(None)20:12
mithro  File "./windows/winConnect.py", line 211, in OnRuleset20:12
mithro    self.parent.game.rname = self.parent.game.rulesets[self.Ruleset.GetSelection()]20:12
mithroIndexError: list index out of range20:12
mithrothat occurs when no servers are installed20:12
CIA-69mavrinac libtpclient-py-singleplayer * r9d76ac1237fa /tp/client/SinglePlayer.py: Handle case in ruleset_info where rname is set but sname is not.20:12
*** pschulz01 has joined #tp20:13
mithrohey pschulz0120:13
ezodmithro: taking a look20:13
IwanowitchWoo. Seems to work fine.20:13
pschulz01mithro: Just poking my head in.20:14
IwanowitchThe add opponent window could use some polish, but it functions, so okay for now.20:14
Greywhindthe wizard works fine now20:14
mithroGreywhind: could you look at the problem with deleting all messages in the message window?20:15
Greywhindwhich problem is that?20:16
ezodIwanowitch: no doubt, that window is extremely ugly atm20:16
Greywhindis there a description of it somewhere?20:16
mithrowhen you click the button you get the following error20:16
mithroTraceback (most recent call last):20:16
mithro  File "./windows/main/panelMessage.py", line 422, in OnDelete20:16
mithro    self.application.Post(self.application.cache.apply("messages", "remove", self.bid, node, None), source=self)20:16
mithro  File "libtpclient-py/tp/client/cache.py", line 240, in apply20:16
mithro    evt = Cache.CacheDirtyEvent(*args, **kw)20:16
mithro  File "libtpclient-py/tp/client/cache.py", line 98, in __init__20:16
mithro    assert node.inlist()20:16
mithroAttributeError: 'NoneType' object has no attribute 'inlist'20:16
IwanowitchThere's strange things in the output though... It looks as if the bot keeps on running and running again, but the turn doesn't advance?20:16
Greywhindmithro: looking at it now20:18
mithroif you start up a game20:18
mithroand just delete all the messages you should get something like that20:18
Greywhindyeah, i did it20:18
mithroGreywhind: it have the same error?20:19
IwanowitchHrmf. I can't end the turn now.20:19
mithroezod: can we make the list of rulesets sorted?20:20
Greywhindmithro: yes20:20
mithroGreywhind: great20:20
mithroezod: so a couple of problems20:21
mithro1) The default values should really be filled out20:21
mithro2) The map should have a "select file" dialogue20:21
mithroezod: which one do you want to tackle? I'll look at the other20:21
mithro3) The add-opponent panel doesn't reflow when the oponents names are added20:22
mithro4) there is no way to go back and change the current opponents20:22
mithroI might look at 3 and 4?20:23
CIA-69mavrinac tpclient-pywx-singleplayer * r7cddc22ad018 /windows/winConnect.py: Fix bug in start page of single player wizard.20:23
mithroIwanowitch: poke me if you need any help20:24
JLP5) don't allow to add opponents with the same names20:24
IwanowitchThre's definitely something broken in ending turns in singleplayer mode.20:24
IwanowitchEither with the server or the AI client or some settings used for single player stuff.20:25
ezodmithro: comments on those 4 issues20:25
ezod1) default values come from the XML file - if they're in there, they're in the wizard, no?20:25
*** pschulz01 has quit IRC20:25
mithrohrm - daneel-ai is not starting up properly for me20:25
mithroIwanowitch: could that be your problem too?20:26
mithrocheck "ps fax"20:26
mithromine looks like20:26
mithro26393 pts/1    Sl+    0:09  |   \_ python ./tpclient-pywx20:26
mithro26652 pts/1    S      0:00  |       \_ /bin/sh -c ./tpserver-cpp -d --configure /dev/null --ruleset ../modules/games/risk/.libs/librisk --tp_port 54943 --game_load yes20:26
mithro26653 pts/1    S      0:00  |       |   \_ ./tpserver-cpp -d --configure /dev/null --ruleset ../modules/games/risk/.libs/librisk --tp_port 54943 --game_load yes --game20:26
mithro26654 pts/1    Z      0:00  |       \_ [sh] <defunct>20:26
mithro26655 pts/1    Z      0:00  |       \_ [sh] <defunct>20:26
ezod2) we can implement this by adding "file" to the parameter types in the XML files - i can do that, but will require a bit of work20:26
mithrothose two '[sh] <defunct>'  should have been daneel-ai20:26
IwanowitchYes, I also have that.20:27
ezod3) gui issue, my wx/xrc fu is weak, im sure there's a way to do this but i don't know it20:27
IwanowitchThought I think previous time it worked fine because there was daneel-ai output being spewed in console.20:27
IwanowitchThen again, multiple times per turn, so that's also a bit off. :P20:27
mithroezod: yeah - how much work do you think? The file dialog is a stock widget - we should also make sure it provides a way to filter the input and a starting directory to look for it20:27
mithroIwanowitch: do you want to restart the game (close down tpclient-pywx and start again?)20:28
ezod4) the whole opponent window should actually be redone to have a listbox instead of the crappy way it works now20:28
ezodwrt above, i just didn't know how to do it, and ran out of time at end of gsoc20:28
mithro2009-03-08 12:29:02 < Debug > Adding a file descriptor 1020:29
mithro/bin/sh: daneel-ai: not found20:29
mithroConnecting to localhost <type 'unicode'> 58716 <type 'int'>20:29
mithroezod: well I can do 3/420:29
mithroI'll do them right now as soon as we figure out the daneel-ai problem20:30
ezodmithro: i shouldn't think too much, but i probably don't need help with it so i can do it another time (so we can get other stuff fixed now)20:30
ezodalthough if im idle at any point in this hackathon ill start working on it20:31
mithroezod: I should only take me an hour or two to do 3/420:31
IwanowitchSo it should probably use absolute path when starting a server/AI or something?20:31
mithroprobably quicker for me to do it20:31
ezodmithro: so are you going to make a list or something for opponents? i really don't like the way it works now20:31
mithroIwanowitch: I think it's picking up the "installed" version rather then "devel" version20:32
mithroezod: yeah20:32
ezodmithro, Iwanowitch: you need to pick "daneel-ai (Development)" - its probably seeing the other xml file that is intended for installed version20:33
ezodwhich i mentioned the other day20:33
IwanowitchYeah, I probably picked the wrong one.20:33
mithroezod: I think we should be checking that the files the XML says exist - actually exist?20:33
Greywhindmithro: hmm... it seems like the ChangeList it's searching in to find the node to delete has a head with "none" as its _what20:33
Greywhindwhen it should be something like TP03|New Player&New player lahtis has joined the game.¿½����20:34
mithroGreywhind: you mean a message frame?20:34
Greywhindbasically, this is returning "none": node = self.application.cache.messages[self.bid].find(self.node._what)20:35
ezodmithro: i'll add that check in, doesn't cover every possible problem but it will help20:35
Greywhindand printing out self.head._what inside that find call is showing "None"20:35
Greywhindand self.head has no .right20:36
mithroGreywhind: kind of makes sense - the list only has one element right?20:36
IwanowitchHmm. Daneel-ai still seems to be calling his logic endlessly instead of once per turn, but I think that's my fault for not handling situations without an end-of-turn time specified.20:36
Greywhindmithro: well, it makes sense that there's no second node20:37
mithroIwanowitch: did you try setting a timelimit in the client?20:37
Greywhindmithro: but the head should then have the data to delete, but it doesn't seem to20:37
IwanowitchI still can't progress past turn 2, but that might be related.20:38
Greywhindunfortunately, i have to go eat dinner soon so i can get to work on time20:38
IwanowitchThe time limit option doesn't actually seem to work. I think.20:40
IwanowitchTurn length, that is.20:40
IwanowitchIt still displays as EOT: Unknown if I set it to, say, 120.20:41
IwanowitchAh, when sending end of turn myself, it starts counting down.20:42
IwanowitchThat sounds like the wrong value is being set...20:42
JLPyeah and it counts down if you clear the turn length field instead of leaving 020:43
Greywhindmithro: ok, well, i have to go for now20:44
mithroGreywhind: okay - if you get a chance later - can you see if you can fix that bug before I get to it?20:45
Greywhindi might have time to look at it tomorrow20:45
Greywhindbut i have to work until 2:30 AM20:45
mithroGreywhind: that would be great20:45
Greywhindso not tonight20:45
Greywhindmithro: ok, see you later20:45
mithroezod: can you help Iwanowitch?20:46
IwanowitchAnyway, I've just been beaten by my bot.20:47
mithroha :P20:47
IwanowitchAlthough I actually only played sitting duck, but well. It's something. :P20:47
CIA-69mavrinac libtpclient-py-singleplayer * r9dba9c96ee1d /tp/client/SinglePlayer.py: Verify that files pointed to in local list actual exist.20:49
ezodmithro, Iwanowitch: what exactly is the problem?20:50
Iwanowitchezod: The turn length option in the wizard doesn't do what it's supposed to do.20:51
IwanowitchIt only starts counting down after I send my turn completed frame.20:51
IwanowitchWhich, I think, is another option in the server configuration.20:52
ezodIwanowitch: ok, i know what you're talking about, i ran into that as well20:52
ezodIwanowitch: the problem is evidently that i am not configuring tpserver-cpp properly, although i am not sure why20:53
ezodi do: --turn_length_over_threshold %d20:53
ezodand --turn_player_threshold 10020:53
ezod(where %d comes from the turn length setting in the wizard)20:54
ezodi guess i should be doing something else?20:54
mithroumm20:54
llnzummm...20:54
* llnz checks the docs20:54
ezodnote that i do not have any recollection of why i did it that way :(20:55
IwanowitchI think it's better to use turn_player_under_treshold20:55
IwanowitchOr well, hmm.20:56
llnzi think i know20:56
ezodanyway, whatever should happen needs to be put in devserver.xml and tpserver-cpp.xml in the tpserver-cpp repo20:56
IwanowitchYou also want to wait on AI players probably.20:56
llnzbasically, if you want the turn to finish when all the players say they are finished, set turn_length_over_threashold to 020:57
llnzwith the player_finished_threshold to 10020:57
llnzif you set turn_length_under_threshold, that will be the maximum turn length20:57
llnzshall i fix the devserver.xml and tpserver-cpp.xml?20:58
ezodllnz: by all means :)20:58
mithroezod: I think instead of "devserver" it would probably be better named "tpserver-cpp-inplace.xml" or similar?20:59
mithroezod: so how does this all work if the server and AI are all packaged with the client?20:59
ezodmithro: re: devserver, agreed21:01
CIA-69llnz tpserver-cpp * r56b8575528c9 / (devserver.xml tpserver-cpp.xml.in):21:01
CIA-69Fixed xml files for setting turn length in SPM.21:01
CIA-69You will need to re-run configure and install before the installed version21:01
CIA-69is updated.21:01
ezodmithro: i need to know how exactly they are packaged (directory structure)21:02
mithroezod: that depends on what is easyist, but all under the tpclient-pywx directory21:02
ezodmithro: but it looks for all tpconfig xml files anywhere in the search path, so its just a matter of making sure those directories are in the search path, if they aren't already21:02
mithrosay for a Mac DMG21:03
mithroeverything would be in the DMG21:03
mithro(same with a windows exe)21:03
ezodwell the xml files have to be somewhere, right?21:05
ezoddmg is a fs image?21:05
mithroyes21:06
ezodwell, before we do said packages, we need to make sure that the search path in SinglePlayer.py includes the proper directories21:07
ezodeverything else should work fine21:07
ezodalso the win32 registry stuff in SinglePlayer.py has not been fully tested21:09
ezodby fully, i mean in an actual setup on windows with tpclient-pywx and some server/ai installed21:10
mithroezod: this is where I'm up to with the opponents page21:17
mithrohttp://www.thousandparsec.net/~tim/sp.png21:17
llnzmithro: looks good21:18
mithroIt doesn't actually work yet - but that is the UI I'm kinda working towards21:18
ezodmithro: very nice21:18
ezodmithro: thats precisely what i had in mind :D21:18
mithroezod: thoughts so :) - great minds think alike21:18
ezodmithro: need a remove button though?21:18
mithroProbably21:19
mithroThe Add should become an edit/save/change when you select an existing AI21:19
mithroezod: It would actually be really good to add "profile" support sometime in the distant future21:19
mithroIE You just load a profile and it answers all these questions for you - gives you a standard set of AI, etc)21:20
ezodmithro: cool idea - "load scenario" sort of thing21:20
mithroyeah21:20
mithrodoes daneel-ai have any options?21:23
mithroIwanowitch: poke?21:23
IwanowitchErr. Check daneel-ai -h21:23
IwanowitchMost are not very interesting.21:23
mithrowe should probably move daneel-ai to submodules sometime21:25
mithroIwanowitch: any luck with minisec or rfts probelm?21:25
Iwanowitchmithro: No, not really. Not entirely sure what the bug was with RFTS.21:27
mithroso ezod what you working on?21:28
ezodlooking into that file parameter thing21:28
mithroAh cool21:30
* mithro just put lunch on21:30
mithroezod: where is the code to actually add the opponents?21:36
CIA-69mavrinac libtpclient-py-singleplayer * r056ca4dae56d /tp/client/SinglePlayer.py: Support formatting for file type parameters.21:37
IwanowitchIs there a way to reduce the server output? I'm slightly more interested in the daneel output...21:40
ezodmithro: SinglePlayerGame.add_opponent()21:40
ezodmithro: line 590 in winConnect.py21:41
mithroahh - it's in a totally different place21:41
ezodyes, because it happens on page change in the current (crappy) design21:42
mithroso how do I do the equivalent to this?21:43
mithro# store server parameters21:43
mithroself.game.sparams = {}21:43
mithrofor opt in self.game.list_sparams().keys():21:43
mithroself.game.sparams[opt] = str(event.GetPage().Params[opt].GetValue())21:43
ezoderm.21:45
mithrowell21:45
mithrowell - just the clear current opponents?21:45
ezodwell, you can touch the individual opponents in SinglePlayer.opponents (dict)21:45
ezods/dict/list21:46
mithroI can just assign it a new list?21:46
ezodyeah21:47
IwanowitchMrmf. I'm off, getting too tired.21:47
ezodall add_opponent() does is check for unique username, and add the appropriately formatted dict21:47
ezodappended to SinglePlayerGame.opponents21:47
ezodthe items in SinglePlayerGame.opponents have to look like this21:48
JLPIwanowitch: for less server output you can use -l option set to 521:48
ezod{ 'name' : <name-of-aiclient>, 'user' : <some-unique-username>, 'parameters' : <parameters> }21:48
mithroIwanowitch: looking forward to Risk an minsec AI :)21:49
IwanowitchRFTS and minisec? :)21:49
IwanowitchOr is there something wrong with the Risk one too?21:50
Iwanowitch(well, apart from slowness and the EOT stuff)21:50
Iwanowitch(and being generally mediocre)21:50
mithrowell I think the Risk one works?21:50
IwanowitchYeah, it seems to work.21:52
IwanowitchIt manages to beat me anyway.21:52
mithroa minisec AI should be trivial (and it would be a good "here is how to make a the AI work" type tutorial)21:52
IwanowitchFulfilling at least some loose definition of working. :P21:52
mithrowell - now I just need to get the add/list interaction working and this should be set21:53
IwanowitchMmm, I should probably combine minisec with a tutorial on the wiki indeed.21:53
IwanowitchAnyway.21:53
IwanowitchLater.21:53
IwanowitchHappy hacking.21:54
*** Iwanowitch has quit IRC21:54
*** llnz has quit IRC21:55
*** llnz2 has joined #tp21:55
*** llnz2 is now known as llnz21:55
mithrowb llnz21:56
llnzthanks, the wifi doesn't work too well here21:56
llnzin this particular spot21:57
CIA-69mavrinac tpclient-pywx-singleplayer * ree2e156b8bf3 /windows/winConnect.py: Move population of parameter controls to a single function.22:13
ezodmithro: that might conflict with what you're working on..22:13
mithroezod: it appears that it would have been easier to do this the list way first :)22:15
ezodmithro: btw, how does your new opponents page actually handle parameters?22:16
mithrohrm?22:16
ezodai clients have parameters like servers and rulesets22:16
ezodwhere do the input boxes for those go?22:16
ezodoh, nm, i am blind22:17
ezodok, so i touched RefreshOpts() function in OpponentPage, that most likely conflicts22:18
mithroyeah - I had not touched that function much22:19
ezodit may be affected by the xrc layout, dunno what you're doing - have a quick look at the commitdiff22:19
mithrohow do you do the oposite of populateopts?22:19
mithroyeah I pull and merged22:20
ezodok22:20
ezodopposite?22:20
mithroas in create a dictionary from the values shown22:21
ezodfor opt in self.game.locallist['aiclient'][ainame]['parameter'].keys():22:22
ezodaiparams[opt] = str(event.GetPage().Params[opt].GetValue())22:22
ezodand then aiparams gets passed to add_opponent22:22
ezodif you're touching SinglePlayerGame.opponents directly, just set 'paramters' to aiparams22:25
mithrookay22:29
ezod'parameters' even22:30
CIA-69mavrinac tpserver-cpp * ra702c5d4400f / (devserver.xml modules/games/risk/tpserver-cpp-risk.xml): Change risk_map parameter to F (file) type in SP XML files.22:42
mithrodaneel-ai test {}22:48
mithroTraceback (most recent call last):22:48
mithro  File "./windows/winConnect.py", line 604, in OnPageChanging22:48
mithro    self.game.add_opponent(**opponent)22:48
mithro  File "libtpclient-py/tp/client/SinglePlayer.py", line 360, in add_opponent22:48
mithro    'user' : aiuser.translate(''.join([chr(x) for x in range(256)]),' '),22:48
mithroTypeError: translate() takes exactly one argument (2 given)22:48
mithrowhats the translate suppose to do?22:48
ezodi am drawing a blank22:49
ezodcommenting failure on my part22:49
mithroif I understand the code22:50
mithroit replaces every character below 256 with a ' '22:51
ezodyes22:51
ezodthat doesn't seem right though22:51
mithroyeah22:51
mithroI can't see that ever working properly22:51
ezod>>> aiuser = 'test'22:52
ezod>>> aiuser.translate(''.join([chr(x) for x in range(256)]),' ')22:52
ezod'test'22:52
mithrohrm22:52
mithrotranslate(s, table, deletions='')22:52
mithro    translate(s,table [,deletions]) -> string22:52
mithro22:52
mithro    Return a copy of the string s, where all characters occurring22:52
mithro    in the optional argument deletions are removed, and the22:52
mithro    remaining characters have been mapped through the given22:52
mithro    translation table, which must be a string of length 256.  The22:52
mithro    deletions argument is not allowed for Unicode strings.22:52
mithromaybe you are just trying to remove the space?22:52
ezodi guess so :)22:53
ezoddoesn't seem like the least obfuscated way to go about that22:53
mithroezod: I think you should probably just reject something which doesn't match [A-Za-z0-9]22:53
ezodmithro: agreed - there is potential for massive problems there22:54
mithroezod: you want to add that?22:54
ezodi am envisioning your idea for loading scenarios, where someone downloads a scenario containing an aiuser named '; rm -rf ~/*' or something22:55
mithroyeah22:55
mithroI values should be restricted to 0-9+22:55
mithroI == type22:56
ezodis there a way to force this on the gui end?22:56
mithroyes - but I think you need to do it in the SinglePlayer to22:57
ezodwill do both22:58
mithroI can do the client side22:58
mithroyou use validators which mean the person can't even type the wrong characters22:58
ezodwell actually i plan on testing for type in PopulateOpts and putting different controls accordingly - so i can just do that there22:59
mithrookay22:59
mithrodo you have the wxDemos installed?22:59
ezodsomewhere, i think - which one should i look at?23:00
mithrolook for the "Validators" section23:00
ezodbtw, i promised a friend i'd meet him for birthday post-hackathon, so i have to get going soon23:00
ezodok23:01
mithrowhat is with everyone having birthdays today?23:01
ezodshould have the different field types in PopulateOpts committed tomorrow23:01
mithroxdotx and pshulz where both going to birthdays too23:02
ezodreally?23:02
mithrohrm - I can't figure out why no opponents are being created23:02
mithrohow do I make tpserver-cpp quieter?23:02
ezodtheres a log_level option, you can put a <forced> tag in for it, 1 sec23:03
ezod<forced>--log_level 5</forced> maybe?23:04
ezoddoesn't seem to work :(23:05
ezodoh nm it does23:05
ezod<forced>--log_level 4</forced> in devserver.xml will shut it up23:05
mithrocan we do that rename now before we get stuck with it? :P23:06
ezodthe nomenclature in the file itself is dev-tpserver-cpp23:06
ezodis dev-*.xml acceptable?23:06
mithrohrm I think we should call it "inplace"23:07
ezodok23:08
ezodtpserver-cpp-inplace.xml?23:08
mithroyeah - that sounds good23:08
mithroI'll create a tpserver-py-inplace.xml sometime23:08
CIA-69mavrinac tpserver-cpp * r5cf06706743f / (devserver.xml tpserver-cpp-inplace.xml): Rename in-place SP XML file.23:09
mithrothanks :P23:09
mithrodid you finish the only show executable stuff?23:09
CIA-69mavrinac daneel-ai * r81f43d46b5c2 / (daneel-ai-inplace.xml devai.xml): Rename in-place SP XML file.23:10
ezodyes23:10
ezodthere are still some conceivable issues23:10
ezodlike, if you have one version of tpserver-cpp installed23:10
ezodand a new one in the work dir23:11
mithroyeah23:11
ezodand the "normal" (to be installed) XML file has options in it that are new or something23:11
mithroI think we should name the installed ones as something like "xxx.xml.template"23:11
ezodthey will still get added to the installed server's options23:11
mithroand then the build system can install them23:11
ezodmithro: that's fine with me23:11
mithroezod: not quite sure the best way to do that for daneel-ai23:12
ezodnor i23:12
mithroI'll look into it23:12
ezodcool23:12
mithrothe daneel-ai xml doesn't really need any substitution23:13
ezodalright, i have to get going23:15
ezodnew parameter stuff should be in the wizard soon23:15
mithrookay cool23:15
mithroI really need to write a style guideline :)23:16
ezodthanks for the hackathon, i'm glad we got this stuff accomplished! :)23:16
mithrogot time to do another next week?23:16
ezodlikely23:18
ezodill let you know23:18
mithrookay23:18
mithrowe should announce it again23:18
ezodsounds good23:18
mithromaybe we can get everyone along again23:18
mithromight schedule it an hour earlier?23:18
ezodworks for me, earlier = better :)23:19
ezodanyway, i am out, see ya23:19
llnzit was good to see so many people23:19
* ezod &23:19
llnzcya ezod23:19
mithrollnz: so what are the plans for tpserver-cpp?23:21
llnzmithro: currently there isn't23:22
llnzeven though i know things that could be done23:22
mithroso with GSoC coming up - we really need a plan?23:22
llnzi think so23:23
mithroso23:24
mithrowhat are your thoughts23:24
mithroI would like to get a couple of students working on the 3d client23:24
llnzdoing what on the 3d client?23:24
mithroadding single player support to the client, add battlexml support, create a model designer ala spore, general graphic updates23:25
llnzok23:25
mithrojmtan came up with a more specific list23:26
llnzcool23:26
mithroI would like us to get "demo" tpserver-cpp ruleset23:26
llnzon the tpserver-cpp side, the only thing that would be without issue would be other persistence modules23:26
mithrospecifically design to be a "show how to create a ruleset"23:26
llnzi don't really want any more games until 1.023:27
mithrothat seems fair23:27
mithrowhat is missing from 1.0?23:27
mithromainly tp04 stuff (pending clients?)23:27
llnz(or maybe one more that shows off the 1.0 things)23:27
llnztp04, research, deplomancy23:27
mithrollnz: wern't you going to do a research proposal?23:29
mithroI think tpserver-cpp could do with some serious cleanup and testing23:29
llnzstill has outstanding issues23:29
llnzthe core of the server is pretty solid23:31
llnzif i had some documentation about the bugs in the rulesets, i might fix them23:31
mithrodoes every method have a docstring? :P23:32
llnzno, because it's not a priority23:33
llnz(some do though)23:33
mithrono tests either :/23:34
llnzi've been testing it as i go23:34
mithros/tests/unit tests/23:34
llnzusing the clients, both tpclient-pywx and tpclient-cpptext23:34
llnzunit tests are not worth it23:35
llnzsorry, brb, talking in another channel23:35
mithrobut tpclient-pywx is full of bugs :P23:41
mithroI wouldn't trust it as a good test :)23:41
llnzso where are tpclient-pywx's unit tests and does every method have docstrings?23:42
llnzlibtpproto-cpp has a few tests and is almost completely documented23:43
mithronope - but if you can tell me how to unittest gui stuff I will23:51
mithroI really need to unittest libtpclient and libtpproto23:51
mithroif I only had time - it's such a boring task too :(23:52

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