*** tpb has joined #freeorion | 00:00 | |
*** StrangerDanger has quit IRC | 00:29 | |
*** fixIt has joined #freeorion | 01:00 | |
CIA-29 | FreeOrion: eleazzaar * r4432 /trunk/FreeOrion/default/ (5 files): Cleaning up various content details of the recent detection and weapons changes. | 02:00 |
---|---|---|
fixIt | hey geoff you there? | 02:41 |
*** lethu has joined #freeorion | 02:43 | |
dansan | Why is initfreeOrionLogger() and initfreeOrionAIInterface() used in AI/PythonAI.cpp, but not delcared or defined anywhere? | 02:45 |
fixIt | on the programming wiki one of the tasks mentions a config.xml file, where exactly is it located? I cant seem to find it | 02:49 |
*** STalKer-X has quit IRC | 03:05 | |
*** STalKer-Y has joined #freeorion | 03:06 | |
GeofftheMedio | dansan: they're defined by boost python using the BOOST_PYTHON_MODULE macro | 03:28 |
GeofftheMedio | fixit: check config.xml in the wiki | 03:29 |
dansan | GeofftheMedio: ty! | 03:29 |
fixIt | Ah ok tyvm that would explain why I couldn't find it. | 03:33 |
dansan | I'm using Boost 1.47-r1 (Gentoo) and unless I'm mistaken, it looks like this will now be called init_module_modname instead of initmodname. If this is the case, we can fix it with a #if/else. (I didn't dig too deeply into docs yet :) | 04:07 |
dansan | http://boost.cvs.sourceforge.net/viewvc/boost/boost/boost/python/module_init.hpp?r1=1.7&r2=1.7.4.1 | 04:08 |
tpb | Title: SourceForge.net Repository - [boost] Diff of /boost/boost/python/module_init.hppSourceForge.net Repository - boost Index of / (at boost.cvs.sourceforge.net) | 04:08 |
GeofftheMedio | I, and I think tzlaine, build with boost 1.47, and the module name is the same as it was before | 04:09 |
dansan | wait, I might be on drugs, I misread the revision for the version tag | 04:10 |
dansan | is tzlaine on windows? | 04:11 |
GeofftheMedio | no | 04:11 |
GeofftheMedio | linux | 04:11 |
dansan | hmm, ok | 04:11 |
dansan | well, the symbol init_module_freeOrionLogger is defined by the macro, so let me dig deeper. Perhaps an inconsistency in boost's compiler handling, not sure | 04:13 |
dansan | when in doubt, gcc -E | 04:14 |
dansan | (show preprocssed file) | 04:14 |
GeofftheMedio | http://www.dreamincode.net/forums/topic/240780-boostpython-where-is-the-module-init-func/ | 04:25 |
tpb | Title: Boost.Python - Where Is The Module Init Func? - C And C++ | Dream.In.Code (at www.dreamincode.net) | 04:25 |
GeofftheMedio | what version of python are you bulding against? | 04:25 |
GeofftheMedio | building | 04:25 |
dansan | it's a change in boost.python, let me get the version details. The new function is actually PyInit_<modname> | 04:38 |
dansan | oh, lol!, yeah, python, you're right :) | 04:39 |
dansan | If you're using version 3 of python, which I am at the moment. (I can switch back to 2) | 04:39 |
dansan | but this is a good place for a macro to fix it | 04:39 |
GeofftheMedio | Last I checked, boost python didn't support python 3, although I haven't checked in several boost versions | 04:40 |
GeofftheMedio | freeorion is scripted in 2.7 | 04:40 |
GeofftheMedio | although the only difference is probably the use of print instead of print() (which is forward compatible) | 04:40 |
dansan | ahhhh | 04:41 |
dansan | So basically: | 04:41 |
dansan | #if PY_VERSION_HEX >= 0x03000000 | 04:41 |
dansan | PyInit_freeOrionLogger(); | 04:41 |
dansan | #else | 04:41 |
dansan | initfreeOrionLogger() | 04:41 |
GeofftheMedio | I'd be surprised if that works without further changes | 04:41 |
dansan | should CMakeLists.txt error if python is 3.0 or later? | 04:41 |
GeofftheMedio | probably | 04:42 |
dansan | ok | 04:42 |
GeofftheMedio | or rather, if 2.7 can't be found | 04:42 |
dansan | yeah, I have 2.7 installed as well. I should be able to point it to that in cmake (I'm guessing) | 04:42 |
GeofftheMedio | or perhaps whatever version boost python was built against, if that can be determined | 04:42 |
dansan | yeah | 04:42 |
dansan | hmmm | 04:42 |
GeofftheMedio | too much effort in cmake scripting is not very productive, though | 04:43 |
dansan | I'm pretty sure this was built with 3.0 | 04:43 |
dansan | yeah | 04:43 |
dansan | hmm, just the python library & include directory is what cmake asks for, I hope that's enough, It never tries to call the python executable, right? | 04:47 |
dansan | Gentoo uses this "eselect" to have multiple versions of stuff installed side-by-side, while only one is "active" at a time | 04:47 |
GeofftheMedio | no; just the shared library | 04:47 |
dansan | ok, cool, going to recompile and see what I get | 04:47 |
GeofftheMedio | boost python is a compiled library, so you probably need to recompile that for .27 | 04:48 |
GeofftheMedio | 2.7 | 04:48 |
dansan | When I was playing earlier, I noticed the AI was just sitting there. I presumed it was because the AI wasn't written yet, but maybe it was because it was broken (and I just made empty initfreeOrionLogger() and initfreeOrionAIInterface() to work around the compile problem) | 04:48 |
dansan | heh, not all too familiar with the game evne yet *blushes* | 04:49 |
dansan | I'm really impressed by how much memory gcc is using to compile this program. In learing TMP, I've read that it uses more CPU and memory, but I had them using about 2GB of ram per compile. I've actually moved my build tree out of tempfs and back onto a real hard drive | 04:50 |
dansan | I only have 8GB of ram, didn't think I would hit a ceiling so soon! :) | 04:51 |
GeofftheMedio | I have 4 | 04:51 |
dansan | wow | 04:51 |
dansan | well, I have a quad core and I like to -j5 | 04:51 |
GeofftheMedio | tried to buy more, but they mislead me re: what was in stock, so I have to wait | 04:51 |
dansan | not on this app :) | 04:51 |
dansan | :( | 04:51 |
dansan | Are you getting many donations yet? | 04:51 |
dansan | If I had more money, I would volunteer, but alas, I'm not living it up like I used to when doing consulting | 04:52 |
GeofftheMedio | what is -j ? | 04:52 |
dansan | oh, sorry "make -jx" the number of jobs | 04:52 |
GeofftheMedio | very few. not enough to cover hosting costs. | 04:52 |
dansan | :* | 04:52 |
GeofftheMedio | I restrict to building 2 projects at a time... each of which compiles one file at a time | 04:53 |
dansan | generally, it's reccomended to use the number of processors plus one, so you don't have any threads idle during I/O wait. But with this app, I actually don't have the memory to do that without blowing my cache (then, file access is slowed) | 04:53 |
dansan | yeah, that works too | 04:53 |
GeofftheMedio | visual studio doesn't have a -j option | 04:54 |
dansan | hmm, I thought it did | 04:54 |
dansan | it's not "-j" but I thought it had the same functionality. They have fully working link-time optimizations, I thought they were largely ahead of gcc | 04:54 |
GeofftheMedio | it has a max # parallel project builds | 04:54 |
GeofftheMedio | which is what I mentioned above | 04:54 |
dansan | yeah, that's it :) | 04:54 |
dansan | same feature | 04:54 |
dansan | I hope | 04:54 |
dansan | does it work on a single project though? | 04:55 |
GeofftheMedio | 6 projects including GG, 3 FO specific: client, server, AI cleint | 04:55 |
dansan | oh wow! | 04:55 |
GeofftheMedio | not really; presumably gcc can compile two files from the same time from the same project | 04:55 |
dansan | yeah | 04:55 |
GeofftheMedio | at the same tiem | 04:55 |
GeofftheMedio | tiem | 04:55 |
GeofftheMedio | tiem | 04:55 |
dansan | but that is actually a feature of GNU make | 04:55 |
GeofftheMedio | t i m e | 04:55 |
GeofftheMedio | ugh | 04:55 |
dansan | lol!! | 04:55 |
GeofftheMedio | can't type tiem recently | 04:56 |
dansan | and it depends upon the dependencies | 04:56 |
dansan | I would imagine you can do the same thing on MSVC by hacking it to use a standard makefile, then run the make file from cygwin, but use the cl.exe compiler | 04:56 |
dansan | but MSVC linking is (or should be) fairly slow since it's doing link-time optimizations | 04:57 |
GeofftheMedio | uh... yeah, but then I wouldn't be using the MSVS environment | 04:57 |
GeofftheMedio | I spend a lot more time compiling than linking | 04:57 |
dansan | When I still used MSVC 2003, it had an option to generate the makefile :) | 04:57 |
GeofftheMedio | except for one or two files recompiled after a small change | 04:57 |
dansan | dunno if it'll work though | 04:57 |
dansan | yeah, but MSVC also has change and continue in their debugger | 04:58 |
dansan | lots of benefits of using the product of a company that has lots of $$ | 04:58 |
dansan | it's been a while since I've done any large amount of work on MSVC, but it was quite extensible (being able to run custom commands before or after a build) | 04:59 |
GeofftheMedio | you can't combine link time code gen, all the optimizations, and change and continue at once | 05:00 |
dansan | ohhhh | 05:00 |
dansan | that makes sense | 05:00 |
dansan | One thing I never figured out how to get cl.exe to do was to optimize for a particular architecture and completely omit support for other CPUs. You can do that in gcc, but most people don't use that feature since they tend to distribute their binaries | 05:01 |
dansan | hmm, I'm using gcc 4.6.1 now (was using 4.5.3 earlier) and the build is running much more smoothly! | 05:14 |
dansan | darn, well I wish I would have used gcc 4.6 to start with, it seems to consume about 45-ish% of the memory 4.5 took to compile this | 05:24 |
GeofftheMedio | fun fact | 05:24 |
dansan | hehe! | 05:24 |
dansan | Do you plan on (or are you now) using any C++11 features? | 05:24 |
dansan | I know it's an ugly thing to try to do so soon | 05:24 |
GeofftheMedio | a bunch of boost stuff is used | 05:25 |
GeofftheMedio | otherwise, no plans | 05:25 |
dansan | In Glest, we're using the override and final features, little things like that (via pre-processor) | 05:25 |
dansan | I'll be happy when I can use "auto" types | 05:25 |
GeofftheMedio | for loop boilerplate is annoying | 05:26 |
dansan | the "ranged for" | 05:27 |
dansan | ? | 05:27 |
dansan | I've been using boost's for that | 05:27 |
GeofftheMedio | for (std::map<std::string, std::set<int> >::const iterator it = m_some_map_thing.begin(); it != m_some_map_thing.end(); ++it) | 05:28 |
GeofftheMedio | vs | 05:28 |
dansan | yeah! | 05:28 |
GeofftheMedio | for (auto it = m_some_map_thing.begin(); it != m_some_map_thing.end(); ++it) | 05:28 |
dansan | for(auto a : some_map) | 05:28 |
GeofftheMedio | or the for_each thing | 05:28 |
dansan | yeah | 05:28 |
dansan | I think you use a colen as the delimiter, I forget now | 05:28 |
dansan | Well, you were right about one thing: it does matter which version of python Boost was built against :) | 05:31 |
dansan | tried to use python 2.7 when boost was built against 3.2 and got missing symbols in the final link of the ai clients | 05:31 |
dansan | from libboost_python-mt-1_47.so | 05:32 |
dansan | So you're pretty certain the AI scripts wont run under 3.2? | 05:34 |
GeofftheMedio | minor modifications probably required | 05:34 |
GeofftheMedio | eg. print | 05:34 |
dansan | hmm, nevermind, I'll find out. They have a test you can compile and run :) | 05:35 |
dansan | actually, I should have all tests enabled for when I build new packages for my OS | 05:35 |
dansan | yeah, I sure do, so Boost.Python should be fully functional, or else it would not have merged it | 05:36 |
dansan | is this thing with the fonts being screwed up on the lower row of pixles a known issue? | 05:50 |
dansan | it doesn't seem to matter which font I choose | 05:50 |
GeofftheMedio | don't think so | 05:50 |
dansan | ok, I'll post screenshots then | 05:50 |
dansan | it's a minor annoyance and, who knows, could be some lib on my system | 05:50 |
GeofftheMedio | use the img tag | 06:13 |
dansan | img tag not working :( | 06:14 |
dansan | wierd | 06:14 |
dansan | http://www.freeorion.org/forum/viewtopic.php?f=9&t=6165&p=49929 | 06:14 |
tpb | <http://ln-s.net/9F9z> (at www.freeorion.org) | 06:14 |
GeofftheMedio | [img] works fine | 06:15 |
dansan | when I view it, it just says "Image" :( | 06:17 |
dansan | is it showing inline when you view the post now? | 06:17 |
GeofftheMedio | yes, below the urls | 06:18 |
dansan | hmm, very strange | 06:18 |
GeofftheMedio | just attach the images to the post | 06:19 |
GeofftheMedio | although you could stand to trim the bigger ones | 06:19 |
dansan | I ran firebug, and it's showing normal HTML: <img alt="Image" src="http://loudmouth.javamonger.org/freeorion/fonts1.png"> | 06:19 |
dansan | oh, it wouldn't let me attach more than 256k | 06:19 |
dansan | I didn't compress them much | 06:19 |
GeofftheMedio | just make them smaller | 06:19 |
GeofftheMedio | don't need a full screenshot to show a bit of buggy text | 06:20 |
dansan | oh!! now it's showing! | 06:21 |
dansan | lol! crap, I thought I cropped them :) | 06:21 |
dansan | I wanted to include the full screen on the last shot to see where it was and wasn't behaving | 06:23 |
dansan | oh, it's noscript that wasn't letting me load the images (because it resolved them to the LAN) | 06:23 |
dansan | Do you do the GUI code as well? I thought that was some other folks :) | 06:25 |
GeofftheMedio | I do lots of stuff | 06:25 |
dansan | cool :) | 06:26 |
dansan | I'm not a GUI expert. I like doing things that I'm really, really good at, so I don't do many GUIs :) | 06:27 |
dansan | Select colon | 06:39 |
dansan | lol! oops | 06:39 |
*** VargaD has joined #freeorion | 08:00 | |
dansan | Hey, I'm fixing a minor bug in SidePanel.cpp. Care to display planet environment for the current empire's species even when colony ship is not present? | 08:25 |
dansan | Maybe also the max population? | 08:25 |
dansan | not much room in there, but it might be doable | 08:25 |
GeofftheMedio | empires don't have a species | 08:26 |
dansan | ahh, that kills that, thanks :) | 08:26 |
GeofftheMedio | that is why you have to select a colony ship first; to tell the UI which species to use for the details on the colonize button | 08:26 |
dansan | what if you have colony ships of differing species? | 08:27 |
dansan | should we choose the best one? | 08:27 |
GeofftheMedio | read my previous message | 08:27 |
dansan | oh yeah :) | 08:27 |
GeofftheMedio | there are discussions on the forums about improving the colonization UI | 08:27 |
dansan | oh, I'll just keep this change to a minimum then and maybe check that out later | 08:28 |
dansan | one more question, SidePanel::PlanetPanet gets refreshed only at begging of turn and when selection changes? | 08:29 |
dansan | (that was my guess) | 08:29 |
dansan | begging? | 08:30 |
dansan | geeze, maybe I should just sleep :) | 08:30 |
GeofftheMedio | no; there are object state change signals connected to refresh functions | 08:34 |
GeofftheMedio | GG::Connect(planet->StateChangedSignal, &SidePanel::PlanetPanel::Refresh, this); | 08:34 |
GeofftheMedio | hence focus changes have immediately visible effects | 08:34 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!