--- Log opened Wed Apr 19 00:00:12 2017 --- Day changed Wed Apr 19 2017 20170419 00:00:12-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20170419 00:00:19< celticminstrel> Um. 20170419 00:00:30< celticminstrel> If it's a true singleton, then yes, but... 20170419 00:00:32< celticminstrel> Is it? 20170419 00:00:53< vultraz_iOS> dunno 20170419 00:03:25< celticminstrel> Why does format_prob put a space before the percent sign? o.O 20170419 00:04:23< vultraz_iOS> Who Knows 20170419 00:04:35< celticminstrel> Should it? 20170419 00:04:40< vultraz_iOS> Who Knows 20170419 00:04:50< vultraz_iOS> depends where its used 20170419 00:05:13< celticminstrel> Unit weapons report. 20170419 00:05:27< celticminstrel> Which I guess means... displaying attacks on the sidebar? 20170419 00:05:33< vultraz_iOS> probably 20170419 00:05:54< celticminstrel> In the tooltip maybe? 20170419 00:06:09< celticminstrel> So should it have a space? 20170419 00:06:49< vultraz_iOS> I guess for fomatting 20170419 00:08:05< celticminstrel> I'm confused why the format is 3.1f for <10% and 4.1f for ≥10%. 20170419 00:08:18< vultraz_iOS> more digits? 20170419 00:08:27< celticminstrel> Well... 20170419 00:08:39< celticminstrel> I don't think it'll actually make any difference? 20170419 00:09:03< celticminstrel> First of all, there's a special case for 100%, which leaves out the decimal point. 20170419 00:09:29< celticminstrel> So anything ≥10% has two significant figures, meaning that that fourth place will be unused. 20170419 00:09:39< celticminstrel> Hmm, wait, maybe that's actually the point? 20170419 00:09:45< celticminstrel> Maybe they want a space before the number? 20170419 00:10:06< celticminstrel> Hm, but there's no space before the 100%. 20170419 00:11:36< celticminstrel> So basically, ≥10% uses 4.1f as the format, but such a percentage has two digits to the left of the decimal place, so 3.1f is the max it can fill, meaning the 4th is padding. Similarly, <10% has one digit to the left of the decimal place, so 2.1f is the max it can fill, meaning the 3rd is padding. 20170419 00:11:55< celticminstrel> So you always end up with a space in front of the number, but if that was the goal, why is there no space in front of the 100%? 20170419 00:12:40< vultraz_iOS> oversight? 20170419 00:12:58< celticminstrel> ...oh wait. The <10% case has a additional space in front of the format, too. 20170419 00:13:36< celticminstrel> So the goal is ... alignment of decimal places? Not that that's gonna work without a fixed-width font though... 20170419 00:13:41< celticminstrel> ^decimal points 20170419 00:14:00< vultraz_iOS> possibly 20170419 00:14:04< celticminstrel> But in that case, I might as well just use unconditional width of 4. 20170419 00:16:41-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170419 00:17:15-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 00:20:22< celticminstrel> vultraz_iOS: So should it be "100 %" or "100%"? 20170419 00:20:30< vultraz_iOS> latter ofc 20170419 00:28:08-!- atarocch [~atarocch@31.159.251.208] has quit [Remote host closed the connection] 20170419 00:31:38< celticminstrel> We were supporint GCC 4.8, correct? 20170419 00:31:41< celticminstrel> ^supporting 20170419 00:31:50< vultraz_iOS> sadly 20170419 00:36:31-!- Greg-Boggs [~greg_bogg@c-73-37-6-51.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170419 00:38:18-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20170419 00:40:40< gfgtdf> this doesn't look safe 20170419 00:40:46< vultraz_iOS> what? 20170419 00:40:52< gfgtdf> oh wait was at wrong scroll position 20170419 00:40:53< celticminstrel> Geh. One source says MSVC 2015 supports [[deprecated]], but MSDN says it doesn't. :| 20170419 00:40:58< gfgtdf> static display 20170419 00:41:09< celticminstrel> I agree. 20170419 00:41:32< celticminstrel> I suspect "singleton" there really means "there is no more than one instance of this class in existence at a time". 20170419 00:41:41< gfgtdf> the display is owed by the play_controller so its regenreated every tim the a new game is started 20170419 00:41:59< celticminstrel> But for what you proposed to be safe, it would need to be even stricter - "there is only ever one instance of this class in the entire program". 20170419 00:42:37< celticminstrel> So assuming what gfgtdf says is true (and I don't doubt it), it's not safe to assign it to a static pointer. 20170419 00:43:25< vultraz_iOS> ok 20170419 00:45:06< gfgtdf> but i wonder why you'd want that in the first place? display::get_singleton() just returnes a pointer so its not a slow operatoin that whose result should be cached 20170419 00:45:22< gfgtdf> just returns an statuic variable i meant 20170419 00:51:36< vultraz_iOS> interesting 20170419 00:51:48< vultraz_iOS> one can specify std::function with referecne return values 20170419 00:51:50< vultraz_iOS> reference 20170419 00:52:24< gfgtdf> whta do you mean? 20170419 00:52:33< vultraz_iOS> std::function is valid 20170419 00:52:38< gfgtdf> ah ok 20170419 00:53:01< gfgtdf> i somehow first read you can _only_ specify std::function with referecne return values 20170419 00:53:16< celticminstrel> Uh, why does that surprise you? 20170419 00:53:28< vultraz_iOS> dunno 20170419 01:05:19-!- gfgtdf_ [~chatzilla@x4e363f9a.dyn.telefonica.de] has joined #wesnoth-dev 20170419 01:06:45< vultraz_iOS> really a shame c++ doesn't have iteration over struct members 20170419 01:07:24< celticminstrel> Does it have iteration over tuples? 20170419 01:07:26-!- gfgtdf [~chatzilla@x4e369be6.dyn.telefonica.de] has quit [Ping timeout: 252 seconds] 20170419 01:07:28-!- gfgtdf_ is now known as gfgtdf 20170419 01:07:34< celticminstrel> If so, you could adapt that to structs. 20170419 01:09:10< vultraz_iOS> or this https://github.com/cbeck88/visit_struct 20170419 01:09:16-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170419 01:09:28< vultraz_iOS> still, not fully sure what i'd do 20170419 01:09:32< vultraz_iOS> with it 20170419 01:09:37< vultraz_iOS> i have a basic enough solution here 20170419 01:09:51-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 01:09:57< celticminstrel> Why do you want to iterate over a struct, anyway? 20170419 01:10:30< vultraz_iOS> i dunno 20170419 01:12:06< vultraz_iOS> tl'dr would be nice if c++ had reflection 20170419 01:37:17-!- JyrkiVesterinen [~JyrkiVest@87-100-169-150.bb.dnainternet.fi] has joined #wesnoth-dev 20170419 01:50:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170419 01:53:44< irker221> wesnoth: Charles Dang wesnoth:master 8b98e82b3436 / data/gui/macros/filler.cfg: Added GUI_FILLER_ROW macro https://github.com/wesnoth/wesnoth/commit/8b98e82b3436543db20849999483674e647137c9 20170419 01:53:47< irker221> wesnoth: Charles Dang wesnoth:master 495a6bd5dfce / src/image.cpp: Made color_adjustment_resetter reset ToD https://github.com/wesnoth/wesnoth/commit/495a6bd5dfcec233a356f8c13db373a4e962cd01 20170419 01:53:50< irker221> wesnoth: Charles Dang wesnoth:master a1806c2d319f / / (3 files in 2 dirs): GUI2: refactored Custom ToD dialog https://github.com/wesnoth/wesnoth/commit/a1806c2d319f9040bb5a118714d9d0fa1291aa79 20170419 01:57:52< irker221> wesnoth: Charles Dang wesnoth:master 7603e23bbcef / src/editor/controller/editor_controller.cpp: Forgot to include this in a1806c2 https://github.com/wesnoth/wesnoth/commit/7603e23bbcef63f98769d3cce1bf97cb229a1eec 20170419 01:57:55< irker221> wesnoth: Charles Dang wesnoth:master 5ca86cb11e89 / src/tests/gui/test_gui2.cpp: Update tests for a1806c2 https://github.com/wesnoth/wesnoth/commit/5ca86cb11e896b92be7f1ebf4a22c255057c7c98 20170419 01:58:13< irker221> wesnoth: Celtic Minstrel wesnoth:master 40b4328e44f3 / src/ (5 files in 4 dirs): Add DEPRECATED macro and remove uses of snprintf https://github.com/wesnoth/wesnoth/commit/40b4328e44f39ee5600966008eb0d500313094e9 20170419 01:59:22< vultraz_iOS> celticminstrel: is format_prob now the same as in the attack predictions dialog? 20170419 01:59:43< celticminstrel> I dunno. What's it like in the attack_predictions dialog? 20170419 02:00:09< vultraz_iOS> if(prob > 0.9995) { 20170419 02:00:09< vultraz_iOS> ss << "100%"; 20170419 02:00:09< vultraz_iOS> } else { 20170419 02:00:09< vultraz_iOS> ss << std::fixed << std::setprecision(1) << 100.0 * prob << '%'; 20170419 02:00:09< vultraz_iOS> } 20170419 02:00:29< celticminstrel> Well, almost, I guess. 20170419 02:00:41< celticminstrel> I didn't set it to std::fixed, and you don't have a setw() call. 20170419 02:01:36< vultraz_iOS> wonder which is bettee 20170419 02:01:37< vultraz_iOS> r 20170419 02:01:56< celticminstrel> I probably should've set it to std::fixed. 20170419 02:01:59< celticminstrel> Didn't think of it. 20170419 02:02:09< vultraz_iOS> come to think of it, i had problems using setw 20170419 02:02:12< celticminstrel> Chances are it won't matter, but... 20170419 02:02:18< vultraz_iOS> in the above code 20170419 02:02:32< celticminstrel> If you get a really really small probability, it could make a difference. 20170419 02:02:49< celticminstrel> What kind of problems? 20170419 02:03:15< vultraz_iOS> incorrect output 20170419 02:03:39< celticminstrel> Incorrect how? 20170419 02:03:45< vultraz_iOS> can't remember 20170419 02:03:56< vultraz_iOS> wrong place value maybe? 20170419 02:05:10< celticminstrel> Oh wait, I wonder if perhaps the width includes the decimal point... 20170419 02:05:45< celticminstrel> If so, the argument that there's always a space in front from earlier would be false, because that space would instead be the decimal point (and of course in its proper place). 20170419 02:10:05< gfgtdf> why woudl you deprecate wesnoth c++ functions? i mean you can easly find all uses of it and remove it then. 20170419 02:10:23< celticminstrel> Ask vultraz? 20170419 02:10:25< vultraz_iOS> celticminstrel: suggest using the stf::fixed version elevating the function to string_utils.*pp and removing the two 20170419 02:10:40< vultraz_iOS> gfgtdf: basically a todo note. 20170419 02:10:41< celticminstrel> But if you ask me... sometimes it may be very nontrivial to find all uses. 20170419 02:10:52< vultraz_iOS> in the case i used it is trivial 20170419 02:10:59< vultraz_iOS> but it might not be 20170419 02:11:05< vultraz_iOS> it might require refactoring 20170419 02:11:10< celticminstrel> Like teams() 20170419 02:11:43< vultraz_iOS> down with teams()! 20170419 02:11:44< gfgtdf> well in the worst case you remove it, try to build and fix the errors. 20170419 02:16:52< celticminstrel> Could be easier to remove in increments and leave the deprecated annotation as a reminder. 20170419 02:35:44-!- gfgtdf [~chatzilla@x4e363f9a.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.93 [Firefox 52.0.2/20170323105023]] 20170419 02:36:07< irker221> wesnoth: Charles Dang wesnoth:master ddaa4031a933 / src/units/unit.hpp: Unit: add fallback argument to id() https://github.com/wesnoth/wesnoth/commit/ddaa4031a933e861a86c3f605bc22e50556b0b1c 20170419 02:36:10< irker221> wesnoth: Charles Dang wesnoth:master 9647ab35c8a0 / src/ (recall_list_manager.cpp units/unit.hpp): Replaced unit::matches_id with unit::id(false) https://github.com/wesnoth/wesnoth/commit/9647ab35c8a0f654abc1da3a4189149a6035405e 20170419 02:41:23-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20170419 02:42:15< vultraz_iOS> celticminstrel: while you're at it might as well add the c++17 include guard 20170419 02:54:21< celticminstrel> Eh. 20170419 02:55:04< celticminstrel> Why does id need a fallback argument? 20170419 02:55:21< vultraz_iOS> because id() returns type_name if id is empty 20170419 02:55:26< celticminstrel> Isn't id never emtpy? 20170419 02:55:41< vultraz_iOS> no, id can be empty 20170419 02:55:44< celticminstrel> ...well, unless explicitly set empty, maybe... 20170419 02:56:01< vultraz_iOS> underlying_id is never empty 20170419 02:56:03< vultraz_iOS> but id can be 20170419 02:56:22< celticminstrel> Well obviously, it's an integer. 20170419 02:59:29< celticminstrel> Geh, why does simple_wml use const char* everywhere... :| 20170419 02:59:45< vultraz_iOS> who knows 20170419 03:00:14< celticminstrel> Well either that needs to change or my recent commit needs to be partially reverted. 20170419 03:01:42< vultraz_iOS> c_str()? 20170419 03:02:03< celticminstrel> Well technically that would probably work too. 20170419 04:00:15< vultraz_iOS> celticminstrel: i can't think of any remaining GUI dialogs besides help, can you? 20170419 04:00:22< vultraz_iOS> GUI1 20170419 04:00:32< celticminstrel> Nope. 20170419 04:02:09< vultraz_iOS> the floating textbox issues you ran into were either caused by conditional gui::in_dialog event handling 20170419 04:02:14< vultraz_iOS> or different event contexts 20170419 04:14:46< celticminstrel> What's the event that triggers when you activate a text field? 20170419 04:14:57< celticminstrel> ...speaking of which, did tabbing work yet in GUI2? 20170419 04:15:36< vultraz_iOS> tabbing? 20170419 04:15:40< irker221> wesnoth: Charles Dang wesnoth:master 0421ee412871 / src/gui/dialogs/story_viewer.cpp: Story Viewer: added TODOs https://github.com/wesnoth/wesnoth/commit/0421ee41287144ba4392ecb5750f780762b90935 20170419 04:15:43< irker221> wesnoth: Charles Dang wesnoth:master aa351a05c118 / src/gui/dialogs/story_viewer.cpp: Story Viewer: added some constants for stack indices https://github.com/wesnoth/wesnoth/commit/aa351a05c118cd81a571da1a0c13df4902d743da 20170419 04:15:50< celticminstrel> Using the tab key to navigate through a dialog. 20170419 04:16:00< vultraz_iOS> which kind of dialog? 20170419 04:16:07< vultraz_iOS> oh, you mean widget focus? 20170419 04:16:10< vultraz_iOS> not that i know of 20170419 04:21:40< irker221> wesnoth: Charles Dang wesnoth:master 337ef0312090 / / (5 files in 3 dirs): Removed GUI1 Storyscreen https://github.com/wesnoth/wesnoth/commit/337ef0312090884e405421c98b87850a407a00b8 20170419 04:24:10< vultraz_iOS> ...why did the actual file deletion not get included in that o-O 20170419 04:24:52< celticminstrel> Didn't I make "tile_centered" actually work? 20170419 04:25:03< celticminstrel> Though I guess it's not quite the same effect that you want, but still. 20170419 04:25:10< irker221> wesnoth: Charles Dang wesnoth:master 2a68ae90e155 / src/storyscreen/ (render.cpp render.hpp): Actually removed the GUI1 Storyscreen https://github.com/wesnoth/wesnoth/commit/2a68ae90e15511d0876e88026442bbc47cc816b9 20170419 04:25:13< irker221> wesnoth: Charles Dang wesnoth:master 96ee2e166efa / src/storyscreen/ (controller.cpp interface.cpp): Include cleanups https://github.com/wesnoth/wesnoth/commit/96ee2e166efab015728bfd15eaf1fa50186f8bc5 20170419 04:25:41< vultraz_iOS> celticminstrel: the storyscreen is apparently supposed to support tile v/h separately 20170419 04:40:57< vultraz_iOS> celticminstrel: i've been thinking about the complaints that MP games take too long to join... how come players can't enter right at the current turn? :/ 20170419 04:42:10< celticminstrel> Something to do with replays? 20170419 04:42:15< celticminstrel> I'm not entirely sure. 20170419 04:42:25< vultraz_iOS> possible 20170419 04:42:54< vultraz_iOS> seems rather absurd, though 20170419 04:50:31-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20170419 05:46:11-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20170419 05:56:20< irker221> wesnoth: Celtic Minstrel wesnoth:master b1a27c5ac73a / src/gui/dialogs/multiplayer/mp_login.cpp: Minor reformatting https://github.com/wesnoth/wesnoth/commit/b1a27c5ac73a012242c8944c15ad32241bcff60a 20170419 05:56:22< irker221> wesnoth: Celtic Minstrel wesnoth:master 2cdde5ebe257 / src/server/game.cpp: fixup! Add DEPRECATED macro and remove uses of snprintf https://github.com/wesnoth/wesnoth/commit/2cdde5ebe2575dc8c2e2be2e06548cb6b97a0b66 20170419 05:56:48< irker221> wesnoth: Celtic Minstrel wesnoth:login_save_crypt 7802323902e5 / src/gui/dialogs/multiplayer/mp_login.cpp: Minor reformatting https://github.com/wesnoth/wesnoth/commit/7802323902e51e1311f4cfb08e5fc21e10f5eeb7 20170419 05:56:50< irker221> wesnoth: Celtic Minstrel wesnoth:login_save_crypt fe925adfd7e5 / / (28 files in 8 dirs): Don't store the user's password in plaintext in the prefs file https://github.com/wesnoth/wesnoth/commit/fe925adfd7e554e2b02d303789c5799b115986a6 20170419 05:57:02< celticminstrel> Ack. 20170419 05:57:06< celticminstrel> Forgot to rebase that. 20170419 05:57:28< irker221> wesnoth: Celtic Minstrel wesnoth:login_save_crypt 77ca8a4c4f1d / / (28 files in 8 dirs): Don't store the user's password in plaintext in the prefs file https://github.com/wesnoth/wesnoth/commit/77ca8a4c4f1d0b0a9a9d5528c6582bb4916ca332 20170419 05:59:28-!- JyrkiVesterinen [~JyrkiVest@87-100-169-150.bb.dnainternet.fi] has quit [Quit: .] 20170419 06:09:24-!- Kwandulin [~Kwandulin@p200300760F6D805120C7711FE77E4FF1.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170419 06:26:54< matthiaskrgr> https://pastebin.com/8Ud4uawJ gcc 7-dev warnings 20170419 06:36:44-!- JyrkiVesterinen [~JyrkiVest@85-76-70-126-nat.elisa-mobile.fi] has joined #wesnoth-dev 20170419 06:42:31< vultraz_iOS> boost really needs to fix this "template_arity_spec" crap 20170419 06:47:31< Kwandulin> Ugh, an allied unit sitting on the [source] of a [tunnel] doesn't block it? 20170419 06:48:18< Kwandulin> Leads to strange situations: you can move your units through a tunnel, but not back again 20170419 06:48:34< Kwandulin> (The [target] can be blocked) 20170419 06:49:01< celticminstrel> I think that was intentional. 20170419 06:49:12< celticminstrel> And you can disable it by changing the tunnel definition. 20170419 06:49:18< celticminstrel> I think. 20170419 06:49:39< celticminstrel> Something like requiring no unit on the tunnel endpoints, unless it's the unit that's moving. 20170419 06:50:15< celticminstrel> I guess something like... [filter][not][/not][or]id=$teleport_unit.id[/or][/filter]? 20170419 06:51:29< Kwandulin> Ah, yeah that seems logical. Will test it 20170419 07:07:22< vultraz_iOS> matthiaskrgr: ok, so it looks like the original report is fixed 20170419 07:07:26< vultraz_iOS> (as it should be) 20170419 07:09:01< JyrkiVesterinen> Wasn't the report about all the warnings (not only the ones about snprintf buffer overflows)? 20170419 07:10:32< celticminstrel> The "pragma message" warnings don't look like someting under our control... 20170419 07:11:14< vultraz_iOS> they're not 20170419 07:11:16< vultraz_iOS> it's boost 20170419 07:11:18< celticminstrel> Maybe they'd be fixed by upgrading the Boost version? 20170419 07:11:29< vultraz_iOS> reports don't seem to indicate so 20170419 07:12:32< vultraz_iOS> or perhaps so? 20170419 07:13:48 * celticminstrel wonders whether vultraz_iOS would prefer FALLTHROUGH, FALLTHRU, fallthrough, or fallthru 20170419 07:14:08< vultraz_iOS> either that's not 'thru' 20170419 07:14:21< celticminstrel> Aww, I like "thru" better. :P 20170419 07:14:27< celticminstrel> So, uppercase or lowercase, then? 20170419 07:14:35< vultraz_iOS> for what? 20170419 07:14:44< celticminstrel> FALLTHROUGH or fallthrough 20170419 07:14:49 * celticminstrel is adding it to global.hpp 20170419 07:14:50< vultraz_iOS> no, i mean what is that for 20170419 07:14:58< vultraz_iOS> (along with the c++17 define I hope) 20170419 07:15:24< celticminstrel> Eh. I really don't think we should add a C++17 define yet... 20170419 07:15:27< vultraz_iOS> probably should be uppcase for consistency 20170419 07:15:47< JyrkiVesterinen> Can we just use [[fallthrough]]? It would make sense for compilers to ignore attributes they don't recognize. 20170419 07:16:37< celticminstrel> MSVC 2013 doesn't even support the attribute syntax. 20170419 07:16:46< JyrkiVesterinen> Oh. :( 20170419 07:18:32< vultraz_iOS> celticminstrel: i've pulled out all 17 fallthrough warnings: https://pastebin.com/P8BrNWBu 20170419 07:18:44< vultraz_iOS> if you're deploying [[fallthrough]] 20170419 07:22:26< vultraz_iOS> celticminstrel: i was going to wrap utils::clamp in the non-C++17 include 20170419 07:24:50< celticminstrel> Detecting C++17 is currently a bit iffy. There's no standard value to test for yet. 20170419 07:25:15< celticminstrel> I can check for > the C++14 value, but I'm not sure if that can really guarantee full C++17 support. 20170419 07:27:15< celticminstrel> Besides the boost spam and the fallthrough, did you notice any other warnings? 20170419 07:27:53< vultraz_iOS> no 20170419 07:29:51-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170419 07:40:26< vultraz_iOS> looks like we might be able to use string_view sooner than 2022 20170419 07:40:36< vultraz_iOS> at least conditionally 20170419 07:40:47< vultraz_iOS> certainly not exclusively 20170419 07:42:24< vultraz_iOS> but it seems msvc 2017 has support for it 20170419 07:44:51< celticminstrel> Looks like every fallthrough warning was already annotated with comments, except for one in the file dialog which was still intentional. 20170419 07:45:20< celticminstrel> I also added breaks in one place where they wouldn't be reached, just to silence the warning. 20170419 07:45:47< celticminstrel> I don't know for sure if this will address all the warnings; in some cases it might be necessary to move the FALLTHROUGH; outside some braces. 20170419 07:46:01< celticminstrel> (I'm not entirely sure how the annotation works.) 20170419 07:51:42< vultraz_iOS> we'll see 20170419 07:51:51< vultraz_iOS> just ask matthiaskrgr to build again :P 20170419 08:02:38< celticminstrel> vultraz_iOS: Can you explain what v.type() is in upkeep_value_visitor 20170419 08:02:54< celticminstrel> ^upkeep_type_visitor, sorry 20170419 08:03:33< celticminstrel> Ooh... found it. 20170419 08:05:43< zookeeper> Kwandulin, does that mean that you can move through the tunnel, but not even undo it? :x or does undo work, but not a regular move back? 20170419 08:06:23< celticminstrel> BTW, speaking of tunnels, is it intended for shroud/fog to be cleared through them now? 20170419 08:06:29< Kwandulin> Dunno about the undo thing, but moving back (e.g. on the next turn), doesn*t work then 20170419 08:06:46< Kwandulin> Anyway, celticminstrels suggestion worked 20170419 08:07:14< Kwandulin> According to the wiki, that is intended, celticminstrel 20170419 08:07:17< zookeeper> celticminstrel, i don't remember the details of the last conversation that was had about it 20170419 08:07:17< celticminstrel> \o/ 20170419 08:07:45< celticminstrel> It is, huh? It's a significant change from 1.12, and kind of caught me off guard in my campaign. 20170419 08:10:59< celticminstrel> Ahah, I can disable it with allow_vision=no 20170419 08:11:56< irker221> wesnoth: Celtic Minstrel wesnoth:master 69a7d5a75534 / src/ (15 files in 9 dirs): Use fallthrough annotation attributes where applicable https://github.com/wesnoth/wesnoth/commit/69a7d5a75534ad4f9d8c9a1370fc6cd332f8383f 20170419 08:11:58< irker221> wesnoth: Celtic Minstrel wesnoth:master 8923978c7003 / src/ (5 files in 4 dirs): Squash some MSVC warnings https://github.com/wesnoth/wesnoth/commit/8923978c700302a2f19f106a43905b8e061495c1 20170419 08:12:00< irker221> wesnoth: Celtic Minstrel wesnoth:master d01834e210a2 / projectfiles/VC12/ (wesnoth.vcxproj wesnoth.vcxproj.filters): Update MSVC project https://github.com/wesnoth/wesnoth/commit/d01834e210a2b6b5ee6afa257ba291abb95b1f89 20170419 08:12:50< celticminstrel> vultraz_iOS: Did you fix the storyscreen crash yet? 20170419 08:13:04< vultraz_iOS> matthiaskrgr's crash? 20170419 08:13:05< vultraz_iOS> yes 20170419 08:13:15< vultraz_iOS> your weird "does not fit n canvas" crash? 20170419 08:13:15< vultraz_iOS> no 20170419 08:13:16< celticminstrel> The "image too big for canvas". 20170419 08:13:25< vultraz_iOS> because I don't know how to repro 20170419 08:13:27< celticminstrel> :( 20170419 08:14:10< vultraz_iOS> matthiaskrgr: should build again now, see if the warnings go away 20170419 08:14:23< celticminstrel> vultraz_iOS: It just happens when pressing "next" and showing the track. 20170419 08:14:32< vultraz_iOS> what campaign? 20170419 08:14:50< celticminstrel> Well, I haven't quite published it yet, but I'm pretty sure mine isn't the only one? 20170419 08:14:56< celticminstrel> Someone else was reporting it too IIRC. 20170419 08:15:01< vultraz_iOS> pydsigner 20170419 08:15:08< vultraz_iOS> but again 20170419 08:15:16< vultraz_iOS> how could this even happen, when I use max(pos, 0) 20170419 08:15:37< celticminstrel> Well, if pos is ridiculously large, I suppose it could happen. 20170419 08:15:48< pydsigner> celticminstrel: Tale of Vaniyera 20170419 08:16:05< vultraz_iOS> unless it somehow consideres it unsigned 20170419 08:16:17< vultraz_iOS> then max(pos, 0) would wrap if pos were < 0 20170419 08:16:34< vultraz_iOS> celticminstrel: ..\..\src\global.hpp|140|error: expected primary-expression before '__attribute__'| 20170419 08:18:12< celticminstrel> Does it occur for all cases of fallthrough? 20170419 08:19:26-!- celmin [461b1e97@gateway/web/freenode/ip.70.27.30.151] has joined #wesnoth-dev 20170419 08:19:40< celmin> Just FTR, I was referencing this: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html 20170419 08:20:09< vultraz_iOS> celticminstrel: if works if i use [[fallthrough]] 20170419 08:20:12-!- celmin [461b1e97@gateway/web/freenode/ip.70.27.30.151] has quit [Changing host] 20170419 08:20:12-!- celmin [461b1e97@unaffiliated/celticminstrel] has joined #wesnoth-dev 20170419 08:20:12-!- celmin [461b1e97@unaffiliated/celticminstrel] has quit [Changing host] 20170419 08:20:12-!- celmin [461b1e97@gateway/web/freenode/ip.70.27.30.151] has joined #wesnoth-dev 20170419 08:20:24< JyrkiVesterinen> Maybe the semicolon is mandatory? 20170419 08:20:26< celmin> What's your GCC version? 20170419 08:20:33< celmin> Yeah, the semicolon is mandatory. 20170419 08:20:43< vultraz_iOS> gcc 5.0.1 I think or is it 5.1.0? 20170419 08:20:47< celmin> Didn't I use one after every FALLTHROUGH? 20170419 08:20:51< vultraz_iOS> yes 20170419 08:21:06< vultraz_iOS> but it's only working with [[fallthrough]], no semicolon 20170419 08:21:36< celmin> Well, check your GCC version. 20170419 08:21:41< JyrkiVesterinen> Oh, right. You actually used the macro as "FALLTHROUGH;" and not "FALLTHROUGH". 20170419 08:21:44< celmin> Also we should see if Travis works. 20170419 08:21:52< celmin> Since Travis is using GCC 4.8 right? 20170419 08:22:04< JyrkiVesterinen> Yes, Travis is on 4.8. 20170419 08:22:48< vultraz_iOS> celticminstrel: it's 5.1.0 20170419 08:23:10< celmin> Hmmmmm. 20170419 08:23:33< celmin> You could change the check, but that would defeat the point if it results in GCC just ignoring it, right? 20170419 08:23:47< vultraz_iOS> let me see 20170419 08:23:51< vultraz_iOS> i changed the check 20170419 08:23:56< vultraz_iOS> saw some warnings go past 20170419 08:30:05< celmin> Definitely think just changing the check would defeat the point... 20170419 08:30:30< vultraz_iOS> JyrkiVesterinen: any idea when debian stretch becomes stable? 20170419 08:30:38< vultraz_iOS> I saw it froze two months ago 20170419 08:31:55< JyrkiVesterinen> No one knows. 20170419 08:32:06< JyrkiVesterinen> In theory, it shouldn't take long at this point. 20170419 08:32:20< celmin> Hmm, it doesn't seem like allow_vision=no works in a teleport ability...? 20170419 08:33:48< celmin> Or, it's just not copied into the unit or something? It seems like it disappeared at some point. 20170419 08:34:16< celmin> It did look like it was working at first, but after I loaded, it seemed to stop working. 20170419 08:35:26< celmin> ... 20170419 08:35:31 * celmin facepalm 20170419 08:35:35 * celmin forgot to save 20170419 08:37:46< vultraz_iOS> ..\..\src\global.hpp|138|warning: attributes at the beginning of statement are ignored [-Wattributes]| 20170419 08:37:47< vultraz_iOS> hmm 20170419 08:37:52< vultraz_iOS> C:\Users\exodi\Documents\wesnoth\src\ai\actions.cpp|593|note: in expansion of macro 'FALLTHROUGH'| 20170419 08:38:16< celmin> According to the GCC docs I linked, the way I originally defined it should be correct. 20170419 08:42:55< vultraz_iOS> then what's wrong with my compiler 20170419 08:44:05< celmin> No idea. 20170419 08:44:46< celmin> Maybe it only supports that with --std=gnu++xx? 20170419 08:44:53< celmin> Where xx is the standard number, eg 11 or 14 20170419 08:45:28< celmin> Though I was under the impression that the __attribute__ form was always accepted even if GNU extensions aren't enabled. 20170419 08:45:44< vultraz_iOS> celticminstrel: it works if put before case as the c++17 standard says 20170419 08:45:53< vultraz_iOS> that is, using [[fallthrough]] 20170419 08:45:58< vultraz_iOS> the warnings go away 20170419 08:46:05< vultraz_iOS> ie, 20170419 08:46:09< vultraz_iOS> FALLTHROUGH 20170419 08:46:09< vultraz_iOS> case ::actions::RECRUIT_ALTERNATE_LOCATION: 20170419 08:46:40< celmin> Hmm. 20170419 08:47:02< vultraz_iOS> " Appears in a switch statement on a line of its own (technically as an attribute of a null statement), immediately before a case label." 20170419 08:48:11< vultraz_iOS> and it needs to not have a semicolon 20170419 08:48:40< vultraz_iOS> the warning also goes away if kept in-place with no semicolon 20170419 08:48:46< vultraz_iOS> celticminstrel: i'll let you figure that out 20170419 08:48:56< celmin> As far as I can tell, that's not how the standard says it works. 20170419 08:49:07< celmin> That is to say, the semicolon is required. 20170419 08:49:15< vultraz_iOS> the gcc standard 20170419 08:49:22< celmin> ??? 20170419 08:49:34< vultraz_iOS> __attribute__ needs a semicolon 20170419 08:49:40< vultraz_iOS> [[]] doesn't 20170419 08:49:48< celmin> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0188r0.pdf 20170419 08:49:58< celmin> That says otherwise, though admittedly it could be out-of-date. 20170419 08:50:31< vultraz_iOS> none of the other attributes need one 20170419 08:50:34< vultraz_iOS> why would this? 20170419 08:51:10< celmin> I have found just one site whose example omits the semicolon. 20170419 08:51:44< celmin> This also says it needs a semicolon: http://en.cppreference.com/w/cpp/language/attributes 20170419 08:52:27< celmin> It says the exact same thing you just quoted from the GCC manual. 20170419 08:52:41< celmin> Technically the attribute annotates a null statement. 20170419 08:54:05< vultraz_iOS> i quoted from cppreference :P 20170419 08:59:28< celmin> Oh. 20170419 08:59:38< celmin> Well, that quote implies a semicolon is needed. 20170419 09:03:24-!- JyrkiVesterinen [~JyrkiVest@85-76-70-126-nat.elisa-mobile.fi] has quit [Quit: .] 20170419 09:08:22< celmin> Anyway, allow_vision=no does work. 20170419 09:13:08-!- celmin [461b1e97@gateway/web/freenode/ip.70.27.30.151] has quit [Quit: Page closed] 20170419 09:13:25< celticminstrel> Surprisingly it didn't ask me to confirm that. 20170419 09:17:40-!- celticminstrel is now known as celmin|sleep 20170419 09:35:46-!- JyrkiVesterinen [~JyrkiVest@85-76-70-126-nat.elisa-mobile.fi] has joined #wesnoth-dev 20170419 09:48:57-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 240 seconds] 20170419 09:51:59< vultraz_iOS> celmin|sleep: then my compiler is totally bonkers 20170419 09:52:18< vultraz_iOS> who knows, maybe TDM GCC doesn't support attribute 20170419 10:08:00-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170419 10:36:12-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 10:53:50-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170419 10:55:45-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 11:00:35-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20170419 11:01:36-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 11:12:33-!- irker221 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20170419 11:40:37-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170419 11:42:25-!- Kwandulin [~Kwandulin@p200300760F6D805120C7711FE77E4FF1.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170419 11:46:29< vultraz_iOS> hmmm 20170419 11:46:46< vultraz_iOS> I think I know why the custom tod colors might be off... 20170419 12:03:47-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 12:32:10-!- Ivanovic_ [~ivanovic@p4FC534A6.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170419 12:33:40-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has quit [Ping timeout: 240 seconds] 20170419 12:34:03-!- Ivanovic_ is now known as Ivanovic 20170419 12:48:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170419 12:48:39-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170419 12:49:24-!- gfgtdf [~chatzilla@x4e363f9a.dyn.telefonica.de] has joined #wesnoth-dev 20170419 12:50:00< gfgtdf> vultraz_iOS: i think you can just reomve the id -> type_id fallback, it proabale dated backe to when there was not name attribute and the id was used for displaying. 20170419 12:50:51< vultraz_iOS> ok 20170419 12:51:04< gfgtdf> 20170419 04:40:57< vultraz_iOS> celticminstrel: i've been thinking about the complaints that MP games take too long to join... how come players can't enter right at the current turn? :/ 20170419 12:51:15< gfgtdf> vultraz_iOS: becasue teh reser jsut don'T know the curretn gamestate 20170419 12:51:19< gfgtdf> the server* 20170419 12:51:58< gfgtdf> vultraz_iOS: so it cannot send it to the clients, all it can do is sending the initial gamestate and the replay data so the clients have to generate (replay) the current gamestate on their own 20170419 12:52:30< vultraz_iOS> that's horrible design :| 20170419 12:52:35-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 240 seconds] 20170419 12:53:28< vultraz_iOS> the server should keep track of the gamestate and send to all clients 20170419 12:55:23< gfgtdf> hmm in the cuurent design the mmain reason against 'server keep track' of gameste is simply the servers hw resources. 20170419 12:55:57< gfgtdf> vultraz_iOS: also note that the server curenty dont haev all informations (data data file) in particular addons 20170419 12:56:36< gfgtdf> vultraz_iOS: also the server would need to run addons code, which can easiyl be basdy written to use way to muhc resoueces 20170419 13:07:36-!- RatArmy [~ratarmy@om126211120051.13.openmobile.ne.jp] has joined #wesnoth-dev 20170419 13:20:58-!- Kwandulin [~Kwandulin@p200300760F6D80BEF86E471ECC15E01C.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170419 13:22:55-!- RatArmy [~ratarmy@om126211120051.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170419 13:29:43-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170419 13:37:12-!- Kwandulin [~Kwandulin@p200300760F6D80BEF86E471ECC15E01C.dip0.t-ipconnect.de] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 20170419 13:38:08-!- Kwandulin [~Kwandulin@p200300760F6D80BE646C41E2D67BEE86.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170419 13:46:41-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170419 13:46:47-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170419 14:43:34-!- JyrkiVesterinen [~JyrkiVest@85-76-70-126-nat.elisa-mobile.fi] has quit [Quit: .] 20170419 14:55:39< zookeeper> gfgtdf, could the current host send the current gamestate? i don't know how big it would be and thus whether it'd not work nicely if the host is on a connection with slow upload speed. 20170419 15:37:48-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170419 15:48:12< gfgtdf> zookeeper: the gamestates is usually the same size as a savefile 20170419 15:56:14-!- JyrkiVesterinen [~JyrkiVest@89-166-103-224.bb.dnainternet.fi] has joined #wesnoth-dev 20170419 16:04:36-!- TC01 [~quassel@venus.arosser.com] has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.] 20170419 16:04:59-!- TC01 [~quassel@venus.arosser.com] has joined #wesnoth-dev 20170419 16:10:13-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170419 16:12:43-!- gfgtdf [~chatzilla@x4e363f9a.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.93 [Firefox 52.0.2/20170323105023]] 20170419 16:15:00-!- Ivanovic [~ivanovic@p4FC534A6.dip0.t-ipconnect.de] has quit [Changing host] 20170419 16:15:00-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has joined #wesnoth-dev 20170419 16:24:22-!- irker715 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170419 16:24:22< irker715> wesnoth: Jyrki Vesterinen wesnoth:master 9d1ec88eccfd / src/gui/dialogs/addon/manager.cpp: Prompt before uninstalling an add-on via double-click https://github.com/wesnoth/wesnoth/commit/9d1ec88eccfd5d23e7b0a59f936581c80f789eea 20170419 16:26:04-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20170419 16:27:22< mattsc> vultraz: trying to update the Xcode project, the build fails on this: 20170419 16:27:25< mattsc> src/storyscreen/controller.hpp:56:6: error: private field 'segment_index_' is not used [-Werror,-Wunused-private-field] 20170419 16:27:41< mattsc> Do you want me to make that warning non-fatal, or do you want to remove the cause of it? 20170419 16:30:36< JyrkiVesterinen> Please fix it. That field is indeed no longer used. 20170419 17:34:19-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170419 17:34:55-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170419 17:39:26-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 255 seconds] 20170419 17:40:01-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20170419 17:44:05-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: mattsc] 20170419 17:50:39-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170419 18:04:47-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has joined #wesnoth-dev 20170419 18:16:35-!- mjs-de [~mjs-de@x4db5939b.dyn.telefonica.de] has joined #wesnoth-dev 20170419 18:23:52-!- celmin|sleep is now known as celticminstrel 20170419 18:24:07< celticminstrel> vultraz_iOS: I don't think there could be a GCC that doesn't support __attribute__. :P 20170419 18:24:20< vultraz_iOS> then what's the problem 20170419 18:26:28< celticminstrel> What was the exact error, again? 20170419 18:27:07< vultraz_iOS> something about primary expression expected before __attribute__ 20170419 18:27:32< celticminstrel> And you got ~17 instances of it? 20170419 18:27:38< vultraz_iOS> no 20170419 18:27:39< vultraz_iOS> two 20170419 18:27:49< celticminstrel> Only two... interesting. 20170419 18:27:57< vultraz_iOS> since it's an error 20170419 18:27:58< vultraz_iOS> of course 20170419 18:28:04< vultraz_iOS> it wouldn't build all the way through 20170419 18:28:10< celticminstrel> Ah, you think it's because it gave up, okay. 20170419 18:28:13< celticminstrel> That makes sense. 20170419 18:28:33< celticminstrel> You can tell it to attempt to continue anyway, though. 20170419 18:32:20< vultraz_iOS> there were 17 warnings with [[fallthough]] though, I think 20170419 18:32:54-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170419 18:34:54< celticminstrel> Oh right. Maybe you can do the same thing I did for clang. 20170419 18:35:01< celticminstrel> Try making it [[gnu::fallthrough]] 20170419 18:35:08 * vultraz_iOS ponders if a shared_ptr can be used for a singleton pattern 20170419 18:35:11< celticminstrel> And if that works, just do that for all GCC versions. 20170419 18:35:32 * celticminstrel isn't sure if gnu::fallthrough is a thing though. 20170419 18:36:40< vultraz_iOS> still gives "warning: attributes at the beginning of statement are ignored [-Wattributes]|" 20170419 18:36:52< celticminstrel> Yeah okay, that probably means it's not a thing. 20170419 18:38:33< celticminstrel> Hmm, I get the impression that even __attribute__((fallthrough)) might have been a very recent addition... 20170419 18:39:44< celticminstrel> So I think the best thing would be to just make FALLTHROUGH expand to nothing on GCC < 7 20170419 18:40:18< vultraz_iOS> sadness :( 20170419 18:40:31< vultraz_iOS> not that it matters much 20170419 18:40:35< vultraz_iOS> the warning is on 7 20170419 18:40:52< vultraz_iOS> sadly I can't upgrade since tdm gcc hasn't been updated in two years 20170419 18:41:12< celticminstrel> I'm sure you can update to a non-tdm gcc. 20170419 18:41:15< vultraz_iOS> and i honestly don't know how to use gcc otherwise 20170419 18:42:33< vultraz_iOS> might need mingw or something 20170419 18:42:38< vultraz_iOS> but i don't know how all that works.. 20170419 18:43:43< celticminstrel> I think __attribute__((fallthrough)) was actually added only in GCC 7. 20170419 18:43:56< celticminstrel> Seems like the reason for adding that in addition to [[fallthrough]] was for C. 20170419 18:44:13< celticminstrel> So, the __attribute__ form works in C and C++, but the [[]] form only works in C++. 20170419 18:44:41< celticminstrel> If you're changing it, I think I'd also suggest using gnu::fallthrough instead of just fallthrough. 20170419 18:44:46< celticminstrel> For GCC 7. 20170419 18:45:02< vultraz_iOS> hm 20170419 18:46:16< vultraz_iOS> so mingw and mingw-w64 are different 20170419 18:46:20< celticminstrel> Because it looks like [[fallthrough]] may not work with -std=c++11 20170419 18:46:30< celticminstrel> Whereas [[gnu::fallthrough]] will. 20170419 18:48:27< celticminstrel> And as for HAVE_CXX17, I think we should wait until the standard is actually finalized and released. 20170419 18:48:42-!- markus__ [~mjs-de@x4db5cab9.dyn.telefonica.de] has joined #wesnoth-dev 20170419 18:48:56< celticminstrel> Though if you really want it that much I suppose you could copy the HAVE_CXX14 definition and just change >= to > 20170419 18:49:27< celticminstrel> But I dunno if that's really reliable. 20170419 18:49:35< vultraz_iOS> the standard is essentially done 20170419 18:49:43< celticminstrel> I know. 20170419 18:50:12< celticminstrel> But it's not quite finalized, and the __cplusplus value is not yet determined. 20170419 18:51:57-!- mjs-de [~mjs-de@x4db5939b.dyn.telefonica.de] has quit [Ping timeout: 240 seconds] 20170419 18:51:59-!- Kwandulin [~Kwandulin@p200300760F6D80BE646C41E2D67BEE86.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170419 18:52:31< vultraz_iOS> how is that not one of the first things they do 20170419 18:53:07< celticminstrel> What? Shouldn't it be the very last thing they do? 20170419 18:53:21< celticminstrel> The __cplusplus value is essentially the date of release. 20170419 18:53:30< vultraz_iOS> oh 20170419 18:53:30< vultraz_iOS> I see 20170419 18:53:38< vultraz_iOS> "In GCC versions 6.1 and 7.0 the value is changed to 201500" 20170419 18:54:02< celticminstrel> Yeah, compilers have arbitrarily chosen values for it. 20170419 18:54:12< celticminstrel> They don't all agree. 20170419 18:54:22< celticminstrel> Some are 2014, some are 2015. Maybe some are also 2016. 20170419 18:56:08< vultraz_iOS> 201703L? 20170419 18:56:45< vultraz_iOS> just according to wikipedia, though 20170419 18:57:08< celticminstrel> You could test for something like that, but then it would activate those bits on GCC 7. :P 20170419 18:57:33< vultraz_iOS> heh 20170419 18:57:37< vultraz_iOS> I'll do something later maybe 20170419 18:58:03< vultraz_iOS> right now im pondering how to make the tod_manager manage itself with a smart ptr singleton patterm 20170419 18:59:55< celticminstrel> https://sourcemaking.com/design_patterns/singleton/cpp/1 20170419 19:00:10< celticminstrel> Everything you need to know about the singleton pattern. 20170419 19:00:29< celticminstrel> TBH, there's not much point in using a shared_ptr, though it also wouldn't hurt anything. 20170419 19:01:22< celticminstrel> BTW, the tod_manager cannot be a conventional singleton. 20170419 19:02:45< celticminstrel> For the same reason the display is not a singleton. 20170419 19:03:22< vultraz_iOS> yeah, the problem I'm pondering is "resetting" the object in certain places, such as when creating a game 20170419 19:04:18< vultraz_iOS> right now the game_display owns one, and the editor map_context, and we have tod management in display, and resources::tod_manager... 20170419 19:04:30< vultraz_iOS> i figure it might be best to consolidate 20170419 19:04:54< celticminstrel> I feel like you're confused about something... 20170419 19:05:05< vultraz_iOS> probably 20170419 19:05:08< vultraz_iOS> I'm usually :P 20170419 19:11:04-!- gfgtdf [~chatzilla@x4e363f9a.dyn.telefonica.de] has joined #wesnoth-dev 20170419 19:11:26< vultraz_iOS> celticminstrel: ot, do we use std::shuffle 20170419 19:11:43< vultraz_iOS> s/do/should 20170419 19:11:49< celticminstrel> ??? 20170419 19:11:58< vultraz_iOS> just noticed std::random_shuffle was deprecated in c++14 and we use it in 4 places 20170419 19:13:20< celticminstrel> Oh right. 20170419 19:13:33< celticminstrel> But we're supporting C++11, so we can't just suddenly switch. 20170419 19:13:42< gfgtdf> it may say it'D deprecate but i doubt the'll remove it anytime soon, i mean it not liek removing it has notable advnatages for them 20170419 19:13:58< vultraz_iOS> it's removed in c++17 20170419 19:14:40< gfgtdf> it mabe be rmeoved from the staders whcih deosnt mean that any conpiler did that already. 20170419 19:14:55< celticminstrel> If you want to do the same thing you did with clamp for shuffle, go right ahead. 20170419 19:15:02< vultraz_iOS> and there's no reason we can't use the c++11 std::shuffle, if indeed we use that. 20170419 19:15:13< celticminstrel> Ah, wait, was shuffle in C++11? 20170419 19:15:18< celticminstrel> In that case, yes we could use it. 20170419 19:15:26< celticminstrel> Provided MSVC 2013 supports it. 20170419 19:16:33< vultraz_iOS> debating whether i should use our own random_new code paths 20170419 19:16:54< gfgtdf> vultraz_iOS: for what ? 20170419 19:17:07< vultraz_iOS> instead of random_shuffle 20170419 19:17:25< gfgtdf> vultraz_iOS: how is that an 'instead' random_new does not provide a afunction liek that 20170419 19:17:48< vultraz_iOS> indeed that seems to be the case 20170419 19:18:05< vultraz_iOS> std::shuffle needs an RNG tho 20170419 19:18:15< celticminstrel> You can probably use random_new with shuffle yes, 20170419 19:18:17< gfgtdf> the main point of radnom_new is to give mp save (synced) rnadom values in mp 20170419 19:18:19< celticminstrel> Somehow. 20170419 19:18:34< celticminstrel> I dunno what we use random_shuffle for right now. 20170419 19:19:45< vultraz_iOS> map generator, tips-of-the-day, something in the editor, and something in the ai recruitment 20170419 19:19:47< gfgtdf> coe grep says: 1) shuffleing the titelseen helptips, 2) ai code 20170419 19:20:19< gfgtdf> the map generate already uses a custom rng though in thrid arguement that should ofc still be used when usong std::suffle 20170419 19:21:43< gfgtdf> was any progress on the bugtracke movement done? By now it here looks like we'd nee to setup our won werver which one one the ones currently discussing here is abale to afaik. 20170419 19:21:57< gfgtdf> also: we shodul rename random_new sonce the 'old' random code was remvoed 20170419 19:22:11< vultraz_iOS> yes 20170419 19:22:31< gfgtdf> random_new -> random or maybe something that epxressed its related to mp sync 20170419 19:22:41< vultraz_iOS> gfgtdf: the rng struct in the map generator needs a result_type typedef to work 20170419 19:22:43< gfgtdf> s/won werver/own server 20170419 19:23:06< gfgtdf> s/which one one/which no one of 20170419 19:24:10< vultraz_iOS> oh, and other functions too 20170419 19:24:19< gfgtdf> maybe we cna just pass the mt19937 directly witohut the help pbject ? 20170419 19:24:32< gfgtdf> also we coudl change that code to use std::mt19937 ? 20170419 19:24:37< vultraz_iOS> probably 20170419 19:24:44-!- irker715 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20170419 19:25:07< gfgtdf> i'd be suprised if std::mt19937 and std::shuffle were incpatible sp that a helper struct is needed 20170419 19:25:16< gfgtdf> i'm talking about the mpa_generator code here 20170419 19:25:27< gfgtdf> incompatible* 20170419 19:25:34< gfgtdf> s/sp/so 20170419 19:26:00< vultraz_iOS> gfgtdf: it's specifically that std::shuffle's thirf argument must match the UniformRandomBitGenerator conditions 20170419 19:26:12< vultraz_iOS> http://en.cppreference.com/w/cpp/concept/UniformRandomBitGenerator 20170419 19:26:42< vultraz_iOS> so, for std::shuffle: 20170419 19:26:43< vultraz_iOS> a UniformRandomBitGenerator whose result type is convertible to std::iterator_traits::difference_type 20170419 19:26:54< vultraz_iOS> but std::random_shuffle was: 20170419 19:27:01< vultraz_iOS> function object returning a randomly chosen value of type convertible to std::iterator_traits::difference_type in the interval [0,n) if invoked as r(n) 20170419 19:27:40< gfgtdf> vultraz_iOS: looks liek you need std::uniform_int_distribution 20170419 19:27:47< vultraz_iOS> hm? 20170419 19:27:51< vultraz_iOS> what do you mean 20170419 19:28:48< gfgtdf> hm wait actuall im unsure which distrubution you need 20170419 19:29:29< vultraz_iOS> confused 20170419 19:29:31< celticminstrel> Sounds like none of our shuffles currently need to be synched. 20170419 19:29:44< vultraz_iOS> what does this have to do with the need of a std::mt19937 20170419 19:30:24< celticminstrel> gfgtdf: Maybe random_new -> random_synched if that's what it really is? 20170419 19:30:30< gfgtdf> we coudl replace the boost::mt19937 with a std::mt19937 20170419 19:31:23< gfgtdf> celticminstrel: hm ye but what you the random_new_synced.hpp fil be called then 20170419 19:31:34< celticminstrel> Eh? 20170419 19:31:37< celticminstrel> Was I wrong? 20170419 19:32:47< gfgtdf> hmm how it works is like this: it has a "static random_generator_base* rng_" memeber and dpeending whichere er are ina synced context this is a random_new_sycned or a random_new object (tha later is unsyced) 20170419 19:33:06< gfgtdf> s/whichere er/whether we 20170419 19:33:17< celticminstrel> ...why is it static. 20170419 19:33:18< vultraz_iOS> should we add a getter for gen in rng_default? 20170419 19:33:54< vultraz_iOS> gen_* 20170419 19:34:31< gfgtdf> vultraz_iOS: hmm why woudl you want that? 20170419 19:34:47< vultraz_iOS> just fom the code example here 20170419 19:34:48< vultraz_iOS> https://meetingcpp.com/index.php/br/items/stdrandom_shuffle-is-deprecated.html 20170419 19:35:10< vultraz_iOS> seems shuffle will take the std::mt19937? 20170419 19:35:14< gfgtdf> yes but afaik we don't use rng_default with std::random_shuffle 20170419 19:35:36< gfgtdf> vultraz_iOS: no it will take anything that mathces the UniformRandomBitGene as you said eariler 20170419 19:35:50< vultraz_iOS> in 3/4 cases we don't use any extra arguments 20170419 19:36:09< vultraz_iOS> in the map generator there's a custom struct which isn't compatible with shuffle 20170419 19:36:25< vultraz_iOS> my point is i think now we need an rng 20170419 19:36:27< gfgtdf> vultraz_iOS: hmm yes replace that struct with std::uniform_int_distribution 20170419 19:37:01< gfgtdf> vultraz_iOS: actually i am not sure hot strictly the std::diefiction of std::uniform_int_distribution is, we might want to use the boost equivealent insted to make sure it haved the same on all system 20170419 19:37:04< gfgtdf> how* 20170419 19:37:12< vultraz_iOS> >_< 20170419 19:37:15< gfgtdf> the std defintiion 20170419 19:37:27< vultraz_iOS> doesn't work anyway 20170419 19:37:29< celticminstrel> vultraz_iOS: It's trivial to make a custom struct compatible with shuffle() 20170419 19:37:30< vultraz_iOS> building, that is 20170419 19:37:30< gfgtdf> s/haved/behaves 20170419 19:38:22< celticminstrel> struct rand : private std::numeric_limits { using std::numeric_limits::max; using std::numeric_limits::min; using result_type = int; int operator(); }; 20170419 19:38:39< vultraz_iOS> but is it necessary? 20170419 19:38:48< celticminstrel> No idea. 20170419 19:39:13< celticminstrel> The Mersenne Twister generator in the standard is probably compatible. 20170419 19:40:54< vultraz_iOS> oh wait std::uniform_int_distribution takes a min/max 20170419 19:42:36< vultraz_iOS> gah, this is so confusing 20170419 19:42:44< gfgtdf> hmm wait in the example i see not they don't use std::uniform_int_distribution 20170419 19:43:06< vultraz_iOS> yes as i said shuffle can take the mt rng directly 20170419 19:43:35< vultraz_iOS> the default_map_generator_job owns one but the helper struct performs a rng_() % end res op. 20170419 19:43:39< vultraz_iOS> so maybe we need to keep it.. 20170419 19:45:07< celticminstrel> Sounds like we don't need to. 20170419 19:45:26< vultraz_iOS> so I can just pass the rng directly? 20170419 19:45:30< celticminstrel> No. 20170419 19:45:34< vultraz_iOS> :| 20170419 19:45:43< vultraz_iOS> then whatdo 20170419 19:46:19< gfgtdf> just try pass it diectly and when it compiles it should be fine. 20170419 19:46:37< vultraz_iOS> it does compile if passed directly 20170419 19:46:47< celticminstrel> What file is this in? 20170419 19:46:50< celticminstrel> Oh. 20170419 19:47:59< vultraz_iOS> default_map_generator_job.cpp 20170419 19:48:03< celticminstrel> So basically ... 20170419 19:48:41< celticminstrel> ...wait 20170419 19:48:51< vultraz_iOS> `std::shuffle(items, items + 4, rng_);` builds 20170419 19:48:52< vultraz_iOS> just FTR 20170419 19:48:52< celticminstrel> The operator() takes a parameter... 20170419 19:49:15< vultraz_iOS> yes 20170419 19:49:17< vultraz_iOS> "function object returning a randomly chosen value of type convertible to std::iterator_traits::difference_type in the interval [0,n) if invoked as r(n)" 20170419 19:49:41< celticminstrel> ... 20170419 19:52:47< celticminstrel> Okay, so I guess the interface of shuffle and random_shuffle is a bit different. 20170419 19:53:19< celticminstrel> random_shuffle expects something callable with one parameter while shuffle expects something callable with no paramaters. 20170419 19:53:31< celticminstrel> IOW, you don't need the helper struct at all. 20170419 19:53:51< vultraz_iOS> So, indeed, I can just pass the rng in this case 20170419 19:53:52< vultraz_iOS> Ok 20170419 19:54:21< celticminstrel> I'm just testing now if std::shuffle exists in MSVC 2013... 20170419 19:54:49< celticminstrel> BTW, why is it only shuffling the first 4 elements instead of all of the elements? 20170419 19:55:22-!- RatArmy [~ratarmy@om126234114193.16.openmobile.ne.jp] has joined #wesnoth-dev 20170419 19:55:33< celticminstrel> std::shuffle(std::begin(items), std::end(items), rng_) would be the proper way to shuffle everything. 20170419 19:55:45< celticminstrel> std::shuffle is fine for MSVC 2013. 20170419 19:57:06< vultraz_iOS> dunno why it's only shuffling those 20170419 19:57:14< vultraz_iOS> not sure exactly what +4 does in that case 20170419 19:57:56< vultraz_iOS> since items is an array of numbers 0-6 20170419 19:57:58< celticminstrel> Pointer arithmetic. 20170419 19:58:40< vultraz_iOS> anyway, now i need rngs for the other three cases 20170419 20:01:12< celticminstrel> Looks like it has always been like that... but I can't see any explanation for it... 20170419 20:02:00< celticminstrel> Actually, I don't think items is even needed. 20170419 20:02:13< celticminstrel> Just do std::shuffle(std::begin(adj), std::end(adj), rng_)? 20170419 20:02:19< vultraz_iOS> is there anything wrong with adding an rng getter to rng_default? 20170419 20:02:26< celticminstrel> Probably? 20170419 20:02:40< vultraz_iOS> let is query JyrkiVesterinen 20170419 20:02:42< vultraz_iOS> us* 20170419 20:02:51< celticminstrel> I'd say just pass the instance of rng_default. 20170419 20:03:31< JyrkiVesterinen> What's rng_default? 20170419 20:04:50< vultraz_iOS> https://github.com/wesnoth/wesnoth/blob/master/src/random_new.cpp#L32 20170419 20:05:37< JyrkiVesterinen> I see. 20170419 20:05:37< vultraz_iOS> perhaps it should be in rng itself 20170419 20:05:45< JyrkiVesterinen> No, adding a getter is not a good idea. 20170419 20:05:47< celticminstrel> I don't think you should add a getter. 20170419 20:05:49< vultraz_iOS> I see 20170419 20:06:27< JyrkiVesterinen> The rng class keeps track of how many numbers have been generated. Ability to access the underlying RNG directly breaks the counter completely. 20170419 20:06:35< vultraz_iOS> I could just create a new mt in each of the three shuffle locations 20170419 20:06:42< celticminstrel> Why? 20170419 20:06:47< celticminstrel> Just pass the rng_default. 20170419 20:06:47< vultraz_iOS> where do I get one? 20170419 20:06:53< vultraz_iOS> it doesn't work 20170419 20:06:59< celticminstrel> Obviously, so make it work. 20170419 20:07:03< vultraz_iOS> :| 20170419 20:08:26< vultraz_iOS> by making it compatible with shuffle? 20170419 20:08:59< JyrkiVesterinen> Maybe you can create a wrapper class that implements the SeedSequence concept (using default_rng to generate randomness) and then create a C++ random number generator, passing the SeedSequence object as a parameter. 20170419 20:09:05< JyrkiVesterinen> http://en.cppreference.com/w/cpp/concept/SeedSequence 20170419 20:09:48< JyrkiVesterinen> For example, subtract_with_carry_engine has a constructor from SeedSequence: http://en.cppreference.com/w/cpp/numeric/random/subtract_with_carry_engine/subtract_with_carry_engine 20170419 20:10:13< vultraz_iOS> uhhh... 20170419 20:10:27< vultraz_iOS> this seems like rather overkill for just getting an rng... 20170419 20:10:44-!- irker649 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170419 20:10:44< irker649> wesnoth: Celtic Minstrel wesnoth:master d11d822ab2d0 / src/random_new.hpp: Make our generators implement the UniformRandomBitGenerator concept https://github.com/wesnoth/wesnoth/commit/d11d822ab2d0ba700869db1fed81af9b11859042 20170419 20:10:53< celticminstrel> Or that ^ 20170419 20:11:06< celticminstrel> With that you should be able to pass the default_rng to shuffle. 20170419 20:11:20< vultraz_iOS> let us see 20170419 20:11:32 * celticminstrel hopefully didn't mess up. >_> 20170419 20:11:55< vultraz_iOS> ..\..\src\random_new.hpp|20|fatal error: numeric_limits: No such file or directory| :P 20170419 20:12:08< vultraz_iOS> you did :P 20170419 20:12:14< celticminstrel> 20170419 20:12:20< vultraz_iOS> yeah just found it 20170419 20:15:24-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20170419 20:15:47< irker649> wesnoth: Charles Dang wesnoth:master 95796bd28c20 / src/random_new.hpp: Fixup d11d822 https://github.com/wesnoth/wesnoth/commit/95796bd28c20b3991f66ae7e62c6fe0e44cfaaf2 20170419 20:16:23< celticminstrel> Oh, whoops, forgot some () too. >_> 20170419 20:16:49< vultraz_iOS> works \o/ 20170419 20:17:01< celticminstrel> Well of course it does. 20170419 20:17:39< vultraz_iOS> would you prefer I use *random_new::generator or random_new::rng::default_instance() 20170419 20:19:54< celticminstrel> That would depennd on whether you want it to be synched. 20170419 20:19:57< celticminstrel> ^depend 20170419 20:20:20< vultraz_iOS> I see 20170419 20:20:23< vultraz_iOS> should it be? 20170419 20:20:39< celticminstrel> What's being shuffled? 20170419 20:21:00< celticminstrel> From what you listed earlier, it didn't sound like any of them needed to be synched though. 20170419 20:21:40< celticminstrel> gfgtdf: IIRC, doesn't AI code run unsynched? 20170419 20:22:01< celticminstrel> Tips of the day certainly don't need to be synched. 20170419 20:22:04< vultraz_iOS> just noticed we also have an mt_rng class.. 20170419 20:22:29< celticminstrel> I'd assume that's for the map generator or something... 20170419 20:22:42< celticminstrel> The Lua map generator. 20170419 20:23:07< vultraz_iOS> no, it's used extensively.. 20170419 20:23:21< celticminstrel> Oh huh, it is indeed. 20170419 20:24:01< vultraz_iOS> (btw, I assume rng::default_instance() is the unsynced version?) 20170419 20:24:23< celticminstrel> I assume so, since it's not an instance of the class in random_new_synced.hpp 20170419 20:25:59< vultraz_iOS> tfw you almost write a commit message about std::random_shiggle :| 20170419 20:26:38< celticminstrel> Feels lit mt_rng is entirely redundant... 20170419 20:26:41< celticminstrel> ^like 20170419 20:26:46< celticminstrel> But wow, it's used a lot... 20170419 20:27:39< celticminstrel> random_new_synced and random_new_deterministic both use it too. 20170419 20:27:44< celticminstrel> Instead of std::mt19937 20170419 20:28:03< vultraz_iOS> is there any reason we can't deploy std::mt19937? 20170419 20:28:08< vultraz_iOS> at least in place of boost's? 20170419 20:28:21< celticminstrel> Given that it's already being used... probably not? 20170419 20:28:48< celticminstrel> Might be able to replace mt_rng too. 20170419 20:28:49< irker649> wesnoth: Charles Dang wesnoth:master 993e42d15bda / src/ (4 files in 4 dirs): Deploy std::shuffle in place of the deprecated std::random_shuffle https://github.com/wesnoth/wesnoth/commit/993e42d15bdad3c30ee994013da5721e07f4bf30 20170419 20:29:22< vultraz_iOS> mt_rng is a pre-c++11 class 20170419 20:32:37< irker649> wesnoth: Celtic Minstrel wesnoth:CelticMinstrel-patch-1 1dd5ee1189bb / src/generators/default_map_generator_job.cpp: Small cleanup in map generator https://github.com/wesnoth/wesnoth/commit/1dd5ee1189bb2ec28be4299a04ac50c710d42dca 20170419 20:35:25< vultraz_iOS> I'm going to convert boost::mt19937 and boost::random::mt19937 to std::mt19937, save impl of mt_rng 20170419 20:35:29< vultraz_iOS> and the campaign_server 20170419 20:38:57< irker649> wesnoth: Charles Dang wesnoth:master 392e97a4ec6e / src/ (7 files in 4 dirs): Use std::mt19937 instead of boost::mt19937 https://github.com/wesnoth/wesnoth/commit/392e97a4ec6ec8cefe853bc47a527779236e3e4b 20170419 20:39:23< vultraz_iOS> since if someone who builds the campaign server could test of using std::mt19937 in generate_salt works, that'd be great 20170419 20:39:43< celticminstrel> Apparently I build the campaign server now. 20170419 20:40:11< celticminstrel> I guess Jyrki added it to the MSVC project. 20170419 20:40:25< JyrkiVesterinen> Yes, I did. 20170419 20:40:36< vultraz_iOS> only reason im unsure is it's used in a boost::variate_generator 20170419 20:40:45< vultraz_iOS> and I know std and boost sometimes don't get along 20170419 20:41:07< vultraz_iOS> see also: boost::make_zip_iterator and std::make_tuple 20170419 20:41:54< vultraz_iOS> ya know 20170419 20:42:05< vultraz_iOS> i haven't seen travis or appveyor in a long time.. 20170419 20:43:21< celticminstrel> I know. 20170419 20:46:54< JyrkiVesterinen> AppVeyor is still up. We just haven't had any failing Appveyor builds for a month. :) 20170419 20:46:54< JyrkiVesterinen> https://ci.appveyor.com/project/wesnoth/wesnoth/history 20170419 20:47:09< gfgtdf> celticminstrel: yes the ai code rus unsynced 20170419 20:47:13< gfgtdf> runs* 20170419 20:48:42< celticminstrel> I guess that means up MSVC project update was in time to avoid a failing build. 20170419 20:48:47< celticminstrel> ^my not up 20170419 20:48:58< celticminstrel> (How the heck does my become up? o.O ) 20170419 20:49:29< vultraz_iOS> looks like travis is failing on your branch https://travis-ci.org/wesnoth/wesnoth 20170419 20:49:35< celticminstrel> So clang supports [[clang::fallthrough]] at least as far back as 3.3, but I can't tell if 3.2 or 3.1 does... 20170419 20:49:41< celticminstrel> vultraz_iOS: The patch-1 branch? 20170419 20:49:50< vultraz_iOS> src/global.hpp:140:21: error: expected primary-expression before ‘__attribute__’ 20170419 20:49:50< vultraz_iOS> #define FALLTHROUGH __attribute__((fallthrough)) 20170419 20:49:52< vultraz_iOS> ah 20170419 20:49:58< vultraz_iOS> yup, same thing i got 20170419 20:50:26< vultraz_iOS> src/global.hpp:140:21: error: expected ‘;’ before ‘__attribute__’ 20170419 20:50:26< vultraz_iOS> #define FALLTHROUGH __attribute__((fallthrough)) 20170419 20:50:28< vultraz_iOS> interesting.. 20170419 20:50:36< celticminstrel> ??? 20170419 20:51:07-!- markus__ [~mjs-de@x4db5cab9.dyn.telefonica.de] has quit [Remote host closed the connection] 20170419 20:51:18< vultraz_iOS> travis 20170419 20:55:29< celticminstrel> So the Apple build passes because it's using a later version of clang... 20170419 20:55:53< vultraz_iOS> celticminstrel: so, I'm not sure we can just replace mt_rng.. 20170419 20:55:59< celticminstrel> The Linux clang build is using 3.5, but 3.6 is needed for __has_cpp_attribute... 20170419 20:56:12< vultraz_iOS> but i could possibly make it use the std::mt at least 20170419 20:58:13< vultraz_iOS> let's see if it builds 20170419 21:01:31-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 21:01:49< celticminstrel> BTW, I'm editing global.hpp again. Just FYI 20170419 21:02:56< vultraz_iOS> C:\Users\exodi\Documents\wesnoth\src\scripting\game_lua_kernel.cpp|1464|warning: statement has no effect [-Wunused-value]| 20170419 21:03:00< vultraz_iOS> where did this come from.. 20170419 21:03:13< celticminstrel> Cast it to void. 20170419 21:03:24< celticminstrel> That's probably the line I added to suppress an MSVC warning. 20170419 21:03:37< celticminstrel> "data;" 20170419 21:03:49< vultraz_iOS> yup 20170419 21:03:53< celticminstrel> -> "(void)data;" 20170419 21:04:06< celticminstrel> You could use UNUSED(data) but that would be misleading. 20170419 21:04:19< celticminstrel> Because it's not actually unused despite MSVC saying it is. 20170419 21:04:47< vultraz_iOS> ok, use of the std mt in mr_rng seems to build 20170419 21:05:06-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: So long and thanks for all the fish.] 20170419 21:05:54< irker649> wesnoth: Charles Dang wesnoth:master 9f5d312bfeac / src/scripting/game_lua_kernel.cpp: Fixup 8923978 https://github.com/wesnoth/wesnoth/commit/9f5d312bfeac250a2e8eeab2cb7af74df09ed8f4 20170419 21:11:03-!- JyrkiVesterinen [~JyrkiVest@89-166-103-224.bb.dnainternet.fi] has quit [Quit: .] 20170419 21:12:18< gfgtdf> i think msvc somehow detects that the dtor call is basically a no since end_level_data is a pod stucture 20170419 21:12:24< gfgtdf> nop* 20170419 21:12:40< irker649> wesnoth: Celtic Minstrel wesnoth:master 045291918527 / src/global.hpp: Fixups https://github.com/wesnoth/wesnoth/commit/045291918527ef53fa72be6f82e195c2e4f69b94 20170419 21:12:42< celticminstrel> Maybe. 20170419 21:13:27< gfgtdf> so impl_end_level_data_collect does in fact nothing, still msvc shoudn't give this wanring based on that. 20170419 21:13:49< celticminstrel> Apparently it's a bug in MSVC. 20170419 21:15:40< irker649> wesnoth: Celtic Minstrel wesnoth:login_save_crypt 921f6b4dd580 / / (28 files in 8 dirs): Don't store the user's password in plaintext in the prefs file https://github.com/wesnoth/wesnoth/commit/921f6b4dd580ed8df70853a9196ed8ed13f14b88 20170419 21:19:23< gfgtdf> celticminstrel: credentials.hpp shoudl have an include guard, e.g #pragma once 20170419 21:19:29-!- RatArmy [~ratarmy@om126234114193.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170419 21:19:42< celticminstrel> Oh right, good point. 20170419 21:21:53-!- RatArmy [~ratarmy@om126234114193.16.openmobile.ne.jp] has joined #wesnoth-dev 20170419 21:23:04< gfgtdf> there is te same game on the mp server open now already for >3days, is this abug? 20170419 21:24:59< celticminstrel> vultraz_iOS: Looks like you forgot to include in some places. 20170419 21:25:21< vultraz_iOS> it did build for me 20170419 21:25:27< celticminstrel> That doesn't mean anything. 20170419 21:25:37< celticminstrel> You're even still including the Boost mersenne generator. 20170419 21:25:43< irker649> wesnoth: Charles Dang wesnoth:master e91aeb086037 / src/mt_rng.hpp: mt_rng: use std::mt19937 https://github.com/wesnoth/wesnoth/commit/e91aeb0860371ae6647d664fc13fb4590150e926 20170419 21:25:46< irker649> wesnoth: Charles Dang wesnoth:master 42b309165a3c / src/ (mt_rng.cpp mt_rng.hpp): mt_rng: made use of std::mersenne_twister_engine::discard https://github.com/wesnoth/wesnoth/commit/42b309165a3c8d9980d1b698256e04db2838a5d9 20170419 21:26:20< celticminstrel> vultraz_iOS: Please fix. 20170419 21:26:44< celticminstrel> Look for includes of boost/random and replace them with 20170419 21:26:49< celticminstrel> Except for the one... 20170419 21:27:02< celticminstrel> or something 20170419 21:27:22< celticminstrel> Well, as long as it builds after your replacements, it should be fine. 20170419 21:28:42-!- Shiki [~Shiki@p548560FE.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170419 21:31:46< irker649> wesnoth: Charles Dang wesnoth:master b53ff3187b64 / src/ (3 files in 2 dirs): Fixup 392e97a (includes) https://github.com/wesnoth/wesnoth/commit/b53ff3187b64570ee03b07bf24c27d069d427d48 20170419 21:31:48< vultraz_iOS> celticminstrel: ^ 20170419 21:31:59< vultraz_iOS> one in campaign_server is stil there ofc 20170419 21:32:02< vultraz_iOS> still 20170419 21:35:18< vultraz_iOS> heh 20170419 21:35:20< vultraz_iOS> "// Note: Whoever wrote this code, you should have used an assertion, to save others hours of work..." 20170419 21:35:41< celticminstrel> ??? 20170419 21:35:52< vultraz_iOS> just a random comment i found 20170419 21:36:12< vultraz_iOS> celticminstrel: what should i rename the random_new namespace to? 20170419 21:36:21< vultraz_iOS> just random? 20170419 21:36:27< vultraz_iOS> rng? 20170419 21:36:47< celticminstrel> I think I'd go with random since the class is named rng. 20170419 21:37:06< celticminstrel> The files can be renamed to just drop the _new portion. 20170419 21:37:28< celticminstrel> Should we add a prefs source dir? 20170419 21:37:42< vultraz_iOS> perhaps 20170419 21:37:58< celticminstrel> Prefs are currently spread over at least three file-pairs, possibly more. 20170419 21:48:36-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170419 21:49:09-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 21:49:14< irker649> wesnoth: Charles Dang wesnoth:master d8ed11c2b110 / / (33 files in 13 dirs): Drop the _new suffix from random_new https://github.com/wesnoth/wesnoth/commit/d8ed11c2b1100ff13635935f47bab220a1f83e4c 20170419 21:55:45-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20170419 21:56:07 * vultraz_iOS is once again reminded of bind_void... 20170419 21:56:57< vultraz_iOS> still don't understand why that's needed when literally 99% of cases don't need it 20170419 21:59:34< vultraz_iOS> oh, was it the return value? 20170419 21:59:38< vultraz_iOS> might have been the return value 20170419 22:02:35< celticminstrel> It was the return value. 20170419 22:03:31< vultraz_iOS> ah, right 20170419 22:03:34< vultraz_iOS> gcc had issues 20170419 22:06:36-!- RatArmy [~ratarmy@om126234114193.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170419 22:10:26 * vultraz_iOS cancels two pending travis builds 20170419 22:14:00< irker649> wesnoth: Celtic Minstrel wesnoth:master 62bff261a102 / src/generators/default_map_generator_job.cpp: Small cleanup in map generator https://github.com/wesnoth/wesnoth/commit/62bff261a102b5f5014f5c8a85e364faa1893e9f 20170419 22:15:43< irker649> wesnoth: Celtic Minstrel wesnoth:login_save_crypt 8151df218eab / / (28 files in 8 dirs): Don't store the user's password in plaintext in the prefs file https://github.com/wesnoth/wesnoth/commit/8151df218eab2e7bc642a6058ff55846bab3814f 20170419 22:21:03-!- Shiki [~Shiki@p548560FE.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 20170419 22:25:28< vultraz_iOS> it occurs to me that if someone really wanted to steal passwords they could simply look at our crypto impl 20170419 22:25:45< celticminstrel> Sort of? 20170419 22:25:54< celticminstrel> Are you commenting on the branch? 20170419 22:26:05< vultraz_iOS> referring to the branch 20170419 22:27:16< celticminstrel> Security by obscurity is not good security though. Good security is when you know the algorithm but still can't crack it. 20170419 22:27:25< celticminstrel> Generally because you don't have the key. 20170419 22:27:40< celticminstrel> On the other hand, in this case "the algorithm" includes the key, in a way... 20170419 22:27:54< celticminstrel> There's probably a better way to do that than simply using the system username. 20170419 22:35:18< stikonas> probably not a cross platform way... maybe one cat use OS password wallets but it's complicated... 20170419 22:36:32< celticminstrel> Yeah, I think that would be the ideal solution (eg, use the keychain on Mac OSX), but I have no idea if there's something like that for Linux... 20170419 22:40:29-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170419 22:40:42-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170419 22:40:47< stikonas> celticminstrel: well, there are two solutions on linux, kwallet and gnome keyring 20170419 22:41:03< stikonas> I think there were some proposals to unify API but I don't think they succeeded... 20170419 22:41:05-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20170419 22:41:08< celticminstrel> And does everyone have one of them? 20170419 22:41:19< celticminstrel> If not there'd still need to be a fallback implementation somehow. 20170419 22:41:29< stikonas> celticminstrel: well, not everyone uses KDE or Gnome 20170419 22:41:52< stikonas> most people do but some use other desktop environments 20170419 22:42:01< stikonas> not sure if xfce supports any keyring 20170419 22:42:25< aeth> Then there's those of us who use a tiling window manager. There are dozens of different ones. 20170419 22:42:40< aeth> I use stumpwm, the emacs of window managers. 20170419 22:42:50< aeth> But I think everyone who uses a tiling window manager uses a different one. 20170419 22:43:10< stikonas> well, in principle you can still install kwallet or gnome keyring but I doubt you have them 20170419 22:43:35< aeth> I use KDE when I need a heavy environment. 20170419 22:43:36< stikonas> although, I don't really have any password on kwallet... 20170419 22:43:47< aeth> But I don't game in KDE if I can avoid it. 20170419 22:43:53< stikonas> I just store my passwords manually in keepassxc 20170419 22:43:56< aeth> One of the big advantages of a tiling window manager is better gaming performance. 20170419 22:44:10< aeth> It does less, which is good. 20170419 22:44:11< stikonas> aeth: can't you just disable compositting in kwin? 20170419 22:44:23 * vultraz_iOS is a pleb and stores his passwords in Chrome :P 20170419 22:44:24< aeth> The tiling window manager still provides fewer headaches, usually. 20170419 22:44:55< aeth> KDE doesn't work flawlessly with the proprietary nvidia driver, which is basically required on newer nvidia cards 20170419 22:45:00< stikonas> well, eventually there might be some problems with wayland ports ... 20170419 22:45:26< stikonas> well, I just use my integrated intel card and have nouveau but don't use it... 20170419 22:45:56< stikonas> aeth: in any case you don't need 3d acceleration for wesnoth 20170419 22:46:55< aeth> Which is more of a flaw than an advantage. It's very low-performance when there are lots of units using idle animations on a large map... then again, that's rare because it's hard to move lots of units in a reasonable way. 20170419 22:47:21< vultraz_iOS> aeth: what is a tiling window manager 20170419 22:47:28< aeth> vultraz_iOS: It only tiles 20170419 22:47:34< vultraz_iOS> does't overlap? 20170419 22:47:35< aeth> (generally) 20170419 22:47:38< vultraz_iOS> why would you want this 20170419 22:48:01< celticminstrel> vultraz_iOS: That's only web passwords, not general passwords. :P 20170419 22:48:19< aeth> vultraz_iOS: Because my general workflow is emacs on one monitor fullscreen, and then a 2/3 1/3 split in either order on the other monitor, generally shared between Firefox and a terminal (with Firefox in the larger split) 20170419 22:48:31< aeth> So this maximizes screen usage. 20170419 22:48:38< vultraz_iOS> I see 20170419 22:48:46< aeth> No window borders, etc., to waste space. 20170419 22:48:48< vultraz_iOS> windows has tiling 20170419 22:48:50< vultraz_iOS> too 20170419 22:49:06< aeth> The very limited tiling of half-screen doesn't really work. 20170419 22:49:09< aeth> Half rarely works. 20170419 22:49:29< aeth> It's very easy for me to, entirely keyboard-driven, get a 2/3 1/3 split 20170419 22:50:28< aeth> I only use a mouse where it makes sense, like games and web browsing (although if I wanted to, I could use an add-on to make Firefox keyboard-driven), etc. 20170419 22:50:50< vultraz_iOS> hipster intensifies :P 20170419 22:51:10< aeth> Hipsters use macOS, where you can't do this. 20170419 22:51:15< aeth> :p 20170419 22:52:04< aeth> The keyboard/mouse tradeoff is generally ease of use (mouse) vs. speed (keyboard). Higher learning curve, but more efficient. Except for things like navigating 3D space (many games) or where you need precision (e.g. GIMP, Inkscape) 20170419 22:52:46< vultraz_iOS> You should do away with the keyboard and use a touchscreen 20170419 22:53:04< aeth> That's Microsoft's goal, and GNOME's goal :-p 20170419 22:53:11< stikonas> typing on a touchscreen is so inconvenient... 20170419 22:53:20< vultraz_iOS> Not really? 20170419 22:53:31< stikonas> no feedback at all... 20170419 22:53:54< vultraz_iOS> Obviously you can't use a touchscreen for everything but it's also better than a keyboard for navigating 20170419 22:53:58< aeth> I type about idk 80-100 words per minute on a keyboard. I also type very fast on a touchscreen, which is probably less than half of my keyboard speed. 20170419 22:54:25< aeth> imo a touchscreen only wins with hyperlinks in a web page 20170419 22:54:36< stikonas> well, that's what touchscreen is for... 20170419 22:54:49< vultraz_iOS> Well it would win if you had a nice flat modern UI 20170419 22:56:10< vultraz_iOS> Sadly no Linux seems to be doing that 20170419 22:57:31< stikonas> well, maybe QML is doing something like that 20170419 22:58:11< stikonas> not too sure though. Haven't learned QML even though I do some stuff in Qt5 20170419 23:00:38< aeth> vultraz_iOS: A modern UI is usually about lots of wasted space everywhere, especially Microsoft's version. 20170419 23:00:50< aeth> That's probably why Linux isn't going in that direction. 20170419 23:01:25< aeth> Well, besides GNOME. It has lots of wasted space everywhere. It'll probably go "modern" in a few releases. 20170419 23:02:01< stikonas> well, they are known to like removing features 20170419 23:02:21< vultraz_iOS> Imo Linux distros don't care about making their Uis sleek 20170419 23:02:40< aeth> https://upload.wikimedia.org/wikipedia/commons/8/80/Gnome-3.18.2-showing-overview.png 20170419 23:02:43< aeth> GNOME tried 20170419 23:03:12< aeth> It is, imo, hideously ugly but some people like it. 20170419 23:03:40< vultraz_iOS> Hey, that's not that bad at all 20170419 23:04:04< aeth> KDE has a much better execution imo: https://upload.wikimedia.org/wikipedia/commons/2/2f/KDE_Plasma_5.png 20170419 23:04:32< vultraz_iOS> Does away with the more hideous crime of Linux/2000's UI design: cheap, ugly 3D gradients and icons 20170419 23:04:51< stikonas> vultraz_iOS: that's my current desktop https://stikonas.eu/files/Screenshot_20170420_000412.png 20170419 23:04:54< aeth> Not shown in this KDE screenshot: a title bar for a window that does *not* waste a lot of space like GNOME's. But KDE has them 20170419 23:05:03< aeth> By has them, I mean, title bars that are sane 20170419 23:05:08< vultraz_iOS> Hmm 20170419 23:05:13< vultraz_iOS> Actually that is nicer, yes 20170419 23:05:21< vultraz_iOS> Though I can't really tell if it's two windows or one 20170419 23:06:05< stikonas> in my screenshot? just file manager 20170419 23:06:12< vultraz_iOS> The KdE one 20170419 23:06:28< stikonas> technically it's not KDE anymore :D. It's Plasma 20170419 23:06:59< vultraz_iOS> Your desktop looks quite nice too 20170419 23:07:08< vultraz_iOS> Nice to know Linux is making improvements 20170419 23:07:26< stikonas> vultraz_iOS: well, it's the same as in aeth's link, it's just that his picture are two pictures stacked one on top of the other 20170419 23:08:48< aeth> vultraz_iOS: This is generally my desktop: 20170419 23:08:55< aeth> https://i.imgur.com/tX0Io8l.png 20170419 23:09:32< stikonas> well, you don't need window manager for emacs... 20170419 23:09:38< stikonas> can just run it from tty 20170419 23:09:40< vultraz_iOS> What the fuck o.o 20170419 23:09:45< vultraz_iOS> There's nothing there 20170419 23:09:48< aeth> stikonas: emacs in a terminal has fewer features. 20170419 23:09:53< aeth> vultraz_iOS: Well, there's emacs there 20170419 23:10:13< stikonas> well, emacs even has a church... 20170419 23:10:35< aeth> vultraz_iOS, stikonas: And as I said, I also typically have a terminal and Firefox open, on the other monitor 20170419 23:10:41< stikonas> https://stallman.org/saintignucius.jpg 20170419 23:11:17< stikonas> aeth: on my desktop I use Yakuake, so terminal quickly slides down when I press F12 20170419 23:12:21< vultraz_iOS> tbh your desktops actually make mine look cluttered :P 20170419 23:12:32< stikonas> vultraz_iOS: hard to beat 0 icons 20170419 23:14:31< vultraz_iOS> that, and you have a very minimal start menu 20170419 23:14:36< vultraz_iOS> mine is full of junk :P 20170419 23:14:42< aeth> stikonas: I used to use that, but I prefer narrow, tall terminals to wide, short terminals. Sliding from the left would make more sense. 20170419 23:16:06< stikonas> well, dimensions are adjustable, aren't they? 20170419 23:16:16< stikonas> I just have it basically full screen 20170419 23:19:57< stikonas> aeth: I even tried running wesnoth without using X11 on Linux 20170419 23:20:05< stikonas> strangely it starts every second time 20170419 23:20:10< stikonas> probably some SDL2 bug 20170419 23:25:10-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170419 23:25:16-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170419 23:45:16< vultraz_iOS> travis broken ;_l 20170419 23:46:16< vultraz_iOS> it doesn't like namespace random 20170419 23:46:18< vultraz_iOS> damn gcc 4 20170419 23:50:26< celticminstrel> What's wrong with namespace random? 20170419 23:50:30< celticminstrel> Oh wait, 20170419 23:50:40< celticminstrel> Could it be there's a function called random? 20170419 23:51:30< vultraz_iOS> seems to be 20170419 23:52:04< vultraz_iOS> /usr/include/stdlib.h:321:17: error: previous declaration of ‘long int random()’ 20170419 23:52:04< vultraz_iOS> extern long int random (void) __THROW; 20170419 23:55:39< celticminstrel> Okay, then maybe... rand_gen or something? 20170419 23:59:08< celticminstrel> I don't mind calling the namespace rng either, but... the class is also called rng, so... --- Log closed Thu Apr 20 00:00:24 2017