--- Log opened Sun Sep 06 00:00:28 2015 20150906 00:04:43-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20150906 00:05:39-!- Shackra [~Jorge@186.177.2.148] has joined #wesnoth-dev 20150906 00:08:10-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 246 seconds] 20150906 00:08:10-!- wedge010 is now known as wedge009 20150906 00:26:05< Aginor> shadowm: would zou be able to help me to and run https://gist.github.com/aginor/92afdf5da9dc2bfd5f41 ? I'd appreciate if you could send me the output from when you press some of your latin american keys 20150906 00:26:44-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20150906 00:28:19< shadowm> Aginor: Sure. Any particular key sequences to test? 20150906 00:28:44< shadowm> Fpr example shift+. (:) gives me: 20150906 00:28:46< shadowm> keypress: 2->. (.) 20150906 00:28:46< shadowm> keypress: 0->Right Shift (Right Shift) 20150906 00:29:24< Aginor> your upside down question mark? 20150906 00:29:34< shadowm> keypress: 0->¿ (=) 20150906 00:29:34< Aginor> the n with the tilde above? 20150906 00:29:44< shadowm> keypress: 0->ñ (;) 20150906 00:29:50< Aginor> interesting 20150906 00:29:58< Aginor> I wonder why that was not working in wesnoth for you 20150906 00:30:48< Aginor> the number is the keymod mask )shift, alt ctrl= and so on, the first char is the translated key and the one within paranthesis is the string representation of the scancode 20150906 00:31:49 * shadowm nods. 20150906 00:32:17< Aginor> when you tried it, are you sure you used a sdl2 build? 20150906 00:32:29< shadowm> The versin info dialog said 2.0.3. 20150906 00:33:30< Aginor> could you please run "setxkbmap -print" and show me the entire output? 20150906 00:33:56< shadowm> Aginor: http://pastebin.com/kuqVBAVe 20150906 00:34:17< Aginor> thank you 20150906 00:35:21< Aginor> I'm asking a bunch of different people on different keyboard layouts to provide me with this :) 20150906 00:35:23-!- Jozrael [~Jozrael@cpe-23-243-167-222.socal.res.rr.com] has joined #wesnoth-dev 20150906 00:35:32< shadowm> I did say that the enter command hotkey was displayed as ; but was only really triggered with ñ unless re-assigned to ; by hand, yes? 20150906 00:36:23< shadowm> And once reassigned it displayed as shift+, rather than ; . 20150906 00:36:31< Aginor> yes 20150906 00:37:03< shadowm> Pressing ñ when prompted to assign a new key sequence displays ; instead. 20150906 00:37:42< shadowm> OTOH, pressing ñ in a GUI2 textbox gets me ñ. 20150906 00:38:09< Aginor> GUI2 textboxes are completely divorced from the keypress events 20150906 00:38:23< Aginor> Try a GUI1 textbox instead 20150906 00:38:32< Aginor> They are still broken :) 20150906 00:38:33< shadowm> ñ in GUI1 too. 20150906 00:38:46< shadowm> It's one of the few keys that produce the correct result in GUI1 textboxes. 20150906 00:39:19< shadowm> Shift, for example, gets me an a with a circle above. 20150906 00:39:41< shadowm> The accute accent dead key (') gets me [. 20150906 00:40:11< shadowm> Hm, I guess all keys work with GUI1 actually, it's just that modifiers and dead keys produce unexpected results. 20150906 00:40:17< Aginor> yes 20150906 00:40:22< shadowm> And also non-character keys like F1 through F12. 20150906 00:40:32< shadowm> (e.g. F12 is E) 20150906 00:40:42< Aginor> that's my one-line stopgap at work 20150906 00:40:50< Aginor> but it's still not right 20150906 00:46:55< Aginor> thanks for the input :) 20150906 00:47:49< shadowm> Sure, no problem. 20150906 00:53:05-!- Jozrael [~Jozrael@cpe-23-243-167-222.socal.res.rr.com] has quit [Ping timeout: 256 seconds] 20150906 00:56:35< Aginor> there we go, fixed. 20150906 00:57:02< Aginor> I think I've pretty much read all of the SDL2 source that has to do with keyboard handling by now 20150906 00:57:11 * Aginor lurves OSS 20150906 00:57:20< Aginor> having source access is so convenient 20150906 00:58:43< celticminstrel> Maybe too convenient. 20150906 00:59:17< Aginor> celticminstrel: what do you mean? 20150906 01:01:34< celticminstrel> Easy to accidentally use something private that might change unexpectedly. 20150906 01:02:14< celticminstrel> Perhaps I should've put quotes on "private", but whatever. 20150906 01:03:26< shadowm> Hence the importance of documentation. 20150906 01:04:50< Aginor> celticminstrel: closed source won't stop me from using non-public API, it's just harder. But it also stops me from verifying/correcting my faulty assumptions on how something works 20150906 01:20:13< celticminstrel> True enough. 20150906 01:23:49< Aginor> well, at least without disassembling and reverse engineering 20150906 01:24:00< Aginor> and any day where I have to disassemble code is a bad day. 20150906 01:30:52< Aginor> shadowm: https://github.com/aginor/wesnoth/commit/d1921d0dd78272610094ae8b4f32045ea975a0fb 20150906 01:32:05< Aginor> shadowm: I think ^ fixes everything except for the return references for non-POD types 20150906 01:33:42< Aginor> if you have the time, I'd like some guidance there, everything I've found about shared_ptr seems to suggest that passing by value is the right thing. I could return the strings as references though, but that will require me to change them to static within the implementation 20150906 01:33:57-!- [Relic] [~Relic]@2602:306:33a3:6d30:1dc2:6acf:4c1c:30fe] has joined #wesnoth-dev 20150906 01:34:33< shadowm> Passing smart pointers by value is the way to go yes. 20150906 01:34:47< Aginor> yes... 20150906 01:35:21< Aginor> would you be able to provide me with an example of what you would like me to change? 20150906 01:36:06< shadowm> Aginor: Re strings, I meant for example hotkey_base::get_command(), it returns a copy of a member variable. 20150906 01:36:54< Aginor> yeah 20150906 01:37:09< shadowm> That particular case can return a read-only reference instead. 20150906 01:37:11< Aginor> that's the only case I've managed to identify so far myself 20150906 01:37:59< shadowm> There's get_description, not sure yet what it returns. 20150906 01:38:23< Aginor> shadowm: it's completely unused both in old and new code 20150906 01:38:38< Aginor> I left it in as a placeholder but with tidied up comments 20150906 01:39:17< Aginor> I'll add a @todo to it 20150906 01:39:48< Aginor> but admittedly, get_description should return translated strings instead 20150906 01:40:02< shadowm> Anyway, you understand the general principle so that's fine. 20150906 01:41:00< Aginor> yeah :) 20150906 01:41:20< Aginor> I'm still dusting off my c++ though 20150906 01:41:37< shadowm> Okay, so, um, ñ is still needed to bring up the command box. 20150906 01:41:47< Aginor> ummm 20150906 01:41:49< Aginor> yeah 20150906 01:41:52< shadowm> I have commit d1921d0dd78272610094ae8b4f32045ea975a0fb. 20150906 01:41:53< Aginor> that's intentional 20150906 01:42:08< Aginor> but it should show up as ñ now in the hotkey preferences 20150906 01:42:17< shadowm> Also, I can't bring up Preferences. 20150906 01:42:19< Aginor> ñ == us ';' 20150906 01:42:22< shadowm> Oh I can. 20150906 01:42:28< shadowm> Why couldn't I a few second ago. 20150906 01:42:51< shadowm> I guess I had the command prompt open. 20150906 01:43:14< shadowm> Aginor: This still feels really awkward. 20150906 01:43:32< Aginor> ñ feels awkward? 20150906 01:43:36< shadowm> For example, in our documentation we typically instruct users to type :debug. 20150906 01:44:04< shadowm> Now U.S. keyboard users will have to type ;debug, Spanish/LatAm keyboard users will have to type ñdebug, and so on. 20150906 01:44:10< Aginor> yeah... 20150906 01:44:33< Aginor> that is not ideal, I can definitively see the problem 20150906 01:46:08< Aginor> interesting 20150906 01:46:09< Aginor> Note: In Battle for Wesnoth versions prior to version 1.1.1, one needed to type Shift-; (Shift-semicolon). 20150906 01:46:40< shadowm> Isn't that how you get : in a U.S. keyboard? I keep forgetting. 20150906 01:46:48< Aginor> it is 20150906 01:46:58< shadowm> I'm fairly sure : and ; share the same key but I forget which one is the first level key. 20150906 01:47:12< Aginor> ; is first level 20150906 01:47:46< Aginor> so to kill the discussion about command mode once and for all; change it to '.' 20150906 01:47:58< Aginor> I don't think '.' is remapped across keyboard layouts 20150906 01:48:12< shadowm> Then there's search, formerly brought up with /. 20150906 01:48:15< Aginor> it's not vim-like any longer at that point though 20150906 01:49:28< Aginor> it's still brought up with / 20150906 01:49:45< shadowm> The settings dialog says it's - now. 20150906 01:49:57< Aginor> ah... 20150906 01:50:07< Aginor> it's also been localised for you 20150906 01:50:59< Aginor> instead of shift+7 (guess) it's - now? 20150906 01:51:13< shadowm> Yes, the key that's right next to right shift for me. 20150906 01:51:20< Aginor> yes 20150906 01:51:30< Aginor> that's '/' on us keyboard 20150906 01:51:51< shadowm> I'd have expected to still be able to use Num Pad / but I guess that's a configuration issue. 20150906 01:52:03< Aginor> that it is 20150906 01:52:08< shadowm> The default list should presumably be / and Num Pad / instead of just /. 20150906 01:52:19< Aginor> easily remidied too, simply update hotkeys.cfg 20150906 01:53:51< Aginor> add an another entry for "Keypad /" 20150906 01:56:09< shadowm> Anyway, the code seems okay to me. 20150906 01:56:16< Aginor> ok 20150906 01:56:27< Aginor> I'll rebase and put in the reference too 20150906 01:56:54< Aginor> but it sounds like we need to discuss the UX aspect of it a bit more 20150906 01:57:18< shadowm> Indeed. 20150906 01:57:42< Aginor> ok, rebased and force-pushed 20150906 01:58:07-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has quit [Quit: tomreyn] 20150906 02:01:17-!- fabi [~quassel@wesnoth/developer/fendrin] has quit [Ping timeout: 252 seconds] 20150906 02:02:45-!- fabi [~quassel@176.4.17.87] has joined #wesnoth-dev 20150906 02:02:45-!- fabi [~quassel@176.4.17.87] has quit [Changing host] 20150906 02:02:45-!- fabi [~quassel@wesnoth/developer/fendrin] has joined #wesnoth-dev 20150906 02:04:13< Aginor> shadowm: thank you for your time reviewing my code, I appreciate it 20150906 02:04:22< Aginor> *reviewing and testing 20150906 02:04:38< shadowm> Ahahaha okay. Who's been editing the CommandMode wiki page as COMMANDMODE? 20150906 02:04:48< shadowm> vultraz? 20150906 02:05:30< shadowm> Aginor: So, shall we move on to the next stage? 20150906 02:06:06< Aginor> shadowm: if you are happy to 20150906 02:06:16< Aginor> I don't want you to feel forced to 20150906 02:06:42-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [Read error: Connection reset by peer] 20150906 02:06:57< shadowm> There are other bugs pending and I don't want you to have to juggle multiple PR branches around. 20150906 02:07:29< Aginor> that has ocurred to me as well :) 20150906 02:07:49< shadowm> We can fine-tune the details of the keyboard conundrum later down the road. 20150906 02:08:04< Aginor> sounds good 20150906 02:08:08< shadowm> Are you subscribed to the developers ML? 20150906 02:08:48< Aginor> I don't think so, that may be the only place I'm not 20150906 02:09:00< Aginor> I'll sign up now 20150906 02:09:05< shadowm> Okay, and your forum account is aginor, right? 20150906 02:09:09< Aginor> yes 20150906 02:09:53< Aginor> signed up, itäll take a while to get through my greylisting though 20150906 02:11:20< shadowm> You have a forum PM awaiting, as well as an email from GitHub. 20150906 02:11:26< Aginor> thank you 20150906 02:11:38< Aginor> I have already spotted the emails arriving about it 20150906 02:11:39< shadowm> Branch name suggestions: sdl2 20150906 02:12:19< Aginor> sounds like we had the same idea 20150906 02:12:34< shadowm> :p 20150906 02:13:18< shadowm> I've reassigned #475 to you. 20150906 02:13:19< Aginor> I'll work in a private repo for contentious stuff and issue PRs that can be discussed :) 20150906 02:13:30< shadowm> Okay, sure. 20150906 02:14:11-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20150906 02:24:51< Aginor> I'll get that merged into the sdl2 branch once I've finished cloning the master repo... Then I'll move on to one of the other bugs 20150906 02:25:18< Aginor> I'll also merge PR#475 into sdl2 if it looks good 20150906 02:25:27< Aginor> or doesn't break horribly 20150906 02:25:49< Aginor> although if it doesn't break horribly it can probably go into master 20150906 02:26:17< Aginor> celticminstrel: ^ 20150906 02:33:11-!- fabi [~quassel@wesnoth/developer/fendrin] has quit [Ping timeout: 252 seconds] 20150906 02:34:35-!- fabi [~quassel@wesnoth/developer/fendrin] has joined #wesnoth-dev 20150906 02:44:26 * celticminstrel nods 20150906 02:52:39-!- fabi [~quassel@wesnoth/developer/fendrin] has quit [Ping timeout: 256 seconds] 20150906 02:54:06-!- fabi [~quassel@176.4.17.87] has joined #wesnoth-dev 20150906 02:54:06-!- fabi [~quassel@176.4.17.87] has quit [Changing host] 20150906 02:54:06-!- fabi [~quassel@wesnoth/developer/fendrin] has joined #wesnoth-dev 20150906 03:27:03< vultraz> shadowm: not me 20150906 03:27:39< vultraz> fabi: around? 20150906 04:37:09-!- Kwandulin [~Miranda@p5B008FD7.dip0.t-ipconnect.de] has joined #wesnoth-dev 20150906 04:59:11-!- new_one [~new_one@2604:a880:1:20::22e:d001] has quit [K-Lined] 20150906 05:00:04-!- legoktm [~quassel@wikipedia/Legoktm] has quit [K-Lined] 20150906 05:00:40-!- new_one [~new_one@2604:a880:1:20::22e:d001] has joined #wesnoth-dev 20150906 05:01:14-!- legoktm [~quassel@2604:a880:800:10::1c2:b001] has joined #wesnoth-dev 20150906 05:01:37-!- legoktm is now known as Guest79224 20150906 05:22:28-!- Kwandulin [~Miranda@p5B008FD7.dip0.t-ipconnect.de] has quit [Ping timeout: 246 seconds] 20150906 05:22:46-!- fabi [~quassel@wesnoth/developer/fendrin] has quit [Ping timeout: 240 seconds] 20150906 05:27:36-!- Kwandulin [~Miranda@p5B0088DE.dip0.t-ipconnect.de] has joined #wesnoth-dev 20150906 05:48:49-!- celticminstrel is now known as celmin|sleep 20150906 06:28:36-!- Guest79224 [~quassel@2604:a880:800:10::1c2:b001] has quit [Changing host] 20150906 06:28:36-!- Guest79224 [~quassel@wikipedia/Legoktm] has joined #wesnoth-dev 20150906 06:28:44-!- Guest79224 is now known as legoktm 20150906 06:43:07-!- Shackra [~Jorge@186.177.2.148] has quit [Read error: Connection reset by peer] 20150906 06:43:29-!- Jetrel is now known as ASHURBANIPAL_THE 20150906 06:43:48-!- ASHURBANIPAL_THE is now known as ASHURBANIPAL 20150906 06:45:38-!- ASHURBANIPAL is now known as Jetrel__ 20150906 06:56:23-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20150906 06:57:22-!- jinblack [~jinblack@128.111.48.6] has joined #wesnoth-dev 20150906 07:09:36-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has quit [Ping timeout: 240 seconds] 20150906 07:15:37-!- [Relic] [~Relic]@2602:306:33a3:6d30:1dc2:6acf:4c1c:30fe] has quit [Quit: I press the magic X and all the weirdos go away!] 20150906 07:33:00-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20150906 07:33:06-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20150906 07:53:39-!- BeoXTC_ [3eb2b12a@gateway/web/freenode/ip.62.178.177.42] has joined #wesnoth-dev 20150906 07:58:01-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20150906 08:25:20-!- mjs-de [~mjs-de@x4db62e47.dyn.telefonica.de] has joined #wesnoth-dev 20150906 08:51:19-!- irker497 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20150906 08:51:19< irker497> wesnoth: Andreas Löf wesnoth:sdl2 2459e7db10a5 / / (14 files in 5 dirs): This reworks the hotkey system to rely on keycodes. http://git.io/vZvVb 20150906 08:51:19< irker497> wesnoth: Andreas Löf wesnoth:sdl2 56eb59df5ede / / (5 files in 3 dirs): Replace keycode with scancode and fix broken keybindings. http://git.io/vZvVN 20150906 08:51:19< irker497> wesnoth: Andreas Löf wesnoth:sdl2 05c1d8a5a97c / src/hotkey/hotkey_item.cpp: Incorporate review feedback from Spindel. http://git.io/vZvVA 20150906 08:51:20< irker497> wesnoth: Andreas Löf wesnoth:sdl2 e4ddf68c64a9 / src/hotkey/hotkey_item.cpp: Fix potential null pointer being returned from "create hotkey" http://git.io/vZvVx 20150906 08:51:21< irker497> wesnoth: Andreas Löf wesnoth:sdl2 a7cb3f871da4 / src/hotkey/ (hotkey_item.cpp hotkey_item.hpp hotkey_preferences_display.cpp): Fix mods in hotkey creation and scope matching in bindings_equal. http://git.io/vZvVp 20150906 08:51:23< irker497> wesnoth: Andreas Löf wesnoth:sdl2 7943cf034c2a / src/hotkey/hotkey_item.cpp: Incorporate new review feedback from Spindel. http://git.io/vZvVh 20150906 08:51:25< irker497> wesnoth: Andreas Löf wesnoth:sdl2 cc28414c4be6 / src/ (hotkey/hotkey_item.cpp hotkey/hotkey_item.hpp sdl/keyboard.cpp sdl/keyboard.hpp): Fix presentation bug of keyboard hotkeys and incorporate review feedback. http://git.io/vZvVj 20150906 08:51:27< irker497> wesnoth: Andreas Löf wesnoth:sdl2 91cd168ec82d / / (14 files in 5 dirs): Merge pull request #466 from aginor/hotkeyrewrite http://git.io/vZvwe 20150906 08:52:33-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20150906 08:55:43< zookeeper> shadowm, wait what does "editing the CommandMode wiki page as COMMANDMODE" mean? that sounds like you're saying the casing can be changed when doing an edit 20150906 08:57:30-!- EdB [~edb@89-158-11-138.rev.numericable.fr] has joined #wesnoth-dev 20150906 09:01:55-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has joined #wesnoth-dev 20150906 09:10:17< vultraz> zookeeper: MW wiki page addresses don't care about case 20150906 09:10:27< vultraz> So CommandMode and Commandmode point to the same page 20150906 09:10:31< zookeeper> i know 20150906 09:10:34< vultraz> So I think he's saying someone edited COMMANDMODE 20150906 09:20:15-!- Yaiyan [~Yaiyan@46.101.48.31] has quit [Quit: ZNC - 1.6.0 - http://znc.in] 20150906 09:23:05-!- Yaiyan [~Yaiyan@46.101.48.31] has joined #wesnoth-dev 20150906 09:49:11< BeoXTC_> a stupid question but what does wml stand for? wesnoth markup language? is there some spec for it? 20150906 09:50:28< BeoXTC_> and another question: what is the meaning of the first 4 bytes in the network traffic? 20150906 09:52:09< zookeeper> wesnoth markup language, yes 20150906 09:52:20< BeoXTC_> I've found the answer: http://wiki.wesnoth.org/MultiplayerServerWML ;) 20150906 09:52:22 * Aginor looks interested 20150906 09:53:24< Aginor> I've been meaning to look at the network code 20150906 09:54:48-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20150906 09:56:41-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has joined #wesnoth-dev 20150906 10:27:24 * zookeeper still doesn't know why every source file needs to be whitelisted in the project files 20150906 10:27:47< zookeeper> it's incredibly annoying to have to go hunting for files that need to be added somewhere every time someone adds a file 20150906 10:36:26< zookeeper> i can't believe that this is actually necessary, as opposed to just the chosen way to do it in our project files? 20150906 10:41:00< vultraz> what do you mean? 20150906 10:51:31< zookeeper> mostly what i said, i hope. as far as msvc, xcode and codeblocks are concerned, it seems. 20150906 11:02:07-!- BeoXTC_ [3eb2b12a@gateway/web/freenode/ip.62.178.177.42] has quit [Quit: Page closed] 20150906 11:06:05-!- EdB [~edb@89-158-11-138.rev.numericable.fr] has quit [Quit: Konversation terminated!] 20150906 11:14:59< vultraz> zookeeper: I don't get what you mean by "as opposed to just the chosen way to do it in our project files?" 20150906 11:20:08-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150906 11:33:09< zookeeper> vultraz, yes, i can't believe that all those build systems require you to name each and every source file individually 20150906 11:33:30< zookeeper> which means that i can't believe that for some reason our project files have simply chosen to do it that way 20150906 11:33:37< zookeeper> s/have/haven't 20150906 11:52:38-!- irker497 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20150906 11:54:23-!- Kwandulin [~Miranda@p5B0088DE.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20150906 12:04:38-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20150906 12:06:50-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 240 seconds] 20150906 12:06:50-!- wedge010 is now known as wedge009 20150906 12:12:44-!- prkc_ [~prkc@catv-89-134-159-103.catv.broadband.hu] has joined #wesnoth-dev 20150906 12:12:48-!- prkc_ [~prkc@catv-89-134-159-103.catv.broadband.hu] has quit [Remote host closed the connection] 20150906 12:50:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Ping timeout: 240 seconds] 20150906 12:50:31-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150906 14:01:20< celmin|sleep> Seemingly even CMake requires it. :| 20150906 14:01:44< celmin|sleep> I suppose Scons could get away without it. After all, it's just a python script. 20150906 14:02:11< celmin|sleep> But XCode and MSVC don't have any sort of globbing options. 20150906 14:04:43-!- jinblack [~jinblack@128.111.48.6] has quit [Remote host closed the connection] 20150906 14:45:06-!- Kwandulin [~Miranda@p5B0088DE.dip0.t-ipconnect.de] has joined #wesnoth-dev 20150906 14:48:25-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Ping timeout: 244 seconds] 20150906 15:08:30-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20150906 15:39:16-!- fabi [~quassel@wesnoth/developer/fendrin] has joined #wesnoth-dev 20150906 15:49:30-!- {V} [~V@105-70-ftth.on.nl] has quit [Read error: Connection reset by peer] 20150906 15:49:55-!- {V} [~V@105-70-ftth.on.nl] has joined #wesnoth-dev 20150906 15:59:28-!- mattsc_ [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20150906 16:00:53-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20150906 16:00:57-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Ping timeout: 252 seconds] 20150906 16:00:58-!- mattsc_ is now known as mattsc 20150906 16:13:41-!- mjs-de [~mjs-de@x4db62e47.dyn.telefonica.de] has quit [Read error: Connection reset by peer] 20150906 16:13:57-!- mjs-de [~mjs-de@x4db62e47.dyn.telefonica.de] has joined #wesnoth-dev 20150906 16:37:59-!- [Relic] [~Relic]@2602:306:33a3:6d30:14f8:f940:dac8:fc4e] has joined #wesnoth-dev 20150906 16:41:37-!- louis94 [~~louis94@109.133.211.155] has joined #wesnoth-dev 20150906 17:06:09-!- Kwandulin [~Miranda@p5B0088DE.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20150906 17:30:45-!- Shackra [~Jorge@186.177.2.148] has joined #wesnoth-dev 20150906 17:37:13-!- gfgtdf [~chatzilla@f054153079.adsl.alicedsl.de] has joined #wesnoth-dev 20150906 17:38:54< gfgtdf> zookeeper: yes see a reason against deleting this code: https://github.com/wesnoth/wesnoth/blob/master/src/terrain_builder.cpp#L881 which suports an (undocumented) [terrain_graphics][tile]loc= syntax? 20150906 17:42:24-!- louis94 [~~louis94@109.133.211.155] has quit [Ping timeout: 272 seconds] 20150906 17:42:55-!- Shackra_ [~Jorge@186.177.2.148] has joined #wesnoth-dev 20150906 17:43:02-!- Shackra [~Jorge@186.177.2.148] has quit [Ping timeout: 272 seconds] 20150906 18:13:48< zookeeper> gfgtdf, it's just a shortcut for x,y? that is, is loc="4,2" identical in behavior to x,y=4,2? 20150906 18:14:11< gfgtdf> zookeeper: from looking at the code i'd say yes 20150906 18:14:17< gfgtdf> zookeeper: and is isnt relly shorter 20150906 18:14:21< gfgtdf> really* 20150906 18:16:19< zookeeper> i don't really see what purpose it could possibly serve 20150906 18:17:10< gfgtdf> zookeeper: me neogher that's why i want to rmove it 20150906 18:19:25< zookeeper> well, i don't see why not... seems awfully unlikely anyone's using it 20150906 18:23:39-!- irker480 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20150906 18:23:39< irker480> wesnoth: gfgtdf wesnoth:gfgtdf-patch-terrain_loc 252d723dfba1 / src/terrain_builder.cpp: remove support for [terrain_graphics][tile]loc=x,y http://git.io/vZJM5 20150906 18:24:48< gfgtdf> hmm i thought it would create the branch in my fork and not in wesnoths. 20150906 18:25:48-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20150906 19:06:03-!- travis-ci [~travis-ci@ec2-54-211-113-29.compute-1.amazonaws.com] has joined #wesnoth-dev 20150906 19:06:04< travis-ci> wesnoth/wesnoth#7290 (gfgtdf-patch-terrain_loc - 252d723 : gfgtdf): The build passed. 20150906 19:06:04< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/79022853 20150906 19:06:04-!- travis-ci [~travis-ci@ec2-54-211-113-29.compute-1.amazonaws.com] has left #wesnoth-dev [] 20150906 19:12:45-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20150906 19:22:55< Aginor> celmin|sleep: both cmake and scons require it 20150906 19:27:05< fabi> gfgtdf: The chapter selection was removed from the mp create screen. vultraz told me to ask you about it. 20150906 19:28:29-!- celmin|sleep is now known as celticminstrel 20150906 19:32:37< celticminstrel> Aginor: Couldn't scons build the list using Python's globbing module> 20150906 19:32:39< celticminstrel> ^? 20150906 19:33:07< Aginor> celticminstrel: yes. but that's not how it's done :) 20150906 19:33:40< celticminstrel> But my point was that it could be done that way. Ergo, scons is slightly better than CMake / XCode / MSVC / Code::Blocks. 20150906 19:33:43< Aginor> wesnoth builds a bunch of libraries actually, these libraries are then linked together into the final executable (in scons and cmake) 20150906 19:34:43< Aginor> cmake can do globbing too ;) 20150906 19:34:59< celticminstrel> Ah, I wasn't aware of that. 20150906 19:35:10< celticminstrel> Okay then. 20150906 19:35:29< Aginor> if cmake was a bit less broken in their output generators I'd advocate switching to cmake altogether 20150906 19:35:47< Aginor> It can theorethically generate MSVC and XCode projects 20150906 19:35:55< Aginor> in practise, at least xcode is broken 20150906 19:36:29< Aginor> *xcode output 20150906 19:36:43< gfgtdf> fabi: i didnt change teh chapers selection 20150906 19:36:57< gfgtdf> fabi: afail the chaper selection was aölways in mp configure screen 20150906 19:36:59< gfgtdf> afaik* 20150906 19:37:12< fabi> yeah 20150906 19:37:24< fabi> maybe it moved somehow 20150906 19:39:12< gfgtdf> Aginor: i one tried to use msvc projectfiles generated by cmake, 20150906 19:39:59< gfgtdf> Aginor: one of the main problems for me was that they added the library/include directory per compilation unit unstead of per project so you always had to readd them when addin new files 20150906 19:40:57< irker480> wesnoth: gfgtdf wesnoth:master 252d723dfba1 / src/terrain_builder.cpp: remove support for [terrain_graphics][tile]loc=x,y http://git.io/vZJM5 20150906 19:40:59< irker480> wesnoth: gfgtdf wesnoth:master 3f0839b98ae4 / src/terrain_builder.cpp: Merge pull request #484 from wesnoth/gfgtdf-patch-terrain_loc http://git.io/vZJhi 20150906 19:41:01< Aginor> gfgtdf: I think the use-case they envison is that you re-generate your MSVC project when something happens 20150906 19:42:19< gfgtdf> Aginor: but when i try tpo add new features i dont want to regnereate teh projectfiles (and restart visual studio) evertime i add a file 20150906 19:42:22< gfgtdf> try* 20150906 19:51:50< celticminstrel> ^ 20150906 19:52:15< celticminstrel> If they don't have an option to update an existing project, they're missing something very important. 20150906 19:52:36< Aginor> I don't use MSVC very much so I might be wrong 20150906 19:52:56< Aginor> celticminstrel: I'm looking into the SIGTERM business at the moment 20150906 19:54:03< Aginor> celticminstrel: there's always exit(0) that can be invoked instead, I'm not sure throwing the CVideo::quit() exception would work well from a signal handler as it lives outside the normal game context 20150906 19:55:07< celticminstrel> I was told that throwing exceptions from a signal handler is unsafe. 20150906 19:55:57< celticminstrel> exit(0) is probably safe, but I don't know if Wesnoth has any important shutdown operations that happen when CVideo::quit is thrown. 20150906 19:56:07< Aginor> no, there's none 20150906 19:56:12< Aginor> I just read the code 20150906 19:56:30< celticminstrel> However, if you're going with exit(0) it's probably better to do away with the custom handler and just use... what was it.. SIG_DFL or something? 20150906 19:56:58< Aginor> but if that changes in the future then this will diverge, which makes it non-ideal 20150906 19:57:07 * celticminstrel checks manpage, it's indeed SIG_DFL. 20150906 19:57:39< Aginor> yes, that'd work 20150906 19:57:51< celticminstrel> SDL already overrides the signal handler, so that'd just mean we're putting it back to default. 20150906 19:57:59< celticminstrel> The default for SIGTERM is termination. 20150906 19:58:11< Aginor> yup 20150906 20:00:11 * Aginor ponders 20150906 20:00:37< Aginor> it is safe in the current state of wesnoth, but it will turn into a different way of terminating the game 20150906 20:01:33< Aginor> it's fine if we're happy with the risk of any future changes not being incorporated with the signal handler exit code 20150906 20:02:25< celticminstrel> I kind of wish SDL_QUIT had more information in the event. :/ 20150906 20:02:53< celticminstrel> I suppose you could do something weird like putting extra information in event.user.data, but I have no idea if that could be relied upon. Probably not. 20150906 20:04:41< Aginor> that wouldn't be a good idea, no. SDL probably memcopies the entire union, but then wesnoth makes assumptions about SDL's behaviour 20150906 20:05:18< celticminstrel> And if SDL pushes its own quit events, which is probable, you likely can't assume that area is zeroed. 20150906 20:06:04< Aginor> nope 20150906 20:06:14< Aginor> SDL_PushEvent does take a copy of the event 20150906 20:06:32-!- prkc [~prkc@catv-89-134-159-103.catv.broadband.hu] has quit [Ping timeout: 265 seconds] 20150906 20:06:40< Aginor> if that wasn't the case you'd be pushing rubbish data into the event queue the way your signal handler is implemented :) 20150906 20:06:51< Aginor> https://wiki.libsdl.org/SDL_EventType#SDL_QUIT 20150906 20:07:00< Aginor> that's the new and glorious way 20150906 20:07:07< celticminstrel> I already am pushing rubbish data, actually. Since I dont initialized event.user.data at all. 20150906 20:07:15< celticminstrel> ^don't 20150906 20:07:41< Aginor> that's true, but you at least set the event type 20150906 20:07:51< Aginor> a memset wouldn't be amiss though 20150906 20:09:27< irker480> wesnoth: mattsc wesnoth:master f06030b0f5d5 / data/ai/micro_ais/ (4 files in 2 dirs): Fast Micro AI: add support for [avoid] tags http://git.io/vZUJf 20150906 20:10:01< celticminstrel> I would've gonw with std::fill but yes. 20150906 20:10:34< Aginor> you're strictly speaking writing posix c when doing sighandlers, but yeah 20150906 20:10:43< Aginor> https://wiki.libsdl.org/SDL_RegisterEvents 20150906 20:11:42< Aginor> that'll need to be updated in the SDL2 branch :/ 20150906 20:12:23< celticminstrel> There's no need to restrict yourself to POSIX C when writing signal handlers. 20150906 20:12:34< celticminstrel> Signals themselves are POSIX, sure. 20150906 20:12:53< Aginor> celticminstrel: in wesnoth's case, I agree with you 20150906 20:13:25< Aginor> anyway, back to the main issue 20150906 20:14:15< Aginor> celticminstrel: what's your opinion on potentially having two diverging exit path's? And why is it bad to have the exit dialog for sigterm+sigint? 20150906 20:14:27< Aginor> there's always sigkill if you mean business 20150906 20:14:34< celticminstrel> I'm ambivalent on SIGINT. 20150906 20:14:48< celticminstrel> And that's true about SIGKILL. 20150906 20:14:57< celticminstrel> But SIGKILL is essentially "force quit". 20150906 20:15:06< celticminstrel> SIGTERM is more like "request quit". 20150906 20:15:09< Aginor> yes 20150906 20:15:28< celticminstrel> I think it was shadowm that had a stronger opinion on this. 20150906 20:15:32< Aginor> does sigterm count as clicking the 'X'? 20150906 20:15:51< Aginor> in terms of user interaction? 20150906 20:15:51< celticminstrel> An excellent question. If it does, then we have to forget about the signal handler. 20150906 20:16:01< celticminstrel> On the Mac, clicking the X does not generate SIGTERM. 20150906 20:16:12< celticminstrel> But I don't know how Gnome/KDE/etc function 20150906 20:16:16< Aginor> it never will, I was rather meaning in terms of user interaction 20150906 20:16:31< Aginor> is it equivalent? 20150906 20:16:50< celticminstrel> I don't know of any way to generate a SIGTERM except from the commandline. 20150906 20:18:21< Aginor> celticminstrel: it can be done programatically as well, but I can't think of any environments that have custom environements that does that 20150906 20:18:49< celticminstrel> Well yes, of course it can. 20150906 20:18:50< shadowm> zookeeper: Yes. 20150906 20:19:21< celticminstrel> ? 20150906 20:19:51< shadowm> I said 'yes' to zookeeper in answer to a question from earlier. 20150906 20:20:19-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20150906 20:20:26< zookeeper> oh, interesting. 20150906 20:20:28< Aginor> shadowm: do you have an opinion on how wesnoth should react to a SIGTERM or SIGINT signal? 20150906 20:20:48< celticminstrel> In particular, should it put up a "confirm quit" dialog. 20150906 20:21:21< shadowm> zookeeper: Not all files are required everywhere, that's why the recipes need to know what files go where. 20150906 20:22:34< shadowm> For example, wesnothd has no use for image.cpp or src/gui and in fact it'd be harmful to auto-include those files when linking it. 20150906 20:23:36< shadowm> Aginor: When testing and especially when debugging, I usually quit wesnoth using ctrl+c on the parent terminal (so SIGINT) instead of clicking on the window close button or pressing ctrl+q from inside. 20150906 20:24:21< shadowm> Quitting on SIGTERM without asking is a matter of basic courtesy. If my system is sending SIGTERM to a process for whatever reason, it means it wants the process to clean up and quit. 20150906 20:24:51< shadowm> Only if the process has become unresponsive for a more serious reason it should have to resort to SIGKILL. 20150906 20:25:13< celticminstrel> I basically agree on the SIGKILL part. 20150906 20:25:25< shadowm> If you've used SVN you probably are aware how you can do SIGTERM and SIGINT handling wrong. 20150906 20:25:48< celticminstrel> I have used it, but I'm not aware. (I haven't used it much though.) 20150906 20:25:50 * shadowm once had a SVN process get stuck ignoring SIGTERM and SIGINT for several days due to a networking error. 20150906 20:26:06< celticminstrel> ...wow. 20150906 20:26:37< Aginor> shadowm: very well. to details; When reacting to those signals, would it be acceptible to kill wesnoth without going through the cvideo::quit() exception handling 20150906 20:26:44< Aginor> currently, that code path does nothign 20150906 20:27:22< Aginor> if we are worried about cleanup, we can always make wesnoth::cleanup() to be invoked from the signal handler too 20150906 20:28:03< Aginor> alternatively, we use celticminstrel's approach of pushing a user event into the SDL event queue, but that uses up the second-to-last custom defined event type 20150906 20:28:09< shadowm> In Wesnoth, we achieve cleanup procedures via object destructors. 20150906 20:29:09< shadowm> Throwing an exception will unwind the stack and call destructors for all objects that go out of scope in the process. Calling exit() will also call destructors. 20150906 20:29:39< celticminstrel> Default signal action is equivalent to either exit() or abort(), right? I think both will call destructors? 20150906 20:29:40< shadowm> Calling exit() will also call atexit handlers, and SDL 1.2 installs a few of its own. 20150906 20:29:51< shadowm> abort() will not call destructors. 20150906 20:30:23< celticminstrel> But exceptions end up at abort()... I guess that's after unwinding the stack then. 20150906 20:30:31< shadowm> abort() raises SIGABRT on the calling process, which if unhandled will cause the process to exit immediately without cleanup. This is intentional. 20150906 20:31:00< shadowm> Yes, the default exception handler that lives above main() and is provided by the compiler will do that. 20150906 20:31:24< celticminstrel> So what's the default signal handler equivalent to? exit() or abort() or something else? 20150906 20:31:53< shadowm> IIRC it actually calls _Exit(), which is like exit() but does not call destructors. 20150906 20:32:04< celticminstrel> Ah... 20150906 20:32:14< shadowm> The point is that if you go above main() most destructors should've been called already. 20150906 20:32:58< celticminstrel> The entry point in the Mac wesnoth actually isn't the main() in wesnoth.cpp though. 20150906 20:33:18< shadowm> Neither it is on Windows. 20150906 20:33:47< celticminstrel> I don't mean compiler-provided things. 20150906 20:33:58< celticminstrel> I mean SDLmain.m. 20150906 20:33:59< shadowm> On Windows, wesnoth.cpp defines a function named SDLmain or so (there's a relevant #define in SDL's code to do the switcharoo). 20150906 20:34:17< celticminstrel> Which is an Objective-C class. 20150906 20:34:51< shadowm> The entry point is then instead provided by SDLmain.lib as WinMain (a standard Windows GUI subsystem image entry point), which calls SDLmain (our main) near the end. 20150906 20:35:58< celticminstrel> I don't understand why all this is necessary rather than just using main() directly on all platforms, but that doesn't really matter here. 20150906 20:38:09< shadowm> On Windows it's to provide stdin/stdout redirection and have SDL fill in an internal variable recording the process' HINSTANCE, needed for future calls dealing with the Windows API (esp. for window management). It also contains a workaround for a (presumably obsolete) version of DirectX. 20150906 20:38:22< Aginor> I need to head off to work, I'll follow up on this discussion later 20150906 20:39:02< celticminstrel> I didn't think that was necessary to get the HINSTANCE, but maybe that's just an SDL thing. 20150906 20:39:46< shadowm> It's not, really, but that's how they did it in 1.2. SDL 2 makes SDLmain.lib optional on Windows and (IIRC) it does nothing anymore. 20150906 20:41:02< shadowm> Also, since Windows provides the command line in a different format (more strictly speaking it doesn't provide it in a usable format) when using WinMain, SDL has to obtain the raw command line from Windows and parse it to generate the argc and argv passed to SDLmain (our main). SDL 1.2 does this in the worst fashion possible so that argc and argv are not Unicode-safe. 20150906 20:41:27< shadowm> That's why our main has some code duplication in that regard since 1.11.19. 20150906 20:42:11< shadowm> Anyway, back to the original matter. 20150906 20:42:39< shadowm> Cleanup in Wesnoth is achieved via destructors (as part of RAII), throwing an exception calls all destructors that are in the way. 20150906 20:42:43-!- louis94 [~~louis94@109.133.211.155] has joined #wesnoth-dev 20150906 20:43:30< shadowm> If an exception escapes main (whichever main is the effective main), then all objects will be destroyed by the point the default exception handler does its thing (abort(), _Exit(), whatever). 20150906 20:43:57< shadowm> Bar compiler-dependent behavior in that regard. 20150906 20:45:25< shadowm> From what I've read, we can't throw an exception from a POSIX signal handler unless 1) the signal is delivered synchronously (some flag to the signal API I think?) 2) the compiler has special support for this border case. 20150906 20:46:32< shadowm> So for the sake of not having to play code lawyers it'd be better to just not bother and have it set a flag somewhere. Pushing an event using SDL's event API counts more or less like setting a flag. 20150906 20:47:26< shadowm> Alternatively, we can just uninstall SDL's signal handler, or (this being a possibility coming up in SDL 2.0.4 apparently) tell SDL to not install its signal handlers. 20150906 20:47:55< shadowm> Only problem is that this way no cleanup will take place. 20150906 20:49:02< shadowm> Still, it's more or less well-defined which types in Wesnoth are used to perform event loops, so setting a flag that they check along with reading from SDL's queue shouldn't be that much of a hassle. 20150906 21:09:57-!- jinblack [~jinblack@ip184-187-174-106.sb.sd.cox.net] has joined #wesnoth-dev 20150906 21:10:08-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 272 seconds] 20150906 21:12:56< irker480> wesnoth: mattsc wesnoth:master 10ee2f65d49f / data/ai/micro_ais/cas/ca_fast_combat.lua: Fast Micro AI: enable support of the default attacks aspect http://git.io/vZUOI 20150906 21:25:27-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has quit [Quit: tomreyn] 20150906 21:28:09< celticminstrel> events::pump(), right? 20150906 21:28:26-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20150906 21:35:23-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has quit [Read error: Connection reset by peer] 20150906 21:43:55-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20150906 21:47:27< celticminstrel> Anyway, it sounds like the conclusion is either to use exit(0) in the signal handler or do something similar to what I did (but possibly set a global variable instead of pushing an event, so as to save user event slots). 20150906 21:49:30< Aginor> celticminstrel: yes 20150906 21:50:02< celticminstrel> So is this my responsibility or yours? 20150906 21:52:48-!- prkc [~prkc@catv-89-134-159-103.catv.broadband.hu] has joined #wesnoth-dev 20150906 21:55:22-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20150906 22:09:13-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 246 seconds] 20150906 22:17:35-!- gfgtdf [~chatzilla@f054153079.adsl.alicedsl.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]] 20150906 22:19:44-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20150906 22:19:59< Aginor> celticminstrel: I'm tempted to say yours as I have plenty on my plate already with getting SLD2 sorted :) How do you feel about that? 20150906 22:33:19-!- louis94 [~~louis94@109.133.211.155] has quit [Quit: Konversation terminated!] 20150906 22:33:37-!- fabi [~quassel@wesnoth/developer/fendrin] has quit [Remote host closed the connection] 20150906 22:34:00< celticminstrel> Ambivalent? 20150906 22:34:09< celticminstrel> At least it's not terribly hard, I guess. 20150906 22:34:22< celticminstrel> Should I change SIGINT as well as SIGTERM? 20150906 22:35:54< Aginor> yes 20150906 22:36:14< Aginor> could you please also make it all work with the sdl2 branch? 20150906 22:36:38< celticminstrel> I can try... do I have to do anything special to compile with SDL2, or just substitute libs? 20150906 22:36:54-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 272 seconds] 20150906 22:37:12< Aginor> although if this will be backported to 1.12 it'll probably need to be two different commits, one on 1.12 and one in sdl2, with slightly diffrent code 20150906 22:37:35< Aginor> or #ifdefs and I get to resolve the conflicts (less preffered by me obviously) 20150906 22:38:13< Aginor> celticminstrel: yes, change include to /usr/local/SDL2 instead of /usr/local/SDL and link against SDL2_* instead of SDL_* 20150906 22:42:26< aeth> Aginor: are you doing the SDL2 port? 20150906 22:42:28< shadowm> Since this is a significant change in behavior I would not consider it for 1.12. 20150906 22:42:54< Aginor> aeth: yes 20150906 22:42:57< shadowm> The same applies to gfgtdf's quit prompt code, which is a prerequisite. 20150906 22:43:07< aeth> I noticed wesnoth/wesnoth on github doesn't have any "VIDEO_MINIMIZE" 20150906 22:43:09< Aginor> shadowm: thanks for the clarification 20150906 22:43:28< aeth> iirc it's SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS and it's absolutely evil for slow-playing strategy games. 20150906 22:44:07< aeth> Basically the default is that if you have a fullscreen game up, it will auto-minimize when you lose focus. This makes sense for e.g. a AAA FPS. It doesn't make sense for Wesnoth, which is probably the slowest playing non-play-by-mail strategy game out there. 20150906 22:45:27< Aginor> aeth: would you mind raising a bug for it and assigning to me? I'm at work at the moment and I can't give you the attention you deserve :) 20150906 22:45:49< aeth> https://wiki.libsdl.org/SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS 20150906 22:48:28-!- mjs-de [~mjs-de@x4db62e47.dyn.telefonica.de] has quit [Remote host closed the connection] 20150906 22:51:07< aeth> oh wow gna.org really hasn't aged well 20150906 22:51:58< aeth> I am submitting the bug but it's going to take a while because I have to remind myself how websites used to work ten years ago. 20150906 22:52:27-!- fabi [~quassel@wesnoth/developer/fendrin] has joined #wesnoth-dev 20150906 22:55:23< Aginor> aeth: thanks, this makes sure I won't forget about it 20150906 22:55:51< aeth> Aginor: does this go under Graphics or None? 20150906 22:57:20< aeth> Also, which version is the minimum version with SDL2? I actually haven't experienced this firsthand, I just happen to have used and coded for SDL 2 enough to know exactly what's going on here. 20150906 22:57:28< aeth> I guess I'll just put 1.13 20150906 22:57:43< aeth> and None 20150906 22:59:50< Aginor> yeah 20150906 23:00:02< Aginor> thanks for raising the bug 20150906 23:00:04< celticminstrel> SDL2 is supposed to become standard in 1.13 sometime, I think. 20150906 23:01:11< aeth> https://gna.org/bugs/index.php?23857 20150906 23:01:56< aeth> This "feature" of SDL 2 has literally made me stop playing certain strategy games when they update. It's really, really annoying when I'm just passively playing while browsing the web or something. 20150906 23:02:15< aeth> Plus, it seems to introduce bugs into some of them somehow. 20150906 23:02:18< shadowm> Your window manager doesn't allow you to maximize the window? 20150906 23:03:15< Aginor> celticminstrel: 13.2 (next release) will be SDL2 by default 20150906 23:03:16< aeth> shadowm: a lot of games assume that they will remain at a fixed resolution throughout their run. Manually maximizing a windowed SDL 2 app doesn't always (or doesn't usually?) work. 20150906 23:03:27< Aginor> 13.3 is planing to drop SDL1 support if feasible 20150906 23:03:28< shadowm> Wesnoth doesn't make that assumption. 20150906 23:04:27< aeth> I currently just move Wesnoth to a monitor and maximize Wesnoth and if I do it at the wrong time it creates this strange bug where the mouse is unable to move past where the window was at some point of the resizing. I haven't reported it because I'd be surprised if it isn't reported yet and because it's probably just SDL 1 so no point fixing it for a few weeks just to replace it. 20150906 23:04:30< shadowm> It just only works correctly on the titlescreen, the lobby, and in-game while no other dialogs are visible, but that's a bug rather than an intentional limitation. 20150906 23:04:56< aeth> right, if I do it when it's loading rather than on the titlescreen the above bug happens so you probably know about it 20150906 23:04:59< shadowm> It's also not a SDL bug. 20150906 23:05:24< aeth> well, it is a limitation in SDL 20150906 23:05:31< shadowm> It's not a limitation in SDL. 20150906 23:07:04< fabi> gfgtdf: Bisecting blaims 7df9c043d09f0656d99330d1db92cbe4848646ba is the first bad commit 20150906 23:07:07< shadowm> It's a limitation in how we approach event management in some contexts, where we may ignore some or all SDL events (often by virtue of not asking SDL about events at all). 20150906 23:07:32< shadowm> For example, the loading screen does not handle events at all. It does not have an event loop of any sort and it's instead polled by other code like the WML parser and preprocessor. 20150906 23:08:15< shadowm> GUI1 dialogs handle events but do not handle window resize events. 20150906 23:08:51< shadowm> GUI2 dialogs handle events including window resize events, but can't propagate them to non-GUI2 stuff like the themable UI (resulting in interesting glitches when the objectives dialog or [message] dialog are displayed). 20150906 23:09:14< shadowm> Or can propagate them but can't deal with non-GUI2 stuff trying to redraw itself while GUI2 is running. 20150906 23:10:27< shadowm> The story screen is more or less a GUI1 dialog by another name so it doesn't handle window resize events either. 20150906 23:11:07< shadowm> The GUI1 lobby handles window resize events but calling it a GUI1 dialog would be an oversimplification. 20150906 23:11:14< shadowm> Etcetera. 20150906 23:11:28< shadowm> So again, not SDL, just Wesnoth. 20150906 23:12:07< shadowm> And in any case, if you are in a game odds are you will be looking at the game board without a running dialog 98% of the time, which is relatively bugfree with regards to window resize event handling. 20150906 23:12:24< shadowm> The one exception being the button overlays used for the minimap controls. 20150906 23:12:39< shadowm> Those are special because someone hastily hacked them on top of a broken framework. 20150906 23:12:53-!- Shackra_ [~Jorge@186.177.2.148] has quit [Remote host closed the connection] 20150906 23:13:30< shadowm> Figuring out how to unravel the arcane mess sitting behind them is on my to-do list. 20150906 23:14:04< aeth> shadowm: except I get the bug more often than not because I do most resizing right at the start of Wesnoth because I keep forgetting about it and keep treating it like every other window that I want to move from the wrong monitor to the right monitor when it keeps popping up on the wrong monitor at startup 20150906 23:14:29< shadowm> That more or less goes hand-in-hand with figuring out how to decouple the themable UI implementation from the general game display class. 20150906 23:14:53< aeth> The process of clicking and dragging it from one monitor to another apparently makes it change resolution twice, because KDE thinks it's a great idea to make it smaller until I snap it to the top of the screen to re-maximize it 20150906 23:14:59< shadowm> As well as trim down the number of redraw entry points that exist. 20150906 23:15:23< shadowm> (Since some of them do everything, others don't do everything, and others do unexpected things, and all of them are undocumented.) 20150906 23:17:04< aeth> It kind of sounds like Wesnoth took every single wrong design decision when it came to writing a modular game design, although I guess C++ isn't the most modular language out there. 20150906 23:17:21< shadowm> It is very modular. 20150906 23:17:43< shadowm> A cursory glance at GUI2 will reveal exactly how you can go wrong in the opposite direction. 20150906 23:18:54< aeth> GUI2 is bad in part because WML is a bad language, and it probably couldn't have been that much better because it's pre-Lua. 20150906 23:19:29< shadowm> It's too easy to blame the language if you take an strictly academic approach to things, but a more pragmatic approach will reveal that it's all a workflow issue. 20150906 23:20:00< shadowm> Sometimes people come up with grandiose ideas with unrealistic goals and timeframes. 20150906 23:20:11< aeth> There's nothing pragmatic about writing your own programming language. Especially in XML-like syntax. 20150906 23:20:17< shadowm> People who have a job and thus can't dedicate energy to Wesnoth 24/7. 20150906 23:20:47< aeth> Pragmatic is using a library, not the giant NIH of WML. 20150906 23:20:51< shadowm> The result is that some things stall while they are busy tinkering with their code, deadlines approach, and horrible hacks are adopted in order to speed up the development process. 20150906 23:21:07< shadowm> The thing is that horrible hacks work. 20150906 23:21:14< shadowm> They work for a stable series. 20150906 23:21:22< shadowm> They just do not work for a development series. 20150906 23:21:49< shadowm> Come the next development series, no-one undoes the horrible hacks, so they pile up infinitely while everyone tries to carry on with their own things. 20150906 23:22:20< shadowm> Four years later, the horrible hacks have become lovecraftian horrors that no-one can possibly understand or replace with cleaner future-proof code. 20150906 23:22:24< aeth> Horrible hacks work when the game's written on an engine, not directly on SDL, and when most of the game code's thrown away every few years for a sequel. 20150906 23:22:43< shadowm> So what happens next? 20150906 23:22:44< aeth> Horrible hacks don't even work in the short run, you just haven't found all the bugs at that point. 20150906 23:22:50< shadowm> 1) The people in charge of those hacks quit 20150906 23:23:00< shadowm> 2) The people who are not in charge of those hacks get to deal with the consequences 20150906 23:23:21< shadowm> And thus begins the endless cycle of code write/rewrite that plagues OSS development. 20150906 23:24:06< aeth> That's why you write small functions that don't have side effects where possible. And hope the compiler's smart enough to inline them. 20150906 23:24:29< aeth> That way when (not if) you rewrite you can do one of those functions at a time. 20150906 23:24:49< shadowm> But back to the subject of GUI2, I'd say GUI2 is the best example we have of real world code vs. elegance on paper. 20150906 23:25:08< shadowm> GUI2 is modular to a fault and a lot of things can be theoretically swapped or reimplemented without affecting the rest. 20150906 23:25:16< aeth> GUI2 isn't elegance on paper. Elegance is being concise. GUI2 requires tons of WML. 20150906 23:25:21< shadowm> It uses templates extensively. 20150906 23:25:32< shadowm> As well as multiple inheritance. 20150906 23:25:35< aeth> GUI2 might have an elegant implementation (idk) but the interface isn't. 20150906 23:25:47< shadowm> I could see it being the dream of C++ teachers. 20150906 23:25:56< shadowm> But guess what, real world code doesn't work that way. 20150906 23:26:18< shadowm> Just try to break at any point during the GUI2 pipeline, get a backtrace, and you'll see why. 20150906 23:26:19< fabi> aeth: The problem is that gui2 just uses wml like other gui systems use xml. But those gui system come with a ide for clicking the layout together. 20150906 23:26:58< fabi> aeth: But neither xml nor gui2 wml are really user writeable languages. 20150906 23:27:00< shadowm> And then there's the matter that nobody can really understand how it works or keep track of the infinite layers of abstraction present in it. 20150906 23:27:38< shadowm> So, very pretty design, very academic, but it's not usable in the real world. 20150906 23:28:17< shadowm> It's very fortunate that the author had at least some measures in place to make it compatible with SDL 2. 20150906 23:28:34< shadowm> Otherwise we'd have to be looking at replacing it with something else right now. 20150906 23:29:58< aeth> shadowm: But it's not a pretty design, at least in the interface to it. 20150906 23:30:02< shadowm> Also, I'm sorry to say, but GUI2 was not designed to be used by WML/Lua, so any arguments about its API are irrelevant. 20150906 23:30:36< aeth> If it were academic it would have half-reinvented Haskell or whatever is/was trendy. :-p 20150906 23:30:54< shadowm> The author himself said that he did not want it used by WML/Lua until its *implementation* was stable enough to come up with a stable API. 20150906 23:31:13< shadowm> People didn't listen, so here we are, using half-unsupported crap in our own add-ons. 20150906 23:31:25< aeth> oh, so maybe the author didn't have time to half-reinvent Haskell then 20150906 23:31:43< shadowm> One of the clauses of the contract here is that we don't get to complain about it because it's our choice. 20150906 23:32:06< shadowm> It's like when you wilfully ignore medical advice from a trained professional. 20150906 23:32:21< shadowm> If you injure yourself then it's not really your doctor's fault. 20150906 23:33:26< shadowm> I'm perfectly fine with this, of course, after all I understand that by doing this I get to partake in the task of keeping the unsupported crap on life support. Boo hoo. 20150906 23:33:56< aeth> Hmm, wow, it's worse than I thought then. 20150906 23:34:07< shadowm> (The unsupported crap is not GUI2, it's the Lua GUI2 API.) 20150906 23:34:10< aeth> Now even if you fix everything, you still have to keep a lot of extra crap in to support add-ons. 20150906 23:34:24< aeth> At least for a few years 20150906 23:41:42-!- gfgtdf [~chatzilla@f054153079.adsl.alicedsl.de] has joined #wesnoth-dev 20150906 23:41:52< gfgtdf> fabi: what's bad about that commit ? 20150906 23:43:11< fabi> gfgtdf: As I already told you, it is causing the "Choice entry point" gui widget to vanish. 20150906 23:48:47< irker480> wesnoth: gfgtdf wesnoth:master 8a70775cb384 / src/game_initialization/configure_engine.cpp: attempt to fix mp entry point selection http://git.io/vZUgi 20150906 23:48:54< gfgtdf> fabi: try that ^ 20150906 23:49:04< fabi> gfgtdf: Thank you very much :-) 20150906 23:51:28< gfgtdf> fabi: please tell me if it works 20150906 23:52:11< fabi> gfgtdf: Still compiling... 20150906 23:53:18< gfgtdf> ok --- Log closed Mon Sep 07 00:00:00 2015