--- Log opened Mon Sep 26 00:00:48 2016 20160926 00:01:03-!- trewe [~trewe@2001:8a0:d10e:d601:1efe:16f9:ac31:1d34] has quit [Quit: quit] 20160926 00:21:13-!- rwr3000 [45888259@gateway/web/freenode/ip.69.136.130.89] has joined #wesnoth-dev 20160926 00:22:38< rwr3000> Hey, i'm working on a new era (my first wesnoth project in the last 6 years or so) and its crashing the game when trying to load a map, any idea if that's a unit problem or is it elsewhere? I'm not getting any error messages 20160926 00:23:06< celticminstrel> What version? 20160926 00:23:18< celticminstrel> 1.12 or 1.13? 20160926 00:23:28< rwr3000> 1.12.5 20160926 00:23:37< celticminstrel> The most likely error you'd get when loading a map is "invalid terrain", though it shouldn't cause a crash... 20160926 00:25:04< rwr3000> If there was a file (faciton, sounds, macro) missing would it crash? 20160926 00:25:36< rwr3000> I had been getting errors when trying to load the "local game" multiplayer but fixed them all nad was loading that page cleanly 20160926 00:25:55< celticminstrel> No, it would give you an error something like "file not found". (If a sound is missing it just won't play; a missing image simply doesn't show.) 20160926 00:25:56< rwr3000> But whenever I selected my era and tried to start a game it would crash without any error messages 20160926 00:26:15< celticminstrel> If you're on Windows you could try looking at the stderr.txt 20160926 00:26:19< rwr3000> that's what I would think but wasn't sure 20160926 00:26:21< rwr3000> I'm on mac 20160926 00:26:34< celticminstrel> Maybe in Console.app then? 20160926 00:26:51< celticminstrel> That's normally the default location for logs on a Mac. 20160926 00:27:05< celticminstrel> I've never actually tried with Wesnoth. 20160926 00:27:14< rwr3000> I'll take a look. 20160926 00:27:44< rwr3000> I was getting erros on the crash report that mac pops up when apps crash but it wasn't anything related to my code, just general messages about thread killing and whatnot 20160926 00:33:48-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160926 00:36:47< rwr3000> Would it be possible for an error to be present in the _main or era_name files that would not be detected when loading multiplayer but would cause it to crash? 20160926 00:40:44< celticminstrel> Probably not? 20160926 00:45:07< rwr3000> Hmm, I'll keep looking. Maybe I'll need to look at a few eras on the add-ons section. Thanks for your help 20160926 00:49:12-!- rwr3000 [45888259@gateway/web/freenode/ip.69.136.130.89] has quit [Ping timeout: 240 seconds] 20160926 01:44:22-!- Samual_ [~Samual@2601:547:1000:86f:444:db24:7a5f:d828] has quit [Ping timeout: 250 seconds] 20160926 01:46:13-!- Samual [~Samual@xonotic/core-team/Samual] has joined #wesnoth-dev 20160926 02:00:04-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160926 02:02:42-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Client Quit] 20160926 02:16:40-!- Bonobo [~Bonobo@2001:44b8:254:3200:a871:a299:2f8d:a76d] has quit [Ping timeout: 255 seconds] 20160926 02:17:28-!- Bonobo [~Bonobo@2001:44b8:254:3200:a871:a299:2f8d:a76d] has joined #wesnoth-dev 20160926 02:29:26-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has quit [Ping timeout: 250 seconds] 20160926 02:31:36-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has joined #wesnoth-dev 20160926 02:42:31-!- celmin [~celticmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20160926 04:00:10-!- Bonobo [~Bonobo@2001:44b8:254:3200:a871:a299:2f8d:a76d] has quit [Ping timeout: 255 seconds] 20160926 04:00:29-!- Bonobo [~Bonobo@2001:44b8:254:3200:a871:a299:2f8d:a76d] has joined #wesnoth-dev 20160926 04:06:41-!- JyrkiVesterinen [~jyrki@87-100-220-76.bb.dnainternet.fi] has joined #wesnoth-dev 20160926 05:00:01-!- Necrosporus [~Necrospor@unaffiliated/necrosporus] has joined #wesnoth-dev 20160926 05:15:28-!- higgins` [~higgins@68.ip-149-56-14.net] has joined #wesnoth-dev 20160926 05:16:35-!- Aginor_ [~andreas@apollo.alternating.net] has joined #wesnoth-dev 20160926 05:16:54-!- AI0867 [~ai@wesnoth/developer/ai0867] has joined #wesnoth-dev 20160926 05:16:58-!- Rh0nda [~rhonda@anguilla.debian.or.at] has joined #wesnoth-dev 20160926 05:17:04-!- Greywhin1 [~Greywhind@c-71-232-29-126.hsd1.ma.comcast.net] has joined #wesnoth-dev 20160926 05:17:22-!- oldlaptop_ [~quassel@162.247.150.37] has joined #wesnoth-dev 20160926 05:20:24-!- JyrkiVesterinen [~jyrki@87-100-220-76.bb.dnainternet.fi] has quit [Quit: Konversation terminated!] 20160926 05:21:11-!- Netsplit *.net <-> *.split quits: heirecka, Greywhind, higgins, prkc, oldlaptop, AI0867_, knotwork, Aginor, Rhonda 20160926 05:21:40-!- Netsplit over, joins: heirecka 20160926 05:28:10-!- prkc [~prkc@46.166.190.214] has joined #wesnoth-dev 20160926 05:29:00-!- knotwork [~markm@99.192.64.28] has joined #wesnoth-dev 20160926 05:29:00-!- knotwork [~markm@99.192.64.28] has quit [Changing host] 20160926 05:29:00-!- knotwork [~markm@unaffiliated/knotwork] has joined #wesnoth-dev 20160926 05:45:46-!- Kwandulin [~Miranda@p200300760F2C715A10527940C7562F3F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160926 05:59:48-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20160926 06:03:22< vultraz> celmin: is a parameter pack considered a use-type of a variadic template? 20160926 06:03:39< celmin> Oh my. 20160926 06:03:52< celmin> I suddenly realize that "parameter pack" can have two totally different meanings. 20160926 06:04:13< celmin> a) A struct passed as a parameter in order to avoid functions with a zillion arguments 20160926 06:04:17< celmin> b) A template parameter pack. 20160926 06:04:27< celmin> …anyway, I don't understand your question. 20160926 06:04:59< celmin> Also, since you're here now, that THoT issue you mentioned to EliDupree wasn't actually a redraw issue. 20160926 06:05:07< vultraz> I'm trying to understand the definitions and usecases of both terms. 20160926 06:06:06< vultraz> as well as the syntax in templates. 20160926 06:06:48< celmin> So it's entirely possible that definition A was invented by me; at least, a cursory google doesn't turn up any evidence of it. 20160926 06:06:58< vultraz> I see 20160926 06:07:02< celmin> …I suppose I could check the C++ FAQ, if I can recall its URL... 20160926 06:07:30< vultraz> Perhaps this is why I'm partly confused because there is a definition of a pack and it's B 20160926 06:08:48< celmin> I'm certain that definition A exists in the wild, but it might apply to a slightly different term. 20160926 06:08:54< celmin> Anyway, about template parameter packs. 20160926 06:09:55< celmin> You declare a template parameter pack in a template with template. 20160926 06:10:00< celmin> (Or class… P) 20160926 06:10:11< celmin> You can then expand that pack anywhere with the … operator. 20160926 06:10:25< vultraz> What does 'expand' mean in this context. 20160926 06:10:31< celmin> Getting to that. 20160926 06:11:02< celmin> A template parameter pack is, in effect, a sequence of types. 20160926 06:11:42< celmin> So, when expanded, it produces a comma-separated list. 20160926 06:12:56< celmin> For example, if P refers to the sequence , then "P… args" expands to something roughly equivalent to "int args_1, int args_2, string args_3", except the individual arguments are not given their own names; instead they're part of a parameter pack called "args". 20160926 06:13:26< celmin> You could think of "…" as a "foreach operator" that applies only to parameter packs. 20160926 06:13:46< celmin> sizeof…(P) also gives you the number of elements in the parameter pack. 20160926 06:14:08< vultraz> hmm 20160926 06:14:14< celmin> You can't do anything with a parameter pack besides expanding it or counting the elements. 20160926 06:14:24< celmin> But, the expansion can be pretty complex. 20160926 06:14:52< celmin> You can apply the … operator to any expression containing the parameter pack, and get back a comma-separated list of that expression with each element of the pack substituted. 20160926 06:15:36< celmin> Do you have a specific problem you're trying to apply this to? 20160926 06:16:28< vultraz> No, I've just been pondering if this could be theoretically be used in a situation such as shadowm's filesystem dialog 20160926 06:17:40< celmin> How so? 20160926 06:18:17< vultraz> Well, I see here on this page... 20160926 06:18:18< vultraz> "A variadic function template can be called with any number of function arguments (the template arguments are deduced through template argument deduction):" 20160926 06:18:58< vultraz> So I'm wondering if, say, he could make execute() or even the constructor a variadic function. 20160926 06:20:00< vultraz> and then he could just do execute(arguments) 20160926 06:20:04< vultraz> ... I think 20160926 06:20:25< celmin> Variadic functions are best when you don't know ahead of time what kinds of things will be passed to your function. 20160926 06:20:34< celmin> For example, the printf() function. 20160926 06:21:04< celmin> luaW_getglobal is also variadic (though in that case it is known what kinds of things, just not how many). 20160926 06:21:50< celmin> In the case of the file dialog, each parameter has a very specific meaning, and some may even be of the same type (I haven't looked closely, so I'm not entirely sure). 20160926 06:22:05< celmin> So I think a variadic execute() or constructor doesn't make a lot of sense there. 20160926 06:23:17< celmin> The "named parameter" idiom or whatever it's called is probably better. 20160926 06:23:33< vultraz> slightly hard to tell what's needed since he uses this chained function call thing 20160926 06:23:39< vultraz> celmin: the what now? 20160926 06:24:18< celmin> I'm admittedly not quite happy with the example shadowm showed, mind you; I'd prefer to see file_dialog foo = file_dialog().param1().param2() or something. 20160926 06:24:51< celmin> (That could possibly also be done with a helper class that would then be passed to the file_dialog constructor.) 20160926 06:24:58< vultraz> eh, I'd prefer not to see chained calls to that extent 20160926 06:26:03< celmin> It's the closest C++ can really get to a Lua-like file_dialog(param1 = x, param2 = y} syntax. 20160926 06:26:10< celmin> Well, not quite the closest, I guess. 20160926 06:26:18< celmin> Boost manages to get closer with a lot of template trickery. 20160926 06:26:49< vultraz> er, wait, you example doesn't really make sense 20160926 06:26:52< celmin> https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Named_Parameter 20160926 06:27:17< celmin> Fixed example: file_dialog foo = file_dialog().param1(x).param2(y) 20160926 06:27:35< vultraz> yeah, that's what he's doing in the current PR as posted 20160926 06:27:47< vultraz> Unless I misunderstand you 20160926 06:27:50< celmin> More concrete example: file_dialog foo = file_dialog().caption("Hello world!").allowed_types({"png", "jpg"}); 20160926 06:27:58< vultraz> dlg.set_path(filename).set_title(title).set_read_only(!show_directory_buttons).set_filename(type_a_head); 20160926 06:28:22< celmin> Well, for this idiom it's usually broken up into lines. 20160926 06:28:30< celmin> (And lacks the set_ prefix.) 20160926 06:28:55< vultraz> well that's sugar 20160926 06:28:55< celmin> (Or maybe not. That link seems to include it.) 20160926 06:29:04< celmin> Sugar is good. :0 20160926 06:29:06< celmin> ^ :) 20160926 06:29:09< vultraz> true :P 20160926 06:29:26< vultraz> but I still don't see how a variadic execute function wouldn't work 20160926 06:30:10< vultraz> though I suppose the problem would be actually dealing with the values in the constructor 20160926 06:30:14< vultraz> that I'm not sure of 20160926 06:31:04< vultraz> in the example above, he has uh... string, string, bool, string 20160926 06:31:39< vultraz> obviously, the compiler would totally deduce these types fine. But then how would the constructor or the execute function know "ok, first string is the filename, second is the title..." 20160926 06:32:17< celmin> With a variadic function you'd lose all the information about what each parameter means. 20160926 06:32:32< celmin> Which is similar to the last thing you just said. 20160926 06:34:04-!- celmin [~celticmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The minstrel departs, to spread the music to the masses!] 20160926 06:34:14< vultraz> I'm sure there's a solution, just not one I see 20160926 06:35:10< celticminstrel> I think the solution he has is quite good. 20160926 06:36:54< vultraz> (wait, you can have non-type template arguments? o_O ) 20160926 06:37:00< celticminstrel> Yes. 20160926 06:37:21< celticminstrel> Integral, pointer, and pointer-to-member template arguments are permitted. 20160926 06:37:27< celticminstrel> Floating point arguments are not, for some reason. 20160926 06:37:52< vultraz> "For pointers to functions, the valid arguments are pointers to functions with linkage (or constant expressions that evaluate to null pointer values)." 20160926 06:38:03< vultraz> "with linkage"? 20160926 06:38:09< celticminstrel> There are three basic types of template arguments: template typename arguments, template tempate arguments, and template non-type arguments. 20160926 06:38:37< celticminstrel> I'm guessing that "with linkage" there means that it has a name, ie it's not a lambda. 20160926 06:38:49< celticminstrel> It might also exclude functions declared in a function-local class. 20160926 06:39:36< celticminstrel> I'm not sure if it would exclude non-class functions declared static or in an anonymous namespace. 20160926 06:39:39< vultraz> Trying to figure out where this could be useful... 20160926 06:39:44-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has joined #wesnoth-dev 20160926 06:39:49< celticminstrel> It's used in the Wesnoth Lua API. 20160926 06:40:08< vultraz> example? 20160926 06:40:21< celticminstrel> All the dispatch<> stuff in the constructor. 20160926 06:40:33< celticminstrel> game_lua_kernel tha tis 20160926 06:40:38< celticminstrel> ^that is 20160926 06:40:52< celticminstrel> I think that dialog_callback (?) template also uses it? 20160926 06:41:26< vultraz> Still feel like I'm missing it's use... 20160926 06:41:44< vultraz> a typename template is so you can use varying types 20160926 06:41:48< celticminstrel> I think it's use is a bit specialized. 20160926 06:41:52< celticminstrel> ^its 20160926 06:41:57< vultraz> what 'varying' thing can a function pointer template give? 20160926 06:42:09< celticminstrel> Different functions. Duh. 20160926 06:43:32< vultraz> of that signature? 20160926 06:43:42< celticminstrel> Yes. 20160926 06:44:10< celticminstrel> Though "of that signature" doesn't necessarily have to be as restricted as it seems. 20160926 06:44:25< celticminstrel> You could define a template that accepts any function that takes one parameter. 20160926 06:44:47-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160926 06:45:12< vultraz> (could you remind me again what the type()() syntax means? I understand std::functions syntax, but I've forgotten what exactly the first one does) 20160926 06:45:18< celticminstrel> Template non-type parameters can be defined using any earlier template type parameters. 20160926 06:45:22< vultraz> std::function's* 20160926 06:45:40< celticminstrel> So you could do template 20160926 06:46:04< celticminstrel> When you say type()(), are you talking about in a function declaration? 20160926 06:46:20< vultraz> well for example, this bit: 20160926 06:46:22< vultraz> typedef int (game_lua_kernel::*member_callback)(lua_State *); 20160926 06:46:22< celticminstrel> Wait no, that'd be operator type() 20160926 06:47:02< vultraz> I thought this was C-style function defining or something 20160926 06:47:13< celticminstrel> Why do you call it C-style? 20160926 06:47:23< vultraz> Pretty sure I was told it was :| 20160926 06:47:32< vultraz> unless I'm thinking of something different 20160926 06:47:43< celticminstrel> Well, it may or may not be C-style, but I wouldn't casually say it was... probably... 20160926 06:47:54-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 264 seconds] 20160926 06:47:54-!- wedge010 is now known as wedge009 20160926 06:47:57< celticminstrel> So, that specific line: 20160926 06:48:13< celticminstrel> (lua_State*) -- A function that takes a lua_State* parameter 20160926 06:48:51< celticminstrel> int(lua_State*) -- A function that takes a lua_State* parameter and returns int 20160926 06:49:14< celticminstrel> int (*)(lua_State*) -- A pointer to a function that takes a lua_State* parameter and returns int 20160926 06:49:45< celticminstrel> int (game_lua_kernel::*)(lua_State*) -- A pointer to a (non-static) function defined in game_lua_kernel that takes a lua_State* parameter and returns int 20160926 06:50:10-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has quit [Quit: Leaving] 20160926 06:50:39-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has joined #wesnoth-dev 20160926 06:51:21< vultraz> So in your above example 20160926 06:51:28< vultraz> [17:45:36] celticminstrel So you could do template 20160926 06:51:41< vultraz> it's "pointer to function taking param that returns void"? 20160926 06:51:53< celticminstrel> Yes. 20160926 06:52:10< vultraz> (I assume 'fcn' is the 'name'? ie, fcn(a param)) 20160926 06:52:15< celticminstrel> cdecl.org might be handy for this sort of thing (though it seems to only do C, not C++). 20160926 06:52:30< celticminstrel> Yes, 'fcn' is the name. 20160926 06:53:25< vultraz> I see 20160926 06:53:29< vultraz> ok, that makes sense 20160926 06:53:46< vultraz> it's essentially void fcn(param) {} 20160926 06:54:20< celticminstrel> Well not quite, that's "function taking Param and returning void", not "pointer to function taking param and returning void". :P 20160926 06:54:38< vultraz> well, yes 20160926 06:54:49< vultraz> I'm just speaking metaphorically. 20160926 06:55:02< vultraz> T'is good to know, though 20160926 06:55:02< celticminstrel> Didn't seem metaphorical to me. 20160926 06:55:09-!- Kwandulin_2 [~Miranda@p200300760F2C713110527940C7562F3F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160926 06:55:19-!- Kwandulin [~Miranda@p200300760F2C715A10527940C7562F3F.dip0.t-ipconnect.de] has quit [Ping timeout: 272 seconds] 20160926 06:55:24< vultraz> I was wondering just the other day whether one could pass a function as a template parameter 20160926 06:55:42-!- atarocch [~atarocch@93.56.160.28] has joined #wesnoth-dev 20160926 06:55:45< vultraz> I thought templates were just for types :| 20160926 06:56:11< celticminstrel> Don't lose sight of the fact that templates are evaluated entirely at compile-time, though. 20160926 06:57:30< vultraz> well, I've learned something 20160926 06:57:46< vultraz> still haven't come up with a better solution for the filesystem dilemma, though :P 20160926 06:58:06< celticminstrel> Just accept the excellent solution we already have? 20160926 06:58:10< celticminstrel> Possibly with a few tweaks. 20160926 06:58:17 * celticminstrel assuming you mean the file dialog still. 20160926 06:58:18< vultraz> Sure 20160926 06:58:21-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has joined #wesnoth-dev 20160926 06:58:22< vultraz> Er, yes 20160926 06:58:29-!- boucman_work [~boucman@193.56.60.161] has joined #wesnoth-dev 20160926 06:59:18< vultraz> It was mostly a mental exercise anyway :P 20160926 06:59:25< vultraz> another question, though.. 20160926 07:01:29< vultraz> since I'm still slightly unclear the full extent of a viaridic function's capabilities... 20160926 07:03:14< vultraz> is it possible to get the type of a specific passed parameter, and, if you have n parameters, how does one used the passed data for anything if you don't know what's going to be present or not 20160926 07:04:24< celticminstrel> It's technically possible to index a parameter pack, but it takes some template trickery. (Which may be in C++14's standard library, not sure.) 20160926 07:04:46< celticminstrel> (In other words, you can index it only by passing it off to another template that does the work.) 20160926 07:04:49< vultraz> (actually, how do you use the values at all...) 20160926 07:05:00< celticminstrel> Generally you use ... to iterate through the pack. 20160926 07:05:14< vultraz> f(&args...); // “&args...” is a pack expansion 20160926 07:05:16< vultraz> hmm 20160926 07:05:38< celticminstrel> That takes the address of each element. 20160926 07:05:54< vultraz> but again, that's just handing the list off to f :/ 20160926 07:06:04< vultraz> what if I want to say 20160926 07:06:13< JyrkiVesterinen> A standard way to iterate parameter packs is with recursion: http://stackoverflow.com/a/26550219 20160926 07:06:14< vultraz> "give me the value of the second parameter" 20160926 07:07:04< celticminstrel> If you want to say "give me the value of the second parameter", my first response would be to wonder if you really want a variadic function... but if you really want it, you can do it by passing the pack off to another variadic template. 20160926 07:07:05< JyrkiVesterinen> In the example I linked, when the second overload calls itself recursively, the first parameter ends up as "arg" and all others are in "args". 20160926 07:07:27< vultraz> I see... 20160926 07:07:39< JyrkiVesterinen> In the last iteration, when "args" contains only one parameter, the recursive call calls the first overload. 20160926 07:07:43< celticminstrel> If you expect all parameters to be of types compatible with some type T, you can do std::vector stuff = {args...}; 20160926 07:07:55-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20160926 07:08:04< celticminstrel> If you want to call a function on each element of the pack, you could do f(args)... 20160926 07:08:32< celticminstrel> Not quite sure if that would work on its own, though... 20160926 07:08:46< celticminstrel> Might need a little extra trickery by wrapping it in braces. 20160926 07:08:56< celticminstrel> (As an initializer-list) 20160926 07:09:13< vultraz> you mean "f(args)...", with the dots? 20160926 07:09:13< celticminstrel> I think template pack expansion doesn't produce a comma operator call. 20160926 07:09:20< celticminstrel> Yes. 20160926 07:09:24< celticminstrel> That's what I wrote. 20160926 07:09:36< celticminstrel> (My client might've turned it into the single-character ellipsis, but still.) 20160926 07:09:43< vultraz> wasn't sure if those were part of the syntax or you trailing off :P 20160926 07:09:57< celticminstrel> Ah, yeah, it's part of it. 20160926 07:10:11< celticminstrel> Oh right, I remember how you do it. 20160926 07:10:30< celticminstrel> int dummy[] = { (f(args), 0)... }; 20160926 07:10:54< vultraz> still, I'd think calling a function on each element of the pack would only make sense if f was an overloaded function with per-type handling 20160926 07:11:08< celticminstrel> Obviously. 20160926 07:11:18< celticminstrel> Or if f was a templated function. 20160926 07:11:46< vultraz> so once again, we're dealing purely with types, and the values are just along for the ride 20160926 07:12:04< celticminstrel> You can have non-type parameter packs too, though. 20160926 07:14:22< vultraz> hm? 20160926 07:14:39< celticminstrel> template 20160926 07:14:56< celticminstrel> I'm not sure if they have much use. 20160926 07:15:00< vultraz> a function that takes any number of ints? 20160926 07:15:05< celticminstrel> No. 20160926 07:15:10< celticminstrel> A template that takes any number of ints. 20160926 07:15:23< vultraz> er, right 20160926 07:15:27< celticminstrel> A function that takes any number of ints would be template f(T...); 20160926 07:15:41< celticminstrel> (Plus some constraints on T to make it only accept ints.) 20160926 07:15:49< celticminstrel> (Maybe with enable_if, maybe some other way.) 20160926 07:16:08< celticminstrel> (Like putting them all in a vector/) 20160926 07:16:18< celticminstrel> (Well, that would accept floats too, but whatever.) 20160926 07:16:47< vultraz> template magic is confusing sometimes 20160926 07:17:14< celticminstrel> There are several "meta-types" in C++ code; templates are a totally separate catagory from types or variables. 20160926 07:17:45 * celticminstrel isn't sure if anyone has ever used the term "meta-type" to describe this, but whatever, 20160926 07:55:30-!- atarocch [~atarocch@93.56.160.28] has quit [Quit: Leaving] 20160926 08:24:51-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has quit [Quit: .] 20160926 08:29:01-!- Kwandulin_2 [~Miranda@p200300760F2C713110527940C7562F3F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160926 08:34:51< DeFender> celticminstrel, not sure, but it fits, as advanced template usage is often referred to as "metaprogramming" 20160926 08:35:29< DeFender> so "meta-type" isn't a very far leap to refer to "types used in metaprogramming" 20160926 08:39:00-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160926 08:39:23-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:39:45-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:40:14-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:40:32-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:41:05-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:41:20-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:41:52-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:42:08-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:42:40-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:42:56-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:43:29-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:43:44-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:44:13-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:44:29< vultraz> ancestral: your connection, you must fix 20160926 08:44:32-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:44:55-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:45:20-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 08:45:24-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has joined #wesnoth-dev 20160926 08:45:52-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 08:46:08-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Client Quit] 20160926 09:00:53< DeFender> vultraz, like yoda, you speak. 20160926 09:04:21-!- Kwandulin [~Miranda@p200300760F2C713105861FF7217342B6.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160926 09:05:26< zookeeper> shouldn't it have been "fix you must" then? :p 20160926 09:08:41< DeFender> maybe. 20160926 09:31:47-!- Bonobo [~Bonobo@2001:44b8:254:3200:a871:a299:2f8d:a76d] has quit [Quit: Leaving] 20160926 09:35:54-!- boucman_work [~boucman@193.56.60.161] has quit [Ping timeout: 265 seconds] 20160926 09:53:21< vultraz> what zookeeper said 20160926 09:53:32-!- boucman_work [~boucman@193.56.60.161] has joined #wesnoth-dev 20160926 09:57:57-!- Appleman1234_ [~Appleman1@KD119104058254.au-net.ne.jp] has joined #wesnoth-dev 20160926 10:00:30-!- Appleman1234 [~Appleman1@KD119104057188.au-net.ne.jp] has quit [Ping timeout: 264 seconds] 20160926 10:00:43-!- Appleman1234_ is now known as Appleman1234 20160926 10:20:07-!- Duthlet [~Duthlet@dslb-146-060-179-135.146.060.pools.vodafone-ip.de] has joined #wesnoth-dev 20160926 10:47:40-!- irker168 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160926 10:47:40< irker168> wesnoth: doofus-01 wesnoth:master 36f3d47e8ca4 / data/core/ (42 files in 3 dirs): clean up wooden floor terrain transitions https://github.com/wesnoth/wesnoth/commit/36f3d47e8ca46981c6dafa69dda68b66e141f891 20160926 10:47:42< irker168> wesnoth: Charles Dang wesnoth:master 466137578324 / data/core/ (42 files in 3 dirs): Merge pull request #802 from doofus-01/wooden_floor_fixes https://github.com/wesnoth/wesnoth/commit/466137578324ddb57e2709a16056f6d737387b7b 20160926 10:59:44< irker168> wesnoth: doofus-01 wesnoth:master 83bc21c5d8db / data/campaigns/Heir_To_The_Throne/ (23 files in 2 dirs): update images/animations for Dark Queen, Princess, and Sea Orc https://github.com/wesnoth/wesnoth/commit/83bc21c5d8db47b081fd2c626aba40e6282804a6 20160926 11:01:34-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has quit [Quit: .] 20160926 11:05:41-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 11:41:38-!- Polsaker [~Polsaker@wikimedia/botters.Polsaker] has quit [Remote host closed the connection] 20160926 11:44:58-!- Polsaker [~Polsaker@wikimedia/botters.Polsaker] has joined #wesnoth-dev 20160926 12:03:43-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has joined #wesnoth-dev 20160926 12:08:59-!- Rh0nda is now known as Rhonda 20160926 12:09:05-!- Rhonda [~rhonda@anguilla.debian.or.at] has quit [Changing host] 20160926 12:09:05-!- Rhonda [~rhonda@wesnoth/developer/rhonda] has joined #wesnoth-dev 20160926 12:13:24-!- Kwandulin [~Miranda@p200300760F2C713105861FF7217342B6.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160926 12:33:37-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 255 seconds] 20160926 12:43:05-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20160926 12:47:31-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has joined #wesnoth-dev 20160926 12:49:10-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20160926 13:00:21-!- Grickit is now known as Gambit 20160926 13:00:40-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20160926 13:02:23-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160926 13:06:53-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 49.0.1/20160922113459]] 20160926 13:06:56-!- Kwandulin [~Miranda@p200300760F2C7131900BF35A3AB542C7.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160926 13:42:08-!- Bonobo [~Bonobo@2001:44b8:254:3200:54c4:dd4b:c658:e516] has joined #wesnoth-dev 20160926 13:53:56-!- Bonobo [~Bonobo@2001:44b8:254:3200:54c4:dd4b:c658:e516] has quit [Quit: Leaving] 20160926 13:57:58-!- mkdroid [~null@unaffiliated/matthiaskrgr] has joined #wesnoth-dev 20160926 13:59:55-!- irker168 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160926 14:01:01-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth-dev 20160926 14:10:11-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has joined #wesnoth-dev 20160926 14:12:16-!- gfgtdf_ [~chatzilla@x4e36390c.dyn.telefonica.de] has joined #wesnoth-dev 20160926 14:13:59-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 252 seconds] 20160926 14:15:30-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has quit [Ping timeout: 264 seconds] 20160926 14:15:40-!- gfgtdf_ is now known as gfgtdf 20160926 14:30:06-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has quit [Quit: .] 20160926 14:31:04-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160926 14:33:01-!- irker689 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160926 14:33:01< irker689> wesnoth: mattsc wesnoth:master 3382f491d3de / data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua: EI S8: fix custom Lua CA to conform to new syntax https://github.com/wesnoth/wesnoth/commit/3382f491d3de0ae52f7ede73985078fff6221824 20160926 14:33:01< irker689> wesnoth: mattsc wesnoth:master d2dc72a8ee85 / data/campaigns/Son_Of_The_Black_Eye/ai/ca_transport_S6.lua: SotBE S6: fix custom Lua CA to conform to new syntax https://github.com/wesnoth/wesnoth/commit/d2dc72a8ee85cc94d7454feda4db503d7fd13860 20160926 14:33:02< irker689> wesnoth: mattsc wesnoth:master efe3c54fdc16 / data/campaigns/Son_Of_The_Black_Eye/ai/ca_transport_S6.lua: SotBE S6: use new syntax of wesnoth.put_unit() in custom AI code https://github.com/wesnoth/wesnoth/commit/efe3c54fdc167885470c79448411571b8397f9b4 20160926 14:45:10-!- boucman_work [~boucman@193.56.60.161] has quit [Ping timeout: 260 seconds] 20160926 14:47:31-!- boucman_work [~boucman@bob75-2-81-56-46-209.fbx.proxad.net] has joined #wesnoth-dev 20160926 15:01:49-!- mkdroid [~null@unaffiliated/matthiaskrgr] has quit [Quit: I'll be back!] 20160926 15:10:52-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 49.0.1/20160922113459]] 20160926 15:18:04-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20160926 15:20:18-!- louis94 [~~louis94@91.178.241.231] has joined #wesnoth-dev 20160926 15:26:17-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160926 15:34:43< irker689> wesnoth: mattsc wesnoth:master f6da07268540 / changelog: Update changelog with AI bug fixes https://github.com/wesnoth/wesnoth/commit/f6da07268540d0286ebb76417d81282262052756 20160926 15:35:26-!- Lady-Starlight [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has joined #wesnoth-dev 20160926 15:38:34-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has quit [Ping timeout: 255 seconds] 20160926 15:59:01-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160926 15:59:23-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160926 15:59:29-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160926 16:01:01< vultraz> celticminstrel: wait, if one specializes std::min/max one does not need to cast one of the members if they're not the same type? 20160926 16:04:46-!- Lady-Starlight [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has quit [Quit: Leaving] 20160926 16:05:09-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has joined #wesnoth-dev 20160926 16:05:54-!- louis94 [~~louis94@91.178.241.231] has quit [Ping timeout: 264 seconds] 20160926 16:12:33-!- Kwandulin [~Miranda@p200300760F2C7131900BF35A3AB542C7.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160926 16:22:14-!- louis94 [~~louis94@91.178.241.231] has joined #wesnoth-dev 20160926 16:22:19-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20160926 16:22:19-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: So long and thanks for all the fish.] 20160926 16:30:32< celticminstrel> vultraz: Well, I suppose you could specialize it like that? 20160926 16:30:43< celticminstrel> I usually don't cast anyway. 20160926 16:30:50< vultraz> I've always been casting :| 20160926 16:30:53< celticminstrel> Just specify the template arguments explicitly. 20160926 16:31:02< vultraz> I didn't realize that ^ worked instead :| 20160926 16:31:26< celticminstrel> std::mac(thing1, thing2) 20160926 16:31:29< celticminstrel> ^max 20160926 16:31:31< vultraz> std::min(a, b) is a lot cleaner than std::min(static_cast(a), b). 20160926 16:33:17< irker689> wesnoth: Charles Dang wesnoth:master 005432a43ff3 / src/gui/dialogs/multiplayer/faction_select.cpp: Faction Select: fixed a crash when selecting new faction https://github.com/wesnoth/wesnoth/commit/005432a43ff349c3938c3f08f22fbe43ac54fd05 20160926 16:34:02-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has quit [Quit: Leaving] 20160926 16:34:14< vultraz> I dunno if it's acceptable for leader selection indexes to persist through faction selections 20160926 16:34:19< vultraz> I guess it doesn't matter 20160926 16:36:20-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has joined #wesnoth-dev 20160926 16:36:21-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has quit [Remote host closed the connection] 20160926 16:39:38-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20160926 16:41:22-!- JyrkiVesterinen [~jyrki@89-166-114-151.bb.dnainternet.fi] has joined #wesnoth-dev 20160926 16:43:07-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has joined #wesnoth-dev 20160926 16:49:55< vultraz> hm 20160926 16:50:19< vultraz> wonder if there's such a thing as a loop that iterates over 2 lists simultaneously 20160926 16:50:52-!- Zalckos [~Mutter@143.179.98.57] has joined #wesnoth-dev 20160926 16:51:26< JyrkiVesterinen> Just loop manually. 20160926 16:51:50< JyrkiVesterinen> Even if Boost has some way to do it, manual looping is easier to understand for less experienced programmers. 20160926 16:52:09< vultraz> Might be boost::zip_iterator 20160926 16:52:19< vultraz> but I can't remember if celticminstrel said it's that or something else 20160926 16:52:24< vultraz> anyway, don't need it right here 20160926 16:52:32< vultraz> but I could see how such a thing might be useful 20160926 16:53:41< vultraz> (specifically, what I'm thinking of is a range-for style loop that takes 2 lists and gives you the in-order element from both on each iteration) 20160926 16:54:14< celticminstrel> for(list::iterator a_iter = a.begin(), b_iter = b.begin(); a_iter != a.end() && b_iter != b.end(); a_iter++, b_iter++) { ... } 20160926 16:54:15< celticminstrel> :P 20160926 16:54:18-!- Zalckos [~Mutter@143.179.98.57] has quit [Remote host closed the connection] 20160926 16:54:25< celticminstrel> (Assuming the lists are of the same type.) 20160926 16:54:50< vultraz> wait, then what does a zip iterator do 20160926 16:54:55< celticminstrel> You could certainly set up something for range-for as well. 20160926 16:55:06< DeFender> vultraz, i've built many such loops. 20160926 16:55:08< celticminstrel> A zip iterator presumably does the same thing. 20160926 16:55:28< DeFender> vultraz, you just have more than one instantiation, iteration, and possibly condition in the for() declaration. 20160926 16:55:59< DeFender> vultraz, things like strcmp do this all the time. 20160926 16:56:56-!- Velexis [~Starlight@2602:306:36fe:3690:7994:723c:3a8c:79cf] has quit [Quit: Leaving] 20160926 16:57:28< DeFender> like: for(some_iterator a = list_a.begin(), some_iterator b = list_b.begin() ; a != list_a.end() && b != list_b.end() ; ++a, ++b) 20160926 16:57:59< DeFender> unless i'm missing part of the question and it's not as simple as all of that 20160926 16:58:21< DeFender> oh, celticminstrel already said that... 20160926 16:58:43< DeFender> okay, ignore me. 20160926 16:58:47 * DeFender goes back to lurking. 20160926 16:59:46< celticminstrel> DeFender: Pretty sure you can't have two declarations of different types in the for header. 20160926 17:00:10< DeFender> can't you? I'm going to go test that. 20160926 17:01:14< DeFender> and even if not, you can stick one of them outside the loop anyway. 20160926 17:04:18< vultraz> hmmmm 20160926 17:04:19< DeFender> yeah, it doesn't work 20160926 17:04:21< vultraz> ok, let's see 20160926 17:04:28< vultraz> what options do In eed here.. 20160926 17:04:50-!- louis94 [~~louis94@91.178.241.231] has quit [Ping timeout: 265 seconds] 20160926 17:05:18< vultraz> leader 20160926 17:05:20< vultraz> controller 20160926 17:05:25< vultraz> everything else is pretty static 20160926 17:05:42< vultraz> oh, gold/income 20160926 17:06:07< vultraz> perhaps that's why it's just a label in Wait. I guess I'll keep that 20160926 17:06:16< vultraz> better than sliders running all over the place 20160926 17:06:35< vultraz> hm 20160926 17:06:42< vultraz> actually, just noticed a problem here 20160926 17:07:16< vultraz> if we allow players to always select their own leader at any time you could end up with conflicting settings 20160926 17:07:42< vultraz> might have to disable the button for non-host as before 20160926 17:07:53-!- boucman_work [~boucman@bob75-2-81-56-46-209.fbx.proxad.net] has quit [Ping timeout: 240 seconds] 20160926 17:08:00-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160926 17:09:09< vultraz> ok... so.. uh 20160926 17:09:28-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 17:09:41< vultraz> any element needs to reflect updates 20160926 17:09:48< vultraz> yeah... 20160926 17:09:58< vultraz> but the controller dropdown is the only one whose contents actually change 20160926 17:10:18< vultraz> and the leader display, obviously 20160926 17:11:32< vultraz> the simplest solution here is to just iterate through every row every 4 seconds or something and perform the necessary updates 20160926 17:16:06-!- louis94 [~~louis94@91.178.241.231] has joined #wesnoth-dev 20160926 17:16:45< celticminstrel> How would you end up with conflicting settings? 20160926 17:22:11-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160926 17:23:38-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 17:24:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20160926 17:26:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 17:27:29-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20160926 17:28:07-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 17:29:04-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20160926 17:31:55-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160926 17:32:00-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 17:32:45-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20160926 17:33:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 17:43:20-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160926 17:46:15-!- mjs-de [~mjs-de@wh.Uni-Dortmund.DE] has joined #wesnoth-dev 20160926 17:49:15-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20160926 17:49:32-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: http://www.kvirc.net/ 4.9.2 Aria] 20160926 17:54:58-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has joined #wesnoth-dev 20160926 17:59:44< vultraz> celticminstrel: well, imagine if the timer is 4 seconds long and the host and the player both update a specific side at the same time 20160926 17:59:47-!- louis94 [~~louis94@91.178.241.231] has quit [Ping timeout: 244 seconds] 20160926 18:00:59< vultraz> and when the update comes through, whose selection will it choose 20160926 18:01:52< celticminstrel> I'd just go with "last one wins". 20160926 18:02:23< vultraz> eh... 20160926 18:02:25< vultraz> I guess... 20160926 18:04:18-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160926 18:05:15< tad_> What is the issue? That you have multiple players and you want to allow them to choose the leader, and you have a race condition where more than one could choose the same leader? 20160926 18:06:02< vultraz> tad_: so, in the old dialog, only the host could modify settings 20160926 18:06:31< tad_> That is one way to avoid a race condition, yes. 20160926 18:06:44< vultraz> if i let every player modify their own settings, there could be a race condition if the player and the host modified the same side at the same time 20160926 18:07:49< tad_> Can you implement a token passing system? "You have the token, you can select a leader for N minutes. Selecting a leader, or timeout, passes the token on to the next." 20160926 18:08:03< vultraz> Uh.. 20160926 18:08:32< vultraz> maybe? 20160926 18:09:02< vultraz> anyway.. 20160926 18:09:15< vultraz> I guess that comes after making both wait and connect use the same dialog.. 20160926 18:09:38< vultraz> gfgtdf: I seem to have gotten connect/staging working with the network 20160926 18:09:56< gfgtdf> vultraz: nice 20160926 18:10:07< vultraz> i need to make Wait use the same dialog now, though 20160926 18:10:11< gfgtdf> vultraz: pushed already? 20160926 18:10:16< vultraz> gfgtdf: no 20160926 18:10:46< gfgtdf> vultraz: on your fork then ? 20160926 18:10:52< vultraz> no, locally 20160926 18:10:56< vultraz> do you want to see the code? 20160926 18:10:58< vultraz> I can commit soon 20160926 18:11:09< gfgtdf> i'd like to see 20160926 18:14:33-!- Kwandulin [~Miranda@p200300760F2C7131752A48AE48B20A98.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160926 18:14:52< vultraz> gfgtdf: https://github.com/Vultraz/wesnoth/commit/89785301ece2970c561a5d9fce9868185870e631 20160926 18:15:31< vultraz> cannot confirm if it fully works until I make Wait also use the same dialog 20160926 18:15:40< vultraz> but it seems to work in tandem with GUI1 wait 20160926 18:17:34< vultraz> i am seeing a few possible complications with using the same dialog though 20160926 18:17:56< vultraz> i guess they'd just need to be handled 20160926 18:18:15< vultraz> like, if you're the host, you control all the settings 20160926 18:18:29< vultraz> but if you're a player, you only get the control settings for your side.. 20160926 18:18:41< vultraz> so I need to update widget states.. 20160926 18:18:49< vultraz> depending on that 20160926 18:18:58< vultraz> and I need to somehow know if a player is the host 20160926 18:19:00< vultraz> or not 20160926 18:20:50< vultraz> I think an interesting feature would be to lock the listbox selection to your side 20160926 18:20:54< vultraz> so it's obvious which one you are 20160926 18:21:00< vultraz> but idk if that's possible 20160926 18:21:39< gfgtdf> vultraz: which listbox you you mean? 20160926 18:21:45< JyrkiVesterinen> vultraz: I suggest using std::tie to handle the return value of connect_engine::process_network_data(). 20160926 18:21:47< JyrkiVesterinen> https://msdn.microsoft.com/en-us/library/bb982165.aspx 20160926 18:22:19< vultraz> gfgtdf: the listbox of sides 20160926 18:22:33< vultraz> JyrkiVesterinen: I have used tie once before... but I don't really fully understand it 20160926 18:23:25< gfgtdf> vultraz: hmm i actuall thougth the listbox there ids just a tempreary thing, since it afaik just does nothign when you click on it. 20160926 18:23:43< vultraz> yeah it does nothing when you click on it 20160926 18:23:52< vultraz> optimally it wouldn't use a toggle panel at all, I guess 20160926 18:24:00< vultraz> but gui2 limitations 20160926 18:24:00< gfgtdf> vultraz: also note that a client can control multiple sides. 20160926 18:24:08< vultraz> gfgtdf: hmm 20160926 18:24:14< vultraz> true 20160926 18:24:14-!- timotei_ [~timotei@wesnoth/developer/timotei] has joined #wesnoth-dev 20160926 18:24:41< gfgtdf> vultraz: i think that when all the other faction/color etc (drop)button buttons ar greyed out its already quire obvious which sides you contorl 20160926 18:24:59< vultraz> yeah, true 20160926 18:25:11< vultraz> anyway, I need to make Wait use this now :| 20160926 18:26:14-!- timotei [~timotei@wesnoth/developer/timotei] has quit [Ping timeout: 250 seconds] 20160926 18:26:33< gfgtdf> vultraz: hm ye, how your your going to do this? will you write some type of 'wait_engine' class? 20160926 18:27:24< vultraz> idk \ o / 20160926 18:27:49< vultraz> this whole thing is a goddamned mess 20160926 18:28:22< vultraz> multiplayer_wait.cpp doesn't seem.. *that* complicated now at least 20160926 18:28:28< gfgtdf> tad_: i think we shodul remove the 'fire_event_by_name' fuinction, we already have the 'fire_event' function and sicne fireing the event by ame is still what people usualyl want to do i also think it makes e sense too kepp it. 20160926 18:28:30< vultraz> since i split the flg dialog handling out 20160926 18:28:32< celticminstrel> vultraz: You know how in Lua you can do stuff like "x, y = unit.loc"? 20160926 18:28:46< vultraz> celticminstrel: yes 20160926 18:28:53< celticminstrel> That's what std::tie allows. 20160926 18:29:12< gfgtdf> celticminstrel: but you need to declare the variable before 20160926 18:29:15< gfgtdf> celticminstrel: unliek lua 20160926 18:29:15< celticminstrel> yes. 20160926 18:29:19< vultraz> i remember you said it returns... something invalidif it fails 20160926 18:29:21< vultraz> ? 20160926 18:29:25< celticminstrel> What? 20160926 18:30:07< celticminstrel> What are you talking about? 20160926 18:30:13< vultraz> uh 20160926 18:30:15< vultraz> wait 20160926 18:30:16< vultraz> nvm.. 20160926 18:30:36< vultraz> ok so could I just do config data; data = std::tie(stuff); if config.empty() { return; }? 20160926 18:30:53-!- atarocch [~atarocch@88.131.217.34] has joined #wesnoth-dev 20160926 18:31:57< vultraz> data.empty()* 20160926 18:32:02-!- Espreon [~espreon@wesnoth/developer/espreon] has left #wesnoth-dev [] 20160926 18:32:05< tad_> gfgtdf: Sorry was dozing at the keyboard. Where in code are we looking? 20160926 18:32:34< vultraz> wait, no 20160926 18:33:11< JyrkiVesterinen> vultraz: std::tie is used with functions which return tuples (or pairs). 20160926 18:33:20< gfgtdf> tad_: iirc you made the fire event by id pr? 20160926 18:33:24< celticminstrel> Yeah, your example is wrong. 20160926 18:33:48< celticminstrel> std::tie(x, y) = unit.get_location(); 20160926 18:34:04< celticminstrel> (Assuming that get_location returns a tuple and/or map_location is convertible to a tuple.) 20160926 18:34:20< celticminstrel> That's the equivalent of the earlier Lua snippet. 20160926 18:34:23< vultraz> why is JyrkiVesterinen advising tie here again? 20160926 18:34:44< tad_> gfgtdf: honestly don't remember. sounds familiar. probably someone did something and I did something in response .. let my look and come up to speed. 20160926 18:34:58< JyrkiVesterinen> Because you call connect_engine::process_network_data() in the WIP code you posted earlier. 20160926 18:35:11< JyrkiVesterinen> "if(result.first) {" 20160926 18:35:26< JyrkiVesterinen> That line doesn't give a clear picture of what it's trying to do. 20160926 18:35:36< vultraz> oh, that part.. 20160926 18:35:36< gfgtdf> tad_: wait it seems liek ti was someone else, nevermindf then 20160926 18:36:32< vultraz> I need to evaluate its necessity 20160926 18:36:33< tad_> gfgtdf: I do remember looking at it. And my impression was there was probably some duplication going on. I see a lua hook for fire event by name. 20160926 18:37:31< vultraz> JyrkiVesterinen: I'll get back to that later 20160926 18:37:56< vultraz> right now it's time to bang myself over the head with mp wait :| 20160926 18:38:11< celticminstrel> Ah, yeah, std::tie would be good for the process_network call. 20160926 18:38:46< JyrkiVesterinen> A quick example of how it could work: https://gist.github.com/jyrkive/680c342b9d3fbd59cee6e470ec93ba97 20160926 18:39:14< vultraz> ah 20160926 18:39:19< vultraz> yeah that's much better 20160926 18:39:32< vultraz> though in this case, I'm not sure why leave_game is handled here at all :| 20160926 18:41:02< tad_> gfgtdf: OK. I see the reason for your comment. Yes, I agree, there really only needs to be ONE name for that function. I do not see "fire_event_by_name" being used. Recheck and remove it if you want, sounds like a fine idea. 20160926 18:41:11-!- gfgtdf_ [~chatzilla@x4e36390c.dyn.telefonica.de] has joined #wesnoth-dev 20160926 18:41:19-!- Necrosporus_ [~Necrospor@unaffiliated/necrosporus] has joined #wesnoth-dev 20160926 18:42:10< celticminstrel> The person who added fire_event_by_id also added the fire_event_by_name synonym, presumably for something like consistency. 20160926 18:42:19< celticminstrel> I'm not sure it's all that important though. 20160926 18:42:40< celticminstrel> (Just make sure that the changelog and possibly wiki are updated if you do remove it.) 20160926 18:43:12< tad_> Assuming *_by_name made it to the changelog. I wasn't that long ago. A few weeks, 20160926 18:44:18-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has quit [Ping timeout: 264 seconds] 20160926 18:44:20-!- gfgtdf_ is now known as gfgtdf 20160926 18:44:43-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160926 18:44:44-!- Necrosporus [~Necrospor@unaffiliated/necrosporus] has quit [Ping timeout: 244 seconds] 20160926 18:45:28< celticminstrel> I think it did. 20160926 18:45:50< tad_> You merged it 20160926 18:46:02< celticminstrel> Ideally changes enter the changelog in the same commit, or very soon afterwards. 20160926 18:46:05< tad_> erge pull request #710 from spixerge pull request #710 from spixi/call_events_by_idi/call_events_by_id 20160926 18:49:14-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 265 seconds] 20160926 18:49:15-!- wedge010 is now known as wedge009 20160926 18:50:10< tad_> Personally, I've used [fire_event] and [fire_event_by_id] but never used the _by_name variant because it's not what's used everywhere else. consistency of use is more important to me than consistency of naming. 20160926 18:57:03-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Quit: Page closed] 20160926 19:00:33-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160926 19:01:53< tad_> Disappearing units. Example: DiD S02. remove shroud and fog. create ancient lich next to two villages. capture both. kill one lich using debug kill. 20160926 19:04:46< tad_> Repeated using Peasant. One disappeared before I could capture the villages. I was going to check if debug kill was the cause: seems not. 20160926 19:06:19< tad_> Proceeded to capture villages. Before killing anyone, one of the created Goblin Spearman is invisible and shows black/no image on sidebar. 20160926 19:11:42< vultraz> I did confirm the fading in/out with standing animations 20160926 19:11:47< vultraz> I have no idea what in hell is going on 20160926 19:12:14< tad_> I reverted that alpha commit you made a few days ago and it seemed to stop the problem. 20160926 19:12:47< vultraz> the "cleanup to basic alpha handling"? 20160926 19:12:53< tad_> yes 20160926 19:12:57 * vultraz groans 20160926 19:13:08< vultraz> there's nothing that commit that's related to animations :| 20160926 19:13:11< vultraz> at least, not directly 20160926 19:13:42< celticminstrel> Yes there is. 20160926 19:13:48< celticminstrel> Animations involve drawing. 20160926 19:14:00< celticminstrel> So likely a lot of the stuff in that commit is related. 20160926 19:14:19< vultraz> but what could be causing the sprites to fade in and out :| 20160926 19:14:31< tad_> I can check again. My test was a revert and I had to do some conflict resolution. I'm not being effective working on DiD anyway .. I could bisect to check if you'd like. 20160926 19:14:52< vultraz> no, don't bother 20160926 19:14:58< tad_> vultraz: My guess it's not fading in and out, it's one cell not displaying. 20160926 19:15:14< vultraz> how so? 20160926 19:16:26< tad_> Like there's something about some cell which is causing the entire layer to go invisible. Some units show it as fading. Some come and go as you click on them. Some show and some don't on the sidebar. Probably all the same thing and it 'feels' like it's related to a specific cell 20160926 19:17:09-!- Velexis [~Starlight@2602:306:36fe:3690:c74:74f2:e89c:285b] has joined #wesnoth-dev 20160926 19:18:05< vultraz> ok, the problem seems to be display.cpp:1761 20160926 19:18:25< vultraz> I guess that also needs the per-pixel alpha instead of surface alpha 20160926 19:19:56< tad_> Dunno what the code is saying with all those cryptonames but it does look suspect. 20160926 19:20:26< celticminstrel> Try editing adjust_surface_alpha to make a copy via make_neutral_surface. 20160926 19:20:56< celticminstrel> Or revert to per-pixel alpha, sure, whatever. 20160926 19:22:13< tad_> Um .. cells have per-pixel alpha, don't they? 20160926 19:23:41-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20160926 19:24:51< vultraz> ok, using make_neutral_surface at the callsite works 20160926 19:25:05< vultraz> can't put that in adjust_surface_alpha without making it return a surface again 20160926 19:26:18< celticminstrel> Oh right. 20160926 19:26:22< celticminstrel> 9_9 20160926 19:26:40< irker689> wesnoth: Charles Dang wesnoth:master bee748329b35 / src/display.cpp: Attempt to fix recent unit drawing problems introduced in 55ba8c95bcc https://github.com/wesnoth/wesnoth/commit/bee748329b35cc54a68cba35d08132792af5542b 20160926 19:26:57< vultraz> tad_: ^ 20160926 19:27:16< tad_> brb. need to close chome to link 20160926 19:27:19-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Quit: Page closed] 20160926 19:27:21< vultraz> also matthiaskrgr 20160926 19:27:35< vultraz> let me know if you still observe the disappearing units and such 20160926 19:31:24-!- Kwandulin [~Miranda@p200300760F2C7131752A48AE48B20A98.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160926 19:34:13-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160926 19:34:24< tad_> vultraz: That seems to have fixed it. 20160926 19:34:27< vultraz> \o/ 20160926 19:35:29< tad_> There was a reddit in /r/programming yesterday about working with code you don't understand. humorous. makes me think of a lot of Wesnoth ... 20160926 19:35:47< vultraz> a... reddit? 20160926 19:36:23-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20160926 19:37:04< tad_> Not about wesnoth but it brought wesnoth to my mind when I was reading it 20160926 19:38:32< vultraz> blah, dost I need to make a wait_engine.. 20160926 19:38:39< vultraz> or, no 20160926 19:38:59< vultraz> I need to pull the code from the network BEFORE joining... 20160926 19:39:08< tad_> iridakos.com/2016/09/24/get-away-with-code.html 20160926 19:42:35< vultraz> ok, so wait downloads the level data.. 20160926 19:42:44< vultraz> let's move that before the dialog 20160926 19:43:52< vultraz> if I intend to use this same dialog for wait and connect then I do need a connet_engine 20160926 19:43:54-!- RatArmy [~RatArmy@om126212088088.11.openmobile.ne.jp] has joined #wesnoth-dev 20160926 19:46:42-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has quit [Ping timeout: 264 seconds] 20160926 19:46:57< vultraz> ah, and my power's likely going to go out soon 20160926 19:46:59< vultraz> fun! 20160926 19:50:44< zookeeper> a UPS has been one of my best investments in electronics 20160926 19:50:49-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has joined #wesnoth-dev 20160926 19:51:14< vultraz> UPS, you say 20160926 19:52:06-!- RatArmy [~RatArmy@om126212088088.11.openmobile.ne.jp] has quit [Quit: Leaving] 20160926 19:52:26-!- RatArmy [~RatArmy@om126212088088.11.openmobile.ne.jp] has joined #wesnoth-dev 20160926 19:53:01< vultraz> I should indeed get one of those 20160926 19:53:59< tad_> A laptop is cheaper :) 20160926 19:54:15-!- RatArmy [~RatArmy@om126212088088.11.openmobile.ne.jp] has quit [Client Quit] 20160926 19:54:34-!- Polsaker [~Polsaker@wikimedia/botters.Polsaker] has quit [Ping timeout: 265 seconds] 20160926 19:55:09< vultraz> tad_: I have a laptop 20160926 19:55:30< vultraz> but its screen is broken (WHY does that always happen to me) so I use an external monitor 20160926 19:55:33< vultraz> which needs power 20160926 19:55:39< vultraz> and my internet modem + router 20160926 19:55:41< vultraz> needs power 20160926 19:57:59-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20160926 19:58:02< tad_> I used to use a UPS. Problem was, even though it was a big as I could get, it wasn't good for much more than a few minutes to save my work. 20160926 19:59:01< tad_> Now, I use a monitor on a laptop (screen not broken but too small and makes my neck hurt) and when power goes out I either wait or hit the sleep button and wait. 20160926 19:59:37< tad_> Since sleep checkpoints my Linux VM all I lose when power comes back is any active open connections like this IRC window.s 20160926 20:00:22-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 265 seconds] 20160926 20:11:51-!- Aginor_ is now known as Aginor 20160926 20:12:37< Aginor> it might've been good to keep all of the drawing changes in a separate branch so that we could've waited with merging until they were stable/didn't cause regressions 20160926 20:13:02< Aginor> as it stands, I think it should be a release blocker 20160926 20:13:56< celticminstrel> It was in a separate branch, actually. But then he went and merged too soon. 20160926 20:17:46< Aginor> indeed 20160926 20:18:18< Aginor> I recall looking at the code actually, saying that it looked ok to merge 20160926 20:18:27< Aginor> but I never did any extensive testing 20160926 20:18:38< Aginor> so it's partially my fault too 20160926 20:26:17-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20160926 20:29:27-!- noy [~Noy@wesnoth/developer/noy] has quit [Client Quit] 20160926 20:30:41-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20160926 20:31:26-!- Polsaker [~Polsaker@wikimedia/botters.Polsaker] has joined #wesnoth-dev 20160926 20:31:59-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160926 20:40:48-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Quit: Page closed] 20160926 20:44:19-!- louis94 [~~louis94@91.178.241.231] has joined #wesnoth-dev 20160926 20:44:51-!- JyrkiVesterinen [~jyrki@89-166-114-151.bb.dnainternet.fi] has quit [Quit: .] 20160926 20:48:51-!- mjs-de [~mjs-de@wh.Uni-Dortmund.DE] has quit [Remote host closed the connection] 20160926 20:55:41-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20160926 21:15:14-!- oldlaptop_ is now known as oldlaptop 20160926 21:35:28-!- gfgtdf_ [~chatzilla@x4e36390c.dyn.telefonica.de] has joined #wesnoth-dev 20160926 21:36:59-!- mjs-de [~mjs-de@x4db6ad9e.dyn.telefonica.de] has joined #wesnoth-dev 20160926 21:37:25-!- midzer_ [~quassel@p57B452A5.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160926 21:39:29-!- Velexis [~Starlight@2602:306:36fe:3690:c74:74f2:e89c:285b] has quit [Ping timeout: 252 seconds] 20160926 21:39:30-!- gfgtdf [~chatzilla@x4e36390c.dyn.telefonica.de] has quit [Ping timeout: 264 seconds] 20160926 21:39:39-!- gfgtdf_ is now known as gfgtdf 20160926 21:40:05-!- midzer [~quassel@p57B45688.dip0.t-ipconnect.de] has quit [Ping timeout: 272 seconds] 20160926 21:45:24-!- Duthlet [~Duthlet@dslb-146-060-179-135.146.060.pools.vodafone-ip.de] has quit [Quit: leaving] 20160926 21:48:35-!- Necrosporus_ is now known as Necrosporus 20160926 21:48:38-!- Necrosporus [~Necrospor@unaffiliated/necrosporus] has quit [Quit: Leaving] 20160926 21:52:48-!- louis94 [~~louis94@91.178.241.231] has quit [Ping timeout: 244 seconds] 20160926 21:55:10-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20160926 21:55:10-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Read error: Connection reset by peer] 20160926 22:03:12-!- Velexis [~Starlight@2602:306:36fe:3690:8dfc:a1df:18bb:501c] has joined #wesnoth-dev 20160926 22:10:04-!- Velexis [~Starlight@2602:306:36fe:3690:8dfc:a1df:18bb:501c] has quit [Ping timeout: 255 seconds] 20160926 22:10:59-!- mjs-de [~mjs-de@x4db6ad9e.dyn.telefonica.de] has quit [Remote host closed the connection] 20160926 22:15:07-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20160926 22:15:34-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160926 22:27:08-!- irker689 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160926 22:27:51-!- ancestral [~ancestral@8.42.164.20] has joined #wesnoth-dev 20160926 22:58:15-!- ancestral [~ancestral@8.42.164.20] has quit [Ping timeout: 244 seconds] 20160926 23:11:32-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160926 23:14:27-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 272 seconds] 20160926 23:16:03-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 265 seconds] 20160926 23:21:00-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160926 23:23:28-!- Bonobo [~Bonobo@2001:44b8:254:3200:5536:8981:9710:346d] has joined #wesnoth-dev 20160926 23:30:10-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 255 seconds] 20160926 23:32:09-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160926 23:33:12-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Client Quit] 20160926 23:37:35-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160926 23:47:29-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Quit: Page closed] 20160926 23:57:17< shadowm> vultraz, zookeeper: So I guess none of you take care of spam anymore? 20160926 23:57:25< shadowm> Forum spam. 20160926 23:57:59< shadowm> I'm currently firing at spam posts from September 3rd. 20160926 23:58:17< shadowm> It's currently the 26th. 20160926 23:58:55< shadowm> August 12th now. 20160926 23:59:09< celticminstrel> Gasp! Time's moving backwards! 20160926 23:59:26< celticminstrel> A moment ago it was September 26th! Now it's August 12th! 20160926 23:59:29< celticminstrel> :P --- Log closed Tue Sep 27 00:00:05 2016