--- Log opened Fri Apr 05 00:00:49 2013 20130405 00:06:58-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20130405 00:08:04-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20130405 00:20:23-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 240 seconds] 20130405 00:34:00-!- Octalot_ [~noct@host86-140-21-170.range86-140.btcentralplus.com] has quit [Ping timeout: 256 seconds] 20130405 00:48:37-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 01:01:04-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130405 01:45:04-!- mattsc [~mattsc@BeaverNet-166.caltech.edu] has quit [Quit: bye] 20130405 01:45:45-!- skyfaller [~skyfaller@ool-43551edd.dyn.optonline.net] has joined #wesnoth-umc-dev 20130405 01:45:45-!- skyfaller [~skyfaller@ool-43551edd.dyn.optonline.net] has quit [Changing host] 20130405 01:45:45-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-umc-dev 20130405 01:48:38-!- skyfaller_ [~skyfaller@ool-43551edd.dyn.optonline.net] has quit [Ping timeout: 252 seconds] 20130405 02:10:30-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130405 02:50:13-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20130405 02:51:34-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has quit [Client Quit] 20130405 02:57:42-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20130405 03:00:59-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20130405 03:02:41-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130405 03:04:44-!- pydsigner [~Thunderbi@unaffiliated/pydsigner] has joined #wesnoth-umc-dev 20130405 03:15:11-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20130405 04:00:33-!- pydsigner is now known as me 20130405 04:00:55-!- me is now known as pydsigner 20130405 04:02:55-!- pydsigner is now known as me 20130405 04:03:21-!- me is now known as pydsigner 20130405 04:17:04-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 04:21:35-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20130405 04:39:56-!- pydsigner [~Thunderbi@unaffiliated/pydsigner] has quit [Ping timeout: 256 seconds] 20130405 04:54:35-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20130405 05:14:49-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130405 06:02:02-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Read error: Connection reset by peer] 20130405 06:02:37-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130405 06:10:28-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 06:12:47-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130405 06:33:16-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20130405 07:37:59-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130405 07:58:24-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130405 08:11:23-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20130405 08:12:50-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130405 08:18:00-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20130405 08:42:27-!- Blueblaze [~Blueblaze@adsl-99-148-244-197.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130405 08:48:35-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 09:12:54-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 246 seconds] 20130405 09:38:24-!- Octalot_ [~noct@host86-128-74-173.range86-128.btcentralplus.com] has joined #wesnoth-umc-dev 20130405 10:08:08-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130405 10:09:41-!- esr [~chatzilla@static-71-162-243-5.phlapa.fios.verizon.net] has quit [Ping timeout: 248 seconds] 20130405 11:38:30-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20130405 11:58:22-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 245 seconds] 20130405 12:00:15-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130405 12:13:11-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130405 12:23:00-!- Yukiria [~chatzilla@124.109.10.167] has joined #wesnoth-umc-dev 20130405 12:23:10-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 256 seconds] 20130405 12:23:20-!- Yukiria is now known as vultraz 20130405 12:24:43-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20130405 12:24:43-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130405 12:52:02-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Read error: Connection reset by peer] 20130405 12:52:25-!- skyfaller [~skyfaller@ool-43551edd.dyn.optonline.net] has joined #wesnoth-umc-dev 20130405 12:52:25-!- skyfaller [~skyfaller@ool-43551edd.dyn.optonline.net] has quit [Changing host] 20130405 12:52:25-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-umc-dev 20130405 13:28:39-!- loonybot [~loonybot@ppp158-255-133-34.pppoe.spdop.ru] has joined #wesnoth-umc-dev 20130405 13:28:39-!- loonybot [~loonybot@ppp158-255-133-34.pppoe.spdop.ru] has quit [Changing host] 20130405 13:28:39-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-umc-dev 20130405 13:28:42-!- mode/#wesnoth-umc-dev [+v loonybot] by ChanServ 20130405 14:43:19-!- mattsc [~mattsc@adsl-71-156-38-35.dsl.irvnca.sbcglobal.net] has joined #wesnoth-umc-dev 20130405 14:52:06-!- skyfaller_ [~skyfaller@ool-43551edd.dyn.optonline.net] has joined #wesnoth-umc-dev 20130405 14:55:02-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Ping timeout: 256 seconds] 20130405 15:22:52-!- mattsc [~mattsc@adsl-71-156-38-35.dsl.irvnca.sbcglobal.net] has quit [Quit: bye] 20130405 15:30:47-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130405 15:31:56-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130405 17:27:12-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130405 17:29:39-!- esr [~chatzilla@static-71-162-243-5.phlapa.fios.verizon.net] has joined #wesnoth-umc-dev 20130405 17:48:24-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130405 17:53:25-!- zookeeper2 [~lmsnie@87-100-211-108.bb.dnainternet.fi] has joined #wesnoth-umc-dev 20130405 17:55:14-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 255 seconds] 20130405 18:06:24-!- Octalot_ [~noct@host86-128-74-173.range86-128.btcentralplus.com] has quit [] 20130405 18:07:06-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 18:10:26-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130405 18:11:57-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130405 18:36:16-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 18:37:50-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130405 19:17:18-!- mattsc [~mattsc@204.239.250.1] has joined #wesnoth-umc-dev 20130405 19:17:57-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 19:18:50-!- irker246 [~irker@ai0867.net] has joined #wesnoth-umc-dev 20130405 19:18:50< irker246> AI-Demos: mattsc master * re017e6a / lua/battle_calcs.lua : battle_calcs.get_attack_combos_subset(): use wesnoth.get_time_stamp() instead of os.clock() (+6 more commits...) - http://git.io/GWnTcQ 20130405 19:18:50< irker246> The former appears to be about 10 times faster than the latter. It 20130405 19:18:50< irker246> also has an additional significant digit, although that doesn't matter 20130405 19:18:50< irker246> for this application. 20130405 19:20:16-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130405 19:20:22-!- bumbadadabum is now known as Chandelure 20130405 19:26:23-!- Chandelure is now known as bumbadadabum 20130405 19:43:00< mattsc> Hey all, I have an (I think) simple Lua problem that I cannot figure out. I must be missing something. 20130405 19:43:05< mattsc> In this code: http://pastebin.com/nnBPfWGy 20130405 19:43:40< mattsc> I thought that arg contains the content of the vairadic variable ... But it is nil here. 20130405 19:43:58< mattsc> *variadic 20130405 19:45:22< vultraz> uh...is 'arg' in the function arg list? 20130405 19:45:39< mattsc> ^ called with: ai_helper.print_ts('dd', "start") 20130405 19:46:07< mattsc> vultraz: the way I interpret this: http://www.lua.org/pil/5.2.html that's done automatically 20130405 19:46:44< mattsc> As I said, I'm probably missing something obvious. 20130405 19:47:01< vultraz> hm... 20130405 19:47:08< vultraz> _8680_? 20130405 19:48:25< vultraz> mattsc: what's dd and start? 20130405 19:49:09< mattsc> strings. 20130405 19:49:16< mattsc> test output 20130405 19:49:28< mattsc> see the quotes? ;) 20130405 19:49:38< vultraz> why is 'dd' called with single quotes? 20130405 19:50:04< mattsc> Because it looks funnier to use different types of quotes... 20130405 19:50:43< mattsc> No, seriously, because I didn't pay attention and it doesn't matter (so when I noticed I was too lazy to change it) 20130405 19:51:09< vultraz> ok 20130405 19:51:12< vultraz> thought it might matter 20130405 19:51:28< mattsc> (I actually tried, it doesn't make a difference) 20130405 19:51:40< vultraz> then I have no idea 20130405 19:51:47< vultraz> _8680_ might, he's a lua wizard 20130405 19:54:59< mattsc> Btw, when I change the call to print() to: 20130405 19:55:02< mattsc> print(ts, ...) 20130405 19:55:26< mattsc> it works just fine, but I want the time stamp to appear at the end. And I thought the code pasted up there is how you do that. 20130405 19:56:05< vultraz> why not print(..., ts) 20130405 19:56:22< mattsc> That only takes the first of the arguments in ... 20130405 19:57:34< vultraz> so you want all of ... 20130405 19:58:26< mattsc> Yes. If I do AH.print_ts(1,2,3) I want the ouput to be: 1 2 3 timestamp 20130405 19:58:42< mattsc> etc., for any number of arguments, just as the normal print() function. 20130405 19:59:03< mattsc> Anyways, I've wasted all the time I have on trying to figure this out. Got to catch a plane now... 20130405 19:59:09< mattsc> I'll check the logs later. 20130405 19:59:16< mattsc> Thanks for trying to help, vultraz 20130405 19:59:26< vultraz> no prob 20130405 20:01:02-!- mattsc [~mattsc@204.239.250.1] has quit [Quit: bye] 20130405 20:15:49-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130405 20:16:39-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130405 20:23:14-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130405 20:34:22-!- zookeeper2 is now known as zookeeper 20130405 20:34:29-!- zookeeper [~lmsnie@87-100-211-108.bb.dnainternet.fi] has quit [Changing host] 20130405 20:34:29-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20130405 20:36:06-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130405 20:36:09< _8680_> mattsc: 20130405 20:36:21< _8680_> (I know you’re gone, but you said you’d read the logs.) 20130405 20:37:27< _8680_> Firstly, there is no longer a global `unpack` function. 20130405 20:37:50< _8680_> In Lua 5.2 (and thus Wesnoth 1.11) it is now `table.unpack`. 20130405 20:39:30< _8680_> Secondly, `unpack` returns the values in the passed list, with multiple value return, as an explist (I think that’s the correct term). 20130405 20:40:03< _8680_> Which is basically what `...` evaluates to. 20130405 20:40:51< _8680_> So the only difference between `print(..., ts)` and `print(table.unpack(arg), ts)` is that the latter is (presumably) slower. 20130405 20:42:05< _8680_> Try appending `ts` to `arg`, then unpacking and printing: `arg[#arg+1] = ts; print(table.unpack(arg))`. 20130405 21:57:16< irker246> wesnoth-umc-dev: vultraz * r18031 /trunk/NX-RPG/ (7 files in 6 dirs): 20130405 21:57:16< irker246> wesnoth-umc-dev: NX: wired in Elvish Spellbinder unit type 20130405 22:00:32< irker246> wesnoth-umc-dev: vultraz * r18032 /trunk/NX-RPG/units/faeries/Elvish_Spellbinder.cfg: 20130405 22:00:33< irker246> wesnoth-umc-dev: NX: tweaks 20130405 22:12:02-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20130405 22:12:09-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has joined #wesnoth-umc-dev 20130405 22:14:03< mattsc> _8680_: yes, I'm back and thanks for the comments. 20130405 22:15:09< mattsc> The problem I am having seems to start even before I am doing anything with unpack etc. It appears that 'arg' is nil. Also confirmed by doing using what you suggested: 20130405 22:15:36< mattsc> 20130405 13:13:32 error scripting/lua: ...rt/Wesnoth_1.11/data//add-ons/AI-demos/lua/ai_helper.lua:82: attempt to get length of global 'arg' (a nil value) 20130405 22:15:43< _8680_> Try `local arg = {...}` then. 20130405 22:16:24< mattsc> Hmm, yes, indeed that works. 20130405 22:16:45< _8680_> I think `arg` stopped being automatically set in Lua 5.2. 20130405 22:16:47< mattsc> And it makes sense that it works, but doesn't the manual page I linked above imply that I don't need that? 20130405 22:16:54< mattsc> Oh, I see. 20130405 22:18:05< mattsc> I see, and that online manual is actually for 5.0. I didn't check that beforehand. D'oh! 20130405 22:18:20< mattsc> Thanks, _8680_ ! 20130405 22:20:04< _8680_> Apologies for the delay; I had never read that page. 20130405 22:21:10< _8680_> I checked §8 of the actual manual [http://www.lua.org/manual/5.2/manual.html], and it doesn’t mention `arg` being obsoleted. 20130405 22:21:28< mattsc> Hmm. Ok. 20130405 22:22:11< _8680_> Oh, here: 20130405 22:22:13< mattsc> Oh, another thing, when I tried print(..., ts) as you suggested (well, actually, I had already tried that), I only got the first passed argument plus the timestamp. 20130405 22:22:25< _8680_> `arg` was deprecated back in 5.1, it seems. 20130405 22:23:13< _8680_> ^^ Yes, as I think you said, an explist (or whatever a multi-value-thingy is called) is truncated to its first value when used in another explist. 20130405 22:23:32< _8680_> Unless it’s the last value. 20130405 22:23:54< _8680_> Function call argument lists are explists. 20130405 22:24:10< mattsc> Yes, that's how it appears to be. And now that you say it in those words, I vaguely remember having read that somewhere before. 20130405 22:25:03< mattsc> Thanks again, I understand what's going on now. Sorry for the bother... 20130405 23:08:54< mattsc> _8680_: Another quick question: is either `arg[#arg+1] = ts` or `table.insert(arg, ts)` preferable over the other? 20130405 23:09:08< mattsc> Is one of them faster, cleaner, more elegant, whatever ... ? 20130405 23:14:36-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 264 seconds] 20130405 23:16:44-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20130405 23:17:16< _8680_> mattsc: `arg[#arg+1] = ts` is faster. `table.insert(arg, ts)` is cleaner. Which is more elegant is up to you. 20130405 23:17:59< mattsc> Cool. Thanks. 20130405 23:18:53< mattsc> For what I am doing, speed almost always wins. 20130405 23:47:08-!- fendrin [~fabi@wesnoth/developer/fendrin] has quit [Quit: Konversation terminated!] --- Log closed Sat Apr 06 00:00:07 2013