Sunday, 2011-10-23

*** tpb has joined #freeorion00:00
*** StrangerDanger has quit IRC00:29
*** fixIt has joined #freeorion01:00
CIA-29FreeOrion: eleazzaar * r4432 /trunk/FreeOrion/default/ (5 files): Cleaning up various content details of the recent detection and weapons changes.02:00
fixIthey geoff you there?02:41
*** lethu has joined #freeorion02:43
dansanWhy is initfreeOrionLogger() and initfreeOrionAIInterface() used in AI/PythonAI.cpp, but not delcared or defined anywhere?02:45
fixIton the programming wiki one of the tasks mentions a config.xml file, where exactly is it located? I cant seem to find it02:49
*** STalKer-X has quit IRC03:05
*** STalKer-Y has joined #freeorion03:06
GeofftheMediodansan: they're defined by boost python using the BOOST_PYTHON_MODULE macro03:28
GeofftheMediofixit: check config.xml in the wiki03:29
dansanGeofftheMedio: ty!03:29
fixItAh ok tyvm that would explain why I couldn't find it.03:33
dansanI'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
dansanhttp://boost.cvs.sourceforge.net/viewvc/boost/boost/boost/python/module_init.hpp?r1=1.7&r2=1.7.4.104:08
tpbTitle: SourceForge.net Repository - [boost] Diff of /boost/boost/python/module_init.hppSourceForge.net Repository - boost Index of / (at boost.cvs.sourceforge.net)04:08
GeofftheMedioI, and I think tzlaine, build with boost 1.47, and the module name is the same as it was before04:09
dansanwait, I might be on drugs, I misread the revision for the version tag04:10
dansanis tzlaine on windows?04:11
GeofftheMediono04:11
GeofftheMediolinux04:11
dansanhmm, ok04:11
dansanwell, the symbol init_module_freeOrionLogger is defined by the macro, so let me dig deeper.  Perhaps an inconsistency in boost's compiler handling, not sure04:13
dansanwhen in doubt, gcc -E04:14
dansan(show preprocssed file)04:14
GeofftheMediohttp://www.dreamincode.net/forums/topic/240780-boostpython-where-is-the-module-init-func/04:25
tpbTitle: Boost.Python - Where Is The Module Init Func? - C And C++ | Dream.In.Code (at www.dreamincode.net)04:25
GeofftheMediowhat version of python are you bulding against?04:25
GeofftheMediobuilding04:25
dansanit's a change in boost.python, let me get the version details.  The new function is actually PyInit_<modname>04:38
dansanoh, lol!, yeah, python, you're right :)04:39
dansanIf you're using version 3 of python, which I am at the moment.  (I can switch back to 2)04:39
dansanbut this is a good place for a macro to fix it04:39
GeofftheMedioLast I checked, boost python didn't support python 3, although I haven't checked in several boost versions04:40
GeofftheMediofreeorion is scripted in 2.704:40
GeofftheMedioalthough the only difference is probably the use of print instead of print() (which is forward compatible)04:40
dansanahhhh04:41
dansanSo basically:04:41
dansan#if PY_VERSION_HEX >= 0x0300000004:41
dansanPyInit_freeOrionLogger();04:41
dansan#else04:41
dansaninitfreeOrionLogger()04:41
GeofftheMedioI'd be surprised if that works without further changes04:41
dansanshould CMakeLists.txt error if python is 3.0 or later?04:41
GeofftheMedioprobably04:42
dansanok04:42
GeofftheMedioor rather, if 2.7 can't be found04:42
dansanyeah, I have 2.7 installed as well.  I should be able to point it to that in cmake (I'm guessing)04:42
GeofftheMedioor perhaps whatever version boost python was built against, if that can be determined04:42
dansanyeah04:42
dansanhmmm04:42
GeofftheMediotoo much effort in cmake scripting is not very productive, though04:43
dansanI'm pretty sure this was built with 3.004:43
dansanyeah04:43
dansanhmm, 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
dansanGentoo uses this "eselect" to have multiple versions of stuff installed side-by-side, while only one is "active" at a time04:47
GeofftheMediono; just the shared library04:47
dansanok, cool, going to recompile and see what I get04:47
GeofftheMedioboost python is a compiled library, so you probably need to recompile that for .2704:48
GeofftheMedio2.704:48
dansanWhen 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
dansanheh, not all too familiar with the game evne yet *blushes*04:49
dansanI'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 drive04:50
dansanI only have 8GB of ram, didn't think I would hit a ceiling so soon! :)04:51
GeofftheMedioI have 404:51
dansanwow04:51
dansanwell, I have a quad core and I like to -j504:51
GeofftheMediotried to buy more, but they mislead me re: what was in stock, so I have to wait04:51
dansannot on this app :)04:51
dansan:(04:51
dansanAre you getting many donations yet?04:51
dansanIf I had more money, I would volunteer, but alas, I'm not living it up like I used to when doing consulting04:52
GeofftheMediowhat is -j ?04:52
dansanoh, sorry "make -jx" the number of jobs04:52
GeofftheMediovery few.  not enough to cover hosting costs.04:52
dansan:*04:52
GeofftheMedioI restrict to building 2 projects at a time... each of which compiles one file at a time04:53
dansangenerally, 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
dansanyeah, that works too04:53
GeofftheMediovisual studio doesn't have a -j option04:54
dansanhmm, I thought it did04:54
dansanit'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 gcc04:54
GeofftheMedioit has a max # parallel project builds04:54
GeofftheMediowhich is what I mentioned above04:54
dansanyeah, that's it :)04:54
dansansame feature04:54
dansanI hope04:54
dansandoes it work on a single project though?04:55
GeofftheMedio6 projects including GG, 3 FO specific: client, server, AI cleint04:55
dansanoh wow!04:55
GeofftheMedionot really; presumably gcc can compile two files from the same time from the same project04:55
dansanyeah04:55
GeofftheMedioat the same tiem04:55
GeofftheMediotiem04:55
GeofftheMediotiem04:55
dansanbut that is actually a feature of GNU make04:55
GeofftheMediot i m e04:55
GeofftheMediough04:55
dansanlol!!04:55
GeofftheMediocan't type tiem recently04:56
dansanand it depends upon the dependencies04:56
dansanI 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 compiler04:56
dansanbut MSVC linking is (or should be) fairly slow since it's doing link-time optimizations04:57
GeofftheMediouh... yeah, but then I wouldn't be using the MSVS environment04:57
GeofftheMedioI spend a lot more time compiling than linking04:57
dansanWhen I still used MSVC 2003, it had an option to generate the makefile :)04:57
GeofftheMedioexcept for one or two files recompiled after a small change04:57
dansandunno if it'll work though04:57
dansanyeah, but MSVC also has change and continue in their debugger04:58
dansanlots of benefits of using the product of a company that has lots of $$04:58
dansanit'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
GeofftheMedioyou can't combine link time code gen, all the optimizations, and change and continue at once05:00
dansanohhhh05:00
dansanthat makes sense05:00
dansanOne 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 binaries05:01
dansanhmm, I'm using gcc 4.6.1 now (was using 4.5.3 earlier) and the build is running much more smoothly!05:14
dansandarn, 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 this05:24
GeofftheMediofun fact05:24
dansanhehe!05:24
dansanDo you plan on (or are you now) using any C++11 features?05:24
dansanI know it's an ugly thing to try to do so soon05:24
GeofftheMedioa bunch of boost stuff is used05:25
GeofftheMediootherwise, no plans05:25
dansanIn Glest, we're using the override and final features, little things like that (via pre-processor)05:25
dansanI'll be happy when I can use "auto" types05:25
GeofftheMediofor loop boilerplate is annoying05:26
dansanthe "ranged for"05:27
dansan?05:27
dansanI've been using boost's for that05:27
GeofftheMediofor (std::map<std::string, std::set<int> >::const iterator it = m_some_map_thing.begin(); it != m_some_map_thing.end(); ++it)05:28
GeofftheMediovs05:28
dansanyeah!05:28
GeofftheMediofor (auto it = m_some_map_thing.begin(); it != m_some_map_thing.end(); ++it)05:28
dansanfor(auto a : some_map)05:28
GeofftheMedioor the for_each thing05:28
dansanyeah05:28
dansanI think you use a colen as the delimiter, I forget now05:28
dansanWell, you were right about one thing: it does matter which version of python Boost was built against :)05:31
dansantried to use python 2.7 when boost was built against 3.2 and got missing symbols in the final link of the ai clients05:31
dansanfrom libboost_python-mt-1_47.so05:32
dansanSo you're pretty certain the AI scripts wont run under 3.2?05:34
GeofftheMediominor modifications probably required05:34
GeofftheMedioeg. print05:34
dansanhmm, nevermind, I'll find out.  They have a test you can compile and run :)05:35
dansanactually, I should have all tests enabled for when I build new packages for my OS05:35
dansanyeah, I sure do, so Boost.Python should be fully functional, or else it would not have merged it05:36
dansanis this thing with the fonts being screwed up on the lower row of pixles a known issue?05:50
dansanit doesn't seem to matter which font I choose05:50
GeofftheMediodon't think so05:50
dansanok, I'll post screenshots then05:50
dansanit's a minor annoyance and, who knows, could be some lib on my system05:50
GeofftheMediouse the img tag06:13
dansanimg tag not working :(06:14
dansanwierd06:14
dansanhttp://www.freeorion.org/forum/viewtopic.php?f=9&t=6165&p=4992906:14
tpb<http://ln-s.net/9F9z> (at www.freeorion.org)06:14
GeofftheMedio[img] works fine06:15
dansanwhen I view it, it just says "Image" :(06:17
dansanis it showing inline when you view the post now?06:17
GeofftheMedioyes, below the urls06:18
dansanhmm, very strange06:18
GeofftheMediojust attach the images to the post06:19
GeofftheMedioalthough you could stand to trim the bigger ones06:19
dansanI ran firebug, and it's showing normal HTML: <img alt="Image" src="http://loudmouth.javamonger.org/freeorion/fonts1.png">06:19
dansanoh, it wouldn't let me attach more than 256k06:19
dansanI didn't compress them much06:19
GeofftheMediojust make them smaller06:19
GeofftheMediodon't need a full screenshot to show a bit of buggy text06:20
dansanoh!! now it's showing!06:21
dansanlol! crap, I thought I cropped them :)06:21
dansanI wanted to include the full screen on the last shot to see where it was and wasn't behaving06:23
dansanoh, it's noscript that wasn't letting me load the images (because it resolved them to the LAN)06:23
dansanDo you do the GUI code as well?  I thought that was some other folks :)06:25
GeofftheMedioI do lots of stuff06:25
dansancool :)06:26
dansanI'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
dansanSelect colon06:39
dansanlol! oops06:39
*** VargaD has joined #freeorion08:00
dansanHey, 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
dansanMaybe also the max population?08:25
dansannot much room in there, but it might be doable08:25
GeofftheMedioempires don't have a species08:26
dansanahh, that kills that, thanks :)08:26
GeofftheMediothat is why you have to select a colony ship first; to tell the UI which species to use for the details on the colonize button08:26
dansanwhat if you have colony ships of differing species?08:27
dansanshould we choose the best one?08:27
GeofftheMedioread my previous message08:27
dansanoh yeah :)08:27
GeofftheMediothere are discussions on the forums about improving the colonization UI08:27
dansanoh, I'll just keep this change to a minimum then and maybe check that out later08:28
dansanone more question, SidePanel::PlanetPanet gets refreshed only at begging of turn and when selection changes?08:29
dansan(that was my guess)08:29
dansanbegging?08:30
dansangeeze, maybe I should just sleep :)08:30
GeofftheMediono; there are object state change signals connected to refresh functions08:34
GeofftheMedioGG::Connect(planet->StateChangedSignal, &SidePanel::PlanetPanel::Refresh, this);08:34
GeofftheMediohence focus changes have immediately visible effects08:34

Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!