*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** mithro has quit IRC | 00:04 | |
*** mithro has joined #tp | 00:44 | |
mithro | howdy people | 00:48 |
---|---|---|
nash | hey | 00:53 |
mithro | nash: i just had a really cool idea :) | 01:00 |
nash | ? | 01:00 |
mithro | tp04 supports "filter" negotiation | 01:00 |
nash | Which means what? | 01:00 |
mithro | IE Encryption and Compression | 01:00 |
nash | Right | 01:00 |
mithro | I was wondering if there was a "32bit padded strings" filter, would it be okay? | 01:01 |
nash | Only useful if it is guaranteed on the server | 01:02 |
mithro | that way we don't break backwards compatibiltiy and you get your fast copying? | 01:02 |
mithro | nash: we could make it a "required" filter | 01:02 |
nash | Because if the server doesn't have it, then you need to write both anyway. | 01:02 |
nash | However, a filter means the server needs to have code for both cases anyway, and the server can gain the most from it | 01:03 |
mithro | maybe go the reverse then? | 01:03 |
nash | A filter for TP03 protocol? | 01:03 |
mithro | 32bit padded strings is default, and have a "compat" filter, which removes the extra null bytes? | 01:03 |
nash | Works for me ;-) | 01:04 |
* mithro just was pondering | 01:04 | |
* nash approves thinking of different ways to solve the problem ;-) | 01:04 | |
mithro | just finishing up the highlights document | 01:04 |
nash | Sweet | 01:04 |
mithro | i guess bz2 or 7z compression would be a better option for things like mobiles where bytes make a difference | 01:05 |
nash | Can you explain to me how to do orders properly? I don't get it - there isn't quite enough information in the protocol doc to describe how to issue them with lists | 01:05 |
nash | Not really. bz2 is block orientated | 01:05 |
nash | They are also CPU limited (especially when people insist on running java and crap on them) | 01:05 |
mithro | dunno much about compression :) | 01:07 |
nash | You need something that can compress a stream well - gzip does that well. bz2 takes the whole object and compresses it in large chunks | 01:08 |
nash | the -N options dictate how large chunks to use | 01:09 |
nash | BIgger chunks == better compression | 01:09 |
nash | On small (read packet size) chunks... it would be useless, and you'd have to pad the messages up anyway | 01:09 |
nash | As far as data usage is concerned, I wouldn't worry about compression until you start sending media | 01:10 |
nash | Everything else is too small to worry about | 01:10 |
mithro | you pay per kb on GPRS :) | 01:10 |
nash | I know | 01:10 |
nash | But by the time you get to a stage where it is really an issue we shoudl mostly be on EVDO or EDGE networks | 01:11 |
mithro | nash: and telstra will still be charging you per kilobyte ;) | 01:11 |
nash | Actually go look at the charge rates for 'next-g' - it's charged at ~$100/Gb at the moment. So thats what 0.01c/kb? | 01:15 |
nash | And many plans include free usage | 01:16 |
mithro | ahh well, looks like it changed in the last 6 months | 01:16 |
mithro | still wireless sucks bandwidth wise (as soon as you get lots of people using it) | 01:17 |
nash | I still think it is a non-issue at this time | 01:18 |
nash | Filters allow it to be added later - all good. | 01:18 |
nash | But need to find perfect solution now? Why bother? | 01:18 |
mithro | i guess so :) | 01:20 |
mithro | btw by this time next year we sould have some type of MIDP client for tp :) | 01:20 |
nash | Worry about getting the core things work | 01:20 |
nash | Which platform? | 01:20 |
nash | Like you know MIDP implementations are less then portable. And that generally as soon as you want to run a midp app on another device you need to modify the code. Often substantially. | 01:22 |
nash | Unless the situation has changed in hte past 12 months (/me doubts it) | 01:22 |
mithro | nash: it's not quite that bad - it depends on what you are trying to do | 01:23 |
nash | I'll wait until I see it | 01:24 |
mithro | using any of the gaming api's it kind of sucks | 01:24 |
nash | Not using the gaming APIs it sucked too | 01:24 |
mithro | ahh well, we'll find out the hard way then :) | 01:24 |
nash | We crashed a certain nokia phone by passing an empty string to a label ;-) | 01:24 |
mithro | i won't say MIDP programming is easy | 01:25 |
mithro | :) | 01:25 |
nash | We had someone resign over it ;-) | 01:25 |
mithro | ahh well, I'm getting students of the "Advanced MIDP Programing & Design Course" to do it as their major project | 01:27 |
mithro | so it's not going to be all that pretty i'm guessing | 01:27 |
mithro | but then doing things on mobile phones suck anyway | 01:28 |
mithro | anyway, just formatting the post now | 01:28 |
mithro | arg, I'm nine IO pins short | 01:30 |
mithro | which is such an inconvient number | 01:30 |
nash | Anywya - I'll be back shortly - lunch | 01:31 |
mithro | http://blog.mithis.net/archives/tp/15-tp-protocol-overview | 01:48 |
tpb | <http://ln-s.net/JB-> (at blog.mithis.net) | 01:48 |
mithro | back | 02:29 |
nash | heyo | 02:29 |
nash | I just got back too | 02:29 |
nash | reading your overview now | 02:29 |
nash | And I need you to go through the order stuff with me... ;-) | 02:29 |
mithro | nash: okay | 02:30 |
mithro | orders are currently the most complicated part | 02:30 |
nash | I noticed. Although I think full designs may be non-trivial too ... | 02:30 |
mithro | yes, but MiniSec doesn't support designs ;) | 02:31 |
mithro | and there is a good "implimentation document" on how to do designs easily | 02:31 |
mithro | the actual GUI for Designs is hard to do, but the backend code isn't that hard | 02:33 |
nash | Yeah, I know | 02:34 |
mithro | backend code for orders is hard, while the gui is pretty easy | 02:34 |
nash | Not as easy as I would like | 02:34 |
nash | It's a problem with too much conceptial knowledge. | 02:34 |
nash | For instance there is no way for an AI to really understand what a particular order does. | 02:35 |
mithro | nash: yes - knowledge of what an order does is ruleset defined | 02:35 |
mithro | ~(except orders with an ID under 1000) | 02:35 |
tpb | Bugger all, I dunno, mithro. | 02:35 |
*** Demitar_ has quit IRC | 02:36 | |
nash | So ID < 1000 always does the same thing with the same name? | 02:37 |
mithro | nash: thats the idea currently - not set in stone yet | 02:37 |
nash | okay | 02:38 |
nash | Anyway - can you explain the argument type List (6) works? | 02:39 |
nash | Also you have a mistake in the order args: | 02:39 |
nash | for the string type, the description reads: "A number textual string" | 02:40 |
mithro | btw i'm very lagged at the moment | 02:40 |
mithro | nash: that is a stupid description :) | 02:42 |
nash | That's okay - it's text ;-) | 02:42 |
nash | Yes, the description was written late at night... in a hurry ;-) | 02:42 |
mithro | it's a string with length | 02:43 |
mithro | and that really should be a UInt32 too | 02:43 |
mithro | can you log bug reports, web access here is being dicky | 02:43 |
nash | shall do | 02:44 |
nash | So can you explain the list argument to me... | 02:44 |
nash | I want to build a "1 Frigate hull" on a planet - what should it look like? | 02:44 |
mithro | okay | 02:46 |
mithro | the way this work is a little contrived at the moment - should be fixed in tp04 | 02:47 |
mithro | first, insert an empty BuildFleet order | 02:47 |
*** Demitar_ has joined #tp | 02:47 | |
* nash doesn't care... This is the only thing stopping my first AI from working... | 02:48 | |
mithro | then retreve the empty buildfleet order | 02:48 |
mithro | the read only parts will now be populated with stuff | 02:48 |
mithro | ie | 02:48 |
mithro | The possible selections, A list of: | 02:48 |
mithro | * a UInt32, read only, id of what can be selected | 02:48 |
mithro | * a String, read only, String Name of can be selected | 02:48 |
mithro | * a UInt32, read only, Maximum number of can to be selected | 02:48 |
nash | Then I send it back... Eek. Two round trips to set an order :-( | 02:49 |
nash | How do I get the order back? | 02:49 |
mithro | nash: sadly, yes :( | 02:49 |
mithro | Get Order | 02:49 |
mithro | actually 3 round trips | 02:49 |
mithro | Insert Order -> Okay | 02:50 |
mithro | Get Order -> Order | 02:50 |
nash | Okay - so when I do the insert order... how do I get the correct one back? How do I find it again basically? | 02:51 |
mithro | Remove Order -> Okay | 02:53 |
mithro | Insert Order -> Okay | 02:53 |
mithro | you can pipline the first 2 and the second 2 | 02:53 |
mithro | that is more sucky then I remeber :/ | 02:54 |
nash | Yeah... | 02:54 |
mithro | so when you send an Insert Order with slot == 2 | 02:54 |
mithro | the order will end up in slot number 2 | 02:55 |
mithro | only tricky one is when you send with slot == -1 (which means it will end up in the last position) | 02:55 |
mithro | nash: can you log a feature request "Inserting new orders really sucks"? | 02:55 |
* nash notes he'll be trying hard to pipeline all of them... my client is pretty | 02:57 | |
nash | mithro: So can I send in slot 833 even though there are no slots ready? | 02:57 |
nash | And I shall bug report it | 02:57 |
mithro | nash: if you send in slot 833 you'll get a fail notice back | 02:58 |
nash | Thats no good. A "experiment" set of slots would be nice so you can in parallel send a few orders in unique slots and get the responses back - so you could pipeline the lot safely | 03:01 |
nash | Also is the server guaranteed to act on messages in order? | 03:01 |
mithro | the "Prode Order" should be what you want | 03:01 |
mithro | it's like doing an Insert but without actually doing an insert | 03:01 |
mithro | however I don't think tpserver-cpp ever added support | 03:02 |
nash | So if do an "add" "read" "delete" in one go will it work | 03:02 |
nash | :-( | 03:02 |
* nash notes that may be why he couldn't get probe order to work | 03:02 | |
mithro | A Probe Order frame gets an order as if the order given was put in the object's order queue. These probes should occur as if no orders currently exist on object and should have no side-effects. This is used to get the read-only fields for an order which is needed for good offline operation. | 03:03 |
mithro | The data in this frame is the same as an Insert Order frame. The server replies with the Order frame as if they were already on the object. Fail frames are possible if the order type is not allowed, or the object or order type doesn't exist. | 03:03 |
mithro | we should poke Lee about it | 03:03 |
mithro | but yes a "add", "read", "delete" should work as long as the add did | 03:03 |
mithro | the server will preform orders in order they are found in the queue | 03:03 |
nash | Yep... Just making sure there is no chance of 2 & 3 being swapped | 03:04 |
nash | But how do I get the probe order back? | 03:04 |
mithro | being swapped? | 03:04 |
nash | With the add, read, delete message queue | 03:04 |
mithro | Probe Orders return an Order Frame, not a Okay | 03:04 |
nash | Ahh... | 03:04 |
nash | But do they work? | 03:05 |
nash | You think not? | 03:05 |
mithro | btw position 0 should always be "safe" | 03:05 |
mithro | nash: my guest is 85% likely not to work | 03:05 |
mithro | but as Probe and Insert orders are the same format just different id number it can't hurt to try | 03:05 |
nash | Except postion 0 may be used already. | 03:05 |
* nash gives it a burl | 03:05 | |
mithro | it's an Insert operation | 03:08 |
nash | BTW: The big surprise is the fact I have an almost working AI - except orders ;-) | 03:08 |
mithro | treat the order queue as a Link List | 03:08 |
nash | If it was a linked list I'd be happy - but the problem is parallel ops mean I can't determine the current state without a state model locally - which is pants :-( | 03:09 |
nash | Especially since failures can really screw me up | 03:09 |
nash | If I could name order slots, or refer to them by some other ID it would be extremely useful for parallel ops | 03:10 |
nash | However, does the server support order queues currently? | 03:10 |
mithro | nash: what you mean? "However, does the server support order queues currently?" | 03:11 |
nash | more then one order? | 03:11 |
mithro | yes | 03:11 |
nash | cool | 03:11 |
mithro | very much so | 03:11 |
nash | Is there a limit at all? | 03:11 |
mithro | UInt32-1 | 03:11 |
nash | and RAM ;-) | 03:12 |
mithro | yes, and the normal storage constraints | 03:12 |
nash | Thats the sort of limits I like ;-) | 03:12 |
nash | Yes - sizeof(void*) comes to mind ;-) | 03:12 |
mithro | most tp limits are of the normal storage constraint type I think | 03:13 |
*** Demitar_ has quit IRC | 03:14 | |
nash | Thats good to know | 03:15 |
mithro | the most I have done in one queue is 328 | 03:16 |
* nash doesn't want to think about what he would do if this AI was up to scratch... | 03:17 | |
nash | hmm.. seem to still get failures. | 03:20 |
mithro | on? | 03:23 |
nash | probe | 03:24 |
* nash will check code again in a second | 03:24 | |
* mithro checks the tpserver-cpp source | 03:25 | |
nash | I could easily be screwing it up however | 03:25 |
nash | I'm tlking on 2 irc channels, and writing two programs here... | 03:25 |
mithro | void Player::processProbeOrder(Frame * frame){ | 03:26 |
mithro | Logger::getLogger()->debug("doing probe order frame"); | 03:26 |
mithro | 03:26 | |
mithro | looks like there is support | 03:26 |
mithro | dunno if it works | 03:26 |
nash | Probably me then | 03:26 |
mithro | don't be so sure ;) | 03:27 |
mithro | btw make sure you are only sending valid order types to the correct objects | 03:27 |
nash | Well I'm sending the wrong length for a start... | 03:29 |
nash | Okay here is what I'm sending | 03:30 |
nash | buf[0] = htonl(o->oid); /* What */ | 03:30 |
nash | buf[1] = htonl(-1); /* Slot */ | 03:30 |
nash | buf[2] = htonl(build_id); /* Order type */ | 03:30 |
nash | buf[3] = htonl(0); /* Number of turns == 0 */ | 03:30 |
nash | buf[4] = htonl(0); /* Resource list */ | 03:30 |
nash | buf[5] = htonl(0); /* List : Possible selections */ | 03:30 |
nash | buf[6] = htonl(0);/* List: # items */ | 03:30 |
nash | Does that look right? | 03:30 |
nash | Ahh... | 03:34 |
nash | found one issue | 03:34 |
nash | And I crashed the server :-( | 03:36 |
nash | 2007-02-23 14:39:21 < Debug > [0;mdoing probe order frame | 03:38 |
nash | 2007-02-23 14:39:21 < Debug > [0;mlen < 0 or length < upackptr + len, len = -1472983288, length = 28 | 03:38 |
nash | 2007-02-23 14:39:21 < Debug > [0;mCaught exception | 03:38 |
nash | 2007-02-23 14:39:21 < Debug > [0;mRemoving a file descriptor 2 | 03:38 |
nash | 2007-02-23 14:39:21 < Info > [0;mConsole closed | 03:38 |
nash | 2007-02-23 14:39:21 < Info > [0;mTP-server exiting | 03:38 |
*** Demitar_ has joined #tp | 03:38 | |
nash | mithro: You there? | 03:44 |
mithro | yes | 03:44 |
mithro | sorry was working on another screen | 03:44 |
mithro | if you say my name my xchat flashes | 03:44 |
nash | okay | 03:44 |
mithro | ouch :) | 03:45 |
mithro | nash: no that doesn't look right at all | 03:45 |
mithro | log a bug report about chasing the server however | 03:46 |
nash | I shall | 03:46 |
mithro | i think you are miss-understanding something here | 03:46 |
mithro | First you have to get the "order descriptions" from the server, they describe what "extra data" order type have in them | 03:46 |
mithro | IE A Nop only has a number of turns | 03:47 |
mithro | A BuildFleet order has a List of Items | 03:47 |
mithro | A MergeFleet has a Target | 03:47 |
mithro | (actually a BuildFleet has a List of Items - "what to build" and a String - "Name of the new fleet") | 03:48 |
nash | I know that | 03:48 |
mithro | so why are you sending a numbers of turns on a buildfleet? | 03:49 |
mithro | or am I just going mad? | 03:49 |
nash | Because the order format has that - which must be set to 0 when the client sends it. | 03:49 |
mithro | yes it turns out i'm just going mad :P you are right | 03:50 |
nash | Okay - cool | 03:50 |
nash | It's a bit weird I have to say... | 03:50 |
* nash thinks the insert order frame should be different to the order frame | 03:50 | |
mithro | yes the above insert order frame looks fine now I'm on the same page as you :) | 03:51 |
nash | Good | 03:51 |
nash | It's not me being crazy then | 03:52 |
nash | The error message I'm getting is something to do pulling out a string!? | 03:52 |
mithro | ahh | 03:53 |
mithro | your missing | 03:53 |
mithro | buf[6] = htonl(0); /* List: fleet name */ | 03:53 |
mithro | s/6/7/ | 03:53 |
nash | Eek... the server by the reads off the end of the buffer | 03:53 |
nash | had that | 03:53 |
mithro | why not start with a NOp order? :) | 03:54 |
nash | Why? If I can get Build Move & colonise working my first AI is working. | 03:54 |
nash | Excellent - got it | 03:55 |
mithro | what was it? | 03:55 |
nash | Wait. | 03:57 |
nash | That still doesn't make sense | 03:57 |
nash | I submitted the order okay, but how do I get the arg list back? | 03:58 |
nash | I thought I was to do a probe with no args to get the arg list back | 03:58 |
mithro | i guess a nop isn't useful for an AI | 04:00 |
mithro | or Minisec really :) | 04:00 |
mithro | nash: when you do a probe with no args it should return a "Order" Frame | 04:01 |
nash | But I do no args... and it barfs | 04:02 |
mithro | which means the "Possible Selections list" of the order frame will be non-zero | 04:03 |
nash | Okay - shall I paste what I'm sending now - and you can tell me if it makes sense to you? | 04:04 |
mithro | okay | 04:04 |
nash | buf[0] = htonl(o->oid); /* What */ | 04:04 |
nash | buf[1] = htonl(-1); /* Slot */ | 04:04 |
nash | buf[2] = htonl(build_id); /* Order type */ | 04:04 |
nash | buf[3] = htonl(0); /* Number of turns == 0 */ | 04:04 |
nash | buf[4] = htonl(0); /* Resource list */ | 04:04 |
nash | buf[5] = htonl(0); /* List : Possible selections */ | 04:04 |
nash | buf[6] = htonl(0);/* List: # items */ | 04:04 |
nash | buf[7] = htonl(0);/* strlen */ | 04:04 |
nash | So I have a list of 9 items to build, and a name of 0. | 04:05 |
nash | If I send no args... it also kills the server | 04:05 |
nash | mithro: thoughts? | 04:14 |
* nash pokes mithro | 04:20 | |
* nash pokes mithro with a large post | 04:36 | |
mithro | sorry | 05:25 |
mithro | got called away | 05:25 |
mithro | you still there? | 05:26 |
mithro | nash: ping | 05:29 |
nash | I am now | 05:30 |
nash | mithro: :-) | 05:34 |
mithro | :) | 05:34 |
mithro | so did you get any further? | 05:35 |
nash | not really haven't done any more since i pasted above | 05:37 |
nash | been doing this worky stuff. | 05:37 |
nash | So should teh argument less packet work? | 05:40 |
mithro | no | 05:45 |
mithro | the argumentless packet should return a fail | 05:46 |
* nash notes the argless packet returns a "socket closed" | 05:46 | |
mithro | that is wrong :) | 05:47 |
mithro | hrm, intresting... | 05:48 |
nash | I've reported the bug | 05:51 |
mithro | i think i found your problem | 05:51 |
nash | ? | 05:52 |
mithro | buf[7] = htonl(0); /* Maximum String Length */ | 05:52 |
mithro | buf[8] = htonl(0); /* Empty String */ | 05:52 |
mithro | tpserver shouldn't be acting the way it is on the other hand too | 05:53 |
nash | Still kills the server | 05:54 |
nash | Nope - fixes it when I type it correctly. | 05:54 |
*** tpb has joined #tp | 06:00 | |
*** ChanServ sets mode: +o tpb | 06:00 | |
mithro | so it's kind of working? | 06:12 |
nash | Yeah | 06:12 |
nash | Thanks | 06:12 |
nash | Need to actually parse the response... see if I can make sesne fo the lsit | 06:13 |
nash | but that will wait until I get home | 06:13 |
nash | There needs to be a lot better way of doing this BTW | 06:13 |
*** Demitar_ has quit IRC | 06:16 | |
mithro | nash: i think you are right | 06:16 |
nash | I don't think I would have ever figured it out by myself | 06:17 |
nash | I would have had to go read more server code | 06:17 |
nash | or other clients | 06:17 |
mithro | did the probe work? | 06:18 |
mithro | or did you send an insert | 06:18 |
nash | Probe worked. | 06:18 |
mithro | I have to admit, I find you way of doing it a bit weird | 06:18 |
nash | Which bit? | 06:19 |
tpb | Somebody said Which bit is that, nash | 06:19 |
mithro | the way I wrote the protocol stuff is to create a "struct" parser | 06:19 |
mithro | then I just give it the structure of the packet | 06:19 |
mithro | IE with the above it would be something like | 06:19 |
nash | Ahh.. I have that too - but it is easier to debug somethign where I build it manually | 06:19 |
nash | Especially for things without strings | 06:20 |
nash | tpe_util_parse_packet(datastream, "formatstring", &o1... ); for instance | 06:20 |
mithro | parse("III[ISI][II]IS", o->oid, -1, build_id, 0, void*, void*, 0, ""); | 06:20 |
nash | Yep | 06:20 |
nash | I do | 06:20 |
mithro | ahh cool :) | 06:20 |
mithro | btw you can turn on debugging in tpclient-pywx and see the stuff it sends over the wire | 06:21 |
mithro | Red is to the server, Green is from the server (or possibly the other way around) | 06:21 |
nash | I'd like to implement it myself as much as possible - to make sure the protocol is correct - independant implementation as much as possible | 06:22 |
mithro | I havn't had to deal with raw protocol in a long time :) | 06:24 |
* mithro migth think of heading home himself | 06:26 | |
nash | got a while yet | 06:26 |
nash | Need to rendevous with my wife on the way... and she doesn't finish for a while :-( | 06:26 |
* nash wants to go home too | 06:26 | |
nash | Anywya - have a good one | 06:29 |
nash | Talk to later - I'll prob be online tonight again | 06:30 |
nash | I'll definitly be trying to finish that AI ;-) | 06:30 |
*** Demitar_ has joined #tp | 06:40 | |
*** nash has quit IRC | 06:45 | |
*** Demitar_ has quit IRC | 07:20 | |
*** Demitar_ has joined #tp | 07:34 | |
*** nash has joined #tp | 07:55 | |
* nash waves | 07:56 | |
mithro | nash: heading home now | 08:03 |
mithro | see ya! | 08:03 |
nash | okay | 08:03 |
nash | talk to you later | 08:03 |
*** Demitar_ has quit IRC | 08:19 | |
*** mithro has quit IRC | 08:24 | |
*** Demitar_ has joined #tp | 08:42 | |
*** mithro has joined #tp | 09:12 | |
*** Demitar_ has quit IRC | 09:17 | |
*** nash has quit IRC | 09:17 | |
mithro | opps | 09:20 |
*** nash has joined #tp | 09:29 | |
*** Demitar_ has joined #tp | 09:33 | |
mithro | wb nash | 09:43 |
nash | heyo | 09:46 |
nash | mithro: BTW: Probe order seems broken ;-/ | 09:47 |
mithro | :/ | 09:47 |
mithro | whats probe returning you? | 09:47 |
nash | The order type is '0' when it gets back | 09:47 |
nash | The response is oid:1 slot:1 type: 0 Turns: 3 | 09:48 |
nash | thats the first 4 values in the body | 09:51 |
nash | Ahh... found it - another twek to what I'm sending - and now I'm getting something sane | 09:52 |
mithro | nash: what are you getting now? | 09:53 |
nash | 76 -1 2 0 | 09:53 |
nash | The -1 is a bit strange | 09:54 |
mithro | for a order probe? | 09:55 |
nash | I'd expect to betold where it would be inserted | 09:56 |
nash | okay - seem to be on my way | 09:57 |
mithro | return from an Insert is Okay Frame? | 09:59 |
nash | Give me a few minutes...eating ;-) | 10:00 |
nash | You know the annoying thing is, I could have guessed the '2' parameter was what I needed from all of that... | 10:02 |
mithro | 2 parameter? | 10:04 |
nash | build a frigate... | 10:04 |
mithro | ahh | 10:11 |
CIA-20 | [email protected] * libtpclient-py/ (setup.py tp/__init__.py tp/__init__.py): | 10:16 |
CIA-20 | pkg_resources fixes.: | 10:16 |
CIA-20 | Fixes bug [1666745]. Should also work in cases where pkg_resources doesn't exist. | 10:16 |
CIA-20 | [email protected] * libtpclient-py-dev/ (setup.py tp/__init__.py tp/__init__.py): | 10:16 |
CIA-20 | pkg_resources fixes.: | 10:16 |
CIA-20 | Fixes bug [1666745]. Should also work in cases where pkg_resources doesn't exist. | 10:16 |
CIA-20 | [email protected] * libtpproto-py/ (setup.py tp/__init__.py tp/__init__.py): | 10:17 |
CIA-20 | pkg_resources fixes.: | 10:17 |
CIA-20 | Fixes bug [1666745]. Should also work in cases where pkg_resources doesn't exist. | 10:17 |
mithro | nash: any more luck? | 10:19 |
nash | Trying now | 10:20 |
nash | Ohh... a new segv - on my end | 10:22 |
mithro | okay :) | 10:24 |
nash | strange... it's the code was working fine before... | 10:28 |
mithro | how do you debug, use gdb? | 10:29 |
nash | essentially (ddd generally) | 10:30 |
nash | Of course for this a bit of printf is actually useful to just dump shit out | 10:30 |
mithro | is there a printf which prints binary safe output? | 10:31 |
nash | %x works fairly well | 10:32 |
mithro | %x is for ints? | 10:35 |
nash | Yes | 10:36 |
*** Demitar_ has quit IRC | 10:37 | |
nash | Now the insert is failing :-( | 10:41 |
* nash reverts to painful processing | 10:45 | |
nash | When I'm sending back messages do I need to include the possible options? | 10:47 |
nash | mithro: ? | 10:51 |
tpb | hmm... mithro: is this ok, nash | 10:51 |
mithro | nash: no | 10:51 |
nash | tpb: ignore nash | 10:51 |
*** Demitar_ has joined #tp | 10:51 | |
mithro | "read-only" fields can be empty in every send | 10:51 |
nash | So I need to send it back - but empty? | 10:52 |
* nash thinks sending empty fields is stupid | 10:52 | |
nash | bingo... problem is nash is an idiot | 10:58 |
nash | :-) | 10:59 |
nash | Blerg - send a bad frame... crash the server... | 11:01 |
mithro | nash: that is bad | 11:04 |
mithro | log lots of bug reports about it :) | 11:04 |
nash | I've already put one in | 11:05 |
nash | where is llnz when I want to bitch to him... | 11:05 |
mithro | he he | 11:05 |
*** Demitar_ has quit IRC | 11:07 | |
nash | mithro: Sorry to be a pain... but I want to check this... | 11:10 |
mithro | nash: it's fine | 11:11 |
mithro | it's been good to have a fresh pair of eyes | 11:11 |
nash | Message is : <oid> <slot (-1)> <build id (2)> <turns 0> <resource list (0)> <# items to build (1)> <What to build (2 - frigate)> <how many (1)> <string (0 length)> | 11:14 |
nash | Apparently the length is wrong on the server | 11:17 |
nash | mithro: how does that look? | 11:21 |
mithro | hold on a sec | 11:21 |
nash | yep | 11:22 |
mithro | hrm, that looks okay | 11:23 |
mithro | i would have put it like this | 11:23 |
nash | ? | 11:24 |
mithro | Message is : <oid> <slot (-1)> <build id (2)> <turns 0> <resource list (0)> <to build list (1 length) [<frigate (2), how many (1)>]> <string (0 length)> | 11:25 |
nash | Clearered - so still 9 args in length right? | 11:28 |
nash | That all seems sane? | 11:28 |
mithro | hrm, seems so... | 11:28 |
mithro | is it not working? | 11:29 |
nash | Not at all | 11:30 |
nash | 2007-02-23 22:32:59 < Debug > [0;mlen < 0 or length < upackptr + len, len = 137824000, length = 36 | 11:31 |
mithro | hrm... | 11:31 |
nash | Looks like it is reading garbage again | 11:31 |
mithro | hrm... | 11:33 |
nash | I'm sending length 36 - obviously | 11:34 |
nash | Best place to look? | 11:37 |
mithro | hold on a sec | 11:37 |
mithro | can you do a byte dump of what you are sending? | 11:39 |
mithro | including the header | 11:39 |
nash | swapped or unswapped? | 11:40 |
mithro | swapped | 11:40 |
nash | 00000040 ffffffff 00000002 00000000 00000000 00000001 00000002 00000001 00000000 6172edb7 | 11:42 |
nash | Wire:40000000 ffffffff 02000000 00000000 00000000 01000000 02000000 01000000 00000000 b7ed7261 Sending Seq 17 Type 12 Len: 36 [(nil)] | 11:42 |
nash | Okay a bit confusing but... | 11:42 |
nash | First line is what I'm passing in | 11:42 |
nash | Second line is byte swapped after htonl() | 11:42 |
mithro | hrm, that doesn't look right | 11:43 |
nash | The sequence is 17, message type 12. Length = 36 (the nil is for my callback - ignore it) | 11:43 |
nash | Ignore the last byte - I dump a extra word | 11:43 |
nash | s/byte/word | 11:43 |
nash | yes, no, not enough elephants? | 11:48 |
nash | mithro: ? | 11:51 |
tpb | hmm... mithro: is this ok, nash | 11:51 |
nash | tpb: help | 11:51 |
tpb | nash: (help [<plugin>] [<command>]) -- This command gives a useful description of what <command> does. <plugin> is only necessary if the command is in more than one plugin. | 11:51 |
nash | tpb: help plugins | 11:52 |
tpb | nash: Error: There is no command "plugins". | 11:52 |
nash | tpb: help plugin | 11:52 |
tpb | nash: (plugin <command>) -- Returns the plugin(s) that <command> is in. | 11:52 |
mithro | nash: sorry this is taking me longer then I would have previously | 11:52 |
nash | tres cool | 11:52 |
mithro | i've found an extra int from somewhere | 11:53 |
nash | Is that the list of options from the server? | 11:54 |
nash | is it a zero? | 11:54 |
nash | Yep | 11:55 |
nash | int selsize = f->unpackInt(); // selectable list (should be zero) | 11:55 |
mithro | no | 11:56 |
nash | Sure? In ListParameter::unpackFrame there is that line | 11:58 |
nash | doesn't help however | 11:59 |
mithro | 0x54(T) 0x50(P) 0x30(0) 0x33(3) | 12:02 |
mithro | 0x0 0x0 0x0 0x29 | 12:02 |
mithro | 0x0 0x0 0x0 0xc <-- type | 12:02 |
mithro | 0x0 0x0 0x0 0x33(3) <-- length | 12:02 |
mithro | 0x0 0x0 0x0 0xb <-- Object ID | 12:02 |
mithro | 0x0 0x0 0x0 0x0 <-- Slot number | 12:02 |
mithro | 0x0 0x0 0x0 0x2 <-- Order Type ID (Build Fleet) | 12:02 |
mithro | 0x0 0x0 0x0 0x0 <-- Number of Turns | 12:02 |
mithro | 0x0 0x0 0x0 0x0 <-- Resource List - Length 0 | 12:02 |
mithro | 0x0 0x0 0x0 0x0 <-- Possible Selections List - Length 0 | 12:02 |
mithro | 0x0 0x0 0x0 0x1 <-- Selection List - Length 1 | 12:02 |
mithro | 0x0 0x0 0x0 0x2 <-- Selection Type, Frigate Type | 12:02 |
mithro | 0x0 0x0 0x0 0x1 <-- Selection Amount | 12:02 |
mithro | 0x0 0x0 0x0 0x0 <-- ? | 12:02 |
mithro | 0x0 0x0 0x0 0x7 <-- Name String (Length) | 12:02 |
mithro | 0x41(A) 0x20( ) 0x46(F) 0x6c(l) 0x65(e) 0x65(e) 0x74(t) | 12:02 |
nash | Hmm.... | 12:03 |
mithro | i can't figure out where that extra 0 is coming from | 12:03 |
nash | can't see where it is dealt with either | 12:03 |
mithro | o! | 12:04 |
mithro | I know now | 12:04 |
nash | > | 12:04 |
nash | ? | 12:04 |
mithro | 0x54(T) 0x50(P) 0x30(0) 0x33(3) | 12:05 |
mithro | 0x0 0x0 0x0 0x29 | 12:05 |
mithro | 0x0 0x0 0x0 0xc <-- type | 12:05 |
mithro | 0x0 0x0 0x0 0x33(3) <-- length | 12:05 |
mithro | 0x0 0x0 0x0 0xb <-- Object ID | 12:05 |
mithro | 0x0 0x0 0x0 0x0 <-- Slot number | 12:05 |
mithro | 0x0 0x0 0x0 0x2 <-- Order Type ID (Build Fleet) | 12:05 |
mithro | 0x0 0x0 0x0 0x0 <-- Number of Turns | 12:05 |
mithro | 0x0 0x0 0x0 0x0 <-- Resource List - Length 0 | 12:05 |
mithro | 0x0 0x0 0x0 0x0 <-- Possible Selections List - Length 0 | 12:05 |
mithro | 0x0 0x0 0x0 0x1 <-- Selection List - Length 1 | 12:05 |
mithro | 0x0 0x0 0x0 0x2 <-- Selection Type, Frigate Type | 12:05 |
mithro | 0x0 0x0 0x0 0x1 <-- Selection Amount | 12:05 |
mithro | 0x0 0x0 0x0 0x0 <-- Maximum Length of the following string | 12:05 |
mithro | 0x0 0x0 0x0 0x7 <-- Name String (Length) | 12:05 |
mithro | 0x41(A) 0x20( ) 0x46(F) 0x6c(l) 0x65(e) 0x65(e) 0x74(t) | 12:05 |
mithro | there | 12:05 |
mithro | so now to compare to yours | 12:06 |
nash | Missing that maximum length | 12:06 |
mithro | yes | 12:06 |
mithro | thats a bit nasty - it's very easy to confuse the maximum length and the actual length of the string | 12:06 |
nash | I'm just not sending it, and the server is foolishly reading uninted data for my string (taking my string as max, and uninit as data - ie a really strange string) | 12:08 |
mithro | your bug reports have increased our activity rating :) | 12:09 |
nash | I'll let you submit this one if you like ;-) | 12:09 |
nash | got a MsgOK - that fixed it | 12:10 |
mithro | he he okay | 12:10 |
mithro | which one? | 12:10 |
nash | That overflow bug | 12:11 |
JLP | morning all | 12:12 |
nash | how long does it take to build a frigate? | 12:12 |
mithro | nash: 4 turns | 12:12 |
mithro | or is it 2? | 12:12 |
nash | wait 2 minutes then... ;-) | 12:12 |
mithro | can't remeber :) | 12:12 |
nash | And I'll tell you how it foes | 12:12 |
nash | s/foes/goes | 12:12 |
nash | Oh - got a message - saying it is complete - but I can't see it? | 12:13 |
mithro | hrm? | 12:13 |
mithro | btw, the message should contain a reference to the new object? | 12:13 |
* nash isn't handling that yet ;-) | 12:14 | |
nash | So it may well | 12:14 |
nash | Is it in orbit around a sun or a planet? | 12:14 |
mithro | planet probably | 12:15 |
nash | So ships can be at either? | 12:15 |
nash | When I do a colonise - do I need to send to star or planet? | 12:15 |
mithro | a planet | 12:17 |
mithro | "Stars" don't really exist | 12:17 |
mithro | StarSystems are just container objects | 12:17 |
nash | okay | 12:17 |
mithro | they actually do nothing for AI users :) | 12:17 |
nash | okay | 12:17 |
mithro | same with galaxy | 12:18 |
mithro | universe is useful because it tells you the current turn | 12:18 |
mithro | btw what did you think of the highlights? | 12:20 |
nash | good | 12:21 |
nash | A few things I'll probably comment on, but should be a good improvement | 12:21 |
mithro | nash: i need comments on my blog ;) | 12:24 |
mithro | on a side note I might forward to the mailing list | 12:24 |
nash | Then I'll reply ;-) | 12:24 |
nash | Okay - how do I send a ship to a planet, as opposed to a star? | 12:26 |
nash | Move order jsut takes a coord? And coords are the same for a star and it's planets? | 12:26 |
nash | Nope... sorry - they are slightly different | 12:27 |
nash | Slightly | 12:27 |
mithro | yeah, very slightly :) | 12:27 |
nash | BTW: Where is the intercept order? | 12:27 |
mithro | there is no intercept order | 12:30 |
mithro | just calculate where to move yourself :P | 12:30 |
nash | Silly - then you can never catch a ship if they want to avoid you - even if you are faster. | 12:31 |
mithro | why? | 12:31 |
nash | because the person being chased slightly adjusts course each turn and you have to guess | 12:32 |
nash | An AI routine to do that would be easy | 12:32 |
mithro | ahh | 12:33 |
mithro | log a bug report :) | 12:33 |
nash | mithro: The string issue is more to do with the fact the server throws an exception | 12:36 |
mithro | nash: about the intercept order, log a bug report :) | 12:38 |
nash | I did | 12:38 |
nash | should be there now | 12:38 |
mithro | cool | 12:40 |
nash | Cool - I have so many ships my popup runs out of space.., | 12:44 |
nash | My client now handles turns ending... Now I just need to get it to colonise ;-) | 12:44 |
mithro | cool | 12:44 |
nash | Thats the AI bit... | 12:45 |
nash | BTW: The AI is scuch you can turn it on or off ;-) | 12:45 |
mithro | cool | 12:46 |
mithro | so where are these screenshots :) | 12:46 |
nash | Still coming... Want a screenshot of the AI in motion | 12:47 |
mithro | yes | 12:47 |
nash | Lots of ships in orbit is boring | 12:47 |
CIA-20 | [email protected] * web/dev/documents/ (protocol3.php protocol3.php protocol3.php protocol3.php): Fixed the small error and added a note. | 12:48 |
* nash waits to see a new turn - and there it was... awesome... | 12:49 | |
mithro | cool | 12:50 |
nash | Hmm... there is still a few issues... the client seems to get some of the data multiple times on a new turn... | 12:51 |
nash | Thats one thing I need to report - objects should have parents | 12:52 |
mithro | why? | 12:55 |
nash | Just because it makes things a lot easier for me | 12:56 |
nash | It's a request... | 12:56 |
mithro | you can easily build the parent easy enough/ | 12:56 |
nash | BTW: 18 bugs | 12:56 |
mithro | he he | 12:56 |
nash | I can build the parent, but every time an object updates I need to check it's list of children and see if it changed, and update them as well | 12:57 |
nash | The way I do it at the moment is to just delete all the parent links, update the object, then relink the children | 12:58 |
mithro | nash: ahh okay, send an email | 13:01 |
nash | did a bug | 13:01 |
nash | Won't get lost there | 13:01 |
mithro | okay | 13:02 |
mithro | we are redoing objects anyway - so it's a good time | 13:03 |
nash | cool | 13:03 |
nash | Actually I don't have any issues with objects as they stand... | 13:03 |
nash | but still | 13:03 |
mithro | nash: well we have to define all objects seperately | 13:04 |
nash | Yeah, but you can't really abstract it too far - they do have a meaning aside from a list of properties | 13:04 |
mithro | I think AI's are always going to be Ruleset specific | 13:05 |
nash | Oh yea | 13:06 |
nash | and clients I think need at least a strong hint | 13:06 |
mithro | yeah, good hinting is the hard part | 13:07 |
nash | more robust then AIs - but it works best if they know what it is | 13:07 |
mithro | I would be intrested on your thoughts about "[tp-devel] Object property brain dump" thread | 13:10 |
nash | Remind me when I'm more awake | 13:11 |
nash | Anyway, I'm heading to bed... | 13:12 |
mithro | nash: okay have a good night | 13:12 |
nash | You too | 13:12 |
*** nash has quit IRC | 13:12 | |
*** JLP has quit IRC | 14:29 | |
CIA-20 | [email protected] * libtpproto-py/tp/netlib/ (common.py common.py): (log message trimmed) | 16:35 |
CIA-20 | Adding tlslite support.: | 16:36 |
CIA-20 | tlslite is a pure python implimentation of TLS. It supports a bunch of libraries | 16:36 |
CIA-20 | to make the library much faster (OpenSSL, pyCrypto, pyGMP, etc) | 16:36 |
CIA-20 | For some reason when connecting to my local tpserver-cpp the following patch | 16:36 |
CIA-20 | needs to be applied to tlslite. | 16:36 |
CIA-20 | Lines around 73 need to be change to look like the below. | 16:36 |
*** JLP has joined #tp | 17:10 | |
*** mithro has quit IRC | 19:59 | |
*** mithro has joined #tp | 20:44 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!