*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** Linkadmin has quit IRC | 00:14 | |
*** Linkadmin has joined #tp | 01:02 | |
mithro | cherez: pong? | 01:44 |
---|---|---|
cherez | mithro: What is the Packet.__process__ method supposed to do? | 01:45 |
mithro | the __process__ method basically populates the class | 01:49 |
mithro | have a look at the method | 01:49 |
cherez | I can't find the method. | 01:50 |
mithro | try looking in libtpproto-py | 01:51 |
cherez | Found it. | 01:51 |
mithro | pack/unpack where static methods | 01:51 |
mithro | so you could unpack the data and then give it to the constructor | 01:52 |
cherez | So it's the same as the unpack method, but it raises an exception if there is extra data. | 01:52 |
cherez | I don't see how it would be necessary with the new library. | 01:53 |
mithro | because you start off with a header object | 01:54 |
mithro | and __process__ turns it into a full class | 01:54 |
mithro | it also does more work when the object is descriable | 01:55 |
cherez | Let me take a look at that. | 01:56 |
mithro | do a | 01:56 |
mithro | ack-grep __process__ | 01:56 |
cherez | I'm pretty sure that is the safe functionality as the unpack method. | 01:58 |
cherez | Same functionality, rather. | 02:01 |
mithro | cherez: __init__ method can do more then just set attributes | 02:02 |
*** llnz has quit IRC | 02:06 | |
*** cherez has quit IRC | 02:06 | |
*** shenki has quit IRC | 02:06 | |
*** tuna-fish has quit IRC | 02:06 | |
Greywhind | oh, hey Mithro | 02:21 |
mithro | hey Greywhind | 02:21 |
Greywhind | how's your weekend going? | 02:22 |
mithro | okay | 02:23 |
mithro | Greywhind: how goes the media stuff? | 02:23 |
Greywhind | mithro: pretty well, i'd say | 02:23 |
Greywhind | mithro: i've integrated the MediaLibrary stuff into libtpclient-py | 02:23 |
Greywhind | mithro: and i have made media.py not care about threads | 02:23 |
Greywhind | mithro: one question, though - is there a way to wrap a base class's function that isn't marked @thread_safe and have the new function be @thread_safe without re-writing the whole body? | 02:24 |
mithro | Greywhind: yeah | 02:25 |
mithro | @thread_safe | 02:25 |
mithro | def t(self, *args): | 02:25 |
mithro | return base_class.t(self, *args) | 02:25 |
mithro | or similar | 02:25 |
Greywhind | yeah, but then it gives me an error that the base class's .t isn't thread safe | 02:26 |
Greywhind | and i'm calling it from another thread | 02:26 |
mithro | oh? | 02:26 |
Greywhind | AssertionError: <function get at 0x9d62454> can only be called by <MediaThread(Media, started -1287652496)> not <DownloaderThread(Thread-14, started -1300235408)> | 02:27 |
Greywhind | File "libtpclient-py/tp/client/threads.py", line 526, in get | 02:27 |
Greywhind | return Media.get(self, file, callback) | 02:28 |
Greywhind | File "libtpclient-py/tp/client/threads.py", line 526, in get | 02:28 |
Greywhind | return Media.get(self, file, callback) | 02:28 |
Greywhind | err | 02:28 |
Greywhind | @thread_safe | 02:29 |
Greywhind | def get(self, file, callback=None): | 02:29 |
Greywhind | self.gettingfileslock.acquire() | 02:29 |
Greywhind | try: | 02:29 |
Greywhind | return Media.get(self, file, callback) | 02:29 |
mithro | so that means that Media.get is inheriting from the thread checking module | 02:29 |
Greywhind | should i remove that? | 02:30 |
mithro | yes, if the base class no longer cares about threads | 02:31 |
Greywhind | ok | 02:31 |
*** cherez has joined #tp | 02:32 | |
*** shenki has joined #tp | 02:32 | |
*** llnz has joined #tp | 02:32 | |
*** tuna-fish has joined #tp | 02:32 | |
Greywhind | mithro: so i haven't solved the problem with multiple game clients downloading the same file yet | 02:34 |
Greywhind | mithro: one solution might be to create a file like... <filename>.lock, that shows not to download that file on another client | 02:35 |
Greywhind | mithro: but then i'm not sure what the second client would want to return while it waits, or how it would know to check again when the file was done | 02:36 |
*** mithro has quit IRC | 02:53 | |
*** mithro has joined #tp | 03:13 | |
Greywhind | tansell: http://codereview.mithis.com/9001 | 03:13 |
tpb | Title: Issue 9001: Improved media support by centralizing media calls and adding a download manager. - Code Review (at codereview.mithis.com) | 03:13 |
Greywhind | tansell: http://codereview.mithis.com/10001 | 03:13 |
tpb | Title: Issue 10001: Updated to the TP04 xstruct. - Code Review (at codereview.mithis.com) | 03:13 |
Greywhind | oh, never mind the second one | 03:14 |
Greywhind | wrong link | 03:14 |
Greywhind | http://codereview.mithis.com/10002/show | 03:14 |
tpb | Title: Issue 10002: Added threaded downloading, fixed up code in media.py - Code Review (at codereview.mithis.com) | 03:14 |
Greywhind | that one was what i meant | 03:14 |
*** mithro has quit IRC | 03:17 | |
*** mithro has joined #tp | 03:39 | |
*** tuna-fish has quit IRC | 04:07 | |
*** peres has joined #tp | 04:39 | |
alanp | Greywhind: ping | 04:44 |
alanp | getting an error on connect: http://pastebin.com/m5d770d5f | 04:45 |
tpb | Title: pastebin - collaborative debugging tool (at pastebin.com) | 04:45 |
alanp | any ruleset... | 04:45 |
alanp | let me try a fresh clone & checkout | 04:47 |
*** mithro_ has joined #tp | 04:55 | |
Greywhind | alanp: any luck? | 05:00 |
*** mithro has quit IRC | 05:02 | |
Greywhind | alanp: well, i have to sleep, so i'll talk to you about it tomorrow if it's still a problem | 05:08 |
*** Greywhind has quit IRC | 05:08 | |
*** peres has quit IRC | 05:35 | |
Landon | holy macaroly | 06:41 |
Landon | I need to sleep now | 06:42 |
Landon | I think I'm hallucinating | 06:42 |
Landon | a long complex bit of code worked the first time I ran it, what? | 06:42 |
Landon | well, maybe not complex, but prone to error | 06:42 |
Landon | (aha, there's some bugs, darnit) | 06:45 |
CIA-26 | landon tpclient-pyogre * r3aa0d461e9c9 /src/move.py: | 06:47 |
CIA-26 | Collision responses added, everything works smooth until A) the object stops | 06:47 |
CIA-26 | moving and is pushed out of the way by drifters or B) new destinations can't be | 06:47 |
CIA-26 | added to the object because it's trying to drift to its location after being | 06:47 |
CIA-26 | pushed out of the way by drifters | 06:47 |
*** mithro_ has quit IRC | 07:22 | |
*** mithro_ has joined #tp | 07:22 | |
*** mithro_ has quit IRC | 08:40 | |
CIA-26 | epyon tpserver-cpp-refactor * reb0c6ba4a392 /tpserver/ (common.h ordermanager.cpp ordermanager.h orderparameters.h): OrderManager cleanup | 08:49 |
*** jmtan has joined #tp | 08:58 | |
*** mithro has joined #tp | 09:09 | |
*** mithro_ has joined #tp | 09:22 | |
*** mithro has quit IRC | 09:31 | |
* llnz wanders off | 09:37 | |
llnz | later all | 09:37 |
*** llnz has quit IRC | 09:37 | |
*** shiftless has joined #tp | 10:55 | |
*** shiftless has quit IRC | 11:29 | |
*** bddebian has quit IRC | 11:55 | |
*** jmtan has quit IRC | 11:55 | |
*** Linkadmin has quit IRC | 12:03 | |
*** tansell_ has joined #tp | 12:07 | |
*** tansell has quit IRC | 12:09 | |
*** Greywhind has joined #tp | 12:27 | |
*** sluggo has joined #tp | 12:32 | |
*** sluggo has quit IRC | 12:48 | |
*** Linkadmin has joined #tp | 13:34 | |
ezod | Greywhind: ping? | 14:31 |
ezod | Greywhind: your last libtpclient-py bump on tp04 branch of tpclient-pywx refers to a head that doesn't exist in libtpclient-py repository, did you forget to push? | 14:37 |
alanp | i guess i could pull an older commit? | 14:38 |
ezod | alanp: you could checkout back to 617924d47cd15dffb7b6f91ffd7c73c11feeb181 on tpclient-pywx-tp04 | 14:38 |
ezod | requirements.py will set the submodules to the right heads (which will exist) | 14:39 |
*** JLP has joined #tp | 14:42 | |
Greywhind | ezod: ... it did? | 14:57 |
alanp | 617924d47cd15dffb7b6f91ffd7c73c11feeb181 works for me | 14:57 |
ezod | Greywhind: tp04 branch of tpclient-pywx currently specifies 7e53aa34ee760d28e2d3af903a01ef1cdab70611 as the libtpclient-py submodule head | 14:58 |
ezod | Greywhind: that head doesn't exist on origin ;) | 14:58 |
Greywhind | strange | 14:59 |
Greywhind | what's the latest commit message? | 14:59 |
ezod | Greywhind: http://git.thousandparsec.net/gitweb/gitweb.cgi?p=tpclient-pywx.git;a=commit;h=a394bbadcaa2211cf059acadc94e1f701d4c45af | 14:59 |
tpb | <http://ln-s.net/3h0n> (at git.thousandparsec.net) | 14:59 |
ezod | that's where you updated it | 14:59 |
alanp | shit | 14:59 |
ezod | Updating libtpclient-py to fix errors with looking up empty files. | 15:00 |
Greywhind | ezod: i'll fix it soon. | 15:00 |
alanp | ARGH | 15:00 |
alanp | i'm getting unbound variable errors in pyscheme | 15:00 |
ezod | Greywhind: so it may just be that you're referring to a local commit you didn't push? | 15:00 |
Greywhind | ezod: it could be, let me check | 15:01 |
ezod | are you making changes to libtpclient-py right in the submodule directory? | 15:01 |
Greywhind | oh yeah. there it is. | 15:01 |
CIA-26 | Greywhind libtpclient-py-tp04 * r7e53aa34ee76 /tp/client/media.py: Fixed possible error with trying to look up empty files. | 15:01 |
Greywhind | try that | 15:01 |
ezod | :) | 15:01 |
alanp | 2009-07-06 | 15:01 |
alanp | Lee Begg | 15:01 |
alanp | In tpguile, set the property values to zero before... | 15:01 |
ezod | Greywhind: perfect, thanks | 15:02 |
alanp | i'm going ot have to manually create a design | 15:02 |
ezod | alanp: latest head tp04 will work now | 15:02 |
alanp | cool | 15:02 |
ezod | alanp: which also appears to have some design window updates, so it might be relevant | 15:02 |
alanp | nnice | 15:02 |
Greywhind | sorry about that - didn't realize i hadn't pushed that one | 15:02 |
alanp | nbd | 15:03 |
ezod | np, glad you were around to fix it so quick :) | 15:03 |
Greywhind | :) | 15:03 |
*** mithro_ has quit IRC | 15:26 | |
alanp | hmm | 15:29 |
alanp | Greywhind: how do i tell what the resources are? | 15:29 |
alanp | there is a resource list, but no names | 15:30 |
Greywhind | alanp: well, you can tell by comparing the relative amounts, or by selecting fewer resources to view | 15:33 |
Greywhind | alanp: if i have time at some point, i'll see if i can add a key or something | 15:33 |
Greywhind | did you get that? | 15:35 |
Greywhind | i lost my internet connection for a bit | 15:35 |
alanp | yeah | 15:36 |
alanp | but I can't tell what they are :P | 15:37 |
Greywhind | alanp: i recommend looking at a display of like... 2 resources at once | 15:37 |
Greywhind | it's easier to compare that way | 15:38 |
alanp | i have like 10 resources :( | 15:39 |
Greywhind | you know how to select which resources to view on the overlay, though, right? | 15:39 |
alanp | how? | 15:40 |
Greywhind | alanp: you see the "resource types" button next to the overlay selector? | 15:41 |
Greywhind | alanp: click it, then check a couple of boxes, then deselect it | 15:41 |
alanp | no? | 15:42 |
*** mithro_ has joined #tp | 15:42 | |
Greywhind | alanp: at the top of the starmap, there's a pulldown menu, right? | 15:42 |
Greywhind | alanp: it allows you to select which overlay you're using? | 15:42 |
alanp | do any rulesets use inaccessable resources? | 15:42 |
alanp | aahh | 15:42 |
Greywhind | alanp: to the right of it, do you see the "resource types" button? | 15:43 |
alanp | yeah | 15:43 |
Greywhind | alanp: ok, good. does it work? | 15:43 |
alanp | yeah, i like the list tho :( | 15:43 |
Greywhind | alanp: the list? | 15:44 |
alanp | the list on the left that shows the resources on the current planet | 15:44 |
Greywhind | alanp: oh. you should get a list still when you hover over the various icons | 15:44 |
alanp | yeah... that's my problem... it doesn't have a name | 15:45 |
alanp | Stored: 2 Minable: 0 Inaccessible: 0 | 15:45 |
alanp | no idea which resource that is :( | 15:45 |
alanp | I like the "Factories" category though in that list | 15:45 |
Greywhind | alanp: let me see if i can figure out what you're talking about | 15:46 |
alanp | I can just send you a screencap | 15:46 |
alanp | the "Resource List" on the left pane | 15:46 |
alanp | brb, lunch | 15:47 |
Greywhind | alanp: oh... you're right | 15:47 |
Greywhind | alanp: mtsec doesn't seem to be giving me any names for the resources, perhaps? | 15:47 |
Greywhind | alanp: on minisec, those have names next to them | 15:47 |
Greywhind | alanp: you can still get resource lists with names by hovering over the icons on the starmap though | 15:48 |
Greywhind | oh wait... maybe they don't have names on minisec | 15:49 |
Greywhind | i'll need to fix that | 15:49 |
alanp | hehe | 15:53 |
Greywhind | i cannot believe I never noticed this | 15:54 |
alanp | =D | 15:54 |
CIA-26 | Greywhind tpclient-pywx-tp04 * r5eed583eafdc /windows/ (3 files in 2 dirs): Added a name to each resource in the resource list on panelInfo. | 16:03 |
Greywhind | alanp: try that out :P | 16:03 |
alanp | cooo | 16:03 |
alanp | l | 16:03 |
*** llnz has joined #tp | 16:05 | |
llnz | epyon: did you see my note yesterday> | 16:17 |
llnz | ? | 16:17 |
llnz | morning all | 16:21 |
mhilmi | morning llnz | 16:48 |
llnz | hi mhilmi | 16:48 |
llnz | how is it going? | 16:50 |
alanp | llnz: should i keep track of weapons as objects? | 16:53 |
alanp | ie: weapon class | 16:53 |
*** Greywhind has quit IRC | 16:53 | |
llnz | alanp: ? | 16:53 |
alanp | well right now i have an order to create a resource with the name of the missile/torp | 16:54 |
alanp | and then the order adds to the resource | 16:54 |
alanp | seems kind of hackish though | 16:54 |
llnz | why? sounds fine to me | 16:55 |
alanp | so when i add that to a ship | 16:55 |
alanp | i'm just going to look for the design that matches the resource | 16:55 |
alanp | how do i differentiate from other resources then | 16:55 |
alanp | i guess i could make a list of allowed weapon resources based on weapon designs | 16:55 |
alanp | if that sounds good for you, it works for me :-) | 16:56 |
llnz | well... what other resources are there? maybe you could use the mass and volume of the resource to tell them apart | 16:56 |
alanp | yeah, i guess that would be okay | 16:57 |
alanp | cool, then | 16:57 |
alanp | so should i just add each component of the design to the ship? | 16:58 |
llnz | humm... no? | 17:00 |
llnz | the resources would be transfered from planet to ship | 17:01 |
llnz | and used up in combat | 17:01 |
alanp | resourceS? | 17:01 |
alanp | how do we associate the resource to the missile design that way? | 17:01 |
alanp | right now I make "alanp's missile" and drop a "alanp's missile" resource on the planet | 17:02 |
alanp | alanp's missile is a design of a missile of course | 17:02 |
llnz | resources == different missile types | 17:04 |
alanp | right | 17:05 |
alanp | so i have "alanp's one missile" and "alanp's two missile" | 17:05 |
alanp | i can have 5 of each | 17:05 |
*** Linkadmin has quit IRC | 18:45 | |
*** DTRemenak has quit IRC | 18:57 | |
*** nash has joined #tp | 19:11 | |
*** Linkadmin has joined #tp | 19:21 | |
*** Greywhind has joined #tp | 19:51 | |
*** Greywhind has quit IRC | 19:52 | |
*** Greywhind has joined #tp | 19:56 | |
mhilmi | llnz: it should be safe to call getAvailableGames() after the server connection is made right (ie statuslistener fires)? some reason getting an empty list, is it because the demo server doesn't support it? | 19:56 |
llnz | it is safe to call, but the list won't be populated | 19:57 |
llnz | a one second delay should be enough | 19:58 |
mhilmi | hrm maybe its calling to soon | 19:58 |
llnz | yeah | 20:05 |
*** mithro_ has quit IRC | 20:16 | |
llnz | mhilmi: would it be helpful to signal when a GameInfo is received? | 20:19 |
mhilmi | hrm ya I think so - that would make it easy. trying to find out what's up now but GDB is crapping out on me. | 20:20 |
llnz | do you do something useful with the log from the library? | 20:23 |
mhilmi | well yeah it helps with debugging - typically I don't debug the library itself so I read the messages from the log to see if the library is at xyz point etc | 20:25 |
mhilmi | ie right now I know the game info is being read because of the log msg, just the client side isn't getting it from getAvailableGames(), again probably timing things but can't tell | 20:26 |
tansell_ | morning | 20:47 |
tansell_ | alanp, did you fix your problem? | 20:47 |
tansell_ | alanp, if not just "find -type f -name \*.pyc | xarg rm" should fix it | 20:48 |
*** mithro_ has joined #tp | 21:06 | |
alanp | tansell_: which? the git error? | 21:30 |
alanp | yes | 21:30 |
tansell_ | alanp, no the wrong number of arguments error | 21:31 |
alanp | ah, yes | 21:31 |
alanp | tansell_: so i have a build weapon order that creates a resource on the planet "alanp's missile" | 21:31 |
*** tansell_ is now known as tansell | 21:32 | |
alanp | i guess i am going to use mass/volume to differentiate missile/torp resources | 21:32 |
alanp | for the load/unload armaments | 21:33 |
tansell | alanp, why not the name? | 21:33 |
alanp | well i mean how would i differentiate between missile/torp resources and other resources when i fill a list for the "load armaments" order? | 21:34 |
alanp | maybe I could use units? | 21:35 |
alanp | "weapon" | 21:35 |
alanp | or "missile"/"torpedoe" | 21:35 |
alanp | tansell: ping | 22:26 |
*** jnengland77 has joined #tp | 23:21 | |
tansell | alanp, pong? | 23:32 |
tansell | alanp, use id ranges or something? | 23:32 |
alanp | no, i was thinking about something else | 23:33 |
alanp | i have it now though, no worries | 23:33 |
alanp | i was thinking that if i create a missile design, create a resource from that and load it onto a ship | 23:33 |
alanp | i could still edit the design in the design window | 23:33 |
tansell | alanp, your required to prevent that | 23:34 |
alanp | *nod* | 23:35 |
alanp | tansell: so, you said you had some ideas RE: combat? | 23:36 |
*** jmtan has joined #tp | 23:46 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!