--- Log opened Tue Jun 07 00:00:13 2016 20160607 00:50:09-!- victorclf [~victorclf@187.181.129.74] has joined #wesnoth 20160607 00:54:10-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160607 00:56:48-!- vo_id [~vo_id@host86-186-207-237.range86-186.btcentralplus.com] has quit [Quit: Leaving] 20160607 01:43:01-!- Bonobo [~Bonobo@2001:44b8:254:3200:bc92:b6d6:43e7:6ed7] has joined #wesnoth 20160607 01:52:34-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth 20160607 01:55:52-!- vultraz [~chatzilla@124.109.10.167] has joined #wesnoth 20160607 01:55:52-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20160607 01:55:52-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth 20160607 02:05:35-!- ArneBab_ [~quassel@55d44dd7.access.ecotel.net] has joined #wesnoth 20160607 02:08:16-!- prophile [~alynn@oftn/oswg-member/prophile] has quit [Read error: Connection reset by peer] 20160607 02:09:12-!- prophile [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 02:10:14-!- ArneBab [~quassel@55d408a5.access.ecotel.net] has quit [Ping timeout: 272 seconds] 20160607 02:47:41-!- demok [~okan@85.101.177.136] has quit [Ping timeout: 258 seconds] 20160607 02:48:41-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth 20160607 02:49:05-!- prophile [~alynn@oftn/oswg-member/prophile] has quit [Read error: Connection reset by peer] 20160607 02:49:44-!- prophile [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 03:03:22-!- victorclf [~victorclf@187.181.129.74] has quit [Quit: Leaving] 20160607 03:28:46-!- ancestral [~ancestral@67-4-254-184.mpls.qwest.net] has joined #wesnoth 20160607 03:34:29-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth 20160607 03:38:55-!- kinow [~kinow@apache/committer/kinow] has quit [Quit: Leaving] 20160607 03:45:11-!- ancestral [~ancestral@67-4-254-184.mpls.qwest.net] has quit [Ping timeout: 258 seconds] 20160607 03:49:21-!- ancestral [~ancestral@67-4-254-184.mpls.qwest.net] has joined #wesnoth 20160607 04:10:08-!- ancestral [~ancestral@67-4-254-184.mpls.qwest.net] has quit [Read error: Connection reset by peer] 20160607 04:10:16-!- ancestral [~ancestral@67-4-254-184.mpls.qwest.net] has joined #wesnoth 20160607 04:54:33-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 240 seconds] 20160607 05:04:10-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160607 05:12:07-!- vultraz [~chatzilla@124.109.10.167] has joined #wesnoth 20160607 05:12:07-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20160607 05:12:07-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth 20160607 05:19:04-!- demok [~okan@85.101.177.136] has joined #wesnoth 20160607 05:21:09-!- demok [~okan@85.101.177.136] has quit [Remote host closed the connection] 20160607 05:29:09-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20160607 06:10:56-!- Haldrik [~haldrik@unaffiliated/haldrik] has joined #wesnoth 20160607 06:36:13-!- demok [~okan@78.161.186.36] has joined #wesnoth 20160607 07:00:10-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth 20160607 07:27:27-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has joined #wesnoth 20160607 07:28:47-!- The_Unforgiven [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Ping timeout: 250 seconds] 20160607 07:30:44-!- Kwandulin [~Miranda@p200300760F3B06CB7D2D187DC617E8E4.dip0.t-ipconnect.de] has joined #wesnoth 20160607 07:42:09-!- irco [~irco@HSI-KBW-078-042-015-165.hsi3.kabel-badenwuerttemberg.de] has joined #wesnoth 20160607 07:56:52-!- Appleman1234 [~Appleman1@KD036012044004.au-net.ne.jp] has quit [Ping timeout: 252 seconds] 20160607 07:58:12-!- shadowm is now known as forcepushm 20160607 08:00:40-!- prophile [~alynn@oftn/oswg-member/prophile] has quit [Read error: Connection reset by peer] 20160607 08:01:18-!- prophile [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 08:02:52-!- forcepushm is now known as shadowm 20160607 08:07:50-!- brts [~brts@88.210.182.128] has quit [Quit: Leaving] 20160607 08:08:09-!- brts [~brts@88.210.182.128] has joined #wesnoth 20160607 08:54:05-!- Appleman1234 [~Appleman1@KD036012048075.au-net.ne.jp] has joined #wesnoth 20160607 08:58:27-!- prophile [~alynn@oftn/oswg-member/prophile] has quit [Read error: Connection reset by peer] 20160607 08:59:12-!- prophile [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 09:14:59-!- ancestral [~ancestral@67-4-254-184.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160607 10:14:43-!- Alduin_ [~Alduin@2001:4ca0:4fff:1::6] has joined #wesnoth 20160607 10:29:31-!- Kwandulin_2 [~Miranda@p200300760F3B06CB7D2D187DC617E8E4.dip0.t-ipconnect.de] has joined #wesnoth 20160607 10:31:20-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth 20160607 10:32:28-!- Kwandulin [~Miranda@p200300760F3B06CB7D2D187DC617E8E4.dip0.t-ipconnect.de] has quit [Ping timeout: 272 seconds] 20160607 10:55:25-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160607 11:26:36-!- irco [~irco@HSI-KBW-078-042-015-165.hsi3.kabel-badenwuerttemberg.de] has quit [Ping timeout: 246 seconds] 20160607 12:21:01-!- lipkab [~the_new_l@host-91-147-210-58.biatv.hu] has joined #wesnoth 20160607 12:26:08-!- RatArmy [~RatArmy@om126229088163.12.openmobile.ne.jp] has joined #wesnoth 20160607 12:38:36-!- Kwandulin_2 [~Miranda@p200300760F3B06CB7D2D187DC617E8E4.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160607 12:43:03-!- RatArmy [~RatArmy@om126229088163.12.openmobile.ne.jp] has quit [Quit: Konversation terminated!] 20160607 13:16:03-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: mattsc] 20160607 13:26:02-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth 20160607 13:53:57-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Ping timeout: 260 seconds] 20160607 13:54:41-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has joined #wesnoth 20160607 14:01:03-!- Kwandulin [~Miranda@p200300760F3B06CBE1C0C45D8A58B99E.dip0.t-ipconnect.de] has joined #wesnoth 20160607 14:10:29-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: mattsc] 20160607 14:16:18< DeFender1031> is there a simple way to say "search the recall list for the first unit matching these criteria, sorted by a priority on these other criteria and place it in this spot on the map, or create a new unit of a given type if none is found" without having to code a ton of [if][else]s? For example, if I wanted to search the recall list for a unit in the spearman advancement tree, and if there are any with the loyal trait, pick one of those, and if there 20160607 14:16:19< DeFender1031> are multiple after that check, pick the one with the highest level, and if there's multiple of those, pick the one closest to its next advancement, and if there are nothing, then just create a new spearman, is there a way to do that without coding all that logic myself? 20160607 14:23:33< Ravana_> I find that unlikely, though I guess I would implement it in Lua 20160607 14:25:31< DeFender1031> that would require me to learn Lua, which I plan to get around to, but don't have time for at the moment 20160607 14:25:38< DeFender1031> :P 20160607 14:26:30-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Ping timeout: 250 seconds] 20160607 14:27:20< DeFender1031> i was hoping for something like [store_unit_by_priority] or something that would take a series of unit filters and go through them sequentially until it finds one or something 20160607 14:27:41< DeFender1031> [role] is kinda close, though it only has the priority thing for type, not the rest. 20160607 14:27:43-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has joined #wesnoth 20160607 14:30:33-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth 20160607 14:31:53-!- Kwandulin [~Miranda@p200300760F3B06CBE1C0C45D8A58B99E.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160607 14:55:05< zookeeper> no, there is no such way. 20160607 14:56:19< zookeeper> what i'd do is [store_unit] with the most important criteria, check if it's empty, if it is, then [store_unit] again with a lesser criteria, etc. 20160607 14:56:42< zookeeper> and yeah conceivably you could write such a tag in lua. 20160607 14:57:24-!- Kwandulin [~Miranda@p200300760F3B06CB60575016AFDE6F5A.dip0.t-ipconnect.de] has joined #wesnoth 20160607 15:00:09-!- prophile [~alynn@oftn/oswg-member/prophile] has quit [Read error: Connection reset by peer] 20160607 15:00:49-!- prophile [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 15:02:09-!- Alduin_ [~Alduin@2001:4ca0:4fff:1::6] has quit [Ping timeout: 258 seconds] 20160607 15:07:53-!- The_Unforgiven [~quassel@unaffiliated/the-unforgiven/x-8713611] has joined #wesnoth 20160607 15:08:37-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Ping timeout: 260 seconds] 20160607 15:12:40< DeFender1031> zookeeper, that's what i'd been doing, but then I thought "there must be a better way" 20160607 15:12:50< DeFender1031> here's a different question 20160607 15:12:56< DeFender1031> is there a simple way to sort an array? 20160607 15:13:50< DeFender1031> some kind of tag that takes and array and a formula that it runs against two entries to see which one is greater than the other (like the sort functions in many languages) 20160607 15:15:09-!- demok [~okan@78.161.186.36] has quit [Remote host closed the connection] 20160607 15:17:37< zookeeper> not that i know of 20160607 15:18:14< zookeeper> i wouldn't be surprised if it was very simple to do in lua though. 20160607 15:18:35< zookeeper> thus qualifying as a simple way even if you'd have to embed a bit of lua code 20160607 15:28:29< DeFender1031> i get it, i get it, Lua is a must for any serious wesnoth creation... :P 20160607 15:32:55-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth 20160607 15:33:31< mattsc> DeFender1031: I wrote pick_best_unit macros in WML in one of my campaigns that do at least part of what you suggest there. But yes, they involve a ton of code. 20160607 15:33:45< mattsc> I can check where those are and point you to those if you want. 20160607 15:34:04-!- trolling [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 15:34:31< DeFender1031> mattsc, thanks, that sounds like it might be useful 20160607 15:37:48-!- prophile [~alynn@oftn/oswg-member/prophile] has quit [Ping timeout: 276 seconds] 20160607 15:44:05-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth 20160607 15:44:47< mattsc> DeFender1031: https://github.com/mattsc/Grnk-git/blob/master/Grnk/utils/Grnk_general_utils.cfg#L603 20160607 15:45:24< mattsc> also see RECALL_BEST_UNIT, SELECT_BEST_UNIT and possibly other macros in the same file 20160607 15:46:10< DeFender1031> this is odd... it lookes like a [store_unit] [unstore_unit] is faster than a [teleport] 20160607 15:46:14< DeFender1031> mattsc, thanks 20160607 15:48:12< mattsc> DeFender1031: Keep in mind that this is code I wrote a long time ago and I did not check right now whether there are better ways to do it (either because WML has changed or because I know more now). 20160607 15:50:32< DeFender1031> mattsc, it's cool. I'd probably modify it anyway. At least now i have a basic idea of how to even generify what i was talking about as a macro (though Ravana_ and zookeeper are right, Lua would probably be better here) 20160607 15:51:46< mattsc> Yeah, I’d probably do that too these days. This was written before I knew anything about Lua. 20160607 15:52:16-!- irco [~irco@HSI-KBW-078-042-015-165.hsi3.kabel-badenwuerttemberg.de] has joined #wesnoth 20160607 16:01:22-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160607 16:21:04-!- Kwandulin [~Miranda@p200300760F3B06CB60575016AFDE6F5A.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160607 16:22:01-!- Bonobo [~Bonobo@2001:44b8:254:3200:bc92:b6d6:43e7:6ed7] has quit [Quit: Leaving] 20160607 16:30:33< vultraz> [02:46:06] DeFender1031 this is odd... it lookes like a [store_unit] [unstore_unit] is faster than a [teleport] 20160607 16:30:36< vultraz> DeFender1031: tell me more 20160607 16:32:43< vultraz> hm 20160607 16:32:51< vultraz> looking at the code you are right, it should be faster 20160607 16:35:05< DeFender1031> vultraz, why would that be faster? 20160607 16:35:05< vultraz> celticminstrel: can you look a bit deeper at game_lua_kernel::intf_teleport if you have time. 20160607 16:35:25< vultraz> DeFender1031: looks like teleport is doing a lot of stuff a store and an unstore does not 20160607 16:35:31< DeFender1031> ah 20160607 16:35:33< celticminstrel> Like animations? 20160607 16:35:42< vultraz> Partly... 20160607 16:35:55< vultraz> but an animation-less teleport should be just as fast 20160607 16:35:55< DeFender1031> oh, that reminds me, one thing teleport DOESN'T do that store/unstore DOES is maintain the direction a unit is facing 20160607 16:36:04< vultraz> Which is why I'm asking you to look at it 20160607 16:36:14< zookeeper> really? 20160607 16:36:22< DeFender1031> vultraz, right. I'm talking about a teleport with no animation and no passability check. 20160607 16:36:40< vultraz> DeFender1031: sounds like a performance issue. We'll look into it and fix the facing issue. 20160607 16:36:45< zookeeper> that's... curious. i'd be inclined to say that it should not affect facing, a minor issue as it may be. 20160607 16:37:37< vultraz> units().move(src_loc, vacant_dst); 20160607 16:37:45< celticminstrel> Sotre/unstore shouldn't affect facing, should it? 20160607 16:37:50< DeFender1031> right. well, in the meantime, i'm doing store/unstore because using teleport was creating enough of a delay that it made the cutscene choppy. 20160607 16:37:52< vultraz> no it should not 20160607 16:37:55< celticminstrel> The facing is included in the config, isn't it? 20160607 16:37:56< DeFender1031> celticminstrel, no, it doesn't, but teleport does. 20160607 16:38:10< celticminstrel> Oh, okay. 20160607 16:38:23< celticminstrel> Maybe that's intentional. 20160607 16:38:26< vultraz> celticminstrel: store/unstore keeps facing, teleport does not 20160607 16:38:35< vultraz> i think he's saying 20160607 16:38:41< celticminstrel> Yeah, I got it. 20160607 16:38:48< DeFender1031> meaning, you store/unstore a unit facing nw, it'll still be nw, but teleport that same unit, and it'll be facing... south i think? i didn't check to be sure 20160607 16:39:07< celticminstrel> I would guess that it depends on the direction you teleport it in... 20160607 16:44:54< DeFender1031> ah. it might. didn't consider that, just noticed they weren't facing the same way. 20160607 16:59:42-!- brts [~brts@88.210.182.128] has quit [Ping timeout: 276 seconds] 20160607 17:02:30-!- demok [~okan@85.101.177.136] has joined #wesnoth 20160607 17:11:55-!- claymore2 [~hexchat@host86-165-240-55.range86-165.btcentralplus.com] has joined #wesnoth 20160607 17:31:41-!- Kwandulin [~Miranda@p200300760F3B06CB79627A629B91D3EC.dip0.t-ipconnect.de] has joined #wesnoth 20160607 17:39:56< DeFender1031> alright, fine. I'm giving in. You guys have any good resources for learning wesnoth's particular flavor of Lua? 20160607 17:40:13< DeFender1031> (specifically resources for someone who knows code already and just needs to learn the language) 20160607 17:46:01-!- claymore2 [~hexchat@host86-165-240-55.range86-165.btcentralplus.com] has quit [Ping timeout: 240 seconds] 20160607 17:53:03-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has joined #wesnoth 20160607 17:53:42-!- The_Unforgiven [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Ping timeout: 260 seconds] 20160607 17:55:47-!- brts [~brts@88.210.182.128] has joined #wesnoth 20160607 17:57:22-!- wario [~wario_@unaffiliated/wario] has joined #wesnoth 20160607 17:57:23-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth 20160607 18:00:39< celticminstrel> https://www.lua.org/pil/contents.html 20160607 18:00:50< celticminstrel> https://wiki.wesnoth.org/LuaWML 20160607 18:00:56< celticminstrel> DeFender1031: ^ 20160607 18:01:25< celticminstrel> Also https://www.lua.org/manual/5.2/ 20160607 18:01:45< celticminstrel> But that's more for reference once you know the basics, I'd say. 20160607 18:02:29< celticminstrel> Though if you basically know programming already, I suppose it might not be as bad a place to start. 20160607 18:02:34< celticminstrel> I dunno. 20160607 18:05:27-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160607 18:10:25-!- claymore2 [~hexchat@host86-165-240-55.range86-165.btcentralplus.com] has joined #wesnoth 20160607 18:17:44< DeFender1031> celticminstrel, i've been told that lua has some strange language changes between versions. I assume these links cover the version wesnoth is using? (i see a 5.2 in one of them, so i would imagine that's that) 20160607 18:18:00< celticminstrel> Both links cover 5.2. 20160607 18:18:31< DeFender1031> which, obviously, you wouldn't be linking to if it weren't the version in use by wesnoth 20160607 18:18:35< celticminstrel> I don't believe PIL for 5.3 exists yet. 20160607 18:18:42< celticminstrel> Yeah, Wesnoth uses 5.2. 20160607 18:22:04< DeFender1031> this... is a book. A long-looking book. 20160607 18:22:57< DeFender1031> do you know if there's a pdf version somewhere on their site? it'd be easier for me to read on my tablet... 20160607 18:24:22< celticminstrel> It doesn't look like it... 20160607 18:24:41< celticminstrel> An e-book is available, but it looks like that's not free. 20160607 18:26:03< DeFender1031> :/ 20160607 18:26:23< celticminstrel> I also found this, no idea if it's good: http://lua-users.org/wiki/LuaTutorial 20160607 18:26:40< DeFender1031> i think i found a pdf copy of PIL, but i can only find a pdf of the reference manual for 5.2 20160607 18:27:06< DeFender1031> isn't there some kind of syntax crash course for people who already know code? 20160607 18:27:34< celticminstrel> Not sure. 20160607 18:27:40< celticminstrel> I imagine it would probably exist somewhere. 20160607 18:28:21< celticminstrel> Maybe skimming the reference manual could help with that... 20160607 18:28:34< celticminstrel> Though that's probably not ideal, I suppose. 20160607 18:29:41< DeFender1031> yeah... I think i'll start by skimming google results for "Lua crash course" :P 20160607 18:33:28-!- SigurdFD [~SigurdFD@dynamic-acs-72-23-176-151.zoominternet.net] has joined #wesnoth 20160607 19:02:16-!- trolling [~alynn@oftn/oswg-member/prophile] has quit [Read error: Connection reset by peer] 20160607 19:02:57-!- prophile [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 19:37:25-!- Kwandulin [~Miranda@p200300760F3B06CB79627A629B91D3EC.dip0.t-ipconnect.de] has quit [Ping timeout: 260 seconds] 20160607 19:37:56-!- prophile [~alynn@oftn/oswg-member/prophile] has quit [Read error: Connection reset by peer] 20160607 19:38:14< DeFender1031> celticminstrel, i foudn a crash course and now have a reasonable handle on the Lua syntax. You mentioned something the other day about being able to extend existing functions, but I'm not sure how to do that. 20160607 19:38:36-!- prophile [~alynn@oftn/oswg-member/prophile] has joined #wesnoth 20160607 19:38:45-!- claymore2 [~hexchat@host86-165-240-55.range86-165.btcentralplus.com] has quit [Quit: Leaving] 20160607 19:54:22< celticminstrel> DeFender1031: Functions are values. 20160607 19:54:33< celticminstrel> Thus, you can do something like this: 20160607 19:54:58< celticminstrel> local old_put_unit = wesnoth.put_unit 20160607 19:55:17< celticminstrel> function wesnoth.put_unit() (do stuff here and then call old_put_unit) 20160607 19:55:28 * celticminstrel isn't sure if put_unit is the correct name, though. 20160607 19:55:37< DeFender1031> ah, it was unclear to me that functions were first-class variables. I use that technique all the time in javascript actually. 20160607 19:56:12< DeFender1031> rewriting functions... self-rewriting functions... all of that. 20160607 19:56:18< celticminstrel> Come to think of it, in 1.13 that won't work perfectly due to the OO-style option... 20160607 19:56:18< DeFender1031> fun stuff. 20160607 19:56:28< DeFender1031> huh? 20160607 19:56:31< celticminstrel> I don't think Lua has a way to get a function's code though. 20160607 19:56:41< DeFender1031> what's the "OO-style option"? 20160607 19:56:56< DeFender1031> i'm not talking about getting the function's code 20160607 19:57:01< celticminstrel> In 1.13 you can do things like unit:to_map(x,y) instead of wesnoth.put_unit(x,y) -- again, not quite sure of the actual names. 20160607 19:57:15< DeFender1031> a self-rewriting function means that it replaces itself with something ese when it's run 20160607 19:57:20< celticminstrel> Ah. 20160607 19:57:35< DeFender1031> modifying code directly would be an eval no-no. 20160607 19:57:48-!- bool_ [~bool_@unaffiliated/bool-/x-1030778] has quit [Quit: ZNC - http://znc.in] 20160607 19:58:07< celticminstrel> I think I've done something like that in a JS game. 20160607 19:58:17< DeFender1031> okay... and how does that syntax with the : work? 20160607 19:58:25< celticminstrel> Some AI routines set a monster's AI routine to something else. 20160607 19:58:49< celticminstrel> The call "blah:do_something(a,b,c)" is exactly equivalent to the call "blah.do_something(self,a,b,c)". 20160607 19:59:06< celticminstrel> There's no implicit this/self parameter in Lua with dot access. 20160607 19:59:10< celticminstrel> So the colon fills that role. 20160607 19:59:17< DeFender1031> ah 20160607 19:59:23-!- bool_ [~bool_@unaffiliated/bool-/x-1030778] has joined #wesnoth 20160607 19:59:38< celticminstrel> Oh right, I wrote "self" but it should've been "blah:, 20160607 19:59:42< celticminstrel> ^"blah" 20160607 19:59:47< DeFender1031> well, JS's "this" handling is not the best. 20160607 19:59:49< celticminstrel> blah.do_something(blah,a,b,c) 20160607 20:00:38< celticminstrel> There's also nothing special about the name "self". It's just a convention. You could call it "this" if you preferred. 20160607 20:00:53< DeFender1031> would be better if "this" without an explicit assignment (calling from member, .call, .apply, or new) would revert to the "this" in the parent scope rather than all the way up to "window" 20160607 20:01:08< DeFender1031> right. makes sense 20160607 20:01:26< celticminstrel> Well, you can easily get that effect by writing this.f() instead of just f(). 20160607 20:01:39< DeFender1031> so basically blah:something(a,b,c) ensures that blah gets passed as the first param with a, b, and c following. 20160607 20:01:53< DeFender1031> no no, not the calling scope, the definition scope. 20160607 20:02:10< celticminstrel> Huh? 20160607 20:02:17< celticminstrel> And yes, that's what that does. 20160607 20:02:56< DeFender1031> like you have: function SomeConstructor() { setTimeout(function() { this.doSomething(); }, 5000); } 20160607 20:03:17< DeFender1031> in JS, this will fail with an error like "window.doSomething is undefined or not a function" 20160607 20:03:40< celticminstrel> Oh. 20160607 20:03:48< DeFender1031> what i'd LIKE it to do is call the doSomething function belonging to this instance of SomeConstructor 20160607 20:04:10< celticminstrel> I can understand that, though I don't think it'd be possible to do in any sane way... 20160607 20:04:28< celticminstrel> That anonymous function might have been applied on an object, after all. 20160607 20:04:29< DeFender1031> and i have structures like this in my JS a LOT... I end up having to bind inner scope functions to the "this" from the outer scope all over the place. 20160607 20:04:39< celticminstrel> (Using, uh... Function.apply, I think?) 20160607 20:05:14< DeFender1031> true, but if that's the case, then "this" will be that object. That's true of ANY function. in the nominal case though, it'd be nice if it inherited its "this" from the parent scope like it inherits all its other variables. 20160607 20:05:50< celticminstrel> It would be nice, yeah. 20160607 20:05:58< celticminstrel> That has caused problems for me. 20160607 20:06:28< DeFender1031> that's one way to specify "this", but that's at call time. At define time there's a .bind method on functions in later browsers, and i have a polyfill which creates a closure and a wrapper function using .apply for earlier ones 20160607 20:06:29< celticminstrel> It's easy to work around, but sometimes I forget, for example if something originally done immediately is changed to be deferred with setTimeout or similar. 20160607 20:06:39< DeFender1031> exactly. 20160607 20:07:04< celticminstrel> I think I heard that .bind has a flaw that prevents a bound function from being bound again. 20160607 20:08:08< DeFender1031> lucky for me, i don't write pure JS, we actually run the C preprocessor on it, so i have all sorts of fun macros that both make it easier to manage (i have one called "THIS_BIND()" which will ensure the child function is called with the parent "this") and macros which, in debug mode, will make it check all uses of the "this" keyword to ensure that it's actually what you're trying to do with it. 20160607 20:08:51< celticminstrel> ...is this client-side JavaScript? 20160607 20:09:17< DeFender1031> true, although what would that even mean? it's already bound to always take a certain thing as "this", and if the definer has bound it, it's unlikely that you should want it to change 20160607 20:09:23< celticminstrel> I don't think I would like having to have that extra build stage. 20160607 20:09:31< DeFender1031> although, i think bound functions may also be missing .call and .apply? 20160607 20:09:47< DeFender1031> actually, i think my own bind doesn't use the built in one for that reason 20160607 20:10:11< DeFender1031> meh, it's all part of a build script anyway 20160607 20:10:12< celticminstrel> I don't remember if the built-in bind does, but a bind function logically should be able to bind arguments other than "this". 20160607 20:10:34< DeFender1031> the built in one does, yes 20160607 20:10:42< DeFender1031> although, i think it's pretty primitive 20160607 20:10:55< celticminstrel> So that behaviour can definitely still make sense with a bound function. 20160607 20:10:56< DeFender1031> for example i don't recall if you can bind parameters out of order 20160607 20:11:02< DeFender1031> ah 20160607 20:11:03< celticminstrel> I think you're right about that though, yeah. 20160607 20:11:04< DeFender1031> good point 20160607 20:11:41< DeFender1031> right right. so that's why my bind doesn't use the built in one and just creates its own closure. 20160607 20:12:18< celticminstrel> Which is a perfectly valid way of binding. 20160607 20:13:00< DeFender1031> and the build step stops being annoying when it's a huge web-app and you have code compartmentalized into a hundred different files that get concatenated into one when built and would be impossible to maintain if all the code were in a single file to begin with. 20160607 20:13:06< DeFender1031> exactly. 20160607 20:13:12< DeFender1031> i love closures. 20160607 20:13:25< DeFender1031> and functions as first-class variables 20160607 20:13:41< DeFender1031> i love making functions that take functions as parameters and return other functions 20160607 20:13:55< celticminstrel> I suppose a bind function that can bind out-of-order wouldn't be too hard if you take "null" or "undefined" or maybe some other special value to indicate which arguments not to bind... 20160607 20:14:33< celticminstrel> Reordering arguments would require the third method. 20160607 20:16:13< DeFender1031> as a proof-of-concept for something that no one is ever likely to use, i once made a function which takes a function and returns a function which, when called for the first time, will call the original function with whatever parameters, and store the combination of parameters and results in a cache so that subsequent calls with the same parameters look up the return result in the cache rather than running whatever calculation again. (This is 20160607 20:16:14< DeFender1031> obviously useless in most cases as the overhead probably outweighs the gain of not doing the calculation again, but the fact that this can be done is just so cool) 20160607 20:16:49< celticminstrel> That's not useless at all. I think it's called "memoization". 20160607 20:17:36< celticminstrel> Actually, I think there's something like that in the Lua AI code in Wesnoth. 20160607 20:17:43< celticminstrel> For move maps or something. 20160607 20:18:00< DeFender1031> yes, it's useful in certain cases with only one or MAYBE two parameters. The version I made keeps a whole tree and will cache for any number of parameters. 20160607 20:19:00< celticminstrel> Though in the Wesnoth case there's the possibility of the cache being invalidated. 20160607 20:19:06< celticminstrel> So I guess it's not quite the same. 20160607 20:20:10< DeFender1031> ah, well, i could expand the above by adding a member onto the returned function called cacheClear() or something 20160607 20:20:21< DeFender1031> maybe even one to clear for just a specific set of params... 20160607 20:20:33< DeFender1031> the point is, the things it lets you do with functions is awesome 20160607 20:20:33 * celticminstrel shrugs. 20160607 20:20:50< celticminstrel> I'm sure it is. 20160607 20:27:11< DeFender1031> i have a different function which creates a function list which you can add or remove functions and when called it'll run them all in sequence. 20160607 20:35:45< DeFender1031> hmm... so then why would the trick of rewriting the function and calling the old one internally not work with the : syntax? 20160607 20:36:05< DeFender1031> if internally it's actually calling the same function anyway? 20160607 20:36:13< celticminstrel> The functions in the wesnoth table don't expect a self argument. 20160607 20:36:19< celticminstrel> Oh, wait. 20160607 20:36:34< celticminstrel> No, the problem is that when called with : the function is not taken from the wesnoth table. 20160607 20:37:26< celticminstrel> This is something that would probably be very simple to fix. It's just that, when I added the ability to use the : syntax with a unit to call various functions, I didn't think of this use case. 20160607 20:38:24< celticminstrel> In other words, when you use unit:to_map or whatever, it looks up to_map in the unit metatable, which returns the C function that is by default placed in the wesnoth table - rather than looking the function up in the wesnoth table. 20160607 20:38:58-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160607 20:54:16< DeFender1031> oh 20160607 21:03:31< DeFender1031> ah, and lua doesn't have prototypes like JS has, so I can't just modify the prototype for unit to affect the function for all units... 20160607 21:04:37< DeFender1031> hmm... it also gets worse than that. If I want to truly account for all possible cases, i have to account for lua functions as well as wml changes and natural engine-driven changes... 20160607 21:04:49< DeFender1031> further down the rabbit hole we go, i suppose :P 20160607 21:07:36-!- prkc_ [~prkc@46.166.188.238] has quit [Ping timeout: 246 seconds] 20160607 21:09:09< DeFender1031> is there a lua function for evaluating a formula? 20160607 21:09:43< DeFender1031> like wesnoth.forumla_result("$somevar + 32")? 20160607 21:10:04< celticminstrel> Not in 1.12. 20160607 21:10:24< celticminstrel> Oh, but maybe you can get the effect you want with wesnoth.get_variable. 20160607 21:10:31< DeFender1031> hmmm 20160607 21:10:40< celticminstrel> I don't think I've tried that. 20160607 21:10:43< DeFender1031> let me try that. 20160607 21:10:48< celticminstrel> Might not work. 20160607 21:11:05< celticminstrel> Though in this specific case you could do wesnoth.get_variable("somevar") + 32 20160607 21:11:11< celticminstrel> (ie, do the math in Lua instead of WFL) 20160607 21:11:31< celticminstrel> Lua does have prototypes like JS, by the way. 20160607 21:11:34< celticminstrel> They're called metatables. 20160607 21:11:52< celticminstrel> But I don't think you can set the metatable of a userdata. 20160607 21:11:57< celticminstrel> (Which is what units are.) 20160607 21:13:59< DeFender1031> ah 20160607 21:14:06< DeFender1031> and yes, my example was primitive 20160607 21:14:46< DeFender1031> i'm trying to create a tag which takes a formula which gets evaluated multiple times with different values from lua 20160607 21:14:56< DeFender1031> and yeah, get_variable doesn't do it 20160607 21:15:02< DeFender1031> hmmmmm 20160607 21:15:17< DeFender1031> i might be able to do it by calling the variable wml action though 20160607 21:15:28< DeFender1031> passing THAT the formula 20160607 21:15:36< DeFender1031> grabbing the variable as the result 20160607 21:15:38< DeFender1031> then clearing it 20160607 21:16:26< DeFender1031> is lua like JS in that if you set a member to nil it stil thinks it exists and you need to use "delete", or does setting something to nil remove it from a table? 20160607 21:21:17< DeFender1031> YES! 20160607 21:21:19< DeFender1031> it worked 20160607 21:21:23< DeFender1031> it's insane, but it worked. 20160607 21:22:26-!- prkc_ [~prkc@catv-80-98-246-78.catv.broadband.hu] has joined #wesnoth 20160607 21:22:33-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 240 seconds] 20160607 21:25:20-!- irco [~irco@HSI-KBW-078-042-015-165.hsi3.kabel-badenwuerttemberg.de] has quit [Ping timeout: 260 seconds] 20160607 21:26:13< celticminstrel> What you want is simpler in 1.13 since I added the wesnoth.compile_formula function. 20160607 21:27:11< celticminstrel> I think setting to nil is equivalent to deleting. 20160607 21:27:24< celticminstrel> Not quite sure though. 20160607 21:29:59< DeFender1031> http://paste.nachsoftware.com/DeFender1031/CtBTT29d420b45768ffd30cc257573ccdbf56fHS 20160607 21:30:14< DeFender1031> i could also simplify this by using the variables metatable 20160607 21:30:25< DeFender1031> but the basic premise... works. 20160607 21:30:56< celticminstrel> Note that the formulas that that parses are not the same as the formulas that compile_formula parses. 20160607 21:31:43< DeFender1031> what do you mean? 20160607 21:31:45< celticminstrel> When Wesnoth evaluates a formula substitution such as $($somevar + 32), the value of $somevar is substituted before the string is passed to the WFL parser. 20160607 21:31:53< celticminstrel> So, the WFL parser never sees any dollar signs. 20160607 21:32:05< celticminstrel> Substitution in WMl strings is always done right to left. 20160607 21:32:07-!- lipkab [~the_new_l@host-91-147-210-58.biatv.hu] has quit [Quit: Leaving] 20160607 21:32:25< celticminstrel> If $somevar happens to have the value 32, then the formula that is executed is "32 + 32". 20160607 21:32:44< DeFender1031> okay... you're saying i couldn't pass "$blah + 4" to "compile_formula" and have it work? 20160607 21:32:56< celticminstrel> If somevar happens to have the value blah, then the formula that is evaluated is "'blah' + 32", which obviously won't give a meaningful result. 20160607 21:33:05< celticminstrel> Yeah. 20160607 21:33:11< DeFender1031> ah 20160607 21:33:20< DeFender1031> so this is actually what i need 20160607 21:33:59< celticminstrel> When I said you might be able to use get_variable, what I was thinking was wesnoth.get_variable("($somevar + 32)"), but that might not actually work. 20160607 21:34:30< celticminstrel> Perhaps a better way would be to make a table {formula = "$($somevar + 32)"} 20160607 21:34:58< celticminstrel> Then you should be able to evaluate it with wesnoth.tovconfig(t).formula, I think. 20160607 21:35:20< celticminstrel> Again though, if you later want to switch over to compile_formula, you would need to change all your formulas. 20160607 21:36:05< celticminstrel> Also note that Lua will expand the WML variables unless you tell it not to. 20160607 21:36:21< celticminstrel> So if you have [custom_tag]formula=$somevar[/custom_tag] 20160607 21:36:44< celticminstrel> And your custom_tag handler is something like function(cfg) print(cfg.formula) end 20160607 21:37:02< celticminstrel> The output in the console will be the value of somevar, not the string "$somevar". 20160607 21:37:24< celticminstrel> You can get around that with helper.literal(cfg).formula (or cfg.__literal.formula). 20160607 21:38:45< DeFender1031> When I said you might be able to use get_variable, what I was thinking was wesnoth.get_variable("($somevar + 32)"), but that might not actually work. <-- yeah, that's what i tried. 20160607 21:39:09 * celticminstrel notes that your approach in the pastebin seems perfectly fine to me though, as long as you understand that you can't just replace it with wesnoth.compile_formula when you move to Wesnoth 1.13+ 20160607 21:39:42< DeFender1031> what i'm trying to do is create a tag to sort a WML array based on a formula for a callback 20160607 21:40:00< celticminstrel> Oh, that sounds useful. 20160607 21:40:54< DeFender1031> so let's say [sort]variable=someunits / compare="$first.level-$second.level"[/sort] 20160607 21:41:08< DeFender1031> would sort a bunch of units by level 20160607 21:41:14< DeFender1031> the formula could be more complicated 20160607 21:41:22< celticminstrel> Right, so what I said about helper.literal applies there. 20160607 21:41:43< DeFender1031> anyway, i've just confirmed that i'm actually capable of doing everyting i need 20160607 21:41:47< celticminstrel> You'll need helper.literal(cfg).compare rather than just cfg.compare. 20160607 21:41:54< DeFender1031> well, it'll actually work even without .literal 20160607 21:42:01< DeFender1031> (at least, from what i'm seeing) 20160607 21:42:04< celticminstrel> (Or cfg.__literal.compare. That's literally what helper.literal does.) 20160607 21:42:42< celticminstrel> I don't think it will. 20160607 21:42:52< celticminstrel> I could be wrong, though... 20160607 21:42:53< DeFender1031> http://paste.nachsoftware.com/DeFender1031/MjhwR5de4766f7757816f207457573fd80f2fdSX 20160607 21:43:10< celticminstrel> I'm not quite sure if vconfig caches substitution results. 20160607 21:43:42< DeFender1031> seems to me that it's keeping up with variable changes even though it's evaluating the variables 20160607 21:44:02< celticminstrel> I'm still trying to figure out what the snippet is doing. 20160607 21:44:11< DeFender1031> which means i can just as easily use the result from parseFormula after setting it to the next element in whatever array 20160607 21:44:15< DeFender1031> it's just a test 20160607 21:44:44< celticminstrel> That seems to imply that vconfig doesn't cache substitution results... 20160607 21:44:46< DeFender1031> to see if i can set the variables from inside lua and have the formula evaluate to whatever the new values mean it should evaluate to 20160607 21:44:59< DeFender1031> or it does but also has an invalidator... 20160607 21:45:07< DeFender1031> (like you mentioned above) 20160607 21:45:21< DeFender1031> [6/7/2016 11:42:21 pm] Though in the Wesnoth case there's the possibility of the cache being invalidated. 20160607 21:45:29< celticminstrel> Well, I was originally assuming you were assigning the formula to a local variable, though. 20160607 21:45:41< celticminstrel> Ah, that thing about a cache that can be invalidated is unrelated. 20160607 21:45:50< celticminstrel> That's in AI code, not vconfig. 20160607 21:46:04< celticminstrel> I don't think vconfig would have any easy way to tell if a formula has been invalidated. 20160607 21:46:15< DeFender1031> nah, i'm hijacking wesnoth's assignment of stuff to wml variables, grabbing the value out of them, then clearing them 20160607 21:46:25< DeFender1031> no idea 20160607 21:46:34< DeFender1031> all i know is that it looks like what i'm doing will work. 20160607 21:46:52< DeFender1031> maybe i should use .literal to be on the safe side 20160607 21:47:17< DeFender1031> i'm still figuring this out 20160607 21:47:28< DeFender1031> only taught myself lua two hours ago after all :P 20160607 21:47:49< DeFender1031> but the point is, it looks like i can easily implement a [sort] tag pretty easily 20160607 21:48:25< celticminstrel> WIth the way you did it, I guess literal wouldn't change anything. 20160607 21:48:36< DeFender1031> hey, if I get this working nicely, you think it'd make sense to stick such a tag into the main system? 20160607 21:48:52< celticminstrel> With literal, parseFormula would be passed "$first.blah + $second.blah" instead of "45 + 79" or whatever. 20160607 21:49:16< celticminstrel> I think it would make sense to add a sort tag, but I think I might prefer to implement it using wesnoth.compile_formula. 20160607 21:49:23< celticminstrel> Not entirely sure, though. 20160607 21:49:42< celticminstrel> By the way, you're using a key-based sort, right? 20160607 21:49:43< DeFender1031> i've been considering joining wesnoth dev, perhaps i should start by implementing some features i've wanted but felt were missing such as this 20160607 21:49:54< DeFender1031> hmm? 20160607 21:50:10< celticminstrel> The formula produces a key, and the array is sorted according to the value of that key. 20160607 21:50:27< celticminstrel> The main alternative is a comparator-based sort. 20160607 21:50:49< DeFender1031> the sort would be whatever rule you define in the compare attribute 20160607 21:50:56< celticminstrel> Where the formula handles the comparison directly rather than just producing a key. 20160607 21:51:04< DeFender1031> [6/8/2016 1:04:15 am] so let's say [sort]variable=someunits / compare="$first.level-$second.level"[/sort] 20160607 21:51:16< DeFender1031> note: compare="$first.level-$second.level" 20160607 21:51:23< DeFender1031> this would sort by level 20160607 21:51:25< celticminstrel> So, with comparator-based sort your formula might be something like "$first.level < $second.level", if you want to sort by level. 20160607 21:51:40< celticminstrel> Or if you want to sort in descending order, you could try "$first.level > $second.level". 20160607 21:51:47< DeFender1031> that won't work 20160607 21:51:59< celticminstrel> Why not? 20160607 21:52:01< celticminstrel> Ah, hmm, I guess you're using a ternary comparator-based method. 20160607 21:52:16< celticminstrel> Which I think is kinda more confusing, but whatever. 20160607 21:52:22< DeFender1031> the formula has to return a value which is either greater-than, less-than, or equal to 0 to define whether first should be before, after, or equivalent to second. 20160607 21:52:38< celticminstrel> That's not true. 20160607 21:52:45< DeFender1031> oh 20160607 21:52:49< DeFender1031> that's what you mean 20160607 21:52:57< celticminstrel> That is to say, it can be made to work with formulas such as what I mentioned. 20160607 21:53:00< DeFender1031> yeah, it could be a binary compare 20160607 21:53:03< DeFender1031> right. 20160607 21:53:06< DeFender1031> absolutely 20160607 21:53:17< celticminstrel> C++ sort functions expect that form of comparator. 20160607 21:53:20< DeFender1031> i've done those too 20160607 21:53:30< DeFender1031> which? yours or mine? 20160607 21:53:38< celticminstrel> What I said. 20160607 21:53:42< DeFender1031> IIRC, they expect ternary 20160607 21:53:51< DeFender1031> but you may be right 20160607 21:54:01< DeFender1031> it's been a while since i used C++ with any regularity 20160607 21:54:06< celticminstrel> A C++ comparator is a function less(a,b) that returns true if a is less than b. 20160607 21:54:15< DeFender1031> ah 20160607 21:54:17< celticminstrel> You might be thinking of C comparators, which do use the ternary form. 20160607 21:54:35< celticminstrel> (And of course other C++ libraries may also do so.) 20160607 21:54:47< celticminstrel> When I said key-based, what I meant is something like this: 20160607 21:55:15< celticminstrel> Provide a function key(obj), and sort using the comparator "key(obj1) < key(obj2)". 20160607 21:55:16< DeFender1031> look, i could also implement it as "compare=" is a ternary compare, "less=" is like you said, and just for completion "greater=" could be if you wanted to reverse it for some reason 20160607 21:55:22< celticminstrel> Python offers that form, I think. 20160607 21:56:00< celticminstrel> I can't remember if Python's allows a function key or just a string key (in which case it'd be obj1[key] < obj2[key]). 20160607 21:56:27< DeFender1031> how does that differ from "$first.level > $second.level"? 20160607 21:56:29< celticminstrel> (Or in WML, soemthing like "$obj1.$key < $obj2.$key") 20160607 21:56:39< DeFender1031> ohhh 20160607 21:56:48< celticminstrel> It differs in that the function doesn't do any comparison. 20160607 21:57:09< celticminstrel> It's only given one of the objects, and it's called twice per comparison instead of once. 20160607 21:57:13< DeFender1031> nah, i like the way i suggested better, because it allows for more complicated comparisons 20160607 21:57:25< celticminstrel> Yeah, comparator-based is more flexible. 20160607 21:57:33< celticminstrel> But key-based can be more convenient in simple cases. 20160607 21:57:50< DeFender1031> you know what? let's add "key=" to what i said above 20160607 21:58:19< DeFender1031> and you use one of either "compare=", "less=", "greater=", or "key=" and it'll work it out however you defined. 20160607 21:58:24< DeFender1031> why not? 20160607 21:58:48< celticminstrel> I think I still haven't finished that Lua-WFL stuff... I was going to make it possible to define WFL functions in Lua... 20160607 22:02:02< DeFender1031> or actually, i guess it'd have to be "asc=" and "desc=" for the key stuff 20160607 22:02:48< celticminstrel> Sure. 20160607 22:02:53< DeFender1031> anyway, if i wanted to actually start implementing tags and functions and such and submitting them to dev, how would i go about doing so? 20160607 22:03:06< celticminstrel> You could simplify key-based by only allowing a string rather than a function, if you want. 20160607 22:03:24< DeFender1031> obviously key-based would be a string, nothing else makes sense there. 20160607 22:03:33< DeFender1031> what would a function there even mean? 20160607 22:03:41< celticminstrel> WML tags are generally defined in data/lua/wml or in data/lua/wml-*.lua 20160607 22:04:12< celticminstrel> Auxiliary functions for Lua are mostly in data/lua/helper.lua 20160607 22:04:26< celticminstrel> But the build of the Lua API functions are defined in C. 20160607 22:04:36< celticminstrel> That covers pretty much everything in the wesnoth table. 20160607 22:04:40< celticminstrel> ^bulk 20160607 22:05:13< DeFender1031> what i meant was, logistically. Should i send patches to your or one of the other devs? 20160607 22:05:35< celticminstrel> That, or open a pull request on github. 20160607 22:05:54< celticminstrel> If you send patches they should be made with... I think it's "git diff". 20160607 22:05:59< DeFender1031> i'm not so familiar with github... what's a "pull request"? 20160607 22:06:29< celticminstrel> I'm not sure how best to describe it... 20160607 22:06:35< celticminstrel> But I guess it's like submitting a patch? 20160607 22:06:42< DeFender1031> huh. 20160607 22:06:48< Aginor> it's a request to have your code changes integrated into someone elses repository 20160607 22:06:53< DeFender1031> ah 20160607 22:06:56< celticminstrel> You do need a github account though for that. 20160607 22:07:12< DeFender1031> isn't that just a simple matter of signing up? 20160607 22:07:34< Aginor> so you go and make your changes in the code on a "fork", and then you use a "pull request" to contribute back to the "original repository that you forked from" 20160607 22:07:54< DeFender1031> Aginor, yeah, once you said your first line, it all made sense. 20160607 22:07:58< celticminstrel> Yes, it's just "a simple matter of signing up". 20160607 22:08:10< DeFender1031> celticminstrel, why the quotes? 20160607 22:09:34< celticminstrel> Because I'm quoting what you said, but I try to avoid signing up for new websites at every turn, so a requirement of "signing up" often leads me to say "not worth it" and go somewhere else. 20160607 22:09:41< DeFender1031> ah 20160607 22:09:59< DeFender1031> i'm like that too, but something like github is probably not too big of a deal. 20160607 22:10:10< celticminstrel> Yeah, probably. 20160607 22:10:29< celticminstrel> I think I originally got the account because of Minecraft or something. 20160607 22:10:35< DeFender1031> i guess i don't mind signing up if it's something i need an account for. Sites that require me to sign up just to read an article or post a comment or take some stupid quiz i say "not worth it" 20160607 22:10:48< celticminstrel> Yeah, exactly that. 20160607 22:11:16< DeFender1031> but something like github where you shouldn't be able to start fiddling with code without some way of knowing who's doing the fiddling? i don't see a problem 20160607 22:12:00< celticminstrel> No, you can absolutely start fiddling with code on github without having an account. 20160607 22:12:18< celticminstrel> You don't need an account to clone a repository from github. 20160607 22:12:24< DeFender1031> that's not what i mean 20160607 22:12:30< DeFender1031> that's fiddling with code FROM github 20160607 22:12:36< DeFender1031> not fiddling with code ON github 20160607 22:13:01< celticminstrel> Oh, okay then. 20160607 22:13:43-!- gfgtdf [~chatzilla@x4e368122.dyn.telefonica.de] has joined #wesnoth 20160607 22:13:51< gfgtdf> in 1.12 you can evalualte forumlas and varaible substitution with tovconfig 20160607 22:14:03< DeFender1031> as for implementing using compile_formula, it looks like at least in this context without using literal that my parseFormula POC is just a polyfill for it anyway. 20160607 22:14:04< gfgtdf> if you want to sort things , note that luas table.sort is not stable with an undefined was to order same keys. which makes it unsuitable for in wesnoths since it migth casue OOS 20160607 22:14:33< gfgtdf> s/was/way 20160607 22:14:35< DeFender1031> gfgtdf, i was planning on implementing a stable sort myself. 20160607 22:14:44< DeFender1031> i'm aware of the issues with unstable sorts. 20160607 22:15:06< DeFender1031> also, there are tricks for wrapping unstable sorts to stable ones 20160607 22:16:40< DeFender1031> gfgtdf, so i can use tovconfig instead of hacking up set_variable like in my POC, great. 20160607 22:17:01< celticminstrel> I think I mentioned tovconfig earlier, too. 20160607 22:17:13< DeFender1031> indeed you did 20160607 22:17:20< gfgtdf> celticminstrel: y i didnt read the whole conversation, it was quitelong 20160607 22:17:29< DeFender1031> but i didn't acknowledge because we were having like 5 conversations at once :P 20160607 22:19:40< gfgtdf> DeFender1031: hmm what do you want to add to mainline wesnoth tags ? 20160607 22:19:56< celticminstrel> [sort_variable] I think. 20160607 22:20:07< celticminstrel> Or something like that. 20160607 22:20:28< DeFender1031> gfgtdf, i've had a few thoughts of tags which might be worth adding that i don't recall off the top of my head, but right now, i want to add an internal action of sorting an existing variable 20160607 22:20:36< DeFender1031> yeah, what celticminstrel said. 20160607 22:23:40-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 244 seconds] 20160607 22:24:46-!- prkc_ [~prkc@catv-80-98-246-78.catv.broadband.hu] has quit [Ping timeout: 252 seconds] 20160607 22:25:15< DeFender1031> well, it's way past my bedtime. I'll be back tomorrow. 20160607 22:25:24< DeFender1031> thanks guys. 20160607 22:28:57-!- gfgtdf [~chatzilla@x4e368122.dyn.telefonica.de] has left #wesnoth [] 20160607 22:32:43-!- wario [~wario_@unaffiliated/wario] has quit [Quit: Leaving] 20160607 23:02:55-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: mattsc] 20160607 23:27:49-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth 20160607 23:31:12-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Client Quit] 20160607 23:32:47-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth 20160607 23:37:33-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth 20160607 23:43:46-!- Haldrik [~haldrik@unaffiliated/haldrik] has quit [Quit: Haldrik] --- Log closed Wed Jun 08 00:00:01 2016