Monday, 2007-08-27

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
*** mithro has quit IRC00:07
*** mithro has joined #tp00:11
mithrothere is something funny going on with my laptop :/00:12
nashThe Chaser repeats?00:14
nashmithro: BTW: Can you add CIA for galaxie dev tree commits?00:14
mithrono, it's crashed twice in the last 48 hours00:14
nashSounds like my desktop00:16
mithrothis computer has however been nothing but reliable up till the last 48 hours :/00:16
nashtranquillity% last00:16
nashnash     pts/0        218-214-60-232.p Tue Aug 28 00:09   still logged in00:16
nashnash     pts/0        218-214-60-232.p Tue Aug 28 00:08 - 00:09  (00:00)00:16
nashreboot   system boot  2.6.18-4-686     Mon Aug 27 16:51 - 00:17  (07:25)00:16
nashnash     pts/7        :0.0             Sun Aug 26 16:59 - crash  (23:52)00:16
nashnash     pts/2        :0.0             Sun Aug 26 16:58 - crash  (23:53)00:16
nashnash     pts/1        :0.0             Sun Aug 26 15:26 - crash (1+01:25)00:16
nashnash     pts/1        :0.0             Sat Aug 25 10:48 - 10:51  (00:03)00:16
nashnash     pts/1        218-214-60-232.p Fri Aug 24 16:04 - 16:26  (00:21)00:16
nashnash     pts/0        218-214-60-232.p Fri Aug 24 15:31 - crash (3+01:19)00:17
nashCan't say the same00:17
*** xdotx_ has quit IRC00:20
mithroI've been thinking about a new laptop00:20
mithrobtw, you tried out the dev branch of tpclient-pywx-dev recently?00:21
mithroI could use your thoughts00:21
mithrobut i have been uming an aring over just getting the latest model from my current line00:23
mithroor going something different00:23
nashWhat type is it?00:26
mithroA panasonic R300:26
mithrowhich was perfect for when I was a student and had to move around a lot00:26
nashDon't know it...00:26
nashI have a sony vaio which has been flawless00:26
nashHowever I got it china where it was < half the .au price00:27
nashAnd it's < 1 kg00:27
mithrothis is the one I have been using ->
tpb<> (at
mithronash: which vaio?00:27
mithroI have only heard bad stories about Vaios :/00:27
mithrothe only think stopping me buying the r6 is the screen resolution00:29
* nash finds picture of it00:29
mithrocan you buy then in Australia?00:29
mithrono results on the Sony Aus or Sony USA sites00:31
tpb<> (at
nashThat's the current version00:31
nashIt's got a little bit of extra weight however00:31
tpb<> (at
nashThat's what I just pasted...00:34
mithrohrm... that didn't really work00:34
mithrowhich of the laptops on that page, the link just takes me to the top one00:35
nashTHe ultraportable - VGNTZ16GNB00:35
nashThere are a few in that cat00:36
nashMine is 2+ years old so it's no longer offered00:37
tpb<> (at
tpb<> (at
nashThe weights are a little higher then I recall...00:42
nashmithro: So can I push to galaxie#dev yet?00:46
mithrohrm.. it should just work?00:46
nashDidn't the other day00:47
mithrocia has been a bit flaky the other day00:47
mithroand the first commit to a new branch doens't work properly with the email00:47
nashOkay - trying now00:47
CIA-23nash galaxie-dev * r71ed246a3279 /browser.h: Add browser.h00:47
CIA-23nash galaxie-dev * r4ddc23135560 / (6 files): More updating for the new msg API.00:47
CIA-23nash galaxie-dev * r263eb1c5d182 /edje/images/.gitignore: Update gitignore00:47
CIA-23nash galaxie-dev * r7f93c9c0f353 / (browser.c server.c): More work on server/browser combo.00:47
mithrowhat was interesting?00:49
nashThat it worked the second time00:49
mithroyeah, the first push doesn't work so well because it starts of as 000000...00:50
mithronash: so have you checked out the latest tpclient-pywx-dev?00:50
nashnot yet00:51
* nash fetches00:52
nashheh - my last checkout on my laptop was via darcs.00:53
mithrobe back in 1000:58
*** xdotx has joined #tp00:58
nashmithro: Is this supposed to mean something?01:14
nash┌─([email protected]:pts/0)─────────────────(~/work/thousandparsec/tpclient-pywx)─┐01:14
nash└─(15:15:%)── ./                                        ──(Mon,Aug27)─┘01:14
nashVersion is 0.2.9901:14
nashThis file is only provided to do the following,01:14
nash  py2exe executable bundles for windows01:14
nash  py2app dmg packages for Mac OS X01:14
nash  install on a unix system01:14
mithrowhy are you running
nash./ gives me three files...01:15
nashSorry 401:15
tpbTitle: Ubuntu Setup - Thousand Parsec Wiki (at
nashI don't want a deb, requirements doesn't seem right01:15
nashIn any case the output from setup doesn't make sense01:15
nashIt not a verb.01:16
mithroif I put "produce" in from of the py2exe and py2app are you happy?01:17
mithrothe "Ubuntu Setup" has nothing to do with debs01:18
nashSo setup looks like an install program to me01:18 is an install program01:18
nashAnd it puts out a message saying this is what setup does... one of them seems to be the one I want...01:18
nashBUt doesn't seem to do anything01:19
mithrobut you don't want to install unless you have a released version01:19
nashPackage python-wxgtk2.8 is not available, but is referred to by another package.01:19
nashWhy not?01:19
nashEpyon: Couldn't find package python-gconf01:19
mithronash: because you then have to do a "python --install" after every single update01:20
mithrowhich would be sucky01:20
nash E: Couldn't find package python-gconf01:21
* nash does the same with multiple other programs he gets from source01:22
mithronash: but it can run "inplace"01:23
mithroIE you can just run it out of the directory without installing01:23
nashWhat is pythonw?01:25
nashmithro: There isn't a 2.8 version of wx 2.8 for unstable debian...01:26
* nash is updating to check it hasn't appeared in the last week or so01:26
tpb<> (at
mithroIt's in Ubuntu01:27
mithroso I have no idea why it hasn't made it into unstable yet01:27
mithroit has been out for yonks01:27
CIA-23mithro tpclient-pywx-development * rede3db08c183 / Better messages for nash.01:30
nashmithro: Well they claim the first debian supported version was 8 august01:30
nashI'm not surprised it hasn't got in yet...01:31
nashOf course the debian maintainer looks like he has given up...01:33
nashShould I have a 'pythonw' ?  What is the difference between python and pythonw?01:33
mithrodang namit01:34
mithropythonw is a windows/macos X only thing01:34
* nash is glad he followed the unix ops then...01:35
nashTraceback (most recent call last):01:35
nash  File "", line 178, in ?01:35
nash    print "Thousand Parsec Client Library Version", tp.client.__version__, "(installed at %s)" % tp.client.__installpath__,01:35
nashAttributeError: 'module' object has no attribute '__installpath__'01:35
mithroyour version of libtpclient-py is too old01:35
nashThe one I got 35 seconds ago?01:36
* nash checks he got hte dev versions01:37
mithrogo into scratchpad01:37
mithroand run01:37
mithropython ""01:37
mithrodo you get any output?01:38
nashSo.. shoudl I use your instructions, or that programs instructions?01:38
nashUmm... Are you serious?01:38
CIA-23mithro tpclient-pywx-development * rf7cb9d546874 / Also catch versions which are so old not to include __installpath__.01:38
nash# To use this run,01:39
nash# > ./ | sudo sh01:39
mithroif that is all you got01:39
mithrothen you don't have any installed versions01:39
mithrocan you paste the complete traceback of
nashWell there is a whole pile of other crap - but piping shit to a root shell.. is just asking for crazyness01:40
nashThat was the entire traceback01:40
nashmithro: Please disable to window less popup box01:42
nashIt's very very annoying01:42
mithrowhat window less popup box?01:42
nashThe splash screen crud01:44
nashIt has a non-window decoration set - And you don't handle xinerama correctly01:44
nashWhich means I get a rather irritating video playing half on one screen, unaligned with the other half on another screen01:45
nashAnd I can't move it01:45
nashOr minimize, or dismiss it (easily)01:45
nash^\ worked the charm at the terminal however01:45
mithroescape should dismiss it01:46
mithrobut you can't dismiss it until the program has loaded01:46
mithroyou can disable the movie with "touch NOSPLASHMOVIE"01:48
nashOkay - but there is still the issue that it has no-decorations, and you don't handle xinerama01:48
nashAnd the splash screen has no decorations as well01:49
nashAnd if I'm not mistaken you are overriding hte WM hints for the login dialog placement01:49
mithroI don't have a xinerama setup to test01:50
mithroI just told it to center on the screen01:50
nashCan you ditch it?  It's annoying01:50
nashI hate programs that do that01:50
nashAnyway immediate problem: Username: [email protected]01:51
nashGame is a separate issue, and should be separate in the GUI as well.01:51
nashThe user doesn't care, and shouldn't care about protocol issues01:51
nashNext,,, downloading universe dialog... Why do I care?01:52
nashWhy do I want to 'save' this?01:52
nashSave what?01:52
nashWhy am I clicking OK?01:52
nashShouldn;t that be automatic?01:52
nashThe fonts are screwed in the message window - it seems to be about 30point bold.01:53
nashOtherwise I'll need to keep looking adter I leave work01:53
mithrookay if the message window fonts are screwed then your DPI for your screen is wrong01:54
mithroif you click the G on the window the game becomes a seperate issue01:55
nashmithro: My monitors DPI is off by 0.2%02:02
nashEvery other program I use can happily get it right02:02
mithrowell, I am telling it to be 12pt02:03
mithrocan you send a screenshot02:03
nashHow do you want me to get it to you?02:06
mithro[15:38] * DCC RECV connect attempt to nash failed (err=Connection refused)02:06
mithroemail or http should work better02:06
mithroif I don't have a center on screen then the window ends up in funny places02:08
mithrois there a way to "hint" that it should be centered?02:08
nashGenerally you hint first, the WM fudges with it, then you cna override ti before the window is mapped02:09
nashGenerally it's best not to do anything at all.02:10
mithrowell, then the window is ending up in the top-right hand corner02:10
nashmithro: Why do you want the splash anyway?02:10
nashMost splashes are either there for contractual arrangements or to hide the fact their program is too slow to start02:11
mithrowell, it is to hide the fact that the program is too slow to start :P02:12
mithrothe movie splash is there because it impresses people :P02:12
* nash was irritated02:13
nashgot your email yet?02:13
nashStill think it is my DPI wrong?02:14
mithroI'm yet to figure out how to get the stupid left hand panel to be the correct size02:14
nashSee the fonts down teh bottom right?02:15
mithrocan you send me a copy of the complete output of ?02:15
nashThat is all02:16
CIA-23mithro tpclient-pywx-development * re2145325085c / Make the output a bit nicer on the terminal.02:17
mithrohow did you fix the __installpath__ problem?02:17
nashI updated a efw packages02:18
mithrowhats efw?02:18
mithrohow does one detect the terminal width?02:19
nashmore then a ocuple less then amny02:19
nashWell in my .zshrc I use: ${COLUMNS}02:20
nashOtherwise there si an escape sequence to query it02:20
nashElse it's in termios02:23
CIA-23mithro tpclient-pywx-development * r72b45d19ba1d / Respect the COLUMNS environment.02:30
mithroany idea what I have to give to termios to get the termnial size?02:32
mithrooh, found it02:34
nashWhich is it?02:35
* nash only has old ioctl based code here...02:35
CIA-23mithro tpclient-pywx-development * r127e0928aa68 / Also try termios now.02:40
mithroCOLS = struct.unpack('hh', fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, '1234'))[1]02:40
mithrofrom what I could see that is the "best" way without loading ncurses and friends02:40
mithroseems to work02:40
mithroif all else fails I drop back to 8002:41
nashheh - TIOCGWINSZ is not portable BTW02:41
mithroahh well02:42
mithroit should just fall back to 80 columns then02:42
mithrodid the main window go to full screen across both screens?02:42
nashNope - just one02:43
nashwhich is what I expect02:43
mithroit seems to be centering correctly on one screen in windows :/02:46
nashAre you resizing or just maximizing?02:53
mithroi'm just calling the "CenterOnScreen" method03:39
nashOkay - it may force it...03:40
nashAnyway - I'm bailing03:40
nashtalk to you later03:40
*** nash has quit IRC03:42
*** niphree has joined #tp04:03
mithrohello niphree04:03
mithroniphree: do you have anything to commit today?04:04
mithrootherwise I might commit a few small changes I have made04:05
niphreeI have nothing04:05
mithrothat is okay04:06
CIA-23mithro metaserver-lite-rewrite * r4607e664e4c3 /index.php: Slight cleanup of index.php04:07
mithroniphree: can you work on a README file?04:13
mithrowhere does "Image" come from?04:13
niphreefrom PEAR04:14
niphreeit's something that Graph library wants but didn't have inside04:14
niphreemithro: what should be in README file ?04:15
mithrowhat the requirements are04:15
mithroIE things like04:15
mithro"required php5"04:15
mithrorequires PEAR04:15
mithrorequires Image?04:15
CIA-23mithro metaserver-lite-rewrite * ra630a64db263 / (stat.php statswf.php): Some format clean ups and added some FIXME's.04:24
CIA-23mithro metaserver-lite-rewrite * r47b6236881b7 /rss.php: Removed excess whitespace and added a FIXME.04:25
*** llnz has joined #tp04:33
mithroniphree: ping?04:51
mithrollnz: hey04:51
CIA-23mithro metaserver-lite-rewrite * rb76352ec817e / (connect.php db.php): Added a few more FIXME's04:51
CIA-23mithro metaserver-lite-rewrite * rd454ba197c67 /actions/ (FIXME default.php get.php update.php): Removed some excess white space, added a bunch more FIXMEs.04:51
CIA-23mithro metaserver-lite-rewrite * r3dfd561da788 /class/ (9 files): Added numerous FIXME's and removed excess white space.04:51
CIA-23mithro metaserver-lite-rewrite * reaa04e8164c1 /language/Language.php: More FIXME's.04:51
mithroI have a patch for you which you'll probably not like :)04:51
llnzhi mithro04:51
niphreemithro: pong04:52
mithroniphree: [email protected]:~/oss/tp/metaserver-lite-rewrite$ grep -r 'FIXME' * | wc -l04:52
mithroniphree: still got a little bit to do04:52
tpbTitle: pastebin - collaborative debugging tool (at
mithroniphree: mostly small simple stuff04:54
CIA-23niphree /tmp/PpPKWrp3Y0/nhrITcZc8a-rewrite * rf5b14b622e10 /README:04:55
CIA-23added README file04:55
CIA-23via git-CVS emulator04:55
niphreeREADME with just requirements04:55
mithroniphree: could you work on fixing up those FIXME problems, then we can go about deploying the metaserver on the live site :)04:56
llnzmithro: i intend to remove Frame:unpackString (and use unpackStdString instead) at some point04:58
mithrollnz: that would be good04:59
mithrotpserver-cpp would have problems if I sent strings with nulls in it04:59
llnzyou should never send nulls04:59
mithrollnz: doesn't really matter, a malicious user could send nulls04:59
llnzhtml indecates that they should be escaped04:59
niphreemithro: ok. I'll start now :]05:00
mithroniphree: cool05:00
llnznulls don't crash the server or anything05:00
llnzjust the end of the string gets ingored (and then freed)05:00
mithrostill bad05:01
mithrothe error message returned should be better now05:01
llnzthe old method (unpackString) is even nice enough to remove them before sending it to the clients05:01
llnzit was fine the bit you have touched05:02
llnzand in places you have added checks where they are not needed05:02
mithrollnz: why?05:03
llnzbecause the check before checked it05:04
mithrodid it?05:04
mithroyou did no checks in unPackString05:05
llnzyes i did05:05
llnzand frame:unpackString can't return NULL, btw05:06
llnz> rtnstr = new char[1];05:06
llnz> rtnstr[0] = '\0';05:06
llnzreturn rtnstr;05:06
mithrowhy can't it return null?05:06
llnzreturning null gives segfaults05:06
mithrollnz: why? you should be checking the result of unPackString05:07
llnzjust trust me that most of the Frame code is going to be re-written at some point, and then it will be all fine05:07
llnzwhy? it never returns null, and always gives a valid string05:08
mithrollnz: what did you code do when I send a string length of -1?05:08
llnzit returned an empty string05:09
mithrono it didn't05:09
llnzyes it did05:09
mithro}else if(len == 0){05:09
mithrolen == -105:09
llnzif (len > 0 && length >= unpackptr + len)05:09
mithrolen is < 005:09
mithrohence it fails the first if05:09
mithroit fails the second if05:09
mithroyou print the log message05:10
llnzah, true05:10
mithroand fail05:10
mithrowith returning null05:10
mithrobefore that patch, you don't know where unpacking failed either05:11
mithroniphree: also, you appear to be trying to write files to the disk05:13
mithrothat really needs to be fixed05:13
mithroand sometimes i'm getting strange responses back from the server05:14
mithroso I would like to know where it is failing05:14
niphreewhat responses ?05:15
niphreeand when ?05:15
niphreeI'm going to make myself caffee05:17
mithroniphree: ?05:22
CIA-23llnz tpserver-cpp * r2447d82a3cb5 /tpserver/frame.cpp:05:25
CIA-23Fixed unpackStdString to use all of the data, not just to the first null05:25
CIA-23which is silly anyway.05:25
niphreemithro: back05:26
mithrollnz: what about the rest of that patch?05:27
mithroniphree: I didn't understand your last two questions05:27
niphree[11:16] <mithro> and sometimes i'm getting strange responses back from the server05:31
niphree[11:16] <mithro> so I would like to know where it is failing05:31
mithroniphree: oh, that was directed at llnz and tpserver-cpp05:31
mithronot the metaserver :)05:31
niphreeok :]05:31
niphreeI was.. like : "AAA.. something wrong :/ "05:31
mithroniphree: did you have a look at some of my changes?05:32
niphreeI'm thinking to change 'connect.php' to class05:34
niphreeand you said that I'm writing something to file - I don't know what to do when I create image to graph.05:34
niphreebut in flash chart - I think I know what to do05:35
mithroniphree: make your php file return the image?05:35
CIA-23llnz tpserver-cpp * r499134f68d58 /tpserver/ (listparameter.cpp stringparameter.cpp):05:36
CIA-23Made ListParameter and StringParameter use unpackStdString instead of unpackString05:36
CIA-23which means I can remove unpackString in a minute.05:36
CIA-23llnz tpserver-cpp * r5ebc39e602cb /tpserver/ (playeragent.cpp playertcpconn.cpp): Removed last usage of unpackString in PlayerAgent and PlayerTcpConnection.05:40
mithrollnz: ping?05:43
CIA-23llnz tpserver-cpp * rec4863b1f5d1 /tpserver/ (frame.cpp frame.h):05:44
CIA-23Removed unpackString from Frame.05:44
CIA-23One less piece of old crappy code in tpserver-cpp05:44
llnzmithro: pong05:44
mithrollnz: re the unpackString, yay!05:44
mithrollnz: but what about the rest of that patch?05:44
mithrospecifically the change from isEnoughtRemaining with magic numbers and better error returns?05:45
llnzif they were two separate patches, then the isEnoughRemaining patch *might* have be merged, but i don't like the using the Results class05:47
mithrohow else would you do it?05:47
llnzthey can be thrown fairly far in tpserver-cpp05:47
mithroexceptions would be good05:47
llnzjust remember that tpserver-cpp isn't there to debug clients, it's only a secondary effect05:48
mithrollnz: true, but most of the time it just crashes on a bad client05:49
mithrothe side effect of returning better information is better code05:50
mithroand code which reads much better05:51
mithrothis code is much clearer and self documenting05:52
mithro+  if(!f->isEnoughRemaining(4))05:52
mithro+    return NotEnough("TimeParameter (Maximum)");05:52
mithro+  f->unpackInt();05:52
mithro-  if(!f->isEnoughRemaining(8))05:52
mithro-    return false;05:52
llnz throw EndOfFrame();05:53
mithros/return NotEnough(/throw NotEnough(/ is pretty easy05:53
mithrollnz: I can convert to an exception method05:57
llnzif i used exceptions properly, i wouldn't need to call isEnoughRemaining05:58
mithrobblr dinner06:00
* llnz wonders if mithro is inventing this issues so that tpserver-cpp will never reach 0.5.0, let alone production status (ie 1.0.0)06:12
mithrollnz: not might fault you use a language which segfaults :P06:55
llnztpclient-pywx-dev was segfaulting the other day....06:55
mithroyeah I know06:56
mithroit's an avahi problem :/06:56
mithrobtw, you should probably be a little more careful with the signness of the ints you unpack?06:57
llnzmithro: no06:58
mithrothat string problem wouldn't have occured if you made sure you where unpacking a "unsigned" int, as it wouldn't be possible for it to be negative06:58
mithrosame goes for various list unpacking06:59
llnzwell... somewhat true, i supose06:59
mithroan unpackUInt could be useful (and watching the compiler warnings for bad casts)07:00
llnzyou don't get warnings for sign-ness casts07:00
mithroyes you do with the correct -W option07:01
mithroI'm sometimes getting this error07:02
mithroUnable to insert the order...Could not add order, Unable to unpack Frame.07:02
mithrowhich is what I was trying to track down with the above patch07:02
mithroonly I can't reliably reproduce the error07:03
mithroand there is a strange cache bug going on which I've yet to find the cause for07:03
mithrollnz: does tpserver-cpp touch the mod-time of an object everytime to change an order?07:03
llnzno, not currently07:03
mithroI think that is what is causing my problem07:04
mithrohow hard is it to add?07:04
CIA-23llnz tpserver-cpp * rf1b591d3615d /tpserver/ (frame.cpp frame.h):07:06
CIA-23Remove packString(char*) as well.07:06
CIA-23Not used.07:06
llnznot too hard, just a second07:06
mithrollnz: here is a deal, When you can get 5 games of Minisec to the finish (IE One final winner) with 5 AI players and no segfaults - I will buy you a commemorative gear including a personalised Mug07:11
CIA-23llnz tpserver-cpp * r69fb700d1178 /tpserver/orderqueue.cpp:07:13
CIA-23Touch Object modtime if objectid is set when the orderqueue modtime is touched.07:13
CIA-23Should fix mithro's cache issue problem.07:13
llnzmithro: the first thing would be for you to tell me how to start 5 ai players07:13
mithrollnz: sure07:13
mithrofor i in 1 2 3 4 5; do ./tpsai-py tp://ai$i:[email protected] > ai$i.log 2>&1 &; done07:14
llnzahh, it takes a url07:16
mithrogreywhind: ping07:17
mithrollnz: so does galaxie07:17
mithromaybe 2-3 tpsai-py and 2-3 galaxie's07:17
llnz"if the libraries aren't in debian unstable, it doesn't get built"07:19
mithrollnz: ?07:19
mithrowhat is that from?07:20
llnzmy little motto so i don't install thousands of packages i only use once07:20
mithroI wonder why wx2.8 hasn't made it into debian unstable :/07:23
mithrollnz: how do exceptions work in C++ (in terms of the allocation of memory?)07:26
llnzobjects on the stack are destroyed, the exception thing (can be object or PDT) is passed to the exception handler07:28
llnzprimative data type (ie char, int, pointer, etc)07:29
mithroit's passed by value?07:29
mithrollnz: i'm also getting a strange occurance where remove_orders are taking up to a second to execute07:30
mithroonly I can't figure out if it's libtpproto-py or tpserver-cpp07:32
llnzcode is quite simple in tpserver-cpp, can't see anything that would make it take a second07:33
mithroit's almost as if enough data isn't ready and hence it sleeps for a bit07:40
mithroxdotx: ping?07:41
mithrollnz: do you know much about autoconf on Mac OS X?07:42
mithrohas guit???? was having trouble with libtprl on his box07:42
mithrollnz: so when will persistence be fixed?07:45
llnzafter playerview is working07:45
mithrois there any way tpserver-cpp could preserve console history over runs?07:46
llnzhummm.... there is a way i think, i'll have to look it up07:46
llnzprobably just a env var flag07:47
mithroTraceback (most recent call last):07:48
mithro  File "./tp/client/", line 395, in OnCacheDirty07:48
mithro    raise IOError("Unable to insert the order..." + o[1])07:48
mithroIOError: Unable to insert the order...Could not add order, Unable to unpack Frame.07:48
mithroOnNetworkFailure Unable to insert the order...Could not add order, Unable to unpack Frame.07:48
mithrosomewhere in the patch I submitted fixed the bug in tpserver-cpp07:48
llnzsure its a bug in tpserver-cpp?07:48
mithrobut the patch definately fixes it07:50
llnzwhat type of order?07:51
CIA-23llnz tpserver-cpp * r734466ed3f10 /tpserver/orderqueue.cpp: Remove entry from ordercache when removing order07:54
llnzunrelated patch07:56
mithroI think it has to do with the options list07:57
mithroI'm pretty sure it's in the following code07:59
mithrobool ListParameter::unpackFrame(Frame *f, unsigned int playerid){07:59
mithro  if(!f->isEnoughRemaining(8))07:59
mithro    return false;07:59
mithro  int selsize = f->unpackInt(); // selectable list (should be zero)07:59
mithro  if(!f->isEnoughRemaining(4 + selsize * 12))07:59
mithro    return false;07:59
mithro  for(int i = 0; i < selsize; i++){07:59
mithro    f->unpackInt();07:59
mithro    std::string name = f->unpackStdString();07:59
mithro    if(!f->isEnoughRemaining(8 + (selsize - i + 1) * 12))07:59
mithro      return false;07:59
mithro    f->unpackInt();07:59
mithro  }07:59
mithrothat code is very obtuse08:00
mithrowhat is this --> ?    if(!f->isEnoughRemaining(8 + (selsize - i + 1) * 12))08:00
llnzchecks if there is enough data for the remaining part of the selectable list, plus 4 bytes for the size of the chosen list08:01
llnznote that the selectable list should have zero elements (read only list)08:02
mithrowhy is that in a loop?08:02
llnzbecause the string is not a constant size08:02
mithrowhy not just check for 4 bytes for the unpackInt?08:02
llnzfail early?08:02
mithrowhy not have this08:03
mithrobool ListParameter::unpackFrame(Frame *f, unsigned int playerid){08:03
mithro  if(!f->isEnoughRemaining(4))08:03
mithro    return false;08:03
mithro  int selsize = f->unpackInt(); // selectable list (should be zero)08:03
mithro  for(int i = 0; i < selsize; i++){08:03
mithro  if(!f->isEnoughRemaining(4))08:03
mithro      return false;08:03
mithro    f->unpackInt();08:04
mithro    // FIXME.... Put the check for string size here08:04
mithro    std::string name = f->unpackStdString();08:04
mithro  if(!f->isEnoughRemaining(4))08:04
mithro      return false;08:04
mithro    f->unpackInt();08:04
mithro  }08:04
mithrothat is much easier to see what is going on08:04
mithro(8 + (selsize - i + 1) * 12) <- that is very obtuse08:08
llnzi think08:14
llnzshould be (8 + (selsize - i - 1) * 12), i think08:15
llnzjust checking now08:16
mithrosee what I mean :P08:16
llnzbut it only happens when the client is being bad, so still a bug on your end08:17
mithroyour code being "to smart" introduced an error in your code08:18
CIA-23llnz tpserver-cpp * ra828f921ab88 /tpserver/listparameter.cpp:08:19
CIA-23Fixed bug that only bad clients trigger.08:19
CIA-23Hopefully the code will get simpler in future with the use of exceptions.08:19
llnzbtw: 5 ai (plus me until i go to bed) playing on tp://
mithrothe protocol doesn't say a client is required to send the parameters as empty08:22
tpb<> (at
llnzA list in which numerous items can be selected   The possible selections, A list of:08:23
llnza UInt32, read only, id of what can be selected08:23
llnza String, read only, String Name of can be selected08:23
llnza UInt32, read only, Maximum number of can to be selected08:23
llnzNOTE: read only fields should be transmitted by the client as 0, empty lists or empty string to conserve bandwidth08:25
mithrollnz: "should" as appose to "required"08:25
mithroThe server will ignore any information in read only field (even if they are non-empty).08:26
llnzfrom the rfc standards: (must|shall) >> (should|recommend) >> (can|may)08:27
mithroThe server MUST ignore any information in read only field (even if they are non-empty).08:28
llnzyes, it was08:28
llnzand ignoring everything else too08:28
mithrollnz: which is incorrect behaviour on the server08:29
llnzcould you put a small random delay in tpsai-py between when it receives note of end of turn and starts downloading the data (ie about 5 seconds or so)08:30
mithrollnz: why?08:31
llnzjust spread out the load a little08:32
llnzas long as the turn length is much longer08:32
mithroI have been using 10 second turns08:32
llnzi find it hard to keep up with 10 second turns :-p08:34
*** TBBle_ is now known as TBBle08:36
llnzin fact, 2 minutes seem to be about my minimum08:37
jothamdid you guys see the explosion animation08:38
jothamit's a .mov unfortunatly, but i got some targa's and the source files from the guy08:38
jothamvlc plays it fine08:38
jothami need to get me some more planet graphics now08:38
llnzjotham: i didn't see it08:38
jothamok one moment08:38
jothamhe's done a few08:39
mithrojotham: cool08:41
mithrohow goes the formation stuff?08:42
mithroI would really love to get some cool battle stuff going on :)08:44
mithrollnz: just testing the sleep now08:45
jothami have a cold again, so i've been asleep most of the time for the last 4 days08:46
jothambut it's fine08:46
llnzmithro: actually, it's not really necessary yet, but will be one day08:46
jothamthat's a pretty funny thread
tpb<> (at
jothamjust skim read the math stuff08:48
jothamunless you understand it =)08:48
jothamand read the industrial_ and phil guy nut off08:49
mithropurely random data is not compressible and provable so08:57
llnz> There is no compressor that can compress every09:00
llnz>  single 36-byte file by at least one bit.09:00
Epyonentropy :P09:00
llnz36 bytes isn't much either, but its 256^36 possible files == 4.97323e+8609:01
* llnz did an honours course in text compression09:01
llnzif you see a compression text book by Tim Bell, he was my lecturer09:02
EpyonThere is no compressor that can compress every singly x-byte file by at least one bit for every x :P09:02
jothamthe thread is pretty amusing09:02
EpyonThe proof for that is pretty easy :{09:02
mithroif you find a compressor which can compress every x-byte file to x-1 byte file, you can compress everything to 1 bit09:03
Epyonyep :P09:03
mithroyay for induction! :P09:04
llnzhutter prize: very good compression == AI (discuss possibility of fact)09:05
mithrojotham: so can we see any of the formation stuff?09:06
jothami haven't got anything i like09:07
jothami really fucking don't know what to do about planets09:07
jothami was looking at how civ4, and those starwars games do them09:07
llnzjotham: in battlefleet gothic, one edge of the table is declared the planet09:08
mithrowhat is the problem with planets?09:08
jothamit doesn't matter, it's my artistic nature being the problem09:08
jothamnot the planets09:09
jothamand talking about it wont help09:09
* mithro just wants to see cool demos :P09:09
jothamyeah i need to render out those explosions in a useful format too at some stage09:10
jothambut it'll take about 5 hours per animation09:10
jothamthe guy who made them has a much faster pc =)09:10
jothami think in a simple case where you have 2-4 fleets or so and 1 planet, the planet should be in the center09:14
jothambut, beyond one planet, i'm not sure, there are various ways of treatin git09:14
mithrowell, get a good one planet situation first :P09:16
jothami spent much of the last couple of days i've been sick playing with elipses and various metaball style boundary generators09:16
jothamif you visualise that the ships are like particles attached to the edge of a shape in the center, and that shape is the planets plus their 'boundaries'09:17
llnzmithro: about how many turns does 5 ai take to kill one another?09:44
mithrollnz: dunno, never seen it finish09:44
llnzhehe, ok09:45
llnz45 turns so far09:45
llnzwill check on it in the morning09:45
* llnz wanders off09:45
llnzlater all09:45
mithroit always dies on combat09:45
*** llnz has quit IRC09:45
*** guitsaru has joined #tp10:06
mithrohey guitsaru10:07
*** xdotx_ has joined #tp10:23
*** xdotx has quit IRC10:24
mithroguitsaru: any luck with either of the server?10:25
guitsaruthey python server complained about sqlalchemy  even though I have it installed10:25
mithroguitsaru: can you paste the output?10:27
guitsaruOh, it's not doing it now10:28
guitsaru  I need to install a database though10:29
mithroguitsaru: it should be able to use sqlite10:31
guitsarupython tpserver-py10:33
guitsaruTraceback (most recent call last):10:33
guitsaru  File "tpserver-py", line 12, in <module>10:33
guitsaru    import config10:33
guitsaru  File "/Volumes/ANDO/Documents/Programming/TP/stable/tpserver-py/", line 23, in <module>10:33
guitsaru    servername = socket.gethostbyaddr(socket.gethostname())[0]10:33
guitsarusocket.herror: (1, 'Unknown host')10:33
mithrothat is a configuration problem with your local machine :P10:34
mithroyour hostname should resolve to an address10:34
guitsaruProbably some crap with the campus network10:35
guitsaruI'm on wireless right now, I'll try again when I get back to my dorm.10:35
mithroguitsaru: you can edit and just put something in there10:36
guitsarumithro: I don't suppose I can do the same for serverip10:38
mithroanything in is user setable10:38
mithroit automatically generated one which should work for most people10:38
guitsaruImportError: No module named sqlalchemy10:40
guitsaruI installed it yesterday10:40
jothami need an algorithm that produces these kinds of curves (the blue lines, that i drew with the mouse rather crudely)
tpb<> (at
mithrojotham: draw the lines as a polygon, expand the polygon X pixels, round the corners?10:43
jothami ideally want the angle at any point on the line10:44
jothamthe tangent or whatever10:44
mithroguitsaru: is there anything above that?10:44
jothaminfact i need it10:44
mithrowhat does "python requirements" do?10:45
tpbTitle: pastebin - collaborative debugging tool (at
mithroguitsaru: just doing a few changes10:55
tpbaloril_ has joined on worldforge10:57
tpbaloril has quit worldforge (Ping timeout: 624 seconds)10:59
jothami found out the algorithm btw
tpb<> (at
jothamlooks good11:04
mithrojotham: cool11:07
*** guitsaru has quit IRC11:33
CIA-23mithro tpserver-py * rf8babebbe3b7 / (7 files in 3 dirs):11:57
CIA-23Massive update to make the requirements stuff much smoother.11:57
CIA-23Required a little reorg of the server's (and a few other smaller11:57
mithrohopefully that will help guitsaru11:57
mithroxdotx_: ping?12:11
*** daxxar has quit IRC12:19
*** daxxar has joined #tp12:19
tpbdisconnected from worldforge: Ping sent at 2007-08-27T12:42:08 not replied to.12:44
tpbdisconnected from worldforge: Ping sent at 2007-08-27T12:51:24 not replied to.12:53
mithroo so quiet13:19
*** Demitar has quit IRC13:19
*** CIA-23 has quit IRC13:19
*** CIA-23 has joined #tp13:20
*** Demitar has joined #tp13:20
*** mithro has quit IRC14:26
*** mithro has joined #tp15:06
*** guitsaru has joined #tp16:35
mithrohey guitsaru16:35
mithrodo an update to tpserver-py and try again please16:35
tpbTitle: pastebin - collaborative debugging tool (at
guitsarumithro: I don't know whether this matters or not, but on mac the package is called sqlalchemy-py2516:40
guitsaruI don't see why it would16:40
mithroguitsaru: how did you install sqlaclehemy?16:46
mithromy guess is that you have multiple python installs now16:46
guitsaruthrough fink, 'fink install sqlalchemy-py25'16:47
mithroand the one you install sqlaclehemy to isn't the one you are running16:47
mithroguitsaru: how did you install python?16:47
guitsaruthrough the link from the wiki16:47
mithrofink won't understand that16:49
mithro(I believe)16:51
guitsarumithro: I just installed the binary (downloaded the package and installed with python install)'16:53
guitsaruand it still doesn't work16:53
mithrowhat is it saying?16:54
mithroNo module still?16:54
guitsaruoh, I probably should have looked at that16:55
guitsaru* Looking for SQLAlchemy,16:55
guitsaru    SQLAlchemy installed version 'module' object has no attribute '__version__'16:55
mithrowhat version of SQLAlchemy did you install?16:57
guitsarunevermind, I fixed it16:58
guitsaruI did have an old version16:58
mithroworking now?17:07
guitsaruwell, it passed requirements17:07
guitsaruStill working on actually connecting17:07
*** xdotx_ is now known as xdotx17:08
tpbTitle: pastebin - collaborative debugging tool (at
mithroyour netlib is out of date17:43
guitsarumithro: is that TP software or external?17:46
mithroany luck17:50
* mithro really should head to bed17:50
guitsaruIt is running17:50
guitsaruheh, have you not slept yet?17:50
guitsaruI can't connect because my name does not exist on the server17:51
mithroyou need to add it with tpserver-py-tool17:52
mithro./tpserver-py-tool --addgame tp minisecplus [email protected] "A test game"17:52
mithro./tpserver-py-tool --adduser tp nash password17:52
mithro./tpserver-py-tool --populate tp 0 1 1 2 217:52
mithro./tpserver-py-tool --turn tp17:52
guitsaruOk, thanks17:54
guitsaruIt's working17:54
mithroi'm sure there are plenty of bugs17:55
mithroI should really sit down and get the AI's to play to then end of a game17:55
guitsarumithro: do I need to type that every time, or is it saved?17:55
mithrounlike tpserver-cpp17:56
mithrotpserver-py uses a database backed :P17:56
guitsaruOk, awesome17:56
guitsarumithro: how do I set it up so that tpsai-py can log into the server?18:01
mithro./tpserver-py-tool --adduser tp tpsai-py cannonfodder18:01
mithro./tpsai-py tp://tpsai-py:[email protected]/tp18:02
mithroanyway i'm heading to bed18:07
*** nash has joined #tp18:34
niphreegood night18:59
*** niphree has quit IRC18:59
*** xdotx has quit IRC19:41
*** daxxar has quit IRC19:44
*** tuna-fish has quit IRC19:44
*** greywhind has quit IRC19:44
*** daxxar has joined #tp19:45
*** tuna-fish has joined #tp19:45
*** greywhind has joined #tp19:45
*** daxxar has quit IRC19:46
*** daxxar has joined #tp19:46
* nash wonders if mithro is around21:28
*** xdotx has joined #tp21:31
nashheyo xdotx21:35
xdotxhey nash21:36
nashhow is life?21:36
xdotxnot bad. i'm on vacation... i think21:36
nashSo that means lots of TP work21:38
xdotxnash: :P i kinda wish. been busy with loads of other stuff here21:39
nashxdotx: So what are you going to work on for TP next?21:40
xdotxnash: i've got some things i plan on cleaning up on for RFTS, and i've had some ideas for some changes in tpserver-cpp21:41
xdotx... i should probably write down those ideas when they come to me.21:42
* xdotx has a bad habit of designing elaborate things in his head and then forgetting most of it21:43
nashDocument early21:43
nashWhats really cool is when someone else does the work for you ;-)21:43
xdotxback in a few22:00
*** xdotx has quit IRC22:00
*** JLP has quit IRC22:09
*** JLP has joined #tp23:11

Generated by 2.5 by Marius Gedminas - find it at!