--- Log opened Tue May 09 00:00:18 2017 20170509 00:00:44-!- irker123 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170509 00:00:44< irker123> wesnoth: Celtic Minstrel wesnoth:login_save_crypt 3869261953fb / / (29 files in 10 dirs): Don't store the user's password in plaintext in the prefs file https://github.com/wesnoth/wesnoth/commit/3869261953fb572f02c7ef8d358b17c485c07836 20170509 00:00:44< irker123> wesnoth: Celtic Minstrel wesnoth:login_save_crypt 7c7d30982743 / / (22 files in 9 dirs): Add OpenSSL's libcrypto as a dependency https://github.com/wesnoth/wesnoth/commit/7c7d30982743319ee8345aea29e18cbabd428131 20170509 00:00:45< irker123> wesnoth: Celtic Minstrel wesnoth:login_save_crypt 584e9899a2e5 / src/preferences/credentials.cpp: Use RC4 cipher for encrypting the password data. https://github.com/wesnoth/wesnoth/commit/584e9899a2e57e04c35095c9db9f3c2aeb682a47 20170509 00:00:46< irker123> wesnoth: Celtic Minstrel wesnoth:login_save_crypt dce2791b3b28 / src/preferences/credentials.cpp: Use RAII for all that zero-filling https://github.com/wesnoth/wesnoth/commit/dce2791b3b28feced0b521a795ba20e050ca30b0 20170509 00:00:59-!- celmin [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20170509 00:00:59-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Disconnected by services] 20170509 00:00:59-!- celmin is now known as celticminstrel 20170509 00:03:49-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has quit [Ping timeout: 240 seconds] 20170509 00:04:57-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has joined #wesnoth-dev 20170509 00:06:14< celticminstrel> Ooh, I wonder if I should add something like "wesnoth.formula_escape" which escapes a string so that it can be quoted in WFL code. 20170509 00:06:44< celticminstrel> On the other hand, it might be better to just handle that sort of thing in the object passed to a formula... 20170509 00:12:53-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 00:13:25-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 00:25:43-!- Greg-Boggs [~greg_bogg@c-73-37-6-51.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170509 00:26:16-!- Greg-Boggs [~greg_bogg@c-73-37-6-51.hsd1.or.comcast.net] has joined #wesnoth-dev 20170509 00:27:07-!- atarocch [~atarocch@2.43.222.171] has quit [Remote host closed the connection] 20170509 00:30:27-!- Greg-Boggs [~greg_bogg@c-73-37-6-51.hsd1.or.comcast.net] has quit [Ping timeout: 240 seconds] 20170509 00:32:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 00:37:38-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20170509 00:59:09-!- sevu [~Unknown@p5485767C.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170509 01:05:25-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 01:05:57-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 01:15:50< celticminstrel> Randomly, I wonder why the Windows OpenSSL calls it libeay instead of libcrypto. 20170509 01:31:27-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20170509 01:31:53-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170509 01:39:28-!- gfgtdf_ [~chatzilla@x4e32b7a1.dyn.telefonica.de] has joined #wesnoth-dev 20170509 01:40:03-!- gfgtdf [~chatzilla@x4e3639cc.dyn.telefonica.de] has quit [Read error: Connection reset by peer] 20170509 01:40:07-!- gfgtdf_ is now known as gfgtdf 20170509 02:08:48-!- sevu [~Unknown@p5485767C.dip0.t-ipconnect.de] has quit [Ping timeout: 240 seconds] 20170509 02:19:26-!- gfgtdf [~chatzilla@x4e32b7a1.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170504105526]] 20170509 03:01:08-!- irker123 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20170509 03:15:24-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 03:19:28-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 245 seconds] 20170509 04:17:46-!- JyrkiVesterinen [~JyrkiVest@87-100-215-189.bb.dnainternet.fi] has joined #wesnoth-dev 20170509 05:01:36< vultraz_iOS> celticminstrel: any objections if i change '#pragma once' to include guards. or would you prefer we used once more widely. 20170509 05:02:10< celticminstrel> I think it would be ridiculous to change "#pragma once" to include guards. 20170509 05:02:30< vultraz_iOS> consistency? 20170509 05:02:35< celticminstrel> I don't think there's any point doing the reverse either, but if you have to pick one, I'd pick includes guards to "#pragma once". 20170509 05:02:53< celticminstrel> I really don't think consistency is that important in this case, but whatever. 20170509 05:02:59< vultraz_iOS> well, ill at least change them in gui/ 20170509 05:03:18< celticminstrel> IIRC there was a time when some compilers didn't support "#pragma once", but I'd assume that time is long past now? 20170509 05:03:49< vultraz_iOS> apparently 20170509 05:04:45-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 05:08:49-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 240 seconds] 20170509 05:15:09< vultraz_iOS> interesting thing: https://github.com/nlohmann/json 20170509 05:15:38< celticminstrel> . . . 20170509 05:15:59< vultraz_iOS> what? i just said it was interesting 20170509 05:17:43< celticminstrel> The commit messages are bad enough. The header in the readme is ten thousand times worse. 20170509 05:18:13< vultraz_iOS> heh 20170509 05:20:01< vultraz_iOS> still, aside from that it's quite interesting. 20170509 05:20:33< vultraz_iOS> kinda looks like more feature-full config. 20170509 05:21:02< vultraz_iOS> i wonder how they implemented conversion from stl containers.. 20170509 05:21:58< celticminstrel> ...that's what you're wondering about? 20170509 05:22:36< vultraz_iOS> probably bunch of different ctors. 20170509 05:23:10< celticminstrel> Could probably be done with just two templated constructors. 20170509 05:23:26< vultraz_iOS> oh hey. "The library is currently used in Apple macOS Sierra and iOS 10." 20170509 05:23:43< celticminstrel> One for maps, and one for everything else. 20170509 05:24:06< vultraz_iOS> hm, possibly 20170509 05:24:08< celticminstrel> Might even be doable without specializing for maps. 20170509 05:24:29< celticminstrel> Wait, no, if you did that it'd treat a vector of pairs as a map. 20170509 05:27:24< vultraz_iOS> I wonder if we should add something like that to config. I can think of quite a few places where we construct a config from an stl container. 20170509 05:28:01< celticminstrel> Really? 20170509 05:30:06< vultraz_iOS> I think so 20170509 05:30:12< vultraz_iOS> no way to really check, though 20170509 05:30:18< vultraz_iOS> it's ungreppable 20170509 05:30:29< celticminstrel> Hmm. 20170509 05:30:54< celticminstrel> Well, it's relatively easy to find all places where a config is constructed. 20170509 05:31:17< celticminstrel> ...assuming that works on constructors. I think I've only used it on normal functions. 20170509 05:32:40< vultraz_iOS> though I guess in most cases there's existing permutation meaning it perhaps wouldn't be that useful 20170509 05:33:55< celticminstrel> Sorry, what? 20170509 05:35:15< vultraz_iOS> i imagine most places that populate a config while iterating over a container do some modifications/checks to the data in the container before adding it to the config 20170509 05:38:04< vultraz_iOS> plus, config uses k/v pairs, meaning container ctors wouldn't be really useful since you aren't specifying keys 20170509 05:38:42< celticminstrel> Speaking of k/v pairs, I wonder if we should make config store them in input order. 20170509 05:38:43< vultraz_iOS> the json code example has the container ctors returning something like [1,2,3,4]. We don't support that. 20170509 05:38:53< celticminstrel> IIRC it currently uses std::map? 20170509 05:38:58< celticminstrel> Which means lexicographical order. 20170509 05:39:35< vultraz_iOS> well all output i see has it alphabetical, yes 20170509 05:40:32< vultraz_iOS> nice for debugging 20170509 05:41:28< celticminstrel> Why is that nice for debugging? 20170509 05:41:49< vultraz_iOS> well, like it's easy to find keys in the gamestate inspector 20170509 05:43:11< vultraz_iOS> so basically, only good if you're reading user-visible data dumps 20170509 05:43:46< vultraz_iOS> would config be faster with an unordered_mao? 20170509 05:43:48< vultraz_iOS> map 20170509 05:44:41< celticminstrel> map is O(logn) for all lookups. 20170509 05:45:00< celticminstrel> unordered_map is O(1) best case, but O(n) worst case. 20170509 05:45:26< vultraz_iOS> so, could be faster, but could also be slower 20170509 05:45:30< celticminstrel> Right. 20170509 05:45:36< celticminstrel> One way of implementing an unordered_map is to have an array of arrays. 20170509 05:45:56< celticminstrel> You calculate the hash of the key, and use that as the index in the first array. 20170509 05:46:05< celticminstrel> Then you search that for the mathing pair. 20170509 05:46:09< celticminstrel> ^matching 20170509 05:46:22< celticminstrel> So if every value had the same hash, that's the worst-case scenario. 20170509 05:46:50< celticminstrel> I don't know how likely the worst-case is in practice. 20170509 05:48:56-!- Kwandulin [~Kwandulin@p200300760F6D800C2444895970AEFE5B.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170509 05:50:35< vultraz_iOS> how did I even get here.. 20170509 05:51:22< vultraz_iOS> oh right, I guess that would require an initializer list 20170509 05:52:01< pydsigner> I'd just like to take this moment 20170509 05:52:18< pydsigner> To note that I have 2600 unread emails in my normally 0 inbox 20170509 05:52:59< vultraz_iOS> yay, we've made you look busy 20170509 05:53:17< pydsigner> ~_~ 20170509 05:53:44< pydsigner> Is this going to be a consistent thing now? 20170509 05:54:02< vultraz_iOS> what? 20170509 05:54:22< pydsigner> That's 48 hours of wesnoth emails 20170509 05:54:24< vultraz_iOS> no, we're not going to be copying All The Bugs on a regular basis 20170509 05:54:30< vultraz_iOS> which, speaking of which 20170509 05:54:35< vultraz_iOS> celticminstrel: thanks for working on that 20170509 05:55:58< celticminstrel> pydsigner: Don't worry, it was a one-time thing and is over now. 20170509 05:57:37< celticminstrel> pydsigner: That said, you'll continue to receive notifications as they come in normally, of course. 20170509 05:58:33< vultraz_iOS> ah, nevermind. this is too complex for me yet. 20170509 05:58:47< celticminstrel> vultraz_iOS: I tried the initializer_list thing before and couldn't get it to work. 20170509 05:58:55< vultraz_iOS> exactly 20170509 05:59:09< vultraz_iOS> if you can't make it work then I certainly can't 20170509 05:59:16< celticminstrel> I think attribute_value is partly to blame. 20170509 06:02:34< celticminstrel> I wonder if a variadic approach could work better... 20170509 06:03:32< vultraz_iOS> what i was wondering if a variadic ctor could somehow eliminate the need for config_of when creating configs in containers 20170509 06:04:11< celticminstrel> I can't remember if I tried that, initializer_list, or both, but think I do recall getting template type deduction errors... 20170509 06:05:14< celticminstrel> I might try it again at some point. 20170509 06:05:34< celticminstrel> There's also the possibility that XCode 4 was to blame. 20170509 06:06:06< celticminstrel> I wonder what operating systems users are using... particularly non-Linux users... 20170509 06:06:10< celticminstrel> Like, what version. 20170509 06:06:23< celticminstrel> I bet there are still more than you'd expect on WinXP. 20170509 06:06:38< vultraz_iOS> im just not sure how it would work at all... take something like this: 20170509 06:06:41< vultraz_iOS> mod_menu_values.emplace_back(config_of("label", mod->name)("checkbox", active)); 20170509 06:06:52< vultraz_iOS> I imagine we could somehow do 20170509 06:07:04< vultraz_iOS> mod_menu_values.emplace_back({"label", mod->name}{"checkbox", active}); 20170509 06:07:09< vultraz_iOS> but what exactly is {} initializing 20170509 06:07:15< celticminstrel> You forgot a comma between the }{ 20170509 06:07:25< vultraz_iOS> I imagine a pair 20170509 06:07:29< vultraz_iOS> but how does the compiler know that 20170509 06:08:42< celticminstrel> You'd be calling either config(initializer_list>) or template config(pair... args) 20170509 06:09:53< vultraz_iOS> and what about { "tag" { "key", value }} 20170509 06:10:05< celticminstrel> That's the hard part. 20170509 06:10:33< celticminstrel> The way I was thinking just now it'd look like { "tag", config({"key", value})} 20170509 06:13:29 * vultraz_iOS is looking to see how that json lib does it 20170509 06:14:07< vultraz_iOS> doesn't seem to be obvious at all 20170509 06:16:06< vultraz_iOS> heh 20170509 06:16:20< vultraz_iOS> / a way to express an _array_ of key/value pairs [["currency", "USD"], ["value", 42.99]] 20170509 06:16:21< vultraz_iOS> json array_not_object = { json::array({"currency", "USD"}), json::array({"value", 42.99}) }; 20170509 06:16:26< vultraz_iOS> basically what you just said xD 20170509 06:21:29-!- irker989 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170509 06:21:29< irker989> wesnoth: Charles Dang wesnoth:master 737916eaab5f / src/gui/ (5 files in 2 dirs): GUI2: use include guards consistently https://github.com/wesnoth/wesnoth/commit/737916eaab5f9253793a26d24e687b20515d251c 20170509 06:22:02< celticminstrel> Didn't I say not to do that? 20170509 06:22:20< celticminstrel> Why are we stepping back to an older paradigm again? 20170509 06:22:42< JyrkiVesterinen> Note about the idea of using std::unordered_map in config: unordered_map uses more memory. 20170509 06:22:58< JyrkiVesterinen> Essentially, a hash map is a trade-off that trades memory for speed. 20170509 06:23:38< celticminstrel> I don't think I actually suggested that, but I suppose it could be read as though I was. 20170509 06:23:54< celticminstrel> I wasn't speaking against it either, mind you... 20170509 06:24:11< celticminstrel> And I suppose the idea of storing keys in input order may actually imply it... 20170509 06:24:56< celticminstrel> Or at least, Java's solution to that is (IIRC) a hash map coupled with a list for consistent iteration order. 20170509 06:25:34 * celticminstrel prods vultraz_iOS with the pointy stick. 20170509 06:26:27-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170509 06:32:28< vultraz_iOS> celticminstrel: you said you preferred include guards over pragma 20170509 06:32:29< vultraz_iOS> :| 20170509 06:32:44< celticminstrel> I never said any such thing. 20170509 06:32:48< celticminstrel> In fact I said the exact opposite. 20170509 06:32:55< vultraz_iOS> wait what 20170509 06:33:09< celticminstrel> [May 09@01:02:10am] celticminstrel: I think it would be ridiculous to change "#pragma once" to include guards. 20170509 06:33:09< celticminstrel> [May 09@01:02:35am] celticminstrel: I don't think there's any point doing the reverse either, but if you have to pick one, I'd pick includes guards to "#pragma once". 20170509 06:33:21< vultraz_iOS> ohh... 20170509 06:33:23< vultraz_iOS> blah 20170509 06:33:31< vultraz_iOS> i misread and thought you said "over" :| 20170509 06:33:40< celticminstrel> Ah. 20170509 06:33:56< celticminstrel> Looking at it again, I can see how it's a little ambiguous, so sorry about that. 20170509 06:34:24< celticminstrel> I was thinking of it as "this is the action I'd choose if I had to choose" 20170509 06:35:14< vultraz_iOS> if you prefer pragma I can use that from now on. 20170509 06:35:33< vultraz_iOS> (if you really want I can convert all the include guards to pragma) 20170509 06:35:51< celticminstrel> I don't think there's much point in converting either way. 20170509 06:36:07< celticminstrel> But, well, you seem to like doing that sort of thing, so I won't stop you. 20170509 06:36:25< celticminstrel> IOW I'll leave it to you to decide whether to do it. 20170509 06:36:41-!- JyrkiVesterinen [~JyrkiVest@87-100-215-189.bb.dnainternet.fi] has quit [Quit: .] 20170509 06:51:30-!- celticminstrel is now known as celmin|sleep 20170509 06:51:31< vultraz_iOS> eh, I seem to enjoy doing pointless cleanup so I shall begin 20170509 06:51:37< vultraz_iOS> only ~600 files to change 20170509 06:53:05-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 06:57:35-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20170509 07:09:31-!- JyrkiVesterinen [~JyrkiVest@85-76-66-132-nat.elisa-mobile.fi] has joined #wesnoth-dev 20170509 07:11:10-!- atarocch [~atarocch@93.68.150.58] has joined #wesnoth-dev 20170509 07:42:57-!- atarocch [~atarocch@93.68.150.58] has quit [Ping timeout: 240 seconds] 20170509 07:52:50-!- grzywacz [~karol@wesnoth/developer/grzywacz] has joined #wesnoth-dev 20170509 07:54:27< DeFender1031> zookeeper, yes, anything I'd do to expand the syntax would be backwards compatible. 20170509 07:54:57< DeFender1031> celmin|sleep, I do not believe that you are correct about bracketed expansions being allowed to be nested at this time. 20170509 07:55:49-!- atarocch [~atarocch@37.177.120.12] has joined #wesnoth-dev 20170509 08:07:13< zookeeper> eh, why does it not match up... 20170509 08:07:14< zookeeper> error general: Square bracket lengths do not match up: terrain/misc/smoke-A[01,02,03,04,05,06,07,08,09,10,11,12].png~SCALE(72,[144~288]):[200*12] 20170509 08:07:20< zookeeper> (also tried with just plain :200 first) 20170509 08:08:00< zookeeper> i mean it worked if i used A[01~12] and used an individual values list in SCALE 20170509 08:08:05< zookeeper> so why doesn't it work the other way around 20170509 08:16:53< DeFender1031> 144~288 isn't 12 20170509 08:18:27< DeFender1031> This is where my "best fit" idea would come in handy 20170509 08:19:09< zookeeper> 01~12 isn't 12 either 20170509 08:19:15< zookeeper> oh wait 20170509 08:19:16< zookeeper> it is :D 20170509 08:19:44< zookeeper> i wasn't thinking of it in the most obvious way 20170509 08:20:13< zookeeper> yeah i just somehow assumed it worked in a best fit'ish way already 20170509 08:41:23-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 08:42:06< irker989> wesnoth: Charles Dang wesnoth:master 2101353d36b9 / src/ (571 files in 51 dirs): Convert include guards to the shorter `#pragma once` https://github.com/wesnoth/wesnoth/commit/2101353d36b9a49088ea79cc73ceffeb026e7c70 20170509 08:43:12-!- Kwandulin [~Kwandulin@p200300760F6D800C2444895970AEFE5B.dip0.t-ipconnect.de] has quit [Quit: [endlevel] result=novictorynodefeatjustquit [/endlevel]] 20170509 08:43:28-!- Rhonda [~rhonda@anguilla.debian.or.at] has quit [Changing host] 20170509 08:43:28-!- Rhonda [~rhonda@wesnoth/developer/rhonda] has joined #wesnoth-dev 20170509 08:44:40-!- Rhonda [~rhonda@wesnoth/developer/rhonda] has quit [Quit: Going down the drain....] 20170509 08:44:50-!- Rhonda [~rhonda@wesnoth/developer/rhonda] has joined #wesnoth-dev 20170509 08:46:05< DeFender1031> zookeeper, that would seem to indicate support for the idea. 20170509 08:46:12< DeFender1031> at least in the context of animationey stuff. 20170509 08:46:27-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 272 seconds] 20170509 08:46:42< DeFender1031> (celmin and I were wondering last night if there are places other than animations where bracket syntax is used where best fit may be less intuitive) 20170509 09:04:50-!- JyrkiVesterinen [~JyrkiVest@85-76-66-132-nat.elisa-mobile.fi] has quit [Quit: .] 20170509 09:27:05< zookeeper> one cutscene-related problem that would be great to have some kind of solution to: say you animate a unit dying with [animate_unit] and thus of course want to [kill] it away immediately afterwards. the unit still flickers in for one frame between the [animate_unit] and [kill]. 20170509 09:27:24< zookeeper> that's just one example, there's plenty of other cases where you can't easily avoid a one-frame redraw glitch like that. 20170509 09:27:46< DeFender1031> that was not true in 1.12 20170509 09:27:58< zookeeper> oh? 20170509 09:28:06< DeFender1031> yep. I do that all the time. 20170509 09:28:17< DeFender1031> I had noticed that in 1.13 and was going to bring it up at some point. 20170509 09:28:31< DeFender1031> for example, the opening to scenario 2 in my campaign. 20170509 09:29:18< DeFender1031> or Aragust's teleport out at the end of 6. 20170509 09:29:40< DeFender1031> I would consider it a bug for the game to be performing a redraw at that point. 20170509 09:31:20< DeFender1031> if the next action is a message or a move_unit or something that lasts longer than however many cpu cycles it takes to perform the action itself, then sure, obviously there should be a redraw, but if the next action is one that is instantaneous, then it should not. 20170509 09:33:03< zookeeper> the new [kill] implementation has a wesnoth.wml_actions.redraw{} that always executes, so maybe that's the cause in this case 20170509 09:33:05< DeFender1031> meaning, instead of doing an immediate redraw after an animation, some "redraw needed" flag should be set and then before performing SPECIFIC actions, should be checked and performed if necessary. 20170509 09:33:14-!- JyrkiVesterinen [~JyrkiVest@85-76-66-132-nat.elisa-mobile.fi] has joined #wesnoth-dev 20170509 09:33:16< DeFender1031> Then again, I'm just guessing at what the code there might be. 20170509 09:33:34< DeFender1031> that might be it too. 20170509 09:34:24< DeFender1031> this is the kind of stuff I was referring to when I mentioned that there are a lot of subtle changes in timing and redrawing in 1.13 that affect the way animations function. 20170509 09:34:35< zookeeper> seems like that's it. maybe celmin|sleep can move it so that it's executed only when a redraw is actually needed (like if the kill is animated, etc) 20170509 09:35:08< DeFender1031> right, exactly. a redraw should only be performed before an animation or some other sort of pause in execution 20170509 09:35:14< DeFender1031> (such as a message) 20170509 09:35:20< DeFender1031> (or a gui dialog) 20170509 09:35:52< DeFender1031> oh, also on unstore_unit might be the same issue. 20170509 09:36:07< DeFender1031> if you're unstoring a unit and then triggering a teleport_in 20170509 09:36:20< DeFender1031> you want the unit to be invisible until after the animation 20170509 09:36:26< JyrkiVesterinen> There is a way to block redraws in C++: https://github.com/wesnoth/wesnoth/blob/master/src/video.hpp#L133-L138 20170509 09:36:31< DeFender1031> so there too you don't want a redraw between the two 20170509 09:36:36< JyrkiVesterinen> Although it's not accessible from WML AFAIK. 20170509 09:37:15< DeFender1031> JyrkiVesterinen, should be simple enough to add a [lock_updates] and [unlock_updates] WML tag then, no? 20170509 09:37:38< JyrkiVesterinen> Well, it may be too powerful to allow WML to call it at any point. 20170509 09:37:56< DeFender1031> why's that? 20170509 09:38:04< JyrkiVesterinen> I can imagine a malicious add-on that blocks screen redrawing infinitely. 20170509 09:38:37< DeFender1031> then you don't install that add on 20170509 09:38:49< DeFender1031> there are all sorts of malicious things add ons can do 20170509 09:38:54< zookeeper> i don't think that's how avoiding malicious add-ons work :> 20170509 09:39:02< DeFender1031> I could make an add on that kills all of your units on the first turn. 20170509 09:39:08< zookeeper> JyrkiVesterinen, would that block even menus and esc-quit-dialog and such? 20170509 09:39:13< JyrkiVesterinen> Yes. 20170509 09:39:20< DeFender1031> ah 20170509 09:39:27< DeFender1031> then yeah, that would be 20170509 09:39:30< zookeeper> hmh. would be more convenient if it would only block gamemap drawing. 20170509 09:39:47< DeFender1031> what we want really is- yeah, what zookeeper said. 20170509 09:39:50< DeFender1031> on the other hand 20170509 09:40:06< DeFender1031> we wouldn't need that at all if the redraw timing was arranged properly 20170509 09:40:38< zookeeper> i was going to suggest that maybe it could be a container tag like [command] so unlocking can't be forgotten or missed, but that could still end up with the game locked up 20170509 09:40:56< DeFender1031> IMO, the only times redraws should be triggered is A: if there has been a change made that would require it and B: right before an extended action. 20170509 09:41:08< zookeeper> sure 20170509 09:41:33< DeFender1031> if that were followed in every case, then none of these situations would be an issue 20170509 09:42:33< DeFender1031> unstore_unit would not automatically trigger a redraw, the animate unit would run and redraw internally. The end of an animate unit would not trigger a redraw, and [kill] could be called without the unit reappearing, etc. 20170509 09:43:59< zookeeper> yeah, but i can imagine there could be lots of cases where if, for example, the end of [animate_unit] doesn't automatically trigger a redraw, you can end up with some garbage that only disappears when you mouseover it or move a unit or whatever (or put in a manual [redraw]). 20170509 09:44:23< zookeeper> which can result in having to put in manual [redraw]s everywhere 20170509 09:44:55< DeFender1031> Again, won't happen unless there's a bunch of non-extended actions that take too long, in which case the interface is frozen up and unresponsive anyway 20170509 09:45:27< zookeeper> why wouldn't it happen at the end of an event? 20170509 09:45:34< vultraz_iOS> when one has to use [redraw] is finicky 20170509 09:45:39< DeFender1031> ah 20170509 09:45:43< DeFender1031> you are correct 20170509 09:45:46< zookeeper> tag does stuff, doesn't auto-redraw, events end 20170509 09:46:04< DeFender1031> either before a non-instantaneous action OR at the end of an event. 20170509 09:46:40< DeFender1031> yes, of course, the end of an event also counts as a point where the screen enters an extended period of being in the current drawn state 20170509 09:47:01< DeFender1031> vultraz_iOS, what I'm saying is that it doesn't have to be, if this rule were adopted. 20170509 09:47:13< zookeeper> then you still can't avoid redraws if you for example trigger an event from another event. when the inner event ends, you'd get a redraw. 20170509 09:47:44< DeFender1031> zookeeper, that could be handled in code too. 20170509 09:47:44< vultraz_iOS> well i broke tests... 20170509 09:48:21< DeFender1031> zookeeper, meaning, the code could say "at the end of an event, meaning at the end of a COMPLETE event, not a sub-triggered one" 20170509 09:48:59< DeFender1031> zookeeper, also, that wouldn't be so terrible even if not, as events ought to be self-contained, and therefore a redraw at the end of an inner one should not interfere with an outer one anyway. 20170509 09:49:02< vultraz_iOS> hmmm 20170509 09:49:12< DeFender1031> that said, it could still be avoided in code anyway. 20170509 09:49:19< vultraz_iOS> looks like lexical_cast.hpp can be included more than once... 20170509 09:49:26< zookeeper> of course, i generally agree that actions should cause redraws only if necessary so for example [kill] shouldn't always redraw (or should it? it shouldn't redraw before removing the unit, but it needs to redraw afterwards unless you want the removed unit to potentially linger on) 20170509 09:49:40< zookeeper> DeFender1031, sure, i'm not saying it's a bad idea 20170509 09:50:45< DeFender1031> then what are you saying? 20170509 09:51:30< zookeeper> that the floor is potentially littered with cans of worms to trip on :> 20170509 09:53:21< DeFender1031> because of the way the code is currently structured, or because of something inherent in the problem? 20170509 09:53:41< zookeeper> i don't know 20170509 09:53:47< DeFender1031> Because I'd argue that the latter is not true. 20170509 09:54:15< DeFender1031> Almost by definition, the only time a redraw is needed is where the screen is actually going to be viewed in the current state. 20170509 09:54:58< DeFender1031> The only time the screen is viewed in the current state is during an animation, a UI message or dialog, or at the end of an event's execution. 20170509 09:55:19< DeFender1031> Hence, the only time an automatic redraw should be performed is right before one of those times. 20170509 09:56:01< DeFender1031> there's no reason why if I'm unstoring 30 units, the game should pause between each one to draw them one at a time. 20170509 09:56:10< zookeeper> sure, i can buy that 20170509 09:56:35< DeFender1031> (unless it's an animated unstore, but as I said, that's one of the situations where the screen's current state will be visisble.) 20170509 09:56:54< DeFender1031> anyway, I gotta run out for a bit. Think it over, but I'm convinced that I'm right about this. 20170509 10:11:07< irker989> wesnoth: Charles Dang wesnoth:master b461854f3f23 / src/lexical_cast.hpp: Revert 2101353 for lexical_cast header https://github.com/wesnoth/wesnoth/commit/b461854f3f237eae47b086d98649a27b6b97080f 20170509 10:29:38-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 10:33:57-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 240 seconds] 20170509 10:39:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 10:52:06-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20170509 10:54:20-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170509 11:39:09-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 11:39:42-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 11:54:37-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170509 11:54:44-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170509 11:55:57-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has quit [Ping timeout: 240 seconds] 20170509 12:09:51-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has joined #wesnoth-dev 20170509 12:12:30-!- Kwandulin [~Kwandulin@p200300760F6D800C9454F671BEC49AF0.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170509 12:17:54-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 12:22:11-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 255 seconds] 20170509 12:24:19-!- Kwandulin [~Kwandulin@p200300760F6D800C9454F671BEC49AF0.dip0.t-ipconnect.de] has quit [Ping timeout: 272 seconds] 20170509 12:30:11-!- Kwandulin [~Kwandulin@p200300760F6D80419454F671BEC49AF0.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170509 12:31:43-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 12:32:16-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 12:37:22< vultraz_iOS> wait, when did celmin|sleep fix the tests 20170509 12:37:42< vultraz_iOS> i just realized they've been fixed 20170509 12:38:29< JyrkiVesterinen> https://github.com/wesnoth/wesnoth/commit/b5a0ef7e4d5bc8ec75b2942d689250eb3a5d40de 20170509 12:39:01< vultraz_iOS> ah, I see 20170509 12:39:07-!- gfgtdf [~chatzilla@x4e32b7a1.dyn.telefonica.de] has joined #wesnoth-dev 20170509 12:44:21< gfgtdf> vultraz_iOS: usually unorderd maps are faster than std::map, i think one of the main reasons why config still uses std::map is that changing it would also require updating the simple_wml class which assumes the attibutes to be in aphabetical order. 20170509 12:44:38< vultraz_iOS> ..but why 20170509 12:44:46< vultraz_iOS> does it assume that 20170509 12:44:47< vultraz_iOS> that is 20170509 12:46:20< gfgtdf> vultraz_iOS: possibly just for performance not sure though 20170509 12:49:57< Soliton> all of simple_wml is just for performance pretty much. 20170509 12:52:11< gfgtdf> vultraz_iOS: i also think that #1020 is a problem in the lua music api code, 20170509 12:52:27< vultraz_iOS> oh? 20170509 12:53:00< gfgtdf> vultraz_iOS: mostlikley lua gte a copy of those shared_prt but never destructs them 20170509 12:53:05< gfgtdf> gets a copy* 20170509 12:54:15< vultraz_iOS> hmm 20170509 12:59:02< vultraz_iOS> why did celmin|sleep name anther class music_track 20170509 12:59:55< gfgtdf> vultraz_iOS: ye maybe it shodul be renamed to lua_unit_track. 20170509 13:00:09< vultraz_iOS> you mean music? 20170509 13:00:17< gfgtdf> vultraz_iOS: yes 20170509 13:00:25< gfgtdf> vultraz_iOS: ith the other one beeing in sound:: the name doenst clash but it woudl still be clearer 20170509 13:02:04< vultraz_iOS> ok 20170509 13:02:17< vultraz_iOS> so it looks like lua_music_track owns a shared_ptr 20170509 13:02:34< gfgtdf> ok 20170509 13:02:40< vultraz_iOS> gfgtdf: i wonder if i can just add a dtor here and clear it? 20170509 13:02:45< vultraz_iOS> i dunno how this lua stuff works 20170509 13:04:13< gfgtdf> vultraz_iOS: no te detor of lua_music_track will automatically call teh detor of shared_ptr 20170509 13:04:17< vultraz_iOS> hm 20170509 13:04:27< gfgtdf> vultraz_iOS: the point is that tah dtor of lua_music_track might not get called# 20170509 13:04:35< vultraz_iOS> right 20170509 13:04:39< vultraz_iOS> but i dunno the code 20170509 13:04:42< vultraz_iOS> so i can'tse where 20170509 13:05:44< gfgtdf> liek its done for lua units https://github.com/wesnoth/wesnoth/blob/master/src/scripting/lua_unit.cpp#L216 20170509 13:05:49< irker989> wesnoth: Charles Dang wesnoth:master 98da5cf2cf67 / src/scripting/lua_audio.cpp: Renamed second music_track class for clarity https://github.com/wesnoth/wesnoth/commit/98da5cf2cf6778bb5a798392dba397d206a8fd8f 20170509 13:09:55< vultraz_iOS> gfgtdf: https://github.com/Vultraz/wesnoth/commit/1e40d5c8a14531b7221397d91e84dacd5f4ce711 ? 20170509 13:10:52< JyrkiVesterinen> Merely pushing the function to the Lua stack isn't sufficient. 20170509 13:11:00< JyrkiVesterinen> You need to assign it to the __gc field. 20170509 13:11:00< vultraz_iOS> :/ 20170509 13:11:39< gfgtdf> vultraz_iOS: just use teh track_callbacks array below 20170509 13:12:34< vultraz_iOS> https://github.com/Vultraz/wesnoth/commit/ee49c0286b79829eead79f57189504050dde5316 ? 20170509 13:12:45< gfgtdf> ye 20170509 13:13:07< irker989> wesnoth: Charles Dang wesnoth:master ee49c0286b79 / src/scripting/lua_audio.cpp: Properly clean up lua_music_track object https://github.com/wesnoth/wesnoth/commit/ee49c0286b79829eead79f57189504050dde5316 20170509 13:17:31< vultraz_iOS> i swear the lua c++ interface isn't pretty at all 20170509 13:17:47< JyrkiVesterinen> Agreed. 20170509 13:18:04< JyrkiVesterinen> It's an extremely low-level interface. Not far from machine code. 20170509 13:18:52< JyrkiVesterinen> One game I have worked on used SWIG ( http://swig.org/ ) for interaction between Lua and C++. 20170509 13:18:59< JyrkiVesterinen> It was a way better experience for me. 20170509 13:20:11< vultraz_iOS> huh 20170509 13:20:43< vultraz_iOS> wrapper for 20 languages o_O 20170509 13:24:16-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 13:24:18< loonycyborg> JyrkiVesterinen: did that game support lua only? or it used other languages too? 20170509 13:24:32< JyrkiVesterinen> We used only Lua for scripting. 20170509 13:24:49-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 13:25:04< loonycyborg> How easy would it be to use several languages at the same time for a game? 20170509 13:25:56< vultraz_iOS> we already do that... :P 20170509 13:26:04< JyrkiVesterinen> AFAIK, there shouldn't be any problem with that. Just run SWIG multiple times, once for every scripting language. 20170509 13:26:44< loonycyborg> hmm but it all depends on how you actually load that code in engine 20170509 13:27:45 * zookeeper wonders how hard it would be to enable some kind of output to display the memory footprint of animations 20170509 13:28:33< gfgtdf> loonycyborg: you think about enabling anoter language in wesnoth ? 20170509 13:28:35< vultraz_iOS> if you want that go use anura. :| we have nothing of the sort. or the ability to implement it. 20170509 13:29:06< loonycyborg> yup, I was just wondering how hard would that be 20170509 13:29:54< loonycyborg> assuming wesnoth used swig which it doesn't :P 20170509 13:37:59-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has quit [Read error: Connection reset by peer] 20170509 13:38:25-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has joined #wesnoth-dev 20170509 13:38:36< vultraz_iOS> could it? 20170509 13:38:39< vultraz_iOS> if desired? 20170509 13:38:58< JyrkiVesterinen> I think it would be just way too much work at this point. 20170509 13:39:23< JyrkiVesterinen> A lot of effort has been spent on the existing Lua interface. Duplicating it with SWIG would be a huge task. 20170509 13:40:40< vultraz_iOS> granted 20170509 13:41:43< zookeeper> DeFender1031, oh, duh, i'm an idiot. of course the lightbeam animation is how it is because dacyn is not necessarily _adjacent_, so the regular animation won't work. -.- 20170509 13:42:45< zookeeper> too many cognitive lapses lately 20170509 13:44:24-!- sevu [~Unknown@pD954C1B8.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170509 13:46:26< DeFender1031> zookeeper, ah, didn't realize that. I had seemed to remember him needing to be the one to strike the final blow. 20170509 14:45:43-!- mkdroid [~null@unaffiliated/matthiaskrgr] has joined #wesnoth-dev 20170509 14:48:40-!- JyrkiVesterinen [~JyrkiVest@85-76-66-132-nat.elisa-mobile.fi] has quit [Quit: .] 20170509 15:05:30-!- mkdroid [~null@unaffiliated/matthiaskrgr] has quit [Quit: I'll be back!] 20170509 15:26:41-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 15:56:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170509 15:57:42-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 16:13:24-!- irker989 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20170509 16:27:53-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170509 16:34:52-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has quit [Ping timeout: 240 seconds] 20170509 16:36:50-!- JyrkiVesterinen [~JyrkiVest@89-166-106-240.bb.dnainternet.fi] has joined #wesnoth-dev 20170509 16:45:04-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 16:46:56-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has joined #wesnoth-dev 20170509 16:55:42-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 16:56:14-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 16:57:52-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170509 17:04:24-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170509 17:05:02-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 17:05:09-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170509 17:08:29-!- Appveyor [~Appveyor@74.205.54.20] has joined #wesnoth-dev 20170509 17:08:29< Appveyor> The Battle for Wesnoth (Visual Studio 2017) - Release Charles Dang ee49c02: Properly clean up lua_music_track object Failed 20170509 17:08:29< Appveyor> Details: https://ci.appveyor.com/project/wesnoth/wesnoth-605wt/build/Wesnoth-VS2017-master-16 20170509 17:08:33-!- Appveyor [~Appveyor@74.205.54.20] has left #wesnoth-dev [] 20170509 17:25:33-!- irker260 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170509 17:25:33< irker260> wesnoth: gfgtdf wesnoth:master 45c1decc7167 / src/scripting/lua_audio.cpp: fixup ee49c0286b79829ee https://github.com/wesnoth/wesnoth/commit/45c1decc7167a79639d6bdcde0183d708273586b 20170509 17:31:59-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20170509 17:48:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 17:48:48-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 17:51:00< celmin|sleep> [May 09@05:27:05am] zookeeper: one cutscene-related problem that would be great to have some kind of solution to: say you animate a unit dying with [animate_unit] and thus of course want to [kill] it away immediately afterwards. the unit still flickers in for one frame between the [animate_unit] and [kill]. 20170509 17:51:01-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20170509 17:51:01< celmin|sleep> Why not just use [kill]animate=yes in that case? 20170509 17:51:02< celmin|sleep> [May 09@05:40:37am] zookeeper: i was going to suggest that maybe it could be a container tag like [command] so unlocking can't be forgotten or missed, but that could still end up with the game locked up 20170509 17:51:04< celmin|sleep> You mean if there was an error in the container tag? I'm not entirely sure, but I think that could be done safely, if you implemented the tag in C++ rather than Lua. (Note that locking updates would also cause [redraw] to have no effect, most likely.) 20170509 17:51:05< celmin|sleep> [May 09@05:55:19am] DeFender1031: Hence, the only time an automatic redraw should be performed is right before one of those times. 20170509 17:51:07< celmin|sleep> This would be easy to implement since most of those are tags implemented in Lua. (That would mean that people calling GUI dialogs from Lua would need to redraw manually though; on the other hand it probably wouldn't be hard to just add a redraw to the video_dispatch function...) 20170509 17:51:08< celmin|sleep> [May 09@08:59:02am] vultraz_iOS: why did celmin|sleep name anther class music_track 20170509 17:51:09< celmin|sleep> Because it represents a music track? >_> But lua_music_track works too. 20170509 17:51:11< celmin|sleep> [May 09@09:27:45am] • zookeeper wonders how hard it would be to enable some kind of output to display the memory footprint of animations 20170509 17:51:11< celmin|sleep> Sounds relatively simple to do? Would just need to figure out how. 20170509 17:51:37-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 17:55:43-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 245 seconds] 20170509 17:58:44-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 18:00:06-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170509 18:02:03-!- celmin|sleep is now known as celticminstrel 20170509 18:03:08< zookeeper> celticminstrel, "Why not just use [kill]animate=yes in that case?" <- well because i need to use other features of the [animate_unit] tag, such as [animate] 20170509 18:03:46< zookeeper> but as said i think in this specific case the problem is the redrawing that the kill implementation does even when it doesn't need to 20170509 18:17:52-!- sevu [~Unknown@pD954C1B8.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 20170509 18:35:15-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20170509 18:36:58-!- Appveyor [~Appveyor@74.205.54.20] has joined #wesnoth-dev 20170509 18:36:58< Appveyor> The Battle for Wesnoth (Visual Studio 2013) - Release Charles Dang ee49c02: Properly clean up lua_music_track object Failed 20170509 18:36:58< Appveyor> Details: https://ci.appveyor.com/project/wesnoth/wesnoth/build/Wesnoth-VS2013-master-334 20170509 18:37:02-!- Appveyor [~Appveyor@74.205.54.20] has left #wesnoth-dev [] 20170509 18:40:49-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 18:41:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 18:50:49< DeFender1031> "That would mean that people calling GUI dialogs from Lua would need to redraw manually" not true. The function to bring up a dialog could ALSO redraw. 20170509 18:51:17< celticminstrel> DeFender1031: I meant that putting the redraw in the WML tag implementation would mean that. 20170509 18:51:30< celticminstrel> Putting it in video_dispatch would mean they don't need to. 20170509 18:52:39-!- mkdroid [~null@unaffiliated/matthiaskrgr] has joined #wesnoth-dev 20170509 18:52:43< celticminstrel> I'm not sure if there are other places implicit redraws could be added (as opposed to adding a redraw call in the implementation of some WML tag). 20170509 18:52:48-!- mkdroid [~null@unaffiliated/matthiaskrgr] has quit [Client Quit] 20170509 18:54:13< DeFender1031> celticminstrel, if I were to draw up a list of all WML tags/attributes that would end up requiring a redraw based on those rules, would you be interested in going through the code, adding the redraw to each of those, and removing it everywhere else? 20170509 18:54:57< celticminstrel> I think I could handle that. 20170509 18:57:55< DeFender1031> There might also be some lua functions that it should get added to (both documented and undocumented). I can also list the documented ones, but I'm afraid that the undocumented ones will have to fall to you. (The pattern of what requires it and what doesn't is simple enough though.) 20170509 18:59:13< celticminstrel> I think all the undocumented functions are equivalent to a documented WML tag since I've now documented the map location functions. 20170509 18:59:34< celticminstrel> (Or, most of the map location functions; I didn't bother to document the vector operations and also left out one whose function I didn't understand.) 20170509 18:59:42< DeFender1031> then that solves that. 20170509 19:10:54-!- Appveyor [~Appveyor@74.205.54.20] has joined #wesnoth-dev 20170509 19:10:54< Appveyor> The Battle for Wesnoth (Visual Studio 2015) - Release Charles Dang ee49c02: Properly clean up lua_music_track object Failed 20170509 19:10:54< Appveyor> Details: https://ci.appveyor.com/project/wesnoth/wesnoth-7lnpw/build/Wesnoth-VS2015-master-331 20170509 19:10:58-!- Appveyor [~Appveyor@74.205.54.20] has left #wesnoth-dev [] 20170509 19:15:59-!- Appveyor [~Appveyor@74.205.54.20] has joined #wesnoth-dev 20170509 19:15:59< Appveyor> The Battle for Wesnoth (Visual Studio 2015) - Debug Charles Dang ee49c02: Properly clean up lua_music_track object Failed 20170509 19:15:59< Appveyor> Details: https://ci.appveyor.com/project/wesnoth/wesnoth-7lnpw/build/Wesnoth-VS2015-master-331 20170509 19:16:03-!- Appveyor [~Appveyor@74.205.54.20] has left #wesnoth-dev [] 20170509 19:21:33 * celticminstrel just asked GitHub to allow bz2 attachments. 20170509 19:34:22-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 19:34:54-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 19:48:04-!- grzywacz [~karol@wesnoth/developer/grzywacz] has quit [Ping timeout: 260 seconds] 20170509 19:49:25-!- grzywacz [~karol@89-70-220-218.dynamic.chello.pl] has joined #wesnoth-dev 20170509 20:00:15-!- Kwandulin [~Kwandulin@p200300760F6D80419454F671BEC49AF0.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170509 20:02:54-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170509 20:03:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 20:24:06-!- atarocch [~atarocch@37.177.120.12] has quit [Quit: Leaving] 20170509 20:26:00-!- irker260 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20170509 20:26:55-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170509 20:27:29-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170509 20:32:41-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170509 20:33:43-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 20:40:29-!- atarocch [~atarocch@37.177.120.12] has joined #wesnoth-dev 20170509 20:41:27-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20170509 20:55:27-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20170509 21:09:17-!- JyrkiVesterinen [~JyrkiVest@89-166-106-240.bb.dnainternet.fi] has quit [Quit: .] 20170509 21:21:50-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has joined #wesnoth-dev 20170509 21:30:07< vultraz_iOS> celticminstrel: did you see my comment about get vs checkuserdata 20170509 21:30:12-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20170509 21:32:21< celticminstrel> Not yet? 20170509 21:51:23-!- sevu [~Unknown@pD954C1B8.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170509 22:13:25< gfgtdf> i wonder why we actaull need the lua_music_track class and not directly store the shared_ptr the lua state ? 20170509 22:14:00< gfgtdf> in the lua state* 20170509 22:14:19< celticminstrel> I guess for the valid() function. 20170509 22:20:45< matthiaskrgr> gn 20170509 22:22:45< gfgtdf> celticminstrel: hmm maybe, the explicit call of operator -> 'track.operator->()' still looks strange though. 20170509 22:26:50< DeFender1031> wait... ->() is valid syntax?! 20170509 22:27:01< celticminstrel> Not quite. 20170509 22:34:17< celticminstrel> When the "operator" keyword is followed by a valid operator symbol or type name, the pair is semantically an identifier. 20170509 22:34:38< celticminstrel> So what that's doing is basically calling the function named "operator->". 20170509 22:35:47< celticminstrel> IOW "->()" is only valid if preceded by "operator". 20170509 22:37:00< celticminstrel> gfgtdf: If you can prove that the track member of lua_music_track is never null, then it should be safe to eliminate the wrapper class. 20170509 22:37:16< celticminstrel> IOW, prove that sound::get_track never returns null. 20170509 22:38:22< celticminstrel> Oh yeah, there is another reason to have it besides the valid() method, I guess - the constructor takes an int rather than the actual track, which is maybe more convenient for some of the uses? On the other hand ISTR that there was a place where I needed to push a track when I had only the pointer... 20170509 22:39:45< gfgtdf> wedge009: maybe you coudl add the boost string_view to msvc14 extrenal aswell? 20170509 22:45:32< DeFender1031> oooh... 20170509 22:45:58< DeFender1031> but wouldn't just -> call the same operator? 20170509 22:47:51< vultraz_iOS> you need something on the right of -> 20170509 22:47:57< celticminstrel> Well, -> is a special operator. 20170509 22:48:12< celticminstrel> It's semantically an infix operator, right? But the RHS is a name, not a value. 20170509 22:48:20< celticminstrel> So it's overloaded as a postfix operator. 20170509 22:49:08< celticminstrel> The overloaded operator must return a value which the name on the RHS will be looked up in. 20170509 22:49:22< celticminstrel> Which can either be a raw pointer or another class that implements an operator-> 20170509 22:50:12< celticminstrel> But if you just want the return value without looking up any specific name, you have to call the function directly; that's what's happening in the line gfgtdf quoted. 20170509 22:52:48-!- atarocch [~atarocch@37.177.120.12] has quit [Ping timeout: 240 seconds] 20170509 22:53:08< DeFender1031> ah, got it. 20170509 22:53:28< DeFender1031> right, because it's a weird operator that doesn't actually function directly on the operands as such 20170509 22:53:47< DeFender1031> still, that's a wacky looking syntax. 20170509 22:57:10-!- grzywacz [~karol@89-70-220-218.dynamic.chello.pl] has quit [Remote host closed the connection] 20170509 22:58:12< celticminstrel> Basically, using operator -> means "call the overloaded operator-> on the LHS repeatedly until that yields a raw pointer, then look up the RHS in the pointed-to object". 20170509 22:58:55< celticminstrel> So a->b may be equivalent to (*a).b or (*a.operator->()).b or (*a.operator->(),operator->().b, etc. 20170509 22:59:23< celticminstrel> Third one should be (*a.operator->().operator->()).b 20170509 23:00:07< celticminstrel> Wait no, I think it should be (*(*a.operator->()).operator->()).b 20170509 23:00:35< celticminstrel> ...no, right, the first correction should be right. 20170509 23:01:56< DeFender1031> it's a cute trick, at any rate, it's just an odd looking syntax. 20170509 23:04:45< celticminstrel> I guess the only other operator with a special syntax is new. 20170509 23:05:11< DeFender1031> you can't overload new, can you? 20170509 23:05:14< celticminstrel> You can. 20170509 23:05:20< DeFender1031> whaaaaaaaaa? 20170509 23:05:34< celticminstrel> There's even two official overloads in the standard library. 20170509 23:05:48< celticminstrel> No-throw new and placement new. 20170509 23:06:08-!- irker599 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170509 23:06:08< irker599> wesnoth: Charles Dang wesnoth:master 7b13c3eb398c / src/scripting/lua_audio.cpp: Fixup ee49c02 https://github.com/wesnoth/wesnoth/commit/7b13c3eb398c9aaaac5d682d3a9945dbd8b5173b 20170509 23:06:10< vultraz_iOS> celticminstrel: ^ 20170509 23:06:29-!- atarocch [~atarocch@37.176.3.75] has joined #wesnoth-dev 20170509 23:06:50< celticminstrel> Standard new is "new thing(arguments)". No-throw new is "new(std::nothrow) thing(arguments) and returns nullptr instead of throwing an exception in the unlikely case of allocation failure. Placement new is "new(ptr) thing(arguments)" and just returns ptr without allocating anything. 20170509 23:08:28< celticminstrel> When you write "new(a,b) thing(c,d)" it's roughly equivalent to "thing* p = operator new(sizeof(thing), a, b); p.thing(c,d); return p", except that explicit constructor calls as in the second statement aren't valid syntax AFAIK. 20170509 23:09:06< celticminstrel> Oh, but sometimes it's instead equivalent to "thing* p = thing::operator new(sizeof(thing), a, b); ..." 20170509 23:09:21< celticminstrel> If thing::operator new exists with those arguments. 20170509 23:09:55< vultraz_iOS> celticminstrel: btw there were two bugs marked with 'fixed' that weren't tagged 1.13.8 that i didn't close 20170509 23:10:01< vultraz_iOS> not sure where they are now 20170509 23:10:01< celticminstrel> I closed one of them. 20170509 23:10:04< vultraz_iOS> oh 20170509 23:10:21< celticminstrel> I don't know what happened to the other, but I did remove the fixed label. 20170509 23:10:27< celticminstrel> It's probably still open? 20170509 23:10:58< celticminstrel> IIRC I posted on it asking if it was fixed, so it might've been closed by someone else. 20170509 23:11:35< vultraz_iOS> alright 20170509 23:20:18-!- Alkenrinnstet [~alkenrinn@42.61.217.253] has quit [Ping timeout: 252 seconds] 20170509 23:20:58-!- Greg-Bog_ [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170509 23:24:15-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 272 seconds] 20170509 23:24:57-!- Greg-Bog_ [~greg_bogg@173.240.241.83] has quit [Ping timeout: 240 seconds] 20170509 23:31:11-!- Greg-Boggs [~greg_bogg@c-73-37-6-51.hsd1.or.comcast.net] has joined #wesnoth-dev 20170509 23:36:54< vultraz_iOS> Now that we've left GNA behind, I hope we can soon ditch SourceForge. 20170509 23:37:19< celticminstrel> I wonder what exactly you think would allow us to ditch SourceForge. 20170509 23:38:08< vultraz_iOS> well, dave wanted us to use cloudflare to somehow self-host the downloads IIRC. 20170509 23:39:07< celticminstrel> I suppose the Mac libs package could be hosted on GitHub in a way similar to aquileia/external... 20170509 23:46:22-!- Greg-Boggs [~greg_bogg@c-73-37-6-51.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170509 23:47:07-!- Greg-Boggs [~greg_bogg@c-73-37-6-51.hsd1.or.comcast.net] has joined #wesnoth-dev 20170509 23:49:05< celticminstrel> zookeeper: Should [animate_unit] raise an error when flag is missing, or should it use a default value? If the latter, what default? If the former, what should we do about the empty [animate_unit] in the test scenario? 20170509 23:51:04< irker599> wesnoth: Charles Dang wesnoth:master 194b5ef17d84 / / (9 files in 4 dirs): Removed unused help_button class and its associated GUI1 components https://github.com/wesnoth/wesnoth/commit/194b5ef17d84f65207dab0909c076295a81d3e39 20170509 23:51:07< vultraz_iOS> more GUI1 gone! \o/ 20170509 23:51:27< celticminstrel> Oh huh, I didn't know you could assign a tooltip to map labels. 20170509 23:53:08< celticminstrel> vultraz_iOS: I assume you have a help button definition for GUI2? 20170509 23:53:16< vultraz_iOS> no need. 20170509 23:53:20< celticminstrel> I think I saw one in use in the Addons manager or something? 20170509 23:53:35< celticminstrel> Though it's not very good. 20170509 23:53:36< vultraz_iOS> oh, you mean different button styles? 20170509 23:53:42< vultraz_iOS> yes there are different help button styles 20170509 23:53:57< celticminstrel> I think it would be better if it actually looked like a button. 20170509 23:54:05< celticminstrel> Rather than just being a big blue question mark. 20170509 23:54:06< vultraz_iOS> 'help' and 'help_30' 20170509 23:56:41< vultraz_iOS> celticminstrel: buttons looking like buttons is so 2010 :P 20170509 23:57:23< celticminstrel> That's not an argument, just a blind "new is better" when really it isn't always. 20170509 23:58:29< vultraz_iOS> that was tongue-in-cheek 20170509 23:58:47< celticminstrel> Good. 20170509 23:59:23< celticminstrel> I have a "fix" for that animate issue, just waiting on zookeeper to let me know if it's the right fix. 20170509 23:59:39< celticminstrel> Where "fix" = better error message. --- Log closed Wed May 10 00:00:28 2017