*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** Epyon has left #tp | 00:09 | |
*** Landon_ is now known as Landon | 00:19 | |
*** Landon has joined #tp | 00:19 | |
*** glew has quit IRC | 00:35 | |
*** glew has joined #tp | 00:36 | |
*** tansell-laptop has joined #tp | 00:49 | |
*** verhoevenv has quit IRC | 01:19 | |
*** mithro has joined #tp | 01:41 | |
ezod | tansell: i don't recall what the ping was about, so nm ;) | 01:52 |
---|---|---|
ezod | glew: you're not in mtl during the summer right? | 01:53 |
ezod | i'm there this week | 01:54 |
ezod | i was also in boston while you were on vaca | 01:54 |
glew | ezod: yeah I'm in boston right now | 01:57 |
glew | but have fun in montreal, lots of good bars and restaurants | 02:01 |
*** Erroneous has quit IRC | 02:17 | |
*** Landon has left #tp | 02:18 | |
*** glew has quit IRC | 03:02 | |
*** StupidIncarnate has quit IRC | 03:11 | |
*** StupidIncarnate has joined #tp | 03:12 | |
StupidIncarnate | llnz? | 03:12 |
StupidIncarnate | nvm, i'll be back later | 03:14 |
*** StupidIncarnate has quit IRC | 03:14 | |
llnz | bbl, hopefully | 04:34 |
*** llnz has quit IRC | 04:34 | |
*** bisc has joined #tp | 04:44 | |
*** bisc has quit IRC | 04:54 | |
ezod | regarding sqlite db path, it should be settable somehow, because the client is going to want to save it to a specific location (and probably also push other data into it for its own purposes) | 04:55 |
*** bisc has joined #tp | 04:55 | |
bisc | tansell: ping | 04:56 |
tansell | bisc, pong | 04:56 |
bisc | tansell: two days ago told me that orders should take queue id as the second parameter. I look through panelOrder code - and it seems that it's object's id. Can you clarify? | 04:58 |
tansell | bisc, it seems like panelOrder is probably wrong then too | 04:59 |
bisc | tansell: where can I find right information then? Comments in OrderDesc code aren't very much descriptive -- "sequence, id, slot" -- don't understand it quite well. | 05:01 |
tansell | check the thousand parsec documentation at | 05:01 |
tansell | http://www.thousandparsec.net/tp/dev/documents/protocolxml.php | 05:01 |
tpb | <http://ln-s.net/JXj> (at www.thousandparsec.net) | 05:01 |
bisc | tansell: yeah, I looked at it earlier. The set of parameters for Order is a bit different - and it says "32 bit unsigned integer, the Object ID, Object ID of the order is on/to be placed on" | 05:02 |
bisc | moreover, it doesn't give anything on "sequence", and doesn't explain what's a "slot" | 05:03 |
tansell | so it used to be object ID back in tp03 | 05:03 |
alanp | sorry to paste such a thing in the channel, but this is one of the greatest things i have found on the internet: http://free-books.dontexist.com/ | 05:03 |
alanp | =D | 05:04 |
tansell | 32 bit unsigned integer, the Sequence Number, An incrementing number "sequence number". The sequence number should always be one more then the previous frames sequence number. | 05:04 |
tansell | bisc, you can just set it to -1 and it'll automatically be set when the network stack sends the value | 05:04 |
tansell | see Header Frame | 05:04 |
bisc | ah, ok, thanks. And what's a slot? Something like number of message/order/etc? | 05:09 |
tansell | 32 bit semisigned integer, the Slot, Slot number of the order/to be put in. | 05:17 |
tansell | a SInt32, Slot number of the order/to be put in, -1 will insert at the last position, otherwise it is inserted before the number | 05:18 |
bisc | tansell: where's the second quote from? | 05:18 |
bisc | tansell: never mind, found it in 3rd version of protocol | 05:21 |
tansell | yeah | 05:23 |
tansell | bisc, feel free to submit updates to the protocol description | 05:24 |
bisc | tansell: a question about writing code. I have a highly nested code block with clear deliverable inside Systems class. I want to move this block to separate function so that I can use return statement to reduce nesting. Where should I place this function -- a) in Systems class b) in Systems class, start function name with underscore c) in place, where the code fragment is | 05:25 |
tansell | bisc, which ever makes the most sense :) | 05:25 |
tansell | I would have to see the code first | 05:25 |
bisc | tansell: it's here http://codereview.mithis.com/85001/diff/1/2. This code fragment starts from line 378, the deliverable is stored in orders variable. | 05:27 |
bisc | in my opinion, options a) and b) make this function something like a service of overlay, though it's just local computations. And option c) profuces messy code. | 05:28 |
bisc | s/profuces/produces | 05:29 |
tansell | bisc, try it and see | 05:29 |
bisc | tansell: ok. Then, can you please look at the second submit here http://codereview.mithis.com/77001. I've decided to put self.Selected property (it stores icon or None) in consistency with current selection in starmap. In this way, I can hide red arrow when needed. And it seems to work. | 05:32 |
tansell | bisc, looks like you don't need the return stuff in 77001 anymore? | 05:34 |
bisc | tansell: yes, you are right, I completely forgot that I added it. Any other things to fix in this patch? | 05:36 |
tansell | nope, otherwise looks like a pretty reasonable solution | 05:36 |
bisc | tansell: updated this issue. Please look at it. | 05:39 |
bisc | tansell: now, lets talk about this one http://codereview.mithis.com/84001. I find only queues with non-empty order types and add them. | 05:44 |
tansell | bisc, done! | 05:44 |
tansell | looking at 84001 now | 05:44 |
tansell | bisc, it feels to me that OrderTypes should be a property of the orderqueue | 06:26 |
tansell | bisc, looking at the check at line 185 | 06:27 |
tansell | you should also look for the number of orders in the queue | 06:27 |
bisc | tansell: and what should I do if, for example, there are no possible order types but there are actual orders? | 06:28 |
tansell | it should be still shown | 06:29 |
tansell | It means you can see the orders, but you can't add any orders | 06:29 |
tansell | IE Imagine a game in which you had a spy on the fleet | 06:29 |
tansell | you could see what the person was planning | 06:29 |
tansell | but can't change the orders | 06:29 |
bisc | okay, I see. | 06:30 |
bisc | tansell: why do you want getting ordertypes in another way? This one is reasonable: orderqueuelist is a list of names and ids, and ordertypes is a dict {queueid -> list of order types} | 06:32 |
tansell | OrderTypes could really be read as "Order Types That Can Be Added To Order Queue" | 06:33 |
tansell | bisc, ahh - year thats okay | 06:33 |
bisc | tansell: updated 84001 | 06:39 |
bisc | tansell: I'll be back in an hour. Can you please look at 80001 and 79001 as well (if you have time). | 06:42 |
*** bisc has quit IRC | 06:42 | |
*** cahirwpz has joined #tp | 07:11 | |
*** null_000 has joined #tp | 07:31 | |
null_000 | morning all | 07:32 |
tansell | cahirwpz, hello | 07:37 |
tansell | it is a friday night here, so I'm heading out soon | 07:37 |
cahirwpz | tansell, have you read my e-mail ? | 07:38 |
tansell | where did you send it? | 07:39 |
tansell | could you resend it to my work address? | 07:39 |
tansell | I did read your stuff in the logs | 07:39 |
cahirwpz | Tim Ansell <[email protected]> | 07:40 |
tansell | cahirwpz, see my pmsg for my work account | 07:40 |
cahirwpz | tansell, sent the email again | 07:42 |
tansell | okay | 07:45 |
tansell | lets start with 1 | 07:49 |
tansell | 1. Configuration (Category: core component) | 07:49 |
tansell | what was wrong with the current method of just a plain python file? | 07:49 |
tansell | cahirwpz, poke? | 07:51 |
cahirwpz | it was centralized and tied too much to the server | 07:51 |
tansell | please explain | 07:53 |
cahirwpz | you couldn't change server behaviour without editing sources | 07:53 |
cahirwpz | you had to import configuration file everywhere potentially affecting other variables in scope | 07:53 |
tansell | cahirwpz, you can't change apache's config without editing that either | 07:54 |
cahirwpz | tansell, Apache does have external configuration with special syntax | 07:54 |
tansell | cahirwpz, and that is accepted | 07:54 |
tansell | cahirwpz, yes, but designing a new config file format with it's own syntax is stupid because we already have a very simple to learn and understood language | 07:55 |
tansell | eventually all configuration languages grow to be complete languages in themselves | 07:55 |
cahirwpz | tansell, if you read carefully my e-mail - there's actually no configuration file now and it's not needed | 07:56 |
cahirwpz | configuration file can be easily added if needed | 07:57 |
cahirwpz | that's all | 07:57 |
tansell | cahirwpz, how do you configure the server then? | 07:57 |
tansell | cahirwpz, IE tell it where the database is | 07:58 |
cahirwpz | tansell, it is decentralized, all configurable components are gathered at start | 07:58 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/master/tpserver-py | 07:58 |
tpb | <http://ln-s.net/7Die> (at github.com) | 07:58 |
cahirwpz | you configure only those component that are needed in the server / test client / tpserver-py-tool | 07:59 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/master/tp/server/server.py | 08:00 |
tpb | <http://ln-s.net/7Dih> (at github.com) | 08:00 |
cahirwpz | tansell, look at ThousandParsecServerConfiguration class | 08:01 |
tansell | so there are a couple of problems with this | 08:02 |
tansell | a) not everything is loaded at start up | 08:02 |
tansell | b) you still haven't told me how it finds out information like where the database is - something all three things specified there need to do | 08:02 |
cahirwpz | a) that's actually what we want, we might be interested only in loading only a few components | 08:03 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/master/tp/server/configuration.py | 08:03 |
tpb | <http://ln-s.net/7Dio> (at github.com) | 08:03 |
*** bisc has joined #tp | 08:04 | |
cahirwpz | b) Configurator is central place that stores configuration | 08:04 |
tansell | cahirwpz, you are again avoiding the question I'm asking | 08:05 |
cahirwpz | sorry, must've misunderstood your questions | 08:06 |
tansell | so say I start up tpserver-py | 08:06 |
tansell | and I want it to connect to mysql on server 10.1.1.1 | 08:07 |
tansell | how do I do that? | 08:07 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/master/tp/server/db/__init__.py | 08:07 |
tpb | <http://ln-s.net/7Dit> (at github.com) | 08:07 |
cahirwpz | look at DatabaseConfiguration class | 08:07 |
cahirwpz | it's registered in Configurator | 08:07 |
tansell | so, I have to edit the source file? | 08:08 |
cahirwpz | be patient ;-) | 08:08 |
cahirwpz | CLIConfigurator that's derived from Configurator looks into DatabaseConfiguration class definition | 08:08 |
cahirwpz | finds some attributes like "database" | 08:08 |
*** tansell has quit IRC | 08:09 | |
cahirwpz | tansell-laptop, poke ? | 08:09 |
mithro | I have to go now | 08:09 |
mithro | finish your explaination and I'll read the logs | 08:10 |
cahirwpz | ok... but what with rest ? | 08:10 |
cahirwpz | based on attribute name and StringOption class information it produces an entry in optparse instance, so we can fetch option value from command line, but if it was not given, the default value will be taken | 08:14 |
*** tansell-laptop has quit IRC | 08:14 | |
*** mithro has quit IRC | 08:14 | |
cahirwpz | please download sources and try running "./tpserver-py --help" - the correspondence between DatabaseConfiguration class and CLIConfigurator should appear more obvious after that | 08:15 |
cahirwpz | Usage: tpserver-py [options] | 08:17 |
cahirwpz | Thousand Parsec Server | 08:17 |
cahirwpz | Options: | 08:17 |
cahirwpz | -h, --help | 08:17 |
cahirwpz | show this help message and exit | 08:17 |
cahirwpz | -D DATABASE, --database DATABASE (default value: sqlite:///tp.db) | 08:17 |
cahirwpz | Database engine supported by SQLAlchemy. | 08:17 |
*** Epyon_ has joined #tp | 08:18 | |
*** Epyon_ has left #tp | 08:19 | |
*** cahirwpz has quit IRC | 09:13 | |
*** bisc has quit IRC | 09:22 | |
*** bisc has joined #tp | 10:08 | |
*** StrangerDanger has joined #tp | 12:22 | |
*** null_000 has quit IRC | 12:51 | |
*** peres has joined #tp | 13:15 | |
*** verhoevenv has joined #tp | 13:16 | |
*** bisc has quit IRC | 15:46 | |
*** peres has quit IRC | 16:39 | |
*** jmtan has joined #tp | 16:52 | |
*** jmtan has quit IRC | 17:16 | |
*** glew has joined #tp | 18:02 | |
*** StrangerDanger has quit IRC | 18:18 | |
*** null_000 has joined #tp | 20:06 | |
null_000 | hello everyone | 20:08 |
null_000 | alanp: ping | 20:17 |
*** llnz has joined #tp | 20:41 | |
llnz | epyon-kitsune: show me the code! :-) | 20:43 |
* llnz is afk | 20:48 | |
*** Epyon has joined #tp | 21:16 | |
llnz | Epyon: how are you going? | 21:21 |
llnz | bbl | 21:50 |
*** llnz has quit IRC | 21:50 | |
*** null_000 has quit IRC | 22:56 | |
*** StrangerDanger has joined #tp | 23:51 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!