--- Log opened Mon Aug 01 00:00:16 2016 20160801 00:14:19< vultraz> blaaaahhh I hit Rebuild instead of Build again 20160801 00:14:22< vultraz> ;_; 20160801 00:15:05-!- irker100 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160801 00:23:30-!- Samual [~Samual@xonotic/core-team/Samual] has quit [Ping timeout: 250 seconds] 20160801 00:25:38-!- horrowind [~Icedove@2a02:810a:83c0:404:21b:fcff:fee3:c3ff] has quit [Quit: horrowind] 20160801 00:25:40-!- Shiki [~Shiki@141.39.226.227] has quit [Quit: Verlassend] 20160801 00:30:16-!- Samual [~Samual@xonotic/core-team/Samual] has joined #wesnoth-dev 20160801 00:33:35-!- SeamusFD [~SeamusFD@208.163.165.22] has joined #wesnoth-dev 20160801 00:33:36-!- SeamusFD [~SeamusFD@208.163.165.22] has quit [Client Quit] 20160801 00:35:56-!- iceiceice [~chris@wesnoth/developer/iceiceice] has quit [Quit: Ex-Chat] 20160801 00:48:04-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160801 00:57:30< Aginor> vultraz: ccache ;) 20160801 01:04:50< vultraz> I run codeblocks :| 20160801 01:06:07< Aginor> you should be able to tell it to use ccache anyway 20160801 01:06:20< Aginor> just use ccache as your compiler instead of tdm 20160801 01:06:26< Aginor> and point ccache at tdm 20160801 01:06:32< Aginor> (assuming it's a gcc-thing) 20160801 01:17:19 * vultraz rubs eyes 20160801 01:19:10-!- travis-ci [~travis-ci@ec2-54-167-78-142.compute-1.amazonaws.com] has joined #wesnoth-dev 20160801 01:19:11< travis-ci> cbeck88/wesnoth#181 (formatter - 33b0ea5 : Chris Beck): The build failed. 20160801 01:19:11< travis-ci> Build details : https://travis-ci.org/cbeck88/wesnoth/builds/148753950 20160801 01:19:11-!- travis-ci [~travis-ci@ec2-54-167-78-142.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160801 01:27:03< celmin> And now I broke traits completely. 20160801 01:27:24< vultraz> it's annoying that unit_type and unit have such different names for their accessors 20160801 01:27:41< celmin> I don't see that it really matters? 20160801 01:28:02< celmin> I mean, sure, it'd be nice to be consistent, but it doesn't really make any difference. 20160801 01:28:06< vultraz> I can't template these stat functions 20160801 01:28:14< celmin> Ah. 20160801 01:28:27< celmin> Well, would you be able to anyway, though> 20160801 01:28:28< celmin> ^? 20160801 01:28:45< celmin> I mean, units probably have info that unit_types don't have. 20160801 01:28:56< celmin> Like overlays? 20160801 01:29:08< vultraz> some stuff is the same 20160801 01:29:19< vultraz> actually, I *can* template the attack stats stuff.. 20160801 01:29:26< celmin> But wouldn't it all need to be the same in order to template it? 20160801 01:29:40< celmin> Do you need to template the attack stats stuff? 20160801 01:29:58< celmin> Maybe you actually just need a non-template subroutine. 20160801 01:30:00< vultraz> i'm speaking of my tunit_preview_pane stuff 20160801 01:30:06< celmin> I guessed as much. 20160801 01:31:03< celmin> My point was that it might be that both unit and unit_type store the attacks as a list of unit_attacks, which would mean no templating required. 20160801 01:31:56< vultraz> hm 20160801 01:32:04< vultraz> yes, in this case the vectors are of the same type 20160801 01:32:13< celmin> So, a non-templated subroutine. :) 20160801 01:32:21< vultraz> elaborate 20160801 01:32:36< celmin> subroutine is generally a function returning void. 20160801 01:32:59< celmin> There are some subtleties, maybe, but it's basically a function. 20160801 01:33:22< celmin> "non-templated" of course means that it's … not templated. That should be obvious. 20160801 01:34:30< vultraz> but if I make it a function where a pointer of either type unit or unit_type is passed 20160801 01:34:38< vultraz> why would I not need a template 20160801 01:34:52< celmin> Uhhh… wouldn't it be a function taking a reference to the list of attacks? 20160801 01:35:01< celmin> Unless one is a vector and the other is, I dunno, a list or something. 20160801 01:35:10< vultraz> ahhhh 20160801 01:35:11< vultraz> yes 20160801 01:35:17< vultraz> I see what you mean 20160801 01:35:19< celmin> Probably a private function. 20160801 01:35:24< vultraz> of course 20160801 01:35:54< celmin> …wait, did you not use the unit preview pane in the attack dialog? 20160801 01:36:08< vultraz> I did 20160801 01:36:20< celmin> I thought just now you were adding support for specific units to it. 20160801 01:36:39< vultraz> I did 20160801 01:36:42< vultraz> I'm expanding that now 20160801 01:36:45< celmin> Oh. 20160801 01:36:48< celmin> Expanding how? 20160801 01:36:48< vultraz> for Recall 20160801 01:36:56< celmin> What does recall need that attack didn't? 20160801 01:37:08< vultraz> attacks 20160801 01:37:10< vultraz> abilities 20160801 01:37:16< vultraz> basically all the stuff the type display has 20160801 01:37:27< celmin> Attack didn't need attacks. That's funny. (But I totally understand why.) 20160801 01:37:28< vultraz> but adapted for a single unit 20160801 01:37:37< celmin> I see. 20160801 01:38:07< celmin> Make sure the attack dialog still works. 20160801 01:38:07< vultraz> so what I'm doing is splitting unit displaying into two widget ids 20160801 01:38:23< vultraz> label_details_succinct will be used for the attack dialog, and display minimal info 20160801 01:38:35< vultraz> label_details will have the full info 20160801 01:39:25< vultraz> wonder if I should call it minimal instead of succinct 20160801 01:39:30 * celmin shrugs 20160801 01:39:36< celmin> I don't think the name matters that much 20160801 01:40:10< celmin> As long as it's not misleading or anything, obviously. 20160801 01:55:15-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20160801 01:55:21-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20160801 01:56:03< vultraz> bloody gui2 bugs 20160801 01:58:59< celmin> Blah GUI2 bugs. 20160801 01:59:39< vultraz> wait 20160801 01:59:51< vultraz> why am I displaying current/max hp, xp, and mp here 20160801 02:00:02< vultraz> hp is always full 20160801 02:00:08< vultraz> xp is relevant 20160801 02:00:12< vultraz> movement is also always full 20160801 02:04:51-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160801 02:20:11< celmin> HP may not be full in edge cases, although... 20160801 02:20:20< celmin> The recall may restore it? Not sure. 20160801 02:20:48-!- ancestral [~ancestral@67-4-224-82.mpls.qwest.net] has joined #wesnoth-dev 20160801 02:26:36< vultraz> celmin: https://drive.google.com/file/d/0B-mR9s8FduLLQW5EcG1IeU5NZ0k/view?usp=sharing 20160801 02:26:48< vultraz> can't figure out how best to place those hp/xp/mp labels 20160801 02:27:14< vultraz> in a way that would look best 20160801 02:44:05< vultraz> wait, I know 20160801 02:55:47-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 258 seconds] 20160801 03:01:54-!- celmin [~celticmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The minstrel departs, to spread the music to the masses!] 20160801 03:06:01-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160801 03:08:04-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 244 seconds] 20160801 03:23:03< celticminstrel> vultraz: Why doesn't the create unit dialog show traits? 20160801 03:23:15< celticminstrel> ...or did I break it? 20160801 03:33:59< celticminstrel> Fearless trait is useless on a neutral unit, right? 20160801 03:35:37< mattsc> celticminstrel: with the new Lua AI syntax, if I want to access the data variable, I have to pass it as an argument? 20160801 03:35:42< wedge009> I think so. As I understand it Fearless negates time-of-day damage penalties but not the bonuses. 20160801 03:35:45< mattsc> In other words, self.data does not work any more? 20160801 03:36:25< celticminstrel> mattsc: self.data works with the default engine, provided you declare the function correctly. 20160801 03:36:51< celticminstrel> Either function tbl:exec(...) or function tbl.exec(self, ...) 20160801 03:36:59< celticminstrel> The self parameter is implicit in the first form. 20160801 03:37:24< mattsc> that’s what I thought. 20160801 03:37:28< celticminstrel> If you use an explicit [engine] tag though, self would have some other value and you'd have to take data as a separate parameter... I think the third one? 20160801 03:37:35< mattsc> So why does the following bark at me? 20160801 03:37:49< mattsc> https://github.com/mattsc/AI-demos/blob/master/AI-demos/lua/fred.lua#L3127 20160801 03:38:23< mattsc> I also replaced fred.data with self.data, doesn’t work either 20160801 03:38:30< celticminstrel> BTW, if anyone would like to check if the create unit dialog missing traits is just me, that'd be helpful. 20160801 03:38:45< celticminstrel> I'm thinking of musthave traits, eg feral or undead. 20160801 03:38:58< mattsc> “ ~add-ons/AI-demos/lua/fred.lua:3215: attempt to index field 'data' (a nil value)” 20160801 03:39:04< celticminstrel> I thought I remembered it showing traits earlier. 20160801 03:39:23< mattsc> (the line number is different because my local version is different from the one on github at the moment) 20160801 03:40:00< celticminstrel> Just waiting for Firefox to load stuff. 20160801 03:40:23< mattsc> ah, right, I forgot; I always have firefox up 20160801 03:41:31< mattsc> [and I can’t check the trait thing, I don’t have a recently compiled version of master around right now) 20160801 03:42:46< celticminstrel> That doesn't look like an external Lua CA to me? 20160801 03:42:58< celticminstrel> It looks like it's using the style of the ExpAI. 20160801 03:43:02< mattsc> Ah, possibly because I still use the old version of the engine definiton … 20160801 03:43:03< mattsc> https://github.com/mattsc/AI-demos/blob/master/AI-demos/ais/ai_fred.cfg#L14 20160801 03:43:37< mattsc> right, I just remembered that; I’ve not yet switched the whole thing to external CAs. 20160801 03:43:54< mattsc> sigh; okay 20160801 03:43:58< celticminstrel> I can't see how that was able to access the data before. 20160801 03:44:31< celticminstrel> I think the ai variable will actually end up being equivalent to self... 20160801 03:44:41< celticminstrel> (Which is obviously not what you want at all.) 20160801 03:44:54< mattsc> right 20160801 03:45:58< celticminstrel> Not quite sure though, the order for external CAs might be slightly different than for others... 20160801 03:46:04< mattsc> The data variable was available because it was automatically added to the engine in the pre-extCA world 20160801 03:46:12< celticminstrel> Maybe it would be the data variable. 20160801 03:46:55< mattsc> order of the parameters? 20160801 03:47:50< mattsc> Anyways, I guess I’ll need to switch the whole thing to external CAs at some point anyway. 20160801 03:48:11< mattsc> Right now I am only working on Fred in 1.12 anyway, so it’s not urgent. 20160801 03:48:14< celticminstrel> So for external CAs, the order of parameters is self, cfg, data. 20160801 03:48:30< celticminstrel> The self parameter is implicit if you use a colon to declare the function, and in theory can be anything. 20160801 03:48:32< mattsc> right; and ‘self’ gets omitted if you use the colon notation 20160801 03:48:48< celticminstrel> The default engine shoves a reference to data into it and nothing else. 20160801 03:49:12< celticminstrel> So you can access data either through the data parameter or through the self.data parameter. 20160801 03:49:34< mattsc> I’ve updated a couple other AIs already, I’d just forgotten that Fred and the Experimental AI don’t even use the old syntax for external CAs yet 20160801 03:50:03< celticminstrel> Other Lua components receive the same three arguments in the same order. 20160801 03:50:24< celticminstrel> Except the engine, which doesn't receive a self argument. 20160801 03:50:33< celticminstrel> So, local x = ... means that x refers to data 20160801 03:50:43< celticminstrel> You could also do local data, args = ... 20160801 03:51:05-!- Bonobo [~Bonobo@2001:44b8:254:3200:f108:f401:3835:839b] has joined #wesnoth-dev 20160801 03:51:10< celticminstrel> The self argument is whatever the engine returns. 20160801 03:51:28< mattsc> Yeah, I think I prefer to update to extCAs though 20160801 03:51:34< mattsc> sometime 20160801 03:52:04< celticminstrel> You probably could fix Fred in a way similar to how the Experimental AI was fixed, but of course you can update to extCAs instead if you prefer. 20160801 03:52:49< celticminstrel> I feel like a bit of this might still be missing on the wiki... did I mention that [engine] can take [args]... 20160801 03:57:39< mattsc> I just looked and didn’t find it. 20160801 03:58:43< mattsc> As for Fred, I agree that fixing it similiar to the Exp AI is probably the easiest, but I do want to switch over to external CAs anyway, so I might as well do that when I move to working on Fred in 1.13. 20160801 03:59:14< mattsc> celticminstrel: the data variable is still persistent, right? As in, I can use it to exchange information between external CAs? 20160801 03:59:19< celticminstrel> Yes. 20160801 03:59:36< mattsc> okay, that’s what I thought, just confirming 20160801 03:59:48< celticminstrel> The args variable (which I think you've usually called cfg) is static, and any attempts to change it are silently ignored. 20160801 04:00:21< mattsc> I remember reading that on the wiki after you updated things recently 20160801 04:01:17< mattsc> Anyways, I’m off to take care of some chores. Thanks for the help/reminders. 20160801 04:29:11-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 244 seconds] 20160801 04:29:19-!- Nobun [~nobun@host178-19-dynamic.20-79-r.retail.telecomitalia.it] has joined #wesnoth-dev 20160801 04:29:25-!- Nobun [~nobun@host178-19-dynamic.20-79-r.retail.telecomitalia.it] has quit [Client Quit] 20160801 04:36:42-!- mjs-de [~mjs-de@x4db5d13b.dyn.telefonica.de] has joined #wesnoth-dev 20160801 04:41:02< celticminstrel> Looks like there's a problem with movement tables in help... the movement cost is right up agains the defense... 20160801 04:41:02< celticminstrel> Also, why are the terrain icons not coloured? 20160801 04:42:37-!- enchi [enchilado@defocus/yummy/enchilado] has quit [Ping timeout: 244 seconds] 20160801 04:58:03-!- enchi [enchilado@defocus/yummy/enchilado] has joined #wesnoth-dev 20160801 05:07:32-!- JyrkiVesterinen [~jyrki@87-100-253-39.bb.dnainternet.fi] has joined #wesnoth-dev 20160801 05:10:10-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20160801 05:28:04-!- mjs-de [~mjs-de@x4db5d13b.dyn.telefonica.de] has quit [Remote host closed the connection] 20160801 05:31:29-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Quit: wedge009] 20160801 05:31:48-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160801 05:41:02-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth-dev 20160801 06:02:15-!- Kwandulin [~Miranda@p200300760F6062F2ACC47388B8011208.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160801 06:02:42-!- enchi [enchilado@defocus/yummy/enchilado] has quit [Ping timeout: 244 seconds] 20160801 06:04:07-!- Duthlet [~Duthlet@dslb-178-005-055-087.178.005.pools.vodafone-ip.de] has joined #wesnoth-dev 20160801 06:07:55-!- enchi [enchilado@defocus/yummy/enchilado] has joined #wesnoth-dev 20160801 06:15:40-!- Appleman1234 [~Appleman1@KD036012036034.au-net.ne.jp] has quit [Ping timeout: 252 seconds] 20160801 06:24:40-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160801 06:25:40< tad_> Quick question: is there an easy way in WML to test if a unit has a specific object. Say, to prevent it obtaining a second one? 20160801 06:39:45-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Quit: Page closed] 20160801 06:58:22-!- Jetrel [~Jetrel@c-73-228-139-39.hsd1.mn.comcast.net] has quit [Quit: "The highest possible stage in moral culture is when we recognize that we ought to control our thoughts." - Charles Darwin] 20160801 06:58:56-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160801 06:59:22-!- Jetrel [~Jetrel@c-73-228-139-39.hsd1.mn.comcast.net] has joined #wesnoth-dev 20160801 07:05:12-!- ancestral [~ancestral@67-4-224-82.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160801 07:12:03-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20160801 07:24:18-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20160801 07:46:04< loonycyborg> shadowm: EOF error messages are fixed in campagnid_asio branch 20160801 07:53:22-!- boucman_work [~boucman@229.29.205.77.rev.sfr.net] has joined #wesnoth-dev 20160801 07:58:37< loonycyborg> shadowm: Interesting, both logs end with Pentarctagon playing ANL 20160801 08:06:42< vultraz> // TRANSLATORS: this string ends with a space 20160801 08:06:53< vultraz> why not just push the space into the stringstream manually :/ 20160801 08:20:04-!- VultCave [~chatzilla@124.109.10.167] has joined #wesnoth-dev 20160801 08:20:24-!- atarocch [~atarocch@194.127.9.108] has joined #wesnoth-dev 20160801 08:21:15< VultCave> ok, I have a working implementation of the GUI2 recall dialog 20160801 08:23:24-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 244 seconds] 20160801 08:23:27-!- VultCave is now known as vultraz 20160801 08:24:03-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20160801 08:24:03-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20160801 08:46:10 * vultraz feels stupid for not realizing you can do stringstream.str().empty() >_> 20160801 09:02:19-!- JyrkiVesterinen [~jyrki@87-100-253-39.bb.dnainternet.fi] has quit [Quit: Konversation terminated!] 20160801 09:20:54< vultraz> https://drive.google.com/file/d/0B-mR9s8FduLLaUtic1NEU05sSmM/view?usp=sharing 20160801 09:21:10< vultraz> Completed design for the new GUI2 Recall dialog 20160801 09:21:28< Kwandulin> sweet! 20160801 09:21:53< vultraz> zookeeper, et all, if you want to give feedback now is the time 20160801 09:22:06< loonycyborg> vultraz: btw where's gui2 addon dial you were mentioning? 20160801 09:22:26< loonycyborg> *dialog 20160801 09:22:47-!- Kwandulin [~Miranda@p200300760F6062F2ACC47388B8011208.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160801 09:22:51< vultraz> loonycyborg: src/gui/dialogs/addon/list.*pp 20160801 09:22:59< vultraz> need to rename that file, but the stuff is there 20160801 09:23:28< vultraz> it's hidden behind the conditional at src/addons/manager_ui.cpp:1015 20160801 09:23:49< vultraz> i also need to majorly clean up the code 20160801 09:23:56< shadowm> loonycyborg: I want it fixed in mainline. 20160801 09:24:38< loonycyborg> shadowm: meaning end of file? 20160801 09:24:55< shadowm> Yes. 20160801 09:26:59< zookeeper> vultraz, looks okay, i only have problems with the same things as in the recruit dialog (redundant traits/attacks heading labels, the icons). well, maybe the unit type name shouldn't be in parentheses. and i'd be inclined to suggest that the recall cost shouldn't be visible unless there actually are units with a non-standard cost. 20160801 09:27:27< loonycyborg> maybe just merge campaignd asio port? I was kinda distracted from it lately, due to release and stuff :P 20160801 09:29:55< loonycyborg> since the fix to end of file messages was in code that I factored out for reuse between wesnothd and campaignd 20160801 09:30:37< shadowm> Did you ever fix the stuff that it broke? 20160801 09:31:14< loonycyborg> I fixed all breakages you pointed out 20160801 09:31:30< shadowm> Okay, I should probably test it again later then. 20160801 09:39:57-!- JyrkiVesterinen [~jyrki@87-100-253-39.bb.dnainternet.fi] has joined #wesnoth-dev 20160801 09:46:10< Aginor> vultraz: I've now responded properly to you ;) 20160801 09:52:36-!- Appleman1234 [~Appleman1@KD036012029236.au-net.ne.jp] has joined #wesnoth-dev 20160801 09:56:01< Aginor> JyrkiVesterinen: I just responded to you on GH. I'm happy to merge as is, I did a mistake last night when I was checking 20160801 09:56:34< Aginor> JyrkiVesterinen: do you want to look at convergence or should I just merge it? 20160801 09:56:42< Aginor> JyrkiVesterinen: or do you want to merge yourself? :D 20160801 09:58:35< JyrkiVesterinen> Hmm, I'm not sure how hard it would be to merge now. 20160801 09:59:07< Aginor> JyrkiVesterinen: there's a conflict in the changelog and in some includes. It's rather straightforward to resolve 20160801 09:59:13< Aginor> or at least was last night ;) 20160801 09:59:41< JyrkiVesterinen> In that case, please just merge it. 20160801 09:59:52< Aginor> ok 20160801 10:02:40-!- Shiki [~Shiki@141.39.226.227] has joined #wesnoth-dev 20160801 10:03:08-!- Kwandulin [~Miranda@p200300760F60621E88D5C86E60E01E5F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160801 10:04:04-!- Shiki [~Shiki@141.39.226.227] has quit [Client Quit] 20160801 10:06:16-!- irker101 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160801 10:06:16< irker101> wesnoth: Jyrki Vesterinen wesnoth:master 1b3eecf8df55 / src/attack_prediction.cpp: Split the combat_matrix class to two https://github.com/wesnoth/wesnoth/commit/1b3eecf8df55e253d1eeb1c274ba5487194fbaa6 20160801 10:06:18< irker101> wesnoth: Jyrki Vesterinen wesnoth:master 93761bcd1e67 / src/ (attack_prediction.cpp attack_prediction.hpp random_new.cpp random_new.hpp): Initial implementation of the Monte Carlo damage prediction mode https://github.com/wesnoth/wesnoth/commit/93761bcd1e67f13b4de09779338cb1c807e914f9 20160801 10:06:20< irker101> wesnoth: Jyrki Vesterinen wesnoth:master cbbc665c4526 / src/attack_prediction.cpp: Minor bug fixes and code quality improvements https://github.com/wesnoth/wesnoth/commit/cbbc665c45261fcc19d8026a9ec3835f26ffe489 20160801 10:06:22< irker101> wesnoth: Jyrki Vesterinen wesnoth:master 2c04802a7dae / src/ (attack_prediction.cpp attack_prediction.hpp): Use Monte Carlo damage calculation in very complex fights https://github.com/wesnoth/wesnoth/commit/2c04802a7daecec106bd4807aa336e4023ca69ac 20160801 10:06:24< irker101> wesnoth: Jyrki Vesterinen wesnoth:master ddf842194446 / src/attack_prediction.cpp: Various improvements https://github.com/wesnoth/wesnoth/commit/ddf842194446917847203c8e3afa0d04f24b50a2 20160801 10:06:26< irker101> wesnoth: Jyrki Vesterinen wesnoth:master c43f70418fe4 / src/attack_prediction.cpp: Fix operator precedence issue https://github.com/wesnoth/wesnoth/commit/c43f70418fe442b6a9eb5790d9eca011aea7aa78 20160801 10:06:28< irker101> wesnoth: Jyrki Vesterinen wesnoth:master d83e0176899c / src/attack_prediction.cpp: Remove a performance optimization https://github.com/wesnoth/wesnoth/commit/d83e0176899cd935befae000cfae9f7deb23b55f 20160801 10:06:30< irker101> wesnoth: Jyrki Vesterinen wesnoth:master 6766e0574794 / / (6 files in 3 dirs): Put the Monte Carlo mode behind an advanced preference and update changelog https://github.com/wesnoth/wesnoth/commit/6766e05747947157f583584112c2fff733671180 20160801 10:06:32< irker101> wesnoth: Jyrki Vesterinen wesnoth:master 9e10291df5b3 / src/attack_prediction.cpp: Attempted fix for build failure with -Werror=reorder https://github.com/wesnoth/wesnoth/commit/9e10291df5b34eb858cd07fdaf22886aa4a4a70f 20160801 10:06:34< irker101> wesnoth: Jyrki Vesterinen wesnoth:master 1bf58b83f425 / src/random_new.hpp: Fixed build with GCC and Clang https://github.com/wesnoth/wesnoth/commit/1bf58b83f425a44123d2bf9b925c1f42063952a7 20160801 10:06:36< irker101> wesnoth: Jyrki Vesterinen wesnoth:master 0e7305017e36 / changelog data/advanced_preferences.cfg players_changelog src/preferences.cpp: Enabled Monte Carlo simulation mode by default https://github.com/wesnoth/wesnoth/commit/0e7305017e3649f460febe867e9610930721d900 20160801 10:06:38< irker101> wesnoth: Andreas Löf wesnoth:master 2360fb626098 / / (9 files in 3 dirs): Merge branch 'monte-carlo-damage-calculation' of https://github.com/jyrkive/wesn https://github.com/wesnoth/wesnoth/commit/2360fb626098b3ee5495af0b0dcf2db6bf92eec6 20160801 10:06:40< irker101> wesnoth: Andreas Löf wesnoth:master 094250c27c69 / / (9 files in 3 dirs): Merge branch 'jyrkive-monte-carlo-damage-calculation' https://github.com/wesnoth/wesnoth/commit/094250c27c6934fe3f43b91ee2f8a8e330a1bc16 20160801 10:07:01< JyrkiVesterinen> Thanks Aginor. :) 20160801 10:07:38< Aginor> thanks JyrkiVesterinen 20160801 10:08:16< Aginor> JyrkiVesterinen: I took upated the changelog in the merge (2360fb626098) to ensure it was in the right version 20160801 10:18:43-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160801 10:18:50< zookeeper> JyrkiVesterinen, WRT music fading on victory/defeat: would it be possible to simultaneously start the victory/defeat track and start a fadeout of the current track? i think we don't have that capability, but i'm not sure. 20160801 10:19:25< zookeeper> that way there wouldn't be an abrupt cut, but still the current track would gracefully (but quickly) fadeout 20160801 10:20:04< zookeeper> that said, crossfading of music tracks is something that would be very nice to have when doing immediate music changes mid-scenario 20160801 10:20:43< JyrkiVesterinen> No, it's not possible with SDL_mixer. SDL_mixer has only one music channel. 20160801 10:21:44< zookeeper> sad 20160801 10:22:09< JyrkiVesterinen> Really, if we want crossfading, we'd have to write a brand new audio backend using something like OpenAL. 20160801 10:25:13< zookeeper> and the reason why you can't just abuse non-music channels for that is that only music channels can be streamed? 20160801 10:26:34< JyrkiVesterinen> I'd rather not use SFX channels for music even if it worked. It's just too hacky. 20160801 10:27:03< zookeeper> mmkay 20160801 10:27:16 * wedge009 notes github.com/wesnoth/wesnoth has 64999 commits 20160801 10:27:24< wedge009> Who will make the 65000th? 20160801 10:27:40< zookeeper> :o 20160801 10:30:39-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth-dev 20160801 10:36:26-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160801 10:36:51< vultraz> we only have 1 music channel? 20160801 10:36:55< vultraz> well that's odd 20160801 10:38:04< JyrkiVesterinen> SDL_mixer is designed as a simple audio mixer library. 20160801 10:38:09< JyrkiVesterinen> " 20160801 10:38:11< JyrkiVesterinen> SDL_mixer is a sample multi-channel audio mixer library. 20160801 10:38:13< JyrkiVesterinen> It supports any number of simultaneously playing channels of 16 bit stereo audio, plus a single channel of music, mixed by the popular FLAC, MikMod MOD, Timidity MIDI, Ogg Vorbis, and SMPEG MP3 libraries. 20160801 10:38:14< JyrkiVesterinen> " 20160801 10:38:24 * vultraz wonders what anura uses 20160801 10:39:00< JyrkiVesterinen> I think SDL_mixer might be too small and simple for Wesnoth's needs. 20160801 10:39:10< vultraz> zookeeper: you don't think I need the 'Traits', 'Abilities' and 'Attacks' headers? 20160801 10:41:10 * vultraz ponders an idea 20160801 10:42:07< zookeeper> vultraz, well i don't recall anyone saying that they were ever confused by lack of headers like that before. 20160801 10:42:34< zookeeper> i mean it's kind of obvious after you've seen a couple of units, which happens... pretty quickly 20160801 10:44:19-!- travis-ci [~travis-ci@ec2-54-167-78-142.compute-1.amazonaws.com] has joined #wesnoth-dev 20160801 10:44:20< travis-ci> wesnoth/wesnoth#10042 (master - 094250c : Andreas Löf): The build has errored. 20160801 10:44:20< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/148834223 20160801 10:44:20-!- travis-ci [~travis-ci@ec2-54-167-78-142.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160801 11:01:01< vultraz> zookeeper: I have a new design for your consideration https://drive.google.com/file/d/0B-mR9s8FduLLVVlzWFd4RmNnMkE/view?usp=sharing 20160801 11:02:51< zookeeper> well that only works if the icons stay. if we decide to switch them back to text, the positioning needs to change again too. 20160801 11:03:01< zookeeper> ...i think 20160801 11:04:26< zookeeper> the previous one seems very slightly nicer aestheticall to me too 20160801 11:04:41< vultraz> that is true 20160801 11:04:45< vultraz> I'm asking LB what he thinks 20160801 11:04:52< zookeeper> not a big difference in that regard, but if i had to choose... 20160801 11:08:05-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160801 11:09:42-!- horrowind [~Icedove@2a02:810a:83c0:404:21b:fcff:fee3:c3ff] has joined #wesnoth-dev 20160801 11:12:01-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160801 11:23:38< vultraz> zookeeper: after consulting with LB, I have this https://drive.google.com/file/d/0B-mR9s8FduLLd0RTTXFCN2tyVjA/view?usp=sharing 20160801 11:25:32< vultraz> gonna see if i can make the name/type clickable 20160801 11:25:41< vultraz> instead of a separate button 20160801 11:25:57< vultraz> zookeeper: but yeah, is this design acceptable? 20160801 11:26:24< zookeeper> with the aforementioned reservations, certainly 20160801 11:27:20-!- Kwandulin [~Miranda@p200300760F60621E88D5C86E60E01E5F.dip0.t-ipconnect.de] has quit [Ping timeout: 250 seconds] 20160801 11:28:40-!- iceiceice [~chris@ext-74.ias.edu] has joined #wesnoth-dev 20160801 11:28:40-!- iceiceice [~chris@ext-74.ias.edu] has quit [Changing host] 20160801 11:28:40-!- iceiceice [~chris@wesnoth/developer/iceiceice] has joined #wesnoth-dev 20160801 11:28:53-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth-dev 20160801 11:43:21-!- Kwandulin [~Miranda@p200300760F60621E0805A4D3E1AF15BB.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160801 11:43:53< Aginor> vultraz: my scrollbar problem from yesterday: http://www.alternating.net/agi/scrollbar.png 20160801 12:46:04< irker101> wesnoth: gfgtdf wesnoth:master 864d84c2b50b / data/campaigns/Legend_of_Wesmere/scenarios/chapter4/13_News_from_the_Front.cfg: fix recall list lost in LoW scenario13 https://github.com/wesnoth/wesnoth/commit/864d84c2b50bbef6f00f3c7d33c1aa6678b3d90f 20160801 12:54:46-!- Kwandulin [~Miranda@p200300760F60621E0805A4D3E1AF15BB.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160801 13:01:15-!- EliDupree [~quassel@idupree.com] has quit [Remote host closed the connection] 20160801 13:01:28-!- EliDupree [~quassel@idupree.com] has joined #wesnoth-dev 20160801 13:19:02-!- travis-ci [~travis-ci@ec2-54-159-66-100.compute-1.amazonaws.com] has joined #wesnoth-dev 20160801 13:19:03< travis-ci> wesnoth/wesnoth#10043 (master - 864d84c : gfgtdf): The build passed. 20160801 13:19:03< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/148866361 20160801 13:19:03-!- travis-ci [~travis-ci@ec2-54-159-66-100.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160801 13:21:51-!- gfgtdf [~chatzilla@x4e36342f.dyn.telefonica.de] has joined #wesnoth-dev 20160801 13:25:39-!- Bonobo [~Bonobo@2001:44b8:254:3200:f108:f401:3835:839b] has quit [Ping timeout: 250 seconds] 20160801 13:28:38-!- Kwandulin [~Miranda@p200300760F60621E4D957E08B588AC5D.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160801 13:30:51-!- Samual [~Samual@xonotic/core-team/Samual] has quit [Ping timeout: 250 seconds] 20160801 13:32:13-!- gfgtdf [~chatzilla@x4e36342f.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 47.0/20160604131506]] 20160801 13:33:33-!- Samual [~Samual@xonotic/core-team/Samual] has joined #wesnoth-dev 20160801 13:57:45< vultraz> Aginor: oh, yeah, that's known and very annoying 20160801 14:02:21< vultraz> Aginor: https://gna.org/bugs/?24780 20160801 14:02:56< vultraz> if anyone wants to take a shot at fixing that ^ it would be really appreciated, BTW. 20160801 14:04:27-!- Lohengramm [sid1929@gateway/web/irccloud.com/x-crsdemwdmkrthoos] has quit [Write error: Connection reset by peer] 20160801 14:06:56-!- Kwandulin [~Miranda@p200300760F60621E4D957E08B588AC5D.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160801 14:17:44-!- Lohengramm [sid1929@gateway/web/irccloud.com/x-gktygytvpdchahen] has joined #wesnoth-dev 20160801 14:18:54< JyrkiVesterinen> iceiceice: Any references about how buggy variadic templates are in MSVC2013? 20160801 14:19:06< JyrkiVesterinen> I have used them myself with that compiler. 20160801 14:19:25< iceiceice> no, i stopped trying to use them in that compiler a long time ago 20160801 14:20:06< JyrkiVesterinen> Hmm. My experience is that variadic templates are usable in MSVC2013 at least in basic use. 20160801 14:20:24< iceiceice> actually i find that even msvc 2015 has a hard time with a lot of template stuff that gcc and clang do 20160801 14:20:42< vultraz> every time I talk to iceiceice I get the feeling that msvc is worse :P 20160801 14:20:45< iceiceice> for instance i find that i cannot take a pointer to a member in a template class and assign it to a static constexpr variable 20160801 14:21:16< JyrkiVesterinen> It might have more to do with poor constexpr support. 20160801 14:21:42< iceiceice> i had to invent some kooky workaround in my lib here: 20160801 14:21:43< iceiceice> https://github.com/cbeck88/visit_struct/blob/master/include/visit_struct/visit_struct_intrusive.hpp 20160801 14:22:00< iceiceice> if you know a more succinct way i would love to know 20160801 14:24:12< JyrkiVesterinen> I don't really know, unfortunately. I haven't done anything complex with variadic templates. 20160801 14:24:34< iceiceice> oh 20160801 14:24:35< iceiceice> hehe 20160801 14:24:41< iceiceice> is hitler a valid refernece? :p 20160801 14:24:42< iceiceice> https://www.youtube.com/watch?v=ND-TuW0KIgg 20160801 14:24:51< iceiceice> i just remembered that :p 20160801 14:27:23< vultraz> i've seen this so many times 20160801 14:27:29< vultraz> with different text 20160801 14:29:54< JyrkiVesterinen> Nice. "This is even worse than having a variant with an empty state that can only arise if a copy-constructor throws" :D 20160801 14:33:07< zookeeper> i'm a c++ newbie but why does it feel like the last thing the language needs is more and more complicated features and new syntactic sugar? 20160801 14:34:18< JyrkiVesterinen> I think that what C++ most needs is a larger standard library. 20160801 14:34:30< JyrkiVesterinen> How about basic 2D graphics for a start? 20160801 14:34:40-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160801 14:34:53< JyrkiVesterinen> We have "standard I/O", which is only useful for command-line programs which almost no one uses today. 20160801 14:38:41< iceiceice> zookeeper, they need more features to make the other features more easily usable :) 20160801 14:39:03< iceiceice> supposedly they have been working on "concepts" for like 20 years now, which is supposed to make templates give less horrible error messages 20160801 14:39:35< vultraz> how do you work on something for 20 years 20160801 14:39:44< iceiceice> someone worked on it for ten years 20160801 14:39:50< iceiceice> and hten their proposal was rejected by comittee 20160801 14:39:52< vultraz> and come up with nothing 20160801 14:39:56< iceiceice> and then they started over 20160801 14:40:29< iceiceice> supposedly the toher thing is, if there's no deadline pressure then nothing gets done 20160801 14:40:45< iceiceice> but c++ went like 8 years wihtout a new standard so in that time i guess nothing happened on concepts 20160801 14:40:49< vultraz> why the hell would you reject a proposal 10 years in the making 20160801 14:40:57< vultraz> WHY WOULD IT EVEN TAKE 10 YEARS TO CRAFT 20160801 14:41:05< iceiceice> because everyone agreed it would be a disaster if they accepted it :p 20160801 14:41:27< iceiceice> idk its pretty nonsensical 20160801 14:41:38< vultraz> why don't they just turn over everything to the people who develop Boost :P 20160801 14:41:42< iceiceice> zookeeper, there should be a way to do the thing this code does without using some crappy macros 20160801 14:41:44< iceiceice> https://github.com/cbeck88/visit_struct 20160801 14:42:14< iceiceice> i mean these are like fundamental shortcomings of the language 20160801 14:42:35< iceiceice> vultraz, i guess that there is a lot of overlap between boost and standard committee 20160801 14:43:08< zookeeper> iceiceice, i have no idea what i'm looking at :p 20160801 14:43:45< iceiceice> ok 20160801 14:43:49< iceiceice> take a look at this wesnoth file: 20160801 14:43:50< iceiceice> https://github.com/wesnoth/wesnoth/blob/master/src/team.cpp 20160801 14:44:17< iceiceice> see like 20160801 14:44:17< iceiceice> https://github.com/wesnoth/wesnoth/blob/master/src/team.hpp 20160801 14:44:27< iceiceice> basically team is just a big "POD" data structure 20160801 14:44:36< iceiceice> theres all these fields 20160801 14:44:40< iceiceice> and getters and setters 20160801 14:44:48< iceiceice> and we need to list them all over and over again 20160801 14:44:51< iceiceice> for the constructor, 20160801 14:44:57< iceiceice> for void write(config &) 20160801 14:45:07< iceiceice> for void read(const config &) 20160801 14:45:26< iceiceice> and mostly all this code is just boiler plate 20160801 14:45:49< iceiceice> if you look at the implementation of the "write" function 20160801 14:45:51< iceiceice> https://github.com/wesnoth/wesnoth/blob/master/src/team.cpp#L239 20160801 14:45:54< iceiceice> almost every line is the same 20160801 14:46:01< zookeeper> yep 20160801 14:46:05< iceiceice> and worse, 20160801 14:46:12< iceiceice> its actually prety hard to check it for correctness 20160801 14:46:17< iceiceice> like, if you delete one of those lines, 20160801 14:46:20< iceiceice> its a major bug in save files 20160801 14:46:31< iceiceice> but who really can look at all these lines of code and be sure that no line was skipped 20160801 14:46:43< iceiceice> i remember there were legitimate bugs where some line was missing 20160801 14:46:53< iceiceice> i think gfgtdf fixed a bug like that maybe, dont remember exactly anymore 20160801 14:47:13< iceiceice> the `visit_struct` lib i made, is a way to say "do the same thing for each member of this struct" 20160801 14:47:14< vultraz> are you saying one should be able to iterate over the struct members 20160801 14:47:18< iceiceice> that the compiler will understand 20160801 14:47:31-!- Kwandulin [~Miranda@p200300760F60621E71E044DA18951B30.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160801 14:47:35< vultraz> and do like cfg[name] = name 20160801 14:47:41< iceiceice> a long time ago i made a PR branch called "config_converters" that was supposed to help with that also 20160801 14:47:53< iceiceice> and also handle the caes when a field needs special treatment 20160801 14:48:04< iceiceice> but i think the "visit_struct" approach is better 20160801 14:48:24< zookeeper> iceiceice, right, okay. 20160801 14:48:37< iceiceice> vultraz, yeah you should be able to iterate over the struct members 20160801 14:48:40< iceiceice> thats the idea of visit_struct 20160801 14:48:57< vultraz> iceiceice: your syntax still looks kinda messy 20160801 14:49:03< vultraz> from a purely objective pov 20160801 14:49:38< vultraz> the illegal native range-for loop looks much nicer 20160801 14:50:01< iceiceice> you could also use a lambda for the visitor 20160801 14:50:11-!- esr [~esr@wesnoth/developer/esr] has joined #wesnoth-dev 20160801 14:50:16< iceiceice> but thats easier in c++14 when you have generic lambdas 20160801 14:50:17< vultraz> so how come they don't implement something like this 20160801 14:50:24< iceiceice> i have no idea 20160801 14:50:40< iceiceice> reflection is another thing they spent 20 years making proposals about 20160801 14:50:53< iceiceice> i think they let perfect be the enemy of good 20160801 14:51:02 * vultraz rolls eyes 20160801 14:51:16< vultraz> who are these people who apparently do nothing, anyway 20160801 14:52:48< vultraz> bunch of nerdy white guys, it seems. 20160801 14:52:57< vultraz> :P 20160801 14:55:39< zookeeper> you're really inviting me to say that at least they're not whipping out random new stuff on a whim all the time 20160801 14:56:18< vultraz> yes 20160801 14:56:25< vultraz> but there's a happy medium 20160801 14:56:39< zookeeper> i will gladly agree with that 20160801 14:57:01< zookeeper> deliberating for 20 years is a bit extreme even for me... :p 20160801 15:04:54< vultraz> blagh 20160801 15:04:57< vultraz> this code is stumping me 20160801 15:11:36-!- JyrkiVesterinen [~jyrki@87-100-253-39.bb.dnainternet.fi] has quit [Quit: Konversation terminated!] 20160801 15:14:45-!- ideuler [~textual@0.213.62.94.rev.vodafone.pt] has joined #wesnoth-dev 20160801 15:35:08-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth-dev 20160801 15:46:20-!- irker101 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160801 15:52:42-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20160801 15:53:17-!- boucman_work [~boucman@229.29.205.77.rev.sfr.net] has quit [Ping timeout: 260 seconds] 20160801 15:56:13-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160801 15:57:57-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160801 15:59:42-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.] 20160801 16:00:16-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20160801 16:01:24< vultraz> almost done with this dialog 20160801 16:01:38< vultraz> just need to add column sorting 20160801 16:02:08< vultraz> the interface for which is horrible 20160801 16:02:21< vultraz> I guess I'll use lambdas this time 20160801 16:04:10< iceiceice> damnit source forge 20160801 16:04:12-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 16:04:22< iceiceice> why is source forge down like every other week now 20160801 16:04:44< vultraz> because it's sourceforge 20160801 16:07:30< iceiceice> why cant i download boost from a github url 20160801 16:07:36< iceiceice> github is so much more stable than sourceforge 20160801 16:07:54< celticminstrel> You can. git clone 20160801 16:08:04< celticminstrel> Assuming they properly use tags. 20160801 16:08:16< iceiceice> hmmm 20160801 16:08:39< iceiceice> will that actually give me a source distribution though? 20160801 16:08:43< iceiceice> i mean what are you saying i should download 20160801 16:08:54< iceiceice> this looks like somethign wierd 20160801 16:08:54< iceiceice> https://github.com/boostorg/boost 20160801 16:09:06< celticminstrel> No idea. 20160801 16:09:20< iceiceice> maybe thats what i want 20160801 16:11:52< celticminstrel> Oh. 20160801 16:12:02< celticminstrel> Submodules. 20160801 16:12:17< celticminstrel> So git clone --recurse-submodules 20160801 16:12:27< iceiceice> i'm just trying to download the tagged releases 20160801 16:13:00< celticminstrel> Wonder why github doesn't link the submodules. 20160801 16:18:52< bumbadadabum> sorry for fucking up the traits more 20160801 16:19:40-!- irker738 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160801 16:19:40< irker738> wesnoth: Bär Halberkamp wesnoth:master a2639431bfe4 / src/units/types.cpp: fix unit builds https://github.com/wesnoth/wesnoth/commit/a2639431bfe41d3159eb1678c0c78ef9727d26c1 20160801 16:19:47< bumbadadabum> this fixes it 20160801 16:19:49< bumbadadabum> tested and stuff 20160801 16:20:31< celticminstrel> I probably should've waited so that I didn't conflict with your work... oh well. 20160801 16:21:41-!- JyrkiVesterinen [~jyrki@87-100-200-201.bb.dnainternet.fi] has joined #wesnoth-dev 20160801 16:21:52 * vultraz still hasn't figured out how to simplify 20160801 16:21:54< vultraz> find_widget(&window, "unit_details", false) 20160801 16:21:55< vultraz> .set_displayed_unit(&*((*recall_list_)[selected_row])); 20160801 16:22:08< celticminstrel> You could try multilining it. 20160801 16:22:21< celticminstrel> I don't really know what the types of any of the intermediates are. 20160801 16:22:48< vultraz> recall_list_ is a std::shared_ptr > 20160801 16:23:00< vultraz> and the function takes a unit* 20160801 16:23:50< celticminstrel> So recall_list_->at(selected_row).get()? 20160801 16:23:52-!- ideuler [~textual@0.213.62.94.rev.vodafone.pt] has quit [Quit: Chakalaka.] 20160801 16:24:56< celticminstrel> Alternatively, change the function to take a unit_const_ptr and dispense with the get(). 20160801 16:25:01< celticminstrel> That might actually be better. 20160801 16:25:57< vultraz> I have to use that function in other places where I might not be handling a unit_const_ptr 20160801 16:26:07< vultraz> but either way, your line works 20160801 16:26:11< celticminstrel> Why aren't you handling a unit_const_ptr? 20160801 16:26:19< vultraz> I've been avoiding at() for some reason 20160801 16:26:24< vultraz> is that vector::at()? 20160801 16:26:27< celticminstrel> There should be no reason to have a bare unit* really. 20160801 16:26:40< celticminstrel> Yes, at() is equivalent to [] but throws an exception if it's out of bounds. 20160801 16:27:10< celticminstrel> [] doesn't check if it's out of bounds. 20160801 16:27:19< celticminstrel> So at() is theoretically less efficient. 20160801 16:27:42< vultraz> the unit_preview_pane widget's setters take bare unit and unit_type ptrs 20160801 16:27:49< celticminstrel> But when you have a pointer instead of a reference to the vector, it looks nicer to do v->at() than (*v)[] or v->operator[] 20160801 16:28:05< celticminstrel> vultraz: Here's another idea - make it take references instead. 20160801 16:28:14< vultraz> hm 20160801 16:28:30< vultraz> there's some reason I made it take a pointer and now i cant remember why 20160801 16:28:34< celticminstrel> Const references of course. 20160801 16:29:13< vultraz> what's the lambda syntax again, btw? 20160801 16:29:30< celticminstrel> [captures](params) -> return type {body} 20160801 16:29:38< celticminstrel> Arrow clause is optional. 20160801 16:29:47< celticminstrel> Captures can often be empty. 20160801 16:33:01< vultraz> yayy 20160801 16:33:03< vultraz> it works 20160801 16:33:10< vultraz> order_funcs[0] = [this](unsigned i1, unsigned i2)->bool { 20160801 16:33:11< vultraz> return (*recall_list_)[i1]->type_name().str() < (*recall_list_)[i2]->type_name().str(); 20160801 16:33:13< vultraz> }; 20160801 16:33:55< celticminstrel> You could replace this with recall_list_, but I guess that won't make any difference really. 20160801 16:34:13-!- atarocch [~atarocch@194.127.9.108] has quit [Ping timeout: 244 seconds] 20160801 16:34:34-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth-dev 20160801 16:35:02< vultraz> lambdas really are easier to read 20160801 16:35:19< celticminstrel> Bind is more succinct in some cases, but sure. 20160801 16:35:52< vultraz> well before it was this 20160801 16:35:55< vultraz> order_funcs[0] = std::bind(&tunit_recall::compare_type, this, _1, _2); 20160801 16:36:00< vultraz> so I guess 20160801 16:36:15< vultraz> but since I have to filter on 5 options in this dialog 20160801 16:36:23< vultraz> it saves me creating 10 different member functions 20160801 16:36:25< vultraz> :P 20160801 16:36:56< vultraz> see? 20160801 16:37:14< celticminstrel> Well, in this case, yes. 20160801 16:37:24< celticminstrel> Sometimes the functions could be statics though. 20160801 16:37:58< vultraz> I wonder if I could template this.. 20160801 16:38:15< iceiceice> vultraz, one trick you can use to speed up lambdas sometimes is, 20160801 16:38:19< iceiceice> operator + 20160801 16:38:25< vultraz> hm? 20160801 16:38:40< iceiceice> http://stackoverflow.com/questions/18889028/a-positive-lambda-what-sorcery-is-this 20160801 16:40:12< iceiceice> i guess it wont speed up a lambda, but if it lets you avoid std::function then it will be faster 20160801 16:41:12< celticminstrel> In particular, if you need to use a particular callback function more than once, you likely don't want to have a lambda; certainly not an inline lambda. 20160801 16:42:11< celticminstrel> iceiceice: That won't work in this case though. 20160801 16:42:33-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth-dev 20160801 16:42:34< vultraz> well basically i need to have this replicated 5 times http://pastebin.com/62J5NXMi 20160801 16:42:46< vultraz> with different attribute checks each time 20160801 16:42:58< vultraz> pondering how to simplify this 20160801 16:42:59< celticminstrel> Sounds like you want C++14 auto. 20160801 16:43:03< celticminstrel> Or wait. 20160801 16:43:14< celticminstrel> Different attributes, not different types. 20160801 16:43:26< celticminstrel> Could use pointer-to-members. 20160801 16:43:46< vultraz> is there some way to like 20160801 16:44:06< vultraz> make a function that takes the accessor in unit as an argument 20160801 16:44:13< celticminstrel> Yes. 20160801 16:44:49< celticminstrel> So, you mean it needs to check something other than type_name, right? 20160801 16:45:16-!- Kwandulin [~Miranda@p200300760F60621E71E044DA18951B30.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160801 16:45:27< celticminstrel> What's the return type of type_name() BTW? 20160801 16:46:24< vultraz> I also need to filter on name(), level(), experience(), and traits_names().first() 20160801 16:46:32< vultraz> celticminstrel: t_string 20160801 16:46:59< celticminstrel> Ah. 20160801 16:47:19< celticminstrel> You could actually compare them directly, though that would be language-dependent. 20160801 16:47:42< celticminstrel> Hmm. 20160801 16:48:18< vultraz> celticminstrel: somethng like this maybe? http://pastebin.com/X5BtuMhq 20160801 16:48:21< vultraz> i dunno if that works 20160801 16:49:07< celticminstrel> Obviously it won't. 20160801 16:49:15< celticminstrel> But it's sort of on the right track. 20160801 16:49:29< celticminstrel> What do you expect T to be? 20160801 16:49:42< celticminstrel> std::string? 20160801 16:49:50< celticminstrel> (In the type_name case.) 20160801 16:50:34< celticminstrel> Actually, for templates, it's generally better not to use std::function and instead make the entire function type the template parameter. 20160801 16:50:37-!- Shiki [~Shiki@141.39.226.227] has joined #wesnoth-dev 20160801 16:50:46< celticminstrel> Like template ... Fcn filter_on 20160801 16:50:53< celticminstrel> (Or Func if you prefer.) 20160801 16:51:01< celticminstrel> (Or whatever else you want to call it.) 20160801 16:51:40< vultraz> type_name(), name(), and trait_names().first() return a t_string, level() and experience() are ints. 20160801 16:52:01< celticminstrel> You're comparing type_name().str() in the example though. 20160801 16:52:09< celticminstrel> Anyway. 20160801 16:52:16-!- iceiceice [~chris@wesnoth/developer/iceiceice] has quit [Quit: Ex-Chat] 20160801 16:52:23< celticminstrel> You probably should make this template function the actual function rather than a lambda. 20160801 16:52:36< vultraz> i figured it's better to compare the underlying string 20160801 16:52:48< celticminstrel> It's not better or worse. 20160801 16:52:57< celticminstrel> This is a context where OOS should not be an issue. 20160801 16:53:06< vultraz> ok 20160801 16:53:21< celticminstrel> I take back my statement. 20160801 16:53:21< vultraz> so, how would you do this 20160801 16:53:39< celticminstrel> It's worse, because it means that people using other languages will complain that they're not sorting properly. 20160801 16:53:58< vultraz> so I should filter on the t_string? 20160801 16:54:14< celticminstrel> You should probably compare the t_string instead of the string, yes. 20160801 16:54:21< celticminstrel> Anyway... 20160801 16:54:54< celticminstrel> The ->bool is optional there BTW since there's only a single return statement. 20160801 16:54:59< celticminstrel> Anyway... 20160801 16:55:44< celticminstrel> What I'd suggest is making a comparison function (possibly static) which takes the recall list, the two indices, and the filter_on function as parameters. The latter's type is a template parameter. 20160801 16:55:56< celticminstrel> Wait, hmm. 20160801 16:56:09< celticminstrel> Oh right, that approach would mean you need to use bind. 20160801 16:56:56< celticminstrel> Also, to use the filter function, call filter_on((*recall_list_)[i1]) instead of what you're doing in the last paste. 20160801 16:59:09< vultraz> eh? 20160801 16:59:22< celticminstrel> Which part is confusing you? 20160801 17:00:04< vultraz> why do I need to do that 20160801 17:00:14< celticminstrel> Which part? 20160801 17:00:19< vultraz> [03:56:56] celticminstrel Also, to use the filter function, call filter_on((*recall_list_)[i1]) instead of what you're doing in the last paste. 20160801 17:01:02< celticminstrel> Ultimately it's because of trait_names().first() which means that you can't cast all of them as "calling some member function of the unit and taking its result". 20160801 17:02:46< vultraz> but how could what you say possibly work 20160801 17:05:20< vultraz> blah 20160801 17:05:23< vultraz> i guess it does 20160801 17:05:28< vultraz> but i just spotted a flaw in this 20160801 17:06:32< vultraz> need an object for passing the function.. 20160801 17:07:36< vultraz> like, if I say init_sorting_option(order_funcs, I_NEED_AN_OBJECT.type_name()); 20160801 17:07:41< vultraz> :/ 20160801 17:08:02< vultraz> celticminstrel: any way around this 20160801 17:10:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 17:20:14-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 17:22:20< vultraz> celticminstrel: blahhh 20160801 17:22:26< vultraz> t_string doesn't have the > operator 20160801 17:23:27< vultraz> or did I typo it? 20160801 17:24:19< vultraz> ah yes 20160801 17:24:21< vultraz> > 20160801 17:24:25< vultraz> but it doesn't complain about what is this 20160801 17:24:57-!- olivier [~olivier@APuteaux-654-1-216-219.w86-217.abo.wanadoo.fr] has joined #wesnoth-dev 20160801 17:25:06-!- olivier is now known as PoignardAzur 20160801 17:25:25< vultraz> will i have to edit t_string :| 20160801 17:26:28< celticminstrel> Not exactly, but its header, yeah. 20160801 17:26:45< celticminstrel> Unless you want to recast into < 20160801 17:26:55< celticminstrel> But honestly it should implement all four anyway. 20160801 17:26:59< vultraz> nah, I'll just add the other operator 20160801 17:26:59< celticminstrel> I'm shocked that it doesn't. 20160801 17:27:08< celticminstrel> Add <= and >= while you're at it. 20160801 17:27:46< celticminstrel> Oh huh, weird, it's implemented in the class. 20160801 17:28:25< celticminstrel> I'd suggest changing it to friend bool operator<(const t_string& a, const t_string& b) { return a.get() < b.get(); } 20160801 17:29:04< vultraz> why friend? 20160801 17:29:25< celticminstrel> Geh, t_string_base does the same thing... 20160801 17:29:36< vultraz> actually, can you commit this 20160801 17:29:40< celticminstrel> Because that declaration makes it a global function, not a class function. 20160801 17:29:42< vultraz> I'll be bound to screw it up 20160801 17:29:49< PoignardAzur> Wait, isn't t_string supposed to be imposible to compare? 20160801 17:29:52< vultraz> and I don't want to screw up t_string 20160801 17:29:57< celticminstrel> Sigh. I guess I can. I'll need to stash and stuff though. 20160801 17:30:10< celticminstrel> PoignardAzur: Is it? It implements operator< though. 20160801 17:30:12< vultraz> PoignardAzur: is it? 20160801 17:30:47< PoignardAzur> I think I read it in the WML docs, so maybe it doesn't apply to the c++ code 20160801 17:30:59-!- gfgtdf [~chatzilla@x4e36342f.dyn.telefonica.de] has joined #wesnoth-dev 20160801 17:31:06< PoignardAzur> Mh, let me check 20160801 17:31:48-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160801 17:32:50< gfgtdf> vultraz: There could be problems with making tstring compare with > by dsefault ot the trsnlateed value, for example teh result of > might change when the language is changed or when new textdomains are added 20160801 17:33:08< celticminstrel> gfgtdf: This is a context where we'd want it to change. 20160801 17:33:16-!- atarocch [~atarocch@ipbcc2d6b3.dynamic.kabel-deutschland.de] has joined #wesnoth-dev 20160801 17:33:21< celticminstrel> Though, textdomains affecting it is a bad thing... 20160801 17:33:24< gfgtdf> vultraz: this can be pretty bad when you want to usse them in a std::map and teh reult of > 20160801 17:33:42< celticminstrel> Ideally we'd compare the translated form as a string. 20160801 17:33:42< gfgtdf> changes when its used as a key. 20160801 17:33:47< PoignardAzur> For the record, this is what I was refering to https://wiki.wesnoth.org/SyntaxWML 20160801 17:34:04< PoignardAzur> (not sure if it applies to c++) 20160801 17:34:07< celticminstrel> PoignardAzur: Where exactly on that page? 20160801 17:34:54< PoignardAzur> ctrl+f translatable 20160801 17:35:09< PoignardAzur> (under special attribute values) 20160801 17:35:52< PoignardAzur> In what context would you compare two t_strings? 20160801 17:36:27< celticminstrel> To list units in lexicographical order by name, for exampe. 20160801 17:36:29< celticminstrel> ^example 20160801 17:36:34< PoignardAzur> Yeah I see 20160801 17:36:39-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 276 seconds] 20160801 17:36:39-!- wedge010 is now known as wedge009 20160801 17:37:51< PoignardAzur> Is there a possibility of cache problems? 20160801 17:38:26< PoignardAzur> Like if the language in change mid-execution? If not, there shouldn't be a problem implementing comparison operators 20160801 17:39:04< PoignardAzur> *is changed 20160801 17:39:08< celticminstrel> Theoretically the cache should be flushed if the language changes. The language can only change from the title screen as well. 20160801 17:39:12< celticminstrel> ^be changed 20160801 17:39:22< celticminstrel> I have no idea what actually happens though. 20160801 17:39:34-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 17:40:17< PoignardAzur> I guess that depends on translated strings being sorted is a precondition anywhere 20160801 17:40:28< PoignardAzur> Probably not, since the code isn't implemented yet 20160801 17:40:53< PoignardAzur> So, worst case scenario, you have a cache failure and some strings are badly sorted until you reload the game 20160801 17:41:05< celticminstrel> Yeah. 20160801 17:41:13< PoignardAzur> Still annoying 20160801 17:42:49< PoignardAzur> Speaking of which, I'm trying to read through the "display units" code 20160801 17:43:06< PoignardAzur> Which is, well, still ridiculously large 20160801 17:43:15< celticminstrel> Display units? 20160801 17:43:49< PoignardAzur> Well, more like, units animation 20160801 17:43:56< PoignardAzur> In the units folder 20160801 17:44:01< celticminstrel> Oh. 20160801 17:44:24< PoignardAzur> Which I just realized is not even relevant to what I'm looking for, which is projectile displaying 20160801 17:44:40< PoignardAzur> To show arrows and thrown stones and projectiles 20160801 17:45:32< PoignardAzur> Any idea where the code for that is? 20160801 17:46:02< celticminstrel> I don't know for certain, but I think you're probably in the right general area. 20160801 17:46:07< celticminstrel> Maybe units/frame.?pp 20160801 17:46:38< PoignardAzur> thanks 20160801 17:50:38-!- Kwandulin [~Miranda@p200300760F60621E7899D26582288F8C.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160801 18:01:06-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 18:02:29< celticminstrel> I decided to take the lazy approach and leave them as member functions. 20160801 18:02:54< celticminstrel> Also, I'm pushing to a branch so that people can look at it and I can change it if there are obvious problems. 20160801 18:03:19< celticminstrel> I've actually changed operator< to work the same as it does in Lua. 20160801 18:03:23-!- esr [~esr@wesnoth/developer/esr] has quit [Quit: WeeChat 1.3] 20160801 18:03:28-!- mjs-de [~mjs-de@wh.Uni-Dortmund.DE] has joined #wesnoth-dev 20160801 18:06:09-!- Shiki [~Shiki@141.39.226.227] has quit [Remote host closed the connection] 20160801 18:08:44< celticminstrel> Not sure if that's a good idea though. 20160801 18:10:36< vultraz> I'll use the base strings for now 20160801 18:11:24< celticminstrel> Actually, .str() returns the translated form, right? 20160801 18:11:29< vultraz> celticminstrel: btw, you never said if there's a way to bind a member function without an object 20160801 18:11:30< vultraz> uhhh... 20160801 18:11:32< vultraz> does it? 20160801 18:11:32< celticminstrel> So maybe that's what you want after all. 20160801 18:11:43< celticminstrel> There is a way to bind a member function without an object. 20160801 18:12:10< celticminstrel> Looking at the code, yes it does. 20160801 18:12:22< celticminstrel> Okay then, I guess all that wasn't even necessary to worry about. 20160801 18:12:34< celticminstrel> I did still need to switch to master to rebase my branch though. 20160801 18:12:44< celticminstrel> Since bumbadadabum has been committing conflicts left and right. ;p 20160801 18:12:58< bumbadadabum> s-sorry 20160801 18:13:09< bumbadadabum> I kinda messed up 20160801 18:13:57< celticminstrel> The blocks of code you moved were things I was working on. You didn't actually change anything there, right? Just cut-and-paste? 20160801 18:15:03< vultraz> celticminstrel: what is this method? 20160801 18:15:46< celticminstrel> If you do bind(&the_class::member_function, _1) then it should be callable as f(this) 20160801 18:15:53< celticminstrel> (Rather than this->member_function()) 20160801 18:16:40< celticminstrel> There's also something like std::mem_fn I think. 20160801 18:16:49< celticminstrel> Which is a C++08 version of bind specific to member functions. 20160801 18:17:21< celticminstrel> It's a lot simpler than C++11 bind, if all you need is a function with the exact same parameter list plus this. 20160801 18:19:41< PoignardAzur> Uh. I just realized how wesnoth handled sequential drawing. It's a lot more imperative than I expected 20160801 18:20:00< PoignardAzur> Also it explains why you access the menus mid animation 20160801 18:20:19< celticminstrel> I'm about to commit something that'll conflict with ancestral... sorry in advance... >_> 20160801 18:23:07< vultraz> nice thing about gaining further understanding of coding: you start to realize how things can be done different ways and why that is so 20160801 18:25:01< irker738> wesnoth: Celtic Minstrel wesnoth:master a515dd403a17 / projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj: XCode: Rearrange build sequence https://github.com/wesnoth/wesnoth/commit/a515dd403a17d802967dd362d2b01c99e51449cd 20160801 18:27:06< PoignardAzur> yeah 20160801 18:27:40< PoignardAzur> vultraz: That bit would be a bit hard to change, though 20160801 18:29:44< vultraz> hmm 20160801 18:29:51< vultraz> note: mismatched types 'T*' and 'std::_Bind(boost::arg<1>)>'| 20160801 18:30:12< vultraz> signature is still template void tunit_recall::init_sorting_option(std::vector& order_funcs, T* filter_on) 20160801 18:31:13< celticminstrel> Try T instead of T* 20160801 18:31:46< celticminstrel> Also, if you're doing it that way (weird though it is) you probably don't need bind. 20160801 18:32:25< vultraz> blah 20160801 18:32:31< celticminstrel> Though I'm not sure what you're doing, so I could be wrong. 20160801 18:32:35< vultraz> I can't access t_string's .str() from here 20160801 18:33:07< vultraz> celticminstrel: http://pastebin.com/qjxU05iZ 20160801 18:33:11< celticminstrel> It's possible with bind, but it might be easier to have a simple helper function that takes a t_string and calls str() on it, or something. 20160801 18:33:27< celticminstrel> I'll check your paste once I'm back on the abilities branch. 20160801 18:34:41< bumbadadabum> The blocks of code you moved were things I was working on. You didn't actually change anything there, right? Just cut-and-paste? <- yes 20160801 18:35:04< celticminstrel> That should make it easy to resolve the conflict then. 20160801 18:42:43< mattsc> celticminstrel: can debug_ai() only be called once? 20160801 18:43:04< celticminstrel> That shouldn't be the case... 20160801 18:43:40< mattsc> celticminstrel: http://pastebin.com/hMzPiHAC 20160801 18:44:05< mattsc> That’s the code I am using (it’s called from a right-click option) and the output I am getting 20160801 18:44:28< mattsc> This is right after launching wesnoth with —debug-lua 20160801 18:44:37< celticminstrel> Not --debug? 20160801 18:44:44< mattsc> yes, also -d 20160801 18:44:59< celticminstrel> I don't actually know what debug-lua does. 20160801 18:45:14< mattsc> The second time I call this, I get that error the first time around and no output from the ai table at all. 20160801 18:46:15< mattsc> I just tried with only -d, and no —debug_lua and I get exactly the same result 20160801 18:46:22< celticminstrel> I'll take a look in a few minutes. 20160801 18:46:27< mattsc> thanks 20160801 18:47:33< vultraz> celticminstrel: btw, the code in the paste of mine works, save for the tstring thing 20160801 18:49:12-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160801 18:49:26< mattsc> celticminstrel: one more data point: I just tried with Wesnoth 1.13.2 (don’t have 1.13.4 conveniently lying around) and everything’s working there. So it looks like this is something that got broken in the refactoring. 20160801 18:52:47-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160801 18:56:41< mattsc> Btw, this was also the reason why I told you first that it didn’t work and then that it did after all a couple days ago. The latter time I had just restarted Wesnoth. 20160801 18:57:39< celticminstrel> It doesn't make any sense for it to be dependent on session... I'm pretty sure the Lua kernel is initialized only when you start a scenario. 20160801 18:57:48< celticminstrel> Separately for every scenario. 20160801 18:57:53< celticminstrel> So every scenario has a new kernel. 20160801 18:59:17< mattsc> Well, the code I pastebinned for you is in the same session. It works the first time you call it. It fails the second time right afterward. 20160801 18:59:38< mattsc> I fails the first time every other time you call it after that. 20160801 18:59:44< celticminstrel> mattsc: Even if you start a new game? 20160801 19:00:04< mattsc> “every other” as in “every time after that”, not “every second time” 20160801 19:00:22< celticminstrel> How did you get "every second time" from what I said? 20160801 19:00:37< mattsc> I was correcting myself 20160801 19:00:39< celticminstrel> vultraz: What you need is to pass a minifunction that returns type_name().str() 20160801 19:00:42< celticminstrel> Oh. 20160801 19:00:44< mattsc> or rather being more specific 20160801 19:01:13< celticminstrel> vultraz: Since you have multiple t_strings, you could make it take a parameter specifying the accessor to call. 20160801 19:01:20< vultraz> what? 20160801 19:01:25< mattsc> celticminstrel: it fails even if I reload. 20160801 19:01:26< vultraz> oh 20160801 19:01:35< mattsc> haven’t tried restarting the game, let me do that 20160801 19:01:48< vultraz> celticminstrel: another template param? 20160801 19:02:10< celticminstrel> No, a function param. Something like this would work: t_string (unit::* fcn)() 20160801 19:02:18< vultraz> uh... 20160801 19:02:30< celticminstrel> Then use it as u->*fcn() 20160801 19:02:31< vultraz> I'm confused now 20160801 19:02:34< celticminstrel> Something like that. 20160801 19:02:42< vultraz> can you write out what you mean? 20160801 19:03:02< celticminstrel> I'll make a paste, after I look at mattsc's issue. 20160801 19:03:17< mattsc> celticminstrel: yes, even if you go back to the main menu and start the campaign from the beginning 20160801 19:03:54< mattsc> so it works exactly once after you start Wesnoth 20160801 19:03:58< mattsc> very strange 20160801 19:04:13< celticminstrel> That stack trace is very strange too. 20160801 19:04:39< celticminstrel> Are you overriding the debug_ai function with a custom implementation? 20160801 19:05:20< celticminstrel> Wait, no, the [C] probably means it's a C function, right? 20160801 19:06:26< celticminstrel> Or maybe not? I dunno. 20160801 19:06:48< celticminstrel> mattsc: Anything useful at AI-demos/lua/test_lua.lua:40? 20160801 19:07:25-!- vincent_c [~bip@vcheng.org] has quit [Quit: Coyote finally caught me] 20160801 19:08:18< celticminstrel> BTW vultraz, are there always exactly two order functions? 20160801 19:08:28-!- vincent_c [~bip@vcheng.org] has joined #wesnoth-dev 20160801 19:08:28< vultraz> yes 20160801 19:08:31< vultraz> sort and reverse 20160801 19:08:41< celticminstrel> Should probably make it std::array at some point, then. 20160801 19:08:47< vultraz> hm? 20160801 19:08:52< celticminstrel> Instead of std::vector 20160801 19:09:02< vultraz> why so? 20160801 19:09:06< mattsc> celticminstrel: l.40 is the second call to debug_ai from my pastebin 20160801 19:09:11< celticminstrel> Because it's fixed-size. 20160801 19:09:15< celticminstrel> mattsc: Ah, I see. 20160801 19:09:38< celticminstrel> What about the error lines in helper.lua? Though I don't expect anything useful there... 20160801 19:10:24< mattsc> that’s the mainline helper.lua, I did not modify that 20160801 19:10:50< celticminstrel> That's why I don't expect anything useful... 20160801 19:11:06< celticminstrel> It's weird that helper.set_variable is involved at all, though. 20160801 19:11:15< mattsc> celticminstrel: I have to run off unexpectedly; I might be back in 20 min, but it might be a couple hours also 20160801 19:11:39< mattsc> sorry for that; I’ll check back later to see if you found something in the meantime 20160801 19:11:45< vultraz> celticminstrel: i think it being a vector is local, so it'll be easy to change 20160801 19:12:09< vultraz> then again, it's declared as std::vector order_funcs(2); 20160801 19:12:14< vultraz> doesn't that mean it's always 2? 20160801 19:12:36< celticminstrel> It means it's initialized with enough space for 2 elements. 20160801 19:12:50< celticminstrel> That's all. 20160801 19:13:03< vultraz> ah 20160801 19:13:19< celticminstrel> Actually, I'm not sure if that fills it with default-constructed values, or only calls set_capacity... 20160801 19:13:52< celticminstrel> What was your list of things you need to use this init_sorting_option on? 20160801 19:14:41< vultraz> type_name().str(), name().str(), level(), experience(), and trait_names().front() 20160801 19:14:56< vultraz> .str() 20160801 19:15:27< celticminstrel> What's the type of the last one? 20160801 19:15:37< celticminstrel> t_string again? 20160801 19:15:47< vultraz> vector of tstrings 20160801 19:16:06< vultraz> it's too hard to sort on the entire vector 20160801 19:16:14< vultraz> and there's no logical way to do that either 20160801 19:16:25< celticminstrel> Sure there is. 20160801 19:16:30< celticminstrel> std::lexicographical_compare 20160801 19:16:37 * vultraz blinks 20160801 19:16:49< celticminstrel> Though I dunno if that's what you'd want. 20160801 19:17:03< vultraz> old behavior is to sort on the first, i think 20160801 19:17:08< vultraz> I'll stick with that for now 20160801 19:17:35< celticminstrel> level and xp are the only ints? 20160801 19:17:40< vultraz> yes 20160801 19:18:49< vultraz> taddon_list uses what I think is a less elegant method of having 5 sorting options 20160801 19:20:14-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160801 19:21:50< celticminstrel> I was imagining something along the lines of this: http://pastebin.com/EQxx9CW6 20160801 19:21:59< celticminstrel> (Untested) 20160801 19:22:31< celticminstrel> Oh, there's a * missing after the arrow on line 15. 20160801 19:22:35< celticminstrel> Whoops. 20160801 19:24:15< vultraz> hmmmm 20160801 19:24:55< celticminstrel> Maybe it could use more const or &, I dunno. 20160801 19:26:52< vultraz> it'll do 20160801 19:28:09< vultraz> not the most elegant solution, sadly 20160801 19:30:10< vultraz> hm line 15 doesn't work.. 20160801 19:30:28< celticminstrel> ->* 20160801 19:30:56< celticminstrel> Maybe it should be ()) instead of )() 20160801 19:30:56< vultraz> C:\Users\Charles\Documents\wesnoth-git\src\gui\dialogs\unit_recall.cpp|120|error: no match for 'operator->*' (operand types are 'const unit' and 't_string (unit::*)()')| 20160801 19:31:05< celticminstrel> Oh. 20160801 19:31:19< celticminstrel> Right, duh, I made it a reference, so it should be .* not ->* 20160801 19:31:35< celticminstrel> Though maybe it should be changed to a pointer, not quite sure. 20160801 19:32:13< vultraz> had to remove the const 20160801 19:32:17< vultraz> blag 20160801 19:32:20< vultraz> what now 20160801 19:32:22< vultraz> C:\Users\Charles\Documents\wesnoth-git\src\gui\dialogs\unit_recall.cpp|132|error: no match for call to '(const std::_Bind (*(boost::arg<1>, const t_string& (unit::*)() const))(unit&, t_string (unit::*)())>) (__gnu_cxx::__alloc_traits > >::value_type&)'| 20160801 19:32:27< vultraz> P_P 20160801 19:32:52< celticminstrel> Put a const in front of t_string, maybe? 20160801 19:33:02< celticminstrel> And a & after it possibly 20160801 19:33:10< celticminstrel> (Line 14 from the paste) 20160801 19:33:33< vultraz> there's nothing on line 14 20160801 19:34:07< celticminstrel> Eh? 20160801 19:34:16< celticminstrel> Oh, 13. 20160801 19:34:43< vultraz> and i assumed you meant std::string 20160801 19:35:01< vultraz> oh wait 20160801 19:35:04< vultraz> looking at the wrong thing 20160801 19:35:21< celticminstrel> No, t_string 20160801 19:35:43< vultraz> C:\Users\Charles\Documents\wesnoth-git\src\gui\dialogs\unit_recall.cpp|132|error: no match for call to '(const std::_Bind (*(boost::arg<1>, const t_string& (unit::*)() const))(unit&, const t_string& (unit::*)())>) (__gnu_cxx::__alloc_traits > >::value_type&)'| 20160801 19:36:27-!- PoignardAzur [~olivier@APuteaux-654-1-216-219.w86-217.abo.wanadoo.fr] has quit [Ping timeout: 264 seconds] 20160801 19:39:17< vultraz> also, cannot capture recall_list_ directly, need 'this' 20160801 19:39:35< vultraz> oh, there's more to that error 20160801 19:39:38< vultraz> C:\TDM-GCC-32\lib\gcc\mingw32\5.1.0\include\c++\functional|1125|error: invalid initialization of reference of type 'unit&' from expression of type 'boost::intrusive_ptr'| 20160801 19:41:25-!- PoignardAzur [~olivier@APuteaux-654-1-216-219.w86-217.abo.wanadoo.fr] has joined #wesnoth-dev 20160801 19:42:16< celticminstrel> I thought capturing recall_list_ directly would be slightly better, but I suppose it doesn't matter that much. (Maybe it'd work if you wrote this->recall_list_, though that would be weird.) 20160801 19:42:42< celticminstrel> Try using unit_const_ptr instead of const unit&, then. 20160801 19:42:47< celticminstrel> (And ->* instead of .*) 20160801 19:43:25< celticminstrel> (Oh wait, for that you'd need something like .get()->* because smart pointers don't overload ->* because it's so rare that they decided there's no point... and it actually turns out to be quite hard to do it right. I tried once.) 20160801 19:44:29< vultraz> ok, ive gotten to C:\Users\Charles\Documents\wesnoth-git\src\gui\dialogs\unit_recall.cpp|120|error: invalid conversion from 'const unit*' to 'unit*' [-fpermissive]| 20160801 19:44:54< vultraz> static std::string tstr_key(unit_const_ptr u, t_string& (unit::* fcn)()) 20160801 19:44:55< vultraz> { 20160801 19:44:56< vultraz> return (u.get()->*fcn)().str(); 20160801 19:44:58< vultraz> } 20160801 19:45:36< celticminstrel> Maybe use const unit::*? 20160801 19:45:42< PoignardAzur> try (const unit::* fcn)? 20160801 19:45:49< celticminstrel> Yeah that. 20160801 19:46:18< vultraz> C:\Users\Charles\Documents\wesnoth-git\src\gui\dialogs\unit_recall.cpp|118|error: 'parameter' declared as function returning a function| 20160801 19:46:20< vultraz> wat 20160801 19:46:31< PoignardAzur> no wait 20160801 19:46:37< PoignardAzur> the const is fast the () 20160801 19:46:53< celticminstrel> const t_string& (const unit::* fcn)()? 20160801 19:46:53< PoignardAzur> so (unit::*fcn)() const 20160801 19:46:57< celticminstrel> Oh right. 20160801 19:47:10< celticminstrel> const t_string& (unit::* fcn)() const 20160801 19:47:22< PoignardAzur> Yeah, that's both logical and completely impossible to come up with on the first try ^^ 20160801 19:47:24-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 19:47:25< celticminstrel> Maybe without the initial const. 20160801 19:47:30< celticminstrel> Whichever gets it to compile. 20160801 19:47:43< PoignardAzur> yeah, without the initial const 20160801 19:47:50< PoignardAzur> so you can use move semantics 20160801 19:48:15< celticminstrel> The initial const applies to the return type, so it needs to match the actual function. 20160801 19:48:25< PoignardAzur> I don't think so 20160801 19:48:34< celticminstrel> To make the variable const you'd do (unit::*const fcn) 20160801 19:48:35< PoignardAzur> No wait, you're right 20160801 19:49:03< PoignardAzur> lol 20160801 19:49:23< vultraz> yes, that initial const is needed 20160801 19:49:24< PoignardAzur> This is why std::function rocks 20160801 19:49:36< vultraz> now to fix trait_key 20160801 19:50:05< vultraz> done 20160801 19:50:12< vultraz> builds! 20160801 19:50:42< PoignardAzur> nice 20160801 19:51:15< vultraz> hmm 20160801 19:51:19< vultraz> the trait one causes a crash 20160801 19:51:31< celticminstrel> What's it look like? 20160801 19:51:32< vultraz> i think I know why 20160801 19:51:36< celticminstrel> Oh okay. 20160801 19:53:04< vultraz> I made it return !u->trait_names().empty() ? u->trait_names().front().str() : ""; 20160801 19:53:18< vultraz> since there's no guarantee a unit had traits. 20160801 19:53:25< celticminstrel> Ah. Good idea. 20160801 19:53:34< celticminstrel> Maybe phrase it as an if statement instead though. 20160801 19:54:08< celticminstrel> I'm guessing the problem was that str() and "" are different types or something? 20160801 19:54:22< PoignardAzur> No, that's a compile-time problem 20160801 19:54:32< celticminstrel> Oh right. 20160801 19:54:36< PoignardAzur> I'd guess it's a reference to temporary problem 20160801 19:54:43< celticminstrel> Right, the problem was because you didn't do that maybe. 20160801 19:54:46< PoignardAzur> But that would be an auto warning 20160801 19:55:00< vultraz> one of the options i was trying to sort had an empty vector 20160801 19:55:04< celticminstrel> I think he was posting the fix, not the problem. 20160801 19:55:04< vultraz> trait vector 20160801 19:55:10< vultraz> and yes 20160801 19:55:11< vultraz> that's the fix 20160801 19:55:23< vultraz> thanks for all the help :D 20160801 19:55:25< PoignardAzur> oh never mind then 20160801 19:55:46< vultraz> I honestly have no idea what the syntax you guys used for tstr_key is, but it works 20160801 19:55:51< PoignardAzur> Holy crap, the display code in src/unit is really huge 20160801 19:56:03< PoignardAzur> I know I said that already, but wow 20160801 19:56:05< celticminstrel> Apparently [unit][abilities] overrides [unit_type][abilities]. 20160801 19:56:21< vultraz> I think I'm done here 20160801 19:56:35< celticminstrel> PoignardAzur: At least three files, right? 20160801 19:56:44< celticminstrel> Oh, four even. 20160801 19:56:49< celticminstrel> ...five. 20160801 19:57:01< celticminstrel> animation, animation_component, drawer, frame, udisplay? 20160801 19:57:07< vultraz> i'll port this paradigm to other dialogs 20160801 19:57:25< PoignardAzur> yup 20160801 19:58:10< PoignardAzur> By the way, what does unit_animation::hit_type do? 20160801 19:58:22< PoignardAzur> {HIT, MISS, KILL, INVALID} 20160801 19:58:54< celticminstrel> Used for deciding which animation to play. 20160801 19:59:11< celticminstrel> Depending on whether a given strike hit, and whether the defender died. 20160801 19:59:31< PoignardAzur> okay 20160801 19:59:52< celticminstrel> Didn't I make that a MAKE_ENUM type though? 20160801 19:59:58< PoignardAzur> yes 20160801 20:00:05< vultraz> just one feature to add 20160801 20:00:06< PoignardAzur> that makes it an enum class, right? 20160801 20:00:14< vultraz> then i can commit 20160801 20:00:21< vultraz> but ill do that later 20160801 20:02:01< vultraz> my hand hurts from all this typing 20160801 20:02:30< PoignardAzur> Simple curiosity, what were you working on? 20160801 20:02:51< celticminstrel> It makes it an enum class, but not in the sense of "enum class X {blah, blah2};" 20160801 20:03:23< PoignardAzur> You mean an actual class? 20160801 20:03:27< vultraz> PoignardAzur: https://drive.google.com/file/d/0B-mR9s8FduLLd0RTTXFCN2tyVjA/view?usp=sharing 20160801 20:05:23< celticminstrel> Yes. 20160801 20:05:53< celticminstrel> I think the actual constants are an anonymous enum within the class. 20160801 20:06:19< celticminstrel> vultraz: Looks nice. 20160801 20:06:31< celticminstrel> Race/alignment icons still need tooltips though. 20160801 20:06:33< celticminstrel> Last I checked. 20160801 20:06:41< PoignardAzur> vultraz: What's new? 20160801 20:07:29< celticminstrel> Nothing new, just redoing it with the different GUI framework. 20160801 20:07:35< celticminstrel> At least, I think nothing new. 20160801 20:07:42< celticminstrel> BTW, what other dialogs still use GUI1? 20160801 20:07:48< celticminstrel> MP setup, I guess. 20160801 20:07:53< vultraz> many 20160801 20:07:56< vultraz> help 20160801 20:07:58< vultraz> scenario stats 20160801 20:08:00< vultraz> unit list 20160801 20:08:11< vultraz> uhh.. 20160801 20:08:14< vultraz> addons manager 20160801 20:08:22< vultraz> but i already have a gui2 version of that 20160801 20:08:24< celticminstrel> The latter two sound relatively easy, but the MP setup screens and the help dialog are going to be hard... 20160801 20:08:26< vultraz> just not functional 20160801 20:08:32< vultraz> definitely 20160801 20:08:38< vultraz> leader list 20160801 20:08:40< celticminstrel> Celaradara huh. Interesting name there. 20160801 20:10:54< PoignardAzur> What does gui2 bring to the table, actually? 20160801 20:11:13< celticminstrel> Honestly, I'm not sure. 20160801 20:11:35< celticminstrel> The main reason for porting everything is that we don't like having two distinct GUI frameworks. 20160801 20:12:08< celticminstrel> GUI2 defines the dialog using WML, whereas I think GUI1 defines the dialog fully in the source code. 20160801 20:12:18< gfgtdf> PoignardAzur: it does automatically calculate size and location of widgets, similar to html, where in gui1 you have to specif the exact positions of all widgets manually 20160801 20:12:28< PoignardAzur> Oh I see 20160801 20:12:34< PoignardAzur> Definitely better then 20160801 20:13:03< gfgtdf> PoignardAzur: in particaul it can also ajust the size of for example lables or button to translations where some strings are longer and others are shorter 20160801 20:13:43< PoignardAzur> When was it added? 20160801 20:13:54< gfgtdf> PoignardAzur: don't know 20160801 20:14:22< zookeeper> GUI2 dates back to... i don't know exactly either, at least 2008 or so 20160801 20:23:34< PoignardAzur> I wonder if you could make some sort of file to describe how the files relate to each other 20160801 20:23:57< celticminstrel> Huh? 20160801 20:24:05< PoignardAzur> Like an UML, but only with file interdependencies for the project 20160801 20:24:22< celticminstrel> I think doxygen can do that. 20160801 20:24:28< celticminstrel> Using dot. 20160801 20:24:47< celticminstrel> Though I wouldn't expect the repo's doxyfile to enable it. 20160801 20:25:34< celticminstrel> That's based on include statements. 20160801 20:26:45< PoignardAzur> Well, you also have to take into account things like friend statements and forward declarations 20160801 20:26:54-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 20:27:09-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160801 20:28:14-!- PoignardAzur [~olivier@APuteaux-654-1-216-219.w86-217.abo.wanadoo.fr] has quit [Quit: leaving] 20160801 20:28:46< celticminstrel> Fair enough. Doxygen's is pretty simplistic, I guess. (It does also do inheritance graphs.) 20160801 20:30:49-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Read error: No route to host] 20160801 20:31:26-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 20:49:19< celticminstrel> ...wait, does the game support [unit][event]? What's the point of this? 20160801 20:50:01< celticminstrel> For side-level [unit], a toplevel scenario [event] should have the same effect, right? And for ActionWML [unit], following it with ActionWML [event] should have the same effect, right? 20160801 20:51:03< vultraz> keeps the event in scenario scenario the unit is in 20160801 20:51:15< celticminstrel> Ah, okay, I guess that does make sense. 20160801 20:52:12< vultraz> hmmm 20160801 20:52:24< vultraz> do lambdas do anything with loops 20160801 20:52:32-!- horrowind [~Icedove@2a02:810a:83c0:404:21b:fcff:fee3:c3ff] has quit [Quit: horrowind] 20160801 20:52:39< celticminstrel> That sounds like a question that demonstrates fundamental confusion. 20160801 20:53:46< vultraz> ok, so I'm looking at this piece of code from the old dialog 20160801 20:54:09< vultraz> it displays the name of the current side's leader if there's more than 1 recruiting side 20160801 20:54:19< vultraz> and I'm pretty sure it can be simplified 20160801 20:54:20< vultraz> now 20160801 20:54:33< vultraz> I *think* you once showed me something using std::find and lambdas 20160801 20:54:37< vultraz> but I can't remember 20160801 20:55:03< vultraz> (http://pastebin.com/sMSm9Nu6 ) 20160801 20:55:37< vultraz> if(std::find(foo.begin, foo.end(), lambda or something,)) { 20160801 20:56:24< celticminstrel> So you're talking about replacing the for-loop with std::find. 20160801 20:56:35< celticminstrel> Wait, no? 20160801 20:56:54< vultraz> I might be thinking of two different things here 20160801 20:57:09< celticminstrel> Is that what you were thinking? Because that'd be a case for std::count if anything. 20160801 20:57:22< vultraz> first off, is using a lambda as a the third argument of std:;find valid? 20160801 20:57:26< celticminstrel> Though honestly I think a for-loop is probably easier. 20160801 20:57:28< celticminstrel> Of course. 20160801 20:57:42< celticminstrel> Wait, no. 20160801 20:57:45< celticminstrel> For find_if, yes. 20160801 20:57:58< celticminstrel> Anything that can be called with a single argument of type value_type and returns a bool. 20160801 20:58:17< vultraz> ok 20160801 20:58:17< celticminstrel> (Where value_type is defined by the iterators.) 20160801 20:58:21< vultraz> that's what I was thinking of 20160801 21:05:16-!- JyrkiVesterinen [~jyrki@87-100-200-201.bb.dnainternet.fi] has quit [Quit: Konversation terminated!] 20160801 21:11:40< vultraz> celticminstrel: is it possible to have a function-local typedef/using statement? 20160801 21:11:45< celticminstrel> Yes. 20160801 21:12:03< vultraz> just put it in the function? 20160801 21:12:28< celticminstrel> Yes. 20160801 21:14:30-!- mjs-de [~mjs-de@wh.Uni-Dortmund.DE] has quit [Remote host closed the connection] 20160801 21:19:21< vultraz> hmm 20160801 21:19:30< vultraz> whyis this function checking against resources::units->find_leader(i + 1) != resources::units->end() 20160801 21:19:50< vultraz> that's saying.. 20160801 21:20:09< vultraz> as long as this is not the last side 20160801 21:20:26< vultraz> oh wait 20160801 21:20:27< vultraz> no 20160801 21:20:39< vultraz> as long as the next side has a leader? 20160801 21:21:23< vultraz> so it looks at all the teams 20160801 21:21:33< vultraz> keeping i as the index 20160801 21:21:42< vultraz> checks that it's local 20160801 21:21:44< vultraz> has recruits 20160801 21:21:59< vultraz> and that the next side has a leader 20160801 21:22:05< vultraz> .... that last one makes no sense 20160801 21:22:26< vultraz> OH 20160801 21:22:28< vultraz> wait 20160801 21:22:40< vultraz> since this is a loop, it does base-0, while teams start at 1 20160801 21:22:43< vultraz> ok this makes more sense 20160801 21:22:50< vultraz> it's checking that the side's leader exists 20160801 21:23:48< celticminstrel> vultraz: As long as there is a leader. 20160801 21:23:57-!- Kwandulin [~Miranda@p200300760F60621E7899D26582288F8C.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160801 21:24:00< celticminstrel> I think the i+1 might instruct it to start from the middle of the list. 20160801 21:24:15< celticminstrel> So as long as there's another leader. 20160801 21:24:31< vultraz> no, find_leader takes a side number 20160801 21:24:48< vultraz> as I said, i will start from 0, not 1 20160801 21:25:17< vultraz> now that I know this, I can simplify the loop 20160801 21:25:31< celticminstrel> Is i a number or an iterator? 20160801 21:25:38< celticminstrel> Oh, right. 20160801 21:25:42< vultraz> number 20160801 21:26:04< celticminstrel> Side numbers are off-by-one in various contexts, or something, I dunno. 20160801 21:28:22< mattsc> celticminstrel: hi; stopping by for 20 min then I’m off again; the day turned out to be busier than I expected … 20160801 21:28:35-!- iceiceice [~chris@wesnoth/developer/iceiceice] has joined #wesnoth-dev 20160801 21:28:51< iceiceice> lol 20160801 21:28:53< iceiceice> https://www.reddit.com/r/cpp/comments/4v7xyn/operator/ 20160801 21:29:39< celticminstrel> Sorry, I haven't looked at it yet. 20160801 21:29:44< celticminstrel> (^ mattsc) 20160801 21:30:16< mattsc> celticminstrel: no worries, I was just wondering whether I had ignored anything you had asked previously, given that I had to rush off like that 20160801 21:30:18< vultraz> for(const auto& team : *resources::teams) { 20160801 21:30:20< vultraz> if(team.is_local_human() && !team.recruits().empty() && units.find_leader(team.side()) !=units.end()) { 20160801 21:30:21< vultraz> ++controlled_recruiters; 20160801 21:30:23< vultraz> } 20160801 21:30:24< vultraz> } 20160801 21:30:26< vultraz> MUCH cleaner 20160801 21:30:57< vultraz> NOTE TO SELF: look to making menu_handler accessing resources:: directly 20160801 21:31:08< vultraz> access* 20160801 21:31:20< iceiceice> vultraz, for a long time i tried to prevent everything from accessing resources:: directly 20160801 21:31:33< vultraz> iceiceice: oh? 20160801 21:31:36< vultraz> why so 20160801 21:31:41< vultraz> and what is the better alternative 20160801 21:31:47< iceiceice> because i wanted to have simulation based AIs 20160801 21:31:58< iceiceice> so i wanted to be able to like "wesnoth_game_state state_one;" 20160801 21:32:06< iceiceice> and like "state_one.swap(state_two);" 20160801 21:32:07< iceiceice> or something 20160801 21:32:21< iceiceice> so there can be multiple independent states in consideration at a time 20160801 21:32:30< iceiceice> but its fucked because everything is accessing the global resources 20160801 21:33:08< iceiceice> global mutable state is usually considered a cardinal sin for reasons like this 20160801 21:33:10 * Aginor applauds iceiceice 20160801 21:33:15< iceiceice> theres like no way we can feasibly refactor the engine 20160801 21:33:21< iceiceice> not to do that 20160801 21:33:23< Aginor> that's a great thing to aim for 20160801 21:33:32< iceiceice> i literally spent months working towards that goal until i gave up :( 20160801 21:33:36< iceiceice> if someone succeeds, kudos 20160801 21:34:06< iceiceice> but if you sink a lot of time into that goal, make sure you have a plan for when you get to lua :) 20160801 21:34:48< vultraz> i dunno, it seems to me that having an easily accessible list of all units and teams is very useful 20160801 21:34:49< Aginor> make global singleton object, make the object proxy the calls in first scope, replace all global calls to get-singleton->functiion(...) 20160801 21:35:03< Aginor> iceiceice: would that work? 20160801 21:35:11< vultraz> as opposed to throwing around gameboard and gamestate and gamemap crap 20160801 21:35:31< Aginor> vultraz: testability and dependency injection 20160801 21:35:59< vultraz> like, look at this bit: http://pastebin.com/hY0Z3nFn 20160801 21:36:17< vultraz> gameboard() is pc_.gamestate() and pc is a playcontroller reference... 20160801 21:36:27< vultraz> it makes code extremely non-movable. 20160801 21:38:02< vultraz> what if I decided not to use resources:: directly. I'd have to create a class member reference to playcontroller and then do pc.board_.units_.find_leader()... 20160801 21:38:07< vultraz> ugly, ugly 20160801 21:38:43< celticminstrel> [Aug 01@5:30:58pm] vultraz: NOTE TO SELF: look to making menu_handler accessing resources:: directly 20160801 21:38:44< celticminstrel> No, it's better if we can eliminate the resources namespace. 20160801 21:39:12< vultraz> well if you people have an idea that does that yet also allows easy access of stuff like all units 20160801 21:39:20< vultraz> I'll happily hear it 20160801 21:39:31< celticminstrel> I already eliminated accesses to it in game_lua_kernel. 20160801 21:40:14< vultraz> burrowing through 3 or 4 levels just to get to a function feels bad 20160801 21:40:33< vultraz> celticminstrel: how? 20160801 21:41:10< celticminstrel> The game_lua_kernel class had references to them internally, so I just used those instead (which I think meant moving some of them to be member functions instead of static functions). 20160801 21:41:35< iceiceice> Aginor, idk 20160801 21:41:38< iceiceice> i have to think about what it means 20160801 21:41:41< iceiceice> sry i was afk for a minute 20160801 21:42:31< iceiceice> vultraz, i agree with what you say about nonmovability 20160801 21:42:37< iceiceice> but in that case like 20160801 21:42:49< iceiceice> it would be better for most of these funcitons to all be passed like a "resources" object or osmething 20160801 21:42:55< iceiceice> so that they can make the appropriate queries 20160801 21:43:01< iceiceice> in the correct context 20160801 21:44:00< iceiceice> vultraz, iirc there's some pretty wierd pointer tricks that have to happen in pathfinding for instance 20160801 21:44:08< iceiceice> to work around the way we rely on resource pointers for everything 20160801 21:45:12< Aginor> vultraz: anything that relies on global state or global calls is much harder to test independantly 20160801 21:45:34< vultraz> right 20160801 21:45:43< Aginor> vultraz: so while it may lead to a bit simpler code you're sacrificing testability and refactorability 20160801 21:46:04< Aginor> (I just made up the word refactorability, but hopefully it conveys my meaning) 20160801 21:46:12< iceiceice> Aginor, i have to say though, i'm not sure if its worth it 20160801 21:46:17< vultraz> Aginor: yet we created a global CVideo singleton, did we not? 20160801 21:46:25< vultraz> instead of passing around display/cvideo objects 20160801 21:46:36< celticminstrel> Aginor: The word follows from standard English word production rules, so no need to worry. 20160801 21:46:55< iceiceice> Aginor, getting rid of resources is really a huge project 20160801 21:47:00< iceiceice> and i think i only scratched the surface 20160801 21:47:17< iceiceice> and it's not clear that you can make the lua state copyable without breaking things 20160801 21:47:40< iceiceice> i think to some extent you have to accept that, the engine is > 300k lines 20160801 21:47:44< iceiceice> and it is what it is 20160801 21:48:06< iceiceice> if you want to have an engine with no global mutable state, probably should make a new one 20160801 21:48:10< Aginor> vultraz: yes, we did. But we can also make the get_singleton() function return a different isntance with a different behaviour if we wanted 20160801 21:48:31< vultraz> Aginor: then why can't we apply the same paradigm to global resource gathering? 20160801 21:48:32< Aginor> iceiceice: lua state might be a tad hard :/ 20160801 21:48:33-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 258 seconds] 20160801 21:48:47< Aginor> vultraz: that's what I suggested above... 20160801 21:48:53< vultraz> ah 20160801 21:49:06< iceiceice> Aginor, i worked for a long time to solve the lua state issues, and i have made a library, 20160801 21:49:08< iceiceice> https://github.com/cbeck88/lua-primer 20160801 21:49:21< iceiceice> but i don't know that it's feasible to try to use it in wesnoth 20160801 21:49:37< Aginor> it'll be a step in towards having swappable state instead of calling static functions directly 20160801 21:52:08< Aginor> iceiceice: I'll have to look later, it'd take too much brainspace to look at that at the moment 20160801 21:52:11< iceiceice> hehe 20160801 21:52:14< iceiceice> yeah np 20160801 21:52:19< Aginor> (at work and all that) ;) 20160801 21:52:52< vultraz> OK I think I'm done with this dialog 20160801 21:53:26< vultraz> I wonder if I can implement a better method for filtering 20160801 21:53:52< vultraz> right now I ported over the old method of string filtering on a vector of strings containing data separated by spaces :/ 20160801 21:53:55< celticminstrel> I wonder, if there's both a container variable and a scalar variable by the same name, is the variable expander smart about deciding which one to use? 20160801 21:54:00< celticminstrel> (WML variables) 20160801 21:54:25< vultraz> so like you have data saying "Dark Sorcerer Vultraz 3 strong" 20160801 21:54:28< vultraz> very ugly 20160801 21:54:30< celticminstrel> "smart" here means "use the container variable iff it is follwed by a . or [" 20160801 21:54:38< celticminstrel> Otherwise use the scalar variable. 20160801 21:55:15< vultraz> I'm considering... 20160801 21:55:30< vultraz> using the unit vector and fetching the data of elements 20160801 21:55:36< vultraz> but that might be too difficult 20160801 21:55:44< vultraz> and inefficient 20160801 21:55:45< celticminstrel> Using what now? 20160801 21:56:05< vultraz> the std::shared_ptr > 20160801 21:56:09< celticminstrel> So you have a vector of sort keys. Is that so that you can sort by multiple keys? 20160801 21:56:25< celticminstrel> Like, sort primarily by unit type and secondarily by unit name. 20160801 21:56:29< vultraz> filter 20160801 21:56:34< vultraz> it's purely text matching 20160801 21:56:36< celticminstrel> Such that units with the same type are sorted by name. 20160801 21:56:51< celticminstrel> Oh. 20160801 21:56:52< vultraz> so I pass text variables into a long string in a separate vector 20160801 21:57:00< vultraz> [08:54:25] vultraz so like you have data saying "Dark Sorcerer Vultraz 3 strong" 20160801 21:57:16< celticminstrel> I'd suggest separating with nulls (or some other untypable character) instead of spaces, at least. 20160801 21:57:20< gfgtdf> celticminstrel: iirc the gui2 code uses a stable sort, so you can first sort by one property and then by another. 20160801 21:57:28< celticminstrel> gfgtdf: Makes sense. 20160801 21:58:21< vultraz> celticminstrel: nulls? 20160801 21:58:26< celticminstrel> vultraz: '\0' 20160801 21:58:42< celticminstrel> Does anyone have a good test case for determining if unit_type and unit events work properly? 20160801 21:59:32< celticminstrel> vultraz: This is if it doesn't make sense for "Sorcerer Vultraz" to match your sample filter key. 20160801 21:59:53< celticminstrel> But maybe that does, in fact, make sense. 20160801 21:59:55< vultraz> but it does make sense 20160801 22:00:04< celticminstrel> BTW, for filter keys you should include both traits, not just the first. 20160801 22:00:08< celticminstrel> (Or all, rather.) 20160801 22:00:10< vultraz> yes, I do 20160801 22:00:15< celticminstrel> 'kay 20160801 22:00:28< vultraz> gonna do final cleanup and commit 20160801 22:00:45< celticminstrel> So about events, does anyone know a good way to test it? 20160801 22:00:49< vultraz> i do not 20160801 22:00:54< celticminstrel> If not, I'll just commit this and test it at some later time. 20160801 22:02:34-!- mjs-de [~mjs-de@x4db6952b.dyn.telefonica.de] has joined #wesnoth-dev 20160801 22:04:26< zookeeper> "Let a merman have it who can." <- is that grammatically ok? 20160801 22:04:57< celticminstrel> It sounds a bit weird, but I can't think of any specific grammatical issue. 20160801 22:05:11< vultraz> "Let a capable merman have it" 20160801 22:05:20< celticminstrel> I think that changes the intent a bit too much. 20160801 22:05:36 * celticminstrel is assuming this refers to taking an item, such as the storm trident. 20160801 22:05:37< iceiceice> I think you might want to avoid passive voice maybe? 20160801 22:05:45< celticminstrel> There's no passive voice there. 20160801 22:05:47< iceiceice> "give it to a merman who can wield it?" 20160801 22:06:01< celticminstrel> And avoiding passive voice is pointless anyway. It exists for a reason. 20160801 22:06:04< iceiceice> idk if its thats passive voice or not, its been a while 20160801 22:06:17< celticminstrel> "let" introduces an imperative. 20160801 22:06:31< celticminstrel> So it's not passive. 20160801 22:06:37< iceiceice> yeah i think you are right 20160801 22:06:42< celticminstrel> Incidentally, your version is still imperative, but in second person instead of third. 20160801 22:07:51< iceiceice> "give it to the merman who can wield it best" ? 20160801 22:08:09< celticminstrel> Still imperative, and I liked the previous one better. 20160801 22:08:23< iceiceice> yeah i guess i agree they are imperative now 20160801 22:08:26< celticminstrel> There's nothing wrong with imperative though. I'd argue that this should be imperative. 20160801 22:08:43< celticminstrel> If it's an option to be chosen, an imperative sentence fits very well. 20160801 22:09:13< celticminstrel> If you wanted to stick to the general form of the original, maybe "Let a merman who can weild it have it." 20160801 22:09:14< iceiceice> i dont think there's a grammar issue, its just that clearly the merman who will have it will do something with it beyond have it 20160801 22:09:34< celticminstrel> Or was it wield. It was wield wasn't it. 20160801 22:09:36< iceiceice> and presumably any merman can have it 20160801 22:09:47< celticminstrel> That's why I objected to "best". 20160801 22:09:49< iceiceice> yeah 20160801 22:10:32< vultraz> this conversation must be what it's like at a party with english majors. 20160801 22:10:40< iceiceice> lol 20160801 22:11:20-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 22:11:26< celticminstrel> Not just any English majors, probably. 20160801 22:11:49< iceiceice> my school didn't have any english majors, i guess i've never been to an english majors party 20160801 22:12:11< iceiceice> i've been to parties at an art school, but i assume that's pretty different 20160801 22:12:29< iceiceice> idk what majors would be closer though 20160801 22:13:01< iceiceice> writing is hard, i dont think anyone would mistake me for an english major :p 20160801 22:13:23< irker738> wesnoth: Charles Dang wesnoth:master 105fbe6bc667 / / (11 files in 5 dirs): Converted Recall dialog to GUI2 https://github.com/wesnoth/wesnoth/commit/105fbe6bc6677a0e9dd756bb5dbfa1e93701b4ab 20160801 22:13:28< vultraz> whoooo! 20160801 22:13:32< vultraz> only took me over a day 20160801 22:14:13< vultraz> celticminstrel: please update xcode 20160801 22:14:34< iceiceice> man reddit has so much hate for msvc 20160801 22:14:35< iceiceice> https://www.reddit.com/r/cpp/comments/4uzjab/code_generation_bug_with_new_optimizer_in_visual/ 20160801 22:14:47< celticminstrel> Depending how long this branch takes, I might let ancestral handle that this time. 20160801 22:15:27< vultraz> ok 20160801 22:15:51< vultraz> celticminstrel: so, you say I should use std::array for the order func vector instead/ 20160801 22:15:53< vultraz> ? 20160801 22:16:02< celticminstrel> Since it's fixed size. 20160801 22:16:11< celticminstrel> It makes sense to use an array instead of a vector. 20160801 22:16:22< celticminstrel> You're never going to change the size of that vector, after all. 20160801 22:16:29< vultraz> still initialized with name(2)? 20160801 22:16:47< celticminstrel> No, no initialization needed. 20160801 22:17:21< celticminstrel> (It's kind of crazy how many constructors are a list of blah() blah() blah() useless lines.) 20160801 22:17:30< celticminstrel> (With commas between of course.) 20160801 22:17:41< celticminstrel> (Those lines do exactly what would have been done if they were omitted.) 20160801 22:17:55 * celticminstrel hasn't bothered to remove any though. 20160801 22:18:01-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 22:18:20-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 22:18:24< celticminstrel> Maybe we could grep something like \t[a-zA-Z0-9_]+\(\) to find them all 20160801 22:18:26-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 22:18:27< celticminstrel> (With -E) 20160801 22:18:43< vultraz> oh, huh 20160801 22:18:43< celticminstrel> (Because I think the default might be -B which has some oddities.) 20160801 22:18:55< vultraz> arrays are initialized with their size as the second template argument? 20160801 22:18:59< celticminstrel> Yes. 20160801 22:19:11< celticminstrel> So it's impossible to ever change the size. It's statically fixed. 20160801 22:19:29-!- mjs-de [~mjs-de@x4db6952b.dyn.telefonica.de] has quit [Remote host closed the connection] 20160801 22:19:31< celticminstrel> Just like a bare C array. 20160801 22:20:29< vultraz> #JustGUI2Things 20160801 22:20:32< vultraz> typedef std::vector > > torder_list; 20160801 22:20:34< vultraz> :| 20160801 22:21:05< celticminstrel> Okay then. 20160801 22:21:40< vultraz> mordante certainly loved his nested templates 20160801 22:21:43< iceiceice> vultraz, you should proably shorten that with usings 20160801 22:21:51< celticminstrel> Oh, BTW, don't go changing typedef to using en masse. I seem to recall that MSVC 2013's using support chokes on some complicated ones. 20160801 22:22:05< vultraz> yeah, I'm not changing typedefs right now 20160801 22:22:19< iceiceice> like `using torder_pair = std::pair>;` 20160801 22:22:22< vultraz> though I should probably add one for this.. 20160801 22:22:24< celticminstrel> It's fine to use using though. 20160801 22:22:26< iceiceice> `using torder_list = std::vector` 20160801 22:22:43< celticminstrel> If it breaks MSVC 2013, someone else can fix it. 20160801 22:25:47< vultraz> iceiceice: is using = more modern? 20160801 22:25:58< iceiceice> yeah its considered easier to read in most cases 20160801 22:26:04< celticminstrel> It's new in C++11. 20160801 22:26:19< iceiceice> it only makes a difference in some cases 20160801 22:26:27< iceiceice> like, its much better for function pointer types 20160801 22:26:39< iceiceice> its not realyl different in the example i gave 20160801 22:26:43< celticminstrel> It also supports templates. 20160801 22:26:47< iceiceice> but it looks more like assignment so thats considered better 20160801 22:26:50< iceiceice> oh yeah that too 20160801 22:27:05< iceiceice> idk why typedefs cannot be templates, that doesn't make any sense 20160801 22:27:19< iceiceice> like, idk what code could possibly be broken by allowing that 20160801 22:27:20< celticminstrel> Probably because they're variable declarations according to the grammar. 20160801 22:27:34< iceiceice> ah that makes sense 20160801 22:27:35< celticminstrel> With the "typedef" storage specifier. 20160801 22:27:38-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 22:27:46< iceiceice> but C++17 has variable templates :) 20160801 22:27:51< celticminstrel> At least, I think that's how the grammar works. It certainly looks like it based on the actual syntax. 20160801 22:28:13< iceiceice> maybe typedefs can be templates too in c++20 or something 20160801 22:28:13-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 22:28:40< celticminstrel> Who knows. I wouldn't be surprised it the typedef keyword is deprecated or something, though I doubt it'll ever be removed (because of C compatibility). 20160801 22:29:12< vultraz> typedef/usings are really useful for changing types en-masse 20160801 22:29:35< celticminstrel> Yeah, that's another reason to not go arbitrarily removing them like you did a few commits back. 20160801 22:29:54< vultraz> eh 20160801 22:29:57< vultraz> those were used in like 20160801 22:29:59< vultraz> one place 20160801 22:30:01< vultraz> maybe two 20160801 22:30:09< vultraz> and all were aliases of std::string 20160801 22:33:01-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 252 seconds] 20160801 22:33:02< irker738> wesnoth: Charles Dang wesnoth:master fe1f17a55fb4 / src/gui/ (8 files in 2 dirs): Use an array for sort function storage, since it's always fixed-size https://github.com/wesnoth/wesnoth/commit/fe1f17a55fb4ca9bc17cce4de6afdf75fa7b406b 20160801 22:33:11< vultraz> Later I'll work on porting the new sort function stuff to other dialogs 20160801 22:34:08< vultraz> it will MAJORLY clean up some crap. 20160801 22:34:30< celticminstrel> Really? 20160801 22:34:55< vultraz> yes 20160801 22:35:19< vultraz> right now basically every dialog has member functions to bind to their sorting functions 20160801 22:36:02< vultraz> I wonder if I could put the whole init_sorting_option and tstr_key thing into a templated class 20160801 22:36:13< vultraz> soit works with stuff other than unit ptrs 20160801 22:36:25< vultraz> make it a utility thing 20160801 22:36:36< celticminstrel> Not sure. 20160801 22:36:39< celticminstrel> Maybe. 20160801 22:36:43< vultraz> er 20160801 22:36:45< vultraz> wait 20160801 22:36:46< vultraz> derp 20160801 22:36:51< vultraz> i don't need a templated class 20160801 22:36:56< vultraz> just template tstr_key 20160801 22:37:07< celticminstrel> Template functions, yeah. 20160801 22:37:36< vultraz> might wrap it in a namespace or something 20160801 22:38:00< celticminstrel> trait_key however is not generic. 20160801 22:38:24< vultraz> obv 20160801 22:38:31< vultraz> that will remain in tunit_recall 20160801 22:38:52< celticminstrel> I think you might actually be able to bind a member variable as if it were a member function taking no arguments and returning its value. 20160801 22:39:00-!- ancestral [~ancestral@209.181.254.220] has joined #wesnoth-dev 20160801 22:39:02< vultraz> ..wha? 20160801 22:40:17< ancestral> I have a build, just looking at replacing a couple library files 20160801 22:40:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 22:40:24< celticminstrel> ancestral: Yay. 20160801 22:40:32< ancestral> Literally building cairo right now 20160801 22:40:34< celticminstrel> BTW, the Windows build is already up, right? 20160801 22:40:51< ancestral> How about the SteamOS build? :-P 20160801 22:41:01< vultraz> yes the win one is up 20160801 22:41:05< celticminstrel> So at this point, if I'm not mistaken, the announcement can happen as soon as the OSX build is available. 20160801 22:41:06< vultraz> ancestral: :P 20160801 22:41:09< vultraz> yup 20160801 22:41:17< iceiceice> celticminstrel, yeah i think thats a thing 20160801 22:41:19< ancestral> May become a reality soon 20160801 22:41:21< celticminstrel> I don't think we need to promote SteamOS to a primary platform at this time. 20160801 22:41:48< ancestral> Yeah, I want to see about updating the brew tap for Wesnoth at some point 20160801 22:42:06< ancestral> celticminstrel: Probably not, but someone should at least be trying, since we will want to eventually 20160801 22:42:37< ancestral> (Probably no rush) 20160801 22:44:33-!- atarocch [~atarocch@ipbcc2d6b3.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection] 20160801 22:46:46-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 22:49:56< iceiceice> damn this is a lot harder than i thought 20160801 22:50:01< Aginor> steamos should Just Work(tm) 20160801 22:50:29< celticminstrel> I wouldn't be surprised if SteamOS actually uses WINE. 20160801 22:50:42< celticminstrel> In which case little or no extra effort would be needed. 20160801 22:50:56-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 22:54:49< celticminstrel> I think add_modification may be broken when passed no_add in conjunction with an [effect]apply_to=new_ability. 20160801 22:55:52< celticminstrel> (And that's before my changes, which as they currently stand break it even more. Trying to figure out what to do about this.) 20160801 22:56:03-!- ancestral [~ancestral@209.181.254.220] has quit [Quit: i go nstuf kthxbai] 20160801 22:56:40< gfgtdf> celticminstrel: broken how ? 20160801 22:57:18< celticminstrel> Well, if no_add is true, the effect is to add a [unit][abilities] tag that contains the added abilities. 20160801 22:58:03< celticminstrel> But that means that, when the unit is rebuild (eg when it advances, or in the next scenario), it will lose any abilities it had prior to the modification, because the presence of [unit][abilities] causes unit_type abilities to be ignored. 20160801 22:58:20< celticminstrel> This is derived from code reading, so I haven't actually confirmed it. 20160801 22:59:45< celticminstrel> It's entirely possible that I'm missing something. 20160801 23:04:52-!- celmin [~celticmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20160801 23:06:30< celmin> Okay, so currently abilities may be defined either by [unit_type][abilities] or by [unit][abilities]. 20160801 23:07:10-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 250 seconds] 20160801 23:08:00< celmin> And indirectly by modifications, which would be [modifications][trait|advancement|object][effect]apply_to=new_ability [abilities] 20160801 23:08:46< celmin> I say indirectly because modifications effectively copy the new abilities into [unit][abilities]. 20160801 23:10:15< shadowm> celticminstrel: Steam games marked as having SteamOS compatibility tend to work on Debian as well and the ones I own clearly do not use WINE. 20160801 23:10:28-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20160801 23:10:29-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Read error: Connection reset by peer] 20160801 23:10:47< shadowm> For each of them the SteamOS build is the one used on Linux in general. 20160801 23:11:01< celmin> shadowm: It just seems weird that their Steam platform would exclude a large number of their games. 20160801 23:11:07< celmin> Many of the games are Windows-only. 20160801 23:11:15< shadowm> So no, SteamOS most certainly doesn't "use" Wine by preference. 20160801 23:11:19< celmin> And new submissions are only required to support Windows. 20160801 23:11:33-!- Bonobo [~Bonobo@ppp118-210-92-241.lns20.adl2.internode.on.net] has joined #wesnoth-dev 20160801 23:11:34< shadowm> I don't know if it includes Wine either. It probably does. But games can actually include Wine themselves if they want AFAIK. 20160801 23:11:40< shadowm> It's just not a requirement. 20160801 23:12:41< shadowm> Games that don't work on Linux in some way aren't advertised as having SteamOS compatibility, so the Steam client would probably refuse to download them on SteamOS just like it does on general Linux platforms. 20160801 23:12:53< shadowm> (It does that, by the way.) 20160801 23:14:58< shadowm> Also, it's Wine these days, not WINE. You got me doing it for a second there. 20160801 23:15:08< celmin> Shrug. 20160801 23:17:06< celmin> So modifications copy the abilities into [unit][abilities], and if no_add is false then they're also stored in [unit][modifications]. 20160801 23:18:15< shadowm> Anyway, the latest version of SteamOS is for most intents and purposes a fork of Debian jessie. If Wesnoth can be built on Debian jessie, then it should be buildable on SteamOS as well. 20160801 23:18:44< shadowm> If Wesnoth can be built on Debian jessie then I'd expect the resulting binaries to run on SteamOS without any modifications as well. 20160801 23:18:56< shadowm> If Wesnoth can't be built on Debian jessie then we'd have aa problem. 20160801 23:19:29< shadowm> (And not just for SteamOS.) 20160801 23:19:36< celmin> Obviously. 20160801 23:19:47< celmin> Jessie is Debian stable, right? 20160801 23:19:55< shadowm> Currently, yes. 20160801 23:21:11< celmin> I notice that the unit class does not store a config like many other classes do. 20160801 23:21:30< iceiceice> probably because its much faster not to 20160801 23:21:38< celmin> Well, I guess. 20160801 23:22:17< celmin> unit_type still stores one though, and unit_race if I recall. 20160801 23:22:38< iceiceice> yeah but those are not manipulated that often 20160801 23:22:49< iceiceice> until recently units were copied almost constantly by the engine 20160801 23:22:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 23:22:53< celmin> Well, a few unit things defer to them, but you might be right. 20160801 23:23:35< celmin> In particular, I think unit_type and unit_race can be treated as const once they're loaded from the config. 20160801 23:23:40< vultraz> hmm hmm 20160801 23:23:44< celmin> (And for unit_type, once they're fully built.) 20160801 23:23:49< vultraz> how to generalize this.. 20160801 23:24:16< celmin> Hmm, maybe I'll just have to copy all the abilities into the unit instead of storing references... 20160801 23:24:30< celmin> Storing references in the unit_type is fine, at least. 20160801 23:25:39< celmin> There's only two places they can refer to - a tag in [units][unit_type][abilities], or a tag in a [units][ability]. (The latter is what I'm working on.) 20160801 23:26:18< celmin> In a unit they could additionally refer to a tag in [unit][abilities] or even one nested within [unit][modifications] (but the latter doesn't really work out due to the possibility of no_add). 20160801 23:26:41< vultraz> ok, I think it always needs to take a vector 20160801 23:27:15< vultraz> hm 20160801 23:27:21< vultraz> actually, nah 20160801 23:27:26< vultraz> I'll just template the whole thing 20160801 23:29:20< vultraz> ehh. hm 20160801 23:30:02< vultraz> blah, I;ll do this later 20160801 23:30:45< vultraz> need to figure out how to generalize it 20160801 23:31:43-!- travis-ci [~travis-ci@ec2-54-144-33-251.compute-1.amazonaws.com] has joined #wesnoth-dev 20160801 23:31:44< travis-ci> wesnoth/wesnoth#10051 (master - 105fbe6 : Charles Dang): The build was broken. 20160801 23:31:44< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/149029451 20160801 23:31:44-!- travis-ci [~travis-ci@ec2-54-144-33-251.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160801 23:32:01< vultraz> :| 20160801 23:32:04< celmin> The problem is that, in these additional cases, I don't think I can guarantee that the referents do not move. 20160801 23:32:06< vultraz> probably one of those gui2 tests 20160801 23:32:19< celmin> Yeah, you probably forgot to add the dialog to the tests. 20160801 23:32:53< vultraz> I never properly add them 20160801 23:32:58< vultraz> usually just ignore new ones 20160801 23:33:08< celmin> Don't do that... 20160801 23:35:14-!- Duthlet [~Duthlet@dslb-178-005-055-087.178.005.pools.vodafone-ip.de] has quit [Quit: leaving] 20160801 23:36:23-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 23:36:56< irker738> wesnoth: Charles Dang wesnoth:master 7cdffec99949 / src/tests/gui/test_gui2.cpp: Exclude recall dialog from tests https://github.com/wesnoth/wesnoth/commit/7cdffec99949e41f56ebb126d32dfef9b1160fc1 20160801 23:37:20< celmin> I suppose this particular case might be difficult, since you need a unit. 20160801 23:37:22< vultraz> too lazy to figure out constructing a dummy list of recall units 20160801 23:37:34< vultraz> since it needs unit ptrs.. 20160801 23:37:54< vultraz> which I don't think the tests have access to... 20160801 23:38:08< celmin> Well, you could always construct a unit_ptr on the spot. 20160801 23:38:21< celmin> The greater difficulty is how you get a unit_type. 20160801 23:39:00< celmin> Though even then, constructing a unit requires access to the gameboard... 20160801 23:39:14< celmin> Oh wait, not if you pass false as the real_unit param. 20160801 23:39:26< vultraz> that means it's a fake unit 20160801 23:39:32< vultraz> doesn't that use fake_unit_ptr 20160801 23:39:38< vultraz> or is a fake unit different from a fake real unit 20160801 23:39:40< vultraz> :| 20160801 23:40:05< celmin> Wait no, that's not true after all, you still need it if you pass false. 20160801 23:40:18< celmin> I don't really know, I'm just looking at one of the unit constructors. 20160801 23:40:35< vultraz> the unit class really needs to be simplified 20160801 23:40:40< celmin> How? 20160801 23:40:57< vultraz> not sure 20160801 23:41:09< vultraz> but it feels like there's a lot of stuff that crosses over with types 20160801 23:41:34< celmin> I kinda see your point. 20160801 23:42:02< celmin> But the unit generally does need to be able to override anything from its parent type. 20160801 23:42:16< vultraz> like, why can't a unit be an instance of a type. 20160801 23:42:44< celmin> Logically it is. 20160801 23:43:33< celmin> If you were using a prototype-based language, you'd have all the unit types inherit from the base unit_type prototype, and then each unit would inherit from its corresponding unit type. 20160801 23:44:02< celmin> But C++ is class-based, so that approach is… difficult at best. I don't know how you can do it in C++, actually. 20160801 23:44:07< celmin> Though I'm sure it's possible, somehow. 20160801 23:47:22< vultraz> looks like the Unit List dialog is the last major in-game GUI1 dialog 20160801 23:47:30-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 23:47:38< celmin> Leader list and stats and such are not major? 20160801 23:47:50< celmin> I guess you're not considering help to be in-game. 20160801 23:47:55< vultraz> oh, hm 20160801 23:47:56< vultraz> yeah that 20160801 23:47:58< celmin> Though it can be accessed anywhere of course. 20160801 23:48:00< vultraz> and no, I am not 20160801 23:48:12< vultraz> Help will be absolute bloody hell to convert 20160801 23:48:30-!- Bonobo [~Bonobo@ppp118-210-92-241.lns20.adl2.internode.on.net] has quit [Quit: Leaving] 20160801 23:48:33< vultraz> and I'm not exaggerating 20160801 23:48:41< celmin> Pango markup presumably doesn't support tables, right? 20160801 23:48:49< vultraz> honestly, I wish we had anura's xhtml/css parser to use for the page layout 20160801 23:48:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160801 23:49:12< iceiceice> lol 20160801 23:49:23< celmin> Pretty sure it's just . 20160801 23:49:25-!- travis-ci [~travis-ci@ec2-54-144-33-251.compute-1.amazonaws.com] has joined #wesnoth-dev 20160801 23:49:26< travis-ci> wesnoth/wesnoth#10052 (master - fe1f17a : Charles Dang): The build was broken. 20160801 23:49:26< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/149034902 20160801 23:49:26-!- travis-ci [~travis-ci@ec2-54-144-33-251.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160801 23:49:31< vultraz> GUI2's grid system just... doesn't really work for page layout. It works for UI windows, but not for laying out stuff like help text 20160801 23:49:35< vultraz> iceiceice: why lol? 20160801 23:49:36< celmin> Pango markup is pretty dumb, all things considered. 20160801 23:49:41< iceiceice> cause its buggy as hell 20160801 23:49:44< iceiceice> and not maintainable 20160801 23:50:11< vultraz> well, then give us an iceiceice (tm) css parser plugin :P 20160801 23:50:18< celmin> Not CSS. 20160801 23:50:19< iceiceice> no, use an existing gui library 20160801 23:50:23< iceiceice> like a sane person :p 20160801 23:50:31< iceiceice> something that renders to opengl 20160801 23:50:33< iceiceice> and is game oriented 20160801 23:50:37< celmin> iceiceice: Recommend a few. 20160801 23:50:42< iceiceice> cegui 20160801 23:50:46< celmin> iceiceice: BTW, OpenGL is a problem. 20160801 23:50:47< vultraz> that won't happen any time soon 20160801 23:50:49< vultraz> just saying 20160801 23:50:53< iceiceice> works great in my engine :D 20160801 23:50:59< celmin> Because the game's still using software rendering. 20160801 23:51:03< iceiceice> took me about a month to make a working gui 20160801 23:51:21< vultraz> yeah, we still use software rendering 20160801 23:51:26< iceiceice> celmin, thats true, 20160801 23:51:34< vultraz> I wonder if we could switch to SDL's built-in HW acceleration without adding OGL yet 20160801 23:51:41< vultraz> Aginor might know 20160801 23:51:44< iceiceice> idk what to tell you 20160801 23:51:55< vultraz> that might be unnecessary work, or it could be a more manageable goal. 20160801 23:51:56< iceiceice> its a chicken egg problem, you can't change to opengl until oyu have a gui that works in opengl 20160801 23:51:58< celmin> CEGUI has its own configuration format, which is kind of annoying. 20160801 23:52:10< Aginor> I've played with it but it's not working very well 20160801 23:52:10< iceiceice> and you cant change the gui until you fix the graphics 20160801 23:52:28< Aginor> and we can't change the graphics because of the gui :D 20160801 23:52:38< Aginor> catch22 much 20160801 23:52:47< iceiceice> i think the best way is to just start a new branch, start fresh, 20160801 23:52:52< celmin> You can change to hardware rendering using SDL instead of directly accessing OpenGL. 20160801 23:53:01< iceiceice> and try to fix whatever incompatbilities happen after the fact 20160801 23:53:04< vultraz> celmin: that's what I meant 20160801 23:53:10< iceiceice> because the software pipeline isn't written for opengl and needs to be redone anyways 20160801 23:53:11< vultraz> iceiceice: that's what the Wesnoth 2 project is about basically 20160801 23:53:12< celmin> I presume that uses either OpenGL or DirectX internally. 20160801 23:53:19< iceiceice> vultraz, no, thats what my project is about basically :p 20160801 23:53:20< vultraz> celmin: ogl internally 20160801 23:53:31< iceiceice> wesnoth 2 is about, take anura, and pound wesnoth into it 20160801 23:53:35< vultraz> iceiceice: except your project seems to keep getting sidetracked writing nice modules :P 20160801 23:53:47< iceiceice> well i work on whats fun :) 20160801 23:53:50< iceiceice> its just a hobby 20160801 23:53:52< vultraz> anura has a lot of good stuff 20160801 23:54:03< iceiceice> i dont think anura was made to make games like wensoth at all 20160801 23:54:08< iceiceice> it was really made for frogatto 20160801 23:54:12< vultraz> and wesnoth 2 is a different game anyway 20160801 23:54:12< iceiceice> and thats what it is optimized for 20160801 23:54:16 * vultraz shrugs 20160801 23:54:28< iceiceice> there's no way it will scale to wesnoth, at least for the vision that i have 20160801 23:54:35< vultraz> who knows 20160801 23:54:38< iceiceice> i do :p 20160801 23:55:00< vultraz> I've decided to work on phasing out GUI1 as much as possible, at least 20160801 23:55:08< iceiceice> some parts of anura are legitimately an advance but 20160801 23:55:09< vultraz> because all this stuff 20160801 23:55:11< vultraz> ogl and whatnot 20160801 23:55:14< vultraz> won't be here for years 20160801 23:55:14< iceiceice> some are just the same as wesnoth 20160801 23:55:30 * vultraz shrugs 20160801 23:55:45-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160801 23:56:10< iceiceice> wesnoth 2 is about dave and jetrel making their own version of the game, where the art is their corporate property, and marketing that as like a tiny indie game dev studio project 20160801 23:56:29< vultraz> it's a different game and so far jetrel has done nothing 20160801 23:56:30< iceiceice> if what you care about is the original wensoth game play 20160801 23:56:31< vultraz> just saying 20160801 23:56:58< vultraz> iceiceice: well they say a straight clone of wesnoth will be able to be made 20160801 23:57:03< vultraz> but idk if it's even worth it 20160801 23:57:03< iceiceice> i dont think there are compelling reasons to use anura if your goal is to make a next generation version of the game we currently have 20160801 23:57:11< vultraz> i mean 20160801 23:57:18< vultraz> we make the next game in the franchise 20160801 23:57:32< vultraz> and then is it really worth it to update the first game to a new engine 20160801 23:57:41< vultraz> which would make all umc obsolete 20160801 23:57:51< celmin> Calling Wesnoth a franchise is kind of a stretch. 20160801 23:57:52< vultraz> better to keep working on w1 on its own 20160801 23:58:00< vultraz> celmin: i think the idea is to make it such 20160801 23:58:10< iceiceice> celmin, "Battle for Wesnoth" is now a trademark of Wesnoth Inc. 20160801 23:58:13< vultraz> make w2 a new game with new gameplay and new story 20160801 23:58:19< iceiceice> as of like this year 20160801 23:58:23< vultraz> yes 20160801 23:58:25-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160801 23:58:59< vultraz> like honestly there;s a lot of stuff i wish were different 20160801 23:59:08< vultraz> in the way things are or are managed 20160801 23:59:13< vultraz> but they're not 20160801 23:59:18< vultraz> so what can we do 20160801 23:59:23< vultraz> shrug shrug 20160801 23:59:26< celmin> Lots of things. 20160801 23:59:35< iceiceice> we can do whatever we want :D 20160801 23:59:52< vultraz> i wish there were a game studio encompassing anura, wesnoth, wesnoth: genesis, frogatto, and argentum age, --- Log closed Tue Aug 02 00:00:09 2016