--- Log opened Mon Apr 03 00:00:57 2017 20170403 00:04:13< vultraz_iOS> or introducing the evil Intrusive Ptr? 20170403 00:04:35< celticminstrel> intrusive_ptr is not evil, and it would absolutely be less complex than what you described. 20170403 00:05:12< vultraz_iOS> it's evil because I'm too lazy to ensure i do the refcounting right 20170403 00:05:31< celticminstrel> Well first, define "right". 20170403 00:05:48< vultraz_iOS> correctly 20170403 00:05:57< celticminstrel> ... 20170403 00:06:15< celticminstrel> I mean, what pitfalls are you aiming to avoid. 20170403 00:06:38< vultraz_iOS> forgetting to increase a refcount when necessary and accidentally destroying it early 20170403 00:06:49-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has quit [Remote host closed the connection] 20170403 00:08:59< vultraz_iOS> and really, I don't see my idea as complex 20170403 00:09:07< vultraz_iOS> it would be a very small class 20170403 00:11:20-!- ToBeFree [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20170403 00:12:27< vultraz_iOS> celticminstrel: https://pastebin.com/2vJWYsnV 20170403 00:13:04< vultraz_iOS> that's it, really 20170403 00:14:21< vultraz_iOS> (not tested, of course) 20170403 00:15:02< vultraz_iOS> then in formula_callable, we have: std::shared_ptr value_; 20170403 00:19:09-!- Jetrel [~Jetrel@2001:558:6014:1e:2422:435:dd84:bbf3] has quit [Quit: "The highest possible stage in moral culture is when we recognize that we ought to control our thoughts." - Charles Darwin] 20170403 00:19:36< vultraz_iOS> celticminstrel: in fact, this should allow us to entirely remove the has_self_ condition 20170403 00:19:42< vultraz_iOS> or, maybe not 20170403 00:19:45< vultraz_iOS> but it could be 20170403 00:20:47< vultraz_iOS> celticminstrel: the only pitfall I'm unsure of is in cases where new callables are created for the variants 20170403 00:20:58< vultraz_iOS> ie, variant(new blablabla 20170403 00:21:27< vultraz_iOS> will we do variant(std::make_shared()->get_value_ptr())? 20170403 00:21:42< vultraz_iOS> ie, create a shared_ptr and then get another shared_ptr for its value? 20170403 00:21:50< vultraz_iOS> that seems iffy 20170403 00:21:56< vultraz_iOS> since the object doesn't live anywhere 20170403 00:22:32< vultraz_iOS> an alternative would be overloading the variant_callable ctor 20170403 00:23:00< vultraz_iOS> and allowing it to own a callable object OR a shared_ptr to a value of one 20170403 00:23:41< vultraz_iOS> le thoughts? 20170403 00:27:15< vultraz_iOS> having variant_callable own unique callable objects might also fix some leaks 20170403 00:30:59< celticminstrel> Sorry, had to disappear again for supper. 20170403 00:31:01-!- Jetrel [~Jetrel@2001:558:6014:1e:2422:435:dd84:bbf3] has joined #wesnoth-dev 20170403 00:31:15< celticminstrel> Forgetting to increase a refcount shouldn't be an issue, honestly. 20170403 00:32:17< celticminstrel> The only reason why you'd want to manually increase or decrease a refcount would be if you allocate one on the stack, so... just don't do that. 20170403 00:32:33-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170403 00:33:04< celticminstrel> The presence of boost::any in your proposed class makes me highly suspicious. 20170403 00:33:10< vultraz_iOS> why? 20170403 00:33:17< vultraz_iOS> you have yet to explain why you dislike any 20170403 00:33:23< celticminstrel> I don't dislike any. 20170403 00:33:31< celticminstrel> I just don't think it makes any sense to use it here. 20170403 00:33:45< celticminstrel> Because the point here is not to have an opaque value of arbitrary type. 20170403 00:33:57< celticminstrel> You may recall that I did suggest using any for the iterator. 20170403 00:34:33< vultraz_iOS> what's wrong with an opaque(? what this) value of arbitrary type 20170403 00:34:49< celticminstrel> Nothing's wrong with it. 20170403 00:34:56< celticminstrel> It just doesn't fit this situation in my opinion. 20170403 00:35:16< celticminstrel> Because this situation is specifically about how to represent a member of a particular class hierarchy. 20170403 00:35:31< celticminstrel> We know the value has to be some variety of formula_callable. 20170403 00:35:36< celticminstrel> So why are we using "any"? 20170403 00:36:01< vultraz_iOS> ok 20170403 00:36:21< vultraz_iOS> I see your point 20170403 00:36:31< vultraz_iOS> what about doing away with the value and only keeping a pointer to the parent 20170403 00:36:34< celticminstrel> [Apr 02@8:21:28pm] vultraz_iOS: will we do variant(std::make_shared()->get_value_ptr())? 20170403 00:36:35< celticminstrel> Either get_value_ptr() returns shared_from_this() which renders the call pointless, or the pointer is destroyed by the time the variant is constructed. 20170403 00:36:52< celticminstrel> Unless of course get_value_ptr() creates a new shared_ptr and stores it somewhere. 20170403 00:37:05< celticminstrel> I don't understand what the "parent" is. 20170403 00:37:19< vultraz_iOS> the parent is a formula_callable 20170403 00:37:21< celticminstrel> And anyway, if the goal is to not store raw pointers to formula_callable, that's already violating it. 20170403 00:37:25< vultraz_iOS> or derivative 20170403 00:37:58< celticminstrel> I'm almost convinced at this point that intrusive_ptr is the best solution. 20170403 00:38:08-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has joined #wesnoth-dev 20170403 00:38:10< celticminstrel> Plus never allocating a formula_callable on the stack. 20170403 00:38:28< vultraz_iOS> but we do that everywhere 20170403 00:38:51< celticminstrel> Do we? 20170403 00:39:12< celticminstrel> I guess it wouldn't surprise me though. 20170403 00:39:13-!- RatArmy [~ratarmy@om126204192020.6.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 00:39:27< vultraz_iOS> yes, we use variant(new some_callable_class()) all the time 20170403 00:39:31< celticminstrel> Actually, come to think of it, there's one right in the new safe_call implementation. 20170403 00:39:37< celticminstrel> Well, that's not allocating one on the stack. 20170403 00:39:47< vultraz_iOS> what is it? 20170403 00:39:55< celticminstrel> Allocating one on the stack would be something like "game_logic::map_formula_callable thing;" 20170403 00:40:12< vultraz_iOS> i see 20170403 00:40:29< celticminstrel> It's possible to force that to not happen, but the way of doing so is rather annoying. 20170403 00:40:39< celticminstrel> And doesn't work well in conjunction with a class hierarchy. 20170403 00:40:48< celticminstrel> (Since each subclass would need to enforce it separately.) 20170403 00:41:36< celticminstrel> It's also possible to manually search for all instances of formula_callables allocated on the stack and make them use new instead. 20170403 00:41:37-!- RatArmy [~ratarmy@om126204192020.6.openmobile.ne.jp] has joined #wesnoth-dev 20170403 00:41:46< vultraz_iOS> ok, fine, if intrusive_ptr is better than how do we use that 20170403 00:41:58< vultraz_iOS> I'm not just going to revert the removal commit, ftr. 20170403 00:41:59< celticminstrel> Though TBH there can be good reasons not to use new all the time... 20170403 00:42:07< celticminstrel> Definitely not. 20170403 00:42:13< vultraz_iOS> if we use it we'll need to reimplement its usage 20170403 00:42:14< celticminstrel> For starters, it'd cause a ton of conflicts. 20170403 00:42:21< celticminstrel> (Reverting the commit I mean) 20170403 00:42:53< vultraz_iOS> obv 20170403 00:43:30< celticminstrel> One other thing I'd considered was allocating formula_callables in an expandable "pool", but that's pretty complicated, so my argument against your separate value class also applies to that. 20170403 00:44:39< celticminstrel> Hmm. 20170403 00:45:53< celticminstrel> I can't say I'm fully happy with the idea of redeploying intrusive_ptr for the formula_callables, but at the moment I can't think of anything that's better while also not being overly complicated. 20170403 00:46:24< celticminstrel> It's probably safe to allocate formula_callables on the stack in one situation though. 20170403 00:46:45< celticminstrel> When it's being created solely to evaluate a formula on it. 20170403 00:47:55< celticminstrel> But not if you then execute the result of that formula, since that execution could result in the callable being assigned as a value of another callable. 20170403 00:48:21< celticminstrel> Hmm, formula_ai might be a little problematic too... 20170403 00:49:31-!- gfgtdf [~chatzilla@x4e368cad.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.93 [Firefox 52.0.2/20170323105023]] 20170403 00:49:44< vultraz_iOS> I think we need to rethink the design of formula_callable 20170403 00:49:53< vultraz_iOS> it definitely seems like we're running into problems 20170403 00:50:02< vultraz_iOS> beyond just the memory leakage 20170403 00:50:06< celticminstrel> I'm not sure how the formula_ai is allocated, and if it's allocated on the heap but as a member of another class, that's going to cause problems. 20170403 00:50:09< celticminstrel> In fact... 20170403 00:50:21< celticminstrel> That'll cause problems in canvas too, right? 20170403 00:50:56< celticminstrel> Okay, thinking about it, intrusive_ptr everywhere is impossible after all. 20170403 00:51:09< vultraz_iOS> first off, what function exactly does formula callable serve that is different from formula_function o whatever 20170403 00:51:17< celticminstrel> It's impossible to use intrusive_ptr for the formula_ai class, because it's stored as something like a pointer to ai_context. 20170403 00:51:34< celticminstrel> formula_callable isn't a function, it's an object, 20170403 00:52:27< celticminstrel> I think perhaps we need to actually implement multiple ways of storing a formula_callable in a variant. 20170403 00:52:41< vultraz_iOS> ok, so formula_callable are the objects the functions return? 20170403 00:52:47< celticminstrel> They can be, yes. 20170403 00:53:06< vultraz_iOS> ok, so they're the data 20170403 00:53:20< celticminstrel> To use a Lua analogy, they're the userdata type. 20170403 00:53:41< celticminstrel> variant is the data. 20170403 00:54:36< vultraz_iOS> the data of the objects? 20170403 00:54:48< celticminstrel> variant represents WFL data. 20170403 00:54:59< celticminstrel> callables are a subset of that, analogous to Lua userdata. 20170403 01:02:17-!- RatArmy [~ratarmy@om126204192020.6.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 01:13:22-!- RatArmy [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 01:17:00< celticminstrel> So what I'm thinking is that maybe there should be two ways of storing the callable - a strong callable using an intrusive_ptr (or possibly shared_ptr), and a weak callable which somehow assumes its value might unexpectedly disappear. 20170403 01:17:53< celticminstrel> Not sure exactly how to do the latter, though. 20170403 01:18:03< celticminstrel> weak_ptr is the obvious choice, but I don't think that'll work. 20170403 01:28:48-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 01:28:49< travis-ci> wesnoth/wesnoth#13132 (wfl_action_callable - ba9822a : Celtic Minstrel): The build has errored. 20170403 01:28:49< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/217901286 20170403 01:28:49-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 01:40:18-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 01:40:21-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has quit [Remote host closed the connection] 20170403 01:51:32-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has joined #wesnoth-dev 20170403 02:03:00-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 260 seconds] 20170403 02:04:38-!- midzer [~quassel@p5B0511DF.dip0.t-ipconnect.de] has quit [Ping timeout: 256 seconds] 20170403 02:05:00-!- midzer [~quassel@p5B31229C.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170403 02:07:01-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 02:09:56-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 02:11:46-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 02:14:21< celticminstrel> So... maybe have variant(formula_callable&) which doesn't assume ownership, and variant(ptr) which does, where ptr may be shared_ptr or intrusive_ptr... 20170403 02:14:46< celticminstrel> And the "return variant(this)" then becomes "return variant(*this)". 20170403 02:16:18-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 02:17:03-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 02:18:24-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has quit [Remote host closed the connection] 20170403 02:26:30-!- irker691 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20170403 02:35:49-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 02:35:50< travis-ci> wesnoth/wesnoth#13134 (wfl_action_callable - 547ee7b : Celtic Minstrel): The build passed. 20170403 02:35:50< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/217901524 20170403 02:35:50-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 02:44:31< celticminstrel> Yay! 20170403 02:44:46< celticminstrel> Does need to be rebased a little though. 20170403 02:46:39-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 02:46:51-!- midzer [~quassel@p5B31229C.dip0.t-ipconnect.de] has quit [Ping timeout: 258 seconds] 20170403 02:48:02-!- RatArmy_ [~ratarmy@om126161120012.8.openmobile.ne.jp] has joined #wesnoth-dev 20170403 02:48:07-!- midzer [~quassel@p5B31206F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170403 02:48:22-!- RatArmy [~ratarmy@133.15.175.65] has quit [Read error: Connection reset by peer] 20170403 02:48:23-!- RatArmy_ [~ratarmy@om126161120012.8.openmobile.ne.jp] has quit [Remote host closed the connection] 20170403 02:48:36-!- RatArmy_ [~ratarmy@om126161120012.8.openmobile.ne.jp] has joined #wesnoth-dev 20170403 02:50:58-!- RatArmy_ [~ratarmy@om126161120012.8.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 02:52:32-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 02:52:32-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 03:24:27-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170403 03:27:27-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 240 seconds] 20170403 03:33:13-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170403 03:34:00-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has joined #wesnoth-dev 20170403 03:34:02-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has quit [Remote host closed the connection] 20170403 03:34:11-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170403 03:36:06< celticminstrel> I wonder if there's any way to detect whether a pointer to stack memory is still valid... 20170403 03:37:40< celticminstrel> If there was some built-in notification mechanism in formula_callable... 20170403 03:38:59-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170403 03:39:55< celticminstrel> So basically a variant_callable could "subscribe" to be notified by the formula_callable destructor... 20170403 03:40:08< celticminstrel> Does anyone think this design could work? 20170403 03:40:40< celticminstrel> Along with what I said earlier about a flag indicating whether the variant_callable owns its callable... 20170403 03:41:26-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 03:47:45-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170403 03:49:43-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has joined #wesnoth-dev 20170403 03:50:26-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Read error: Connection reset by peer] 20170403 03:51:17-!- RatArmy_ [~ratarmy@om126161120012.8.openmobile.ne.jp] has joined #wesnoth-dev 20170403 03:53:05-!- Kwandulin [~Kwandulin@p200300760F3E7D206D9CB59AC2A1B7BB.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170403 03:53:05-!- RatArmy_ [~ratarmy@om126161120012.8.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 03:53:29-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 03:58:24< vultraz_iOS> celticminstrel: should I merge 966? 20170403 03:58:42-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has joined #wesnoth-dev 20170403 03:59:51-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:68a6:da81:bf55:d6d7] has quit [Remote host closed the connection] 20170403 04:01:53< celticminstrel> vultraz_iOS: No, I need to a) rebase and b) do a quick test. 20170403 04:02:17< celticminstrel> After my next push, you can merge (no need to wait for Travis); 20170403 04:02:19< vultraz_iOS> you forget the Squash and Merge command 20170403 04:02:36< celticminstrel> My intention is to squash it into two commits, not one. 20170403 04:02:40< vultraz_iOS> ahh 20170403 04:02:41< vultraz_iOS> ok 20170403 04:03:24-!- iwaim__ [~iwaim@rasteenie.alib.jp] has quit [Ping timeout: 260 seconds] 20170403 04:10:24-!- iwaim__ [~iwaim@rasteenie.alib.jp] has joined #wesnoth-dev 20170403 04:19:05-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 268 seconds] 20170403 04:28:43< celticminstrel> So -tformula mostly works, but there's a problem with shortest_path() in the patrol formula. 20170403 04:28:54< celticminstrel> Which is more likely caused by your work than mine though... 20170403 04:29:02< celticminstrel> Also, your variant::operator< is invalid. 20170403 04:31:26< celticminstrel> And I can't step through it with the formula debugger, because that crashes complaining about dereferencing an invalid deque iterator. 20170403 04:31:31< vultraz_iOS> mer? 20170403 04:32:12< celticminstrel> Oh wait, that looks like an obvious error. 20170403 04:32:20< celticminstrel> I don't know what "mer" means so I'll just ignore it. 20170403 04:33:36< vultraz_iOS> distressed questioning sound 20170403 04:36:51< celticminstrel> Oooookay, the formula debugger is doing totally unsafe things that mandate it to use std::list instead of std::deque. 20170403 04:37:12< vultraz_iOS> is this a bug in the debugger? 20170403 04:37:37< celticminstrel> Although wait... it is a deque, so adding to the end shouldn't invalidate iterators? 20170403 04:37:38-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 04:37:46< celticminstrel> Hmm... let me see if that's correct... 20170403 04:38:35< celticminstrel> Ah, so it does invalidate iterators. 20170403 04:39:45< celticminstrel> Using list seems silly, but it's the simplest way to fix this. 20170403 04:46:28-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 04:47:54< celticminstrel> Wow, that actually went smoothly. Doesn't seem like it relied on random-access anywhere. 20170403 04:48:15< celticminstrel> BTW, there seems to be a lot of invalid UTF-8 in the variant/formula stuff, somehow. Not sure why. 20170403 04:48:28< celticminstrel> Pango is complaining incessantly at me as I attempt to step through in the debugger. 20170403 04:48:59< vultraz_iOS> damn pango 20170403 04:49:04< vultraz_iOS> it's a PITA sometimes 20170403 04:49:10< vultraz_iOS> recommend we adopt markdown immediately 20170403 04:49:19< celticminstrel> No, pretty sure it's not Pango's fault. 20170403 04:49:28< celticminstrel> It's just Pango that's noticing it. 20170403 04:49:51< celticminstrel> And BTW, Pango isn't a markup engine. It's a layout engine. 20170403 04:50:00< celticminstrel> You can't just "replace it with markdown". 20170403 04:50:40-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 258 seconds] 20170403 04:50:59-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 04:51:36-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 04:51:42< vultraz_iOS> anura works perfectly fine with cairo alone 20170403 04:53:40-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 04:58:07< vultraz_iOS> (point being it's possible to not use pango) 20170403 04:58:36< celticminstrel> Sure it's possible to not use pango, but you can't "replace pango with markdown". They do different things. 20170403 04:58:56< celticminstrel> It would be like replacing the kitchen sink with a fridge. 20170403 04:59:43< vultraz_iOS> hah! 20170403 05:00:58< celticminstrel> Bah, now I'm getting a weird "incompatible iterators" error in to_debug_string when it calls find(), which makes no sense whatsoever. 20170403 05:03:27-!- irker320 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170403 05:03:27< irker320> wesnoth: Celtic Minstrel wesnoth:wfl_action_callable 06de10fba217 / src/ (11 files in 3 dirs): Generalizing the FAI concept of action objects https://github.com/wesnoth/wesnoth/commit/06de10fba217cc539ba90a708d93a55e1e507355 20170403 05:03:27< irker320> wesnoth: Celtic Minstrel wesnoth:wfl_action_callable 9ec2403a4605 / src/ (4 files in 2 dirs): Implement WFL function symbol table inheritance https://github.com/wesnoth/wesnoth/commit/9ec2403a460578fe8b9608a82bb7e392373da54b 20170403 05:03:28< irker320> wesnoth: Celtic Minstrel wesnoth:wfl_action_callable 5767ca4dc736 / src/formula/ (debugger.cpp debugger.hpp): Fix bug in formula debugger https://github.com/wesnoth/wesnoth/commit/5767ca4dc73689f79e4bae73d28d5943eccf797d 20170403 05:04:36-!- JyrkiVesterinen [~jyrki@87-100-152-225.bb.dnainternet.fi] has joined #wesnoth-dev 20170403 05:05:56< vultraz_iOS> merge now? 20170403 05:06:21< celticminstrel> Sure. FormulaAI still basically works, and what errors there are seem to be your fault, not mine. 20170403 05:06:51< celticminstrel> Perhaps in a couple of days we can also get mattsc to do some more in-depth testing to make sure all the FormulaAI stuff is still working as intended. 20170403 05:07:06< celticminstrel> (ie, after some of the aforementioned errors have been fixed) 20170403 05:08:33< irker320> wesnoth: Celtic Minstrel wesnoth:master c2ba1c5c6f93 / src/ (11 files in 3 dirs): Generalizing the FAI concept of action objects https://github.com/wesnoth/wesnoth/commit/c2ba1c5c6f93204a945006e731a50e63180c9d3e 20170403 05:08:35< irker320> wesnoth: Celtic Minstrel wesnoth:master aedf953d285d / src/ (4 files in 2 dirs): Implement WFL function symbol table inheritance https://github.com/wesnoth/wesnoth/commit/aedf953d285d319031e83272ff3d93c89d0bf2e9 20170403 05:08:37< irker320> wesnoth: Celtic Minstrel wesnoth:master f12696d3d2b1 / src/formula/ (debugger.cpp debugger.hpp): Fix bug in formula debugger https://github.com/wesnoth/wesnoth/commit/f12696d3d2b1317ac87cb152c9c45f33eb3b1f79 20170403 05:08:48< vultraz_iOS> \ o / 20170403 05:11:25< irker320> wesnoth: Celtic Minstrel wesnoth:lua_ai_fallback 0b9f3c2eaa97 / src/ (ai/lua/core.cpp menu_events.hpp): Add fallback_human() action to the Lua AI https://github.com/wesnoth/wesnoth/commit/0b9f3c2eaa974e83d575b5f524c9d563ff1ec20b 20170403 05:17:27-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 240 seconds] 20170403 05:22:26-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 05:24:06-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Ping timeout: 256 seconds] 20170403 05:24:39-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20170403 05:25:23< celticminstrel> No wonder the operator< was invalid. 20170403 05:25:41< celticminstrel> It was implemented in terms of an operator<= that couldn't decide whether it was supposed to be <= or < 20170403 05:25:51< celticminstrel> Plus it made null be less than itself. 20170403 05:30:02< vultraz_iOS> hm? 20170403 05:30:49< vultraz_iOS> oh 20170403 05:30:57< vultraz_iOS> I didn't touch that, you know 20170403 05:31:21-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 05:31:21< vultraz_iOS> er 20170403 05:31:22< vultraz_iOS> wait 20170403 05:31:27< vultraz_iOS> what are you talking about? 20170403 05:31:37< vultraz_iOS> the variant < is correct 20170403 05:31:40-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 05:31:46< celticminstrel> No, it's not. 20170403 05:32:04< celticminstrel> Like I said, it is implemented in terms of an operator<= that is actually < for some types. 20170403 05:32:09< celticminstrel> And makes null be less than itself. 20170403 05:32:19< vultraz_iOS> then I made an error in implementing <= 20170403 05:32:54< vultraz_iOS> ah, yes, I see 20170403 05:33:00< celticminstrel> Part of the problem was that it was in fact <= 20170403 05:33:03< celticminstrel> I already fixed it BTW 20170403 05:33:07< vultraz_iOS> locally? 20170403 05:33:10< celticminstrel> Did a bit more than really necessary though. 20170403 05:33:14< celticminstrel> Yeah, just about to push. 20170403 05:35:16< vultraz_iOS> I hope you don't mean you got rid of the virtual operators... :| 20170403 05:35:33< irker320> wesnoth: Celtic Minstrel wesnoth:master 651861d2f5f6 / src/formula/ (variant.cpp variant_value.cpp variant_value.hpp): Fix variant::operator< not producing a strict ordering https://github.com/wesnoth/wesnoth/commit/651861d2f5f6c0900575970df15450fc0c295fb0 20170403 05:35:43< celticminstrel> Oh hey, guess what! That also fixed the patrol FAI! 20170403 05:35:54< celticminstrel> And yes I do mean that. 20170403 05:36:02< vultraz_iOS> ;_; 20170403 05:36:07< celticminstrel> <_< 20170403 05:36:12< vultraz_iOS> nah whatever 20170403 05:36:29< vultraz_iOS> i guess it makes more sense anyway 20170403 05:37:42< celticminstrel> I also switched it over to be < in variant_callable instead of <= 20170403 05:38:00< celticminstrel> Because formula_callable only provides < 20170403 05:38:11< celticminstrel> (Though it'd be trivial to extend it to provide all four.) 20170403 05:38:12< vultraz_iOS> it was already less? 20170403 05:38:18< celticminstrel> Yes. 20170403 05:39:28< celticminstrel> I'm not sure whether the specific cause of the problem was formula_callable doing < instead of <= or, null ok, good 20170403 05:42:35-!- Kwandulin [~Kwandulin@p200300760F3E7D206D9CB59AC2A1B7BB.dip0.t-ipconnect.de] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 20170403 05:44:38-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 05:44:39< travis-ci> wesnoth/wesnoth#13136 (wfl_action_callable - 5767ca4 : Celtic Minstrel): The build has errored. 20170403 05:44:39< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/217945686 20170403 05:44:39-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 05:44:49-!- JyrkiVesterinen [~jyrki@87-100-152-225.bb.dnainternet.fi] has quit [Quit: Rebooting] 20170403 05:48:21-!- JyrkiVesterinen [~jyrki@87-100-152-225.bb.dnainternet.fi] has joined #wesnoth-dev 20170403 05:50:18-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 05:54:06-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Read error: Connection reset by peer] 20170403 05:56:08< irker320> wesnoth: Charles Dang wesnoth:master e1e9cf6b4f36 / src/formula/variant_value.hpp: Removed some typedefs we shouldn't really be using https://github.com/wesnoth/wesnoth/commit/e1e9cf6b4f36a950f96027693e59357e6f89b33f 20170403 05:57:48< vultraz_iOS> hm 20170403 05:58:10< vultraz_iOS> during my refactor i was going to make variant_integer and variant_decimal inherit from a variant_numeric base 20170403 05:58:15 * vultraz_iOS notes TODO 20170403 06:04:33< celticminstrel> Not quite sure if that'd work, but maybe. 20170403 06:04:40< celticminstrel> If it's a template using CRTP. 20170403 06:06:02< vultraz_iOS> it doesn't even need to be a template 20170403 06:06:20< vultraz_iOS> both variant_interger and variant_decimal use an int internally 20170403 06:06:26< celticminstrel> I'm not convinced of that. 20170403 06:06:31< celticminstrel> But maybe. 20170403 06:07:23-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 06:11:49-!- JyrkiVesterinen [~jyrki@87-100-152-225.bb.dnainternet.fi] has quit [Quit: .] 20170403 06:16:27-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 06:16:28-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 06:16:46< irker320> wesnoth: Charles Dang wesnoth:master fd63d06d8979 / src/formula/ (variant.cpp variant_value.hpp): Moved common functions in variant_integer and variant_decimal to a common base c https://github.com/wesnoth/wesnoth/commit/fd63d06d897994eb7962954482f3158e224cdc67 20170403 06:18:06-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 06:18:21< celticminstrel> get_numeric_value() sounds like a lie. 20170403 06:18:51< vultraz_iOS> how so> 20170403 06:18:52< vultraz_iOS> ? 20170403 06:19:03< vultraz_iOS> should i have just made it get_value()? 20170403 06:19:09< celticminstrel> Well, if it's an int, it returns the numeric value. If it's a decimal, it returns the numeric value times 1000. 20170403 06:19:15< celticminstrel> BTW... 20170403 06:20:13-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 06:20:14< celticminstrel> It might be nice to actually increase the number of decimal places stored in a decimal. 20170403 06:20:30< celticminstrel> Which would be easier if any 1000s or 3s were replaced by static constants. 20170403 06:21:01< celticminstrel> Hmm... I guess equals and less_than do still work as intended, since they're only called if the types are the same... 20170403 06:21:55< vultraz_iOS> I never performed any permutations when comparing the values 20170403 06:21:56< vultraz_iOS> as you can see 20170403 06:22:01< celticminstrel> ??? 20170403 06:22:43< vultraz_iOS> also, get_decimal_value didn't multiply by 1000 either 20170403 06:22:54< celticminstrel> Yeah, true. 20170403 06:22:59< vultraz_iOS> as_decimal did that 20170403 06:23:37-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 246 seconds] 20170403 06:29:04-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 06:29:05< travis-ci> wesnoth/wesnoth#13139 (lua_ai_fallback - 0b9f3c2 : Celtic Minstrel): The build failed. 20170403 06:29:05< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/217947360 20170403 06:29:05-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 06:29:24< celticminstrel> Unexpected. 20170403 06:29:38-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 06:30:32< celticminstrel> ... 20170403 06:30:39< celticminstrel> Aaaaand it's a mere typo. 20170403 06:30:45< vultraz_iOS> :P 20170403 06:31:58< irker320> wesnoth: Celtic Minstrel wesnoth:lua_ai_fallback 7a7a90778c6e / src/ (ai/lua/core.cpp menu_events.hpp): Add fallback_human() action to the Lua AI https://github.com/wesnoth/wesnoth/commit/7a7a90778c6e78d7a3e90e1787f49e4d0100b82e 20170403 06:35:46< vultraz_iOS> why is map_formula_callable declared in callable.hpp 20170403 06:35:51< vultraz_iOS> but implemented in formula.cpp 20170403 06:36:01< celticminstrel> Good question? Is there a callable.cpp? 20170403 06:36:07< celticminstrel> If so, feel free to move it there. 20170403 06:36:15< celticminstrel> Oh yeah, I remembered another thing I wanted to do... 20170403 06:36:16< vultraz_iOS> there is not 20170403 06:36:25< vultraz_iOS> I'm going to move the definition to formula.hpp 20170403 06:36:28< celticminstrel> Ah, then that's probably why. :P 20170403 06:36:35-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 240 seconds] 20170403 06:36:36< celticminstrel> I don't know if moving it to formula.hpp is a good idea. 20170403 06:36:50< celticminstrel> Specifically, if formula.hpp does not already include callable.hpp. 20170403 06:36:52-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 06:38:37< vultraz_iOS> Copyright (C) 2007 - 2017 by David White 20170403 06:38:37< vultraz_iOS> Part of the Silver Tree Project 20170403 06:38:39< vultraz_iOS> heh 20170403 06:38:43< vultraz_iOS> ANCIENT COPYRIGHT IS ANCIENT 20170403 06:38:54< celticminstrel> Silver Tree? o.o 20170403 06:39:17< vultraz_iOS> abandoned wesnoth 3d thing 20170403 06:39:39< vultraz_iOS> from a decade ago 20170403 06:40:54< vultraz_iOS> I guess that's where formula began, then 20170403 06:40:58< vultraz_iOS> then got moved to wesnoth 20170403 06:41:00< vultraz_iOS> then frgatto 20170403 06:41:03< vultraz_iOS> then split off into anura 20170403 06:43:34< vultraz_iOS> celticminstrel: ok uh.. how is it I can use WFL for canvas actions again? 20170403 06:44:14< celticminstrel> Add an action= key to the base canvas shape class. 20170403 06:44:14-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 06:44:20-!- JyrkiVesterinen [~JyrkiVest@85-76-66-240-nat.elisa-mobile.fi] has joined #wesnoth-dev 20170403 06:44:25-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 06:44:34< vultraz_iOS> right 20170403 06:44:41< vultraz_iOS> then how do I execute this action 20170403 06:44:41< celticminstrel> It'll be a formula, of course. 20170403 06:44:49< vultraz_iOS> wrapped in ()? 20170403 06:44:59< vultraz_iOS> (it should be) 20170403 06:45:04< celticminstrel> It could be, but doesn't need to be. This is not something that can be not a formula. 20170403 06:45:12< celticminstrel> Of course, if you use typed_formula, it would have to be. 20170403 06:45:27< celticminstrel> Not sure what the template argument should be in that case. 20170403 06:45:29< celticminstrel> ANYWAY 20170403 06:45:51< celticminstrel> At some point, probably after evaluating all the other formula stuff, you evaluate this action formula. This gets you bave a variant, as usual. 20170403 06:46:24< celticminstrel> You then call canvas_vars.execute_variant(result_action). 20170403 06:46:41-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 06:46:45< vultraz_iOS> ok 20170403 06:46:50< celticminstrel> Something like that, anyway. 20170403 06:46:55< celticminstrel> Might be a few complications. 20170403 06:47:16-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 06:49:19< vultraz_iOS> why does formula() have a private default ctor.. 20170403 06:49:27< vultraz_iOS> how does that even work 20170403 06:49:33< celticminstrel> Um... 20170403 06:50:26< celticminstrel> I'm actually not sure why. 20170403 06:50:35< vultraz_iOS> is it to delete it or something? 20170403 06:50:38< celticminstrel> It means that only a static function in formula would be able to call it. 20170403 06:50:53< celticminstrel> If it was meant to be deleted, I would've expected to see it with no implementation. 20170403 06:51:14< vultraz_iOS> right 20170403 06:52:55< vultraz_iOS> I'll remove it and see if something breaks on compilation 20170403 06:53:54< celticminstrel> Are you working on something right now? 20170403 06:54:15< vultraz_iOS> just mostly formatting cleanup 20170403 06:54:36< vultraz_iOS> I wonder if map_formula_callable should be in callable_objects.*pp ... 20170403 06:54:41< vultraz_iOS> instead of formula.*pp.. maybe 20170403 06:55:06< vultraz_iOS> what do you think? 20170403 06:57:02-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 256 seconds] 20170403 06:57:26< celticminstrel> It's a pretty generic callable, so I think it makes sense in callable.hpp. 20170403 06:58:03< celticminstrel> How much implementation does it even have? If it really bugs you that it's in formula.cpp while the declaration is in callable.hpp, you could always just move the implementation inline in the header. 20170403 06:58:30-!- nore [~ncourant@sas.eleves.ens.fr] has joined #wesnoth-dev 20170403 06:58:56< vultraz_iOS> not THAT much 20170403 06:59:11< vultraz_iOS> it only bothers me because I couldn't find it at first 20170403 07:00:00< vultraz_iOS> ... why is formula_callable::set_value implemented here too 20170403 07:00:01< vultraz_iOS> the hell 20170403 07:00:14-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 07:01:36< celticminstrel> Or you could add a callable.cpp and move all the implementations from callable.hpp there. 20170403 07:01:42< celticminstrel> Including the ones that are currently in the header. 20170403 07:01:53< vultraz_iOS> possibly, possibly 20170403 07:01:56< celticminstrel> Of course excluding any templates, though I don't think there are any? 20170403 07:01:58-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 07:02:09< celticminstrel> I'm currently moving variant into the namespace. 20170403 07:02:25-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 07:02:26< vultraz_iOS> alright 20170403 07:06:55-!- atarocch [~atarocch@93.56.160.28] has joined #wesnoth-dev 20170403 07:07:52< vultraz_iOS> why is most of the stuff in formula.cpp not in game_logic 20170403 07:08:03< vultraz_iOS> should it be? 20170403 07:08:29< celticminstrel> It's a cpp file, so probably not really important. 20170403 07:09:27-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Read error: Connection reset by peer] 20170403 07:09:40-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170403 07:14:01-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 246 seconds] 20170403 07:17:02-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 07:19:28< vultraz_iOS> celticminstrel: If I'm reading this code right, we actually support pure-wfl files O_O 20170403 07:19:47< celticminstrel> Yup, there are a few in data/ai/formula 20170403 07:19:52< vultraz_iOS> :o 20170403 07:20:09< celticminstrel> Though actually they're generally included by WML macros. 20170403 07:21:17< vultraz_iOS> via inclusion? 20170403 07:21:29< vultraz_iOS> or do we actually have a file.load function 20170403 07:21:35< celticminstrel> No, macro inclusion. 20170403 07:21:43< vultraz_iOS> aw 20170403 07:25:18-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 07:46:57-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 07:51:49-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 08:01:02-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170403 08:03:08-!- noy_ [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 08:04:24-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 08:04:24-!- noy_ is now known as noy 20170403 08:17:10-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 08:17:24-!- noy_ [~Noy@S01067cb21b205894.vs.shawcable.net] has joined #wesnoth-dev 20170403 08:17:24-!- noy_ [~Noy@S01067cb21b205894.vs.shawcable.net] has quit [Changing host] 20170403 08:17:24-!- noy_ [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 08:18:13-!- Kwandulin [~Kwandulin@p200300760F3E7D205441CAE416FB9A3C.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170403 08:30:17-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 08:31:22< irker320> wesnoth: Celtic Minstrel wesnoth:master e6045b17c625 / src/ (79 files in 14 dirs): Rename game_logic namespace to wfl and move variant class into it https://github.com/wesnoth/wesnoth/commit/e6045b17c625551d01c717e13b77a81dcefc056b 20170403 08:31:50< vultraz_iOS> well then 20170403 08:31:55< vultraz_iOS> C O N F L I C T S 20170403 08:32:12< celticminstrel> Guessing they won't be major conflicts though... 20170403 08:32:19< celticminstrel> Assuming you're working on the canvas thing. 20170403 08:32:29< vultraz_iOS> I am not 20170403 08:32:35< vultraz_iOS> I am working on the code cleanup 20170403 08:32:39< celticminstrel> BTW, for that to work you also need to use action_function_symbol_table instead of function_symbol_table. 20170403 08:32:41< vultraz_iOS> in callable and formula 20170403 08:32:42< celticminstrel> Oh, code cleanup. 20170403 08:32:55-!- noy_ [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 08:32:57< celticminstrel> Well I did say I was doing this though. >_> 20170403 08:33:02< vultraz_iOS> true 20170403 08:33:13< vultraz_iOS> oh weel 20170403 08:34:36< vultraz_iOS> let's see how bad it is 20170403 08:38:39< vultraz_iOS> fuck it, resolve with mine entirely and then I'll fix as I build 20170403 08:39:00< celticminstrel> ??? 20170403 08:39:31< vultraz_iOS> instead of trying to check all the conflicts im just resolving with my changes and then if there's something off ill fix it as i build 20170403 08:39:42-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 08:41:11< celticminstrel> That could be a little dangerous, but should probably work mostly. 20170403 08:41:34< celticminstrel> Just be sure to also review the diff in case of some spurious reversions of my commit. 20170403 08:43:12< vultraz_iOS> game_logic is wfl now? 20170403 08:43:23< celticminstrel> Yes. 20170403 08:47:33-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 09:03:39-!- JyrkiVesterinen [~JyrkiVest@85-76-66-240-nat.elisa-mobile.fi] has quit [Quit: .] 20170403 09:04:09-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 09:13:32-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 09:31:27-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 09:32:53-!- JyrkiVesterinen [~JyrkiVest@85-76-66-240-nat.elisa-mobile.fi] has joined #wesnoth-dev 20170403 09:36:38-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 09:39:30-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 09:39:31< travis-ci> wesnoth/wesnoth#13144 (lua_ai_fallback - 7a7a907 : Celtic Minstrel): The build is still failing. 20170403 09:39:31< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/217958100 20170403 09:39:31-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 09:50:35-!- Kwandulin [~Kwandulin@p200300760F3E7D205441CAE416FB9A3C.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170403 10:04:09-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 10:05:31-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 10:06:38-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 10:15:25< irker320> wesnoth: Charles Dang wesnoth:master 766008978fb4 / src/ (9 files in 4 dirs): Bunch of formula code cleanup, mostly formatting and moving stuff around https://github.com/wesnoth/wesnoth/commit/766008978fb40d67bbf1064af81ab66993691100 20170403 10:15:32< vultraz_iOS> celticminstrel: ^ 20170403 10:15:38< celticminstrel> Oh my! 20170403 10:17:58< vultraz_iOS> most of the additions are whitespace/newlines 20170403 10:19:42< celticminstrel> I suggest moving formula_callable::get_inputs to be protected. 20170403 10:20:35-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 240 seconds] 20170403 10:23:19-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 10:23:47< vultraz_iOS> any objections of the get_input/add_input functions took a ref instead of a ptr? 20170403 10:23:51< vultraz_iOS> if* 20170403 10:24:10< celticminstrel> That's probably a really good idea. 20170403 10:27:00< vultraz_iOS> doesn't look like get_inputs builds as protected 20170403 10:27:07< celticminstrel> What's the error? 20170403 10:27:42< vultraz_iOS> private in a context 20170403 10:27:45< celticminstrel> What happened to id_chars? 20170403 10:27:47< celticminstrel> Huh? 20170403 10:27:59< vultraz_iOS> such as formula_callable_with_backup::get_inputs 20170403 10:28:09< vultraz_iOS> celticminstrel: id chars is still there 20170403 10:28:14< celticminstrel> Okay. 20170403 10:28:21< celticminstrel> So um... what was the error? 20170403 10:28:50< vultraz_iOS> private within that context 20170403 10:28:53< vultraz_iOS> er 20170403 10:28:54< vultraz_iOS> protected 20170403 10:28:55< vultraz_iOS> sorry 20170403 10:29:04< celticminstrel> I don't understand. 20170403 10:29:33< vultraz_iOS> calls to get_inputs on a formula_callable object owned by another class 20170403 10:29:58< celticminstrel> Ah. Fair enough. 20170403 10:30:25< celticminstrel> It would be more inconvenient to stop doing that. 20170403 10:31:17< celticminstrel> Your changes to formula.cpp are pretty impossible to read. 20170403 10:32:36< vultraz_iOS> the tl'dr is i moved map_formula_callable's implementation (and formula_callable::set_value) out of formula.cpp 20170403 10:32:50-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170403 10:32:55< celticminstrel> And rearranged pretty much everything else. 20170403 10:32:57< vultraz_iOS> moved the formula implementation to the top of the file, along with anything necessary to make it build there 20170403 10:33:09< vultraz_iOS> before it was at the bottom 20170403 10:33:34< celticminstrel> Which I didn't really have a problem with, but whatever. 20170403 10:33:45< vultraz_iOS> and reformatted everywhere 20170403 10:33:59< vultraz_iOS> removed using namespace tokenizer 20170403 10:34:03< vultraz_iOS> in favor of a namespace alias 20170403 10:35:12< vultraz_iOS> which was great, since there were two places using tokenizer::iterator that were just written as "iterator foo" 20170403 10:35:15< vultraz_iOS> very confusing 20170403 10:35:20< celticminstrel> Which is also exported to everyone, so why not just name the namespace tk in the first place. >_> 20170403 10:35:55< vultraz_iOS> i can make it local again if you want 20170403 10:36:09< celticminstrel> I don't really care that much? 20170403 10:38:47< irker320> wesnoth: Charles Dang wesnoth:master 92d0be3941f4 / src/ (14 files in 5 dirs): Made formula_callable::get_inputs and add_input take a reference instead of a po https://github.com/wesnoth/wesnoth/commit/92d0be3941f4237d3c369f893310599e321c3d02 20170403 10:38:59< celticminstrel> BTW, if you hadn't noticed, the name "tokenizer" was just from my last commit. 20170403 10:39:08< vultraz_iOS> I did 20170403 10:40:59-!- JyrkiVesterinen [~JyrkiVest@85-76-66-240-nat.elisa-mobile.fi] has quit [Quit: Rebooting] 20170403 10:42:34< vultraz_iOS> we've certainly done a lot of refactoring in recent days 20170403 10:44:16-!- JyrkiVesterinen [~JyrkiVest@85-76-66-240-nat.elisa-mobile.fi] has joined #wesnoth-dev 20170403 10:48:40< irker320> wesnoth: Charles Dang wesnoth:master 488f95357871 / src/formula/callable.hpp: Use emplace_back in formula_callable::add_input https://github.com/wesnoth/wesnoth/commit/488f95357871adadbc0ec26063ad80029b9a264f 20170403 10:54:33-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 10:54:58-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 10:54:59< travis-ci> wesnoth/wesnoth#13146 (master - e6045b1 : Celtic Minstrel): The build was broken. 20170403 10:54:59< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/217984037 20170403 10:54:59-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 10:55:07< celticminstrel> :O 20170403 10:57:05< celticminstrel> Ahhh, forgot to update some references to game_logic in the tests. 20170403 10:58:12< matthiaskrgr> https://pastebin.com/bKBZY8AX 20170403 10:58:39< vultraz_iOS> yeah, we don't have the override keyword deployed... 20170403 10:58:44< celticminstrel> Yeah, there are a ton of missing overrides. 20170403 10:58:46< vultraz_iOS> will have to do that 20170403 10:58:51< vultraz_iOS> celticminstrel: do fix the tests 20170403 10:59:02< celticminstrel> For some reason it seems that compilers only warn if you have some marked override and not others. 20170403 11:00:40< JyrkiVesterinen> Maybe because of legacy code in libraries. Some of which support C++03 still and can't assume override to be available. 20170403 11:01:57-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Quit: wedge009] 20170403 11:02:19-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20170403 11:05:37-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 260 seconds] 20170403 11:06:04-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 11:13:09< vultraz_iOS> matthiaskrgr: i'm prepping a commit to add a bunch of override keywords, but it would be helpful if we could get complete output for that 20170403 11:13:51< celticminstrel> If you need some places to look, AI. There's lots missing in AI. 20170403 11:14:37< matthiaskrgr> vultraz_iOS: you mean now, or after the commit? 20170403 11:14:43< vultraz_iOS> after 20170403 11:14:49< matthiaskrgr> ok 20170403 11:22:54< irker320> wesnoth: Charles Dang wesnoth:master a736f8714eb7 / src/ (6 files in 3 dirs): Deployed override keyword in formula_callable derived classes https://github.com/wesnoth/wesnoth/commit/a736f8714eb7a62fe4740cae5173d84ea908f52a 20170403 11:23:13< vultraz_iOS> matthiaskrgr: ^ 20170403 11:23:16< matthiaskrgr> yeah 20170403 11:23:50< celticminstrel> That commit will probably just make the warnings go away. 20170403 11:24:03< celticminstrel> Which doesn't mean all overrides have been added. 20170403 11:24:30< matthiaskrgr> 50 files compiled so far, no warning :) 20170403 11:24:53< matthiaskrgr> it'll take half an hour or so to finnish building 20170403 11:25:01< celticminstrel> And if it compiles in alphabetical order, that's basically proof that it's missing something. 20170403 11:25:37< matthiaskrgr> I'm using ninja-build, not sure how they do theordering 20170403 11:26:13< matthiaskrgr> bbiab 20170403 11:34:08-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 11:34:09< travis-ci> wesnoth/wesnoth#13147 (master - 7660089 : Charles Dang): The build was broken. 20170403 11:34:09< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218013155 20170403 11:34:09-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 11:37:57< vultraz_iOS> celticminstrel: so, im wondering, could we add a to_formula function to config? 20170403 11:38:17< vultraz_iOS> to go alongside to_string, to_int, to_bool, to_enum, etc 20170403 11:38:58< celticminstrel> I don't really see a point, really. 20170403 11:39:15< celticminstrel> I mean, you can easily just use to_string (or whatever it's called) and then build a formula from it. 20170403 11:39:48< vultraz_iOS> well, to start promoting a wider use of wfl 20170403 11:39:54< JyrkiVesterinen> On the other hand, to_formula() would be easy to implement that way. 20170403 11:40:13< celticminstrel> True, it would be easy to implement. 20170403 11:40:48< celticminstrel> But, well... 20170403 11:41:23< celticminstrel> There isn't just one way to get a formula from a string - you could use typed_formula, in which case you need to decide on a return type, or you could use the formula APIs directly. 20170403 11:44:11< matthiaskrgr> vultraz_iOS: theres some left 20170403 11:44:16< vultraz_iOS> good, good 20170403 11:44:55< matthiaskrgr> https://pastebin.com/RPtGDhaS 20170403 11:48:03< vultraz_iOS> celticminstrel: btw uh.. you said earlier i need to evaluate the formula passed to the canvas... 20170403 11:48:08< vultraz_iOS> how do I do that? 20170403 11:48:27< vultraz_iOS> matthiaskrgr: "some" :P 20170403 11:49:06< celticminstrel> Uh. 20170403 11:49:19< celticminstrel> You can probably use the filter code as a good example? 20170403 11:50:52< vultraz_iOS> filter? 20170403 11:53:39< celticminstrel> Unit filter, side filter, attack filter, location filter... 20170403 11:53:57< vultraz_iOS> oh 20170403 11:54:41< celticminstrel> And don't forget to pass in the function symbol table. Which should be an action_function_symbol_table. 20170403 11:55:50< irker320> wesnoth: Celtic Minstrel wesnoth:master cf73c8dca4c5 / src/tests/gui/test_gui2.cpp: Fix GUI2 test https://github.com/wesnoth/wesnoth/commit/cf73c8dca4c5b4b6ad6a3df94245d25df4607066 20170403 11:56:35< vultraz_iOS> matthiaskrgr: ok, most seems to be from one place 20170403 11:56:36-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 11:57:16< vultraz_iOS> celticminstrel: uh, what about all the references to game_logic? 20170403 11:57:27< matthiaskrgr> yeah 20170403 11:57:35< celticminstrel> According to search, that was the only one in that file... 20170403 11:57:39< vultraz_iOS> celticminstrel: in test_formula_function 20170403 11:57:51< celticminstrel> Oh, were there some in another file too? 20170403 11:57:55< vultraz_iOS> 25 calls to game_logic::formula 20170403 11:59:20< irker320> wesnoth: Celtic Minstrel wesnoth:master ee36b6c1d265 / src/tests/test_formula_function.cpp: Fix formula tests https://github.com/wesnoth/wesnoth/commit/ee36b6c1d265e98da1947b1a028382506c4e3425 20170403 12:02:20-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 12:02:30< irker320> wesnoth: Charles Dang wesnoth:master 6687ac5436b5 / src/ (ai/contexts.hpp formula/callable.hpp): Added more override specifiers https://github.com/wesnoth/wesnoth/commit/6687ac5436b57234f35c76f46f117fd4905136ae 20170403 12:02:33< vultraz_iOS> matthiaskrgr: ^ see what that does 20170403 12:04:05< matthiaskrgr> D: 20170403 12:05:02< matthiaskrgr> 189 warnings generated. 20170403 12:05:05< matthiaskrgr> gj ! 20170403 12:05:15< vultraz_iOS> :D 20170403 12:05:17< vultraz_iOS> good, good 20170403 12:05:32< matthiaskrgr> https://pastebin.com/yVQZ0SxU 20170403 12:05:46< vultraz_iOS> as i expected 20170403 12:05:58< vultraz_iOS> now that I've added one to the ai code, it will generate more 20170403 12:06:27< celticminstrel> All ai::component subclasses need them too. 20170403 12:06:36< celticminstrel> Like the candidate actions, stages, aspects, etc. 20170403 12:06:53< vultraz_iOS> oh jesus fuck 20170403 12:07:02< vultraz_iOS> 596 cases of "virtual" in ai/ 20170403 12:07:04< vultraz_iOS> haaaalp 20170403 12:07:05< matthiaskrgr> lolol 20170403 12:07:10< vultraz_iOS> BAD BAD BAD 20170403 12:07:14< celticminstrel> Yeah, there's a ton of these things in the AI. 20170403 12:07:18< matthiaskrgr> a virtual disaster 20170403 12:07:23< vultraz_iOS> :| 20170403 12:07:28< celticminstrel> And of course, searching for vritual doesn't find them all. 20170403 12:07:40< celticminstrel> Because the virtual keyword is only required in the base class. 20170403 12:07:45< vultraz_iOS> :| 20170403 12:07:59< vultraz_iOS> right, but i thought it was good form to specify it when overriding a function 20170403 12:08:00< celticminstrel> (Or more precisely, the class that first declares the method.) 20170403 12:08:20< celticminstrel> I don't know if it's considered good form. I always omit it if possible. 20170403 12:08:27< vultraz_iOS> I always include it if possible 20170403 12:08:43< JyrkiVesterinen> I always include it as well. 20170403 12:08:45< vultraz_iOS> (ya know, just how in hell is our AI code so huge) 20170403 12:08:50< vultraz_iOS> (it's the equivalent of GUI2) 20170403 12:08:52< vultraz_iOS> (in size) 20170403 12:09:17< celticminstrel> Well, AI is complicated. 20170403 12:09:30< vultraz_iOS> yes 20170403 12:17:59< DeFender1031> AI and graphical layout are both some of the most complicated things to implement. 20170403 12:19:19< matthiaskrgr> what is left of the game if you strip AI and GUI? :P 20170403 12:19:23< matthiaskrgr> cmdline multiplayer? :D 20170403 12:19:45< matthiaskrgr> elvish bowman to 45,34 ! 20170403 12:19:53< matthiaskrgr> attack 44,34 20170403 12:21:51-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 12:21:52< travis-ci> wesnoth/wesnoth#13148 (master - 92d0be3 : Charles Dang): The build was broken. 20170403 12:21:52< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218018686 20170403 12:21:52-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 12:22:08< DeFender1031> Knight to king's bishop 5. 20170403 12:36:29< matthiaskrgr> fatal error: too many errors emitted, stopping now [-ferror-limit=] 20170403 12:36:33< matthiaskrgr> >:| 20170403 12:37:33< matthiaskrgr> https://pastebin.com/TXGcbkaj 20170403 12:39:02< vultraz_iOS> celticminstrel: ^ 20170403 12:49:30-!- bumba [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 256 seconds] 20170403 13:04:47< celticminstrel> ...oh huh, I think variant_callable::less_than is actually returning true when greater. 20170403 13:04:53-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 13:04:54< travis-ci> wesnoth/wesnoth#13149 (master - 488f953 : Charles Dang): The build was broken. 20170403 13:04:54< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218020982 20170403 13:04:54-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 13:07:01-!- Kwandulin [~Kwandulin@p200300760F3E7D20CCFFB1DC0E781FBB.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170403 13:10:40< irker320> wesnoth: Charles Dang wesnoth:master b00ad5044ada / src/ai/contexts.hpp: Added more of the million override specifiers the AI code needs https://github.com/wesnoth/wesnoth/commit/b00ad5044adacf77e917c1840c4175cd4d76bf49 20170403 13:10:43< vultraz_iOS> matthiaskrgr: ^ added 186 more 20170403 13:11:15< JyrkiVesterinen> Thanks for your efforts. \o/ 20170403 13:13:27< matthiaskrgr> well build is broken anyway, so .. :P 20170403 13:14:42< JyrkiVesterinen> Still? https://github.com/wesnoth/wesnoth/commit/ee36b6c1d265e98da1947b1a028382506c4e3425 should fix it. 20170403 13:14:50< JyrkiVesterinen> (Travis hasn't reached that commit yet.) 20170403 13:17:08-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170403 13:22:00-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 260 seconds] 20170403 13:27:36< matthiaskrgr> yes 20170403 13:28:13< matthiaskrgr> pastebin was from 6687ac5436b5 20170403 13:29:06< vultraz_iOS> are the warnings gone? 20170403 13:29:30< matthiaskrgr> no lol 20170403 13:29:33< matthiaskrgr> :P 20170403 13:30:09< matthiaskrgr> https://pastebin.com/RP4S7qbU 20170403 13:31:42< matthiaskrgr> I should start a CWAAS enterprise 20170403 13:31:50< matthiaskrgr> Compiler Warnings As A Service 20170403 13:31:51< matthiaskrgr> :> 20170403 13:32:51< JyrkiVesterinen> Travis already does that. :P 20170403 13:32:53< matthiaskrgr> and yes, the build fails with latest master 20170403 13:33:05< JyrkiVesterinen> (Although only with an old version of GCC.) 20170403 13:33:15< matthiaskrgr> running make wesnoth wesnothd test 20170403 13:35:28-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170403 13:36:18< irker320> wesnoth: Charles Dang wesnoth:master 218149355909 / src/ai/ (contexts.hpp formula/ai.hpp): YOU get an override specifier and YOU get an override specifier and YOU get an o https://github.com/wesnoth/wesnoth/commit/218149355909d9983a8781864b32e53ec9ee71e1 20170403 13:36:25< vultraz_iOS> matthiaskrgr: now? 20170403 13:36:32-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 13:36:41< JyrkiVesterinen> :D 20170403 13:40:15-!- travis-ci [~travis-ci@ec2-54-90-121-120.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 13:40:16< travis-ci> wesnoth/wesnoth#13150 (master - a736f87 : Charles Dang): The build is still failing. 20170403 13:40:16< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218029393 20170403 13:40:16-!- travis-ci [~travis-ci@ec2-54-90-121-120.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 13:40:29< matthiaskrgr> looks good so far, I'll do a clean build just to be sure 20170403 13:50:17-!- Duthlet [~Duthlet@dslb-188-106-146-119.188.106.pools.vodafone-ip.de] has joined #wesnoth-dev 20170403 13:51:07< celticminstrel> Not having much luck with the "notify on destruction" idea for formula_callable. 20170403 13:51:29< celticminstrel> Getting seemingly erroneous "base class is not define" errors. 20170403 13:59:47< vultraz_iOS> hm? 20170403 13:59:52< vultraz_iOS> notify on destruction? 20170403 14:00:36< celticminstrel> Basically: create a struct with a single pure virtual function; have formula_callable store a std::set of pointers to this struct. 20170403 14:00:55< celticminstrel> formula_callable also gains subscribe and unsubscribe functions which add to or erase from the set, respectively. 20170403 14:01:25< celticminstrel> The formula_callable destructor calls the function on each one in its list. 20170403 14:01:42< vultraz_iOS> I see 20170403 14:01:45< vultraz_iOS> not a bad idea 20170403 14:01:50< celticminstrel> Then variant_callable privately inherits from this struct, calling subscribe in the constructor and unsubscribe in the destructor. 20170403 14:02:11< celticminstrel> And implements that one function to do something, such as nulling out the callable pointer. 20170403 14:02:52< irker320> wesnoth: Celtic Minstrel wesnoth:master e8dc9a37e19f / src/formula/ (variant.cpp variant.hpp): Minor cleanup of formula call stack manager https://github.com/wesnoth/wesnoth/commit/e8dc9a37e19f1893ad072d4bd1c4c8d6c912afd3 20170403 14:02:54< irker320> wesnoth: Celtic Minstrel wesnoth:master 48d111aef46a / src/formula/variant_value.cpp: Handle the unlikely case of null callables in variant_callable https://github.com/wesnoth/wesnoth/commit/48d111aef46a935d602177b8cffc5652167f06d0 20170403 14:02:56< irker320> wesnoth: Celtic Minstrel wesnoth:master bcb014c931e7 / src/formula/variant_value.hpp: Don't use virtual inheritance for variant value hierarchy https://github.com/wesnoth/wesnoth/commit/bcb014c931e7bfbf8a84c94e648f17f138cdb515 20170403 14:03:36< celticminstrel> This method obviously requires variant_callable to use a shared_ptr. 20170403 14:03:48-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20170403 14:04:20< celticminstrel> (And variant would likewise use shared_ptrs.) 20170403 14:04:56< celticminstrel> When passing in a formula_callable that was allocated on the stack or that otherwise needs to be retained, simply use a null deleter. 20170403 14:08:11< matthiaskrgr> looking good now 20170403 14:08:19< matthiaskrgr> @ 218149355909 20170403 14:09:05< vultraz_iOS> \ o / 20170403 14:09:14< vultraz_iOS> ok, so we're back to consistent override at least 20170403 14:09:33< matthiaskrgr> yeah 20170403 14:11:50< vultraz_iOS> celticminstrel: there should never be null callables in variant 20170403 14:12:08< vultraz_iOS> the ctor asserts the value ptr is valid 20170403 14:12:18< vultraz_iOS> also, you messed up. 20170403 14:12:22< matthiaskrgr> down to 2 errors 20170403 14:12:39< matthiaskrgr> https://pastebin.com/QeA0besN 20170403 14:12:40< vultraz_iOS> missing ;'s and differnet operand types in less 20170403 14:12:49< vultraz_iOS> matthiaskrgr: yeah 20170403 14:12:50< matthiaskrgr> yeah 20170403 14:12:54< matthiaskrgr> :D 20170403 14:13:10< matthiaskrgr> -Wconsistent-missing-semicolon 20170403 14:13:20< vultraz_iOS> :P 20170403 14:19:42-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170403 14:21:37< celticminstrel> vultraz_iOS: That's true ATM, yes, but not necessarily true if we implement what I was describing. 20170403 14:21:52< vultraz_iOS> well, do fix the compiler errors at least 20170403 14:22:01< celticminstrel> Also, that assert doesn't do what you said it does. 20170403 14:22:01< vultraz_iOS> I don't know what the right operand for less is supposed to be 20170403 14:22:17< celticminstrel> It asserts the pointer to the variant_callable is valid, not that the pointer to the callable itself is valid. 20170403 14:22:59< celticminstrel> I have no idea what you're talking about less. 20170403 14:23:45< vultraz_iOS> lesst_than 20170403 14:23:53< vultraz_iOS> return callable_ ? callable_->less(other_ref.callable_) : other_ref.callable_; 20170403 14:23:58< vultraz_iOS> right operand is incorrect 20170403 14:24:03< vultraz_iOS> it's not a bool 20170403 14:24:24< celticminstrel> Right operand is correct. 20170403 14:24:58< celticminstrel> If callable_ is invalid, the correct response is equal to whether other_ref.callable_ is valid. 20170403 14:25:12< vultraz_iOS> then you need to check != nullptr 20170403 14:25:17< vultraz_iOS> because it errors! 20170403 14:25:20< vultraz_iOS> as it is! 20170403 14:25:32< celticminstrel> Eh. 20170403 14:25:37< celticminstrel> It should work though. 20170403 14:25:51< vultraz_iOS> C:\Users\exodi\Documents\wesnoth\src\formula\variant_value.cpp|130|error: operands to ?: have different types 'bool' and 'const wfl::formula_callable*'| 20170403 14:26:03< vultraz_iOS> don't believe me? 20170403 14:26:06< celticminstrel> Maybe because ternary is pedantic or something. 20170403 14:26:14< vultraz_iOS> yes 20170403 14:26:20-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 14:26:32< celticminstrel> But sure, != nullptr works. 20170403 14:26:33-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 14:26:34< travis-ci> wesnoth/wesnoth#13151 (master - cf73c8d : Celtic Minstrel): The build is still failing. 20170403 14:26:34< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218037851 20170403 14:26:34-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 14:27:49< vultraz_iOS> not sure how the othe value not being a nullptr deals with the concept of lessness, though 20170403 14:28:03< celticminstrel> null < null -> false 20170403 14:28:09< celticminstrel> null < non-null -> true 20170403 14:29:08< vultraz_iOS> I see 20170403 14:30:00< irker320> wesnoth: Charles Dang wesnoth:master dcec01b81223 / src/formula/variant_value.cpp: Fixup 48d111a https://github.com/wesnoth/wesnoth/commit/dcec01b812233a659acf26927636d701d0455ada 20170403 14:30:01< vultraz_iOS> matthiaskrgr: should be good now 20170403 14:30:22< JyrkiVesterinen> Some discussion about the ternary error: http://denisbider.blogspot.fi/2015/06/c-ternary-operator-is-harmful.html 20170403 14:30:38< JyrkiVesterinen> In short, MSVC is incredibly lax in its handling of ternaries. 20170403 14:30:49-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Ping timeout: 268 seconds] 20170403 14:33:14< celticminstrel> It's also possible that I just missed those errors amidst the flood of other errors related to the shared_ptr stuff. 20170403 14:34:54< celticminstrel> I just realized that the incomplete base error resulted from an include cycle. 20170403 14:37:08-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 260 seconds] 20170403 14:37:37-!- JyrkiVesterinen [~JyrkiVest@85-76-66-240-nat.elisa-mobile.fi] has quit [Quit: .] 20170403 14:45:06< irker320> wesnoth: Celtic Minstrel wesnoth:wfl_memleak_fix_attempt c0ff6dbf2633 / src/ (7 files in 2 dirs): WIP Attempt at implementing a destructor subscription system for formula_callabl https://github.com/wesnoth/wesnoth/commit/c0ff6dbf2633b991be4ab419cf836d3e06ac2e97 20170403 14:45:45< celticminstrel> I can't interpret the error messages I'm giving, but there's the work I've done so far in case someone wants to pick up where I left off. 20170403 14:46:02< celticminstrel> Perhaps someone not using MSVC 2013 would get better error messages. 20170403 14:47:06< vultraz_iOS> please do use the appropriate {-on-newline syntax :/ 20170403 14:47:18< celticminstrel> Eh, I usually remember. 20170403 14:47:32< vultraz_iOS> dynamic_pointer_cast and const_pointer_cast are std:: 20170403 14:47:39< celticminstrel> Sure. 20170403 14:47:41< vultraz_iOS> not like dynamic_cast 20170403 14:47:57< celticminstrel> That's nothing to do with the errors I was getting though. 20170403 14:48:16< celticminstrel> The error I was getting was in value_translator.hpp, complaining about an ambiguous constructor call. 20170403 14:48:53< celticminstrel> Which doesn't make any sense, because shared_ptr can only be converted to one of the possible types accepted by the variant constructors.+ 20170403 14:50:34< vultraz_iOS> I assume with this, you're supposed to use make_shared? 20170403 14:50:36< vultraz_iOS> instead of new? 20170403 14:52:15< vultraz_iOS> looks like it, yes 20170403 14:54:08-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170403 14:56:10< vultraz_iOS> celticminstrel: try adding the std:: to dpc because I'm not seeing your error 20170403 14:56:54< celticminstrel> vultraz_iOS: make_shared instead of new; fake_ptr if the callable was on the stack or similar. 20170403 14:57:40 * vultraz_iOS deploys a bunch of .get 20170403 14:58:56< celticminstrel> Why? 20170403 14:59:15< celticminstrel> BTW, adding the std:: didn't fix that error I mentioned. 20170403 15:00:59< vultraz_iOS> where is this fake_ptr thing? 20170403 15:02:03< vultraz_iOS> i see no fake_ptr thing 20170403 15:05:14< celticminstrel> In formula_callable. 20170403 15:05:40-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 15:05:41< travis-ci> wesnoth/wesnoth#13152 (master - ee36b6c : Celtic Minstrel): The build is still failing. 20170403 15:05:41< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218039046 20170403 15:05:41-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 15:10:20< matthiaskrgr> strange 20170403 15:10:43< matthiaskrgr> I can't find some object files that are supposed to be used while linking o.O 20170403 15:10:56< matthiaskrgr> or wait 20170403 15:11:01< matthiaskrgr> its not linking 20170403 15:11:29< matthiaskrgr> build still failing 20170403 15:12:07< matthiaskrgr> https://pastebin.com/31ZCLvVp 20170403 15:19:22-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 260 seconds] 20170403 15:40:35< irker320> wesnoth: Charles Dang wesnoth:wfl_memleak_fix_attempt e4bf35d8ef58 / src/ (15 files in 5 dirs): It builds now https://github.com/wesnoth/wesnoth/commit/e4bf35d8ef5828ec4a267a50c4d75fd2fa4d40e4 20170403 15:40:36< vultraz_iOS> celticminstrel: ^ 20170403 15:41:03< vultraz_iOS> probably used make_shared incorrectly in a few places and stuff 20170403 15:41:08< vultraz_iOS> but it builds, at least 20170403 15:41:12< celticminstrel> I'll try it in a bit. Doing stuff with variant_iterator now. 20170403 15:41:25-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 15:46:20< vultraz_iOS> Sleeeeep 20170403 15:53:20-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 15:57:31-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170403 15:58:26-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 15:58:27< travis-ci> wesnoth/wesnoth#13153 (master - 6687ac5 : Charles Dang): The build is still failing. 20170403 15:58:27< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218039916 20170403 15:58:27-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 16:02:03< irker320> wesnoth: Celtic Minstrel wesnoth:wfl_variant_iterator 13904165bb26 / src/formula/ (variant.cpp variant.hpp variant_value.cpp variant_value.hpp): WIP Possible generalization of the WFL variant iterator https://github.com/wesnoth/wesnoth/commit/13904165bb26bc588456b67591eacee17895886a 20170403 16:02:22< celticminstrel> ^ Almost compiles, misses equality implementation. 20170403 16:35:29-!- atarocch [~atarocch@93.56.160.28] has quit [Ping timeout: 240 seconds] 20170403 16:38:09< celticminstrel> So, there are some wrong things in the "It builds now" commit. 20170403 16:38:39< celticminstrel> I'm still getting the ambiguous function call error, unfortunately. 20170403 16:40:50-!- Kwandulin [~Kwandulin@p200300760F3E7D20CCFFB1DC0E781FBB.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170403 16:42:50-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 16:42:51< travis-ci> wesnoth/wesnoth#13154 (master - b00ad50 : Charles Dang): The build is still failing. 20170403 16:42:51< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218062201 20170403 16:42:51-!- travis-ci [~travis-ci@ec2-54-225-7-205.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 16:46:31-!- Kwandulin [~Kwandulin@p200300760F3E7D20A5DAC1D58E82DD9C.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170403 16:48:22-!- atarocch [~atarocch@46.29.219.219] has joined #wesnoth-dev 20170403 17:01:08< irker320> wesnoth: Jyrki Vesterinen wesnoth:master d6efed093913 / src/tests/test_formula_core.cpp: Fix build of unit tests https://github.com/wesnoth/wesnoth/commit/d6efed0939133e84d929b3bf07f3cb9725e1cd40 20170403 17:01:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 17:02:29-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 17:04:43-!- JyrkiVesterinen [~JyrkiVest@87-100-255-107.bb.dnainternet.fi] has joined #wesnoth-dev 20170403 17:06:46-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 256 seconds] 20170403 17:07:37-!- Kwandulin [~Kwandulin@p200300760F3E7D20A5DAC1D58E82DD9C.dip0.t-ipconnect.de] has quit [Ping timeout: 246 seconds] 20170403 17:29:08-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 17:29:09< travis-ci> wesnoth/wesnoth#13156 (master - bcb014c : Celtic Minstrel): The build is still failing. 20170403 17:29:09< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218081567 20170403 17:29:09-!- travis-ci [~travis-ci@ec2-54-147-239-36.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 17:30:02-!- travis-ci [~travis-ci@ec2-54-90-121-120.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 17:30:03< travis-ci> wesnoth/wesnoth#13155 (master - 2181493 : Charles Dang): The build is still failing. 20170403 17:30:03< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218070849 20170403 17:30:03-!- travis-ci [~travis-ci@ec2-54-90-121-120.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 17:36:08-!- midzer [~quassel@p5B31206F.dip0.t-ipconnect.de] has quit [Ping timeout: 240 seconds] 20170403 17:41:44-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has joined #wesnoth-dev 20170403 17:45:59-!- mjs-de [~mjs-de@wh.Uni-Dortmund.DE] has joined #wesnoth-dev 20170403 17:46:21< matthiaskrgr> yay I can build again 20170403 17:49:15-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 18:06:22-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170403 18:07:46-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170403 18:17:51-!- midzer [~quassel@2001:41d0:a:2255::1] has joined #wesnoth-dev 20170403 18:26:25-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20170403 18:41:09-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has quit [Max SendQ exceeded] 20170403 18:41:16-!- tomreyn_ [~tomreyn@megaglest/team/tomreyn] has joined #wesnoth-dev 20170403 18:42:42-!- tomreyn_ is now known as tomreyn 20170403 18:58:17-!- JyrkiVesterinen [~JyrkiVest@87-100-255-107.bb.dnainternet.fi] has quit [Quit: .] 20170403 19:04:15-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170403 19:04:47-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170403 19:07:36-!- Shiki [~Shiki@p548575EF.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170403 19:40:25-!- travis-ci [~travis-ci@ec2-54-90-121-120.compute-1.amazonaws.com] has joined #wesnoth-dev 20170403 19:40:26< travis-ci> wesnoth/wesnoth#13158 (wfl_memleak_fix_attempt - e4bf35d : Charles Dang): The build has errored. 20170403 19:40:26< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/218121554 20170403 19:40:26-!- travis-ci [~travis-ci@ec2-54-90-121-120.compute-1.amazonaws.com] has left #wesnoth-dev [] 20170403 19:46:32-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 19:47:08-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 19:48:16-!- mjs-de [~mjs-de@wh.Uni-Dortmund.DE] has quit [Remote host closed the connection] 20170403 19:49:40-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 19:49:47-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 19:49:56-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 19:52:16-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 19:56:48-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170403 19:56:59-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 240 seconds] 20170403 19:57:20-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170403 19:57:21-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 19:58:01-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 19:58:11-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 20:01:02-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 20:01:14-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 20:01:19-!- irker320 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20170403 20:03:25-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20170403 20:07:28-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 20:10:49-!- noy_ [~Noy@184.69.143.198] has joined #wesnoth-dev 20170403 20:10:57-!- noy_ [~Noy@184.69.143.198] has quit [Changing host] 20170403 20:10:57-!- noy_ [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 20:11:44-!- Duthlet [~Duthlet@dslb-188-106-146-119.188.106.pools.vodafone-ip.de] has quit [Ping timeout: 260 seconds] 20170403 20:12:04-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 256 seconds] 20170403 20:12:04-!- noy_ is now known as noy 20170403 20:20:05-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has joined #wesnoth-dev 20170403 20:23:07< vultraz_iOS> celticminstrel: must be a msvc problem then 20170403 20:25:44-!- knotwork__ [~markm@99.192.88.10] has quit [Ping timeout: 260 seconds] 20170403 20:50:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170403 20:50:53-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170403 21:08:16-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection] 20170403 21:08:25-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has joined #wesnoth-dev 20170403 21:11:33-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has quit [Read error: Connection reset by peer] 20170403 21:14:27-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 21:20:20-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 21:25:29-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has joined #wesnoth-dev 20170403 21:33:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 21:33:54-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 21:34:27-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 21:34:33-!- Greg-Bog_ [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 21:50:57-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20170403 22:05:24-!- Shiki [~Shiki@p548575EF.dip0.t-ipconnect.de] has quit [Quit: Verlassend] 20170403 22:07:28-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection] 20170403 22:10:07-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has joined #wesnoth-dev 20170403 22:11:47-!- atarocch [~atarocch@46.29.219.219] has quit [Ping timeout: 260 seconds] 20170403 22:23:51-!- SigurdFD [~SigurdFD@dynamic-acs-72-23-110-196.zoominternet.net] has joined #wesnoth-dev 20170403 22:28:35-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20170403 22:31:21-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 22:31:31-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Read error: Connection reset by peer] 20170403 22:32:22-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170403 22:32:49-!- Greg-Bog_ [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170403 22:33:05-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170403 22:35:29-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 22:52:08-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20170403 22:53:28-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20170403 23:01:16-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20170403 23:17:45-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170403 23:17:50-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 23:22:11-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has quit [Read error: Connection reset by peer] 20170403 23:23:18-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has joined #wesnoth-dev 20170403 23:28:22-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 23:28:30-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Remote host closed the connection] 20170403 23:28:42-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev 20170403 23:33:48-!- ToBeFree [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20170403 23:45:57-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170403 23:57:18-!- RatArmy_ [~ratarmy@om126212084036.11.openmobile.ne.jp] has joined #wesnoth-dev --- Log closed Tue Apr 04 00:00:07 2017