*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
mithro | nash, do you know of a efficient bytes buffer with peek support? | 00:07 |
---|---|---|
nash | char *? | 00:08 |
mithro | something like a os.pipe but with peek support | 00:08 |
nash | In java? | 00:08 |
mithro | no C | 00:08 |
mithro | I'm sure I could write a pretty good implimentation - but I would prefer someone elses already optomised version | 00:09 |
nash | What are you reading from? | 00:09 |
nash | Is there a reason not to use stdlib ? | 00:09 |
mithro | nope, using stdlib would be fine? | 00:10 |
nash | Generally | 00:10 |
nash | It has peek, and it's generally fairly fast. libc buffers (using f* calls), it's library calls. | 00:10 |
nash | Remember if libc is slow... _every_ single program on your system is slow | 00:10 |
mithro | I was thinking of trying to use unix domain sockets return from socket_pair | 00:11 |
mithro | but they don't seem to work for what I want | 00:11 |
nash | pipe? | 00:11 |
mithro | pipe doesn't have peek | 00:11 |
nash | How much do you need to peek? | 00:11 |
nash | one byte? | 00:12 |
nash | mithro: ? | 00:12 |
mithro | well, actually I just need to know how much data is in the buffer | 00:12 |
nash | What are you _really_ trying to do? | 00:13 |
nash | the number of times when I've needed to know how much data is available to be read... is very very small | 00:14 |
nash | And I do C every day, on everything from multicores... to 1meg RTOSes | 00:15 |
mithro | I need to know if there is a enough data to build the tp packet | 00:15 |
nash | Look at galaxie ;-) | 00:16 |
nash | Just read it until there is... | 00:16 |
nash | read in until you have a header. | 00:16 |
nash | malloc the rest of the buffer... keep reading to you can filll the buffer | 00:16 |
nash | They can all be done async | 00:16 |
mithro | nash: reading small amounts of data (ie 12 bytes) is horribly inefficent in python | 00:16 |
nash | Then fix python ;-) | 00:17 |
nash | memcpy(12) in C which a fread(12) from a buffer, of read(12) from a socket is fucking fast in C ;-) | 00:17 |
mithro | nash: actually 100*fread(12) is slower then fread(12*100) | 00:18 |
nash | Maybe. | 00:18 |
nash | Lots of little reads are slower... yes | 00:19 |
nash | But... a group little read, fully handled is better then one big read that blocks for ever | 00:19 |
nash | And the cost of looking at the length of a buffer... is about the same as fread(12) anyway... | 00:20 |
mithro | tpsai-py spends about 40% of it's time copying around strings :( | 00:24 |
nash | readv? | 00:26 |
mithro | nash: how do I create a local branch and commit some change to it and then go back to master? | 00:26 |
nash | Do you know git stash? | 00:26 |
nash | (man git-stash?) | 00:26 |
nash | That may solve you problem... else git checkout -b newbranch ; git commit -a ; git checkout master | 00:27 |
nash | If you just want a set of changes kept for a while.. git stash - don't forget to name it (don't just use the default arguments) | 00:27 |
nash | mithro: ? | 00:31 |
mithro | I think I'm going to try a combination of using ctypes to create a mutable string and your recv option | 00:32 |
nash | did you email me something for the AIs? | 00:43 |
mithro | yeah a config file | 00:53 |
nash | send it again... it's been greyed | 00:55 |
mithro | sent | 00:57 |
nash | mithro: [email protected]? | 00:59 |
mithro | yeah | 00:59 |
mithro | any luck? | 01:02 |
nash | nope | 01:02 |
nash | want to send it to [email protected] or something? | 01:02 |
nash | Just arrive | 01:04 |
nash | d | 01:04 |
nash | mithro: Should there be a names.txt? | 01:05 |
mithro | if it doesn't find it, it'll just generate some | 01:06 |
nash | galaxie is getting 'bad username or password' | 01:08 |
mithro | yeah, it needs to issue a user create? | 01:09 |
nash | I could log on with the previous build | 01:10 |
mithro | not quite sure, try a different config? | 01:10 |
* mithro isn't thinking very straight | 01:10 | |
mithro | what does git-switch do? | 01:11 |
nash | Does it exists? | 01:12 |
mithro | no :P | 01:12 |
mithro | maybe I should just hid under my table and sleep | 01:12 |
nash | Sending Seq 12 Type 5 [MsgGetObjectsByID] Len: 12056 | 01:12 |
nash | That's a get ID ;-) | 01:13 |
mithro | :P | 01:13 |
nash | autoadd_players = yes ;-) | 01:13 |
nash | How do I add your AIs? | 01:14 |
mithro | try the testai script | 01:14 |
mithro | I need to make xstruct unpack less braindead it is using massive amounts of string concat | 01:15 |
nash | ImportError: No module named tp.netlib | 01:18 |
nash | mithro: ? | 01:20 |
mithro | you need scratchpad and to run the setup.sh | 01:20 |
nash | So it's running - do you need me to do anything special? | 01:23 |
mithro | you also want to get the starmapper working | 01:23 |
mithro | nash: and you need to setup the turn stuff so that they are all submitting the EOT stuff correct | 01:24 |
mithro | sent you an email with starmapper | 01:24 |
nash | mithro: I need to go in ~5 minutes... | 01:31 |
mithro | can't access your work machine from home? | 01:31 |
*** llnz has joined #tp | 01:32 | |
nash | I can... but that won;t be until tomorrow | 01:32 |
mithro | hey llnz | 01:32 |
llnz | hi mithro | 01:32 |
llnz | hi all | 01:33 |
mithro | oh, tpserver-cpp should probably be running in gdb or have core dumps enabled | 01:33 |
nash | I always have core dumps enabled | 01:33 |
llnz | i run in gdb | 01:33 |
nash | Anyway - send me any remaingin instructions, and I'll fire it off tomorrow. | 01:35 |
mithro | well I'm heading home too | 01:37 |
mithro | see ya | 01:37 |
nash | bye | 01:39 |
*** nash has quit IRC | 01:39 | |
*** greywhind has joined #tp | 01:46 | |
*** greywhind_ has quit IRC | 01:46 | |
*** mithro has quit IRC | 01:55 | |
*** CIA-10 has quit IRC | 03:48 | |
*** CIA-10 has joined #tp | 03:55 | |
*** tuna has quit IRC | 04:10 | |
*** llnz changes topic to "Thousand Parsec - http://www.thousandparsec.net/ || IRC Logs at http://www.thousandparsec.net/~irc/ || Why not help out? || tpserver-cpp vs tpsai-py, 1 from 5 - http://www.thousandparsec.net/~tim/test-battle.avi" | 04:27 | |
*** greywhind_ has joined #tp | 05:46 | |
*** greywhind has quit IRC | 05:46 | |
* llnz wanders off | 07:21 | |
llnz | later all | 07:21 |
*** llnz has quit IRC | 07:21 | |
*** tuna-fish has joined #tp | 07:38 | |
*** tuna-fish is now known as tuna | 07:38 | |
CIA-10 | kane * r39 media/promotion/calender/ (8 files): next grouping of calender proofs | 08:44 |
*** tuna has quit IRC | 08:56 | |
*** greywhind has joined #tp | 09:46 | |
*** greywhind_ has quit IRC | 09:46 | |
*** JLP has quit IRC | 11:15 | |
*** greywhind_ has joined #tp | 11:46 | |
*** greywhind has quit IRC | 11:46 | |
*** greywhind has joined #tp | 13:46 | |
*** greywhind_ has quit IRC | 13:46 | |
*** peres has joined #tp | 14:22 | |
*** JLP has joined #tp | 14:54 | |
*** greywhind_ has joined #tp | 15:46 | |
*** greywhind has quit IRC | 15:46 | |
*** llnz has joined #tp | 16:43 | |
*** greywhind_ has quit IRC | 17:03 | |
*** nash has joined #tp | 17:35 | |
*** peres has quit IRC | 18:05 | |
CIA-10 | llnz tpserver-cpp * r7d7d6f71face /tpserver/ (persistence.cpp persistence.h): | 18:34 |
CIA-10 | Added updateOrderQueue to Persistence. | 18:34 |
CIA-10 | Looks like it was better to split it from saveOrderQueue. | 18:34 |
CIA-10 | llnz tpserver-cpp * rcb870815760b /tpserver/orderqueue.cpp: | 18:43 |
CIA-10 | Use updateOrderQueue instead of saveOrderQueue, and do it in the right place. | 18:43 |
CIA-10 | IE, after updating the modtime. OrderQueue is a little odd because it updates | 18:43 |
CIA-10 | itself into the persistence, but only when an order in the queue is update. | 18:43 |
CIA-10 | llnz tpserver-cpp * rf413c0983c55 /tpserver/ (orderqueue.cpp orderqueue.h): | 18:51 |
CIA-10 | Added methods needed for persistence, getting at internal low-level things. | 18:51 |
CIA-10 | Such as the orderslot list, and setting the owners. | 18:51 |
CIA-10 | llnz tpserver-cpp * r505e2ba40aad /tpserver/ (orderqueue.cpp orderqueue.h): | 19:40 |
CIA-10 | Made getOrderSlots const in OrderQueue. | 19:40 |
CIA-10 | Needed for persistences, which takes a const Orderqueue*. | 19:40 |
CIA-10 | llnz tpserver-cpp * r5b221704e599 /modules/persistence/mysql/ (mysqlpersistence.cpp mysqlpersistence.h): | 19:41 |
CIA-10 | Orders and OrderQueues now handled in MysqlPersistence. | 19:41 |
CIA-10 | Just ObjectParameters and PlayerView to go. | 19:41 |
* llnz wanders off | 19:42 | |
llnz | back tomorrow | 19:42 |
*** llnz has quit IRC | 19:42 | |
*** mithro has joined #tp | 20:56 | |
mithro | hey peoples | 20:56 |
mithro | ~seen nash | 20:58 |
tpb | mithro: nash was last seen in #tp 19 hours, 19 minutes, and 20 seconds ago: <nash> bye | 20:58 |
* nash waves to mithro | 21:27 | |
*** Epyon has quit IRC | 22:23 | |
*** nash has quit IRC | 23:42 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!