Friday, 2010-07-09

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
*** Epyon has left #tp00:09
*** Landon_ is now known as Landon00:19
*** Landon has joined #tp00:19
*** glew has quit IRC00:35
*** glew has joined #tp00:36
*** tansell-laptop has joined #tp00:49
*** verhoevenv has quit IRC01:19
*** mithro has joined #tp01:41
ezodtansell: i don't recall what the ping was about, so nm ;)01:52
ezodglew: you're not in mtl during the summer right?01:53
ezodi'm there this week01:54
ezodi was also in boston while you were on vaca01:54
glewezod: yeah I'm in boston right now01:57
glewbut have fun in montreal, lots of good bars and restaurants02:01
*** Erroneous has quit IRC02:17
*** Landon has left #tp02:18
*** glew has quit IRC03:02
*** StupidIncarnate has quit IRC03:11
*** StupidIncarnate has joined #tp03:12
StupidIncarnatellnz?03:12
StupidIncarnatenvm, i'll be back later03:14
*** StupidIncarnate has quit IRC03:14
llnzbbl, hopefully04:34
*** llnz has quit IRC04:34
*** bisc has joined #tp04:44
*** bisc has quit IRC04:54
ezodregarding 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 #tp04:55
bisctansell: ping04:56
tansellbisc, pong04:56
bisctansell: 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
tansellbisc, it seems like panelOrder is probably wrong then too04:59
bisctansell: 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
tansellcheck the thousand parsec documentation at05:01
tansellhttp://www.thousandparsec.net/tp/dev/documents/protocolxml.php05:01
tpb<http://ln-s.net/JXj> (at www.thousandparsec.net)05:01
bisctansell: 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
biscmoreover, it doesn't give anything on "sequence", and doesn't explain what's a "slot"05:03
tansellso it used to be object ID back in tp0305:03
alanpsorry 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=D05:04
tansell32 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
tansellbisc, you can just set it to -1 and it'll automatically be set when the network stack sends the value05:04
tansellsee Header Frame05:04
biscah, ok, thanks. And what's a slot? Something like number of message/order/etc?05:09
tansell32 bit semisigned integer, the Slot, Slot number of the order/to be put in.05:17
tansella SInt32, Slot number of the order/to be put in, -1 will insert at the last position, otherwise it is inserted before the number05:18
bisctansell: where's the second quote from?05:18
bisctansell: never mind, found it in 3rd version of protocol05:21
tansellyeah05:23
tansellbisc, feel free to submit updates to the protocol description05:24
bisctansell: 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 is05:25
tansellbisc, which ever makes the most sense :)05:25
tansellI would have to see the code first05:25
bisctansell: 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
biscin 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
biscs/profuces/produces05:29
tansellbisc, try it and see05:29
bisctansell: 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
tansellbisc, looks like you don't need the return stuff in 77001 anymore?05:34
bisctansell: yes, you are right, I completely forgot that I added it. Any other things to fix in this patch?05:36
tansellnope, otherwise looks like a pretty reasonable solution05:36
bisctansell: updated this issue. Please look at it.05:39
bisctansell: 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
tansellbisc, done!05:44
tanselllooking at 84001 now05:44
tansellbisc, it feels to me that OrderTypes should be a property of the orderqueue06:26
tansellbisc, looking at the check at line 18506:27
tansellyou should also look for the number of orders in the queue06:27
bisctansell: and what should I do if, for example, there are no possible order types but there are actual orders?06:28
tansellit should be still shown06:29
tansellIt means you can see the orders, but you can't add any orders06:29
tansellIE Imagine a game in which you had a spy on the fleet06:29
tansellyou could see what the person was planning06:29
tansellbut can't change the orders06:29
biscokay, I see.06:30
bisctansell: 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
tansellOrderTypes could really be read as "Order Types That Can Be Added To Order Queue"06:33
tansellbisc, ahh - year thats okay06:33
bisctansell: updated 8400106:39
bisctansell: 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 IRC06:42
*** cahirwpz has joined #tp07:11
*** null_000 has joined #tp07:31
null_000morning all07:32
tansellcahirwpz, hello07:37
tansellit is a friday night here, so I'm heading out soon07:37
cahirwpztansell, have you read my e-mail ?07:38
tansellwhere did you send it?07:39
tansellcould you resend it to my work address?07:39
tansellI did read your stuff in the logs07:39
cahirwpzTim Ansell <[email protected]>07:40
tansellcahirwpz, see my pmsg for my work account07:40
cahirwpztansell, sent the email again07:42
tansellokay07:45
tanselllets start with 107:49
tansell1. Configuration (Category: core component)07:49
tansellwhat was wrong with the current method of just a plain python file?07:49
tansellcahirwpz, poke?07:51
cahirwpzit was centralized and tied too much to the server07:51
tansellplease explain07:53
cahirwpzyou couldn't change server behaviour without editing sources07:53
cahirwpzyou had to import configuration file everywhere potentially affecting other variables in scope07:53
tansellcahirwpz, you can't change apache's config without editing that either07:54
cahirwpztansell, Apache does have external configuration with special syntax07:54
tansellcahirwpz, and that is accepted07:54
tansellcahirwpz, 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 language07:55
tanselleventually all configuration languages grow to be complete languages in themselves07:55
cahirwpztansell, if you read carefully my e-mail - there's actually no configuration file now and it's not needed07:56
cahirwpzconfiguration file can be easily added if needed07:57
cahirwpzthat's all07:57
tansellcahirwpz, how do you configure the server then?07:57
tansellcahirwpz, IE tell it where the database is07:58
cahirwpztansell, it is decentralized, all configurable components are gathered at start07:58
cahirwpzhttp://github.com/cahirwpz/tpserver-py/blob/master/tpserver-py07:58
tpb<http://ln-s.net/7Die> (at github.com)07:58
cahirwpzyou configure only those component that are needed in the server / test client / tpserver-py-tool07:59
cahirwpzhttp://github.com/cahirwpz/tpserver-py/blob/master/tp/server/server.py08:00
tpb<http://ln-s.net/7Dih> (at github.com)08:00
cahirwpztansell, look at ThousandParsecServerConfiguration class08:01
tansellso there are a couple of problems with this08:02
tansella) not everything is loaded at start up08:02
tansellb) you still haven't told me how it finds out information like where the database is - something all three things specified there need to do08:02
cahirwpza) that's actually what we want, we might be interested only in loading only a few components08:03
cahirwpzhttp://github.com/cahirwpz/tpserver-py/blob/master/tp/server/configuration.py08:03
tpb<http://ln-s.net/7Dio> (at github.com)08:03
*** bisc has joined #tp08:04
cahirwpzb) Configurator is central place that stores configuration08:04
tansellcahirwpz, you are again avoiding the question I'm asking08:05
cahirwpzsorry, must've misunderstood your questions08:06
tansellso say I start up tpserver-py08:06
tanselland I want it to connect to mysql on server 10.1.1.108:07
tansellhow do I do that?08:07
cahirwpzhttp://github.com/cahirwpz/tpserver-py/blob/master/tp/server/db/__init__.py08:07
tpb<http://ln-s.net/7Dit> (at github.com)08:07
cahirwpzlook at DatabaseConfiguration class08:07
cahirwpzit's registered in Configurator08:07
tansellso, I have to edit the source file?08:08
cahirwpzbe patient ;-)08:08
cahirwpzCLIConfigurator that's derived from Configurator looks into DatabaseConfiguration class definition08:08
cahirwpzfinds some attributes like "database"08:08
*** tansell has quit IRC08:09
cahirwpztansell-laptop, poke ?08:09
mithroI have to go now08:09
mithrofinish your explaination and I'll read the logs08:10
cahirwpzok... but what with rest ?08:10
cahirwpzbased 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 taken08:14
*** tansell-laptop has quit IRC08:14
*** mithro has quit IRC08:14
cahirwpzplease download sources and try running "./tpserver-py --help" - the correspondence between DatabaseConfiguration class and CLIConfigurator should appear more obvious after that08:15
cahirwpzUsage: tpserver-py [options]08:17
cahirwpzThousand Parsec Server08:17
cahirwpzOptions:08:17
cahirwpz  -h, --help08:17
cahirwpz      show this help message and exit08:17
cahirwpz  -D DATABASE, --database DATABASE (default value: sqlite:///tp.db)08:17
cahirwpz      Database engine supported by SQLAlchemy.08:17
*** Epyon_ has joined #tp08:18
*** Epyon_ has left #tp08:19
*** cahirwpz has quit IRC09:13
*** bisc has quit IRC09:22
*** bisc has joined #tp10:08
*** StrangerDanger has joined #tp12:22
*** null_000 has quit IRC12:51
*** peres has joined #tp13:15
*** verhoevenv has joined #tp13:16
*** bisc has quit IRC15:46
*** peres has quit IRC16:39
*** jmtan has joined #tp16:52
*** jmtan has quit IRC17:16
*** glew has joined #tp18:02
*** StrangerDanger has quit IRC18:18
*** null_000 has joined #tp20:06
null_000hello everyone20:08
null_000alanp: ping20:17
*** llnz has joined #tp20:41
llnzepyon-kitsune: show me the code! :-)20:43
* llnz is afk20:48
*** Epyon has joined #tp21:16
llnzEpyon: how are you going?21:21
llnzbbl21:50
*** llnz has quit IRC21:50
*** null_000 has quit IRC22:56
*** StrangerDanger has joined #tp23:51

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