--- Log opened Thu Aug 13 00:00:58 2015 20150813 00:04:28< celticminstrel> Definitely get it to work on 1.12 first, that's probably where all the players will be after all. 20150813 00:11:00-!- iceiceice [~chris@50.245.222.235] has joined #wesnoth-dev 20150813 00:11:00-!- iceiceice [~chris@50.245.222.235] has quit [Changing host] 20150813 00:11:00-!- iceiceice [~chris@wesnoth/developer/iceiceice] has joined #wesnoth-dev 20150813 00:11:01-!- iceiceice_ [~chris@50.245.222.235] has joined #wesnoth-dev 20150813 00:11:01-!- iceiceice_ [~chris@50.245.222.235] has quit [Changing host] 20150813 00:11:01-!- iceiceice_ [~chris@wesnoth/developer/iceiceice] has joined #wesnoth-dev 20150813 00:13:54-!- joet [~joet@host86-163-217-190.range86-163.btcentralplus.com] has quit [Remote host closed the connection] 20150813 00:32:53< afre> ok, I'll stick with 1.12 then. 20150813 00:39:44-!- sailorswift [~sailorswi@c-24-5-126-97.hsd1.ca.comcast.net] has joined #wesnoth-dev 20150813 00:42:15< celticminstrel> Hmm. How would one implement a [break]/[continue] tag... 20150813 00:43:17< celticminstrel> Such a tag should not be valid in a general ActionWML context, only in a looping ActionWML context. 20150813 00:43:59< celticminstrel> So putting it in wesnoth.wml_actions might be weird. 20150813 00:44:27 * celticminstrel also thought of doing a [control] tag which takes action=break or action=continue. 20150813 00:45:12< Ravana_> why would it not be valid in a general ActionWML context 20150813 00:45:25< Ravana_> could return from event 20150813 00:45:43< celticminstrel> True, I could see [break] doubling as [return] like that. 20150813 00:46:03< celticminstrel> But then, what woulc [continue] do in a general ActionWML context? 20150813 00:46:14< celticminstrel> ^would 20150813 00:46:38-!- Appleman1234 [~Appleman1@KD106179122098.au-net.ne.jp] has joined #wesnoth-dev 20150813 00:47:29< Ravana_> could do something related to first_time_only= , but just one of them would be good enough, other could be more limited 20150813 00:48:13< celticminstrel> So then, the question still remains as to how to implement a tag which shouldn't be valid in a general ActionWML context. 20150813 00:48:25< celticminstrel> Namely, [continue] 20150813 00:48:53< vultraz> You make it a subtag of whatever tag it's meant for 20150813 00:49:02< celticminstrel> Huh? 20150813 00:49:26< celticminstrel> It's something that should appear in an ActionWML context. 20150813 00:49:41< celticminstrel> But, it should be valid in some ActionWML contexts and not others. 20150813 00:49:47< vultraz> Such as? 20150813 00:50:13< celticminstrel> It should be valid in [while][do], but not in [event] or [command]. 20150813 00:50:44< vultraz> So then just code it into the [while] tag 20150813 00:51:02< celticminstrel> Which means, code it into handle_event_commands()? 20150813 00:51:23< celticminstrel> That's the function that executes commands in an ActionWML context, such as [while], but also including [if]. 20150813 00:51:29< celticminstrel> And presumably [switch]. 20150813 00:51:44< vultraz> Yes it is 20150813 00:51:49< vultraz> (all this is in lua) 20150813 00:52:07< celticminstrel> On the other hand, it's likely not used for [event] and may not be used in some instances of [command]. 20150813 00:52:22 * celticminstrel isn't quite sure on the latter, it might be used for all instances of [command]. 20150813 00:52:27< vultraz> I meant code [command] handling directly into [while] 20150813 00:52:29< vultraz> er 20150813 00:52:32< vultraz> [continue] 20150813 00:52:34< vultraz> not [command] 20150813 00:52:49< celticminstrel> You're saying put it in while, not in handle_event_commands()? 20150813 00:52:58< vultraz> Yes 20150813 00:53:07< vultraz> If it's just a feature for one tag - [while] 20150813 00:53:09< celticminstrel> Hmm. 20150813 00:53:11< celticminstrel> Oh! 20150813 00:53:18< celticminstrel> [while] can tag multiple [do] tags. 20150813 00:53:29< vultraz> yeah 20150813 00:53:31< vultraz> for do_child in helper.child_range( cfg, "do" ) do 20150813 00:53:45< celticminstrel> So perhaps require [continue] to appear between the [do] tags instead of inside them? 20150813 00:53:48< celticminstrel> But that's a bit... 20150813 00:53:52< celticminstrel> Blech. 20150813 00:54:13< celticminstrel> It wouldn't allow for... basically every logical use. 20150813 00:55:04< celticminstrel> It should be allowed in an [if] tag... but only if that [if] is nested in a [while]. 20150813 00:55:42< vultraz> This is why WML sucks for conditionals 20150813 00:55:43< celticminstrel> By the way, what do you think of the [control]action=continue alternative? 20150813 00:55:58< vultraz> What is that? 20150813 00:56:07< vultraz> I haven't been following what you're doing 20150813 00:56:21< celticminstrel> Just [control]action=continue[/control] instead of [continue][/continue]. Skips to the top of the loop. 20150813 00:57:03< vultraz> would the conditional be inside [control]? 20150813 00:57:26< vultraz> Since AFAICT the only use for continue would be in a condition inside a loop 20150813 00:58:24< celticminstrel> ...it could be, but that's not what I was thinking. The use of [control] would be so that you could also do action=break or action=return, so [control] itself makes sense anywhere but certain uses of it might not. 20150813 00:59:02-!- afre [63f401a5@gateway/web/freenode/ip.99.244.1.165] has quit [Quit: Page closed] 20150813 00:59:39< celticminstrel> Putting the conditional inside the tag is certain a possibility though - [continue_if] between the [do[ tags instead of [continue]. Still has some nesting problems if you need a [continue] nested in an [if] nested in an [if] nested in a [while], but is better than [continue] between the [do] tags. 20150813 00:59:44< celticminstrel> ^is certainly 20150813 01:00:22-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Ping timeout: 244 seconds] 20150813 01:02:09-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20150813 01:03:24< vultraz> blaghhh 20150813 01:03:25< vultraz> ._. 20150813 01:08:55< celticminstrel> No opinion? 20150813 01:12:27< aeth> WML conditionals are just hopelessly confusing/broken. 20150813 01:12:38< aeth> I can do Lua conditionals in like 2 seconds and WML conditionals in like an hour. 20150813 01:12:41< celticminstrel> How are they broken? 20150813 01:12:50< celticminstrel> Confusion aside. 20150813 01:12:52< aeth> They're broken because it's hard for humans to parse them. 20150813 01:12:58< celticminstrel> How so? 20150813 01:13:21 * celticminstrel is assuming that by "conditionals" you mean eg stuff that goes in [show_if]. 20150813 01:13:56< aeth> (1) unclear names, (2) unclear documentation (kind of have to guess and check or copy something that works), (3) bad syntax (pseudo-infix in a postfix language) 20150813 01:14:24< celticminstrel> I suppose you're referring to the [or] [and] stuff? 20150813 01:14:28< aeth> Yes. 20150813 01:14:39< aeth> But the names part applies to e.g. [have_unit] 20150813 01:14:42< celticminstrel> Ignoring that, are there other problems? 20150813 01:14:50< aeth> Also using them in Lua makes it doubly confusing. 20150813 01:14:51< celticminstrel> What's wrong with [have_unit]? 20150813 01:14:58< aeth> The name? 20150813 01:15:06< celticminstrel> No, I mean, what's wrong with the name. 20150813 01:15:52< vultraz> The conditionals like [have_unit] are pretty straightforward 20150813 01:16:20< aeth> The problem is in Lua, it's unclear that you need to do x = "$x1", y = "$y1" 20150813 01:16:25< aeth> In [have_unit] 20150813 01:16:40< aeth> have_unit in and of itself does not do what it says, at least not in the way you would expect in set_menu_item 20150813 01:18:11< aeth> Similarly with [have_location] in [set_menu_item] in the Lua. 20150813 01:18:53< aeth> You just kind of have to find out that without it you're going to wind up with the menu showing everywhere if a unit satisfies the condition. 20150813 01:19:36< aeth> WML is full of this... defaults that will do some niche behavior and boilerplate you need for common behavior. e.g. when the event is preload, you almost always want it to be first_time_only=no. Is this the default? Of course not. 20150813 01:20:16< celticminstrel> aeth: You don't need to do {x="$x1", y="$y1"}. 20150813 01:20:31< celticminstrel> You can put integers there instead. 20150813 01:20:53< aeth> celticminstrel: no, you can't, if you make it e.g. x=5, y=5 in this code, then the menu shows up EVERYWHERE when a unit is on x=5, y=5 20150813 01:20:56< aeth> https://github.com/Aethaeryn/wesnoth-umc/blob/master/Aethaeryns_Mod/lua/filter.lua#L40 20150813 01:20:59< aeth> Instead of just on 5,5 20150813 01:21:14< celticminstrel> Or {x = wesnoth.get_variable("x1"), y = wesnoth.get_variable("y1")}? 20150813 01:21:15< aeth> In the 2nd [or] 20150813 01:21:31< celticminstrel> Oh, hmm, I suppose I get what you mean... 20150813 01:21:34-!- Appleman1234 [~Appleman1@KD106179122098.au-net.ne.jp] has quit [Ping timeout: 260 seconds] 20150813 01:21:37< Ravana_> I understand that you filter for select event $x1 and $y1 , not from any unit 20150813 01:21:47< celticminstrel> Still, if you're just writing WML, it makes sense. 20150813 01:21:57< aeth> celticminstrel: wesnoth.current.event_context.x1, wesnoth.current.event_context.y1, not the way you said 20150813 01:22:21< celticminstrel> Wouldn't get_variable return the correct result too? 20150813 01:22:32< celticminstrel> But event_context does look cleaner, at least. 20150813 01:22:33 * vultraz .... 20150813 01:22:58< vultraz> of course if you say [have_unit] x,y=5,5 the condition will make the menu show up if you have a unit on 5,5 20150813 01:23:26< aeth> vultraz: which is entirely non-obvious within the Lua, even if it's obvious within the WML 20150813 01:23:26< vultraz> If you want to show it only on 5,5 you use [filter_location] 20150813 01:23:43< vultraz> ... the lua is the same as the wml 20150813 01:23:46< vultraz> what are you talking about 20150813 01:24:02< aeth> vultraz: you can't use [filter_location] if you want to combine a unit filter and a location filter within one conditional linked by [or]s 20150813 01:24:15< aeth> vultraz: because [filter_location] is top level and [show_if] is top level 20150813 01:24:25< celticminstrel> aeth: But now we're getting out of the topic of just conditionals. :P 20150813 01:24:35< aeth> I had to invert the conditionals to be centered around the unit, not the location, in order to mix location filters with unit filters. 20150813 01:24:48-!- N4tr0n_ [~N4tr0n@162.255.34.90] has quit [Ping timeout: 272 seconds] 20150813 01:25:10< vultraz> You do realize [have_unit] [filter_location] is also a thing, right 20150813 01:25:41< aeth> vultraz: but if you do [have_unit] [filter_location] you have to add the x="$x1", y="$y1" boilerplate to [have_unit] before the [filter_location] 20150813 01:25:50< aeth> vultraz: you cannot simply put the [filter_location] in the [have_unit] 20150813 01:25:57< vultraz> And there's nothing stopping you from combining [filter_location] and [show_if] in a menu item 20150813 01:26:00< aeth> at least when I was doing that. 20150813 01:26:09< iceiceice> aeth: the only reasonable way to use wml is to use macros constantly 20150813 01:26:17< aeth> vultraz: [filter_location] and [show_if] is treated as an [and] according to the location, whereas I wanted an [or] 20150813 01:26:21< iceiceice> like {VARIABLE_CONDITIONAL} 20150813 01:26:24< iceiceice> like {IF_VAR} 20150813 01:26:35< celticminstrel> vultraz: His issue is that he wanted it to work when either of the [filter_location] or [show_if] applied, not when both did. 20150813 01:26:38< aeth> iceiceice: except if you use macros constantly, you will eventually get to the point (e.g. Bob's RPG Era) where players will have to disable autosaves because saves take so long 20150813 01:26:52< iceiceice> i dont think using these macros will hurt you in that way 20150813 01:26:53< aeth> iceiceice: the only way to reasonably use WML is to not use it if you get to the point where you have to constantly use macros, unless you want long saves 20150813 01:27:04< aeth> Macros are a major performance hit, whereas Lua can avoid that. 20150813 01:27:07< shadowm> lol 20150813 01:27:13< vultraz> celticminstrel: well that's just not something it was designed to do 20150813 01:27:14< iceiceice> yes using lua is a major improvement 20150813 01:27:28< celticminstrel> The only macros I would definitely recommend against are the ones that take a large block of WML code as an argument. 20150813 01:27:28< iceiceice> if you are able to work entirely in lua or nearly so it can be a lot easier 20150813 01:27:32< aeth> iceiceice: except if you use Lua you are still forced to use WML conditionals in [set_menu_item] 20150813 01:27:33< iceiceice> but it can make it harder in other ways too 20150813 01:27:42< iceiceice> yes, i tried to fix that in 1.13 i think 20150813 01:27:46< celticminstrel> Okay, so, we should add wesnoth.set_menu_item. 20150813 01:27:47< aeth> If you were able to entirely do Lua-style conditionals in setting menu items, you would basically never have to touch complicated WML at all 20150813 01:27:54< celticminstrel> Or wesnoth.???.set_menu_item/ 20150813 01:27:56< iceiceice> yeah i think that's possible now 20150813 01:27:56< aeth> celticminstrel: It's not that simple, afaik. 20150813 01:28:02< iceiceice> there's liek a wml_condtionals table or something 20150813 01:28:02< celticminstrel> Why not? 20150813 01:28:06< iceiceice> that was like the very last patch I wrote 20150813 01:28:07< aeth> iceiceice: I think it just takes in WML 20150813 01:28:19< iceiceice> let me see if i can dig up forum post 20150813 01:28:26< celticminstrel> Actually, Lua-style conditionals should be possible in 1.13. 20150813 01:28:27< vultraz> aeth: there's a difference between calling wml from lua and calling a lua function 20150813 01:28:35< aeth> celticminstrel: because you would need to change how the set_menu_item thing works, at least slightly, in order to use Lua conditionals and avoid just writing literal WML conditionals in Lua and getting the worst of both worlds (since you can't use macros there) 20150813 01:28:41< vultraz> aeth: you need to pass a wml table for the former 20150813 01:29:14< celticminstrel> aeth: wesnoth.set_menu_item would work completely differently from [set_menu_item[. 20150813 01:29:16< celticminstrel> ^] 20150813 01:29:34< celticminstrel> It wouldn't just take a WML table as an argument. 20150813 01:29:49< celticminstrel> It'd probably take a pair of functions or something like that. Maybe some other data too. 20150813 01:30:00< celticminstrel> (Possibly the data part could be in a table, like name and such.) 20150813 01:30:02< aeth> vultraz: right, the best way to do Lua is to not call WML from the Lua. My code got extremely simplified when I switched from [message][option] to dialog because in dialog I didn't have to keep passing around strings and keeping everything as a function I can call as a string in a [lua] code = "" [/lua] 20150813 01:30:14< aeth> vultraz: Right now I can't avoid using WML-in-Lua when I set_menu_item 20150813 01:30:27< vultraz> Yes 20150813 01:30:29< vultraz> And? 20150813 01:30:37< iceiceice> aeth: i remember noticing specifically this thing and i thougt i fixed it but i cant trakc down forum post 20150813 01:31:03< iceiceice> i made an addon "Silly AI Example" 20150813 01:31:11< aeth> vultraz: and it's a terrible user experience to make people do non-trivial WML, like WML conditionals, in Lua. I have no problem firing e.g. a simple [message], but I do have a problem with writing filters for [set_menu_item] calls 20150813 01:31:39< vultraz> Yes, wml tables in lua are a PITA 20150813 01:32:03< celticminstrel> Like I said, there should be a wesnoth.set_menu_item. 20150813 01:32:06< aeth> vultraz: WML tables in Lua are fine, as long as they don't go too deep. Conditionals necessarily go extremely deep if you want to do something non-trivial with them. 20150813 01:32:30< vultraz> True 20150813 01:32:31< iceiceice> damn forum search not coming through for me 20150813 01:32:32< vultraz> And? 20150813 01:32:32< aeth> celticminstrel: Right, exactly, a Lua set_menu_item would have to take a function that is a conditional that's evaluated when you right click on that hex. 20150813 01:32:42< celticminstrel> I see a wesnoth.set_menu_item in the 1.13 source. 20150813 01:32:43< aeth> celticminstrel: Extremely powerful, and extremely useful 20150813 01:33:00< vultraz> WML is best for data and scripting 20150813 01:33:03< vultraz> Not for logic 20150813 01:33:05< aeth> celticminstrel: I think it just passes in a WML table, which has no functional difference from wesnoth.fire("set_menu_item", ...) 20150813 01:33:09< celticminstrel> Whether it's implemented well, I'm not quite sure yet. 20150813 01:33:27< aeth> vultraz: Yes, WML is a data language, and it's OK for firing Lua functions on events. Imo, everything else should eventually be eliminated from WML. 20150813 01:33:40< aeth> WML tries to do too much. 20150813 01:33:56< celticminstrel> Ah, it looks like the menuitem manager might need to be changed to support doing it properly... 20150813 01:34:09< aeth> If you want to do something fancy, the Lua API should be powerful enough that you can just do a [lua] code = "foo()" [/lua] 20150813 01:34:21< iceiceice> aeth: this code works in 1.13 unless something changed 20150813 01:34:22< vultraz> aeth: we know all this 20150813 01:34:22< iceiceice> http://hastebin.com/ifiweyeqeg.apache 20150813 01:34:35< iceiceice> here [can_make_archon] is a conditioanl wml tag defined in lua 20150813 01:35:12< aeth> iceiceice: My set menu items are extremely complicated, and there are many. 20150813 01:35:19< iceiceice> here's where it is defined 20150813 01:35:19< iceiceice> http://hastebin.com/isijecijax.lua 20150813 01:35:38< aeth> iceiceice: What I want is [event] name = whatever [lua] [code] = "foo()" [/code] [/lua] [/event] and that's it. 20150813 01:35:46< iceiceice> i think you can do that 20150813 01:35:48< celticminstrel> Wait, why is it in wml_actions? 20150813 01:36:00< aeth> iceiceice: not for setting menu items, that has to go as [set_menu_item], which has to be literally defined in WML 20150813 01:36:10< iceiceice> celticminstrel, i think i used some kind of bizarre hack in that code 20150813 01:36:13< iceiceice> to make it work in 1.12 20150813 01:36:15< celticminstrel> iceiceice: Shouldn't it be in wml_conditionals? 20150813 01:36:21< celticminstrel> Oh? 20150813 01:36:31< iceiceice> hummm 20150813 01:36:35< iceiceice> i wish i could find forum post... 20150813 01:37:27< aeth> iceiceice: I cannot define WML tags because not all of my add-ons are going to require download 20150813 01:37:50< vultraz> That's your choice 20150813 01:37:59< vultraz> And you're making everything more complicated because of it 20150813 01:38:03< iceiceice> ok i found it 20150813 01:38:04< iceiceice> http://forums.wesnoth.org/viewtopic.php?f=21&t=41854&hilit=+silly+ai+custom#p583155 20150813 01:38:25< aeth> What I need/want is something like: wesnoth.set_menu_item(id, description, image, lua_filter_conditional, lua_command) 20150813 01:38:28< iceiceice> aeth: you actually can do it anyways, you can just inline all the lua using << >> tags 20150813 01:38:40< aeth> When lua_filter_conditional, a function, evaluates as true, the lua_command must fire. 20150813 01:39:03< iceiceice> aeth: you can probably do it with like 20150813 01:39:16< iceiceice> wesnoth.wml_actions.set_menu_item( cfg ) 20150813 01:39:24< iceiceice> where cfg is a wml table constructed in lua 20150813 01:39:30< iceiceice> to match the syntax of set_menu_item tag 20150813 01:39:36< iceiceice> and using my hacks demonstrated earlier 20150813 01:39:41< iceiceice> or just do that part in wml :p 20150813 01:39:58< iceiceice> usually you only need to set up menu items at the beginning once and then you forget about them, so doing them in wml isn't so bad 20150813 01:40:08< aeth> The problem is, if I do this in WML (1) lua_command must be a string rather than a function (i.e. "foo()" instead of foo) and (2) the conditionals are shit 20150813 01:40:21< aeth> No matter how much WML I wrap, that will be the result 20150813 01:40:22< iceiceice> you can write the conditionals in lua 20150813 01:40:26< iceiceice> and write the actions in lua 20150813 01:40:31< aeth> I cannot, because that will require a download afaik. 20150813 01:40:32< celticminstrel> Only in 1.13 though. 20150813 01:40:32< iceiceice> and the actual [set_menu_item] tag in wml 20150813 01:40:43< iceiceice> celtic minstrel, in 1.12 there is a hack you can use 20150813 01:40:48< aeth> Also 1.13 actions are useless for multiplayer this year 20150813 01:40:52< iceiceice> based on "lua_function" 20150813 01:41:16< iceiceice> celticminstrel: from forum post: 20150813 01:41:17< iceiceice> http://hastebin.com/azahozutib.apache 20150813 01:41:20< celticminstrel> lua_function is part of filters, not conditionals, isn't it? 20150813 01:41:27-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20150813 01:41:41< celticminstrel> Oh hmm. 20150813 01:41:42< iceiceice> the [have_unit] is misleading theres no unit filtering going on there, 20150813 01:41:46< iceiceice> i just want to have access to lua_function 20150813 01:41:51< celticminstrel> I see. 20150813 01:42:05< iceiceice> pretty ugly hack :p 20150813 01:42:49< aeth> iceiceice: The problem is, I want to stop defining Lua as strings where possible because I can do more things with the Lua when I don't have to. 20150813 01:43:17< iceiceice> wait so why can't you put the lua in a separate file? 20150813 01:43:25< iceiceice> i think people do that all the time in addons that dont require download 20150813 01:43:26< aeth> When I moved to dialog I could *completely* change the flow of the program to make it better, all because I didn't need each and every submenu to be its own function called with a callback defined a string in the WML that had to be accessible globally. 20150813 01:43:42< aeth> iceiceice: I do put the Lua in many separate files, using macros. 20150813 01:43:49< iceiceice> yeah so what's wrong with that? 20150813 01:44:01< aeth> I can load the Lua like that. https://github.com/Aethaeryn/wesnoth-umc/blob/master/Aethaeryns_Mod/use_lua.cfg#L32 20150813 01:44:17< aeth> iceiceice: the problem is there, it's terrible to go back and forth between Lua and WML 20150813 01:44:37< vultraz> aeth: why don't you use dofile or require! 20150813 01:44:40< aeth> iceiceice: Every function that is called in Lua from the WML has to be global, and no matter how you wrap it you have to make it a string afaik. 20150813 01:44:49< iceiceice> yeah that's correct 20150813 01:44:49< aeth> vultraz: Because then they get a missing file error and download is required. 20150813 01:45:05< iceiceice> aeth: so what i would do is, 20150813 01:45:11< iceiceice> instea dof set_all_menu_items 20150813 01:45:11< vultraz> and why won't you require download! you're making everything more complicated! 20150813 01:45:14< iceiceice> i would just have a list of those hacks 20150813 01:45:21< iceiceice> in wml 20150813 01:45:27< iceiceice> like i've been saying 20150813 01:45:30< iceiceice> because you will still be mostly in lua 20150813 01:45:38< iceiceice> you cant compeltely cut out the wml, i mean ... 20150813 01:45:45< iceiceice> idk i dont see a more pretty alternative in the current system 20150813 01:45:46< aeth> iceiceice: If there was wesnoth.set_menu_item properly used functions instead of just strings and WML, I could put all those functions within the scope of a Lua function if I wanted to, instead of having them as globally accessible functions that are called as strings. 20150813 01:45:55< iceiceice> ok, write it then 20150813 01:45:58< iceiceice> probably we would merge it in 1.13 20150813 01:46:18< iceiceice> actually it may already exist i cant remember 20150813 01:46:22< iceiceice> quite possibly it does (?) 20150813 01:46:28< celticminstrel> It does exist. 20150813 01:46:29< iceiceice> in 1.13 20150813 01:46:40< celticminstrel> However, it's identical to [set_menu_item]. 20150813 01:46:46< aeth> iceiceice: no I think there might be a wesnoth.set_menu_item in 1.13 now but afaik it takes in WML conditionals, which is shit because it doesn't add anything over just a wrapper function over wesnoth.fire that you can do in 1.12 20150813 01:47:04< iceiceice> ok i remember 20150813 01:47:06< iceiceice> so the thing is 20150813 01:47:08< aeth> There's really no point to do [set_menu_item] entirely in Lua unless you can do the conditionals entirely in Lua, as a Lua function you pass in as an argument. 20150813 01:47:12< celticminstrel> Actually... 20150813 01:47:15< iceiceice> the menu item mechanism is based on these like "wml" parameter variables 20150813 01:47:25< celticminstrel> [set_menu_item] is literally implemented by calling wesnoth.set_menu_item. 20150813 01:47:26< iceiceice> like x1, y1 ? 20150813 01:47:28< iceiceice> unit ? 20150813 01:47:31< iceiceice> secondary_unit ? 20150813 01:47:36< iceiceice> i can't ermemeber what things are actually used in menu items 20150813 01:47:40-!- N4tr0n_ [~N4tr0n@cpe-76-175-70-130.socal.res.rr.com] has joined #wesnoth-dev 20150813 01:48:14< aeth> iceiceice: right, but a wesnoth.set_menu_item that took in a Lua function for conditionals can simply access the WML information directly and handle those directly with conditionals, and that would be a million times easier than literally doing WML conditionals in Lua. 20150813 01:48:22< aeth> I access e.g. a .__cfg for units all the time and it's fine 20150813 01:49:22< aeth> so essentially whatever_lua_conditional passed in becomes whatever_lua_conditional(unit_userdata, terrain_userdata) or something. 20150813 01:49:30< celticminstrel> aeth: This means that we need Lua that extracts [show_if] and [filter_location] from the cfg and makes a function that validates it. 20150813 01:49:45< celticminstrel> Actually, probably two separate functions. 20150813 01:50:14< aeth> celticminstrel: so what you're saying is, in 1.13 making set_menu_item handle Lua conditionals also requires then implementing [show_if] and [filter_location] in Lua? 20150813 01:50:38< aeth> That's actually not that bad, ideally all the conditional, event, etc., WML should just be implemented in Lua. 20150813 01:50:53< iceiceice> ideally we would get rid of wml and there would only be lua imo :p 20150813 01:51:15< celticminstrel> [set_menu_item] is implemented by calling wesnoth.set_menu_item, so if you change how wesnoth.set_menu_item works, then you also need to change how [set_menu_item] is implemented. 20150813 01:51:17< iceiceice> and all the funny wml tables stuff would also disappear 20150813 01:51:37< celticminstrel> wml_menu_item::show_if_ and wml_menu_item::filter_location_ could be of type boost::function instead of vconfig. 20150813 01:51:44< iceiceice> aeth: you could make a different interface to wml::set menu item 20150813 01:51:54< aeth> iceiceice: Well, there are two directions we could go with WML imo. We could get rid of some of the programming language aspects of WML and make it a data language with the programming logic in Lua, or we could change the semantics of some of the details in WML for e.g. conditionals or actions to make it a thin newbie-friendly wrapper over Lua that's more capable 20150813 01:51:59< aeth> imo 20150813 01:52:13< iceiceice> but i think if you want to rewrite the engine so that menu items can fundamentally hold lua functions OR wml tables, its going to be really ugly 20150813 01:52:22< celticminstrel> It could, yeah. 20150813 01:52:23< iceiceice> and probably you'll break it badly, the menu item implementation is really nasty 20150813 01:52:41< iceiceice> i think you dont want to change the core of it fundamentally from being wml event based 20150813 01:52:45< celticminstrel> Mind you, the logic of extracting [show_if] and [filter_location] could be on the C++ side, rather than the Lua side... 20150813 01:53:00< iceiceice> its simpler to just, make some wrapper functiont aht gives the interface you want and fills in the boiler plate for you 20150813 01:53:03< iceiceice> to wrap it in wml 20150813 01:53:15< aeth> iceiceice: Another alternative would be to just do a set_wml_menu_item and set_lua_menu_item 20150813 01:53:34< aeth> Menu items being either conditionals in WML and calls to WML or conditionals in Lua and calls to Lua 20150813 01:53:50< iceiceice> so i mean, if you make a fundamentally parallel wml menu item system 20150813 01:53:56< aeth> The mess that should be avoided imo is using WML to call Lua to call WML to call Lua. 20150813 01:54:12< iceiceice> i mean thats inescapable 20150813 01:54:18< iceiceice> if you dont allow that then you are cutting lua out basically 20150813 01:54:27< iceiceice> b/c the core of everything is wml 20150813 01:54:49< iceiceice> i used to think that it was really ugly also to have wml calling lua calling wml calling lua 20150813 01:54:56< iceiceice> b/c of what it does to your callstack in gdb 20150813 01:55:09< iceiceice> but i guess i think its acceptable now 20150813 01:55:37< iceiceice> once you get comfortable with what the lua implementation does / can do 20150813 01:56:40-!- iceiceice_ [~chris@wesnoth/developer/iceiceice] has quit [Quit: Leaving] 20150813 01:57:42< aeth> iceiceice: but it's not acceptable, and it can be avoided in places by e.g. using the dialog code as an alternative to [message][option] (yes you have to define the dialog in WML metatables, but at least it's all being done in the Lua without a constant back and forth each level deep in the menu) 20150813 01:58:04< aeth> iceiceice: If it could be avoided in set_menu_item, too, add-ons could exist that are mostly just Lua in terms of flow. 20150813 01:58:33< aeth> The Lua API is mostly capable now that WML can mostly be avoided while using the Lua. 20150813 01:59:10< aeth> Obviously WML-as-purely-data is unavoidable, but it's no issue compared to e.g. WML conditionals in Lua or back and forth WML-Lua calls that could go very deep in the back and forth 20150813 01:59:33< iceiceice> aeth: in general, the stuff htat was implemented way before lua existed is only easily accessible to wml 20150813 01:59:44< iceiceice> i mean the events system is also inherently wml based 20150813 02:00:02< iceiceice> you could imagine that we coudl make a "make event" thing which calls lua functions instead of doing wml routines 20150813 02:00:07< iceiceice> but, we dont have that 20150813 02:00:45< celticminstrel> Is it safe to copy-construct a vconfig? It doesn't seem to have a copy-constructor... 20150813 02:01:19< iceiceice> celticminstrel, don't know, i dont' like vconfigs 20150813 02:01:22< celticminstrel> Maybe it has a default one. 20150813 02:01:36< aeth> iceiceice: right now at least in my uses (and they are rather elaborate uses of Lua), the only non-trivial WML actions (as opposed to data) that has to be called from the Lua is set_menu_item, and specifically the filter code. 20150813 02:01:56< aeth> iceiceice: For the most part I can do simple function calls to Lua in [event] tags and get done what I need to get done. 20150813 02:02:01< aeth> This is rather easy to follow 20150813 02:02:06< iceiceice> aeth: yeah i mean there should be a nice filter interface in lua 20150813 02:02:22< iceiceice> like you make functions that take a unit / a side table / etc. and return bool 20150813 02:02:31< aeth> I mean, yes, ideally there should be a way to do e.g. [event]s in Lua too, but I don't really care because it's not that complicated. 20150813 02:02:38< aeth> iceiceice: right 20150813 02:02:49< celticminstrel> Oh... it was copy-assigned already, so it's probably fine. 20150813 02:03:00< iceiceice> and you could make little "and" "or" "not" functors 20150813 02:03:06< iceiceice> and it would be basically the same as wml 20150813 02:03:29< aeth> but... why? why would you want to do WML-style conditionals in Lua? 20150813 02:03:34< iceiceice> to avoid using wml 20150813 02:03:43< iceiceice> and so that the implementation is transparent to you 20150813 02:03:46< aeth> Once you get to the point where you're accessing WML data in Lua, you don't need to actually use WML. 20150813 02:03:56< celticminstrel> Filters are not conditionals. 20150813 02:04:15< aeth> I can do something like unit_data.__cfg.gender == "female" to see units that are female-only 20150813 02:04:26< iceiceice> gn 20150813 02:04:34-!- iceiceice [~chris@wesnoth/developer/iceiceice] has quit [Quit: Leaving] 20150813 02:04:40< aeth> celticminstrel: Filters can be like conditionals afaik, I'm not 100% sure if it would be easy given the implementation 20150813 02:05:05< celticminstrel> Oh, I just realized that the terrain filter can't be preconstructed. :( 20150813 02:05:38< celticminstrel> Because one of the arguments for construction is a filter context that can be expected to vary. 20150813 02:06:03< celticminstrel> Well, I guess I get to write a functor that constructs and calls it. 20150813 02:06:32< celticminstrel> Oh, there's another problem with this idea. 20150813 02:06:55< celticminstrel> In fact, I think it renders it impossible. 20150813 02:07:07< celticminstrel> Hmm. 20150813 02:07:27< aeth> Lua is not a particularly good language for wrapping over a very ugly, complicated, complex API. 20150813 02:07:39< aeth> I mean, Lisp with its macros is probably the easiest. 20150813 02:07:54< celticminstrel> The issue, by the way, is that menuitems need to be saved. 20150813 02:10:52< aeth> celticminstrel: a Lua menu item would essentially be a conditional function that is called when selecting that menu item, and a command that is run when that function evaluates to true 20150813 02:10:56< celticminstrel> So something that cannot be represented by WML cannot be implemented. 20150813 02:11:00< aeth> celticminstrel: I'm not sure why that would be hard to save 20150813 02:11:21< aeth> Ah, I can understand a little. The issue is it wouldn't really be Lua in terms of scope. 20150813 02:12:04< celticminstrel> You could add lua_function= to SLF (if it's not already there; also SSF for that matter). 20150813 02:17:57-!- Appleman1234 [~Appleman1@KD036009074188.au-net.ne.jp] has joined #wesnoth-dev 20150813 02:19:03< aeth> celticminstrel: that's not quite good enough because it's going to be a string 20150813 02:19:19< celticminstrel> It would be the name of a Lua function. 20150813 02:19:21-!- afre [63f401a5@gateway/web/freenode/ip.99.244.1.165] has joined #wesnoth-dev 20150813 02:21:08< aeth> right 20150813 02:21:35< aeth> So it's not like a gui2 dialog, where you actually pass in a Lua function rather than just a string that's the name of a globally accessible Lua function. 20150813 02:21:43< aeth> So you can't do encapsulation by e.g. making the function local 20150813 02:21:52< aeth> Or making the function part of the function 20150813 02:21:58< celticminstrel> Which is not really a major issue. 20150813 02:22:12< celticminstrel> I do think there should be support for [lua] in filters though. 20150813 02:22:18< celticminstrel> Rather than just lua_function= 20150813 02:22:23< aeth> or making the function part of a table that you call by table.function[whatever] instead of string.format("table.function[%s]", whatever) 20150813 02:22:36< aeth> There are a million things you can do with a real Lua callback that you can't do with a string 20150813 02:22:47< vultraz> Patches Welcome 20150813 02:23:12< celticminstrel> Hm, so, are you suggesting that lua_function= should, instead of a Lua function name, be a Lua expression that evaluates to a function? 20150813 02:23:15< aeth> (In case you're wondering I do or am going to be doing all three in my add-on with Lua functions, thanks to GUI2 dialog being properly implemented, unlike e.g. [message][option].) 20150813 02:23:17< celticminstrel> That would be backwards-compatible. 20150813 02:23:38< aeth> celticminstrel: I'm suggesting that it be implemented however the callback is implemented in GUI2 dialogs. 20150813 02:23:57< aeth> as opposed to a string 20150813 02:24:02< celticminstrel> I have no idea how that's implemented and I'm not sure I want to dig through the GUI2 code to find out. 20150813 02:24:04< aeth> One advantage being that perhaps code could be reused 20150813 02:25:00< afre> Ravana_: re. stderr http://pastebin.com/hnNELJM4. My stderr.txt (from wesnoth.exe --log-debug=all) is extremely long. What snippet should I attach to the bug report? 20150813 02:25:17-!- knotwork_ [~markm@unaffiliated/knotwork] has joined #wesnoth-dev 20150813 02:25:36< celticminstrel> aeth: An expression that evaluates to a function that can then be called would work, right? 20150813 02:25:48< aeth> celticminstrel: all I know is that from the point of view of the Lua code, besides the literal WML table that needs to be defined for the dialog definition, it seems like native Lua. It feels like native Lua. And it's a callback unlike a string. 20150813 02:26:08< vultraz> afre: don't use log all 20150813 02:26:34< vultraz> it's way way overly verbose and it's impossible to find anything in it. use log wml or error 20150813 02:26:52-!- knotwork [~markm@unaffiliated/knotwork] has quit [Ping timeout: 250 seconds] 20150813 02:27:27< aeth> vultraz: right I am going to have to write something myself, probably. I need to finish my add-on first, though. 20150813 02:27:45< aeth> basically everything that's not elegant is a missing feature in Wesnoth's Lua that needs to be fixed. 20150813 02:28:42< aeth> Right now by far the least elegant is the [set_menu_item] 20150813 02:28:44 * celticminstrel checks and finds that immediately-evaluated functions are possible in Lua. 20150813 02:29:14< afre> vultraz: I asked before but no one answered: is there a reference for log values? 20150813 02:29:47< celticminstrel> So if it was an expression that evaluates to a function, you could do eg lua_function="(function(u) return u.id == 'something' end)" 20150813 02:30:15< vultraz> afre: I think so, but I can't recall where 20150813 02:31:04< afre> I see. Also, does stderr get overwritten after each session? Is it like > or >>? 20150813 02:31:30< vultraz> afre: ah, this might help http://wiki.wesnoth.org/InterfaceActionsWML#.5Bwml_message.5D 20150813 02:31:39< vultraz> not sure how up-to-date it is, though 20150813 02:32:08< celticminstrel> aeth: Anyway, I think both lua_function= and [lua[ in SUF/SLF/SSF would be good. 20150813 02:32:12< celticminstrel> ^[lua] 20150813 02:32:45< celticminstrel> But I suppose if you have [lua] then lua_function might be a bit redundant. 20150813 02:32:56< celticminstrel> So maybe just [lua]. 20150813 02:33:03< aeth> celticminstrel: Yes but we're looking at it from two different perspectives and/or use cases. I want to only ever *have* to call Lua from [event] directly, i.e. I need a Lua-equivalent for set_menu_item. 20150813 02:33:22< aeth> What I'm doing is incredibly complex, and I can't really have the flow continually mixing 20150813 02:34:20< aeth> I basically made a playable debug mode. That was the easy part. 20150813 02:35:11< celticminstrel> Speaking of which, I'd like more features in debug mode. Like an "edit unit" option. 20150813 02:35:41< aeth> haha 20150813 02:35:44< aeth> yeah, I did that 20150813 02:36:10< celticminstrel> Anyway aeth, if you have a wesnoth.set_menu_item() that takes a Lua function to determine the [show_if] and a Lua function to determine the [filter_location], how are you going to save this menuitem to a file? 20150813 02:36:13< aeth> my debug mode started out roughly like the existing debug mode (spawning units, change unit side) 20150813 02:36:24< aeth> Now it has a map editor, a unit changer, etc., and basically lots of RPG features 20150813 02:36:36< aeth> Yes, I have a very hacky in-MP map editor. 20150813 02:37:00< celticminstrel> Given the function reference, can it be converted to a string that, when compiled, produces a function with identical effect? 20150813 02:37:22< celticminstrel> If so, then [lua] in filters is a prerequisite for your need. 20150813 02:37:51< celticminstrel> (Not that that's an ideal way to do it, but I kind of doubt there's an ideal way to do it.) 20150813 02:38:06< aeth> celticminstrel: the problem is going to be the scope, so e.g. what happens if it's a local function within a function that calls set_menu_item()? or what if it's a local function within the file (or [lua])? etc. 20150813 02:38:23< afre> vultraz: btw log error doesn't start Wesnoth but log wml does. 20150813 02:38:37< vultraz> ah 20150813 02:38:41< aeth> I'm guessing that GUI2 dialog solved the same problem. The dialog callbacks are save safe. afaik. 20150813 02:38:42< vultraz> just use wml 20150813 02:39:09< aeth> oh wait 20150813 02:39:23< aeth> celticminstrel: actually what happens is you have to generate the set_menu_item() on preload 20150813 02:39:27< aeth> I think 20150813 02:39:43< aeth> Instead of it being saved 20150813 02:40:01< celticminstrel> That sounds like a pain. 20150813 02:40:10< aeth> so if you have a set_all_menu_items() that calls all the functions that eventually calls set_menu_item() just put the set_all_menu_items() in preload 20150813 02:40:21< aeth> It's not as painful as it sounds 20150813 02:41:42< aeth> celticminstrel: you just make sure the set_menu_item() calls are called in preload, and that any kind of state for the set_menu_items that you want to persist are in Wesnoth variables that are saved 20150813 02:42:14< aeth> That's probably the best solution until that NotSoEasyCoding general Lua solution 20150813 02:43:06< celticminstrel> I need a complete list of things that occur on turn refresh. 20150813 02:48:01-!- aeonchild [enchilado@defocus/yummy/enchilado] has quit [Killed (Sigyn (Spam is off topic on freenode.))] 20150813 02:48:40-!- enchilado [enchilado@gateway/shell/blinkenshell.org/x-paoplajlbgaqhrwh] has joined #wesnoth-dev 20150813 02:53:44-!- Appleman1234 [~Appleman1@KD036009074188.au-net.ne.jp] has quit [Ping timeout: 250 seconds] 20150813 03:02:33< celticminstrel> Ooh! I discovered that ActionWML in [event] is executed by calling the Lua function wesnoth.wml_actions.command, which in turn means that it uses handle_event_commands, which in turn means that it should be theoretically possible to hard-code certain tags into handle_event_commands and have it work in the proper places. 20150813 03:03:28< aeth> anyway, where I personally would like to see Wesnoth in a few years is: (1) the Lua stuff moved from wesnoth/data/ai and wesnoth/data/lua to wesnoth/scripting (or I guess wesnoth/data/scripting if it has to be under data) 20150813 03:03:55< aeth> (2) a clear layer where the event, conditional, etc., WML is built on top of the Lua, which in turn is built on top of the Wesnoth Lua API 20150813 03:04:14< celticminstrel> I think it'd also require maintaining a stack of active contexts, but I have no clue how to make a stack in Lua. 20150813 03:04:33< aeth> celticminstrel: generally when you want to make a real data structure in Lua, you define it as userdata in C or C++ 20150813 03:04:42< aeth> that's why WML shows up as "userdata", not as a table 20150813 03:05:02< aeth> Every data structure in Lua is a table or userdata afaik 20150813 03:05:07< celticminstrel> But it's only being used by the Lua in wml-tags.lua and has no need to be visible anywhere else. 20150813 03:05:14< celticminstrel> Also, a table can easily be a stack, at least in theory. 20150813 03:05:21-!- afre [63f401a5@gateway/web/freenode/ip.99.244.1.165] has quit [Quit: Page closed] 20150813 03:05:33< aeth> Anything can easily be implemented as a Lua table in theory, just poorly unless the computer's infinitely fast :-p 20150813 03:07:04-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has quit [Disconnected by services] 20150813 03:07:57-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20150813 03:08:12< aeth> Lua is really not designed to be used alone. That's why e.g. projects like Wesnoth wind up choosing it over languages like JavaScript or Python, actually. 20150813 03:08:43< aeth> There are lots of points in my code where if it was its own game rather than a Wesnoth add-on I would probably have to rewrite parts in C. 20150813 03:09:28< celticminstrel> It kinda feels pointless to be using userdata for something that's used in exactly one place. 20150813 03:09:46< celticminstrel> (Well, exactly one file, as an internal implementation detail.) 20150813 03:09:48-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has quit [Disconnected by services] 20150813 03:10:10< aeth> Lua's not a perfect language, it's a niche language designed to be used as a scripting language with C or C++, particularly games. 20150813 03:10:21< aeth> You're not going to get ideal code using Lua imo 20150813 03:10:22-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20150813 03:10:49< aeth> Lua's advantage is that it gets sandboxed with games so in theory it's safe, so it's better than nothing (or WML). 20150813 03:11:50< aeth> Since it's way faster than WML macros, just using Lua tables for everything is probably good enough. 20150813 03:12:02< pydsigner> Lua is a pretty cool language in it's own right. 20150813 03:12:30< aeth> Maybe one day Wesnoth can be bundled with some data structures libraries to help the Lua out a bit in performance, but while nearly everything is still being written in macros just about anything in Lua is going to be a speed up. 20150813 03:12:32-!- sailorswift [~sailorswi@c-24-5-126-97.hsd1.ca.comcast.net] has quit [Quit: My Mac has gone to sleep. ZZZzzz…] 20150813 03:13:19< aeth> I'm guessing there are probably some useful data structure libraries designed to be used with Lua as a scripting language because really, I don't see how anyone could program e.g. tens of thousands of lines of really complicated Lua with just tables when there are more suitable data structures for lots of things. 20150813 03:13:32-!- sailorswift [~sailorswi@c-24-5-126-97.hsd1.ca.comcast.net] has joined #wesnoth-dev 20150813 03:14:35< aeth> I kind of feel silly using tables and strings when I know there are better ways to be doing the exact same thing. 20150813 03:21:35< celticminstrel> I don't quite understand what __shallow_literal does. 20150813 03:22:01< aeth> pydsigner: imo Lua is just another boring, generic, complementing-C/C++ scripting language like Python, JavaScript, etc. Each of which have some advantages and some disadvantages over each other. 20150813 03:22:23< celticminstrel> The wiki implies it parses [insert_tag], but this code uses __shallow_literal and then goes on to handle [insert_tag] manually. 20150813 03:22:48< aeth> There are quite a few wildly different kinds of programming languages out there, but Lua isn't one. 20150813 03:23:03< celticminstrel> Python isn't what you said. 20150813 03:23:30< aeth> celticminstrel: Python as it is today is too slow to be used standalone for complicated things. You have to use it alongside things written in C or C++. 20150813 03:23:44< aeth> If anything, Lua just embraces that too-slowness and makes it sandboxable instead of pretending it can exist standalone 20150813 03:23:48< celticminstrel> It's a standalone language. Many people use it as such. 20150813 03:23:53< pydsigner> aeth: ........ 20150813 03:24:09< aeth> celticminstrel: no, they don't, the major uses of Python "alone" generally use libraries written in faster languages, e.g. numpy 20150813 03:24:10< celticminstrel> I think JS and Lua probably are standalone languages too, to be honest. 20150813 03:24:31< celticminstrel> That counts as standalone, aeth. By "standalone" I mean "not embedded". 20150813 03:24:41< aeth> or e.g. Python as a web language uses fast SQL databases not written in Python (often not even the libraries are) to deliver to browsers not written in Python, etc. 20150813 03:24:55< pydsigner> Wut 20150813 03:25:04< aeth> celticminstrel: C doesn't need its libraries written in something other than C, for instance. 20150813 03:26:03< celticminstrel> Nor does Python. 20150813 03:26:18< aeth> But in practice, Python's used to complement C/C++, not to replace it. 20150813 03:26:31< pydsigner> You're totally missing the point of— 20150813 03:26:34< aeth> Python's main implementation is itself not written in Python (PyPy is, of course) 20150813 03:26:34< celticminstrel> If you want to interface with something that's not written in C, sure, you need to set up that interface to Python in C as well. 20150813 03:27:15< aeth> celticminstrel: No, there's a major difference between e.g. Common Lisp interfacing with C through CFFI because everything's already written in C and Python interfacing with (and being written in) C because it's designed to play nice with C and is too slow to be used without C in some places. 20150813 03:27:36< celticminstrel> Not really. 20150813 03:27:48< aeth> Python is getting close with PyPy. Maybe one day it will escape the C 20150813 03:27:49< pydsigner> Those places are rare 20150813 03:28:10< celticminstrel> There's also Jython and IronPython, you know. Though I'm not sure how active they are. 20150813 03:29:04< aeth> celticminstrel: What I mean is, Python is written in C, nicely interfaces with C, is often used to script for C or C++, and often has complicated libraries have parts written in C or C++ to speed things up, etc. 20150813 03:29:17< aeth> It's not a C-replacement at this point. 20150813 03:29:18< celticminstrel> So? What has that got to do with anything? 20150813 03:30:41< celticminstrel> That Python and many of its libraries are written in C seems irrelevant to me. 20150813 03:32:38< aeth> ugh, I guess I'm not explaining myself properly 20150813 03:33:16-!- enchilado [enchilado@gateway/shell/blinkenshell.org/x-paoplajlbgaqhrwh] has quit [Changing host] 20150813 03:33:16-!- enchilado [enchilado@defocus/yummy/enchilado] has joined #wesnoth-dev 20150813 03:33:26-!- enchilado is now known as aeonchild 20150813 03:34:05< pydsigner> It only shows that C is a good language for writing languages 20150813 03:34:14< aeth> It's not. 20150813 03:34:18< celticminstrel> ^ 20150813 03:34:24< celticminstrel> s/good/common/ 20150813 03:34:36< aeth> C is a fast language, and the libraries are in C, but there are languages that are easier to write languages in. 20150813 03:35:07< aeth> The problem is, when there's massive network effects behind C and C++, it's hard to not use them because you're going to have to either interface with libraries in C and/or C++ at some point or you're going to have to reinvent the wheel (probably poorly) 20150813 03:35:58< aeth> Most old languages are pretty fast simply because they had to be because older hardware is so slow compared to today's. Also they've had more attention put into them. e.g. COBOL is apparently pretty fast. 20150813 03:36:43< pydsigner> But it's brain damaged. 20150813 03:36:50< aeth> So is C. 20150813 03:36:52< aeth> :-p 20150813 03:37:19< aeth> C has many deep design flaws built into it (e.g. how strings are handled iirc) 20150813 03:38:25< aeth> Strings are pretty important, so flawed handling of strings is a pretty major flaw 20150813 03:40:42< aeth> Also, the metaprogramming in C and C++ are both terrible. 20150813 03:40:54-!- framling [~user@c-50-186-43-50.hsd1.or.comcast.net] has joined #wesnoth-dev 20150813 03:41:15< celticminstrel> I don't think C has any metaprogramming, and C++ metaprogramming may be ugly but I don't think it's that terrible. 20150813 03:41:17< aeth> Scheme probably has some of the best metaprogramming with hygienic macros. (Although I don't regularly program in Scheme because of, among other things, the library issue.) 20150813 03:42:30< aeth> Lisp and Scheme macros are kind of cheating, though, because you have to use special syntax in the whole language, but I'm pretty sure you could probably find some metaprogramming that at least gets half of the way there in some languages. 20150813 03:45:07< aeth> Lisp's a nice language to build languages on because of the way s-expressions work. 20150813 03:45:20< aeth> Racket, a dialect of Scheme, even makes it one of its core concepts, the whole build-a-language thing. 20150813 03:46:32< aeth> Something most new languages are doing right is how they handle functions. 20150813 03:47:14< aeth> One of the things that makes Lua passable even though it has some design flaws is Lua functions are pretty OK at least ime. 20150813 03:47:43-!- N4tr0n_ [~N4tr0n@cpe-76-175-70-130.socal.res.rr.com] has quit [Ping timeout: 246 seconds] 20150813 03:48:48< celticminstrel> The trouble with implementing [break] is that I need to figure out a way to jump out of several layers of functions. 20150813 03:50:41-!- Appleman1234 [~Appleman1@KD036009086190.au-net.ne.jp] has joined #wesnoth-dev 20150813 03:51:08-!- N4tr0n_ [~N4tr0n@cpe-76-175-70-130.socal.res.rr.com] has joined #wesnoth-dev 20150813 03:51:30< celticminstrel> I could use "exceptions", but that feels a bit ugly. 20150813 03:51:59< celticminstrel> But I can't think of another good way... 20150813 03:56:46< vultraz> use break :P 20150813 03:56:48< vultraz> to implement break 20150813 03:56:56< vultraz> breakception 20150813 03:57:12< chaverma> woah.jpg 20150813 03:58:58< celticminstrel> Can't. 20150813 03:59:04< celticminstrel> At least, not directly. 20150813 03:59:22< chaverma> so when you said you could use exceptions, you were lying 20150813 04:00:03< celticminstrel> For simple breaks, it would be possible to have handle_event_commands return a value that says what to do (break, continue, or nothing special). 20150813 04:00:17< celticminstrel> But I don't think that's good enough. 20150813 04:03:01< vultraz> good enough for what? 20150813 04:03:19< vultraz> it's not a goal to add support for every single contingency 20150813 04:03:43< celticminstrel> I'm thinking about if you want to jump out of the outer loop from within a nested loop. 20150813 04:04:19< Aginor> isn't that where you should use a second break? 20150813 04:04:39< Aginor> set a condition, if condition then break 20150813 04:04:45< celticminstrel> Hmm. I suppose in principle it would always be possible to restructure it to use a second break. 20150813 04:05:11< Aginor> that way it will follow the same paradigms as most other imperative languages 20150813 04:05:45< celticminstrel> In C/C++ the convention is to use goto for this. In Java and several other languages, there's an optional argument to break. 20150813 04:06:07< celticminstrel> vultraz: So you think it's good enough if it can only leave a single scope? 20150813 04:06:19< vultraz> Yes 20150813 04:06:29< celticminstrel> Alright, I guess I'll do it that way after all. 20150813 04:06:39< Aginor> celticminstrel: it varies in c/c++ actually, but you have the option of goto 20150813 04:07:01< Aginor> and exceptions are for throwing errors, not bailing out of loops 20150813 04:07:22< chaverma> tell that to python, am i rite 20150813 04:07:26< Aginor> in C, gotos are also primarily used for error handling/cleaing up state 20150813 04:07:57< Aginor> besides, you have exceptions in c++ too 20150813 04:08:09< Aginor> I'm a bit surprised I haven't seen any used in wesnoth 20150813 04:08:54< shadowm> What have you not seen used? 20150813 04:09:21< Aginor> shadowm: throw/catch 20150813 04:09:32< shadowm> They... are used all over the place. 20150813 04:09:36< Aginor> but maybe I haven't been looking in the right parts of the code :D 20150813 04:09:56< Aginor> I've mostly been digging around in code that's interfacing with C 20150813 04:10:02< vultraz> Throw catch is all over the place.. 20150813 04:10:05< shadowm> Reporting WML load errors, grammar errors, *signaling user-requested exits*, etc. 20150813 04:10:22< vultraz> quitting the game 20150813 04:10:24< Aginor> things I haven't looked at, so my bad 20150813 04:10:27< celticminstrel> throw CVideo::quit()? 20150813 04:10:33< shadowm> vultraz: That's what I just said. 20150813 04:10:36< celticminstrel> I remember seeing that somewhere. 20150813 04:10:44< celticminstrel> In fact I moved it to somewhere else. 20150813 04:11:36< Aginor> ok, my bad, sorry 20150813 04:12:00< shadowm> In C++ you _can_ use goto but generally _shouldn't_ because it can be used to circumvent scope control. 20150813 04:13:38< shadowm> Okay, maybe I'm confusing this with longjmp/setjmp. 20150813 04:13:52< shadowm> IGNORE ME. 20150813 04:16:57< celticminstrel> This seems surprisingly easy, but I suppose I should also write a test. Hmm. 20150813 04:17:13< celticminstrel> ...actually, this would be a good place to use WML unit tests. Where are those stored? 20150813 04:17:35< celticminstrel> data/test? 20150813 04:17:39< shadowm> http://wiki.wesnoth.org/SoftwareTesting#WML_unit_tests_.28WML.2FLua_API.29 20150813 04:17:53< shadowm> You want to read the How To Add WML Tests section below. 20150813 04:30:05-!- irker011 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20150813 04:30:05< irker011> wesnoth: Charles Dang wesnoth:master a436c46f1356 / data/test/scenarios/feeding.cfg: Comment out [terrain_mask] inclusion possibly breaking feeding test http://git.io/v3VBH 20150813 04:34:11< vultraz> Hopefully that fixes the test, at least 20150813 04:35:49< celticminstrel> Trying to think of a simple loop construct to test that [continue] works. 20150813 04:38:49< celticminstrel> Got something. 20150813 04:43:18< shadowm> vultraz: Your solution to a broken test is commenting it out? 20150813 04:43:30< shadowm> You know that's not exactly what tests are for, right? 20150813 04:44:31< vultraz> Yes 20150813 04:44:51< vultraz> But I can't figure out why it's breaking on something that seems to fix a problem 20150813 04:44:51< shadowm> Do you *know* why it's broken then? 20150813 04:45:27< vultraz> It should be that [terrain_mask] 20150813 04:45:39< vultraz> I dunno why that's even there 20150813 04:46:15< celticminstrel> Trying to figure out how to run the tests now. 20150813 04:46:19< celticminstrel> Oh maybe... 20150813 04:46:29< vultraz> Travis does it 20150813 04:46:33< vultraz> #lazysolutions 20150813 04:46:35< vultraz> :P 20150813 04:46:45< celticminstrel> Heh. 20150813 04:47:14< shadowm> Except that takes far longer, to discourage you from being lazy like that. 20150813 04:48:30< celticminstrel> My current attempt is giving an "Observed result" of 127, with "timeout: command not found" that looks like a bash error, so I'm assuming it doesn't like the binary path I gave it? 20150813 04:49:02< celticminstrel> Oh. 20150813 04:49:18< celticminstrel> Hah. I don't have a timeout command. Maybe that's fixable. 20150813 04:49:46< celticminstrel> MacPorts to the rescue! 20150813 04:50:54 * celticminstrel also made a custom test schedule that contains only the tests I added. 20150813 04:51:17< celticminstrel> (Of course, I added them to the main one too.) 20150813 04:51:40< celticminstrel> Okay now they all give 1-fail. That's a definite improvement. 20150813 04:52:07 * vultraz also doesn't know how to run the tests himself 20150813 04:52:30< celticminstrel> I had to use the -p and -l options. 20150813 04:54:04< celticminstrel> It gives 1-fail even if I remove the {RETURN} call. 20150813 04:54:30< celticminstrel> It should give 2-timeout for that, right? 20150813 04:56:33< celticminstrel> Oh wait. 20150813 04:56:51< celticminstrel> Maybe Wesnoth can't find the scenario. 20150813 05:16:02-!- new_one [~new_one@2604:a880:1:20::22e:d001] has quit [K-Lined] 20150813 05:17:04-!- travis-ci [~travis-ci@ec2-54-211-143-254.compute-1.amazonaws.com] has joined #wesnoth-dev 20150813 05:17:05< travis-ci> wesnoth/wesnoth#7025 (master - a436c46 : Charles Dang): The build is still failing. 20150813 05:17:05< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/75380047 20150813 05:17:05-!- travis-ci [~travis-ci@ec2-54-211-143-254.compute-1.amazonaws.com] has left #wesnoth-dev [] 20150813 05:17:18< vultraz> wejkflkfjksdfkjsdiofjiujhfuiwjfuio 20150813 05:18:46< vultraz> Feeding failed again 20150813 05:18:48< celticminstrel> It turns out I had some syntax errors in the Lua. 20150813 05:18:52< vultraz> what's wrong now! 20150813 05:23:43< celticminstrel> Well, run_wml_tests is not working for me for whatever reason, but two of three tests pass if I invoke wesnoth myself with "-u whatever" 20150813 05:30:02< celticminstrel> Ah, I've run into the issue of jumping through scopes again. I can't put a [break] nested in some interior scope, for example in an [if]. 20150813 05:30:36< celticminstrel> vultraz: What do you think? Should I try making it [continue_if] and [break_if] instead? Is that still good enough? 20150813 05:34:15< vultraz> yes 20150813 05:35:57< vultraz> celticminstrel: it does make sense to have the conditions in the tag 20150813 05:36:04< vultraz> instead of an extra [if] 20150813 05:36:54< celticminstrel> It would make the logic a bit different in complicated situations (especially for [return_if]), but I think it'd be fine for most simple cases. 20150813 05:38:03-!- N4tr0n_ [~N4tr0n@cpe-76-175-70-130.socal.res.rr.com] has quit [Ping timeout: 255 seconds] 20150813 05:38:04-!- Kwandulin [~Miranda@p5B0084DE.dip0.t-ipconnect.de] has joined #wesnoth-dev 20150813 05:38:37< celticminstrel> Considering this, I might actually change it around so that [break_if] doubles as [return_if[... 20150813 05:38:40< celticminstrel> ^] 20150813 05:42:52-!- N4tr0n_ [~N4tr0n@cpe-76-175-70-130.socal.res.rr.com] has joined #wesnoth-dev 20150813 06:03:52< celticminstrel> Okay, so my test fails when --log-strict=warning is passed. 20150813 06:03:55< celticminstrel> Why? 20150813 06:05:12< celticminstrel> ...oh... 20150813 06:08:01< celticminstrel> It's failing because of something completely unrelated to the tests. 20150813 06:08:20< vultraz> What is that? 20150813 06:08:20< celticminstrel> Namely "warning config: add-on 'CelminTester' has no _info.cfg; cannot read version info". 20150813 06:08:39< vultraz> That... can't be the same thing as Travis :/ 20150813 06:08:52< celticminstrel> Where "CelminTester" is a multiplayer scenario I used to test the [effect]apply_to=advances_to 20150813 06:09:03< celticminstrel> Yeah, no, this is why my tests are failing when I run them here. 20150813 06:09:22< celticminstrel> It gives the warning even if told not to load addons, which is annoying. 20150813 06:11:10< vultraz> Anything if you remove that? 20150813 06:14:54< celticminstrel> My repo is a bit behind, so I doubt I can help you with your issue, sorry. 20150813 06:15:31< celticminstrel> If I remove it, the tests pass. 20150813 06:16:10< celticminstrel> Wait. 20150813 06:17:05< celticminstrel> One of the tests passes. :| 20150813 06:17:28< celticminstrel> ...no, there must still be something else wrong, because that test passed when I ran it individually. 20150813 06:17:44< celticminstrel> Now I'm confusing myself, whoops. 20150813 06:18:42< celticminstrel> Okay, removing it seems to have caused the tests to time out. 20150813 06:20:28< vultraz> : 20150813 06:20:30< vultraz> :| 20150813 06:21:07< celticminstrel> Increased timeout to 20s, now only one times out. 20150813 06:21:35< celticminstrel> By the way, all the tests pass if I run them individually. 20150813 06:21:48< celticminstrel> I'm just trying to get them to pass via run_wml_tests as well. 20150813 06:23:20< celticminstrel> I get the feeling that 10 seconds isn't really enough time for Wesnoth to load all its stuff, run through the test, and exit. 20150813 06:24:21< celticminstrel> With 30s timeout, they all passed. 20150813 06:24:29< celticminstrel> (When running individually there's no timeout.) 20150813 06:27:12< celticminstrel> Also, adding a blank _server.pbl to the addon silences the warning and allows the tests to pass. 20150813 06:27:36< celticminstrel> (Adding an _info.cfg could probably do that too.) 20150813 06:27:40< celticminstrel> ^-probably 20150813 06:30:36< celticminstrel> I'd push now, but I have that pull request pending and I don't want to affect it. 20150813 06:30:52< celticminstrel> Waiting on ancestral still. 20150813 06:40:39-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20150813 06:40:49-!- chaverma [~Chris@c-67-169-95-15.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 20150813 06:47:10-!- boucman_work [~jrosen@193.56.60.161] has joined #wesnoth-dev 20150813 06:47:10-!- boucman_work [~jrosen@193.56.60.161] has quit [Changing host] 20150813 06:47:10-!- boucman_work [~jrosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20150813 06:57:27-!- new_one [~new_one@2604:a880:1:20::22e:d001] has joined #wesnoth-dev 20150813 07:10:32-!- [Relic] [~Relic]@2602:306:33a3:6d30:ddd0:524:6799:3674] has quit [Quit: I press the magic X and all the weirdos go away!] 20150813 07:18:12-!- Jetrel [~Jetrel@c-73-164-34-22.hsd1.mn.comcast.net] has quit [Ping timeout: 272 seconds] 20150813 07:33:10-!- Appleman1234 [~Appleman1@KD036009086190.au-net.ne.jp] has quit [Ping timeout: 240 seconds] 20150813 07:34:47-!- N4tr0n_ [~N4tr0n@cpe-76-175-70-130.socal.res.rr.com] has quit [Ping timeout: 252 seconds] 20150813 07:41:29-!- Netsplit *.net <-> *.split quits: irker011, Ravana_, Rhonda, shadowm 20150813 07:41:50< wedge009> Hello folks. Just wondering if you can confirm something for me: what key combination do you get if you try to add a hot-key as Ctrl-Enter? It doesn't matter if it's the main keyboard or the keypad. It seems it reads as Ctrl-J on Windows and Ctrl-M on Linux... can anyone test for Mac as well, please? It might not be possible to work around this, but I'd still like to have a look. Thanks. 20150813 07:43:08-!- Netsplit over, joins: Ravana_, shadowm, Rhonda, irker011 20150813 07:43:42-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [Disconnected by services] 20150813 07:43:48-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has joined #wesnoth-dev 20150813 07:45:19-!- irker011 [~irker@uruz.ai0867.net] has quit [Ping timeout: 265 seconds] 20150813 07:45:49-!- Rhonda [~rhonda@anguilla.noreply.org] has quit [Ping timeout: 265 seconds] 20150813 07:46:48-!- shadowm [~ignacio@wesnoth/developer/shadowm] has quit [Ping timeout: 256 seconds] 20150813 07:47:19-!- Rhonda [~rhonda@anguilla.noreply.org] has joined #wesnoth-dev 20150813 07:47:58-!- shadowm [~ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20150813 07:50:20-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20150813 07:53:07-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 256 seconds] 20150813 07:53:07-!- wedge010 is now known as wedge009 20150813 07:58:58-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20150813 08:06:18-!- Kwandulin [~Miranda@p5B0084DE.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20150813 08:14:03-!- genbattle_ [~genbattle@115-188-147-250.jetstream.xtra.co.nz] has joined #wesnoth-dev 20150813 08:25:33-!- Shackra [~Jorge@186.177.2.148] has quit [Ping timeout: 260 seconds] 20150813 08:26:36-!- sailorswift [~sailorswi@c-24-5-126-97.hsd1.ca.comcast.net] has quit [Quit: My Mac has gone to sleep. ZZZzzz…] 20150813 08:30:06-!- Appleman1234 [~Appleman1@KD106179112247.au-net.ne.jp] has joined #wesnoth-dev 20150813 08:35:13-!- aquileia [95acd0d3@gateway/web/freenode/ip.149.172.208.211] has joined #wesnoth-dev 20150813 08:37:09< aquileia> vultraz: For Visual Studio, I'm using https://github.com/wesnoth/wesnoth/blob/master/projectfiles/VC9/WML_tests.cmd together with https://github.com/wesnoth/wesnoth/blob/master/projectfiles/VC9/WindowsTimeout.cpp to run the tests 20150813 08:38:18< aquileia> The latter is only necessary as Windows has no real timeout command, if MinGW provides one, you can use that instead 20150813 08:43:26-!- aquileia [95acd0d3@gateway/web/freenode/ip.149.172.208.211] has quit [Quit: Page closed] 20150813 08:50:59-!- zombah [~zombah@2a02:28:3:1:214:4fff:fe47:5920] has joined #wesnoth-dev 20150813 08:53:38-!- new_one [~new_one@2604:a880:1:20::22e:d001] has quit [K-Lined] 20150813 08:53:48-!- kinow [~kinow@apache/committer/kinow] has joined #wesnoth-dev 20150813 08:54:36< zookeeper> ehh. for debugging purposes on the engine side, is there some simple function to pop up a modal dialog? 20150813 08:55:15< shadowm> I take it written to stderr doesn't cut it for whatever you are trying to do? 20150813 08:55:20< shadowm> Er, writing. 20150813 08:55:46< zookeeper> i'd like to get output in the middle of an animation 20150813 08:56:03< zookeeper> i can make do with that i guess, but i was wondering if there was a better way 20150813 08:56:14< shadowm> Then bringing up a dialog is likely to mess something up timing-wise. 20150813 08:56:25< zookeeper> i know 20150813 08:56:53< shadowm> If you want to use a dialog: gui2::show_transient_message (src/gui/dialogs/transient_message.hpp). 20150813 08:57:37< shadowm> If you want to just write to stderr: use std::cerr (requires , but most files include this via "log.hpp") or Wesnoth's logging facilities. 20150813 08:57:40< zookeeper> ah, wonderful, thanks 20150813 09:03:13< shadowm> wedge009: It registers as Ctrl+m here too (Linux, 1.12.4+dev). 20150813 09:07:33-!- Appleman1234 [~Appleman1@KD106179112247.au-net.ne.jp] has quit [Ping timeout: 260 seconds] 20150813 09:09:12< wedge009> shadowm: Thanks. 20150813 09:12:52< wedge009> Hmm. Looks like Mac EOL is same as UNIX these days - it's just LF now, isn't it? 20150813 09:13:21-!- Kwandulin [~Miranda@p5B0084DE.dip0.t-ipconnect.de] has joined #wesnoth-dev 20150813 09:17:18< shadowm> Yes, I believe it's been the same since the first OS X release since that's also the first Mac OS release with a Unix core and userland. 20150813 09:20:12< zookeeper> shadowm, well, it works, but kind awkward to use in some places because i have to add the includes and then figure out wtf to pass as the video argument 20150813 09:22:57-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has quit [Ping timeout: 260 seconds] 20150813 09:23:52< zookeeper> not that i think i need to do it anymore, really 20150813 09:25:14-!- joet [~joet@host86-163-217-190.range86-163.btcentralplus.com] has joined #wesnoth-dev 20150813 09:35:30-!- genbattle_ [~genbattle@115-188-147-250.jetstream.xtra.co.nz] has quit [Ping timeout: 246 seconds] 20150813 09:41:08< zookeeper> ha, success. can play slow/poison/drain/etc sounds correctly. 20150813 09:58:20-!- kinow [~kinow@apache/committer/kinow] has quit [Quit: Leaving] 20150813 10:04:02-!- Appleman1234 [~Appleman1@KD036009092177.au-net.ne.jp] has joined #wesnoth-dev 20150813 10:05:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150813 10:27:34-!- Kwandulin [~Miranda@p5B0084DE.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20150813 10:28:11-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20150813 10:30:08-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150813 10:34:36-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20150813 10:37:10-!- mjs-de [~mjs-de@x4db50479.dyn.telefonica.de] has joined #wesnoth-dev 20150813 10:40:26-!- Appleman1234 [~Appleman1@KD036009092177.au-net.ne.jp] has quit [Ping timeout: 240 seconds] 20150813 10:48:59< jxanthony> I can't figure out what the failure is here: https://travis-ci.org/wesnoth/wesnoth/jobs/74915036 20150813 10:49:11< jxanthony> Is it literally just that the test took longer than 50 minutes? 20150813 10:49:57< Soliton> that's what it says there. 20150813 11:05:12-!- new_one [~new_one@2604:a880:1:20::22e:d001] has joined #wesnoth-dev 20150813 11:11:13-!- boucman_work [~jrosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20150813 11:16:06< wedge009> More fun: Attempting to use Shift or Alt with Ctrl-Enter results in a @ or ` character. XD 20150813 11:16:34< wedge009> Not that I expect anyone to actually use this combination as a hot-key, but it's still funny behaviour. 20150813 11:17:59-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150813 11:18:26< wedge009> Heh, Ctrl+Alt+Anything seems to result in Ctrl-Alt+`. Oh the fun. 20150813 11:26:19-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20150813 11:26:25-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20150813 11:26:50 * zookeeper wonders if anyone has anything useful to say about #445 that they've forgotten to say 20150813 11:27:09< wedge009> Hmm. The only reason I can see to use the character instead of the key code is so you can detect Ctrl+K (for example) instead of Ctrl+Shift+k. 20150813 11:27:23< wedge009> What's #445? 20150813 11:27:54< zookeeper> https://github.com/wesnoth/wesnoth/pull/445 20150813 11:29:26< wedge009> Oh, I see. It's worth a try, I suppose. What did you notice in your testing? 20150813 11:30:33< zookeeper> that it works for me 20150813 11:31:19< wedge009> That's good news, then. 20150813 11:31:25< zookeeper> sure it is :P 20150813 11:31:39< wedge009> I wasn't being sarcastic... 20150813 11:32:53< zookeeper> neither was i! 20150813 11:37:08-!- Appleman1234 [~Appleman1@KD036009090105.au-net.ne.jp] has joined #wesnoth-dev 20150813 11:41:31< Soliton> zookeeper: is there no constant, enum or whatever to use instead of the -2? i'm guessing that's for the map border. 20150813 11:43:06< zookeeper> Soliton, i don't think so. it's the same construct as 50 lines above 20150813 11:44:20< Soliton> i see. would be good to have i'd say. but that's orthogonal to your patch then. 20150813 11:45:24< Soliton> i'd remove the commented out debug messages or use a proper debug logger. 20150813 11:50:59< zookeeper> i guess... 20150813 11:52:52< zookeeper> ah, and since imagelists are vectors, i guess i could merge them first and avoid the duplicate loop 20150813 12:17:57-!- prkc [~prkc@4E5CC75C.dsl.pool.telekom.hu] has joined #wesnoth-dev 20150813 13:08:03-!- Gravis [~gravis@ip68-100-229-233.dc.dc.cox.net] has left #wesnoth-dev [] 20150813 13:28:45-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20150813 13:29:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150813 13:30:49-!- horrowind [~Icedove@2a02:810a:8b00:5298:21b:fcff:fee3:c3ff] has joined #wesnoth-dev 20150813 13:32:51< wedge009> Whee! I believe I've worked out a solution to the Ctrl+Return/Enter issue. And as a bonus, resolved the keys being mis-read as ` or @ when in combination with Ctrl or Ctrl+Shift. 20150813 13:34:51< wedge009> I'm reasonably confident it will work on Linux/Mac systems too, but will need testing of course. 20150813 13:45:02-!- Appleman1234 [~Appleman1@KD036009090105.au-net.ne.jp] has quit [Ping timeout: 250 seconds] 20150813 14:07:49-!- boucman_work [~jrosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20150813 14:27:32-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20150813 14:35:13< wedge009> I've probably done it all wrong but can't learn without trying, I suppose: https://github.com/wesnoth/wesnoth/pull/450 20150813 14:41:22-!- clavi [~clavi@2001:1af8:4700:a03a:9::] has joined #wesnoth-dev 20150813 14:42:45-!- Appleman1234 [~Appleman1@KD036009083115.au-net.ne.jp] has joined #wesnoth-dev 20150813 14:51:08-!- Kwandulin [~Miranda@p5B0084DE.dip0.t-ipconnect.de] has joined #wesnoth-dev 20150813 14:59:55-!- boucman_2 [~jrosen@bob75-2-81-56-46-209.fbx.proxad.net] has joined #wesnoth-dev 20150813 15:03:42-!- boucman_work [~jrosen@wesnoth/developer/boucman] has quit [Ping timeout: 265 seconds] 20150813 15:06:15-!- [Relic] [~Relic]@2602:306:33a3:6d30:d41:83e3:7c7d:43ca] has joined #wesnoth-dev 20150813 15:08:12-!- boucman_2 is now known as boucman_work 20150813 15:08:21-!- boucman_work [~jrosen@bob75-2-81-56-46-209.fbx.proxad.net] has quit [Changing host] 20150813 15:08:21-!- boucman_work [~jrosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20150813 15:42:52-!- iceiceice [~chris@c-73-197-174-173.hsd1.nj.comcast.net] has joined #wesnoth-dev 20150813 15:42:52-!- iceiceice [~chris@c-73-197-174-173.hsd1.nj.comcast.net] has quit [Changing host] 20150813 15:42:52-!- iceiceice [~chris@wesnoth/developer/iceiceice] has joined #wesnoth-dev 20150813 15:43:10< iceiceice> vultraz: i think this commit is not such a good idea: https://github.com/wesnoth/wesnoth/commit/a436c46f13564b84effd0481fc4d41c340bc9ec2 20150813 15:43:25< iceiceice> so what is going on there, is, the test puts a "void" terrain under the unit that is about to get hit 20150813 15:43:33< iceiceice> the purpose of this is that, the unit will have 0% defense so the hits will always happen 20150813 15:43:41< iceiceice> b/c you don't really want the test to have random results 20150813 15:43:48< vultraz> iceiceice: then why not [terrain]? 20150813 15:43:58< iceiceice> maybe it should be terrain 20150813 15:44:06< vultraz> But I think I might have broken something anyway, since that doesn't work in a scenario 20150813 15:44:08< vultraz> :/ 20150813 15:44:43< vultraz> But I also fixed a bug 20150813 15:44:50< vultraz> So blaggh :| 20150813 15:47:35< vultraz> Perhaps you could help? 20150813 15:48:21< iceiceice> i dont have a current clone 20150813 15:48:45< iceiceice> also all my old build scripts are gone because i wiped my hard drive a few months ago 20150813 15:49:00< iceiceice> i could get it all running again but it would take a while 20150813 15:49:08< iceiceice> just wanted to point out an issue there 20150813 15:51:42< vultraz> Ah, ok 20150813 16:06:05-!- boucman_work [~jrosen@wesnoth/developer/boucman] has quit [Ping timeout: 244 seconds] 20150813 16:18:55-!- Kwandulin [~Miranda@p5B0084DE.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20150813 16:20:24-!- zombah [~zombah@2a02:28:3:1:214:4fff:fe47:5920] has quit [Quit: Leaving] 20150813 16:22:39-!- iceiceice [~chris@wesnoth/developer/iceiceice] has quit [Quit: Leaving] 20150813 16:31:54-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20150813 16:32:00-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20150813 17:19:07-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20150813 17:49:47-!- irker053 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20150813 17:49:47< irker053> wesnoth: Nils Kneuper wesnoth:1.12 a445b4fb85f7 / / (11 files in 10 dirs): updated Latvian translation http://git.io/v3KAV 20150813 17:49:47< irker053> wesnoth: Nils Kneuper wesnoth:master 5ad57f09a3c9 / / (11 files in 10 dirs): updated Latvian translation http://git.io/v3KAw 20150813 18:08:39-!- joet [~joet@host86-163-217-190.range86-163.btcentralplus.com] has quit [Ping timeout: 255 seconds] 20150813 18:18:54-!- EdB [~edb@89-158-11-138.rev.numericable.fr] has joined #wesnoth-dev 20150813 18:23:50-!- Appleman1234 [~Appleman1@KD036009083115.au-net.ne.jp] has quit [Ping timeout: 272 seconds] 20150813 18:37:49-!- timotei_ [~timotei@wesnoth/developer/timotei] has joined #wesnoth-dev 20150813 18:41:06-!- timotei [~timotei@wesnoth/developer/timotei] has quit [Ping timeout: 260 seconds] 20150813 18:47:02-!- travis-ci [~travis-ci@ec2-54-197-168-147.compute-1.amazonaws.com] has joined #wesnoth-dev 20150813 18:47:03< travis-ci> wesnoth/wesnoth#7028 (master - 5ad57f0 : Nils Kneuper): The build is still failing. 20150813 18:47:03< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/75481116 20150813 18:47:03-!- travis-ci [~travis-ci@ec2-54-197-168-147.compute-1.amazonaws.com] has left #wesnoth-dev [] 20150813 18:56:46-!- Elvish_Hunter [~irssi@wesnoth/developer/elvish-hunter] has joined #wesnoth-dev 20150813 19:00:54-!- lipkab [~the_new_l@host-91-147-210-193.biatv.hu] has joined #wesnoth-dev 20150813 19:20:02-!- Appleman1234 [~Appleman1@KD036009070013.au-net.ne.jp] has joined #wesnoth-dev 20150813 19:22:34-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150813 19:22:53-!- EdB [~edb@89-158-11-138.rev.numericable.fr] has quit [Quit: Konversation terminated!] 20150813 19:25:40-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [Disconnected by services] 20150813 19:25:41-!- SZ_Bot__ [~Ravana@53-113-190-90.dyn.estpak.ee] has joined #wesnoth-dev 20150813 19:26:13-!- SZ_Bot__ is now known as Ravana_ 20150813 19:26:16-!- Ravana_ [~Ravana@53-113-190-90.dyn.estpak.ee] has quit [Changing host] 20150813 19:26:16-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has joined #wesnoth-dev 20150813 19:27:34< celticminstrel> There's an annoyance with {AMLA_DEFAULT} - it can't be used inside [modifications] because the expected tag name is different. 20150813 19:31:21< Elvish_Hunter> Well, the name of the macro itself tells that it's meant to be used for AMLAs... 20150813 19:31:39< Elvish_Hunter> Not to mention, modifying it will break pretty much every UMC around 20150813 19:34:37< celticminstrel> What about changing the expected tag, so that [modifications][advancement] works? 20150813 19:34:44< celticminstrel> Instead of [modifications][advance] 20150813 19:36:48< celticminstrel> Unrelated: I think the AI_CA macros should be modified to take a score parameter. 20150813 19:37:04< celticminstrel> Would that also break a lot of things? 20150813 19:37:40< Elvish_Hunter> Hmmm... perhaps it could work, given that both [trait] and [object] have the same format inside and outside [modifications] 20150813 19:38:29< celticminstrel> Well, I think [object] supports a few extra things outside of [modifications], but basically yeah. 20150813 19:38:38< celticminstrel> ^when outside 20150813 19:38:38< Elvish_Hunter> I don't know how widely used are the AI_CA macros. Only a grep command may give an answer to it 20150813 19:39:24< Elvish_Hunter> Perhaps, the current AI_CA macros may be modified to be wrapper macros around the AI_CA_SCORE ones, assuming that you want to call them that way 20150813 19:39:44< celticminstrel> Perhaps. 20150813 19:40:20< celticminstrel> I see some of them used in Legend of Wesmere. 20150813 19:41:08< celticminstrel> That's the only place in mainline campaigns, it seems. 20150813 19:41:33< Elvish_Hunter> There are also UMCs, again 20150813 19:42:20< celticminstrel> Of course, but grepping those is nontrivial. 20150813 19:49:58-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20150813 19:53:15-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 246 seconds] 20150813 19:53:15-!- wedge010 is now known as wedge009 20150813 19:53:22-!- lipkab [~the_new_l@host-91-147-210-193.biatv.hu] has quit [Quit: Leaving] 20150813 20:34:03-!- Elvish_Hunter [~irssi@wesnoth/developer/elvish-hunter] has quit [Quit: Ciao!] 20150813 20:49:14< irker053> wesnoth: Nils Kneuper wesnoth:master f7982497f077 / data/core/about.cfg: updated Latvian credits http://git.io/v3i3D 20150813 20:49:16< irker053> wesnoth: Nils Kneuper wesnoth:1.12 a3f139fa4b3f / data/core/about.cfg: updated Latvian credits http://git.io/v3i3S 20150813 21:19:30-!- horrowind [~Icedove@2a02:810a:8b00:5298:21b:fcff:fee3:c3ff] has quit [Quit: horrowind] 20150813 21:28:59-!- travis-ci [~travis-ci@ec2-54-197-168-147.compute-1.amazonaws.com] has joined #wesnoth-dev 20150813 21:29:00< travis-ci> wesnoth/wesnoth#7029 (master - f798249 : Nils Kneuper): The build is still failing. 20150813 21:29:00< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/75507147 20150813 21:29:00-!- travis-ci [~travis-ci@ec2-54-197-168-147.compute-1.amazonaws.com] has left #wesnoth-dev [] 20150813 21:41:44< irker053> wesnoth: Charles Dang wesnoth:master fcf8b72efd31 / data/test/scenarios/feeding.cfg: Partially revert a436c46f1356 and replace [terrain_mask] with [terrain] http://git.io/v3iwW 20150813 21:44:15-!- shadowm_desktop [ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20150813 21:44:36< shadowm> Ivanovic: I can't help people with WesCamp-i18n right now but I'll try to look into bringing it back from the dead this weekend. 20150813 22:03:59-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20150813 22:08:28-!- AI0867 [~ai@wesnoth/developer/ai0867] has quit [Ping timeout: 246 seconds] 20150813 22:08:35-!- AI0867 [~ai@wesnoth/developer/ai0867] has joined #wesnoth-dev 20150813 22:33:00-!- travis-ci [~travis-ci@ec2-54-242-2-66.compute-1.amazonaws.com] has joined #wesnoth-dev 20150813 22:33:01< travis-ci> wesnoth/wesnoth#7031 (master - fcf8b72 : Charles Dang): The build has errored. 20150813 22:33:01< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/75515738 20150813 22:33:01-!- travis-ci [~travis-ci@ec2-54-242-2-66.compute-1.amazonaws.com] has left #wesnoth-dev [] 20150813 22:33:23-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20150813 22:38:34< vultraz> Well, it didn't fail this time.. 20150813 22:40:49-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Ping timeout: 244 seconds] 20150813 22:43:17-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20150813 22:49:02-!- prkc [~prkc@4E5CC75C.dsl.pool.telekom.hu] has quit [Quit: Leaving] 20150813 23:08:48-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 250 seconds] 20150813 23:11:43< irker053> wesnoth: Charles Dang wesnoth:master 079692d42457 / src/game_events/action_wml.cpp: Clarify false default of [terrain_mask] border= as expected http://git.io/v3PJT 20150813 23:11:46< irker053> wesnoth: Charles Dang wesnoth:master e9d70dbc1ede / src/game_events/action_wml.cpp: Default [object] silent= to true if no description is provided http://git.io/v3PJk 20150813 23:11:49< irker053> wesnoth: Charles Dang wesnoth:master 730d83729687 / src/ (map.cpp map.hpp): Drop redundant border_size argument from gamemap::write http://git.io/v3PJI 20150813 23:17:33< vultraz> Blegh, I meant read, not write 20150813 23:17:48 * vultraz ponders the merits of decaf 20150813 23:45:35< Aginor> heretic! --- Log closed Fri Aug 14 00:00:08 2015