--- Log opened Fri Nov 04 00:00:05 2016 --- Day changed Fri Nov 04 2016 20161104 00:00:05< celticminstrel> Tabs do have the advantage that everyone can use their preferred width. :P 20161104 00:00:08< vultraz> DeFender1031: all code I've seen with 2-space indentation also seems to skimp on newline breaks 20161104 00:00:23< celticminstrel> vultraz: I do think you're a bit excessive with blank lines though. 20161104 00:00:26< DeFender1031> vultraz, what do you mean? newlines have nothing to do with indentation 20161104 00:00:48< DeFender1031> I add blank lines to separate segments of code all the time 20161104 00:01:07< vultraz> DeFender1031: correlation not causation 20161104 00:01:23< DeFender1031> vultraz, fair enough, though that makes it irrelevant to the discussion 20161104 00:01:58< DeFender1031> oh, also, it seems that the wesnoth convention is four spaces for lua and wml but tabs for c++, which is odd to me as well. 20161104 00:02:15< vultraz> no, tabs for lua and c++ 20161104 00:02:22< DeFender1031> ah, right 20161104 00:02:26< DeFender1031> confused lua 20161104 00:02:29< DeFender1031> but whatever 20161104 00:02:35< celticminstrel> Really? I thought Lua was spaces, actually. 20161104 00:02:42< DeFender1031> my point is that it's not entirely consistent within the project 20161104 00:02:51< DeFender1031> ... 20161104 00:03:08< celticminstrel> DeFender1031: The project also requires spaces for Python code. 20161104 00:03:17< vultraz> well that's dumb.. 20161104 00:03:30< celticminstrel> This is why I set up git filters to entab and detab the Python. 20161104 00:03:44< DeFender1031> anyway, so long as it's consistent within a particular file, I care less. I DO tend to prefer two-space, but i can handle four-space or tab no problem. The worst though is when people mix spaces and tabs. 20161104 00:03:46< celticminstrel> Because otherwise I would probably accidentally use tabs. 20161104 00:04:09< DeFender1031> does git have commit triggers? 20161104 00:04:12< celticminstrel> Consistency within a file is definitely the most important thing. It's not the case in Wesnoth though, I think. 20161104 00:04:19< celticminstrel> Yes. 20161104 00:04:26< celticminstrel> vultraz: What's dumb? 20161104 00:04:37< DeFender1031> we should just set up a commit trigger to run a code formatter on everything before it commits. 20161104 00:04:57< celticminstrel> Well, commit triggers are local to the working copy. 20161104 00:05:19< celticminstrel> Also, code formatters always get something wrong. 20161104 00:05:36< celticminstrel> So I'd say you should never automate them. 20161104 00:06:00< DeFender1031> celticminstrel, when i was in college I tutored people who sent me stuff which mixed tabs and spaces. It all lined up on THEIR editor, but mine had a different tab width and made the code impossible to read. 20161104 00:06:36< DeFender1031> celticminstrel, fair enough. 20161104 00:06:43< celticminstrel> Yup, I've seen some of that in the Wesnoth source. Not sure if it got fixed. (I might've fixed the specific files I saw it in.) 20161104 00:06:54< DeFender1031> ugh 20161104 00:06:55< vultraz> never mix tabs and spaces :| 20161104 00:06:57< vultraz> ever 20161104 00:07:02< celticminstrel> Yes. 20161104 00:07:35< celticminstrel> It's probably actually a good thing that github has a ridiculously large tab width - it makes indentation errors easier to spot. 20161104 00:08:46< DeFender1031> right. as long as you recognize the evils of tab-space mixing I can reasonably work with you, even if you people have strange ideas about indentation levels ;P 20161104 00:09:34< celticminstrel> Ideally we'd catch them in the PR so they never make it into master, but maybe previous maintainers were more lax about that. 20161104 00:10:10< celticminstrel> BTW, there's a handy git trick to avoid committing whitespace problems - "git rebase --whitespace=fix" 20161104 00:10:22< celticminstrel> (Then specify the first commit that needs repairing. 20161104 00:10:23< celticminstrel> ) 20161104 00:10:57< celticminstrel> Might need a little setup to get it exactly right... there are a number of git options that control exactly what it does. 20161104 00:14:09 * vultraz has gotten fixed-position tooltips working 20161104 00:15:18< celticminstrel> Can you fix the MP select tooltip on 800x600? 20161104 00:15:37< vultraz> potentially 20161104 00:15:40< celticminstrel> It appears in the top left corner instead of by the mouse cursor when you hover over "Local MP" 20161104 00:15:49< vultraz> i need to tweak these damn formulas 20161104 00:15:54< celticminstrel> Probably. 20161104 00:17:37< Aginor> DeFender1031: religious war averted? 20161104 00:18:42< irker865> wesnoth: Charles Dang wesnoth:master d9a10a85bd22 / src/gui/ (5 files in 3 dirs): Pass source widget rectangle ttip when creating tooltips/helptips https://github.com/wesnoth/wesnoth/commit/d9a10a85bd222db6dfa1ea5abc91799a530e4de7 20161104 00:19:01< vultraz> api, still needs formula changes in the definition to be fixed-position 20161104 00:20:46< shadowm> DeFender1031: Aw, I guess you and I won't be able to work together then. Indeed I'd rather use only tabs so that we didn't have to impose our visual preferences/limitations/obsessions upon each other, but there are legitimate reasons to have tab and space indentation on the same line. 20161104 00:22:57< celticminstrel> There are. 20161104 00:23:09< celticminstrel> For example, in a comment where you need spaces to align things exactly. 20161104 00:23:23< shadowm> Or multiline statements. 20161104 00:23:27< celticminstrel> But the entire block should be indented by tabs to match the surrounding indent level. 20161104 00:23:40< celticminstrel> Multiline statements could be a valid reason, though I personally don't like it. 20161104 00:24:27< celticminstrel> I'd usually use a tab for that. If it's an if statement, two tabs. 20161104 00:24:37< celticminstrel> (Or other constrol structure.) 20161104 00:24:46< celticminstrel> ^control 20161104 00:24:51< DeFender1031> Aginor, postponed perhaps... :P 20161104 00:25:59-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161104 00:26:40< DeFender1031> shadowm, those "legitimate reasons" are usually "we're using tabs for indentation up to the current level, and then spaces to specifically align this line to something on a previous line" or something like that. To me, that doesn't count as mixing tabs and spaces, as I view the tabs as being used exclusively for indentation and the spaces as being used for alignment. 20161104 00:26:45< shadowm> Related: https://en.wikipedia.org/wiki/Whitespace_(programming_language) 20161104 00:27:41< DeFender1031> shadowm, actually, cases like that make a pretty good case FOR using tabs as indentation, as there is then a clear separation between indentation characters and alignment characters. 20161104 00:28:06< DeFender1031> shadowm, unless, of course, your "legitimate reasons" are something entirely different, in which case we may have to take this outside :P 20161104 00:28:43< DeFender1031> ah, celticminstrel said that. 20161104 00:29:02< DeFender1031> so yeah, doesn't count as mixing in that case. 20161104 00:29:05< Aginor> I set my tab-width to 3 just because of that reason 20161104 00:29:46< Aginor> but seriously, I favour space-only indentation because then there's no issues with different tab-widths 20161104 00:30:11< Aginor> and it's clear how it should be formatted, and it will be formatted the same way on all platforms 20161104 00:30:15< shadowm> But then I have to bear with your odd number-based indentation. 20161104 00:30:18< shadowm> :( 20161104 00:30:50< Aginor> odd like odd numbers or odd like strange? 20161104 00:31:01< shadowm> Odd numbers. You said 3. 20161104 00:32:07< Aginor> sorry, I gave in to my inner troll, but I managed to regain control again 20161104 00:32:47< Aginor> what I see as the benefit of a tab-only indentation is that people can set the tab-width to whatever they want 20161104 00:33:23< Aginor> mixing spaces and tabs, even for alignment, strikes me as the worst of both worlds because you still have to agree on the size of a tab 20161104 00:36:25< DeFender1031> Aginor, no you don't 20161104 00:37:06< DeFender1031> Aginor, if the number of tabs is the same as the surrounding lines, and the spaces are just to align it from the end of the tabs, to a certain character on some adjacent line, then the tab width doesn't change where that ends up 20161104 00:40:24< DeFender1031> Aginor, for example: http://paste.nachsoftware.com/DeFender1031/CHBTz9d9f2a53c7964cacc155581bd8ba0108awz line two has some spaces to align it with the open parens of the if. Even if you change the tab width, it still lines up A: with everything around it and B: where it should. 20161104 00:41:24< DeFender1031> (that said, I don't actually like this format for ifs, I prefer to structure the if like a code block with the open and close parens on their own lines if it needs to be multi-line, but whatever, that's not the point, the point is that this format IS legitimate) 20161104 00:42:40< DeFender1031> (I personally would prefer to structure such an if as such: http://paste.nachsoftware.com/DeFender1031/XsCny8eadb672549713bb91b1581bd96ae105akH) 20161104 00:49:05< vultraz> DeFender1031: the first paste is perfectly fine and I do it. the second is evil :| 20161104 00:49:14< vultraz> so much wasted space! 20161104 00:51:10-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20161104 00:54:10< celticminstrel> In the first case I'd prefer to use a tab even though it doesn't quite align. 20161104 00:54:28< celticminstrel> I do prefer the second method slightly, though with ") {" and "if(" on one line. 20161104 00:54:50< celticminstrel> That said, I don't particularly like either method. I'd rather refactor the condition to be short enough for one line. 20161104 00:55:13< celticminstrel> (Or just leave it on one line even though it's really long.) 20161104 00:55:28-!- travis-ci [~travis-ci@ec2-54-92-195-177.compute-1.amazonaws.com] has joined #wesnoth-dev 20161104 00:55:29< travis-ci> wesnoth/wesnoth#11850 (master - d9a10a8 : Charles Dang): The build was broken. 20161104 00:55:29< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/173128555 20161104 00:55:29-!- travis-ci [~travis-ci@ec2-54-92-195-177.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161104 00:55:36< celticminstrel> I wonder if we should scrap the Lua GUI2 API and create a completely new one. 20161104 00:55:38< vultraz> broken, you say?? 20161104 00:55:49< celticminstrel> Uh-oh. 20161104 00:55:53< vultraz> celticminstrel: how would it be designed? 20161104 00:56:15< celticminstrel> Something object-oriented and closer to the C++ API. 20161104 00:56:44< celticminstrel> vultraz: Looks like a test failure. You added an argument but didn't update the tests. 20161104 00:56:54< celticminstrel> Let me look this up... 20161104 00:57:11< vultraz> gaaahhhh 20161104 00:57:13< vultraz> curse the tests 20161104 00:57:22< celticminstrel> Actually I didn't look at the logs, I'm just guessing based on the fact that exactly one build passed. 20161104 00:57:44< vultraz> yeah 20161104 00:57:46< vultraz> ill fix 20161104 00:58:44< celticminstrel> Not sure if that's the actual issue... 20161104 00:59:45< vultraz> it is 20161104 01:00:16< celticminstrel> Ah, yup, gui2::ttip::show. 20161104 01:11:53< DeFender1031> vultraz, i don't have a problem with extra lines of code for more nicely-aligned formatting. 20161104 01:12:20< DeFender1031> celticminstrel, i prefer my opening and closing characters for code blocks or conditions to be vertically aligned with each other 20161104 01:12:38< DeFender1031> that way you can see at a glance where the code block begins and ends. 20161104 01:13:07< DeFender1031> (and it makes editors with code-folding less glitchy) 20161104 01:13:07< celticminstrel> Whereas I prefer not to have braces alone on their own line. 20161104 01:13:19< celticminstrel> I don't think it affects XCode's code-folding. 20161104 01:13:29< celticminstrel> So if it makes code-folding glitchy then it's a bug in the editor. 20161104 01:13:42< DeFender1031> that's true, I suppose. 20161104 01:13:49 * celticminstrel prefers "} else {" all on one line too. 20161104 01:14:01< DeFender1031> though, it's the same kind of glitch as those with code formatters like you mentioned above 20161104 01:14:07< celticminstrel> Eh? 20161104 01:14:14< celticminstrel> How is it related to code formatters? 20161104 01:14:23< DeFender1031> auto 20161104 01:14:29< DeFender1031> ack 20161104 01:14:35< DeFender1031> ignore 20161104 01:14:52< DeFender1031> [11/4/2016 2:36:00 am] Also, code formatters always get something wrong. 20161104 01:14:53< DeFender1031> [11/4/2016 2:36:17 am] So I'd say you should never automate them. 20161104 01:15:07< celticminstrel> What has that got to do with code folding? 20161104 01:15:28< DeFender1031> i would imagine that the same kind of logic errors would cause both glitches 20161104 01:15:49< celticminstrel> Uh, how so? 20161104 01:16:08< celticminstrel> Code folding just needs to find the balancing delimiter, right? 20161104 01:16:16< DeFender1031> meaning, the formatters get things wrong for the same reason that code folding does, namely, they didn't parse something correctly and are therefore not registering the codeblock in the correct place. 20161104 01:16:18< celticminstrel> It shouldn't care about how the code is formatted? 20161104 01:16:49< celticminstrel> I think formatters getting things wrong is more because rules have exceptions and formatters can't really know every exception. 20161104 01:16:49< DeFender1031> whatever, not important. I thought it followed logically, but apparently i'm just rambling now. 20161104 01:17:05< celticminstrel> I dunno, maybe there's a logical link and I'm just not seeing it. 20161104 01:17:06< DeFender1031> ah 20161104 01:17:54< DeFender1031> well, they can if they're written well enough, but I agree, it's very tough. 20161104 01:17:57< vultraz> it is sometimes ok to have to conditional openers and closers on the same line 20161104 01:18:10< celticminstrel> What? 20161104 01:18:35< celticminstrel> Are you talking about a one-line "if(...) {...}" now? 20161104 01:18:43< vultraz> er 20161104 01:18:46< vultraz> blah 20161104 01:18:47< DeFender1031> on the same line, yes, but if they're on multiple lines, i like to have them aligned vertically with each other 20161104 01:18:50< vultraz> i mean on the same level 20161104 01:18:57< vultraz> such as here https://github.com/wesnoth/wesnoth/blob/master/src/gui/dialogs/sp_options_configure.hpp#L41-L45 20161104 01:19:15< celticminstrel> I think the convention in Wesnoth currently is "braces go on the same line for control flow but on their own line for functions". 20161104 01:19:25< vultraz> essentially, yes 20161104 01:19:26< celticminstrel> Not sure which convention applies to classes, but probably the latter? 20161104 01:19:37< celticminstrel> I think namespaces get it on the same line. 20161104 01:19:45< DeFender1031> vultraz, yeah, i don't like that formatting. :P 20161104 01:19:45< vultraz> classes on their own line 20161104 01:19:52< vultraz> namespaces seem to vary 20161104 01:20:40< vultraz> named namespaces do not get an indentation level 20161104 01:20:45< vultraz> anon ones do, it seems 20161104 01:20:52< celticminstrel> I was talking about the braces, not the indentation. 20161104 01:21:12< vultraz> yeah 20161104 01:21:14< vultraz> im just commenting 20161104 01:21:49< vultraz> structs and enums seem to vary too :/ 20161104 01:21:53-!- Appleman1234 [~Appleman1@KD106161210098.au-net.ne.jp] has quit [Read error: Connection reset by peer] 20161104 01:22:58-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 01:22:58-!- Appleman1234 [~Appleman1@KD106161210098.au-net.ne.jp] has joined #wesnoth-dev 20161104 01:23:32-!- shiki|sevu [~Shiki@141.39.226.226] has quit [Read error: No route to host] 20161104 01:27:12< DeFender1031> what does wesnoth.readfile do? 20161104 01:27:18< DeFender1031> (the wiki seems to be missing it) 20161104 01:27:28-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20161104 01:27:39< celticminstrel> Probably reads a file into a string, but... where does that exist? 20161104 01:28:00< celticminstrel> You might ask gfgtdf about it, maybe he'll know more. 20161104 01:28:08< DeFender1031> celticminstrel, listed here: https://wiki.wesnoth.org/LuaWML#Lua_files 20161104 01:28:20< DeFender1031> but the link goes to a nonexistant anchor 20161104 01:28:44< celticminstrel> This isn't the "unsafe Lua" flag, right? 20161104 01:28:55< celticminstrel> I guess that'd probably enable something more like os.open() or something... 20161104 01:29:45< celticminstrel> Yeah, I think gfgtdf probably added read_file. 20161104 01:30:04< DeFender1031> celticminstrel, not sure what you mean 20161104 01:30:06< celticminstrel> I vaguely recall talking about it awhile ago. 20161104 01:30:11-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161104 01:30:25< celticminstrel> DeFender1031: There's a command-line argument that enables functions allowing Lua to access arbitrary files. 20161104 01:30:48< celticminstrel> read_file however probably uses the same rules as dofile to resolve the file. 20161104 01:30:55< DeFender1031> huh. 20161104 01:30:56< DeFender1031> okay 20161104 01:31:10< DeFender1031> i mean, based on the name, it reads into a string. 20161104 01:31:29< celticminstrel> Which IIRC means ".." is carefully monitored to avoid stepping outside the addons directory. 20161104 01:31:51< DeFender1031> but for all i know, it could be something more specific like "reads lua table syntax from the given file" or "reads the wml in the given file and returns it as a table" or something 20161104 01:32:29< celticminstrel> Yeah, either ask gfgtdf or check the source code, I guess. 20161104 01:32:53< gfgtdf> it reads a file into a string 20161104 01:33:10< DeFender1031> gfgtdf, thanks. 20161104 01:34:11< gfgtdf> DeFender1031: mianline uses it for example here: https://github.com/wesnoth/wesnoth/blob/master/data/multiplayer/scenarios/2p_Dark_Forecast.lua#L437 to read the mask (map) files 20161104 01:35:31< celticminstrel> gfgtdf: And it uses the same rules as dofile? 20161104 01:35:39< celticminstrel> (Maybe those rules should be better documented too.) 20161104 01:35:54< celticminstrel> (I seem to recall something about allowing .. which wasn't allowed before.) 20161104 01:37:23< gfgtdf> celticminstrel: it has teh ame reules as havefile/dofile/require 20161104 01:37:41-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161104 01:37:43< gfgtdf> the same* 20161104 01:39:58< gfgtdf> celticminstrel: it allws .. to some extend but you cannt escape from the userdata/wesnoth dir 20161104 01:40:43< celticminstrel> Which raises an interesting question. 20161104 01:41:06< celticminstrel> Can you use it to read the user's preferences? 20161104 01:41:36< celticminstrel> (That would be bad, given the plaintext password.) 20161104 01:42:08< gfgtdf> celticminstrel: well not sure, but i kno that if so that its unrelated to the .. handling. 20161104 01:43:43< celticminstrel> How so? 20161104 01:44:20< celticminstrel> It should be forbidden from stepping out of "addons", right? Rather than being forbidden from stepping out of the base userdata dir. 20161104 01:44:28< celticminstrel> Which may contain the prefs file. 20161104 01:47:13< gfgtdf> here is the read_file function https://github.com/wesnoth/wesnoth/blob/master/src/scripting/lua_fileops.cpp#L106 where resolve_filename handles the '..' 20161104 01:48:19-!- tad_carlucci [~lundberg@173.217.65.103] has joined #wesnoth-dev 20161104 02:12:22-!- gfgtdf_ [~chatzilla@x4e369961.dyn.telefonica.de] has joined #wesnoth-dev 20161104 02:14:24-!- gfgtdf [~chatzilla@x4e369d54.dyn.telefonica.de] has quit [Ping timeout: 252 seconds] 20161104 02:14:31-!- gfgtdf_ is now known as gfgtdf 20161104 03:17:13-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Quit: wedge009] 20161104 03:17:33-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161104 03:18:47-!- irker865 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161104 03:57:54-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161104 04:11:25< tad_carlucci> Testing a local server (127.0.0.1) when I create a game everything goes black except some drop-downs. 20161104 04:11:50< celticminstrel> What if you do ;shroud? 20161104 04:12:15< celticminstrel> (Or don't enable shroud in the first place.) 20161104 04:14:09< tad_carlucci> Um in the Create Game dialog? 20161104 04:14:18< celticminstrel> Yeah. 20161104 04:14:59< tad_carlucci> You mean the gui2 dialogs understand game debug commands. 20161104 04:15:24< celticminstrel> Oh, I think I misunderstood the issue. 20161104 04:15:34< celticminstrel> I didn't realize you were still in the staging(?) dialog. 20161104 04:15:44< celticminstrel> (Or are you in the create dialog?) 20161104 04:16:12< celticminstrel> If it's the staging dialog, it's a known issue on low resolutions. 20161104 04:17:08< tad_carlucci> I clicked Create Game and a black dialog appears with a couple drop-downs like team colors and nothing else. 20161104 04:17:38< celticminstrel> I see. 20161104 04:17:45< celticminstrel> Well it sounds similar to the staging issue though. 20161104 04:17:50< celticminstrel> What resolution? 20161104 04:18:05< celticminstrel> Oh, wait. 20161104 04:18:10< celticminstrel> Right, it is the staging issue. 20161104 04:18:16 * celticminstrel got confused again for a moment. 20161104 04:18:26< celticminstrel> I think I observed it at 800x600 but not at 1024x768. 20161104 04:19:33< tad_carlucci> 800x600 one sec and I'll try fullscreen 20161104 04:19:58< celticminstrel> Basically every time the mouse moves, things get darker, and if the mouse goes over a control that highlights, it becomes visible again. 20161104 04:20:14< celticminstrel> It's some sort of redraw issue due to the area being partially offscreen, I think. 20161104 04:20:51< tad_carlucci> Doesn't reflow when coming out of fullscreen to 800x .. and it's OK in fullscreen. 20161104 04:21:13-!- gfgtdf [~chatzilla@x4e369961.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 49.0.2/20161019084923]] 20161104 04:21:56< tad_carlucci> Sounds like you knwo about it so I'm moving on 20161104 04:44:57-!- Shiki [~Shiki@141.39.226.226] has quit [Quit: Verlassend] 20161104 04:45:06-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 04:49:14-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 250 seconds] 20161104 04:58:16-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161104 05:00:59-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Quit: wedge009] 20161104 05:01:15-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161104 05:08:16-!- tad_carlucci [~lundberg@173.217.65.103] has quit [Quit: Off to resolve a merge conflict between the wife and husband branches of my real life.] 20161104 05:12:08-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 245 seconds] 20161104 05:28:15-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161104 05:51:11-!- astrel [~astrelyon@78.134.226.117] has joined #wesnoth-dev 20161104 05:53:04-!- astrelyon [~astrelyon@78.134.231.82] has quit [Ping timeout: 256 seconds] 20161104 06:21:20-!- JyrkiVesterinen [~JyrkiVest@87-92-16-44.bb.dnainternet.fi] has joined #wesnoth-dev 20161104 06:21:55-!- Bonobo [~Bonobo@2001:44b8:254:3200:f9ef:17fe:44f:c237] has joined #wesnoth-dev 20161104 06:24:38< Aginor> getting continiously darker is an alpha blending issue 20161104 06:25:04< Aginor> there's a black background and if transparancy is added to it more and more, it'll eventually show up as black 20161104 06:33:23-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 06:38:05-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20161104 06:54:43< vultraz> hmm 20161104 07:06:29 * celticminstrel wonders if vultraz ever made use of the alpha formula IPF. 20161104 07:09:17< vultraz> actually I did not :( 20161104 07:09:24< vultraz> yet 20161104 07:09:28< celticminstrel> Forgot, or problems? 20161104 07:09:52< vultraz> Lb's working on a dedicated version of the background image with non-linear fadeout. 20161104 07:10:05< vultraz> so I wasn't sure if i should make the current version use it or not.. 20161104 07:10:12< celticminstrel> Well you can totally do non-linear fadeout with the IPF if that's what you want. 20161104 07:11:00< vultraz> i mean non-linear in the sense that it's not a flat straight vertical gradient. 20161104 07:11:06< celticminstrel> Might take a bit of work to figure out the right formula. 20161104 07:11:21< celticminstrel> You can probably do it anyway. 20161104 07:11:42< celticminstrel> I have no idea what it's like, so it might not be easy. 20161104 07:13:34< celticminstrel> If you don't want to, then whatever; I'm sure addon devs will occasionally find use for it too. 20161104 07:14:08< vultraz> I'm pretty sure I have other uses for it. 20161104 07:14:15< celticminstrel> Shrug! 20161104 07:19:46-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 256 seconds] 20161104 07:24:38-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20161104 07:24:47-!- JyrkiVesterinen [~JyrkiVest@87-92-16-44.bb.dnainternet.fi] has quit [Quit: .] 20161104 07:42:44-!- astrel [~astrelyon@78.134.226.117] has quit [Quit: WeeChat 1.4] 20161104 07:43:04-!- astrelyon [~astrelyon@78.134.226.117] has joined #wesnoth-dev 20161104 07:44:58-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20161104 08:04:29-!- nurupo [~nurupo.ga@unaffiliated/nurupo] has quit [Quit: nurupo] 20161104 08:05:00-!- nurupo [~nurupo.ga@unaffiliated/nurupo] has joined #wesnoth-dev 20161104 08:14:07-!- JyrkiVesterinen [~JyrkiVest@194.157.54.14] has joined #wesnoth-dev 20161104 08:15:30< vultraz> Do members of a struct get default initialization even if the struct doesn't have a ctor? 20161104 08:15:50< JyrkiVesterinen> Yes, they do. 20161104 08:16:26< JyrkiVesterinen> (But note that default initialization for primitive types is a no-op: for example, integers get unspecified values.) 20161104 08:16:36< vultraz> Ok 20161104 08:16:38< vultraz> thanks 20161104 08:16:41-!- irker528 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161104 08:16:42< irker528> wesnoth: Andreas Löf wesnoth:tidyup_blitting c9d5bf53dc07 / src/gui/core/canvas.cpp: Move all drawing methods to rely on Rendering instead of blitting https://github.com/wesnoth/wesnoth/commit/c9d5bf53dc07137edccf7b0cd1ea8e4950c37c73 20161104 08:21:40-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 08:26:08-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 244 seconds] 20161104 08:26:58< irker528> wesnoth: Charles Dang wesnoth:master 54f6ef2732b5 / src/gui/dialogs/multiplayer/ (mp_options_helper.cpp mp_options_helper.hpp): MP Options Helper: don't hardcode separate node position members for each type https://github.com/wesnoth/wesnoth/commit/54f6ef2732b59e4413775214bf99e5cf8ff09042 20161104 08:27:38< vultraz> I'm probably over-engineering this class at this point, but it's good practice for me :P 20161104 08:29:54< irker528> wesnoth: Charles Dang wesnoth:master f7b862315671 / src/tests/gui/test_gui2.cpp: Attempt to fix tests https://github.com/wesnoth/wesnoth/commit/f7b86231567194906b07e985801237077028a06b 20161104 08:39:55-!- boucman_work [~boucman@LStLambert-657-1-76-184.w80-13.abo.wanadoo.fr] has joined #wesnoth-dev 20161104 08:42:12-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161104 09:21:05-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161104 09:22:58-!- travis-ci [~travis-ci@ec2-54-146-60-152.compute-1.amazonaws.com] has joined #wesnoth-dev 20161104 09:22:59< travis-ci> wesnoth/wesnoth#11852 (master - 54f6ef2 : Charles Dang): The build is still failing. 20161104 09:22:59< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/173186761 20161104 09:22:59-!- travis-ci [~travis-ci@ec2-54-146-60-152.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161104 09:53:41-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161104 09:54:47< irker528> wesnoth: Charles Dang wesnoth:master 4a2f19cdd703 / src/gui/dialogs/multiplayer/mp_options_helper.cpp: MP Options Helper: small cleanup as per feedback https://github.com/wesnoth/wesnoth/commit/4a2f19cdd70323c796209c3560bad9f4d16d3dc7 20161104 09:56:12-!- travis-ci [~travis-ci@ec2-54-92-195-177.compute-1.amazonaws.com] has joined #wesnoth-dev 20161104 09:56:13< travis-ci> wesnoth/wesnoth#11853 (master - f7b8623 : Charles Dang): The build has errored. 20161104 09:56:14< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/173187155 20161104 09:56:14-!- travis-ci [~travis-ci@ec2-54-92-195-177.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161104 09:57:39< irker528> wesnoth: Charles Dang wesnoth:master 2c527c57d9e5 / src/gui/dialogs/multiplayer/mp_options_helper.hpp: MP Options Helper: removed unused getters https://github.com/wesnoth/wesnoth/commit/2c527c57d9e5df0f21b24e7aa472ff601cac6f9f 20161104 09:58:21-!- Sapient [8269ea6c@wesnoth/developer/Sapient] has joined #wesnoth-dev 20161104 10:02:47< zookeeper> a wild sapient appears 20161104 10:03:00< Sapient> yo zookeeper ! 20161104 10:04:05< Sapient> I'm still living in the Philippines. Training myself with Java now. 20161104 10:05:47< zookeeper> nice weather? 20161104 10:08:45< Sapient> it's pretty hot all year, but I've mostly adapted to the heat now 20161104 10:10:00-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 10:10:21< zookeeper> mm-hmh 20161104 10:12:49< Sapient> My tips: always bring a mini-umbrella for sun, a folding fan, and for long trips a thermos full of ice cubes. 20161104 10:13:45< Sapient> You can take out an ice cube, wrap it in your handkerchief, then tie to your head or neck ;) 20161104 10:13:47< zookeeper> i'd say i'll keep that in mind, but i doubt i'll end up needing to 20161104 10:14:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 256 seconds] 20161104 10:32:42-!- travis-ci [~travis-ci@ec2-54-146-60-152.compute-1.amazonaws.com] has joined #wesnoth-dev 20161104 10:32:42< travis-ci> wesnoth/wesnoth#11854 (master - 4a2f19c : Charles Dang): The build was fixed. 20161104 10:32:43< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/173202904 20161104 10:32:43-!- travis-ci [~travis-ci@ec2-54-146-60-152.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161104 10:44:01-!- matthiaskrgr [matthiaskr@gateway/shell/panicbnc/x-vxexkgpezshdoezy] has quit [Ping timeout: 260 seconds] 20161104 10:44:02-!- new_one [~new_one@2604:a880:1:20::22e:d001] has quit [Ping timeout: 260 seconds] 20161104 10:50:38-!- matthiaskrgr [matthiaskr@gateway/shell/panicbnc/x-zyevvcalpnevbeux] has joined #wesnoth-dev 20161104 10:51:01-!- matthiaskrgr is now known as Guest27381 20161104 10:55:19-!- Guest27381 [matthiaskr@gateway/shell/panicbnc/x-zyevvcalpnevbeux] has quit [Changing host] 20161104 10:55:19-!- Guest27381 [matthiaskr@unaffiliated/matthiaskrgr] has joined #wesnoth-dev 20161104 10:55:19-!- Guest27381 [matthiaskr@unaffiliated/matthiaskrgr] has quit [Changing host] 20161104 10:55:19-!- Guest27381 [matthiaskr@gateway/shell/panicbnc/x-zyevvcalpnevbeux] has joined #wesnoth-dev 20161104 10:56:04-!- Guest27381 is now known as matthiaskrgr_ 20161104 10:58:06-!- new_one [~new_one@2604:a880:1:20::22e:d001] has joined #wesnoth-dev 20161104 10:59:23-!- Nikitaw99 [2e00bc04@gateway/web/freenode/ip.46.0.188.4] has joined #wesnoth-dev 20161104 11:01:55-!- travis-ci [~travis-ci@ec2-54-92-195-177.compute-1.amazonaws.com] has joined #wesnoth-dev 20161104 11:01:57< travis-ci> wesnoth/wesnoth#11855 (master - 2c527c5 : Charles Dang): The build passed. 20161104 11:01:57< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/173203515 20161104 11:01:57-!- travis-ci [~travis-ci@ec2-54-92-195-177.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161104 11:49:24-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Quit: wedge009] 20161104 11:49:42-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161104 11:50:44-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Client Quit] 20161104 11:54:59-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161104 11:57:33-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 12:02:04-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20161104 12:16:12-!- Sapient [8269ea6c@wesnoth/developer/Sapient] has quit [Quit: Page closed] 20161104 12:17:18-!- louis94 [~~louis94@91.178.241.199] has joined #wesnoth-dev 20161104 12:20:30-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161104 12:24:08-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20161104 12:58:25-!- irker528 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161104 13:33:32-!- DeFender1031 [~DeFender1@46-116-17-86.bb.netvision.net.il] has quit [Quit: I'm not back now.] 20161104 13:38:33-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20161104 13:38:39-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20161104 13:48:23-!- matthiaskrgr_ is now known as matthiaskrgr 20161104 13:57:36-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161104 14:04:49-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161104 14:06:06-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Ping timeout: 252 seconds] 20161104 14:06:42-!- stikonas_ is now known as stikonas 20161104 14:12:32-!- louis94 [~~louis94@91.178.241.199] has quit [Quit: Konversation terminated!] 20161104 14:14:53-!- boucman_work [~boucman@LStLambert-657-1-76-184.w80-13.abo.wanadoo.fr] has quit [Ping timeout: 244 seconds] 20161104 14:20:42-!- Bonobo [~Bonobo@2001:44b8:254:3200:f9ef:17fe:44f:c237] has quit [Quit: Leaving] 20161104 14:21:29-!- atarocch [~atarocch@93.56.160.28] has quit [Ping timeout: 260 seconds] 20161104 14:27:11-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161104 14:33:30-!- atarocch [~atarocch@93.56.160.28] has joined #wesnoth-dev 20161104 14:57:26-!- boucman_work [~boucman@LStLambert-657-1-76-184.w80-13.abo.wanadoo.fr] has joined #wesnoth-dev 20161104 15:21:38-!- Appleman1234 [~Appleman1@KD106161210098.au-net.ne.jp] has quit [Ping timeout: 252 seconds] 20161104 15:32:33-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20161104 15:36:16-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161104 16:04:06-!- JyrkiVesterinen [~JyrkiVest@194.157.54.14] has quit [Quit: .] 20161104 16:13:03-!- boucman_work [~boucman@LStLambert-657-1-76-184.w80-13.abo.wanadoo.fr] has quit [Remote host closed the connection] 20161104 16:15:17-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 16:24:31-!- Nikitaw99 [2e00bc04@gateway/web/freenode/ip.46.0.188.4] has quit [Quit: Page closed] 20161104 16:51:14< celticminstrel> Does anyone understand the naming of the terrain stuff? Like t_translation for example. 20161104 16:53:00< celticminstrel> I feel like it probably means "terrain_translation" rather than "translation_type" but not sure. 20161104 16:53:19< celticminstrel> (t_translation is a namespace.) 20161104 16:56:23-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161104 17:08:30-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161104 17:12:26< celticminstrel> Maybe I should pose this question one more time in case people have opinions. 20161104 17:13:16< celticminstrel> For widgets, I could do wgt_listbox or widgets::listbox. For dialogs, I could do dlg_mp_create_game or dialogs::mp_create_game. Which type of strategy do people prefer? 20161104 17:17:06-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161104 17:18:44-!- tad_carlucci [~lundberg@173.217.65.103] has joined #wesnoth-dev 20161104 17:22:49< celticminstrel> Looks like terrain codes are limited to four characters because they're stuffed into a long. 20161104 17:23:00< celticminstrel> So they could be expanded to eight characters. 20161104 17:23:26< celticminstrel> (Just a random observation.) 20161104 17:23:39-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161104 17:24:24 * celticminstrel said "long", but it actually uses unit32_t IIRC. 20161104 17:25:15-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161104 17:25:15-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Client Quit] 20161104 17:25:20-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20161104 17:39:59< vultraz> celticminstrel: i prefer member operators instead of friend operators 20161104 17:45:54< celticminstrel> ... 20161104 17:45:58< celticminstrel> No no no no no. 20161104 17:46:22< celticminstrel> Member operators are asymmetric. 20161104 17:46:42< celticminstrel> Comparison and arithmetic operators should almost always not be member operators. 20161104 17:47:14< celticminstrel> (They may not need to be friends in all cases, mind you.) 20161104 17:47:27< vultraz> hm? 20161104 17:47:33< celticminstrel> But don't go applying a preference like that to everything, basically. 20161104 17:48:47< vultraz> is there any reason they *need* not be members? 20161104 17:50:21< tad_carlucci> celticminstrel, Yes, they're packed into a 32-bit field and why limit the terrain code? Use a shared-string lookup and if you need the efficiency, use pointers to the string. 20161104 17:52:24< celticminstrel> I think it's mainly a stylistic argument... they are symmetric operators in the sense that they generally take the same type on both sides, so declaring them as non-member functions makes that clear, while declaring them as member functions breaks the symmetry (one argument is passed as a pointer, the other by reference). 20161104 17:52:28< tad_carlucci> If the string lookups are the issue, use a hash. 20161104 17:52:38< celticminstrel> So I suppose that's a no, they don't need to be non-members. 20161104 17:52:49< celticminstrel> Maybe someone else can explain this better than me. 20161104 17:53:09-!- mordante [~mordante@wesnoth/developer/mordante] has joined #wesnoth-dev 20161104 17:53:21< celticminstrel> tad_carlucci: I have no idea why it's limited. I'm not too interested in changing it now though. 20161104 17:53:40< mordante> servus 20161104 17:53:44< tad_carlucci> celticminstrel, vultraz There are reasons for both. Consider single-point-of-control when deciding. What you don't want is to change one class and have to go searching for the 142 other classes which have to be changed as well. 20161104 17:53:49< celticminstrel> If someone wants to refactor terrain to use a hashmap after 1.13.6 and the mass rename, then they can go ahead and do so. 20161104 17:54:16< celticminstrel> vultraz: I was more worried about the fact that your operator< appears to implement greater-than, though. 20161104 17:54:35< vultraz> yeah, mistake 20161104 17:54:37< vultraz> will fix 20161104 17:54:39< vultraz> >_> 20161104 17:54:48< celticminstrel> Mind you, there's nothing wrong with writing your operator< to implement greater-than. 20161104 17:55:02< celticminstrel> If it's intentional. 20161104 17:55:35< celticminstrel> BTW, didn't you also write (*this).position where you could've written this->position? 20161104 17:55:45< tad_carlucci> celticminstrel, Limiting to 4 single-byte characters and packing into a 32-bit integer is a "poor man's hash". It works but it's terribly inefficient. 20161104 17:56:13< celticminstrel> How is it terribly inefficient? 20161104 17:56:24< celticminstrel> I can't imagine it being less efficient than a normal hash. 20161104 17:56:35< celticminstrel> And unlike a hash it's invertible. 20161104 17:56:44< celticminstrel> (No idea if that matters, mind you) 20161104 17:58:15< tad_carlucci> celticminstrel, Only way to get O(1) speed is to have a sparse table with 2^32 slots. If you use an O(1) perfect hash you can reduce the footprint considerably. An O(N) perfect hash can be (near) perfect on memory use, too. 20161104 17:59:05< celticminstrel> Oh you're saying it's inefficient in terms of memory use if you use that as a hash. 20161104 17:59:31< celticminstrel> (It's probably not actually used as a hash... might be used as the key for a tree though.) 20161104 18:01:19< tad_carlucci> celticminstrel, It's a hash. int Hash(char[4] key) { return (long)&key; } 20161104 18:02:03< tad_carlucci> celticminstrel, So first refactor that in everywhere, then rewrite it to take char* instead of char[4] and you're done. 20161104 18:02:21< celticminstrel> Oh huh, okay then. 20161104 18:02:43< celticminstrel> But what you describe doesn't sound like how I'd refactor it... 20161104 18:03:08< tad_carlucci> No, that's a scalpel. I'd use the trusty 10# sledge. 20161104 18:03:11< celticminstrel> BTW, that code looks like it's using the address as the hash. 20161104 18:03:36< celticminstrel> Assuming there's a std::map somewhere, I'd remove the hash function and switch it to std::unordered_map. 20161104 18:03:46< tad_carlucci> Well, probably should have spent some time doing a union but you get the idea 20161104 18:03:49< celticminstrel> With std::string as the key_type 20161104 18:04:10< celticminstrel> Ah, that wasn't the actual code in Wesnoth? 20161104 18:04:17< tad_carlucci> No. 20161104 18:04:33< tad_carlucci> It's the idea the non-appearance of that function implements. 20161104 18:04:51< celticminstrel> Probably only needed a * - return *(long*)&key; 20161104 18:05:32< tad_carlucci> celticminstrel, Well, if we're doing C instead of C++, that probably would work. But then the C++ purists would fetch the torches and pitchforks. 20161104 18:05:45< celticminstrel> Of course, but you did say it was just for illustration. 20161104 18:06:58< tad_carlucci> The issue your fix for my lame example has is it depends upon the caller ensuring the char[4] is actually char[4] and not char[2] with 2-bytes random garbageon the end. 20161104 18:07:08-!- JyrkiVesterinen [~JyrkiVest@87-100-200-24.bb.dnainternet.fi] has joined #wesnoth-dev 20161104 18:07:26< celticminstrel> And your syntax for the array was wrong too. :P 20161104 18:08:37< tad_carlucci> so call it pseudo-code. The idea is that NOT using a hash function in that case IS a hash function. It's O(0) hashing .. perfectly fast, always takes 0 time to run. 20161104 18:09:23-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161104 18:10:05< tad_carlucci> Also, since it's char and char in this case is usually alpha with a couple characters we're using 8 bits to hold 5 bits of information. 20161104 18:10:34< tad_carlucci> maybe 5 or 6.5 20161104 18:11:23-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161104 18:11:27< celticminstrel> The terrain codes are mostly [upper][lower][lower], yeah... 20161104 18:11:42< celticminstrel> Or [upper][lower] or [upper][lower][/|\] 20161104 18:12:04< tad_carlucci> So it's probably between 4 and 5 bits of information. About 100% over-size using the not-a-hash hash. 20161104 18:12:04< celticminstrel> Except for _f and _s and maybe one or two others. 20161104 18:12:30< tad_carlucci> As I said, terribly ineffecient. 20161104 18:12:35< celticminstrel> The caret doesn't count since that's a divider. 20161104 18:13:46< celticminstrel> So are you suggesting a) writing a hash specialized for the typical structure of terrain codes or b) allowing terrain codes to have any 8-bit characters? 20161104 18:14:03< celticminstrel> (Well, 7-bit at least, and excluding control characters and space.) 20161104 18:14:27< tad_carlucci> IFF you wasn to use only the current set, you can design a minimum-size perfect hash for that set. 20161104 18:14:47< tad_carlucci> If you want to allow some expansion, you can do a non-min perfect hash. 20161104 18:15:11< vultraz> what is this size thing? 20161104 18:15:37< tad_carlucci> If you want to allow utf8 full-set, any length, there are good hashes already. We're not concerned about security here so MD5 is good and fast, for example. 20161104 18:15:42< celticminstrel> Well it should probably at least work for any [A-Z][a-z][a-z\|/]?|_[a-z] 20161104 18:18:57< tad_carlucci> The idea is to produce a hash which is fast to compute and blindingly fast to compare. A perfect hash ensures no collisions. There are perfect hash generators if you know the full set of keys; and processesyou can do by hand if you don't know the full set but can describe it. 20161104 18:22:55< tad_carlucci> For example, when the engine starts, or after loading an add-on, we can scan the entire WML for terrain codes to get the exact set, run it through a generator and re-hash the terrain lookup to be perfect. Cache the results and things are very fast on the next run, too 20161104 18:44:31< tad_carlucci> Poking around I see two build targets: exploder and cutter. They won't build on master due to undefined externals. Are they no longer supported and should be ignored? 20161104 18:45:55-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161104 18:46:13-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20161104 18:46:48< tad_carlucci> I started to track down the missing parts last night but set it aside for today because it looks like it's going to pull in the entire gui. 20161104 18:47:06-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161104 18:47:18< celticminstrel> I think they're terrain support utilities, so maybe zookeeper knows something? 20161104 18:47:47< tad_carlucci> Yes, they are. 20161104 18:48:52-!- irker269 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161104 18:48:52< irker269> wesnoth: Charles Dang wesnoth:master 4e6ebf3f4b9e / src/gui/dialogs/multiplayer/mp_options_helper.hpp: MP Options Helper: fixed type_node_data operator< being flipped https://github.com/wesnoth/wesnoth/commit/4e6ebf3f4b9ec6b53f5803f326a541ea67ce4cd8 20161104 18:49:06< zookeeper> they're really old and i don't know when is the last time anyone's actually used them 20161104 18:49:37 * vultraz wonders why (*this) needs to be used for member access here instead of this-> or just the member name 20161104 18:50:11< tad_carlucci> zookeeper, It looks like getting them working will involve a major refactoring of the GUI work to separate data from presentation. 20161104 18:50:57< tad_carlucci> vultraz, Probably because someone never use C or C++ before and was not sure about -> 20161104 18:51:19< zookeeper> tad_carlucci, umm... what do they have to do with any GUI? castle-cutter and exploder are just some script stuff 20161104 18:52:24< tad_carlucci> zookeeper, They don't appear to have anything to do with the GUI but they reference a data element or function which pulls in a module which pulls in a module which ... which appears to end up pulling in all of program 'wesnoth' except wesnoth.cpp 20161104 18:52:25-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20161104 18:53:37< zookeeper> oh right, there's some c++ exploder thingy 20161104 18:54:03< zookeeper> i know absolutely nothing about it, and i'd be interested to hear from someone who does 20161104 18:54:16< tad_carlucci> zookeeper, It's fixable just need to find the module, break it then use a lot of mending plaster. 20161104 18:59:42< zookeeper> i _think_ there's nothing more to it than a basic image-cutting thing which reads the instructions from .cfg files, takes some images, and cuts them up with specified masks and spits out new images 20161104 18:59:58< zookeeper> but i have no idea how you actually use it and whether it'd still even work, etc 20161104 19:01:28< tad_carlucci> zookeeper, that sounds like what it's doing. It's readingthe .cfg files which is the problem. Reading them pulls in the entire game engine. 20161104 19:03:05< JyrkiVesterinen> Maybe it can be changed to use simple_wml to read the .cfg files? Simple_wml is used by the server, and the server can be compiled without the game engine. 20161104 19:03:06< JyrkiVesterinen> https://github.com/wesnoth/wesnoth/blob/master/src/server/simple_wml.hpp 20161104 19:04:03< tad_carlucci> JyrkiVesterinen, I was just wondering about that. Don't know what it's reading. It's a mess so for what I'm playing with I simply removing the linker step and flagging a warning. 20161104 19:07:00< zookeeper> does that mean it won't be able to deal with macros? since i think the .cfg files use macros 20161104 19:08:33< zookeeper> anyway, i wouldn't be surprised if literally no one on the planet has actually ran the tool in the past let's say 5 years, so... 20161104 19:16:08< tad_carlucci> zookeeper, How about a call to delete it on the forums for 1.13.7, see if anyone actually uses it any more. 20161104 19:16:33< zookeeper> sure 20161104 19:16:44 * tad_carlucci points at you. 20161104 19:19:21-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161104 19:21:27 * zookeeper turns around and looks behind him 20161104 19:21:30< zookeeper> no one there? 20161104 19:21:39< zookeeper> so confusing 20161104 19:35:37< vultraz> why are we resurrecting exploder? 20161104 19:36:12< zookeeper> that's an odd interpretation 20161104 19:37:25< vultraz> you said years ago it was broken and unused :/ 20161104 19:37:53< zookeeper> and what have i said now? 20161104 19:39:08< vultraz> that you know nothing about it 20161104 19:40:02< zookeeper> and, apparently, that we should resurrect it? :p 20161104 19:43:46-!- mordante [~mordante@wesnoth/developer/mordante] has quit [Quit: Leaving] 20161104 19:50:36< vultraz> well, tad is saying so 20161104 19:51:01< celticminstrel> I think you're misinterpreting the conversation. 20161104 19:51:22< celticminstrel> He's pointing out that it's broken and asking whether it should be deleted or fixed. 20161104 19:55:22< vultraz> oh 20161104 19:59:30< tad_carlucci> I am not saying we should resurrect exploder or cutter; rather someone (zookeeper?) should raise the final demise as a question on the forums. And that, should resurrection be desirable, it appears to need some major refactoring of the data-vs-presentation concept for the entire engine. 20161104 20:10:18-!- JyrkiVesterinen [~JyrkiVest@87-100-200-24.bb.dnainternet.fi] has quit [Quit: .] 20161104 20:42:15< tad_carlucci> It appears wesmage is in the same condition as exploder and cutter. schema_geneartor builds, scons has no rule for schema_validator. there appear to be a couple more programs in src/tools which are just quick tests and probably should simply be remove. 20161104 20:48:39-!- Shiki [~Shiki@141.39.226.226] has quit [Ping timeout: 250 seconds] 20161104 20:49:59-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161104 21:08:25-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161104 21:22:58-!- gfgtdf [~chatzilla@x4e369961.dyn.telefonica.de] has joined #wesnoth-dev 20161104 21:23:09< gfgtdf> JyrkiVesterinen: simple 20161104 21:24:01< gfgtdf> _wml only accepts configs in the format as ouputtet for by teh config c++ objects. For examepl it assumes the attributes to be specified in order. 20161104 21:29:02< gfgtdf> one of the reason why terrain codes are implemented using uint32_t is to make terrain filters fast, usually aplying a terrain filter it just someting like "bool matches = (terrain & filter_mask) == filter" 20161104 21:39:04< tad_carlucci> gfgtdf, It was celticminstrel asking about that. It's a solvable problem to maintain that speed and allow terrain code to be more than four characters. 20161104 21:46:15< tad_carlucci> Hmm. I think I found the common point of failure for a number of the tools. I might be able to get them working/resurrected by refactoring just one file: src/sdl/utils.cpp .. break it into two files might be all which is needed. 20161104 21:46:34< zookeeper> 4 letters ought to be enough for anyone 20161104 21:47:43< tad_carlucci> zookeeper, But you know The Rule: if them N and they always want N+1. So there are only three 'reasonable' numbers when doing a design: 0, 1 and infinity. 20161104 21:48:14< tad_carlucci> s/if them/give them/ 20161104 21:48:48< zookeeper> maybe we need to go back to 1 letter then! 20161104 21:49:08< tad_carlucci> Great. I get dibs on tilde! 20161104 21:49:10< zookeeper> those were the days 20161104 21:49:45-!- irker269 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161104 21:55:03< vultraz> technically a hex can have up to 9 codes 20161104 21:55:31< vultraz> base^orly1 20161104 21:55:41< vultraz> (where 1 is a starting position marker) 20161104 21:56:17-!- atarocch [~atarocch@93.56.160.28] has quit [Remote host closed the connection] 20161104 21:57:41< vultraz> s/code/characters 20161104 21:57:42< zookeeper> vultraz, do you happen to know whether this track slipped into UMC land? because it sounds nice: https://mattiaswestlund.bandcamp.com/track/victorys-price 20161104 21:57:52< zookeeper> (also massive FF6 vibes) 20161104 21:59:04< vultraz> I don't think so. 20161104 21:59:29< zookeeper> hmh 20161104 22:01:05< vultraz> Let's not ask him about music or anything until the Board resolves this licensing stuff. 20161104 22:01:46< shadowm> Yeah, in 2020. 20161104 22:02:42< shadowm> Some parts of that track sound oddly similar to the Jurassic Park tune. 20161104 22:03:04< vultraz> I hope we can convince him to renew a relationship with the project, and that will be easier if we can say no one will be harassing him about GPL bullshit. 20161104 22:03:25< vultraz> shadowm: you mean 1:35? 20161104 22:03:48< vultraz> yes, that climbing duh duh duh does indeed sound like the Jurassic Park theme. 20161104 22:04:02< shadowm> That's not really a good thing on my book. 20161104 22:06:26< vultraz> The music or asking him back? 20161104 22:06:39< zookeeper> what, you mean this bit? https://youtu.be/D8zlUUrFK-M?t=156 20161104 22:06:55< vultraz> yes 20161104 22:07:12< shadowm> vultraz: Yes. 20161104 22:07:24< vultraz> OBJECTION 20161104 22:08:09< zookeeper> that's just a few of the same notes as far as i can hear 20161104 22:08:29< zookeeper> recognizable, yeah, but then it immediately goes in a different direction 20161104 22:12:53-!- Shiki [~Shiki@141.39.226.226] has quit [Read error: Connection reset by peer] 20161104 22:21:00-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [] 20161104 22:22:54-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 22:27:49-!- TheJJ [~rofl@ipbcc36896.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection] 20161104 22:35:23-!- ancestral [~ancestral@8.42.164.20] has joined #wesnoth-dev 20161104 22:36:22-!- Estradavi [~quassel@90.71.242.223] has joined #wesnoth-dev 20161104 22:43:18< tad_carlucci> vultraz, In src/tools/sdl2 is a text program from 2014. Looking at the build rules for it, it appears to excersize all of the gui in some manner. Is that tool meaningful or useful today? 20161104 22:45:41< vultraz> likely not 20161104 22:46:43< vultraz> like the commit message says 20161104 22:46:46< vultraz> "The tool is used to test parts of the new SDL2 code, without the need 20161104 22:46:48< vultraz> to directly modify the main Wesnoth code." 20161104 22:46:54< vultraz> we have already fully transitioned to sdl 2 20161104 22:47:07< vultraz> so testing functions are not needed. 20161104 22:47:43< tad_carlucci> OK. It looks to be missing a header 'sdl/texture.hpp' so it probably is not recoverable. 20161104 22:48:58< Aginor> we can probably just drop that code 20161104 22:49:57< tad_carlucci> So, I just need to look at wesmage and I'm done with the audit of the build targets I could find. So far, the only issues are the refactor needed for some SDL functions for create_images, cutter and exploder and it looks like I can get them all built with no errors and runnable (sic .. they run but I don't know what they do or how to use them) 20161104 22:51:32< tad_carlucci> There's no rush. After 1.13.6 tags, should I put up a PR to delete the sdl2 tests? Or does someone else want to handle it? 20161104 22:51:59< tad_carlucci> CMake has the target. I don't think SCons does. 20161104 22:53:03< vultraz> you can delete them now. 20161104 22:53:35< tad_carlucci> Nah. Too close to a tag. Best to wait until we're back in dev mode. 20161104 22:54:07< Aginor> +1 20161104 22:54:18< tad_carlucci> Don't wanna break CMake or SCons at this point. 20161104 22:54:24< vultraz> alright 20161104 22:54:29< zookeeper> vultraz, please provide planned UTC for release 20161104 22:55:43-!- vultraz changed the topic of #wesnoth-dev to: 1.13.6 planned for Sunday, November 6th (00:00 UTC) | Wesnoth Developers Channel | >>> Want to help? Go here: http://r.wesnoth.org/t42911 (and thanks!) <<< | Logs: http://irclogs.wesnoth.org | Bug tracker: http://bugs.wesnoth.org 20161104 22:56:08< zookeeper> what's 00:00 20161104 22:56:18< vultraz> midnight. 20161104 22:56:26< vultraz> so, about 24 hours from now 20161104 22:56:26< zookeeper> well duh 20161104 22:56:36< zookeeper> oh? because again i would have assumed 48 hours 20161104 22:56:39< zookeeper> don't use 00:00 20161104 22:56:59< vultraz> then what should i use :| 20161104 22:57:01< vultraz> 12 am:? 20161104 22:57:37< Aginor> that's eqully open to misinterpretation 20161104 22:57:40< zookeeper> 00:01? :p 20161104 22:57:43< vultraz> :| 20161104 22:58:00< Aginor> technically, midnight (00:00:00) is when the new day starts 20161104 22:58:12< vultraz> yes. 20161104 22:58:35-!- ancestral [~ancestral@8.42.164.20] has quit [Quit: i go nstuf kthxbai] 20161104 22:58:44< aeth> go with 00:00:00.001 20161104 22:58:48< aeth> perfectly clear 20161104 22:58:54< vultraz> ...................... 20161104 22:59:24< tad_carlucci> Well, check for a leap second if you're gonna be that precise. :P 20161104 22:59:47< vultraz> god dammit, people :| 20161104 22:59:56< aeth> tad_carlucci: no 20161104 23:00:04< celticminstrel> [Nov 04@5:55:31pm] vultraz: base^orly1 20161104 23:00:04< aeth> Never do time by hand, rely on a library. 20161104 23:00:06< celticminstrel> 1) Wait, is the ^ considered part of the overlay's terrain code rather than a separator? 2) The 1 comes before and is separated by a space, so it doesn't count as part of the code. 20161104 23:00:19< aeth> There are two things you should never attempt to implement yourself. Time and encryption. 20161104 23:00:33< celticminstrel> 00:00 seems less open to misinterpretation than 12am. 20161104 23:00:36< aeth> Too many edge cases with potentially dangerous consequences. 20161104 23:00:40< celticminstrel> Anyway you specificed UTC so... 20161104 23:00:44< celticminstrel> ^specified 20161104 23:01:04< aeth> celticminstrel: technically 12am is incorrect 20161104 23:01:05< tad_carlucci> HE has all day tomorrow to set up an NTC mesh, sync it, and fire a cron job at 00:00:00.001 .. 20161104 23:01:09< tad_carlucci> NTP 20161104 23:01:17< celticminstrel> aeth: How so? 20161104 23:01:32< aeth> celticminstrel: If you're doing am/pm, then the actual instant of 12:00 midnight and 12:00 noon are different things because it's based on being *after* those landmark times 20161104 23:01:42< vultraz> GOD DAMMIT :| 20161104 23:01:53< celticminstrel> ...I have no idea what you're talking about now. 20161104 23:02:00< aeth> Although generally computers go with 12:00 "am" because 12:00:01 am and 12:00:00 am being the same status is less confusing 20161104 23:02:19< celticminstrel> Though I'm pretty sure 12am could be either noon or midnight. 20161104 23:02:34< vultraz> ............. 20161104 23:02:39< aeth> celticminstrel: oh sorry, I was wrong, slightly 20161104 23:02:41< aeth> https://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight 20161104 23:02:49< celticminstrel> Personally I think it's more logical for it to be noon, but it seems more people prefer it to be midnight. 20161104 23:03:04< aeth> celticminstrel: technically it's 12 m for noon because am and pm is before and after respectively 20161104 23:03:08< aeth> antes/post 20161104 23:03:16< celticminstrel> You missed your a or p 20161104 23:03:50< tad_carlucci> I miss A&P, too. But Kroger's does well enough. 20161104 23:05:24< tad_carlucci> Well, you could go for 23:59:59.999 and still say you made it on the 6th. 20161104 23:06:38< celticminstrel> Wait, is Nov 6 00:00 UTC the beginning of the day or the end? 0 suggests the former. 20161104 23:06:53< aeth> celticminstrel: that's the point, noon is not 12 am or 12 pm, it's 12 m as in noon (meridies) 20161104 23:07:08< celticminstrel> That's going a bit too far. 20161104 23:07:19< aeth> That's why it's a good thing authoritative time uses the 24 hour format 20161104 23:07:33< aeth> celticminstrel: Computers make noon 12 pm but 12 "after noon" makes no sense for the instant of noon 20161104 23:07:40< tad_carlucci> And don't forget to use UTC because Sunday, the 6th a lot of us are going to go from 00:59:59.999 to 00:00:00.000 local time. So we'll have TWO 00:00:00.001, locally, that day. 20161104 23:07:50< aeth> Although I have seen some digital clocks say "12:00 noon" or something. Rarely 20161104 23:09:39-!- Appleman1234 [~Appleman1@KD106161209021.au-net.ne.jp] has joined #wesnoth-dev 20161104 23:10:03< celticminstrel> So by putting it at 00:00 UTC vultraz has decided that the tag shall happen at the start of Sunday. 20161104 23:10:19-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20161104 23:10:19< celticminstrel> ie, it's the midnight between Saturday and Sunday. 20161104 23:14:58-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20161104 23:16:41< Aginor> celticminstrel: yes, it's an alpha blending issue 20161104 23:16:46< Aginor> I'm looking at it right now 20161104 23:17:10< Aginor> looks like it may be too much blending and it's turned fully transparent 20161104 23:17:32< Aginor> alternatively, none at all 20161104 23:17:45-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161104 23:18:34< celticminstrel> Looks more like the latter to me. 20161104 23:23:38< shadowm> Disappointed that you tried to ruin this historic occasion with your pedantry. 20161104 23:24:35< shadowm> Instead of complaining you should cherish this moment. For the first time since I stepped down someone bothered to use an exact date and time in a globally-recognizable time zone for scheduling an official activity. 20161104 23:25:05 * shadowm sends vultraz cookies. 20161104 23:25:38< zookeeper> oh, so the last time i whined about 00:00, it was you? :P 20161104 23:26:25< shadowm> I don't see how one thing follows the other. 20161104 23:27:50< zookeeper> seems like a logical necessity 20161104 23:29:48-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161104 23:48:29< pydsigner> Oh so 1.13.6 is finally going to happen? Yay! 20161104 23:49:50-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161104 23:54:04-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 244 seconds] --- Log closed Sat Nov 05 00:00:00 2016