00:06:15 do we usually build the debug target with tile/dgame launch/android? 00:39:07 <10P​leasingFungus> twelwe: the targeter is very complex scary code 00:39:37 <10P​leasingFungus> every time i touch it i’m terrified i’ll break something subtly 00:57:03 <09g​ammafunk> Confession: I have never broken crawlcode 01:01:19 how? 01:14:55 somehow arena.cc and macro.cc depend on the process_command in main.cc 01:15:05 a bunch of other things depend on compas in main.cc 01:15:15 i thought it should be the other way around 01:15:35 should be main depend on a bunch of things, not a bunch of things depend on main 01:15:46 how to have never broken crawlcode? 01:32:21 the abyss shift test looks quite nice in the terminal 01:32:57 i'm trying to rip everything out and still make it run lua tests 01:34:55 Unstable branch on crawl.develz.org updated to: 0.26-a0-667-g92642533e4 (34) 01:55:21 Windows builds of master branch on crawl.develz.org updated to: 0.26-a0-667-g92642533e4 01:59:27 if i submit a pull request to allow catcher2 tests run dlua commands, will you guys take it? 02:14:39 Unstable branch on cbro.berotato.org updated to: 0.26-a0-667-g92642533e4 (34) 02:53:29 Monster database of master branch on crawl.develz.org updated to: 0.26-a0-667-g92642533e4 03:30:57 Fork (bcrawl) on crawl.kelbi.org updated to: 0.23-a0-3603-ge1cc4b0452 03:46:18 Fork (bcadrencrawl) on crawl.kelbi.org updated to: 0.22.1-3054-gf7f883cd6b 05:07:59 -!- amalloy is now known as amalloy_ 07:08:55 %cache 07:08:56 CCACHE status: Hit Rate =48.55 % | Files Cached=1179 | Cache Size=1.4 GB | Max Cache Size=5.0 GB 07:09:00 woot! 08:12:28 -!- mhcerri_ is now known as mhcerri 13:46:21 I rip out nearly everything in main.cc, startup.cc and ctest.cc 13:47:14 JOOI, if I may ask, what's your overall goal here? 13:47:21 and keep the minimal to run a lua test 13:47:40 The goal is to let catcher2 test run dungeon builder lua commands 13:47:52 I was writing a unit test for an iterator in crawl 13:48:40 setting up a test scenario with just 3 monsters is slow 13:48:40 advil suggested that it would be easier if I use lua 13:48:47 Thank you for satisfying my curiousity. 13:48:54 but writing the lua binding for the iterator would be difficult 13:49:15 so I try to enable catcher2 test run dungeon builder lua 13:50:03 things seem to work, except that the default make target for catcher2-tests seem to not have proper display 13:50:29 So I do a cut-down version of main.cc 13:50:34 that worked 13:50:48 but, when I transfer everything to the catch2-tests target 13:50:53 the display doesn't work 13:51:08 fakepty? 13:51:18 so I duplicate the catch2-test make target in the Makefile to a target called catch2-hybrid 13:51:41 geekosaur, have to modify the source... there is an assert 13:51:54 that fails if the cursor is at (0, 0) in region 0 13:52:07 and i don't want to change the source just for writing tests 13:53:33 i cut down the catch2 hybrid to just building a single file: catch2-hybrid/test_main.cc 13:54:18 the display doesn't work. If I set DEBUG=YesPlease and FULLDEBUG=YesPlease it crashes 13:54:23 instead of saying the assertion fails 13:55:09 I mean ifneq(, $(filter catch2-hybrid-tests, $(MAKECMDGOALS))) and then FULLDEBUG= ... 13:55:37 that is the way that the debug, catch2-test target add the #deines DEBUG etc 13:55:40 in the make file. 13:55:57 it still doesn't work. don't know what is missing 13:56:06 main.cc is exactly same as test_main.cc 13:56:20 Something in the Makefile causes the difference 13:56:38 main.cc -> make debug -> see colorful abyss shift test 13:56:54 test_main.cc -> make catch2-hybrid-tests -> see crash 13:57:36 If i don't use the display, i can use the existing catch2-tests target to add monsters with dlua 13:58:02 that is still very useful 13:58:08 for writing unit tests 13:58:31 I also don't fully grasp what you're really doing but abyss shift without display requires running crawl under fake_pty as geekosaur suggests, and catch2 tests may not really be designed to spin up the full ncurses setup (which is *extremely* heavy) 14:00:26 how to use fake_pty? 14:00:36 is that an utility of crawl? 14:00:57 fake_pty is just a separate binary that gives the crawl binary a fake pty to use that isn't shown 14:01:22 so it lets you run the lua tests and stress tests at the command line without taking over the terminal window 14:01:41 it's built in util, and will be automatically built if you have run `make test` 14:03:33 there's a thing in branch that does away with the need for fake_pty which may help with tests like this 14:04:16 my instinct is still that any test which requires spinning up the full console display is not what catch2 is currently aimed at, all the existing catch2 tests are lower level and specific to a single cc file 14:04:51 the moncast test I linked to you actually resulted from me beginning to write it as a catch2 test, and deciding that's not what at least the current catch2 setup was designed for, and then rewriting it as a lua-based test 14:05:29 $util/fake_pty catch2-tests-executable 14:05:48 Can't run 'catch2-tests-executable': No such file or directory 14:06:50 make sense. I will wrap the version that uses the existing catch2-tests build process as a fixture 14:06:56 what property of actor_near_iterator are you trying to test? 14:07:30 1. setup player at (1, 1), orc at (1, 6), invisible bat at (6, 1). 14:07:56 pick one as viewer, see if actor_near_iterator iterate over the actors with the expected order 14:08:39 2. pick a coordinate out of los range of the player. see if the iterate iterate over the actors with the expected order 14:08:50 3. test if it iterate over pacified monsters 14:08:53 <|amethyst> what is the expected order? 14:09:03 the order in env.mons 14:09:11 oh, and the player always go first 14:09:25 the iterator iterate over the player and the the monsters in env.mons 14:09:38 and skip over any monster/player that is invisible to the viewer 14:09:47 <|amethyst> hm, I'm not sure I'm comfortable with making the order part of the contract 14:10:06 <|amethyst> I'd rather have it check that it iterates over the correct actors in *some* order 14:10:18 <|amethyst> not that the class's contract is documented... 14:10:27 everything is undocumented 14:11:05 <|amethyst> indeed 14:11:05 i also wrote the documentation 14:11:05 well, this test might amount to documentation of the contract 14:11:05 <|amethyst> ??crawlcode 14:11:05 crawlcode[1/2]: Come get some. ~ https://twitter.com/crawlcode 14:11:05 put didn't commit to my fork yet. I want to push test and then doc. 14:11:18 but I agree that the order itself might not be part of the contract 14:11:29 testing invis etc seems like a good thing 14:12:00 hmm. ok. how to recognize that something should not be part of the contract? 14:12:14 i probably am going to write more tests and documents 14:13:58 I think in this case both mine and |amethyst's response is an intuitive response based on working with the codebase for a while, so there may not be any deterministic easy answer to that 14:14:11 <|amethyst> That is a good question... what advil said 14:14:22 <|amethyst> part of it is whether any existing users depend on the order 14:14:46 ok. then i will write everything. i think it would be easy for the reviewer to delete anything that is not important 14:14:46 <|amethyst> (which I did not verify...) 14:14:52 in the future, i mean. 14:15:00 part of it is just that the iteration orders are pretty arbitrary and I could imagine them changing; but also no one messes with that code because it works and is low level 14:15:01 <|amethyst> btw, many thanks for the documentation and testing work! 14:15:30 <|amethyst> I know that kind of stuff is often tedious and thankless, so we really appreciate it 14:15:34 hmm. I hope I didn't write too much. the isoc++ guideline says comment should be crisp. 14:15:58 one amusing case I discovered recently is that absolute 0 chooses based on iterator order if there are monsters at the same distance. It's a different iterator than this one, though 14:16:40 there was at least one other spell I ran across (again, different iterator) 14:16:44 Clearly AO should always pick the weakest monster in that case :-) 14:18:37 yesterday twelve, a player, came by and talke about targeting order of lee's rapid deconstruction. 14:18:50 <|amethyst> advil: well, distance_iterator does try to be unbiased, so that's not so bad 14:18:58 <|amethyst> though I like Pinkbeast's suggestion 14:22:40 oh it does? 14:23:25 hm had not noticed the `fair` param 14:24:13 well, need to fix my static targeter for it then 14:25:31 <|amethyst> I mean, it's probably still worth testing, just in case that broke at some point 14:26:23 sure. several tests. one for if it iterates over everything it should 14:26:36 Feature request: Worshipers of Chei and Ash more easily detect traps/shafts. Chei is slower and more careful, and Ash shares awareness. 14:26:41 another for if it iterates in the current order 14:26:49 Just makes more sense to me at least. :) 14:27:14 Over and above Ash's explore trap immunity? 14:27:14 And being shafted with Chei is a nightmare. 14:29:13 Pinkbeast: Didn't know Ash had trap explore immunity. I was thinking Chei being a more careful explorer for trap detection, but then though Ash should have it too. Just makes more sense to me. 14:30:23 And dying from being dumped in the middle of a bunch of monsters from a shaft while worshiping Chei seems just wrong. Chie worshipers should be more likely to spot and avoid traps like that. 15:23:00 <10P​leasingFungus> you can justify anything with flavour 15:23:13 <10P​leasingFungus> tso’s light reveals traps 15:23:51 Especially if it's salmiakki flavour, nom nom 15:23:51 <10P​leasingFungus> traps are disorderly; zin removes them 15:23:51 <10P​leasingFungus> hep remembers where all the traps are 15:23:51 <10P​leasingFungus> etc 15:23:51 <10P​leasingFungus> chei’s conduct is a challenge 15:24:01 <10P​leasingFungus> to compensate, chei gives stats and abilities 15:24:21 <10P​leasingFungus> traps aren’t really different from other situations in that way 15:25:01 <10P​leasingFungus> euph0ria ^ 15:59:20 sadly, Euph0ria had logged out by time you said that 16:00:04 <10P​leasingFungus> rip 16:00:13 <10P​leasingFungus> irc bridge doesn’t tell me these things 16:00:41 can you use !tell over the bridge? 16:09:11 <10P​leasingFungus> no 16:09:42 <10P​leasingFungus> i could log into irc proper, but i’m roughly 100 times too lazy 16:12:26 !tell P​leasingFungus but someone on the internet is wrong! 16:12:27 Sorry spicycat, I don't know who p​leasingfungus is. 16:57:27 <10P​leasingFungus> wow 16:57:39 <10P​leasingFungus> forgotten even by the bot 17:07:11 <08w​ormsofcan> forgottenfungus