--- Log opened Sun Oct 09 00:00:59 2016 20161009 00:01:08< gfgtdf> zookeeper: ok i'll commit that then 20161009 00:01:57< tad_> nononononono just NO!!! This is so wrong. I put in a replacement strcoll for the linker and it worked (yea!) and I checked the help and it's sorting all wrong. 20161009 00:02:08< vultraz> P_P 20161009 00:02:30< vultraz> how wrong? 20161009 00:03:13< tad_> This is fine, how it should be: strcoll("feeding","ambush") 20161009 00:03:29-!- gfgtdf_ [~chatzilla@x4e3637fb.dyn.telefonica.de] has joined #wesnoth-dev 20161009 00:03:38< tad_> But this is not right: strcoll("text='Wose' dst='unit_Wose'","text='Troll' dst='unit_Troll'") 20161009 00:04:15< tad_> Sure it sorta sorts but it's sorting the wrong things entirely. 20161009 00:04:32-!- irker745 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161009 00:04:32< irker745> wesnoth: gfgtdf wesnoth:master c2dd4c93d8b4 / src/game_initialization/singleplayer.cpp: attempt to fix crash when starting a sp game https://github.com/wesnoth/wesnoth/commit/c2dd4c93d8b4880559b4c9d2702639287fec8b1a 20161009 00:04:32< vultraz> is not s/strcoll/translation::compare the right thing to do? 20161009 00:04:35-!- gfgtdf__ [~chatzilla@x4e3637fb.dyn.telefonica.de] has joined #wesnoth-dev 20161009 00:04:57< tad_> Well, it works better when you're using the proper keys. 20161009 00:05:11< vultraz> because I just tested that in help and it works 20161009 00:05:25-!- gfgtdf [~chatzilla@x4e3637fb.dyn.telefonica.de] has quit [Ping timeout: 248 seconds] 20161009 00:05:30-!- gfgtdf__ is now known as gfgtdf 20161009 00:05:39< vultraz> that is, replacing "strcoll" with "translation::compare" and changing nothing else. 20161009 00:06:20< tad_> vultraz, No issue with your change: it's the right thing to do. But whereever these strings it's sorting are coming from it needs to choose better strings. 20161009 00:06:42< vultraz> heh 20161009 00:06:56< vultraz> this is some of the shittiest code in the source tree, don't expect anything great 20161009 00:07:55< tad_> What would happen if I changed the wode to dst= THEN text= ??? suddenly Wose is before Troll. 20161009 00:08:24-!- gfgtdf_ [~chatzilla@x4e3637fb.dyn.telefonica.de] has quit [Ping timeout: 260 seconds] 20161009 00:08:29< vultraz> heh 20161009 00:08:33< vultraz> honestly 20161009 00:08:43< vultraz> just do the strcoll replacement and forget about it 20161009 00:08:52< vultraz> the entire help code is slated for rewrite 20161009 00:09:30< vultraz> you should only pay it the bare minimum attention 20161009 00:09:37-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20161009 00:10:27< vultraz> don't waste effort tracking down the source of this problem in that mess 20161009 00:12:04< tad_> Right now my replacement function is slimily/hackily appended to the lua exception thing. I'm going to put it up for consideration in a bit, but I need to check that doing it "The Android Way" works correctly on Windoze. And I really should make it a standalone source file and library instead of hacking it into our Lua static library. 20161009 00:14:02< tad_> And I hope some release manager, some day, makes the Help subsystem a priority because it definitely is a mess. 20161009 00:14:43< vultraz> For all the flack I give GUI2, at it's core it's rather solidly designed. 20161009 00:14:58< vultraz> It suffers from lack of functionality, true, and the fact that it was never truly finished. 20161009 00:15:35< tad_> Sure, if you don't code-read the SDL libraries. They're Scary with a capital S. 20161009 00:15:53< vultraz> There are two absolute messes in wesnoth, IMO: ThemeWML, and the Help source + syntax. 20161009 00:16:50< vultraz> Both, I am convinced, were designed by someone who wanted to emulate CSS but not add a CSS parser. 20161009 00:17:59< tad_> Same could be said about WML. It's a markup language wanting something to mark up. But it's what we have and it's not changing. 20161009 00:18:01-!- mjs-de [~mjs-de@x4db5d908.dyn.telefonica.de] has quit [Remote host closed the connection] 20161009 00:18:29< vultraz> WML is absolutely fine as a data language 20161009 00:18:32< vultraz> not a scripting one :P 20161009 00:20:35< tad_> What we need is a Lua-style scripting language (so there's only one syntax to learn) and the ability to compile it to WML, and 'uncompile' WML to it ... but that's a huge project and far into the future. 20161009 00:21:13< gfgtdf> tad_: you mean lua or just soemthing like lua ? 20161009 00:22:19< tad_> I mean something 'like' Lua .. most of the syntax the same but added constructs for events and supporting things like campaigns, units, etc. 20161009 00:22:34< vultraz> fabi made such a thing 20161009 00:22:45< vultraz> but it doesn't rally have widespread support. 20161009 00:23:37< tad_> I know. I looked at it. What I saw was a good starting point but it was immediately obvious it would never 'sell' .. way too much work getting from here to there. 20161009 00:26:31< tad_> We have a huge WML code base, especially if you include the UMC. And we can't abandon it. Also we'll have push-back from the WML authors who've spent a lot of time learning WML and won't like having to toss it and start the learning curve all over again. Hence the requirement that it be able to uncompile WML to whatever the new language is. 20161009 00:27:04< vultraz> https://github.com/cbeck88/libwml might be useful in the future 20161009 00:28:39< vultraz> the ability to crosscompile between FFL and WML might be a good selling point. 20161009 00:29:54< vultraz> but only as a compatibility layer, of course. 20161009 00:32:19< tad_> The first problem is to refactor WML out of the engine so it can be run side-by-side or replaced. And, right now, WML is so entwined even that is a huge problem. 20161009 00:33:39< tad_> Anyway .. I need to move my slimy hack over to the Windows side and check it works then make a send-up PR for discussion. 20161009 00:34:24< vultraz> I'm surprised you have a windows machine 20161009 00:34:51< tad_> I have EVERY windows machine from XP to 10(AE) 20161009 00:35:12< vultraz> o_O 20161009 00:35:19< vultraz> even.... Vista?? 20161009 00:35:28< tad_> Even Vista. 20161009 00:35:36 * vultraz runs screaming 20161009 00:36:52< tad_> The only one I can run, right now, is 10(AE) but the others are all on the 4T NAS where the wife can complain I'm eating up space she could use for images and PDFs. 20161009 00:37:20< vultraz> why can't she get her own multi-TB drives. 20161009 00:37:26< vultraz> they're cheap a'f. 20161009 00:38:28< tad_> Because I'm cheap. Besides, when I get a second it will be to mirror the first. So I'd need 4 if she and I each had one. 20161009 00:39:16< vultraz> (still, who needs multi-TB of space just for pics and pdfs) 20161009 00:39:27< vultraz> (just use cloud storage)\ 20161009 00:40:41< tad_> She tried that. It was a mess. Took me a week just to pull it from all her accounts to the single location. And it is a 'cloud' .. just you need my VPN keys to get to it from out there. 20161009 00:41:05< vultraz> Oh dear. 20161009 00:41:49< vultraz> You don't need drives, you need a server :P 20161009 00:44:51< vultraz> A big tower with RAID or something. 20161009 00:44:58< tad_> It is a server. Even has a full LAMP stack. But I just use it for the raw space. 20161009 00:45:19< vultraz> I see 20161009 00:45:22 * tad_ points back to prior comment about mirroring. 20161009 00:48:52-!- tad_carlucci [~Gregory@173.217.65.103] has joined #wesnoth-dev 20161009 00:49:05-!- tad_ [~tadcarluc@173.217.65.103] has quit [Quit: Leaving] 20161009 00:51:21-!- tad_carlucci is now known as tad_ 20161009 00:57:30< vultraz> I wonder what the benefit of boost::ptr_vector over std::vector * 20161009 00:58:33< tad_> Well, considering std::vector was spec'd and implemented from Boost, I'd say "it's a bit more up-to-date" 20161009 00:59:14< gfgtdf> vultraz: pre_Vector own the objects leik a std:vector> the advantage over std::vector> is that is has has the interface of a std::vector but stored the objects as pointers internally 20161009 01:00:13< gfgtdf> vultraz: so it can sometimes be used a drop in replacement for std::vector 20161009 01:01:46< gfgtdf> vultraz: unfortunateley last time i checked its was not really up do date maybe it didnt even have a move ctor. 20161009 01:02:54< vultraz> it's used in quite a few places in the source 20161009 01:03:00< vultraz> wonder if it's worth refcactoring 20161009 01:03:04< vultraz> refactoring 20161009 01:03:24< gfgtdf> vultraz: why would you want that ? 20161009 01:03:30< vultraz> idk 20161009 01:04:28< vultraz> i passed it over in the boost cleanup after 1.13.5. just wondering if it could/should be done. 20161009 01:06:16< vultraz> I'd preferably like us to only use boost where there's no stdlib or simple equivalent. 20161009 01:06:49< tad_> I'd suggest not do it as a goal but if you're refactoring someplace where it's used, you probably should refactoring Boost:: to std:: when appropriate. 20161009 01:08:05< vultraz> also seems someone left this comment in the editor code at some point: 20161009 01:08:08< vultraz> "//TODO: we should write our own ptr_vector class, boost::ptr_vector has a lot of flaws." 20161009 01:08:44< vultraz> dunno what flaws these would be 20161009 01:08:54< gfgtdf> vultraz: i think i wrote that comment 20161009 01:09:09< gfgtdf> vultraz: the most important flaw was iirc that it didnt ave a move ctor then 20161009 01:09:48< gfgtdf> vultraz: and that i got th eimporession that it was rather bad maintained, liek a multiple old but uncommented entried in th ebugtracker 20161009 01:09:54< vultraz> well perhaps it's worth changing to std::vector, then 20161009 01:12:10< tad_> There is that. Move semantics are a lot faster than copy semantics, especially if you're working with a large class with deep members. 20161009 01:15:40< irker745> wesnoth: doofus-01 wesnoth:master c7040d6bb0ca / data/core/ (18 files in 3 dirs): time of day variants for merfolk villages (coast.png) https://github.com/wesnoth/wesnoth/commit/c7040d6bb0cafb2af82cf3ebcd2bc71fbc764d69 20161009 01:16:19< tad_> vultraz, If you want to tag 1.13.6 in the next week or so, I'd think leaving that refactoring alone and working on cleanup might be a better idea. 20161009 01:16:34< vultraz> yeah, I'll deal with this post-1.13.6 20161009 01:18:30< gfgtdf> vultraz: well using std::vector inst also has disadvantages: 1) you usualyl don't have const vectors anymore since the stored pointers will be const but not the objects itself, 2) you'll need to write "(**it)." intead of just "it->" to access the objects, 3) even unique_ptr wont make sure that the stored value is not null, 4) using it might be slightly harder sicne uniuq_ptr... 20161009 01:18:32< gfgtdf> ...cannot be copyied. 20161009 01:19:27< vultraz> does it need to be a unique_ptr and not just T*? 20161009 01:19:28< tad_> So encapsulate and do operators for dereferencing. 20161009 01:20:17-!- gfgtdf_ [~chatzilla@x4e3637fb.dyn.telefonica.de] has joined #wesnoth-dev 20161009 01:21:07< tad_> I do wonder, however, how much faster and more robust things would be with more unique_ptr, less shared_ptr, and move instead of copy sematics. 20161009 01:23:04-!- gfgtdf [~chatzilla@x4e3637fb.dyn.telefonica.de] has quit [Ping timeout: 260 seconds] 20161009 01:25:04-!- gfgtdf_ [~chatzilla@x4e3637fb.dyn.telefonica.de] has quit [Ping timeout: 268 seconds] 20161009 01:50:17-!- tad_carlucci [~Gregory@173.217.65.103] has joined #wesnoth-dev 20161009 01:51:33-!- tad_ [~Gregory@173.217.65.103] has quit [Ping timeout: 248 seconds] 20161009 01:53:57-!- tad_carlucci [~Gregory@173.217.65.103] has left #wesnoth-dev [] 20161009 01:54:21-!- tad_ [~Gregory@173.217.65.103] has joined #wesnoth-dev 20161009 02:04:45< vultraz> tad_: any chance you can get the lua stuff wrapped by wednesday? 20161009 02:08:01< tad_> At this point I consider the PR I have up complete, pending comments or change requests. I continue to work on the Lua upgrade but think it will be for 1.13.6+dev. 20161009 02:08:34< vultraz> Ok 20161009 02:08:39< vultraz> Great 20161009 02:09:15< vultraz> ok, so we just need to deal with that pr, your two campaign ones, the flg dialog not showing in join, and any bug fixes we come across 20161009 02:09:32< vultraz> fixes to bugs* 20161009 02:09:34< tad_> That said, I am working on the strcmp issue and waiting for Windows to compile to test, then I will work in the exception jailbreak. The only other issue I want to explore before upgrading is an int cast vs static_cast 20161009 02:13:02< tad_> The cast issue would be solved by using the C compiler for our Lua library. And there are a couple other compiler options I will explore. At this point, though, it's looking good for a no-changes-needed upgrade. We'll see. 20161009 02:14:30< tad_> No. Rephrase that I'll be using C++ for the exceptions, it's compiler options I want to explore for the cast issue, and old-Lua compatibility. 20161009 02:18:25< tad_> vultraz, The strcmp/strcoll hack I'm working on will require fixing strcoll in help; which I think you checked on earlier. 20161009 02:18:59< vultraz> the translations function works as a drop-in, yes 20161009 02:19:19-!- travis-ci [~travis-ci@ec2-54-221-68-196.compute-1.amazonaws.com] has joined #wesnoth-dev 20161009 02:19:20< travis-ci> wesnoth/wesnoth#11386 (master - c7040d6 : doofus-01): The build has errored. 20161009 02:19:20< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/166136875 20161009 02:19:20-!- travis-ci [~travis-ci@ec2-54-221-68-196.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161009 02:19:51< tad_> vultraz, Your choice on that: merge it or have me add it to my 1.13.6+dev PR for what I'm working on. 20161009 02:20:07< vultraz> I'll commit it later 20161009 02:20:21< vultraz> busy with gui2 stuff right now 20161009 02:21:06< tad_> OK. From my view it's not important .. just so it goes in no later than this hack I'm working on right now. 20161009 02:22:32< vultraz> ah, wait, i can commit it now 20161009 02:23:01< tad_> OK .. someone save me having to dig for the answer .. where does stderr go when I run wesnoth on Windows? A file, or do I need a command-line option to do that? 20161009 02:23:31< vultraz> it goes to a file unless you use --wconsole 20161009 02:23:36< vultraz> in which case, a console 20161009 02:23:57< tad_> Where would I find the file? 20161009 02:24:32< irker745> wesnoth: Charles Dang wesnoth:master 9855f899a9d3 / src/help/help_impl.hpp: Use translation::compare instead of strcoll in help https://github.com/wesnoth/wesnoth/commit/9855f899a9d3b92634e9a6a617c8c00e247be95b 20161009 02:24:45< vultraz> userdata/logs 20161009 02:24:53< tad_> ty makes sense 20161009 02:32:00< celticminstrel> [Oct 08@8:28:39pm] vultraz: the ability to crosscompile between FFL and WML might be a good selling point. 20161009 02:32:01< celticminstrel> Uhh, what. No. That's practically impossible. FFL (like WFL) is a language with no side-effects. WML has side-effects everywhere. In fact it doesn't have much else besides side-effects. 20161009 02:45:48-!- VultCave [~chatzilla@124.109.10.167] has joined #wesnoth-dev 20161009 02:46:28-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 268 seconds] 20161009 02:46:53-!- VultCave is now known as vultraz 20161009 02:47:29-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20161009 02:47:29-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20161009 03:02:17-!- travis-ci [~travis-ci@ec2-54-92-182-16.compute-1.amazonaws.com] has joined #wesnoth-dev 20161009 03:02:18< travis-ci> wesnoth/wesnoth#11387 (master - 9855f89 : Charles Dang): The build passed. 20161009 03:02:18< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/166142060 20161009 03:02:18-!- travis-ci [~travis-ci@ec2-54-92-182-16.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161009 03:04:54< vultraz> I wonder if there's a race condition going on in mp join.. 20161009 03:04:59< vultraz> though that seems unlikely 20161009 03:05:12< vultraz> since the dialog opens fine without the flg dialog call 20161009 03:06:49< celticminstrel> I guess that means you didn't see my message. 20161009 03:07:17< vultraz> I saw you talk about FFL 20161009 03:08:01< vultraz> I don't really have anything to say in response 20161009 03:08:48-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161009 03:12:36< vultraz> is it bad to always use emplace when adding map members instead of []? 20161009 03:12:52< vultraz> (in a case where you want no duplicates) 20161009 03:14:11< celticminstrel> If you had duplicates you wouldn't be using a map in the first place. 20161009 03:15:07< celticminstrel> operator[] is great when you don't care about whether the element already existed in the map - you just want to set the current value for a key. 20161009 03:15:33< celticminstrel> emplace/insert is good for when you want to handle the case where the element was already there. 20161009 03:16:26< vultraz> what if you don't care either way 20161009 03:16:30< vultraz> is there any harm to using emplace 20161009 03:17:53< celticminstrel> If you don't care, it doesn't really make much of a difference whether you use emplace/insert or operator[], as far as I know. 20161009 03:22:12-!- shadowm [~ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20161009 03:23:07< shadowm> Hoo boy. 20161009 03:23:20< shadowm> The 1.12 add-ons server got hosed it seems. 20161009 03:25:16< shadowm> You know how it gets restarted close to midnight every day to prevent the fd leak from rendering it nonfunctional? 20161009 03:25:44< shadowm> Well, none of you do probably. 20161009 03:26:07< shadowm> Well, it appears to have quit while in the middle of writing the add-ons list to disk. 20161009 03:27:45< shadowm> The morale of the story here is: don't call any functions with side-effects from signal handlers, especially not exit(). 20161009 03:29:46< shadowm> So while I go to unpack a 80 GiB or something backup and find the last-known-good version of the add-ons list and compare changes, may someone remind me if socket fds persist across exec and if there's a way to prevent that if it's the case? 20161009 03:33:11< tad_> IIRC (been about 15 years) yes, and yes I believe there is an option or alternate C exec function which closes ALL fds. If not, it's easy enough to write one .. but there is probably one available already you can use if it's like a bash script. 20161009 03:33:31< shadowm> campaignd is a C++ program. 20161009 03:33:55< shadowm> I want to make it able to restart itself like wesnothd does so that we don't need to SIGTERM it every midnight-ish. 20161009 03:34:38< shadowm> Although, actually, now that I think of it, it doesn't matter that SIGTERM won't result in an instant quit. (Not that it was ever instant to begin with, duh.) 20161009 03:35:04< tad_> Oh that's a standard problem. You should be able to find a writeup on stackoverflow on how to fork/restart and not inherit the open fds. 20161009 03:35:13< shadowm> The wrapper script definitely has more patience than me and will know what to do even if it takes a million years for campaignd to exit. 20161009 03:36:37< tad_> NB if you want to keep stdin/out/err you have to dup() them and pass the duplicates to the fork(), IIRC (pretty sure I do) 20161009 03:36:40< shadowm> Note to self: patient died on 2016-10-07 23:55:00±5 sconds. 20161009 03:36:51< shadowm> UTC. 20161009 03:37:06< shadowm> The host with the backups annoyingly does not use UTC. 20161009 03:37:16< tad_> So 'midnight' sounds like a bit of clock drift, to boot. 20161009 03:37:42< shadowm> 55 23 * * * /usr/bin/skill campaignd-1.12 20161009 03:37:51< shadowm> It's working as intended. 20161009 03:37:57< tad_> Oh, good. 20161009 03:38:25< tad_> Always annoying when not only do you have to account for not-UTC but also have to figure out the drift. 20161009 03:38:30< shadowm> Oh good I came back just in time. 20161009 03:38:46< shadowm> Just another day and I'd have to restore from a week-older backup image. 20161009 03:38:53< shadowm> And a few more weeks and I'd not even have that. 20161009 03:39:45< shadowm> $ TZ=UTC bash 20161009 03:39:55< tad_> Then I'd suggest doing daily(x7) -> weekly (x4) -> monthly (x12) -> annual (forevr) for your generations. 20161009 03:41:24< shadowm> Yeah, we still have 1.4 TiB to spare, so might as well consider increasing the daily backlog. 20161009 03:43:41 * tad_ rolls back to the earlier discussion here about his local NAS and how big drives are cheap (spinners, at least) 20161009 03:43:47< shadowm> When I discover whether there's such an option in the first place. 20161009 03:46:00< tad_> The question about timezone is two-fold: why is the system clock not using UTC? and are you using NTP to correct your drift? 20161009 03:49:23< shadowm> Yes to the second. I have no idea to the first, I did not set this up; I'm pretty sure the correct answer is "admin's preference" anyway. 20161009 03:51:46< shadowm> It probably made a lot of sense at the time since I am the only admin who is not in CET/CEST and at the time I wasn't even really supposed to ever get access to this. 20161009 03:53:52< shadowm> But then budget cuts happened and voilà you got this maths-challenged clown to double-duty as server savior every time something breaks. 20161009 03:54:28< shadowm> Or every time you need to migrate a whole bunch of crap to a new host. Which so far has been once and I hope will never happen again. 20161009 03:55:17< tad_> Well, a long time ago in a galaxy far away, Tad found out the hard way that it's REAL HARD to match your logs to someone else's when tracking a hacker if you're using local time and they're using something else AND your clocks drifted. 20161009 03:55:48< shadowm> Don't worry, all application VMs use UTC because I was in charge of setting them up. 20161009 03:55:49< tad_> Trust me, one time with that headache and you learn: use UTC and NTP 20161009 03:57:35< tad_> We were able to match them up but the US Attorney declined to use my evidence because of the error. Luckily we were able to find others who didn't have the error. 20161009 03:59:29 * tad_ groans, fixes the type and waits for another interminable period while MSVC does its thing. 20161009 04:01:02< tad_> vultraz, So, do you think I can slip a #pragma using an undocumented feature of the Microsoft linker past gfgtdf? 20161009 04:01:49< shadowm> No undocumented features, please. 20161009 04:02:33< shadowm> The sole fact that they are undocumented (and thus subject to change at a moment's notice without warning) is a massive maintainability penalty. 20161009 04:03:03< tad_> This one has been there since V1.0 and if it ever went away the breakage would be epic. 20161009 04:03:53< tad_> I'm talking like film at 6 and isn't that 60 Minutes at the door epic. 20161009 04:04:38< shadowm> Same point still stands. 20161009 04:05:23< tad_> Don't know why they never documented it. Link option: /ALTERNATENAME:old=new they talk about it openly and recommend it for this use but it's not in the list on the page for linker options 20161009 04:06:00< shadowm> People abused Windows 9x's undocumented internal features for fun and profit (including writing malware) and then all their garbage broke the moment people upgraded to Windows XP. 20161009 04:06:29< shadowm> It may have taken like 7 years but it still happened. 20161009 04:06:35< tad_> #define garbage windows-source-code 20161009 04:07:43< shadowm> Meh, it's worthless to try to fix up the hosed add-ons list from the old one. 20161009 04:08:01< shadowm> HM. 20161009 04:08:20< shadowm> Or maybe not, actually. 20161009 04:09:01< tad_> Well, worst case you simply restore to the last known-good and apologize to those few who have to upload again. 20161009 04:09:06< shadowm> Okay no, the number of add-ons missing is larger than 10. 20161009 04:09:27< shadowm> Away it goes. 20161009 04:10:13< tad_> Blame it on a state sponsored hackers. That sells well this month. 20161009 04:10:20< celticminstrel> When you say "add-ons list" I'm thinking of something that's just a listing of all the add-ons present, implying no actual data loss in the add-ons themselves. Am I wrong? 20161009 04:10:35< shadowm> They are probably inconsistent, trust me. 20161009 04:11:04< shadowm> The older good entries might describe versions or dependencies or what have you that do not match what the packs contain. 20161009 04:11:25< shadowm> It's just too much work to fix it and I'm supposed to be the budget repairperson. 20161009 04:11:26< tad_> And I imagine you don't have a consistency checker for that 20161009 04:13:09< shadowm> ... 20161009 04:13:30< shadowm> Must... resist... urge... to do more than my salary of $0 requires... 20161009 04:14:21< shadowm> Oh screw it, I'll go find the inconsistent add-ons from the missing list tail. 20161009 04:18:37-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 240 seconds] 20161009 04:20:24< shadowm> Okay, who on earth doesn't want me to input ^ into this screen? 20161009 04:20:46< shadowm> I'm pretty sure this is something I've done before on this VM. 20161009 04:22:58< shadowm> I really want to write ^, you stupid piece of garbage. 20161009 04:23:05< shadowm> I can't even paste it. 20161009 04:24:06< shadowm> Fine, I'll use my other screen session then. 20161009 04:40:44< shadowm> Oh man, I never thought the redundant timestamps in both the add-ons list and the add-on packs would come in handy. 20161009 04:51:32< tad_> Every now and then I am reminded of Captain Kirk speaking the Ensign Saavik, "You have to learn why things work on a starship." 20161009 04:52:47< vultraz> always fun when you use twidow instead of twindow 20161009 04:54:10< shadowm> Okay, no entry-less add-ons, one add-on and a half to hand-fix for inconsistencies. 20161009 04:54:22< vultraz> oh my god my code actually works first try 20161009 04:55:52< vultraz> still needs work, though 20161009 04:56:09< vultraz> I really need to figure out this player_teams vs team_names bullshit in connect_engine 20161009 04:58:46< vultraz> ..I.. what? 20161009 04:58:56< vultraz> "// Note that the prefix "Team " is untranslatable, as team_name is not meant to be translated. This is needed so that the attribute is not interpreted as an int when reading from config, which causes bugs later." 20161009 04:59:01< vultraz> why would it ever be an int.. 20161009 04:59:21< shadowm> If it's a number. 20161009 04:59:34< vultraz> we have .str() 20161009 04:59:52< shadowm> But it's still stored as an int in memory if it looks like an int. 20161009 05:00:05< vultraz> I see 20161009 05:00:25< shadowm> e.g. "060" becomes 48 (I'll let you figure out why). 20161009 05:00:47< shadowm> I think eventually a solution was figured out but I'm not sure. If it's the case it may postdate the code you're reading anyway. 20161009 05:04:18< vultraz> I think I'm going to refactor this 20161009 05:04:22< vultraz> it's rather buggy anyway 20161009 05:04:50< vultraz> I guess I'll have to add new members since we cannot drop the GUI1 dialogs until after release. for some reason. 20161009 05:04:56< vultraz> (ok I know the reason but I don't like it) 20161009 05:05:02< tad_> #define refactor rewrite 20161009 05:06:14< vultraz> ok, let's understand this code... 20161009 05:06:32< vultraz> I think player_teams and team_names are *supposed* to always match in debug mode.. 20161009 05:07:20< vultraz> but in non-debug mode, they might not 20161009 05:07:45< vultraz> and side.team() is an index in team_names.. 20161009 05:09:25< vultraz> in no debug mode, side.team() might not match a valid index in player_teams.. 20161009 05:09:34< vultraz> i worked around a crash regarding that 20161009 05:09:40< vultraz> but i wonder if that might also cause problems later.. 20161009 05:10:43< vultraz> ok, setting that aside 20161009 05:10:56< vultraz> for my team tree nodes, I want to register than by team....name 20161009 05:10:57< vultraz> I guess 20161009 05:11:05< vultraz> right now using player_teams but that;s bad 20161009 05:11:32< vultraz> since that's supposedly translatable 20161009 05:13:04< vultraz> so firstly 20161009 05:13:18< vultraz> team_names and user_team_names should not be 2 vectors... 20161009 05:13:31< vultraz> thy should be a map 20161009 05:13:52< vultraz> or a vector of pairs 20161009 05:14:22< vultraz> now what about player_teams 20161009 05:14:58< shadowm> For the love of 20161009 05:15:59< vultraz> what? 20161009 05:19:17< vultraz> oh god this code is horrendous.... 20161009 05:19:55< shadowm> I think this is as good a time as any to backport the passphrase encryption code to 1.12. 20161009 05:20:38< vultraz> What's the simplest thing for me to do here.. 20161009 05:21:00< shadowm> This most definitely doesn't mean I destroyed someone's passphrase because it had invalid UTF-8 in it. 20161009 05:21:05< shadowm> /s 20161009 05:22:50< vultraz> too much god-damn reliance on STRINGS :| 20161009 05:23:21< vultraz> ya know what 20161009 05:23:47< vultraz> screw making this map string, tree_node 20161009 05:24:02< vultraz> let's use side_engine for everything 20161009 05:24:12< vultraz> though .. 20161009 05:24:21< shadowm> Okay, I think I can restart the 1.12 add-ons server now. 20161009 05:24:26< vultraz> yeah, that might be a problem for generating the team since we only want one 20161009 05:24:28< vultraz> wait 20161009 05:24:34< vultraz> we have emplace 20161009 05:24:48-!- irker745 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161009 05:24:49< vultraz> side engine has a team index to teams.. 20161009 05:25:03< vultraz> but wait that's a f9idfiojwfjeiojd STRING 20161009 05:25:28< shadowm> This is way more fun than what I intended to do tonight (not). 20161009 05:25:39< vultraz> ok, ok, ok 20161009 05:25:47< vultraz> how about we add a team_id member to the side engine 20161009 05:25:52< shadowm> I'm doing a backup of the 1.12 server just in case and it's taking ages. 20161009 05:25:57< vultraz> not a fucking index 20161009 05:26:04< vultraz> (sorry) 20161009 05:26:17< vultraz> take it from team_name... 20161009 05:26:24< vultraz> except team_name has the bloody prefix.. 20161009 05:26:31< vultraz> shouldn't matter 20161009 05:26:39< vultraz> ok.. 20161009 05:26:59< shadowm> Okay, so first course of action: act on signals in the process loop, not in the signal handlers. 20161009 05:26:59< vultraz> so we iterate over... 20161009 05:27:18< shadowm> Okay, no, that goes second, otherwise the backport series will probably conflict horribly. 20161009 05:27:44< vultraz> gah, no, we DO need two maps.. 20161009 05:27:59< vultraz> ok it should work as long as we have a team name 20161009 05:28:00< shadowm> Hopefully sorting this out won't take me longer than a couple of hours, so the server can run in the meantime without worrying about data lossage. 20161009 05:28:19< shadowm> Oh, look, 3.6 GiB. No wonder. 20161009 05:28:49< shadowm> Stupid current-gen add-on creators and their obsession with big resource files. 20161009 05:28:50< vultraz> I'm going to do the minimum amount of work to get this working for now 20161009 05:28:58< vultraz> and then after the release take a bazooka to ir 20161009 05:29:02< vultraz> it* 20161009 05:29:06< vultraz> where it = the connect_engine class 20161009 05:29:30 * shadowm crosses fingers. 20161009 05:30:16< shadowm> IT LIVES 20161009 05:30:27< vultraz> wait, do we need a separate thing? 20161009 05:30:50< shadowm> vultraz: Do I make an announcement in Website or a News post? 20161009 05:31:12< vultraz> shadowm: regarding? 20161009 05:31:48< vultraz> if it's to say the 1.12 addons server has been fixed, Twitter and Front Page. 20161009 05:31:53< shadowm> Regarding the monkeys that shived our previous RM to death. 20161009 05:32:05< shadowm> Yes, obviously it's regarding the thing I've been ranting about nonstop for the past two hours. 20161009 05:32:28< shadowm> That means News post. 20161009 05:32:38< vultraz> And Twitter. 20161009 05:32:42< shadowm> You are aware that nothing was actually lost, right? 20161009 05:32:59< vultraz> And? 20161009 05:33:03< shadowm> The only thing that could be said to have been 'lost' is over a day of uptime that was actually downtime. 20161009 05:33:13< shadowm> And you still think this merits a News post? 20161009 05:33:27< vultraz> Ah, well if nothing was lost, then simply Twitter. 20161009 05:33:36< shadowm> I'll post the announcement in Website then. 20161009 05:33:41< shadowm> Stop telling me about Twitter. 20161009 05:34:17< shadowm> You of all people should know the first thing I did was to post to Twitter as soon as I became aware of the situation and found out what went wrong. 20161009 05:35:13< vultraz> I don't have twitter open right now. 20161009 05:35:19< shadowm> You have #wesnoth. 20161009 05:35:45< vultraz> I rarely read #wesnoth 20161009 05:36:06< shadowm> Okay, community guy, good to know you ignore part of the community then. :p 20161009 05:36:30< tad_> shadowm, It was discussed on the forums. At least post a followup there. I'd think a carfully worded news posting might be in order. 20161009 05:36:42< shadowm> I said I'm going to post it in Website. 20161009 05:37:10< shadowm> Website the forum of the forum board, not Website the wesnoth.org website without a definite article. 20161009 05:37:47< tad_> Oops. I'm lost in all the ways to skin cats. I **will** conquer this. It's a program and it *WILL* do what I tell it! 20161009 05:48:35< vultraz> I wonder if there's a way to move nodes 20161009 05:48:52< tad_> Huh? 20161009 05:49:21< vultraz> in a tree view 20161009 05:50:28< vultraz> let me try setting the parent node 20161009 05:51:36< vultraz> I'd be quite surprised if that worked, though 20161009 05:52:12-!- Nobun [~nobun@5.170.109.97] has joined #wesnoth-dev 20161009 05:53:01< shadowm> Status is all green again. :) 20161009 05:53:46< vultraz> for some reason the 'post to facebook' thing isn't automatically happening anymore 20161009 05:54:09< vultraz> or was that manaul 20161009 05:55:06< tad_> No insert_after method for your tree view? Something where you tell it an index to insert at? 20161009 05:55:26< vultraz> uh... 20161009 05:55:28< vultraz> what? 20161009 05:56:52< vultraz> child nodes have parent nodes. I was hoping to move a child from a parent to another without removing/adding and recreating the contents 20161009 05:57:12< vultraz> since that could invalidate pointers 20161009 05:57:23< vultraz> actually WOULD invalidate pointers 20161009 05:57:33< tad_> Thinking in terms of how I've seen it other places. Remove the node and insert elsewhere. Just be sure to hold a ref and it should work. 20161009 05:58:47 * shadowm kicks vultraz. 20161009 05:58:50< tad_> OK. It's a stubborn cat. In the scons and cmake systems can I add -Dsymbol for a specific source file? 20161009 05:58:59< vultraz> ah, good idea, tad 20161009 05:59:01< shadowm> Commit 4f7ae24d1b6ebada6635de41587e3079785b6ed0 "Cleaned up a few useless typedefs I noticed". 20161009 05:59:18< shadowm> Yes, they were superfluous, but not really useless. 20161009 05:59:50< vultraz> So was said at the time. 20161009 06:00:02< shadowm> The possibility of using a different type and format wasn't out of the question at the time. 20161009 06:02:12< vultraz> So was said at the time. 20161009 06:02:30< shadowm> What? 20161009 06:03:04< vultraz> I was told exactly that after that commit. 20161009 06:04:01< shadowm> By someone other than me I hope. 20161009 06:05:24< shadowm> Uuuuuuugh. 20161009 06:05:48< vultraz> celticminstrel 20161009 06:06:13< celticminstrel> Do you have a question for me or are you just answering shadowm's question. 20161009 06:06:16< vultraz> latter 20161009 06:08:04< shadowm> UGH. 20161009 06:08:37< shadowm> Somehow I missed a patch in a backport series from over a year ago. 20161009 06:08:47-!- JyrkiVesterinen [~JyrkiVest@87-100-214-197.bb.dnainternet.fi] has joined #wesnoth-dev 20161009 06:11:46< vultraz> aw, crash 20161009 06:15:59< vultraz> ok, so, it's something in my implementation of 'add this node instead of creating a new one' 20161009 06:17:07< vultraz> le runtime error! 20161009 06:18:49< tad_> YEAH I now have a bloody, skinless cat! Now to apply bandages to my fingers and clean up this pile of fur. 20161009 06:19:05< vultraz> uh.... 20161009 06:19:12< vultraz> this metaphor is getting weird.. 20161009 06:19:37< Nobun> loonycyborg: if you are online: on PR #811. I fixed the bug you discovered on wmlxgettext and now I am adding a new commit in the pull request. It will be uploaded within some minutes 20161009 06:20:26< shadowm> Yeah I don't like that metaphor at all. 20161009 06:20:53< tad_> Nor does my cat. 20161009 06:20:57< vultraz> Please use another :| 20161009 06:21:39< tad_> OK. How about this: I used the 10# sledge hammer and turned that darned cookie into DUST! 20161009 06:22:29< vultraz> hmm 20161009 06:22:37< vultraz> ok, not... sure how to deal with this 20161009 06:22:45< shadowm> I should've used scons fast=yes when I had the chance. 20161009 06:23:12< vultraz> it's likely crashing because the pointer becomes invalidated 20161009 06:23:25< vultraz> but where 20161009 06:24:05< tad_> which? the one you're holding for the node you're moving or one it has inside? 20161009 06:25:27< vultraz> hmmm 20161009 06:25:39< vultraz> ok, so if i run the debugger instead i get an assertion.. 20161009 06:26:01< shadowm> Oh, cool, you got one of those cute little bugs. 20161009 06:26:25< shadowm> You might want to fetch some pizza and a cup of tea before continue. 20161009 06:26:29< shadowm> continuing. 20161009 06:26:50< vultraz> let's comment out that assertion.. 20161009 06:27:24< vultraz> hmm 20161009 06:27:33< vultraz> #0 0x9532b2 gui2::ttree_view_node::add_child(gui2::ttree_view_node*, int) () (??:??) 20161009 06:27:38< vultraz> so IS the pointer invalid...? 20161009 06:28:04< vultraz> let's see.. 20161009 06:28:18< shadowm> You don't have full debug symbols? 20161009 06:28:41< vultraz> no, release build because i cannot stand 2 minutes of linking time 20161009 06:30:28< vultraz> actually, I can see some potential problems will taking a pointer straight.. 20161009 06:30:40< vultraz> for example, it will point to an invalid parent node.. 20161009 06:31:18< vultraz> yeah, I can't see a good way to do this.. 20161009 06:31:27-!- irker678 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161009 06:31:27< irker678> wesnoth: Ignacio R. Morelle wesnoth:1.12 a982bbdb3632 / src/campaign_server/campaign_server.cpp: campaignd: Fix unused variable warning on Windows https://github.com/wesnoth/wesnoth/commit/a982bbdb363230e864e8437412facc1c7c7562de 20161009 06:31:27< irker678> wesnoth: Ignacio R. Morelle wesnoth:1.12 28b3e384a64d / src/campaign_server/campaign_server.cpp: campaignd: Don't try to use a monotonic clock on Windows https://github.com/wesnoth/wesnoth/commit/28b3e384a64dc9ade922877dc9811bcfb6a2af3e 20161009 06:31:28< irker678> wesnoth: Ignacio R. Morelle wesnoth:1.12 62c2890f8feb / src/campaign_server/ (campaign_server.cpp campaign_server.hpp): campaignd: Refactor [campaign] searches into a get_campaign() method https://github.com/wesnoth/wesnoth/commit/62c2890f8feb57189ba533268fe73807b0f6d33e 20161009 06:31:30< irker678> wesnoth: John Anthony wesnoth:1.12 265bd66ed926 / data/core/about.cfg src/campaign_server/campaign_server.cpp: Added password hashing to campaignd https://github.com/wesnoth/wesnoth/commit/265bd66ed92696083dd52d471dc90ef5398a5f3b 20161009 06:31:32< irker678> wesnoth: Ignacio R. Morelle wesnoth:1.12 56a14943cb7a / src/campaign_server/campaign_server.cpp: campaignd: Record the hashed passphrase for new uploads https://github.com/wesnoth/wesnoth/commit/56a14943cb7a85dce5b3fc3d4235880722e2bb6f 20161009 06:32:11< vultraz> I guess I should go with the simple solution 20161009 06:32:14< vultraz> and regenerate the node 20161009 06:32:23< vultraz> was hoping not to 20161009 06:32:27< vultraz> but oh well 20161009 06:34:28< vultraz> important to get it working 20161009 06:34:34< vultraz> then can look into implementing node moves 20161009 06:34:44< shadowm> loonycyborg: Where exactly does campaignd set up signal handlers on master? 20161009 06:35:05< shadowm> Want to make sure master isn't repeating the mistake of assuming one of the exit triggers won't execute in the middle of a write operation. 20161009 06:36:17< shadowm> (Or any other operation that is interruptible by signals, period.) 20161009 06:36:55-!- Kwandulin [~Miranda@p200300760F2C714BF5E0557ABFBFC31D.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161009 06:40:37-!- Nobun [~nobun@5.170.109.97] has quit [Ping timeout: 240 seconds] 20161009 06:41:01< vultraz> need to fix the scroll wheel in trees 20161009 06:41:06< vultraz> doesn't work all the time for some reason 20161009 06:42:18< vultraz> likely the scroll event is being swallowed by child widgets and not heading to the dispatcher 20161009 06:47:16< vultraz> so apparently to_serialized causes the textdomain to appear 20161009 06:47:18< vultraz> wat 20161009 06:47:41< vultraz> is there from_serialized? 20161009 06:47:45< shadowm> For extra safety (SIGKILL) I should really make the config writes use a temporary that can be atomically renamed at the end. 20161009 06:47:47< vultraz> there is! 20161009 06:49:01< shadowm> Arguably could do that instead of flagging SIGTERM and SIGINT, but SIGTERM is supposed to request clean termination anyway, so... 20161009 06:49:09< shadowm> *be used for requesting 20161009 06:49:39< vultraz> why the user_team_name vector stores its string in serialized form.. 20161009 06:49:42< vultraz> I have no idea :| 20161009 06:49:48< vultraz> (what does that even do?) 20161009 06:52:07< tad_> shadowm, temp and rename is always a good idea. 20161009 06:54:47< vultraz> shadowm, celticminstrel, DeFender1031: https://drive.google.com/file/d/0B-mR9s8FduLLYXFVZGRlS0JGcm8/view?usp=sharing 20161009 06:55:57-!- Kwandulin [~Miranda@p200300760F2C714BF5E0557ABFBFC31D.dip0.t-ipconnect.de] has quit [Ping timeout: 240 seconds] 20161009 06:57:43< celticminstrel> vultraz: I think it'd be better if odd-numbered rows were coloured a bit differently. 20161009 06:58:09< irker678> wesnoth: Ignacio R. Morelle wesnoth:1.12 019e7a72c741 / src/campaign_server/campaign_server.cpp: campaignd: Only quit to SIGINT and SIGTERM after a processing cycle https://github.com/wesnoth/wesnoth/commit/019e7a72c741740650ea3930a6dfbfe50bde7c54 20161009 06:58:11< celticminstrel> Or if that's too hard, make each row's box a bit more defined. 20161009 06:58:43 * celticminstrel says "more", but it's not like it's defined even slightly at the moment, so it's really "more than nothing". 20161009 06:59:09< Aginor> shadowm: that's a good suggestion (make temp config while saving) as it'll also reduce risk of currupting the one file too 20161009 07:00:41-!- Nobun [~nobun@5.170.106.79] has joined #wesnoth-dev 20161009 07:02:16< vultraz> celticminstrel: I'll see what I can do 20161009 07:03:36< vultraz> celticminstrel: do you like the general idea, though? 20161009 07:03:38< vultraz> grouping by teams 20161009 07:03:39< shadowm> vultraz: Not a fan of the fact that this will go all weird the moment you switch someone's team. 20161009 07:03:51< vultraz> shadowm: "weird"? 20161009 07:04:02< celticminstrel> The idea of grouping by team? 20161009 07:04:08< vultraz> it moves an entry from one node group to the other 20161009 07:04:09< shadowm> For example, if you change side 9 to the SE team on that list, it'll (probably) disappear from the view. 20161009 07:04:27< shadowm> Obviously, it's now on the very bottom. You have to scroll to find out, though. 20161009 07:04:52< vultraz> I could scroll to make it visible 20161009 07:04:59-!- Nobun [~nobun@5.170.106.79] has quit [Client Quit] 20161009 07:05:18< shadowm> Maybe. 20161009 07:05:34< vultraz> celticminstrel: yes 20161009 07:05:36< shadowm> Also, that background. :p 20161009 07:05:48< vultraz> yeah, I don't really think it fits here 20161009 07:05:52< vultraz> it fits in Create 20161009 07:05:53< vultraz> but not here 20161009 07:05:56< vultraz> and IDK why 20161009 07:06:23< shadowm> Because the very concept of having these backgrounds comes very close to crossing into tryhard UI design student territory. 20161009 07:06:34< shadowm> But that's probably just me. 20161009 07:06:41< vultraz> I am aware. 20161009 07:07:04< vultraz> Setting that aside, do you at least think grouping by teams is worthwhile. 20161009 07:07:44< shadowm> "Look at me, I'm a pretty user interface. Maybe I have some functionality. Maybe not. Who cares. It's all in the looks. Wink, wink." 20161009 07:07:56< shadowm> Sorry. :p 20161009 07:08:55< shadowm> I think the grouping thing might be slightly confusing to users old and new, and also reaaaally hard to implement right, codeways. 20161009 07:09:13< shadowm> Maybe I'm underestimating the newbs' intelligence, though. 20161009 07:09:23< vultraz> As I said earlier to tad, I've been trying to emulate dota's tasteful use of art in background pieces, but I am unable due to the sheer lack of art. Then again, dota's main background is dynamic noise and not a picture and pictures are used sparingly is small doses. 20161009 07:09:44< shadowm> This goes hand-in-hand with my constant rants about computer interfaces design in the mid-2010s. 20161009 07:09:53< vultraz> shadowm: it's a UI thing only and has no effect on the internal implementation. 20161009 07:10:28< vultraz> I have it working 20161009 07:10:30< shadowm> You just implicitly acknowledged some effort being involved in making it scroll back to the entry that just got thrown around somewhere else. 20161009 07:10:51< vultraz> Just need to make it insert in the right order... 20161009 07:10:52< shadowm> And how complicated is the current working version already? Compared to if there wasn't such grouping. 20161009 07:10:57< vultraz> ie, it should always be grouped by side number. 20161009 07:11:11< tad_> Hey, never underestimate the ways people can misunderstand your pretty user interface. 20161009 07:11:14< vultraz> shadowm: there's very little extra overhead, actually. 20161009 07:11:17< shadowm> But ultimately I don't have much of an opinion since I'm not one of the crazy MP people. 20161009 07:11:50< vultraz> maybe ~40 extra lines of code so far 20161009 07:11:54< shadowm> I'm not among those who will come to your front door wielding torches and pitchforks if they find out that over the oldstable→stable transition things stopped making sense for their mushy brains. 20161009 07:12:30< shadowm> (The implication here being that they do not play development releases. Ever.) 20161009 07:12:48-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20161009 07:13:09< vultraz> If there are such people they will already hate me 20161009 07:13:24< vultraz> Since 1.13 changes 90% of the UI. 20161009 07:13:50< shadowm> You've done a better job at polling this thing among users than those two at least. 20161009 07:14:45< shadowm> It could still use more exposure once 1.13.6 comes out, but since I gave up trying to crack the development feedback conundrum there's not much I can offer in that regard. 20161009 07:15:37< shadowm> At least this time around at least 5% of people will be like "duuuuuuuuuuuuude didnt you see the pictures on facebook several months ago you shouldve known this was going to change". 20161009 07:16:27< shadowm> And people got used to the superbright lobby background in 1.12 somehow so... who knows. 20161009 07:16:37< shadowm> *supercontrasty 20161009 07:17:58< shadowm> Ultimately, as I always say, you can't please everyone and there'll always be this vocal minority of detractors following your every step and hurling insults and produce at you. 20161009 07:19:12< shadowm> And hopefully this time around people will be better aware that the solution to that isn't to let them do as they want. 20161009 07:19:44< shadowm> I believe I was trying to make a point several pages above but I forgot what it was. 20161009 07:19:45-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 244 seconds] 20161009 07:19:54< shadowm> Or you can do that, okay. 20161009 07:20:05< tad_> There is always the Preferences route. If they don't like the pretty pictures give them a box to check to have a nice, black background. 20161009 07:20:06 * shadowm goes back to campaignd. 20161009 07:21:44< shadowm> We should never ever offer options for inane cosmetic crap again. "Reverse ToD images" outstayed its welcome before. 20161009 07:22:26< shadowm> When you let that kind of thing in, it becomes something of a slippery slope and suddenly everyone wants their own "Reverse ToD images" option. 20161009 07:23:23< shadowm> And if the devs become too lenient, you'll end up with a thousand options that create an extra maintenance burden and add nothing to the game's quality. 20161009 07:24:06< shadowm> The animation options are the big exception here since they can be legitimately distracting. 20161009 07:24:55< shadowm> And the orb colors are supposed to... serve users in some way since we can't hire a professional to help us make predefined sets tailored to different forms of color vision defficiency. 20161009 07:26:56< tad_> I will admit the Preferences dialogs are way too full already. 20161009 07:28:07< tad_> One solution is to have a configuration file with ALL the options and only present the ones which actually make sense in the UI. If someone wants to do something like change the background or reverse the ToD images, they can hand-edit their configuration file. 20161009 07:28:52< shadowm> What is this, more unused crap? Away it goes! 20161009 07:29:24< shadowm> (Especially during refactoring.) 20161009 07:31:51< JyrkiVesterinen> tad_: As a user, I like when programs have UI to change as many preferences as possible. Like KDE Applications do, for example. 20161009 07:32:14< JyrkiVesterinen> I will oppose a "move preferences to configuration file" idea if someone suggests it. 20161009 07:32:58< shadowm> This is a game, not a desktop environment. 20161009 07:33:46< JyrkiVesterinen> My preferences aren't exactly different in games. :P 20161009 07:33:55< shadowm> You'll be hard-pressed to find any games that allow you to customize entirely inconsequential things like whether a specific screen (that you see less than 1% of the time) has a background or not. 20161009 07:40:25< shadowm> Okay, deployed the campaignd updates. 20161009 07:40:38< shadowm> I'll keep working on the atomic write guard later. 20161009 07:50:02-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20161009 07:59:50< irker678> wesnoth: Jyrki Vesterinen wesnoth:master 41a49f74ac1f / src/gui/widgets/listbox.cpp: Make listboxes scroll to the initially selected item again https://github.com/wesnoth/wesnoth/commit/41a49f74ac1f621bd5243c96e89a72f360751839 20161009 08:03:38< tad_> JyrkiVesterinen, Then have a dual Preferences. Check Advanced Preferences and everything is there for the masochists like we Unix geeks and uncheck it for Windows users who like to be coddled. 20161009 08:04:07< JyrkiVesterinen> I primarily use Windows. 20161009 08:05:03< tad_> Yet you like KDE. Somehow the two concepts don't fit in my head. 20161009 08:05:28< JyrkiVesterinen> In general, I like having multiple options for everything. 20161009 08:05:45< JyrkiVesterinen> The reason why I use Windows is the huge number of Windows-only porgrams out there. 20161009 08:06:01< JyrkiVesterinen> For any task, I have a lot of programs to choose from. 20161009 08:06:30< JyrkiVesterinen> Same thing for preferences. Within each program, I want the ability to configure the program as much as possible. 20161009 08:06:58< JyrkiVesterinen> For example, I use the Vivaldi web browser. It offers way more options in its GUI than any other notable browser. 20161009 08:07:22< JyrkiVesterinen> (Firefox may beat it with about:config, but it doesn't count in my book.) 20161009 08:07:31< tad_> I used to say that but I've found that I wind up using the Windows ports of good open source programs from Linux. Sorta nice except when I get confused and can't find a project because I'm looking at Netbeans on Windows when the project is on Netbeans on Linux. 20161009 08:08:16-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20161009 08:08:33< JyrkiVesterinen> Hmm, that doesn't happen to me. For example, the IRC client I use right now is AdiIRC, which is Windows-only. 20161009 08:08:58< JyrkiVesterinen> (And, again, an important reason why I use AdiIRC is its massive amount of preferences.) 20161009 08:12:38< loonycyborg> shadowm: src/server/server_base.?pp 20161009 08:15:42< loonycyborg> that's in shared code between servers 20161009 08:16:07< loonycyborg> it uses asio's support for signal handling 20161009 08:21:20< loonycyborg> it dispatches a handler into asio's loop in response to a signal which works just like any other asio handler. 20161009 08:28:45-!- tad_carlucci [~tadcarluc@173.217.65.103] has joined #wesnoth-dev 20161009 08:28:48-!- tad_ [~Gregory@173.217.65.103] has quit [Quit: Leaving] 20161009 08:28:56-!- tad_carlucci is now known as tad_ 20161009 08:30:48-!- Kwandulin [~Miranda@p200300760F2C71D3F5E0557ABFBFC31D.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161009 08:31:27< loonycyborg> shadowm: I'm pretty sure it won't already have issue you fixed 20161009 08:31:55< loonycyborg> since it's single threaded atm only 1 asio handler can be executed at a time 20161009 08:32:58-!- VultCave [~chatzilla@124.109.10.167] has joined #wesnoth-dev 20161009 08:33:20-!- VultCave is now known as vultraz 20161009 08:36:56-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20161009 08:36:56-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20161009 08:37:10< vultraz> shadowm: power went out, sorry for vanishing 20161009 08:39:50< shadowm> loonycyborg: I still don't know Asio and I'd rather not read 1000 pages to find out what all that means... 20161009 08:40:23< shadowm> I am assuming that it executes the handlers in the original context* rather than in a POSIX signal handler. 20161009 08:41:06< loonycyborg> it doesn't do much in POSIX signal handler 20161009 08:41:16< shadowm> (* this isn't about single vs. multithreaded execution. This is about interrupting the execution of the program to run something else.) 20161009 08:41:21< loonycyborg> just adds a handler to even loop 20161009 08:42:12< loonycyborg> handler itself is executed outside of POSIX signal context 20161009 08:42:36< loonycyborg> as part of asio loop 20161009 08:42:52< loonycyborg> just like handlers for network operations 20161009 08:43:04< loonycyborg> and only 1 handler is processed at the time 20161009 08:43:40< loonycyborg> so all writes to disk are complete when server responds to signals 20161009 08:44:20< loonycyborg> because no config file writes are spread over multiple handlers atm 20161009 08:45:22< loonycyborg> in essense it's the same outcome as adding sigint_exit/sigterm_exit variables 20161009 08:49:03-!- Kwandulin [~Miranda@p200300760F2C71D3F5E0557ABFBFC31D.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161009 08:52:29< vultraz> hmmm 20161009 08:52:34< vultraz> now how to find... 20161009 08:53:02< vultraz> the right place to move the node to 20161009 08:53:22< vultraz> It's , not 20161009 08:53:25< vultraz> node* 20161009 08:53:56-!- atarocch [~atarocch@2.46.197.98] has joined #wesnoth-dev 20161009 08:55:35-!- Kwandulin [~Miranda@p200300760F2C71D320B07FC9272EE89D.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161009 08:56:45< vultraz> so, essentially, I need to find a position, in an arbitrary range... 20161009 08:58:53< vultraz> but I don't have the range 20161009 09:01:09< tad_> Where are the cmake config files? I need to add a dependency and compile options. I think I can see scons but cmake ... ??? 20161009 09:02:03< vultraz> not sure 20161009 09:03:14< loonycyborg> cmakelists.txt 20161009 09:04:51< DeFender1031> vultraz, very nice. What are the sliders? 20161009 09:05:00< vultraz> DeFender1031: gold and income 20161009 09:05:07< vultraz> i've since added labels for that 20161009 09:05:16< DeFender1031> ah 20161009 09:05:52< zookeeper> vultraz, why was coast5 renamed to coast_5..? 20161009 09:06:20< DeFender1031> they should maybe not be so close to the dropdowns they align with, since it looks like they're related the way that it was. 20161009 09:06:41< tad_> Oh geez. Anyone know how to use cmake to add a compiler flag for ONE source file? 20161009 09:07:09< tad_> Or one directory of source files? 20161009 09:07:40< loonycyborg> shadowm: if you implement config file writes with temp file + swap will SIGKILL still fuck things up if it comes during swap operation? 20161009 09:09:17-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 244 seconds] 20161009 09:13:42-!- vultraz [~chatzilla@124.109.10.167] has joined #wesnoth-dev 20161009 09:13:42-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20161009 09:13:42-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20161009 09:13:43< zookeeper> vultraz, oh i see it. to avoid the first village macro from using it as a variation. 20161009 09:15:24< shadowm> loonycyborg: rename() is atomic. 20161009 09:15:41< shadowm> Or claims to be, which is good enough. 20161009 09:18:20< shadowm> Even if you overthink it, the fact is that there aren't a lot of ways for a file rename operation to go wrong once you know it's viable, unless the filesystem is FUBAR in which case nothing matters at all. 20161009 09:19:33< shadowm> Imagine if SIGKILLing programs caused the kernel to abandon ship in the middle of processing a system call that had filesystem data structure manipulation as one of its primary effects. 20161009 09:19:45-!- mjs-de [~mjs-de@x4e311733.dyn.telefonica.de] has joined #wesnoth-dev 20161009 09:20:02< shadowm> That's not a world I want to live in, for one. 20161009 09:22:33< shadowm> If, on the other hand, the signal is processed before the system call gets serviced, there's nothing to lose since it will simply mean that the operation won't be done, which is exactly what we want to achieve here to protect poor little campaignd from choking on a ball of half-digested WML next time it tries to run. 20161009 09:26:41< vultraz> zookeeper: what? 20161009 09:31:03< zookeeper> vultraz, the village PR you merged 20161009 09:33:27< JyrkiVesterinen> loonycyborg, shadowm: The safe way to implement file writing is write-fsync-rename. 20161009 09:33:45< JyrkiVesterinen> The fsync system call guarantees that the operations are ordered. 20161009 09:33:58< JyrkiVesterinen> Rename itself is indeed atomic. 20161009 09:36:17< shadowm> Picture my disappointment when I realize I wrote a tidy function for a sequence that is used only once. 20161009 09:37:02< shadowm> JyrkiVesterinen: So what happens if I don't fsync? (Also, I thought fsync didn't guarantee anything?) 20161009 09:37:31 * shadowm vaguely recalls some early ext4 bug involving fsync or the lack thereof. 20161009 09:37:33< JyrkiVesterinen> Without it, it's possible that on power loss the rename finishes but the write doesn't. 20161009 09:37:44< JyrkiVesterinen> I which case the file gets truncated to zero bytes. 20161009 09:37:57< shadowm> Oh, cute. 20161009 09:38:05< JyrkiVesterinen> Yes, that ext4 problem is exactly it. 20161009 09:38:26< loonycyborg> What can cause server to get a SIGKILL anyway? Only case obvious to me is OOM killer. 20161009 09:38:42< shadowm> loonycyborg: "The server is going down for reboot NOW". 20161009 09:38:55< shadowm> Also a frustrated admin at the helm. 20161009 09:39:09< shadowm> Or both. 20161009 09:39:17< loonycyborg> isn't reboot supposed to send SIGTERM as a warning first? 20161009 09:39:31< JyrkiVesterinen> Ext4 worked around the problem, but it's still the fault of application developers to not fsync before the rename. Without fsync the order of FS operations isn't guaranteed by the specification. 20161009 09:39:42< shadowm> Yes, but now campaignd is able to take all the time it wants to actually act on SIGTERM. 20161009 09:40:07< tad_> OK. I give up. CMAKE is basically undocumented. "COMPILER_FLAGS sets the compile flags" really good documentation. Maybe stackoverflow will help but I'm not seeing it. 20161009 09:40:39-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20161009 09:40:46< shadowm> tad_: Did you think of looking at src/CMakeLists.txt to see how it's done with Lua? 20161009 09:41:12< tad_> YEs and nothing there about lua 20161009 09:41:32< shadowm> We must be looking at entirely different versions of master then. 20161009 09:41:53< tad_> I just pulled from wesnoth/master is there another? 20161009 09:42:03< shadowm> Only that one. 20161009 09:42:12-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20161009 09:42:43< shadowm> tad_: https://github.com/wesnoth/wesnoth/blob/master/src/CMakeLists.txt#L343 20161009 09:44:31< shadowm> I love how I keep coming up with new ways to make campaignd considerably worse on Windows after backporting my own patches to make it compile there. 20161009 09:46:16< tad_> So where does cmake get dependencies. I need to add one which autodep would not find because it's not specifically referenced? 20161009 09:47:11< shadowm> Dependencies between files, or you mean libraries and include paths and the like? 20161009 09:48:10< tad_> I mean like 'if this file has changed, compile that file' 20161009 09:48:59< shadowm> Magic, I'm sure. I mean, the only thing you have access to to my knowledge is the list of files involved in building each target. 20161009 09:49:30< shadowm> And that's the only thing which should matter unless... I don't know. 20161009 09:49:51-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20161009 09:49:59< shadowm> Okay, how do I squeeze out a POSIX file descriptor out of the ostream returned by ostream_file()... 20161009 09:50:26< shadowm> Which is a boost thingamajig which is built on another boost whatsit... 20161009 09:51:03-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20161009 09:51:30< shadowm> I'm going to have to either give my class special knowledge of ostream_file()'s return value or make an alternate ostream_file() that discloses all the scary details. :\ 20161009 09:52:31< shadowm> And read up on boost::iostreams, which I somehow managed to avoid for 9 years. 20161009 09:56:55< tad_> shadowm, well it helped. I got the options on the file. Now to get it to tell when the other file has changed so it recompiles when it needs to. 20161009 09:58:49< shadowm> Okay, looks like extracting the POSIX fd is simple enough if I violate contract and cast the ostream back to its true form. 20161009 10:00:13-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161009 10:00:15< shadowm> Like, sure, the odds that someone will change ostream_file()'s implementation in 1.12 before that server instance reaches EOL are close to nil, but I wanted to be able to use the sameish code in master. Pah. 20161009 10:03:04-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 268 seconds] 20161009 10:03:04-!- wedge010 is now known as wedge009 20161009 10:03:06< tad_> shadowm, look at boost posix_stream_descriptor? 20161009 10:03:21< tad_> get native handle 20161009 10:03:38< shadowm> I was looking at boost::iostreams::file_descriptor_sink. 20161009 10:03:57< shadowm> The return value is a boost::iostreams::stream. boost::iostreams::file_descriptor_sink has a method to get the fd. 20161009 10:04:48< shadowm> Oh, I know, I will add a filesystem ns function that's ifdef'd out on Windows. <_< 20161009 10:05:14< shadowm> I've been throwing all my needy crap into the filesystem namespace as of late, so another one shouldn't hurt. 20161009 10:08:36< vultraz> ok, I can't figure out a good way to do this right now 20161009 10:08:42< vultraz> I shall need to consult celticminstrel 20161009 10:10:41< shadowm> Do we even need the stars in fs::istream_file() and fs::ostream_file() now that C++11 is here with move semantics and stuff? 20161009 10:13:41< vultraz> celticminstrel: so, my problem is this. when I you switch teams, the appropriate child node is removed from the parent node and added to the new team's. add_child has an optional third argument for position, and I cannot figure out how to get a valid position value, out of the number of child nodes in that team's node, in the numerical order of the corresponding side.index() value. 20161009 10:13:47< vultraz> s/I// 20161009 10:16:55< vultraz> celticminstrel: I considered declaring an array the size of the team node's tree, iterating over all side engines while checking the teams and pushing the indexes of the specific sides to said array then iterating over the array to get a position, but that seems horribly inefficient and I'm sure that's not the best way to do it. 20161009 10:16:57< shadowm> boost::iostreams::stream* real = dynamic_cast*>(&os); 20161009 10:17:15< shadowm> Just. Ugh. 20161009 10:22:01< vultraz> auto and typdefs are your friend 20161009 10:22:04< shadowm> I hope that commit I saw isn't an indication that there's now a policy against shorthand typedefs for -- 20161009 10:22:06< vultraz> typedefs 20161009 10:22:12< shadowm> Okay, good. 20161009 10:22:18< shadowm> Except I can't use auto here. 20161009 10:23:41< shadowm> On master I'll probably refactor the type mentions so that there's a single typedef to rule them all. 20161009 10:23:58< shadowm> ... them all two functions anyway. 20161009 10:24:57< vultraz> time to make my code to use the smart ptr instead of passing around a reference to its bare pointer 20161009 10:25:27< vultraz> (yes, I just realized I took a smart ptr's bare ptr and use that instead of the smart ptr :| ) 20161009 10:27:40< JyrkiVesterinen> Using the bare pointer is not wrong if it doesn't need to own the target of the pointer. 20161009 10:29:05< vultraz> true, it doesn't... 20161009 10:31:04< vultraz> I guess it doesn't matter much either way? 20161009 10:33:04< JyrkiVesterinen> If you don't need an owning pointer, the raw pointer has a shorter type name, and it's slightly faster because the reference count doesn't need to be updated. 20161009 10:33:23< JyrkiVesterinen> If you *do* need an owning pointer, passing a raw pointer instead is dangerous. 20161009 10:34:10< vultraz> well... I actually dereference the pointer and pass the reference to a bunch of bound functions, essentially. 20161009 10:34:29< vultraz> but I don't actually own a copy of the pointer. 20161009 10:34:31-!- atarocch [~atarocch@2.46.197.98] has quit [Ping timeout: 268 seconds] 20161009 10:35:11< JyrkiVesterinen> For bound functions, I recommend that you pass a shared_ptr or weak_ptr. 20161009 10:35:58< vultraz> yes, I've just changed the bound functions to take the shared_ptr. 20161009 10:37:11-!- Kwandulin [~Miranda@p200300760F2C71D320B07FC9272EE89D.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161009 10:39:20-!- Nobun [~nobun@5.170.106.91] has joined #wesnoth-dev 20161009 10:39:36< vultraz> er, hm. does one do shared_ptr& arg, or shared_ptr arg 20161009 10:42:10< JyrkiVesterinen> shared_ptr 20161009 10:43:46-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 268 seconds] 20161009 10:46:17-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161009 10:55:20-!- JyrkiVesterinen [~JyrkiVest@87-100-214-197.bb.dnainternet.fi] has quit [Quit: Going somewhere] 20161009 10:58:01< irker678> wesnoth: Charles Dang wesnoth:master aabc655c6cd3 / / (5 files in 4 dirs): MP Staging: redesigned dialog to group sides by team https://github.com/wesnoth/wesnoth/commit/aabc655c6cd3b1cdb2058763e0193fe616fde6fc 20161009 10:59:13-!- Nobun [~nobun@5.170.106.91] has quit [Ping timeout: 260 seconds] 20161009 11:08:54< zookeeper> btw, i do agree that it's confusing if the sides are not displayed in numerical order. side order is kind of really important in MP. 20161009 11:11:34-!- Kwandulin [~Miranda@p200300760F2C71D321A28CEC4EE8E838.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161009 11:20:16-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161009 11:23:07-!- atarocch [~atarocch@31.159.176.88] has joined #wesnoth-dev 20161009 11:23:48< tad_> So does anyone know scons or am I stuck figuring it out, too? 20161009 11:32:21< tad_> celticminstrel, Do I recall correctly that you use Xcode? 20161009 11:33:39< zookeeper> urgh, custom death animation is followed by the built-in one... 20161009 11:36:16-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 260 seconds] 20161009 11:37:17< tad_> vultraz, I'm going to need assistance or advice on how to finish up the changes I'll need for my GL_Lua2 branch. 20161009 11:37:42-!- atarocch [~atarocch@31.159.176.88] has quit [Ping timeout: 250 seconds] 20161009 11:40:07< zookeeper> it'd be great if our animation system wasn't so incredibly fickle 20161009 11:40:23< zookeeper> or animation+rendering, if you will 20161009 11:42:11-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161009 11:42:43< tad_> I'm not sure about how to proceed with getting the various targets project files changed for a change I'm working on. 20161009 11:42:50< zookeeper> when type=Dark Adept, custom death animation plays normally. when type=Dark Queen, custom death animation plays normally, followed by the last frame popping back up and fading out in the built-in way. 20161009 11:43:15< zookeeper> no meaningful difference in WML. 20161009 11:44:18< zookeeper> oh right 20161009 11:44:52< tad_> wedge009, Question on VC12 project file. 20161009 11:45:08< zookeeper> of course, the dark adept death anim doesn't have the fadeout, so it gets added automatically, and because my dark queen anim does have the fade-out built-in, it gets done twice. and of course there's no way to disable to built-in fadeout (which is ridiculous)... 20161009 11:45:30< vultraz> ah, the joys of engine limitations! :P 20161009 11:46:34< zookeeper> so basically there's no way to do a custom death animation which has a fadeout in it 20161009 11:46:46< zookeeper> oh well 20161009 11:48:03< tad_> vultraz, For this change I'm working on I managed to get CMake to do it correctly. I think I can figure out SCons but can't test it. And I can tell what to set for Visual Studio but can't make the change unless I hand-edit the project; after that I don't know how to proceed to ensure the other build targets get the needed changes. 20161009 11:48:48< vultraz> zookeeper: you could fix the engine 20161009 11:49:05< vultraz> tad_: what do you need? 20161009 11:49:13< irker678> wesnoth: Nobun wesnoth:master 91c9677b222e / utils/ (5 files in 3 dirs): wmlxgettext: added support for plural forms (used on lua files) https://github.com/wesnoth/wesnoth/commit/91c9677b222e8f3742ea08faf0db24653a975d3a 20161009 11:49:15< irker678> wesnoth: Nobun wesnoth:master f41a3aa4ae19 / utils/ (5 files in 3 dirs): wmlxgettext: plural forms: comments "fixed" https://github.com/wesnoth/wesnoth/commit/f41a3aa4ae19456e68f92f43b0b62c82fe557e59 20161009 11:49:17< irker678> wesnoth: Nobun wesnoth:master 5b68df53ea56 / utils/pywmlx/postring.py: wmlxgettext: plural forms: retyped another comment https://github.com/wesnoth/wesnoth/commit/5b68df53ea561cdbb6772a7ffcd4f77718653fc3 20161009 11:49:19< irker678> wesnoth: Nobun wesnoth:master 0ac42d4dabf1 / utils/pywmlx/state/lua_states.py: bugfix: usage of varname_(varname) doesn't confuse anymore wmlxgettext https://github.com/wesnoth/wesnoth/commit/0ac42d4dabf14fc147fb76df6e0aa4ad88d113ef 20161009 11:49:21< irker678> wesnoth: Nobun wesnoth:master cb11bcc64797 / utils/pywmlx/state/lua_states.py: wmlxgettext: corner case fix https://github.com/wesnoth/wesnoth/commit/cb11bcc64797cd1ddcbe812f868e1d773b527b44 20161009 11:49:23< irker678> wesnoth: Sergey Popov wesnoth:master 1695e46047bd / utils/ (5 files in 3 dirs): Merge pull request #811 from AncientLich/wmlxgettext https://github.com/wesnoth/wesnoth/commit/1695e46047bd2d1ffa3f8444b313df867c3dd1f9 20161009 11:50:01< tad_> vultraz, What is the process to propogate the needed changes to the other build systems? 20161009 11:50:15< vultraz> what build system? 20161009 11:50:19< vultraz> I can only help with lua. 20161009 11:50:23< vultraz> in codeblocks 20161009 11:50:33< vultraz> er 20161009 11:50:34< vultraz> blah 20161009 11:50:38< vultraz> I can only help with codeblocks. 20161009 11:51:09< tad_> That's one. Codeblocks. Xcode. Scons. Android, whatever else. I changed and tested CMake. 20161009 11:51:28< tad_> I think I can figure out how to change SCons, but can't test it. 20161009 11:52:05< vultraz> I can't help you there. 20161009 11:52:14< vultraz> And no one here knows what to do for Android. 20161009 11:52:47< vultraz> What do you need done to CB? 20161009 11:53:02< loonycyborg> why you can't test it? 20161009 11:53:06< tad_> Well, I can talk whoever through the conceptual changes. Add a file, add a compile switch, make another file depend upon the added one 20161009 11:53:34< loonycyborg> I can test scons and fix stuff if necessary 20161009 11:54:08< loonycyborg> android isn't supported by master branch 20161009 11:54:12< loonycyborg> it's separate project 20161009 11:54:56< tad_> loonycyborg, I think I can figure out the SCons changes. 20161009 11:55:30< tad_> loonycyborg, I'll let you know if I can't get SCons to work (before changes) and see if we can do it together. 20161009 11:55:39< loonycyborg> ok 20161009 11:56:58< tad_> vultraz, The issue is if we don't have all the 1.13.6+dev builds in sync when it goes to 1.13.7 we'll get OOS errors if Lua does any collation of strings which trigger them. 20161009 11:57:38< tad_> vultraz, So I'm worried about how to get from here to there for anything other then Visual Studio, CMake and Scons. 20161009 11:57:57< vultraz> editing codeblocks is eimply 20161009 11:58:00< vultraz> i can deal with it 20161009 11:58:55< tad_> If you use CMake with Codeblocks, the changes are in my GL_Lua2 branch already. 20161009 11:59:35< vultraz> I do not. 20161009 12:00:10< tad_> What I was hoping was that someone would do/help with the projectfiles which I can't do, either for me to add to my changeset or to do in parallel. 20161009 12:00:29< vultraz> Anyway, I don't see anything in your PR that needs a projectfile change? 20161009 12:01:08< loonycyborg> extra define? 20161009 12:01:10< tad_> vultraz, My personal fork, GL_Lua2. The continuation of preparing for upgrading Lua, for 1.13.6+dev. 20161009 12:01:29< vultraz> ah 20161009 12:02:25< vultraz> ok, I assume that file gets added to the lua project? 20161009 12:03:56< tad_> I put it in src, not src/lua but yes. The CMake for lua is in the changeset. Add a compiler option to inject the #include before line 1 of the file, and have the file recompile if we change that new file. 20161009 12:09:50< tad_> Anyway, I'm wiped out. A lot of work for such a small change but it doesn't use any undocumented features on Windows and doesn't trigger any compiler errors on Linux; and it clears one more wesnoth-specific change out of the original Lua source kit. 20161009 12:10:37-!- tad_ [~tadcarluc@173.217.65.103] has quit [Quit: Leaving] 20161009 12:27:09-!- gfgtdf [~chatzilla@x4e363dc4.dyn.telefonica.de] has joined #wesnoth-dev 20161009 12:31:15< irker678> wesnoth: gfgtdf wesnoth:master d800c00174bd / RELEASE_NOTES: Update RELEASE_NOTES https://github.com/wesnoth/wesnoth/commit/d800c00174bd3084a67395033c12c831150f8562 20161009 12:36:47-!- atarocch [~atarocch@109.112.55.161] has joined #wesnoth-dev 20161009 12:46:37-!- JyrkiVesterinen [~JyrkiVest@78-27-127-165.bb.dnainternet.fi] has joined #wesnoth-dev 20161009 12:52:54-!- atarocch [~atarocch@109.112.55.161] has quit [Remote host closed the connection] 20161009 13:03:08-!- Kwandulin [~Miranda@p200300760F2C71D321A28CEC4EE8E838.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161009 13:06:57-!- Kwandulin [~Miranda@p200300760F2C71D321A28CEC4EE8E838.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161009 13:08:20-!- Appleman1234_ [~Appleman1@KD106154000208.au-net.ne.jp] has joined #wesnoth-dev 20161009 13:11:09-!- Appleman1234 [~Appleman1@KD106154018217.au-net.ne.jp] has quit [Ping timeout: 268 seconds] 20161009 13:14:50-!- Appleman1234_ is now known as Appleman1234 20161009 13:15:21-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20161009 13:17:15< JyrkiVesterinen> tad_: In general, all developers are responsible for changes to CMake and SCons projects. Pre-existing project files (Code::Blocks, Xcode and Visual Studio) are usually handled by whoever uses them. 20161009 13:18:52< JyrkiVesterinen> Your Lua changes are more problematic because failing to update project files for one environment wouldn't result in failing builds. It would be easy to forget to update them. :( 20161009 13:19:57< JyrkiVesterinen> I can make a patch for the VS change and send it to you if you want. 20161009 13:32:34-!- Bonobo [~Bonobo@2001:44b8:254:3200:25f7:1b04:4a29:56a9] has quit [Quit: Leaving] 20161009 13:33:31-!- Kwandulin [~Miranda@p200300760F2C71D321A28CEC4EE8E838.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161009 13:33:48-!- Nobun [~nobun@5.170.106.227] has joined #wesnoth-dev 20161009 13:35:29< Nobun> celticminstrel, loonycyborg: do you know any details about campgen? I'm evaluating to make another python script wich should help translator to manage translations on their own User Made Content 20161009 13:35:55< loonycyborg> I don't know anything about that 20161009 13:36:03< Nobun> the idea is having a graphical tool (in python) wich will use wmlxgettext (for blank pot file) msginit and msgmerge for the end-user 20161009 13:36:16< Nobun> thank, loonycyborg 20161009 13:36:57< Nobun> However I will try to expose my question... perhaps celticminstrel or another developer can help me about that point 20161009 13:36:58< loonycyborg> what sort of gui api you going to use there? 20161009 13:37:13< Nobun> in this moment I not developed anything 20161009 13:37:29< Nobun> the idea is to use tkinter (like GUI.pyw) 20161009 13:37:39< Nobun> in order to avoid to add extra dependencies 20161009 13:38:46< Nobun> the problem I'm more concerned about is... 'uploading pot in wesnoth server' 20161009 13:39:22< Nobun> If I remember correctly the old campgen tools also allowed to upload pot files in a dedicated space where translator could download pot and resend translations 20161009 13:39:48< Nobun> And this is the step I am more concerned about 20161009 13:40:33< Nobun> (all other steps are more easy to develop. It is, more or less, a sequence of python subprocesses like happened on GUI.pyw) 20161009 13:43:00-!- JyrkiVesterinen [~JyrkiVest@78-27-127-165.bb.dnainternet.fi] has quit [Quit: Going offline] 20161009 13:54:59< Nobun> loonycyborg: I was saying wrongly. It was not campgen, but WesCamp... sorry for the error 20161009 13:55:39< loonycyborg> AI0867 and shadowm were working on wescamp 20161009 13:58:12-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has joined #wesnoth-dev 20161009 13:58:29< Nobun> thank, loonycyborg ... I will ask to shadowm when I see him active 20161009 14:03:56-!- Nobun [~nobun@5.170.106.227] has quit [Quit: Salve a tutti] 20161009 14:21:49-!- Kwandulin [~Miranda@p200300760F2C71D3AD7CFB962B90F000.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161009 14:40:39< shadowm> Sigh. 20161009 14:40:57< shadowm> I really wasn't, I just kn[eo]w some things. 20161009 14:48:57-!- JyrkiVesterinen [~JyrkiVest@78-27-127-165.bb.dnainternet.fi] has joined #wesnoth-dev 20161009 15:04:15-!- ancestral [~ancestral@75-168-189-115.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161009 15:31:32-!- irker678 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161009 15:44:48-!- Duthlet [~Duthlet@dslb-188-104-253-155.188.104.pools.vodafone-ip.de] has joined #wesnoth-dev 20161009 15:51:30-!- irker249 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161009 15:51:30< irker249> wesnoth: mattsc wesnoth:master 1a5e9051a861 / data/ai/lua/ai_helper.lua: ai_helper: correctly and consistently deal with invisible units https://github.com/wesnoth/wesnoth/commit/1a5e9051a861b53d5c2e88336d5890e9a591af6e 20161009 15:53:04-!- Kwandulin [~Miranda@p200300760F2C71D3AD7CFB962B90F000.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161009 16:03:19-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has joined #wesnoth-dev 20161009 16:04:32-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has quit [Client Quit] 20161009 16:13:15-!- Kwandulin [~Miranda@p200300760F2C71D3FCDCCD9A37DA67B0.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161009 16:34:44< matthiaskrgr> btw, typo https://github.com/wesnoth/wesnoth/commit/d800c00174bd3084a67395033c12c831150f8562#diff-6ff2628eef229ca06dde6031684f20a6R44 20161009 16:34:54< matthiaskrgr> "shoudl use map_generation=lua" 20161009 17:08:08-!- matthiaskrgr is now known as rnatthiaskrgr 20161009 17:31:26-!- DeFender1031 [~DeFender1@89-138-252-80.bb.netvision.net.il] has quit [Read error: Connection reset by peer] 20161009 17:31:54-!- DeFender1031 [~DeFender1@46-116-17-86.bb.netvision.net.il] has joined #wesnoth-dev 20161009 17:32:11-!- iwaim [~iwaim@124.146.179.10] has joined #wesnoth-dev 20161009 17:32:33-!- iwaim_____ [~iwaim@rasteenie.alib.jp] has quit [Read error: Connection reset by peer] 20161009 17:58:14< irker249> wesnoth: gfgtdf wesnoth:master c90f598c486e / data/lua/wml-tags.lua: use wesnoth.fire_event instead of wesnoth.fire_event_by_name https://github.com/wesnoth/wesnoth/commit/c90f598c486ea70678334433f63e5595791a6d83 20161009 18:01:09< irker249> wesnoth: gfgtdf wesnoth:master 844aeb07a25c / src/scripting/game_lua_kernel.cpp: remvoe wesnoth.fire_event_by_name https://github.com/wesnoth/wesnoth/commit/844aeb07a25c502757c40ddacee28620bf80d510 20161009 18:13:09-!- Kwandulin [~Miranda@p200300760F2C71D3FCDCCD9A37DA67B0.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161009 18:34:39< EliDupree> Very interesting… Although the UI doesn't normally respond during lua scripts, it DOES respond while a lua script is waiting on synchronize_choice() 20161009 18:34:45< EliDupree> I think 20161009 18:35:51< EliDupree> That could be used as a super hacky work around to allow Lua to yield to the UI 20161009 18:35:58-!- travis-ci [~travis-ci@ec2-54-80-24-182.compute-1.amazonaws.com] has joined #wesnoth-dev 20161009 18:35:59< travis-ci> wesnoth/wesnoth#11401 (master - c90f598 : gfgtdf): The build has errored. 20161009 18:35:59< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/166243900 20161009 18:35:59-!- travis-ci [~travis-ci@ec2-54-80-24-182.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161009 18:36:51< EliDupree> What I don't know is, what happens if the active player leaves the game while the other clients are waiting on synchronize_choice(). I have a situation like that on the server right now, and we don't seem to be able to contact the player we abandoned. 20161009 18:38:58< gfgtdf> EliDupree: you can just use wsnoth.delay(0) to 'pull' dform the ui 20161009 18:39:16< EliDupree> Oh, cool 20161009 18:39:31< gfgtdf> EliDupree: at lest in 1.13 not tested on 1.12 20161009 18:42:34< gfgtdf> EliDupree: (again in 1.13 ot teste n 1.12) when aplayer leaves while he is inside a syncronize choice the 'choice' (usually a dialog) is then displayed to the client that controls that side next 20161009 18:42:45-!- tad_ [~tadcarluc@173.217.65.103] has joined #wesnoth-dev 20161009 19:29:18-!- atarocch [~atarocch@93.56.160.28] has joined #wesnoth-dev 20161009 20:03:17-!- JyrkiVesterinen [~JyrkiVest@78-27-127-165.bb.dnainternet.fi] has quit [Quit: .] 20161009 20:13:25-!- ancestral [~ancestral@96-82-223-213-static.hfc.comcastbusiness.net] has joined #wesnoth-dev 20161009 20:17:08-!- tad_ [~tadcarluc@173.217.65.103] has quit [Quit: Leaving] 20161009 20:18:51-!- tad_ [~lundberg@173.217.65.103] has joined #wesnoth-dev 20161009 20:29:08-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20161009 20:38:55< EliDupree> Yay, I just released a new version of EoHS. 20161009 20:49:25-!- ancestral [~ancestral@96-82-223-213-static.hfc.comcastbusiness.net] has quit [Quit: i go nstuf kthxbai] 20161009 21:01:21-!- irker249 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161009 21:25:25< gfgtdf> zookeeper: i wonder whether we should make fire_event=yes the default for [unstore_unit] ? I canot imageine any seitiation (other than writing a custom amla system) where you want [unstore_unit] to advance a unit but without fireing the advance events. 20161009 21:25:29-!- irker693 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161009 21:25:29< irker693> wesnoth: mattsc wesnoth:master f28d4336bf53 / data/ai/ (lua/ai_helper.lua micro_ais/cas/ca_fast_move.lua): ai_helper.move_unit_out_of_way: normalize dx/dy here https://github.com/wesnoth/wesnoth/commit/f28d4336bf53ca6d7c9b77e04f6678a5be808791 20161009 21:25:29< irker693> wesnoth: mattsc wesnoth:master 413ae2c56896 / RELEASE_NOTES changelog players_changelog: Update the various changelogs https://github.com/wesnoth/wesnoth/commit/413ae2c56896182680266dfa1ab2a8d50e4dfdc6 20161009 21:27:15< DeFender1031> EliDupree and whoever else, the deeper I get into the game's internals, the more I get the impression that it was originally designed for a single player only and that MP was sort of hacked on with various fixes and workarounds added all over the place to make it play nicely across a network, in a way that would not have been done had it been designed for network play from the beginning. 20161009 21:27:42< EliDupree> That sounds accurate to me 20161009 21:28:45< EliDupree> Writing scripts for multiplayer is still a complete mess with loads of gotchas 20161009 21:29:04< mattsc> vultraz: that ^ is probably it from me for 1.13.6. I have a lot of work to do on the Micro AIs, but it is extremely unlikely that I will get that done by Friday, so it’ll have to wait for 1.13.7. 20161009 21:31:06< EliDupree> The upside being that it's only about 1/5 as much of a mess as it was a while ago 20161009 21:35:27< vultraz> hmmm 20161009 21:35:36< vultraz> ok, so I appear to not have tested something.. 20161009 21:38:11< vultraz> ah, got it 20161009 21:38:19< vultraz> using std::ref on a shared_ptr :P 20161009 21:39:29< irker693> wesnoth: Charles Dang wesnoth:master 1ba5ce7c2ed0 / src/gui/dialogs/multiplayer/mp_staging.cpp: Fixup aabc655c6cd3 https://github.com/wesnoth/wesnoth/commit/1ba5ce7c2ed0f8c19bd74e94b3fd96f299acc797 20161009 21:39:29< vultraz> I can see why that would fail 20161009 21:39:41< vultraz> not sure about the semantics, exactly, but it makes sense. 20161009 21:40:16< DeFender1031> EliDupree, yeah, i've noticed that 1.13 is adding a lot of fixes. For example, in 1.12, you couldn't even properly manage [endlevel] properly for multiple sides. 20161009 21:41:35< vultraz> (perhaps it's because now you have a ref to the shared_ptr object and not its underlying pointer) 20161009 21:41:47< EliDupree> DeFender1031: Yeah, well, it would be pretty nice to be able to do arithmetic without breaking synchronization 20161009 21:41:51< vultraz> (though that.. actually doesn't make much sense) 20161009 21:42:36< vultraz> DeFender1031: you are right. the game wasn't designed from the ground up with MP in mind. 20161009 21:43:41< DeFender1031> EliDupree, to what are you referring? Isn't most arithmetic deterministic? (I don't actually know the full extent of the pains one runs into when working with MP, as I'm making a SP add-on. I'm just noticing a lot of things that I think to myself "thank G-d I don't have to worry about how to handle that with multiple players") 20161009 21:43:43< vultraz> Our synchronization problems would likely go away if we had a gameserver mode like Anura's TBS module uses, as I have said a lot, but implementing such a system is (as usual) a Ton of Work. 20161009 21:44:18< EliDupree> DeFender1031: Floating-point rounding is different on different platforms. 20161009 21:44:37< DeFender1031> vultraz, love the capitalization, but you forgot the "™". 20161009 21:44:44< vultraz> :P 20161009 21:45:44< EliDupree> DeFender1031: and the ONLY number type exposed to scripts is floating point. To avoid breaking everything, I have to always remember to keep coercing them back to integers using math.floor() and such, or squeeze them through synchronize_choice() 20161009 21:45:52< vultraz> (as for why I say such a thing, it's because they literally designed the module to literally deal with tbs games synching over the network) 20161009 21:45:58< DeFender1031> EliDupree, ah. I try to avoid floating point variables like the [plague]. 20161009 21:46:05< EliDupree> heh 20161009 21:46:12< vultraz> (ignore the second 'literally') 20161009 21:46:59< EliDupree> DeFender1031: One of my other projects is actually a game physics backend for lockstep multiplayer, so I know a lot about which things are deterministic nowadays :/ 20161009 21:47:01< DeFender1031> vultraz, "(as for why I say such a thing, it's because they literally designed the module to literally deal with tbs games literally synching over the literal network. Literally.)" FTFY :P 20161009 21:47:33< vultraz> LITERALCEPTION :D 20161009 21:48:23< DeFender1031> EliDupree, by "scripts" you mean "lua"? 20161009 21:48:46< zookeeper> gfgtdf, i think the reason it defaults to fire_event=no is because defaulting to yes has the pitfall that if you unstore the unit in an advance event, then it goes into an infinite advancement loop 20161009 21:49:08< EliDupree> DeFender1031: I think it also applies to scripts written with straight WML commands, although no one should ever do that when Lua is available 20161009 21:49:12-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: So long and thanks for all the fish.] 20161009 21:49:19< zookeeper> gfgtdf, i think i agree that other than that it'd very much make sense to have yes as the default 20161009 21:49:29< tad_> EliDupree, If you mean Lua, then you're going to appreciate when I finish the upgrade in 1.13.7 because Lua 5.3 has separated integer from float. 20161009 21:49:39< EliDupree> tad_: yay! 20161009 21:50:17< zookeeper> gfgtdf, err, or was that a different issue... 20161009 21:50:37< DeFender1031> EliDupree, I... actually wrote a script with straight WML for calculating the four-sided area defined by the shortest path between two hexes... back before I learned lua. (I actually ported it to lua last week) 20161009 21:50:52< vultraz> D: 20161009 21:50:53-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20161009 21:50:54< vultraz> oh god 20161009 21:51:03< DeFender1031> vultraz, addressed at me? 20161009 21:51:31< tad_> And here we were talking about how fast LuaJIT would be and he throws it all out the window by calling back to WML for the math! 20161009 21:51:45< EliDupree> DeFender1031: That's nothing. Before they added Lua, I wrote a pseudorandom number generator and a complete variable scoping system in straight WML. 20161009 21:51:52< DeFender1031> EliDupree, tad_, so lua isn't like javascript in that it has clearly-defined rules for how its number type works and will be consistent no matter the platform? 20161009 21:51:56< zookeeper> hey we did all sorts of cool stuff in pure WML back in the day 20161009 21:52:00-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Read error: Connection reset by peer] 20161009 21:52:05< zookeeper> don't disparage WML hacking 20161009 21:52:10< DeFender1031> EliDupree, that's truly horrifying. 20161009 21:52:16< EliDupree> DeFender1031: I thought JavaScript had native floating point numbers too? 20161009 21:52:37< DeFender1031> On the other hand, ActionWML IS turing-complete, so there's no reason why one can't write computational stuff in it. 20161009 21:53:10-!- mjs-de [~mjs-de@x4e311733.dyn.telefonica.de] has quit [Remote host closed the connection] 20161009 21:53:21< vultraz> turing-complete? 20161009 21:53:22< zookeeper> i'm not sure what my worst err i mean best WML hack might have been. nothing quite as complicated as EliDupree's stuff i'm sure, but it must have been something wonderful. 20161009 21:53:33< DeFender1031> EliDupree, they are, but the standard defines that they must be 64-bit with x amount of payload bits and y amount of exponentiation bits (don't recall the specifics offhand) 20161009 21:53:42< tad_> DeFender1031, The rules are simple. The issue is some processors do rounding a bit differently. It's supposed to be IEEE754 everywhere but Lua 5.2 faked it for Windows (which is, I bet, where he had issues). 5.3 does not do that. 20161009 21:54:03< DeFender1031> EliDupree, meaning that you do end up with the usual floating point rounding issues, but they won't differ between platforms. 20161009 21:54:17< EliDupree> The usual floating-point rounding issues DO differ between platforms 20161009 21:54:33< vultraz> (can someone tell me what this magic IEEEE thing is) 20161009 21:54:37< DeFender1031> EliDupree, not in standard JS. 20161009 21:54:58< EliDupree> As such ANYTHING that uses floating-point instructions (as opposed to emulating floats using integers or whatever) is NEVER suitable for synchronized computations over multiple devices that run on different hardware/operating system 20161009 21:55:26< tad_> DeFender1031, when was the last time you shipped a float in binary from JS on one hardware platform to JS on another? 20161009 21:55:31< EliDupree> (I'm not sure if the operating system affects it very much, but CPU differences do) 20161009 21:55:48 * tad_ nods 20161009 21:56:07< tad_> Take the Intel bugs as an example. 20161009 21:56:19< EliDupree> https://internals.rust-lang.org/t/pre-rfc-dealing-with-broken-floating-point/2673 20161009 21:56:40< EliDupree> Here's a long, awful thread of the Rust developers trying to figure out the right way to deal with the issue 20161009 21:57:35< tad_> It comes up every now and then on Reddit, too. Every few years we have to teach a new crop that just because it's a standard does not mean it was implemented correctly everywhere. 20161009 21:57:52< tad_> And even when it is perfect, there are still strangenesses and edge conditions 20161009 21:58:30 * vultraz wonders if tad_ had to deal with such things in the early days of computing 20161009 21:58:39< DeFender1031> alright, fair enough. There's also cases of floating point errors actually killing people. IIRC, during the gulf war, the tracking system registered an incoming scud, did the math, sent it to the launch system for the patriot missile, which did the math slightly differently, and was off by a crucial fraction of a second or degree or whatever. 20161009 21:58:45< tad_> My favorite is "Why is this false: ((int)0.0 == 0)?" 20161009 21:58:54< EliDupree> Here's another fun fact: in C++, the evaluation order of function arguments is implementation defined. 20161009 21:59:24-!- atarocch [~atarocch@93.56.160.28] has quit [Remote host closed the connection] 20161009 22:00:07< vultraz> tad_: why IS that false :| 20161009 22:00:52< aeth> tad_: That's why I like languages that are designed around REPLs. Very useful for testing the strange edge cases that every single language has. 20161009 22:00:53< vultraz> are you saying n.0 == n is always false? 20161009 22:01:01< DeFender1031> and the truth is, i've never dealt with floating point issues even in JS. The maximum is beyond anything that I generally encounter and I have a constant hard-coded into the libraries I use for what the maximum possible value is without affecting the exponentiation. 20161009 22:01:03< tad_> vultraz, Because, every now and then when do it you get epsilon instead of 0.0 and epsilon is != 0 20161009 22:01:06< aeth> Probably the main thing I'd say against C++ is no built-in REPL. 20161009 22:01:31< aeth> (And yes ahead of time compiled languages can have REPLs, you just compile the statement quickly before evaluating it.) 20161009 22:01:43< aeth> (With default imports.) 20161009 22:02:29< tad_> aeth, Then wait for C++ next standard. 20161009 22:02:40< zookeeper> gfgtdf, so, i do think that fire_event=yes makes more sense as the default, but i'd think there's some reason why it's not. could be that it was done simply to not change the default behavior. 20161009 22:03:46< zookeeper> gfgtdf, basically i think that if you're modifying a unit's experience then you should specify advance= and fire_event= anyway when you unstore 20161009 22:04:06< tad_> zookeeper, Consider the case of doing the advancement as part of the end-of-scenario cleanup and preparation for the next. 20161009 22:04:31< gfgtdf> zookeeper: so it'd if advance=no was the default? 20161009 22:04:38< zookeeper> and in all other cases either the unit can't have enough XP to level, or it's in an advance or attack end event or something like that and you probably don't want to affect when the advancement happens 20161009 22:04:55< gfgtdf> it'd be better* 20161009 22:05:03< zookeeper> gfgtdf, maybe 20161009 22:05:20< EliDupree> tad_: Are you saying that then advance SHOULDN'T be fired? It seems to me that it still should 20161009 22:05:26< celticminstrel> vultraz: The real reason why passing a reference to the shared_ptr causes a crash is probably that the shared_ptr is a local variable. 20161009 22:05:29< tad_> changing a default, especially when it has visible effects for the players, needs a lot of consideration. 20161009 22:05:51< celticminstrel> tad_: Surely if you write literally "0.0 == 0" it'll always be true. 20161009 22:06:04< celticminstrel> It'd be if one side was the result of a calculation that you have to worry, right? 20161009 22:06:12< vultraz> celticminstrel: ah. did yous ee my question from last night? 20161009 22:06:41< tad_> celticminstrel, Well, I probably should do some math to get 0.0 such as (2.0/2.0)-1.0 20161009 22:06:48< gfgtdf> tad_: lua 5.2 had an optimisation for the double->int conversion 20161009 22:06:57< celticminstrel> vultraz: Probably. I don't remember. 20161009 22:07:15< celticminstrel> tad_: Yeah, that was my point. 20161009 22:07:16< gfgtdf> tad_: that was somethign like : 1) add a constant value, 2) reintepet cast 3) bitshit. 20161009 22:07:31< zookeeper> gfgtdf, i do vaguely remember that the default for advance= was shuffled around once or twice due to... some reasons 20161009 22:07:34< gfgtdf> tad_: problem was it relied in IEEE754 float layout 20161009 22:07:37< vultraz> [21:13:37] vultraz celticminstrel: so, my problem is this. when I you switch teams, the appropriate child node is removed from the parent node and added to the new team's. add_child has an optional third argument for position, and I cannot figure out how to get a valid position value, out of the number of child nodes in that team's node, in the numerical order of the corresponding side.index() val 20161009 22:07:39< vultraz> ue. 20161009 22:07:40< vultraz> [21:13:42] vultraz s/I// 20161009 22:07:41< vultraz> [21:16:50] vultraz celticminstrel: I considered declaring an array the size of the team node's tree, iterating over all side engines while checking the teams and pushing the indexes of the specific sides to said array then iterating over the array to get a position, but that seems horribly inefficient and I'm sure that's not the best way to do it. 20161009 22:08:01< zookeeper> gfgtdf, so it's probably been given some consideration already. whether it still makes sense, i don't know 20161009 22:08:01< tad_> gfgtdf, But all numbers are stored as floats. We might find that optimization is gone in 5.3 (have not looked) because now they have int64 native values 20161009 22:08:05< gfgtdf> tad_: some programms, specially on windows, change the fpu precision which borke that code. 20161009 22:08:22< gfgtdf> broke* 20161009 22:08:43< tad_> #define BORKBORKBORK Windows 20161009 22:08:52< celticminstrel> Oh yeah, I saw that. 20161009 22:09:02< celticminstrel> I don't have time to think about it right now though, sorry. Thanksgiving. 20161009 22:09:10< vultraz> what? 20161009 22:09:14< vultraz> it's october- 20161009 22:09:15< vultraz> ohhh 20161009 22:09:18< celticminstrel> :P 20161009 22:09:26< gfgtdf> s/bitshit/bitshift 20161009 22:09:37< zookeeper> gfgtdf, i'm off to bed but if you remind me tomorrow i can try to dig up some old discussions and see if there's anything relevant there 20161009 22:09:41< DeFender1031> gfgtdf, I assume you meant "bitshiFt" above, but "bitshit" is just about the best description of floating point errors I've ever seen. :P 20161009 22:10:42< DeFender1031> vultraz, it seems like a binary search could help you here. 20161009 22:10:45< tad_> Well, I need to switch back to Linux .. GIT on Windows BORKED my Lua PR and I need to fix it before gfgtdf freaks that the deleted strcmp stuff reappeared. 20161009 22:10:55< vultraz> DeFender1031: oh? 20161009 22:11:03< vultraz> DeFender1031: explain 20161009 22:11:15< DeFender1031> you're moving something from one ordered container to another ordered container, no? 20161009 22:11:20-!- tad_ [~lundberg@173.217.65.103] has quit [Quit: Leaving] 20161009 22:11:32< vultraz> actually, no :) 20161009 22:11:45< vultraz> but I want it to appear ordered. 20161009 22:11:48< DeFender1031> ah 20161009 22:12:11< vultraz> so, here's how it works 20161009 22:12:44< vultraz> the vector I iterate over here: https://github.com/wesnoth/wesnoth/blob/master/src/gui/dialogs/multiplayer/mp_staging.cpp#L90 20161009 22:12:49< vultraz> happens to be in order of side.index 20161009 22:12:57< vultraz> it's not sorted, it's simply constructed that way 20161009 22:13:52< DeFender1031> alright. that makes sense. 20161009 22:14:11< DeFender1031> meaning, the vector indexes ARE the side numbers intrinsically 20161009 22:14:30< DeFender1031> so then what's ACTUALLY being moved? 20161009 22:14:35< vultraz> As you can see, a few lines down, I check to see whether the team for that side is already in the map of 20161009 22:14:43< vultraz> if so, not, I make a new team node 20161009 22:15:02< DeFender1031> okay 20161009 22:15:07< vultraz> then i add a new child node to the appropriate team node 20161009 22:15:31< vultraz> so in the UI, you'll see maye 20161009 22:15:39< vultraz> team 1: 1,4, team 2: 2,3 20161009 22:16:05< DeFender1031> and what is a team node actually? 20161009 22:16:08< vultraz> so right now, these node are intrinsically ordered by team AND numerical sequence 20161009 22:16:15< vultraz> DeFender1031: it's just a toplevel tree node 20161009 22:16:34< DeFender1031> okay, and the stuff inside it is sorted, yes? 20161009 22:16:38< vultraz> now, when you select a new team 20161009 22:16:39< vultraz> https://github.com/wesnoth/wesnoth/blob/master/src/gui/dialogs/multiplayer/mp_staging.cpp#L339 20161009 22:16:46< vultraz> that node gets removed 20161009 22:17:28< vultraz> using map[side] as a lookup, and then a new node constructed as a child of the appropriate team node 20161009 22:17:31< DeFender1031> this is selecting a different team for a particular side? 20161009 22:17:37< vultraz> yes 20161009 22:17:45< vultraz> it gets moved between parent nodes 20161009 22:18:05< vultraz> now, you can insert a node into a specific position in it's children 20161009 22:18:10< vultraz> vector 20161009 22:18:12< DeFender1031> okay, and is the team node an iterable container which is itself storing its child nodes in side order? 20161009 22:18:15< vultraz> or ptr_vector, actually 20161009 22:18:41< vultraz> DeFender1031: it stores them in side order *only* because the source vector was by side order when it was iterated over 20161009 22:18:54< vultraz> once i start moving teams around, that order disintegrates 20161009 22:19:01< vultraz> you'lln otice i have 2 maps in this dialog 20161009 22:19:04< DeFender1031> not if you maintain it 20161009 22:19:10< vultraz> map and map 20161009 22:19:17< vultraz> the former is the toplevel team nodes 20161009 22:19:27< vultraz> the latter is the nodes for each side. 20161009 22:19:49< DeFender1031> meaning, if when you move a team around, you binary search the team node into which to insert it for the proper insert position, and then use that to update the display 20161009 22:19:51< vultraz> as I said, you can pass a third argument to add_child to specify a position to add the new node 20161009 22:20:02< vultraz> but I cannot figure out how to get that value 20161009 22:20:30< DeFender1031> can you not get iterators to the team node's begin() and end()? 20161009 22:20:41< vultraz> I suppose so 20161009 22:20:46< vultraz> I'd have to look at the walker impl 20161009 22:20:56< vultraz> (note to self: we shouldn't need this weird walker busines) 20161009 22:21:05< vultraz> but even if I did 20161009 22:21:08< DeFender1031> http://www.cplusplus.com/reference/algorithm/lower_bound/ 20161009 22:21:14< vultraz> I don't have a node, side map 20161009 22:21:22< vultraz> it's side, node :| 20161009 22:22:28< DeFender1031> oh! I see the problem. 20161009 22:22:35< vultraz> so say i walk a node's children, how would i most efficiently get the appropriate side? 20161009 22:22:42< vultraz> if only there were something like a two-way map. 20161009 22:22:43-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20161009 22:22:55< vultraz> that could be accessed by either K or V. 20161009 22:22:57< DeFender1031> The nodes don't actually contain the side number to compare against, because the side number is the index of the vector that the nodes are in 20161009 22:23:29< vultraz> kinda... yeah. 20161009 22:23:35< DeFender1031> so you can't just do lower_limit() and pass it a comparator that checks the node's .side member or whatever, because there IS no .side member. 20161009 22:23:46< vultraz> nodes know nothing of the data they hold. 20161009 22:23:58< vultraz> the only connection here is the map 20161009 22:24:13< DeFender1031> what exactly is a "node" then? 20161009 22:24:28< vultraz> (keep in mind, side is a shared_ptr to a class instance in a vector, btw) 20161009 22:24:57< DeFender1031> oh, these nodes are UI nodes? 20161009 22:25:02< vultraz> a node is just a GUI2 thing 20161009 22:25:05< DeFender1031> got it. 20161009 22:25:08< vultraz> yes 20161009 22:25:10< vultraz> UI 20161009 22:25:20< vultraz> it's used with the tree_view widget 20161009 22:25:27< vultraz> tree_views contain nodes. 20161009 22:25:36< vultraz> nodes can have child nodes and sibling nodes. 20161009 22:25:56< DeFender1031> so one way would be to keep a parallel data set which matches the ui structure you have and DOES store the side numbers so that you can use it as a lookup 20161009 22:26:03< vultraz> anyway, I'm gonna get some breakfast. 20161009 22:26:06< vultraz> you ponder over this 20161009 22:27:15-!- tad_ [~tadcarluc@173.217.65.103] has joined #wesnoth-dev 20161009 22:27:15-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has joined #wesnoth-dev 20161009 22:28:15-!- tad_ [~tadcarluc@173.217.65.103] has quit [Client Quit] 20161009 22:28:29-!- tad_ [~lundberg@173.217.65.103] has joined #wesnoth-dev 20161009 22:28:37< DeFender1031> if you create a map of team name as key, some container of ints as value, then any time you add a display node for a side, you also add that side's number to this map in the appropriate place, you can then use binary search on it when something gets moved and you need to insert it, as the positions in this structure would always match those of the display tree. 20161009 22:28:48< vultraz> a thing to remember is that this is also a lot of work for little payoff 20161009 22:29:01< vultraz> at most you'll usually have, what, 2 or 3 sides on a team 20161009 22:29:10< DeFender1031> true. 20161009 22:29:22< vultraz> since there used to be a hard limit of 9 and idk if any mp maps use more 20161009 22:29:38< DeFender1031> is there a side limit anymore? 20161009 22:29:49< tad_> vultraz, I think I saw the hard limit in code recently. 20161009 22:30:20< vultraz> huh 20161009 22:30:24< vultraz> gfgtdf would know 20161009 22:30:26< DeFender1031> right, so then it seems like iterating over the original array to get the position each time might actually be the best option. 20161009 22:30:27 * tad_ wonders what a massively multi-player scenario would look like. 20161009 22:30:56< gfgtdf> there is not size limit currently, its just that we have only 9 team colors 20161009 22:31:00< DeFender1031> that'd just be looking for the side you're moving, and keeping a counter of how many sides with the same team name come before it. 20161009 22:31:10< gfgtdf> so as soon as there are 9 sides some sides eed to share a color 20161009 22:31:34< tad_> Then that's probably the '9' I saw 20161009 22:31:46< gfgtdf> 1.12 also had a side limit of 9 20161009 22:32:19< gfgtdf> i removed that, mainly because i saw that some LoW scneario actuall used more than 9 sides in a scenario. 20161009 22:32:26< tad_> gfgtdf, PR 815 is un-borked. 20161009 22:32:57< DeFender1031> gfgtdf, i'm looking at team-colors.cfg and there are far more here than 9 20161009 22:33:05< DeFender1031> gfgtdf, (even in 1.12) 20161009 22:33:16< tad_> If there are no more comments on it, I think it's ready to merge (before I bork it again using Windoze). 20161009 22:33:24< gfgtdf> DeFender1031: hmm but onyl 9 of them have number values i think 20161009 22:33:54< DeFender1031> gfgtdf, true, but that's not the same thing as only having 9 colors. 20161009 22:34:20< DeFender1031> gfgtdf, i see 15 generic colors in 1.12, and then a whole bunch of terrain-based colors for the icon recoloring hack. 20161009 22:34:23< tad_> And a designer can solve the 9-color limit by hand assigning 20161009 22:34:37< gfgtdf> DeFender1031: well we have only 9 default colors, and also just 9 colors avaiiable in th mo connect options. 20161009 22:34:47< gfgtdf> mp* 20161009 22:35:09< DeFender1031> gfgtdf, the other ones can be added as more defaults easily enough... 20161009 22:35:31< gfgtdf> DeFender1031: in both 1.12 and 1.13 the 'color' combobox in mp connect shows only 9 colors. 20161009 22:35:53< gfgtdf> DeFender1031: and i think this is hardcoded in the c++ code 20161009 22:35:54-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has quit [Quit: horrowind] 20161009 22:36:07< gfgtdf> DeFender1031: the number of default colors migth be hardcoded aswell 20161009 22:36:25< tad_> Traditionally I've used CMake to build Wesnoth on Linux. I want to work on my changes for SCons. Are there any gotchas involved in building with one, then the other which I should look out for? 20161009 22:36:47< DeFender1031> gfgtdf, so then that's more of an issue. 20161009 22:38:25< gfgtdf> DeFender1031: well yes, you can try to fix it if you want. This block of 9 different string->color conversion functuions https://github.com/wesnoth/wesnoth/blob/master/src/team.hpp#L363 has always discouraged me from trying that. 20161009 22:39:37< gfgtdf> DeFender1031: specialyl when you never know whether teh parmaters are team number of the index of the team in the vector (that is team number -1) 20161009 22:39:41< DeFender1031> why are there so many functions to get the same thing?! 20161009 22:40:00< DeFender1031> gfgtdf, oh dear. 20161009 22:40:09< DeFender1031> that sounds terrifying 20161009 22:41:47-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Quit: wedge009] 20161009 22:42:01-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20161009 22:55:06-!- rnatthiaskrgr is now known as matthiaskrgr 20161009 23:02:34-!- Duthlet [~Duthlet@dslb-188-104-253-155.188.104.pools.vodafone-ip.de] has quit [Quit: leaving] --- Log closed Mon Oct 10 00:00:57 2016