*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** mithro-andy has joined #tp | 00:16 | |
mithro-andy | gr | 00:17 |
---|---|---|
mithro-andy | opps | 00:17 |
mithro-andy | Greywhind: you understand now? | 00:17 |
Greywhind | mithro-andy: nope, still unsure how to get the list of available files | 00:17 |
Greywhind | i can't call the media object directly, since it's in another threat | 00:18 |
Greywhind | *thread | 00:18 |
mithro-andy | so the media.py has a list of files | 00:18 |
mithro-andy | look at how the old system did it | 00:19 |
mithro-andy | it gets the media information from thr media server | 00:19 |
Greywhind | it ties into the MediaUpdateEvent, yes? | 00:20 |
Greywhind | and when that event happens, it updates its list of files | 00:20 |
*** mithro-andy has quit IRC | 00:21 | |
*** mithro-andy has joined #tp | 00:21 | |
mithro-andy | look at how the old system does it | 00:22 |
mithro-andy | you basically have to do a prefix match | 00:22 |
Greywhind | the only place i can see where the old system uses the media stuff to get a list of available files is in panelPicture.py | 00:22 |
Greywhind | i must be missing something | 00:22 |
mithro-andy | yeah | 00:23 |
mithro-andy | then it just makes a random selection form the list | 00:23 |
mithro-andy | so instead of making a random selection you need to choose the one given by the server | 00:23 |
Greywhind | right, but to get the list, it needs to wait for a callback to the function OnMediaUpdate(self, evt): | 00:24 |
Greywhind | i can't do that in objectutils | 00:24 |
mithro-andy | why not? | 00:24 |
Greywhind | it's not a class | 00:24 |
Greywhind | also, that's marked as a hack in threads.py | 00:25 |
Greywhind | and it only returns 'png' and 'gif' extensions | 00:25 |
mithro-andy | so media is always going to need a callback | 00:25 |
Greywhind | maybe i could add a function in threads.py to call getpossible manually? | 00:25 |
Greywhind | and just return the files it gets back? | 00:25 |
mithro-andy | as you can not depend on the media being there yet | 00:25 |
mithro-andy | (it might be downloading) | 00:26 |
Greywhind | hmm | 00:26 |
mithro-andy | you might need to create a mixin class | 00:26 |
Greywhind | maybe we could have a more central location to store the media info, rather than in panelPicture itself? | 00:26 |
mithro-andy | which is able to handle this | 00:26 |
mithro-andy | that is another idea | 00:27 |
mithro-andy | but that is kinda what the media thread is suppose to be | 00:27 |
Greywhind | maybe i should modify the media thread to store the file list itself | 00:27 |
mithro-andy | it already does IIRC | 00:28 |
Greywhind | it doesn't appear to | 00:28 |
Greywhind | the MediaUpdateEvent stores it temporarily | 00:29 |
Greywhind | i should support png, gif, mng, jpg, what else? | 00:29 |
mithro-andy | media.py does the caching | 00:30 |
mithro-andy | see the media property | 00:31 |
Greywhind | mithro-andy: but i can't call functions on media.py directly from anywhere outside the MediaThread, i tried that | 00:31 |
Greywhind | so i could make a function in the MediaThread to pass through to media.py to get the available list? | 00:31 |
mithro-andy | yes - that is true | 00:31 |
Greywhind | basically a pass-through getpossible? | 00:32 |
mithro-andy | possibly | 00:32 |
Greywhind | i'll try that | 00:32 |
mithro-andy | youll need to be careful | 00:32 |
mithro-andy | as this is multithreaded code | 00:32 |
Greywhind | yeah | 00:32 |
mithro-andy | probably want to give it a prefix too | 00:33 |
Greywhind | ok | 00:33 |
mithro-andy | the media state machine looks like | 00:33 |
mithro-andy | and remeber it can take time for media to download | 00:34 |
mithro-andy | so while it might say that there is media exists | 00:34 |
mithro-andy | you have to wait for it to download | 00:34 |
Greywhind | i think panelPicture takes care of that already | 00:34 |
mithro-andy | but you are going to need similar logic in the systemtree | 00:35 |
Greywhind | yes | 00:35 |
Greywhind | i'm just doing panelPicture for now though | 00:35 |
mithro-andy | okay | 00:35 |
mithro-andy | brb | 00:36 |
*** mithro-andy has quit IRC | 00:36 | |
*** mithro-andy has joined #tp | 00:36 | |
mithro-andy | i think the objectutils is a likely candidate for inclusion in the client library | 00:40 |
Greywhind | mithro: in libtpclient-py? | 00:41 |
mithro-andy | yeah | 00:41 |
Greywhind | it would probably make sense | 00:42 |
mithro-andy | most other clients will need to do those operations | 00:42 |
Greywhind | most of that stuff is fairly client-independent | 00:42 |
Greywhind | oh - if you don't mind me asking again: i should support png, gif, mng, jpg, what else? | 00:42 |
mithro-andy | what tpclient-pywx can support is dependent on which libraries are installed | 00:43 |
Greywhind | hm | 00:43 |
mithro-andy | if pil is installed there are a lot more choices | 00:43 |
mithro-andy | if libmng-py then it supports mng/jng | 00:43 |
Greywhind | maybe i'll start with gif and png, since that's what it's been using, and work on expanding it later? | 00:43 |
mithro-andy | makes sense | 00:44 |
Greywhind | k | 00:44 |
mithro-andy | as long as you commet it as such | 00:44 |
Greywhind | will do | 00:44 |
mithro-andy | bblr | 00:44 |
mithro-andy | getting off the train now | 00:44 |
mithro-andy | btw can you upload against the old cl number? | 00:44 |
mithro-andy | edit your .git/config file to do so | 00:45 |
mithro-andy | see ya! | 00:45 |
*** mithro-andy has quit IRC | 00:45 | |
*** llnz has quit IRC | 01:09 | |
cherez | mithro: Ping? | 02:21 |
*** jnengland77 has quit IRC | 02:26 | |
*** greenlion has joined #tp | 03:03 | |
*** Greywhind has quit IRC | 04:11 | |
*** verhoevenv has joined #tp | 05:05 | |
verhoevenv | reac: Morning! | 05:06 |
reac | hi verhoevenv , i'll just be a few minutes sorry | 05:14 |
verhoevenv | reac: Perhaps another time suits you better? | 05:15 |
reac | verhoevenv, 5 minutes should be enough if thats okay? | 05:17 |
CIA-46 | ric daneel-ai * rb18eeaea5fb2 / (4 files): | 06:19 |
CIA-46 | daneel_ai.py: Renamed daneel-ai to daneel_ai.py so it could be easily imported by other | 06:19 |
CIA-46 | python modules. | 06:19 |
CIA-46 | daneel_ai.py: Split gameloop() into two sub_functions for profiling purposes. | 06:19 |
CIA-46 | picklegamestate.py: Added a gamestate class that could be pickled for profiling purposes. [incomplete] | 06:19 |
CIA-46 | daneel_ai_profiler.py: Added function to retrieve pickled gamestates and profile them | 06:19 |
CIA-46 | for metric purposes. | 06:19 |
*** reac has quit IRC | 07:06 | |
*** llnz has joined #tp | 07:13 | |
*** jmtan has joined #tp | 07:35 | |
* llnz wanders off | 08:13 | |
llnz | later all | 08:13 |
*** llnz has quit IRC | 08:13 | |
*** peres has joined #tp | 09:17 | |
*** greenlion has quit IRC | 10:12 | |
*** greenlion has joined #tp | 10:13 | |
mithro | JLP_: ping? | 10:14 |
mithro | JLP_: looks like the forums have been attacked by spammers | 10:18 |
mithro | can you please look into it and help clean it up? | 10:18 |
*** mhilmi has joined #tp | 10:59 | |
*** peres has quit IRC | 11:24 | |
*** jmtan has quit IRC | 12:08 | |
*** Greywhind has joined #tp | 13:50 | |
*** tote has quit IRC | 16:22 | |
*** jnengland77 has joined #tp | 16:31 | |
*** greenlion has quit IRC | 17:15 | |
*** peres has joined #tp | 18:28 | |
*** llnz has joined #tp | 18:50 | |
llnz | morning all, yay holiday | 18:54 |
cherez | Evening. | 18:57 |
llnz | hi cherez | 18:58 |
cherez | Hey. | 18:58 |
cherez | mithro: Ping? | 19:08 |
*** nash has joined #tp | 19:11 | |
Greywhind | llnz: ping? | 19:21 |
llnz | Greywhind: pong | 19:21 |
Greywhind | llnz: 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 game | 19:22 |
Greywhind | any idea why that might be? | 19:22 |
llnz | could be i got the urls wrong | 19:22 |
llnz | do you have some examples that are wrong? | 19:22 |
Greywhind | llnz: here's one: | 19:24 |
Greywhind | 'common-2d/planet-small/animation/terran1' | 19:24 |
Greywhind | oh - by the way - i'm only using .gif and .png for now, since that's what the old client used | 19:25 |
Greywhind | so it might be that you're referencing a .mng or something | 19:25 |
llnz | ah, it appears that the url was for an older version of the repo | 19:25 |
llnz | i'm currently checking out a new one now | 19:26 |
Greywhind | ok, thanks | 19:26 |
Greywhind | let me see if i can find some others | 19:26 |
Greywhind | common-2d/planet-small/animation/desert1' | 19:26 |
Greywhind | 'common-2d/planet-small/animation/inferno1' | 19:27 |
Greywhind | common-2d/planet-small/animation/barren1 | 19:27 |
Greywhind | seems like maybe pretty much all of those in that directory | 19:27 |
Greywhind | common-2d/star-small/barren1 | 19:28 |
llnz | that last one is odd | 19:29 |
CIA-46 | llnz tpserver-cpp * re9a6d285805f /modules/games/minisec/minisec.cpp: | 19:29 |
CIA-46 | Fixed planet media urls in Minisec. | 19:29 |
CIA-46 | Were pointing at the old location in the old repository. | 19:29 |
llnz | not smart, have planet and system media around the wrong way | 19:32 |
Greywhind | llnz: yeah, some of the systems have planet images | 19:32 |
Greywhind | 'common-2d/star-small/barren1' | 19:33 |
Greywhind | that still seems to be missing | 19:33 |
Greywhind | and this one does too: | 19:33 |
Greywhind | 'common-2d/foreign/freeorion/planet-small/animation/blue' | 19:33 |
CIA-46 | llnz tpserver-cpp * ra537f37eefe1 /modules/games/minisec/minisec.cpp: Had Planet and System media names reversed. Fixed now in Minisec. | 19:33 |
llnz | try that, it should fix it | 19:35 |
Greywhind | llnz: seems to be all fixed, except there's a planet that i'm not finding any URLs at all for | 19:37 |
Greywhind | with this command: | 19:37 |
Greywhind | tpserver-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 0 | 19:37 |
Greywhind | it's called Sirius 1 | 19:37 |
Greywhind | [Icon: [url(S): ''], Media: [url(S): '']] | 19:39 |
CIA-46 | llnz tpserver-cpp * rf7e41f30d5ec /modules/games/minisec/minisec.cpp: | 19:39 |
CIA-46 | Fixed media for Sirius 1. | 19:39 |
CIA-46 | Copy and paste error. My bad. | 19:39 |
Greywhind | llnz: thanks! | 19:40 |
Greywhind | llnz: all the URLs seem to work great now | 19:41 |
llnz | cool | 19:41 |
Greywhind | if 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 |
Greywhind | it seems like the network thread returns all the games on the server, but i'm not sure how to tell which one you're playing | 19:42 |
Greywhind | so the media URLs could be different, and i don't know which game's URL to use | 19:42 |
llnz | after 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 username | 19:43 |
llnz | tpserver-cpp only supports one game at a time, so no really problem there | 19:43 |
Greywhind | so it's part of the login name. ok. | 19:44 |
llnz | the base media url is in the game frame | 19:44 |
Greywhind | yeah, 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 :P | 19:44 |
mithro | I'll be back in about an hour | 19:44 |
mithro | maybe less | 19:44 |
Greywhind | mithro: ok. i'll be in and out today, since we're hosting a party of sorts | 19:45 |
mithro | Greywhind: no problem | 19:45 |
Greywhind | right now, i'm going to go back to that. i'll check in later. | 19:45 |
Greywhind | thanks again, llnz | 19:45 |
llnz | no prob | 19:45 |
*** mithro has quit IRC | 20:06 | |
tansell | back now | 20:14 |
tansell | cherez, ping? | 20:16 |
cherez | tansell: Pong. | 20:17 |
cherez | You wanted tests for values out of range to xstruct's integers, but at present there is no test for those. | 20:19 |
cherez | Should I make it test for that and raise an exception? | 20:20 |
tansell | cherez, what happens if you stuff a -1 into a unsigned int? | 20:24 |
cherez | Oh, unsigned check. | 20:24 |
cherez | They're the only ones though. | 20:24 |
*** tansell--laptop has joined #tp | 20:27 | |
tansell | what about SInts? | 20:29 |
*** mithro has joined #tp | 20:29 | |
cherez | Nope. | 20:30 |
tansell | cherez, what do you mean Nope? | 20:31 |
tansell | you have written the tests and they fail? | 20:31 |
llnz | afk | 20:32 |
cherez | tansell: Right. | 20:33 |
cherez | If I pass -2 or 65535 as 'n' (the 16 bit SInt) no exception is thrown. | 20:34 |
cherez | And they unpack as 65534 and -1 respectively. | 20:34 |
tansell | welp, time to fix :) | 20:38 |
cherez | Alright, not hard. | 20:39 |
cherez | Do you want all the integer types to check both bounds correctly? | 20:39 |
cherez | tansell: Also, unsigned raises a TypeError for negative numbers, wouldn't a ValueError be more appropriate? | 20:47 |
Greywhind | tansell: i have a revised set of media code for you to look at, but it involves an updated submodule | 20:47 |
Greywhind | i can't remember how we got that working last time. | 20:48 |
tansell | cherez, probably | 20:51 |
tansell | Greywhind, we pushed the updated submodule to a separate branch | 20:51 |
Greywhind | tansell: might be a bit complicated. i forgot to commit it separately. | 20:52 |
cherez | tansell: Alright, I'm making it a ValueError, then. | 20:52 |
Greywhind | tansell: http://codereview.mithis.com/2002 | 21:04 |
tpb | Title: Issue 2002: Added functions to get media lists to objectutils, used these lists in panelPicture.py. - Code Review (at codereview.mithis.com) | 21:04 |
tansell | Greywhind, can you upload the libtpclient-py changes in a separate CL? | 21:08 |
Greywhind | http://codereview.mithis.com/2005 | 21:10 |
tpb | Title: 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 |
Greywhind | tansell: i'll be afk for a while | 21:10 |
tansell | Greywhind, 2005 reviewed | 21:14 |
tansell | Greywhind, and the other one | 21:24 |
CIA-46 | llnz tpserver-cpp * rf81b7215ff9e /modules/games/minisec/minisec.cpp: | 21:42 |
CIA-46 | Bump minisec version number. | 21:42 |
CIA-46 | Minisec is now TP04 media enabled. | 21:42 |
* llnz ponders adding the branches to the sloc page | 21:44 | |
cherez | Just when I think I have this all figured out, git calls me dumb. :( | 21:47 |
*** verhoevenv has quit IRC | 22:09 | |
tansell | cherez, oh? | 22:13 |
cherez | I can't "git-cl upload" because git diff has no output? | 22:14 |
cherez | I don't know why it has no output; I just committed. | 22:19 |
llnz | finally have the latest media repo | 22:23 |
shenki | cherez: is your branch tracking master? | 22:30 |
cherez | I believe so. | 22:30 |
shenki | cherez: if not, you need to specify what to diff it against. for my project i do git cl upload trunk, so it diffs against trunk | 22:30 |
shenki | even if it is, try that, as git cl blew up on me last night when i tried to upload without giving it a diff argument | 22:31 |
Vadtec | man, 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 annoying | 22:32 |
Vadtec | id really like to get to work on some TP stuff :D | 22:32 |
Vadtec | so hows everyone been? busy on tp i bet | 22:33 |
shenki | im the opposite; every time i should be doing something else i work on my summer of code project :) | 22:33 |
llnz | Vadtec: hehe, i know the feeling | 22:33 |
Vadtec | shenki: be blessed, id rather have some of your "problem" than more of mine atm | 22:33 |
shenki | Vadtec: hrm. it doesn't do much for my "get a university degree" goal tho | 22:34 |
Vadtec | hehe | 22:34 |
Vadtec | that it might | 22:34 |
shenki | cherez: did you get it working? | 22:39 |
cherez | No, still working on it. | 22:39 |
cherez | Is there a way to check that it's tracking? | 22:40 |
shenki | yeah, it will have a merge = refs/foo/bar line in your .git/config | 22:40 |
shenki | for the [branch "mybranch"] | 22:40 |
cherez | It does. | 22:44 |
shenki | cherez: does git cl blow up, or is it a reasonable looking errror message? | 22:48 |
shenki | blow up == python backtrace | 22:49 |
cherez | No explosion. | 22:49 |
cherez | It just says git-diff had no output. | 22:49 |
shenki | ok | 22:49 |
cherez | And git-diff has no output. | 22:49 |
shenki | what happens when you run git diff master | 22:49 |
cherez | It gives what I presume is a diff file between my current branch and the master. | 22:51 |
shenki | yeah | 22:51 |
shenki | hrm. so what's the 'merge =' line say ? | 22:51 |
cherez | merge = refs/heads/master | 22:52 |
shenki | strange | 22:53 |
shenki | so you can run 'git cl upload master' for now; but i wonder why it's not picking up your changes | 22:53 |
cherez | I don't know. | 22:57 |
*** alanp has joined #tp | 23:12 | |
*** alanp has quit IRC | 23:30 | |
*** Greywhind has quit IRC | 23:30 | |
*** alanp has joined #tp | 23:31 | |
*** bddebian has quit IRC | 23:33 | |
tansell | cherez, you there? | 23:33 |
cherez | tansell: Yeah. | 23:33 |
tansell | cherez, you want a "git cl upload origin/master" | 23:34 |
cherez | Oh, whoops. | 23:34 |
*** Greywhind has joined #tp | 23:36 | |
alanp | I have a computer again!!! | 23:37 |
tansell | cherez, unless you know what you are doing - you always want to give it a remote branch | 23:38 |
cherez | Mmm. | 23:39 |
cherez | tansell: http://codereview.mithis.com/2001 | 23:39 |
tpb | Title: Issue 2001: Failure tests. - Code Review (at codereview.mithis.com) | 23:39 |
tansell | cherez, have you looked at the unittest package? | 23:42 |
cherez | You mean the module? | 23:43 |
tansell | http://docs.python.org/library/unittest.html#module-unittest | 23:43 |
tpb | <http://ln-s.net/3FeO> (at docs.python.org) | 23:43 |
cherez | Right. | 23:43 |
cherez | I have. | 23:44 |
tansell | so what are the reasons you are not using it? | 23:44 |
cherez | Chiefly 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 |
tansell | py.test and nose are both just tests runners IIRC | 23:46 |
cherez | py.test and nose implement a light framework. | 23:48 |
cherez | And identify failures by assertions errors being thrown, while unittest uses its own assert methods. | 23:50 |
*** jmtan has joined #tp | 23:50 | |
cherez | So they won't be thrown for py.test or nose to catch. | 23:50 |
cherez | So if you ran it like that, py.test would report all successes intermixed with unittest's failure messages. | 23:51 |
tansell | cherez, I think you will find that they work? | 23:51 |
cherez | I'll give it a shot, then. | 23:51 |
cherez | Though I'm having trouble getting the path right with py.test.... | 23:53 |
tansell | oh? | 23:53 |
tansell | you should just be able to give it the tp directory | 23:53 |
cherez | Right now it only runs the tests when I pass the file to it. | 23:55 |
cherez | And it uses the tp in my Python library rather than in the directory. | 23:55 |
cherez | So 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/!