*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** mithro has joined #tp | 00:09 | |
*** mithro has quit IRC | 01:48 | |
*** mithro has joined #tp | 01:53 | |
*** tuna-fish has joined #tp | 02:31 | |
*** tuna-fish has quit IRC | 02:35 | |
*** llnz has joined #tp | 03:05 | |
llnz | hi all | 03:10 |
---|---|---|
* llnz answers xdotx's email | 03:10 | |
*** nash has quit IRC | 03:40 | |
*** mithro has quit IRC | 03:42 | |
xdotx | back | 03:42 |
llnz | hi xdotx | 03:43 |
xdotx | hey llnz | 03:43 |
*** mithro has joined #tp | 03:45 | |
*** Demitar has quit IRC | 03:53 | |
xdotx | llnz: ah, so omitting galaxy would be fine too? | 04:06 |
llnz | yes | 04:06 |
xdotx | makes sense | 04:06 |
llnz | the idea was to have multiple galaxies, kind of having multiple games in one server | 04:06 |
llnz | but it's definitely not necessary | 04:07 |
* xdotx nods | 04:07 | |
jotham | anyone do C++ here? | 04:18 |
jotham | http://channel.sourceforge.net/boost_join/libs/join/doc/boost_join_design.html#mozTocId387457 | 04:19 |
tpb | <http://ln-s.net/cYc> (at channel.sourceforge.net) | 04:19 |
llnz | yes | 04:19 |
jotham | check that out | 04:19 |
jotham | interesting | 04:19 |
xdotx | i <3 C++ | 04:20 |
* xdotx <3 boost | 04:22 | |
jotham | C++ sure gives you plenty of ropes to hang yourself with | 04:22 |
xdotx | heheh | 04:23 |
xdotx | that definitely looks interesting and useful | 04:23 |
llnz | interesting | 04:24 |
xdotx | on further inspection though, it's a part of boost... but it certainly would be nice to see something like that in it | 04:26 |
*** mithro has quit IRC | 04:51 | |
*** mithro has joined #tp | 04:55 | |
mithro | hrm.... | 05:25 |
*** tuna-fish has joined #tp | 05:25 | |
mithro | I don't understand that boost_join_design stuff | 05:25 |
mithro | a queue should be inheriantly thread safe | 05:25 |
xdotx | mithro: how could anything other than single instructions be thread safe? | 05:33 |
mithro | xdotx: because you put the data into the queue, then incremete the counter | 05:37 |
mithro | so the data is aways there before anybody can know about it | 05:38 |
xdotx | what if you don't want dupes? | 05:38 |
mithro | dupes? | 05:39 |
xdotx | scenario: add x to the queue, <contact switch>, if queue doesn't contain x, add x to queue | 05:40 |
mithro | you want to add x to the queue as long as x isn't in the queue? | 05:41 |
xdotx | right | 05:41 |
mithro | hrm... why would you want to do that? | 05:41 |
xdotx | or well, so long as it's not the front | 05:41 |
mithro | technically thats not a queue :P | 05:42 |
xdotx | hmm. off the top of my head.. heh, an affliction healing script (like in a game.. with afflictions) | 05:42 |
xdotx | i corrected myself :p | 05:42 |
mithro | hence it doesn't have the nice property | 05:43 |
mithro | I think you are probably solving the wrong problem with that idea? | 05:44 |
xdotx | in a game, say a MUD, you get an affliction, it may result in multiple, different msgs saying you just got the affliction. your script get two of them, but of course you don't want to heal the affliction twice | 05:44 |
xdotx | just replace "the list" with "the front" it still applies | 05:44 |
mithro | but your solution doesn't work, if the two different messages have a delay between then | 05:44 |
xdotx | what if they don't? | 05:45 |
mithro | IE message 1, heal, message 2 | 05:45 |
xdotx | i did that all the time to mess with people... | 05:45 |
xdotx | (some classes could "illusion" msgs) | 05:45 |
mithro | you should see that message1 and message2 refer to the same action and that you have already dealt with it | 05:45 |
xdotx | you can't always heal right away? | 05:46 |
mithro | so you are saying you want to add a heal to the queue if it doesn't already exist? | 05:47 |
xdotx | and you can have the same action, cure, for different afflictions | 05:47 |
xdotx | well, an affliction to the queue | 05:47 |
mithro | hrm.... | 05:48 |
xdotx | that was actually a common problem in people's healing system back when i used to play... i exploited it whenever possible | 05:49 |
mithro | you queue a "if I still have this afflication, cast heal"? | 05:50 |
xdotx | you queue a "i have this affliction" | 05:50 |
xdotx | when you're removing from the queue, you look up the heal | 05:50 |
*** nash has joined #tp | 05:51 | |
mithro | that doesn't make much sense | 05:51 |
mithro | you want to queue actions - not afflictions | 05:51 |
nash | Nor does that statement | 05:51 |
xdotx | checking which afflictions you have is costly in most cases, it would be wasteful to check often | 05:51 |
* nash waves | 05:52 | |
mithro | hey nash | 05:52 |
mithro | xdotx: what happens if somebody else heals your afflication? | 05:52 |
xdotx | you don't necessarily want to queue actions though, because then you don't even know your current afflictions. | 05:52 |
mithro | or the affliction resolves itself before you can cast heal | 05:52 |
xdotx | well clearly you need to set up your system to handle that? | 05:53 |
nash | What are you talking about? | 05:53 |
xdotx | heh. an in-depth case of when a queue would not be thread safe | 05:54 |
mithro | nash: well technically, boost_join_design - but we have kind of diverged | 05:54 |
mithro | xdotx: but we arn't talking about a queue anymore | 05:54 |
* xdotx nods | 05:54 | |
nash | okay | 05:54 |
xdotx | mithro: the concept should still apply | 05:55 |
mithro | a queue has two methods, push and pop | 05:55 |
xdotx | but a double push is still possible, and in some cases inappropriate | 05:56 |
nash | mithro: Can you get fro's code to run? | 05:56 |
mithro | as soon as you have any other method which lets you look inside the queue, it's not really a queue | 05:56 |
mithro | nash: yeah, works fine | 05:56 |
nash | okay: Which pythn/platform are you using? | 05:57 |
xdotx | even if you're just looking at the front though. you may not want the same thing listed twice | 05:57 |
nash | Any operation which can be implemented in terms of operatons on the queue, still means it is a queue | 05:57 |
nash | mithro: ? I get File "/home/nash/work/thousandparsec/tpruledev/src/core/ObjectManagement.py", line 69, in loadObjectNodes | 05:58 |
nash | self.objects[name] = [game_objects.ObjectUtilities.ObjectNode(self, filename.partition('.')[0], module) for filename in os.listdir(object_dir)] | 05:58 |
nash | AttributeError: 'str' object has no attribute 'partition' | 05:58 |
nash | lots of crud before hand of course/ | 05:58 |
mithro | xdotx: do a = queue.pop(), while <a not what I want> | 05:59 |
mithro | nash: python 2.5 | 05:59 |
mithro | nash: can you give me the line numbers? | 05:59 |
nash | I have 2.4.4 do I need to upgrade to 2.5 then? | 05:59 |
mithro | nash: I doubt it | 05:59 |
nash | Line is pasted above: line 69 of ObjectManagement.py | 05:59 |
mithro | opps | 06:02 |
nash | Basically it fails calling 'partition' retuned on a string returned from os.listdir | 06:02 |
mithro | it is actually a python 2.5 method | 06:03 |
nash | right | 06:03 |
nash | So I need python 2.5 then | 06:03 |
mithro | partition( sep) | 06:03 |
mithro | Split the string at the first occurrence of sep, and return a 3-tuple containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return a 3-tuple containing the string itself, followed by two empty strings. New in version 2.5. | 06:03 |
nash | *sigh* | 06:03 |
mithro | nash: don't upgrade yet | 06:03 |
* nash gets the joy of upgrading all the python2.4 modules to the python2.5 equivs... | 06:03 | |
nash | mithro: okay | 06:04 |
* xdotx is goin' to bed | 06:07 | |
mithro | nash: give that email patch a try | 06:09 |
llnz | cya xdotx | 06:09 |
nash | mithro: okay | 06:09 |
* nash is about to eat | 06:09 | |
xdotx | byes | 06:11 |
nash | have a good one | 06:11 |
nash | Cool - much better | 06:12 |
*** xdotx has quit IRC | 06:12 | |
nash | Wow - this has some drawing issues | 06:12 |
nash | Are python wx windows apps always bad as far as redraw is concerned? | 06:12 |
nash | Otherwise... looks cool | 06:13 |
nash | Sweet | 06:13 |
nash | mithro: Were there any galaxie issues you wanted me to look at? | 06:15 |
nash | Anyway - food time | 06:18 |
nash | Back in a while | 06:18 |
mithro | nash: umm - the redraw issues are only bad when you haven't got everything hooked up correctly | 06:51 |
mithro | he appears to be rebuilding the tree every time (rather then just setting the background color) | 06:52 |
*** Demitar has joined #tp | 08:54 | |
*** Demitar has quit IRC | 09:30 | |
*** DystopicFro has joined #tp | 10:16 | |
CIA-3 | frodough tpruledev * r1a177e727d25 / (3 files in 2 dirs): | 10:23 |
CIA-3 | Skeleton of menubar | 10:23 |
CIA-3 | Quick and dirty, just something to do while the mechanics worked on | 10:23 |
CIA-3 | my car and decided that, in fact, they needed a part from the dealer, | 10:23 |
CIA-3 | and that, woah boy would it cost a bit and I can come in tomorrow to | 10:23 |
CIA-3 | get it fixed all up. Meh. | 10:23 |
CIA-3 | mithro tpruledev * ra262881cd01a /src/core/ObjectManagement.py: | 10:23 |
CIA-3 | 2.4 Compatibility Change | 10:23 |
CIA-3 | str.partition is only in Python 2.5 and up...whoops, fixed to work around | 10:23 |
CIA-3 | that now | 10:23 |
* llnz wanders off | 10:23 | |
llnz | later all | 10:23 |
*** llnz has quit IRC | 10:23 | |
*** DystopicFro has quit IRC | 10:30 | |
*** Demitar has joined #tp | 10:42 | |
*** CIA-3 has quit IRC | 15:22 | |
*** Demitar has quit IRC | 15:22 | |
*** Epyon has quit IRC | 15:22 | |
*** JLP has quit IRC | 15:22 | |
*** tuna-fish has quit IRC | 15:22 | |
*** drdevice has quit IRC | 15:22 | |
*** zipola has quit IRC | 15:22 | |
*** jotham has quit IRC | 15:22 | |
*** mithro has quit IRC | 15:22 | |
*** daxxar has quit IRC | 15:22 | |
*** TBBle has quit IRC | 15:22 | |
*** tuna-fish has joined #tp | 15:25 | |
*** mithro has joined #tp | 15:25 | |
*** zipola has joined #tp | 15:25 | |
*** CIA-3 has joined #tp | 15:25 | |
*** drdevice has joined #tp | 15:25 | |
*** TBBle has joined #tp | 15:25 | |
*** jotham has joined #tp | 15:25 | |
*** daxxar has joined #tp | 15:25 | |
*** JLP has joined #tp | 15:26 | |
*** Demitar has joined #tp | 15:35 | |
*** Epyon has joined #tp | 15:36 | |
CIA-3 | frodough tpruledev * rc3c1d6ae7747 / (45 files in 8 dirs): | 16:41 |
CIA-3 | Removing CRLF | 16:41 |
CIA-3 | That's what I get for using Windows. Meh. Cleaned up the erroneous | 16:41 |
CIA-3 | line endings and added have set my editor to use UNIX stile line | 16:41 |
CIA-3 | endings. Didn't know a CRLF messed up the shebang line... | 16:41 |
*** nash has quit IRC | 17:16 | |
CIA-3 | mithro web * rb39bd8e5e97b /dev/documents/ncl.php: Added tips anchor. | 17:34 |
CIA-3 | mithro web * r0fc93fd0a7e2 /news/2007-06-08-1220.news: Merge with git+ssh://[email protected]/git/web.git | 17:34 |
*** mithro has quit IRC | 19:02 | |
*** nash has joined #tp | 19:17 | |
*** xdotx has joined #tp | 21:03 | |
*** nash has quit IRC | 22:56 | |
*** tuna-fish has quit IRC | 22:58 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!