Sunday, 2009-05-31

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
*** mithro-andy has joined #tp00:16
mithro-andygr00:17
mithro-andyopps00:17
mithro-andyGreywhind: you understand now?00:17
Greywhindmithro-andy: nope, still unsure how to get the list of available files00:17
Greywhindi can't call the media object directly, since it's in another threat00:18
Greywhind*thread00:18
mithro-andyso the media.py has a list of files00:18
mithro-andylook at how the old system did it00:19
mithro-andyit gets the media information from thr media server00:19
Greywhindit ties into the MediaUpdateEvent, yes?00:20
Greywhindand when that event happens, it updates its list of files00:20
*** mithro-andy has quit IRC00:21
*** mithro-andy has joined #tp00:21
mithro-andylook at how the old system does it00:22
mithro-andyyou basically have to do a prefix match00:22
Greywhindthe only place i can see where the old system uses the media stuff to get a list of available files is in panelPicture.py00:22
Greywhindi must be missing something00:22
mithro-andyyeah00:23
mithro-andythen it just makes a random selection form the list00:23
mithro-andyso instead of making a random selection you need to choose the one given by the server00:23
Greywhindright, but to get the list, it needs to wait for a callback to the function OnMediaUpdate(self, evt):00:24
Greywhindi can't do that in objectutils00:24
mithro-andywhy not?00:24
Greywhindit's not a class00:24
Greywhindalso, that's marked as a hack in threads.py00:25
Greywhindand it only returns 'png' and 'gif' extensions00:25
mithro-andyso media is always going to need a callback00:25
Greywhindmaybe i could add a function in threads.py to call getpossible manually?00:25
Greywhindand just return the files it gets back?00:25
mithro-andyas you can not depend on the media being there yet00:25
mithro-andy(it might be downloading)00:26
Greywhindhmm00:26
mithro-andyyou might need to create a mixin class00:26
Greywhindmaybe we could have a more central location to store the media info, rather than in panelPicture itself?00:26
mithro-andywhich is able to handle this00:26
mithro-andythat is another idea00:27
mithro-andybut that is kinda what the media thread is suppose to be00:27
Greywhindmaybe i should modify the media thread to store the file list itself00:27
mithro-andyit already does IIRC00:28
Greywhindit doesn't appear to00:28
Greywhindthe MediaUpdateEvent stores it temporarily00:29
Greywhindi should support png, gif, mng, jpg, what else?00:29
mithro-andymedia.py does the caching00:30
mithro-andysee the media property00:31
Greywhindmithro-andy: but i can't call functions on media.py directly from anywhere outside the MediaThread, i tried that00:31
Greywhindso i could make a function in the MediaThread to pass through to media.py to get the available list?00:31
mithro-andyyes - that is true00:31
Greywhindbasically a pass-through getpossible?00:32
mithro-andypossibly00:32
Greywhindi'll try that00:32
mithro-andyyoull need to be careful00:32
mithro-andyas this is multithreaded code00:32
Greywhindyeah00:32
mithro-andyprobably want to give it a prefix too00:33
Greywhindok00:33
mithro-andythe media state machine looks like00:33
mithro-andyand remeber it can take time for media to download00:34
mithro-andyso while it might say that there is media exists00:34
mithro-andyyou have to wait for it to download00:34
Greywhindi think panelPicture takes care of that already00:34
mithro-andybut you are going to need similar logic in the systemtree00:35
Greywhindyes00:35
Greywhindi'm just doing panelPicture for now though00:35
mithro-andyokay00:35
mithro-andybrb00:36
*** mithro-andy has quit IRC00:36
*** mithro-andy has joined #tp00:36
mithro-andyi think the objectutils is a likely candidate for inclusion in the client library00:40
Greywhindmithro: in libtpclient-py?00:41
mithro-andyyeah00:41
Greywhindit would probably make sense00:42
mithro-andymost other clients will need to do those operations00:42
Greywhindmost of that stuff is fairly client-independent00:42
Greywhindoh - if you don't mind me asking again: i should support png, gif, mng, jpg, what else?00:42
mithro-andywhat tpclient-pywx can support is dependent on which libraries are installed00:43
Greywhindhm00:43
mithro-andyif pil is installed there are a lot more choices00:43
mithro-andyif libmng-py then it supports mng/jng00:43
Greywhindmaybe i'll start with gif and png, since that's what it's been using, and work on expanding it later?00:43
mithro-andymakes sense00:44
Greywhindk00:44
mithro-andyas long as you commet it as such00:44
Greywhindwill do00:44
mithro-andybblr00:44
mithro-andygetting off the train now00:44
mithro-andybtw can you upload against the old cl number?00:44
mithro-andyedit your .git/config file to do so00:45
mithro-andysee ya!00:45
*** mithro-andy has quit IRC00:45
*** llnz has quit IRC01:09
cherezmithro: Ping?02:21
*** jnengland77 has quit IRC02:26
*** greenlion has joined #tp03:03
*** Greywhind has quit IRC04:11
*** verhoevenv has joined #tp05:05
verhoevenvreac: Morning!05:06
reachi verhoevenv , i'll just be a few minutes sorry05:14
verhoevenvreac: Perhaps another time suits you better?05:15
reacverhoevenv, 5 minutes should be enough if thats okay?05:17
CIA-46ric daneel-ai * rb18eeaea5fb2 / (4 files):06:19
CIA-46daneel_ai.py: Renamed daneel-ai to daneel_ai.py so it could be easily imported by other06:19
CIA-46python modules.06:19
CIA-46daneel_ai.py: Split gameloop() into two sub_functions for profiling purposes.06:19
CIA-46picklegamestate.py: Added a gamestate class that could be pickled for profiling purposes. [incomplete]06:19
CIA-46daneel_ai_profiler.py: Added function to retrieve pickled gamestates and profile them06:19
CIA-46for metric purposes.06:19
*** reac has quit IRC07:06
*** llnz has joined #tp07:13
*** jmtan has joined #tp07:35
* llnz wanders off08:13
llnzlater all08:13
*** llnz has quit IRC08:13
*** peres has joined #tp09:17
*** greenlion has quit IRC10:12
*** greenlion has joined #tp10:13
mithroJLP_: ping?10:14
mithroJLP_: looks like the forums have been attacked by spammers10:18
mithrocan you please look into it and help clean it up?10:18
*** mhilmi has joined #tp10:59
*** peres has quit IRC11:24
*** jmtan has quit IRC12:08
*** Greywhind has joined #tp13:50
*** tote has quit IRC16:22
*** jnengland77 has joined #tp16:31
*** greenlion has quit IRC17:15
*** peres has joined #tp18:28
*** llnz has joined #tp18:50
llnzmorning all, yay holiday18:54
cherezEvening.18:57
llnzhi cherez18:58
cherezHey.18:58
cherezmithro: Ping?19:08
*** nash has joined #tp19:11
Greywhindllnz: ping?19:21
llnzGreywhind: pong19:21
Greywhindllnz: so it seems like the client can't find some of the URLs referenced by the objects, even when i use the media repository specified by the game19:22
Greywhindany idea why that might be?19:22
llnzcould be i got the urls wrong19:22
llnzdo you have some examples that are wrong?19:22
Greywhindllnz: here's one:19:24
Greywhind'common-2d/planet-small/animation/terran1'19:24
Greywhindoh - by the way - i'm only using .gif and .png for now, since that's what the old client used19:25
Greywhindso it might be that you're referencing a .mng or something19:25
llnzah, it appears that the url was for an older version of the repo19:25
llnzi'm currently checking out a new one now19:26
Greywhindok, thanks19:26
Greywhindlet me see if i can find some others19:26
Greywhindcommon-2d/planet-small/animation/desert1'19:26
Greywhind'common-2d/planet-small/animation/inferno1'19:27
Greywhindcommon-2d/planet-small/animation/barren119:27
Greywhindseems like maybe pretty much all of those in that directory19:27
Greywhindcommon-2d/star-small/barren119:28
llnzthat last one is odd19:29
CIA-46llnz tpserver-cpp * re9a6d285805f /modules/games/minisec/minisec.cpp:19:29
CIA-46Fixed planet media urls in Minisec.19:29
CIA-46Were pointing at the old location in the old repository.19:29
llnznot smart, have planet and system media around the wrong way19:32
Greywhindllnz: yeah, some of the systems have planet images19:32
Greywhind'common-2d/star-small/barren1'19:33
Greywhindthat still seems to be missing19:33
Greywhindand this one does too:19:33
Greywhind'common-2d/foreign/freeorion/planet-small/animation/blue'19:33
CIA-46llnz tpserver-cpp * ra537f37eefe1 /modules/games/minisec/minisec.cpp: Had Planet and System media names reversed. Fixed now in Minisec.19:33
llnztry that, it should fix it19:35
Greywhindllnz: seems to be all fixed, except there's a planet that i'm not finding any URLs at all for19:37
Greywhindwith this command:19:37
Greywhindtpserver-cpp --configure /dev/null --ruleset minisec --tp_port 39081 --game_load yes --game_start yes --network_start yes --add_players yes --autoadd_players yes --turn_player_threshold 100 --turn_length_over_threshold 60 --turn_length_under_threshold 019:37
Greywhindit's called Sirius 119:37
Greywhind[Icon: [url(S): ''], Media: [url(S): '']]19:39
CIA-46llnz tpserver-cpp * rf7e41f30d5ec /modules/games/minisec/minisec.cpp:19:39
CIA-46Fixed media for Sirius 1.19:39
CIA-46Copy and paste error. My bad.19:39
Greywhindllnz: thanks!19:40
Greywhindllnz: all the URLs seem to work great now19:41
llnzcool19:41
Greywhindif you don't mind another question - do you have any idea how the client determines which game to connect to on a given server?19:42
Greywhindit seems like the network thread returns all the games on the server, but i'm not sure how to tell which one you're playing19:42
Greywhindso the media URLs could be different, and i don't know which game's URL to use19:42
llnzafter connection and before login, the TP04 client can request the list of games, and the short name of the game the player logs into is given ater the @ in login username19:43
llnztpserver-cpp only supports one game at a time, so no really problem there19:43
Greywhindso it's part of the login name. ok.19:44
llnzthe base media url is in the game frame19:44
Greywhindyeah, i can get the base media URL for any given game, i just wasn't sure how to figure out which of the listed games to get it from :P19:44
mithroI'll be back in about an hour19:44
mithromaybe less19:44
Greywhindmithro: ok. i'll be in and out today, since we're hosting a party of sorts19:45
mithroGreywhind: no problem19:45
Greywhindright now, i'm going to go back to that. i'll check in later.19:45
Greywhindthanks again, llnz19:45
llnzno prob19:45
*** mithro has quit IRC20:06
tansellback now20:14
tansellcherez, ping?20:16
chereztansell: Pong.20:17
cherezYou wanted tests for values out of range to xstruct's integers, but at present there is no test for those.20:19
cherezShould I make it test for that and raise an exception?20:20
tansellcherez, what happens if you stuff a -1 into a unsigned int?20:24
cherezOh, unsigned check.20:24
cherezThey're the only ones though.20:24
*** tansell--laptop has joined #tp20:27
tansellwhat about SInts?20:29
*** mithro has joined #tp20:29
cherezNope.20:30
tansellcherez, what do you mean Nope?20:31
tansellyou have written the tests and they fail?20:31
llnzafk20:32
chereztansell: Right.20:33
cherezIf I pass -2 or 65535 as 'n' (the 16 bit SInt) no exception is thrown.20:34
cherezAnd they unpack as 65534 and -1 respectively.20:34
tansellwelp, time to fix :)20:38
cherezAlright, not hard.20:39
cherezDo you want all the integer types to check both bounds correctly?20:39
chereztansell: Also, unsigned raises a TypeError for negative numbers, wouldn't a ValueError be more appropriate?20:47
Greywhindtansell: i have a revised set of media code for you to look at, but it involves an updated submodule20:47
Greywhindi can't remember how we got that working last time.20:48
tansellcherez, probably20:51
tansellGreywhind, we pushed the updated submodule to a separate branch20:51
Greywhindtansell: might be a bit complicated. i forgot to commit it separately.20:52
chereztansell: Alright, I'm making it a ValueError, then.20:52
Greywhindtansell: http://codereview.mithis.com/200221:04
tpbTitle: Issue 2002: Added functions to get media lists to objectutils, used these lists in panelPicture.py. - Code Review (at codereview.mithis.com)21:04
tansellGreywhind, can you upload the libtpclient-py changes in a separate CL?21:08
Greywhindhttp://codereview.mithis.com/200521:10
tpbTitle: Issue 2005: Added method to MediaThread to get the list of filenames with extensions for a given file prefix. - Code Review (at codereview.mithis.com)21:10
Greywhindtansell: i'll be afk for a while21:10
tansellGreywhind, 2005 reviewed21:14
tansellGreywhind, and the other one21:24
CIA-46llnz tpserver-cpp * rf81b7215ff9e /modules/games/minisec/minisec.cpp:21:42
CIA-46Bump minisec version number.21:42
CIA-46Minisec is now TP04 media enabled.21:42
* llnz ponders adding the branches to the sloc page21:44
cherezJust when I think I have this all figured out, git calls me dumb. :(21:47
*** verhoevenv has quit IRC22:09
tansellcherez, oh?22:13
cherezI can't "git-cl upload" because git diff has no output?22:14
cherezI don't know why it has no output; I just committed.22:19
llnzfinally have the latest media repo22:23
shenkicherez: is your branch tracking master?22:30
cherezI believe so.22:30
shenkicherez: if not, you need to specify what to diff it against. for my project i do git cl upload trunk, so it diffs against trunk22:30
shenkieven if it is, try that, as git cl blew up on me last night when i tried to upload without giving it a diff argument22:31
Vadtecman, life has a funny way of getting in the way, every time ive tried to put in some time on TP ive had another "project" come up...its so annoying22:32
Vadtecid really like to get to work on some TP stuff :D22:32
Vadtecso hows everyone been? busy on tp i bet22:33
shenkiim the opposite; every time i should be doing something else i work on my summer of code project :)22:33
llnzVadtec: hehe, i know the feeling22:33
Vadtecshenki: be blessed, id rather have some of your "problem" than more of mine atm22:33
shenkiVadtec: hrm. it doesn't do much for my "get a university degree" goal tho22:34
Vadtechehe22:34
Vadtecthat it might22:34
shenkicherez: did you get it working?22:39
cherezNo, still working on it.22:39
cherezIs there a way to check that it's tracking?22:40
shenkiyeah, it will have a merge = refs/foo/bar line in your .git/config22:40
shenkifor the [branch "mybranch"]22:40
cherezIt does.22:44
shenkicherez: does git cl blow up, or is it a reasonable looking errror message?22:48
shenkiblow up == python backtrace22:49
cherezNo explosion.22:49
cherezIt just says git-diff had no output.22:49
shenkiok22:49
cherezAnd git-diff has no output.22:49
shenkiwhat happens when you run git diff master22:49
cherezIt gives what I presume is a diff file between my current branch and the master.22:51
shenkiyeah22:51
shenkihrm. so what's the 'merge =' line say ?22:51
cherezmerge = refs/heads/master22:52
shenkistrange22:53
shenkiso you can run 'git cl upload master' for now; but i wonder why it's not picking up your changes22:53
cherezI don't know.22:57
*** alanp has joined #tp23:12
*** alanp has quit IRC23:30
*** Greywhind has quit IRC23:30
*** alanp has joined #tp23:31
*** bddebian has quit IRC23:33
tansellcherez, you there?23:33
chereztansell: Yeah.23:33
tansellcherez, you want a "git cl upload origin/master"23:34
cherezOh, whoops.23:34
*** Greywhind has joined #tp23:36
alanpI have a computer again!!!23:37
tansellcherez, unless you know what you are doing - you always want to give it a remote branch23:38
cherezMmm.23:39
chereztansell: http://codereview.mithis.com/200123:39
tpbTitle: Issue 2001: Failure tests. - Code Review (at codereview.mithis.com)23:39
tansellcherez, have you looked at the unittest package?23:42
cherezYou mean the module?23:43
tansellhttp://docs.python.org/library/unittest.html#module-unittest23:43
tpb<http://ln-s.net/3FeO> (at docs.python.org)23:43
cherezRight.23:43
cherezI have.23:44
tansellso what are the reasons you are not using it?23:44
cherezChiefly that you showed py.test to me, and they don't appear easily compatible, and py.test looks to be a better framework to me.23:45
tansellpy.test and nose are both just tests runners IIRC23:46
cherezpy.test and nose implement a light framework.23:48
cherezAnd identify failures by assertions errors being thrown, while unittest uses its own assert methods.23:50
*** jmtan has joined #tp23:50
cherezSo they won't be thrown for py.test or nose to catch.23:50
cherezSo if you ran it like that, py.test would report all successes intermixed with unittest's failure messages.23:51
tansellcherez, I think you will find that they work?23:51
cherezI'll give it a shot, then.23:51
cherezThough I'm having trouble getting the path right with py.test....23:53
tanselloh?23:53
tansellyou should just be able to give it the tp directory23:53
cherezRight now it only runs the tests when I pass the file to it.23:55
cherezAnd it uses the tp in my Python library rather than in the directory.23:55
cherezSo it tests the old xstruct.23:55

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