Monday, 2009-06-08

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
Landonhey jmtan I'm a little stuck, in test_battle.py you have two classes... one inheriting scene.Scene and one framework.Application00:03
LandonI'm thinking that the BattleScene class should have its own runBattle method to get the ball rolling00:04
Landonproblem with that is, I think it should handle its own scene too, updating it for events etc00:04
Landonnot sure how to pull this off cleanly though00:04
Landon(basically move changeScene into the BattleScene class)00:05
Landonit seems my options are a) pass the TestBattle class in as an argument, or b) keep it in TestBattle and (somehow?) update the current scene when BattleScene has changed it00:06
Landonany ideas?00:07
jmtancould you explain what the runBattle method should be doing? battlescene should handle it's own scene?00:10
LandonrunBattle should run through the rounds in th battle and update the scene accordingly00:12
alanp/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmzscheme3m.a(bool.o): relocation R_X86_64_32 against `scheme_not_prim' can not beused when making a shared object; recompile with -fPIC00:12
alanp/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmzscheme3m.a: couldnot read symbols: Bad value00:12
alanpcollect2: ld returned 1 exit status00:12
jmtanhm, what about using the update method in the Scene class?00:12
alanpany idea why i'm getting that when compiling tpserver-cpp?00:12
jmtanit is called every frame00:12
Landonoh, it is?00:13
Landonthat would work well00:13
jmtanyup, check scene.py00:13
alanpllnz/mithros:ping00:24
llnzalanp: heading out, sorry00:24
alanpok00:24
*** llnz has quit IRC00:24
Landonjmtan: hm, update is called too early00:36
Landonbefore the TestBattle object has a currentScene, which makes it toss an error00:36
Landonor maybe thats not the problem, hrm00:38
Landonaha, bad indentation00:39
ezodalanp: sent you the scoop on your error01:24
*** cherez1 has joined #tp01:36
*** Vadtec has quit IRC01:37
*** jnengland77 has quit IRC01:46
*** cherez has quit IRC01:48
*** cherez1 has quit IRC01:54
*** cherez has joined #tp01:54
ezodmithro: ping?02:13
ezodcan't push my work on libtpclient-py due to permission error02:14
*** greenlion has joined #tp02:28
mithroezod: pong02:37
mithroezod: give it a try now02:37
cherezmithro: Is there a reason why Structure's check method raises an exception rather than returning False?02:38
mithrocherez: because of the way it's used02:40
cherezAlright.02:40
mithrocherez: basically it's the type checking function02:40
cherezunittest needs an assertion for not raising an exception....02:40
mithroself.assert_(True) right after the function call02:41
cherezOh, and string and character didn't have proper unicode support.02:42
cherezI fixed string pretty easily but character would need some pretty low level changes.02:42
mithrowell character can't support unicode02:43
mithroas it's a byte==single character02:43
cherezI take it that's no problem, then?02:43
mithrowhich means it's ASCII only02:43
cherezWe want proper unicode support in string?02:44
Greywhindhello mithro03:05
Greywhindjust posted my blog post for tonight03:05
mithrookay03:05
mithrocherez: yes03:05
cherezAlright, good.03:06
*** Vadtec has joined #tp03:26
mithrostrings are equivalent to the xstruct s03:33
mithrowhile chars are equivalent to the xstruct c03:33
*** peres has left #tp03:38
*** cherez1 has joined #tp04:04
cherez1Coding in a storm is depressing.04:05
*** cherez has quit IRC04:07
*** cherez1 has quit IRC04:21
*** cherez has joined #tp04:21
mithrocherez: why?04:24
cherezLost power twice while working tonight.04:24
cherezSaving frequently has minimized damage, but it's starting to get to me.04:25
mithrooh - we don't generally loose power here during storms04:46
mithrotime to get UPS?04:46
*** Greywhind has quit IRC04:54
*** llnz has joined #tp04:57
* llnz ponders05:07
mithrollnz: what are you pondering?05:52
llnzjust catching up from the weekend05:57
mithrowe had a public holiday today06:00
llnzcool, lucky you06:06
llnzi had one last monday06:07
totematthewd: ping06:12
matthewdtote: Howdy!06:24
totematthewd: my memory is failing me, did we say monday or friday for the meeting? :)06:26
matthewdMonday06:31
totematthewd: great, have the meeting now? whats on the agenda?06:41
matthewdGood question :)06:45
matthewdSo, I saw your blog post06:46
totematthewd: is it okey? more/less detailed? missing something?06:50
matthewdYeah, looks good.06:54
mithroheyo tote06:56
mithroso you got some more commits?06:56
totemithro: for today, or last week? i did 2 commits last week :)06:59
mithroso I would be thinking that a full week would be a bit more07:00
mithrocommit early and commit often07:00
toteyeah it wasnt that much, i had my final exam on friday last week so i couldnt work full time07:02
totemithro: i tried submodules and it didn't work07:03
toteshould a clone both repos inside my own repo?07:04
matthewdtote: That may explain why I'm staring at a 'git submodule init' that isn't doing anything :)07:08
tote:)07:09
totematthewd: how would i setup submodules?07:10
totegit submodule add ?what should be here?07:12
matthewdI'm not sure; I haven't actually used submodules.07:13
totegit submodule add giturl path seems to work07:14
matthewdWhat do I need to do, to run the WSGI?07:21
toteuse a python webserver supporting wsgi, or mod_wsgi for apache07:22
totethe entry point is tpclient-pyweb.wsgi07:22
toteand there is nothing like an install atm, so youll have to play with symlinks to get imports working (im a bit confussed how submodules, installs and imports should work together)07:24
CIA-46joelboh tpclient-pyweb * r76508e109331 / (.gitmodules libtpclient-py libtpproto-py): Fixing git submodules.07:27
totehopefully it should work now :)07:28
matthewdLooks like I've managed to get close, at least :)08:10
matthewdTypeError: callback() got multiple values for keyword argument 'mode'08:10
* llnz wanders off08:12
llnzlater all08:12
*** llnz has quit IRC08:12
totematthewd: hmm, weird :/08:15
totematthewd: what webserver are you using? and do you have a traceback or something?08:19
matthewdApache208:20
*** DTRemenak has quit IRC08:20
*** DTRemenak has joined #tp08:21
matthewdhttp://pastebin.com/m2fd1a52708:23
tpbTitle: pastebin - collaborative debugging tool (at pastebin.com)08:23
matthewd(That's while accessing /get/objects/)08:23
totematthewd: i think you have an old version of libtpclient and/or libtpproto08:27
*** DTRemenak|RDP has joined #tp08:31
*** DTRemenak has quit IRC08:33
*** DTRemenak|RDP is now known as DTRemenak08:33
*** reac has joined #tp08:33
reacwasn't sure whether to post this on tp or tp-devel so i'll just mention it here, but it seems spammers have infiltrated the the TP Gsoc 2009 board08:35
matthewdtote: Oh, that's right... it complained when I pulled, then I forgot to go back once I had wsgi working08:50
matthewdYep, that's better :)09:04
mithroreac: yeah09:21
mithrocan you poke JLP?09:21
mithrotote: you probably want to create a requirements.py like both daneel-ai and tpclient-pywx use09:21
totemithro: yep, seems like a good idea, thanks :)09:24
mithrosadly there is no way to mark "auto checkout submodules"  too09:25
totehmm, never written a setup.py script, but wouldnt that be better if it could do git submodule init and install the submodules too? as im using for instance mod_wsgi that might reload the code if it starts a new process than the git commands might slowdown a few requests?09:30
*** greenlion has quit IRC09:40
*** bddebian has joined #tp10:06
bddebianHeya10:09
CIA-46mavrinac libtpclient-py-stable * r4fb41623af7d /tp/client/ (SinglePlayer.py launcher.py):10:39
CIA-46Check for premature subprocess termination and stop the single player10:39
CIA-46game if it occurs.10:39
CIA-46mavrinac libtpclient-py-stable * r67f883c00761 /tp/client/SinglePlayer.py: Import 'started' element.10:39
CIA-46mavrinac libtpclient-py-stable * r3e96a2870ea9 /tp/client/launcher.py: Proper Epydoc docstrings in launcher.py.10:39
CIA-46mavrinac libtpclient-py-stable * r4c83ca3273d8 /tp/client/ (SinglePlayer.py launcher.py):10:39
CIA-46Implement onready callback if a 'started' string to match is available10:39
CIA-46from the server tpconfig XML.10:39
*** alanp_ has joined #tp11:10
alanp_llnz/mithro: ping11:10
*** greenlion has joined #tp11:27
CIA-46ric daneel-ai * rc27490fab766 / (4 files in 2 dirs):12:42
CIA-46daneel/mod-risk.py: added guards to check connection is not none12:42
CIA-46daneel/basic.py: added delta function argument to startTurn12:42
CIA-46daneel_ai_profiler.py: profiling working on risk save games.12:42
CIA-46daneel_ai.py: added guards to check connection is not none, added delta function argument to startTurn,12:42
CIA-46added SaveGame(), pickle(), checkSaveFolderWriteable() and gameLoopBenchMark()12:42
*** Erroneous has joined #tp12:59
CIA-46mavrinac tpserver-cpp * r104409969059 /AUTHORS:13:00
CIA-46Revert "Added myself to the AUTHORS file as per Aaron"13:00
CIA-46This reverts commit 7a7c21df9fee817f3dfddbc28006d4fbf87f5e88.13:00
CIA-46mavrinac tpserver-cpp * redf129ae406d / (24 files in 3 dirs): Merge branch 'master' of git+ssh://[email protected]/git/tpserver-cpp13:00
CIA-46mavrinac tpserver-cpp * r4d076fa5600d / (tpserver-cpp-inplace.xml tpserver-cpp.xml.in):13:00
CIA-46Add 'started' element to tpconfig XML (regex to match so that single13:00
CIA-46player launchers know when the server is ready).13:00
*** verhoevenv has joined #tp13:02
*** Greywhind has joined #tp13:16
ezodneed some google account id's from gsoc students13:19
ezodLandon: ^13:19
ezodcherez: ^13:19
ezodand epyon13:19
ezodcherez: nm got yours13:22
mithroezod: ?13:41
ezodmithro: adding them to the google code project for issue tracking, etc.13:42
*** tansell_laptop has quit IRC13:59
*** mithro has quit IRC14:00
CIA-46mavrinac tpclient-pywx-stable * r337854279125 /libtpclient-py: Update libtpclient-py submodule to latest head.14:13
*** jmtan has quit IRC14:46
*** verhoevenv_ has joined #tp14:52
*** alanp_ has quit IRC14:59
*** verhoevenv has quit IRC15:10
*** alanp has quit IRC15:24
*** mhilmi has joined #tp15:36
*** alanp has joined #tp15:50
*** llnz has joined #tp16:03
alanpllnz, ping17:09
llnzalanp: pong17:10
alanphaving a compile error17:10
alanp  LINK  libtpmzscheme.la17:11
alanp/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmzscheme3m.a(bool.o): relocation R_X86_64_32 against `scheme_not_prim' can not be used when making a shared object; recompile with -fPIC17:11
alanp/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmzscheme3m.a: could not read symbols: Bad value17:11
alanpcollect2: ld returned 1 exit status17:11
llnzalanp: do you have the mzscheme devel library installed? there should be a libmzscheme.so17:13
llnzotherwise, use guile instead17:13
alanplet me test17:14
alanpi don't see a dev package for mzscheme?17:14
alanpshould i use guile 1.6 or 1.8?17:14
*** bddebian has quit IRC17:14
llnzalanp: either should work, 1.8 is probably better17:15
alanpok17:15
llnzyou may also need to pass --without-mzscheme to ./configure17:15
* alanp tries17:15
alanpsame thing with guile17:24
alanp/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmzscheme3m.a(bool.o): relocation R_X86_64_32 against `scheme_not_prim' can not be used when making a shared object; recompile with -fPIC17:24
alanp/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmzscheme3m.a: could not read symbols: Bad value17:24
llnzyou need to disable building mzscheme17:26
llnztry running ./configure with --without-mzscheme or --with-mzscheme=no17:27
alanpk17:31
alanpboth of those halt config, i'm tring with-guile now17:34
alanpsame thing17:34
* alanp has idea17:35
llnz?17:36
llnzhalt config?17:36
alanpi didn't have the headers installed17:36
llnzah17:36
alanphalt, like stop ./configure17:36
alanpprobably not the best verbage17:36
alanprunning with --with-guile --without-mzscheme now17:36
alanpwomp womp17:37
alanpgreat success!17:37
alanpthanks for the heads up llnz17:37
llnzwhen "halting" was it saying something like, "Either MzScheme or Guile must be used.  Please install mzscheme or guile. See ./configure --help if one is already installed."17:38
llnzno problem17:38
alanpyeah exactly17:38
alanpbecause i didn't have guile-1.8-dev installed17:38
llnzdoes tpguile build ok?17:38
alanpyeah it built fine it loosk like17:38
*** jnengland77 has joined #tp17:38
alanpnow if i could just fix this wireless dongle17:40
alanp:P17:40
* alanp gets back to work on mtsec17:40
alanpopen("/etc/tpserver-cpp/tpserver.conf", O_RDONLY) = -1 ENOENT (No such file or directory)17:43
alanpwould be nice if that listened to the ./configure --prefix17:43
llnzpass -C /path/to/tpserver-cpp.conf to tpserver-cpp17:54
llnzor just ignore it and configure via tpadmin-cpp17:55
* alanp nods18:12
alanphow can i read all logger output?18:12
alanp    Logger::getLogger()->debug( "Enter MTSec::createComponents");18:12
alanpfor example, that18:12
ezodset debug level18:13
ezodor log level i should say, to debug18:13
alanpit takes a number as a flag?18:13
alanpdoh18:14
ezodi think it's just enumerated 0 - 3? try 018:14
* alanp should read18:14
alanpsweet, i think18:14
alanpno18:15
alanpi can't get that output from 0 or 318:16
alanptpserver-cpp --debug -l 318:16
ezodlog_level option?18:20
alanpit's set to 1 in the file, -l doesn't override?18:20
ezod-l 018:22
ezodwait18:22
ezodhuh, not working for me either18:23
reac-l won't override the value set in a config file18:23
alanpwhy not?18:23
alanpi mean, shouldn't it?18:24
ezodthat is the behaviour i am experiencing, but not what i expected18:24
alanpyes18:24
alanpthat is exactly how it is18:24
alanpthrew me off for a while18:24
reacor actually18:24
reacif you want to override it18:24
ezodalanp: settings.cpp is where the logic is18:24
reacmake sure the -l option is after the -C option :)18:25
reacseems to work for me18:25
alanpthat is a bug :P18:25
alanphaha, a funny one though18:25
ezodllnz: is that ^ on purpose?18:25
ezodpersonally i don't like it18:25
ezodalanp: feel free to put it in the tracker18:25
ezodand fix it ;)18:26
reacI think it's just order of evaluation18:26
ezodreac: yes, but what purpose does that serve?18:26
alanpi can't think of another piece of software that does that...18:26
reacWell if it's defined twice, it should use the later definition?18:26
alanpcommand line options should always override18:27
ezodopinions: 1. arguments should override conf files, 2. order of arguments should not matter18:27
alanp+118:27
reacyeah i guess so18:28
ezodalanp: i would run it by llnz, post to tracker, patch in master branch, merge to your branch18:29
llnzsound advice18:31
ezodllnz: what do you think?18:32
ezodif that is the expected behaviour it's news to me :)18:32
alanp2009-06-08 18:34:06 < Debug > XML Filename set successfully, Reading file18:34
alanpwoop woop18:34
llnzezod: the whole settings system probably needs a good going over18:35
llnzi suspect that epyon's refactoring will removing it in favour of boost::options or some such18:36
ezodthat would be cool18:39
*** Vadtec has quit IRC18:55
*** Vadtec has joined #tp19:01
*** greenlion has quit IRC19:24
alanptinyxml driving me insane19:33
Landoninternet!19:45
Landonno more living off of neighbors wireless :p19:45
*** jnengland77 has quit IRC19:46
*** tansell_laptop has joined #tp20:20
CIA-46joelboh tpclient-pyweb * r414eddde36a0 /www/scripts/jquery.cookies.2.1.0.min.js:20:51
CIA-46Frontend: Created a simple login ui.20:51
CIA-46Added a jquery library to handle cookies, used by the login ui.20:51
CIA-46joelboh tpclient-pyweb * rc6f221127bb0 /www/ (index.html scripts/map.js): Woops, missed the two modified files from previous commit.20:52
Landonezod: [email protected] is my google account20:53
tansell_laptopmorning people20:54
Landonmorning20:54
cherezMorning.20:54
tansell_laptopezod, why did you want people's google accounts?20:54
chereztansell_laptop: : I've got a slightly massive revision up for review when you have time. http://codereview.mithis.com/100420:56
tpbTitle: Issue 1004: Added unit tests for structures. - Code Review (at codereview.mithis.com)20:56
tansellcherez, commit early, commit often :)20:57
tansellcherez, what is test/test.py ?20:57
*** bddebian has joined #tp20:58
cherezThat's the test.py you already had in the topmost directory.20:58
tanselldoes it run?20:58
cherezI don't think it ran to begin with. I guess I should take it out.20:59
tansellcherez, well21:01
tansellmark at the top21:01
tansellFIXME: This test does not work21:01
tanselland put the whole thing in a triple quoted string21:02
cherezAlright, done.21:02
tansellcherez, you done a coverage test on this?21:03
chereztansell: Yeah, there are still some big chunks I don't have covered yet.21:05
tansellokay21:05
cherezMost notably the __set__ and __get__ methods are untouched still.21:07
tansellcherez, yeah - do you want me to explain how that works?21:08
tansellI have a meeting now but will be back in about an hour21:08
tansellbtw check doesn't need to return true21:08
tansellyou call it, and if no exception then everything is fine21:08
tansellbut I guess if it makes the tests work better21:09
cherezIt makes it easier to show what parts are tests.21:09
cherezunittest really needs an assertion for not raising an exception.21:09
tansellyeah21:09
tansellcherez, you should also put a docstring at the top of each module21:09
tansellcherez, review done21:10
tansellmostly good21:10
cherezAlright.21:10
tansellmissing some cases21:10
*** tansell_laptop has quit IRC21:11
*** tansell_laptop has joined #tp21:11
CIA-46joelboh tpclient-pyweb * rfa7a16959698 /app/ (requirements.py tpclient-pyweb.wsgi):21:14
CIA-46Added requirements.py, it makes sure the submodules (libtpclient and21:14
CIA-46libtpproto) are loaded correctly.21:14
CIA-46landon tpclient-pyogre * r493d3cc0a731 /src/ (battleviewer.py scene.py): Added some methods to get the battle running as well as constantly updating the battlescene21:15
tansell_laptoptote, I would do something like the following21:17
tansell_laptoprequirements.py setups up the database and directories and stuff21:18
tansell_laptopand also touches a "REQUIREMENTS_DONE" file21:18
tansell_laptopwhich your application then checks for21:19
ezodtansell_laptop: i'm adding them to the google code project21:19
totetansell_laptop: ah great idea with a req_done file, that and login backend is on my list for stuff to work on tomorrow then :)21:21
totenow its time for some sleep, gn :)21:22
*** zzorn has quit IRC21:31
*** zzorn has joined #tp21:35
*** verhoevenv_ has quit IRC22:13
*** jmtan has joined #tp22:39
*** jmtan has left #tp22:46
tansellI'm back now22:56
tansellcherez, how you going?22:56
chereztansell: Acting on your suggestions right now.22:57
cherezThen hope I understand this __get__ and __set__ magic.22:57
tanselldo you want me to explain it?22:57
cherezAnd you overloaded __del__, __delete__, and __delattr__ just to mess me up, didn't you? :P22:58
tansellcherez, so basically __get__ and __set__ are magic which makes @property work23:00
cherezRight....23:01
tansellso basically __get__ gets call when the attribute is being gotten and __set__ is called when the attribute is gotten23:01
cherezIf a.m is a structure, and you call a.m = 5, it invokes structure.__set__(a,5), right?23:02
tansellopps23:02
tansellsetten23:02
tansellnot quite23:02
tansellwell23:02
tansellif a is a class which has m (which is a structure)23:02
tansellthen when you call A.m = 5 (where A is an *instance* of a) it invokes structure.__set__(A, 5)23:03
tansellthat slight different is quite important23:03
cherezAh, right.23:04
cherezDoes setattr bypass __set__?23:04
tansellno23:06
tansellwell23:06
tansellactually yes23:06
tansellif you have a23:06
tansellclass a: def __setattr__(self, key, value): .....23:07
tansellthen A.t = blah23:07
tansellwill call __setattr__23:07
tansellfirst23:07
cherezSo we just want to make sure structures correctly store and recall values?23:10
tansellso basically the structures stuff does a couple of things23:11
tansellthe really basic ones like Integer basically just make sure you are setting the right type23:11
tansellIE when you do a23:11
tansellA.t = "test"23:11
tansella t is an IntegerStructure then you get an exception right there23:12
tansell(rather then many minutes later when you try and pack the string)23:12
tansells/string/packet/23:12
*** jmtan has joined #tp23:15
tansellit gets more complicated when you have list of things23:17
tansellFor example if you have the following23:17
tansellA.t = []23:18
tansellA.t.append('blah')23:18
tansellskips the __set__ method23:18
tansellas it is effectively a23:18
tansell(a.t.__get__(A)).append('blah')23:19
*** alanp has quit IRC23:19
*** alanp has joined #tp23:19
tansellcherez, that make sense?23:20
cherezYeah.23:20
tansellwhich is why the GroupStructure is so much more complicated23:20
*** mithro has joined #tp23:20
tansellit basically the __get__ returns a "proxy" dictionary23:20
tansell(The GroupStructure.GroupProxy class)23:21
tansellwhich basically routes things via the GroupStructure class23:22
cherezAlright.23:22
cherezWon't list need something like that as well?23:22
tansellList inherits from GroupStructure23:22
cherezYeah, but they take different values so the inherited methods won't work, will they?23:23
tansellthats the beauty of how the GroupProxy works23:26
tansellit should still work23:26
cherezWell, the unit tests can decide.23:26
tansellyeah :)23:27
tansellthe group proxy also allows you to do23:27
tansellA.b.c23:27
cherezOh, nice.23:27
tansellif class A has a GroupStructure which defines a .c23:28
tanselland if .c is an IntegerStructure23:28
tansellthen A.b.c = "test" will cause an exception23:28
*** alanp has quit IRC23:29
*** alanp has joined #tp23:30
tansellcherez, so you have a lot to test23:31
cherezYep.23:31
*** alanp has quit IRC23:31
*** alanp has joined #tp23:32
tansellcherez, but once you finish that, it should cover the fundamentals23:32
*** bddebian has quit IRC23:54

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