01:51:19 actually a piety cost of 30 in the table means the piety cost is randomly chosen between 30 and 1.5*30, rounded down. 02:47:32 Unstable branch on cbro.berotato.org updated to: 0.26-a0-665-gefeb406119 (34) 02:47:36 Is this a reasonable description? 02:48:10 "Converts integer x to a random int uniformly drawn from [x, y), where y is 1.5 * x, rounded down 02:48:13 " 02:49:27 or, i should write convert integer x to a roll of a fair dice 02:50:10 The dice has a minimal value of x and a maximal value of 1.5 * x, rounded down. 02:52:05 hmm... actually it is not just one roll of a dice. It should be convert integer x to a dice. 02:52:49 and we can roll the dice for as many times as we want. 02:52:49 but the dice has values that range from x to 1.5 * x, rounded down. 03:30:56 Fork (bcrawl) on crawl.kelbi.org updated to: 0.23-a0-3603-ge1cc4b0452 03:47:05 Fork (bcadrencrawl) on crawl.kelbi.org updated to: 0.22.1-3040-gb5f538b030 04:54:53 -!- amalloy_ is now known as amalloy 06:52:57 -!- amalloy is now known as amalloy_ 07:38:44 I had a crash on my fork that I thought might be worth reporting. I fixed it my side; but it could come up in the future on mainline if y'all remove a lot of spells. Forkside there was a crash when a vault asked for a random spellbook with a level one spell and the RNG tried to theme this random spellbook based on spellschools that didn't have any 07:38:45 level 1 spells. If a vault asked for random spells of (level) and spells of that level didn't exist in even just one spellschool you'd get a rare crash on trying to place that vault. I don't think it can happen in mainline right now; but it's highly possible to happen in the future. (I just put in some rerolling loops around randbook creation to 07:38:45 prevent it) 07:40:15 Surely worth linking the commit 07:44:03 Looks like it's several close together one sec 07:44:54 https://github.com/Bcadren/crawl/commit/99b7ab377d63e06dd7d859fe08f3095195e55151 (1); https://github.com/Bcadren/crawl/commit/ae66057da6f185d96123ff803c3b74e4e7a6e48b (2); https://github.com/Bcadren/crawl/commit/8b9ac52104175f122c48e62c9b31bef6792b40dd (3); https://github.com/Bcadren/crawl/commit/cba498eb1bfe1debd5c944be6d897fd071b981c8 (4) 08:24:25 %cache 08:24:26 CCACHE status: Hit Rate =0.34 % | Files Cached=881 | Cache Size= | Max Cache Size=5.0 GB 08:24:47 there we go...kinda 08:28:51 woah that's new 08:31:23 ZureaL: are u jelly? https://dpaste.com/B9XLG8ZNC 08:31:59 hah...it was just my first cache hit! 08:32:08 I'll grow up and be there soon 08:32:24 ZureaL: Glad to hear that worked. 08:32:28 I was getting cache hits before it was cool 08:34:27 I've got to figure out how to get my script to report the cache size properly. "cache size" is also hitting "max cache size" so it's returning both...I'm not THAT good at awk unfortunately :) 08:34:57 I guess you can easily match on start-of-line 08:36:29 %cache 08:36:30 CCACHE status: Hit Rate =0.34 % | Files Cached=881 | Cache Size=1.3 GB | Max Cache Size=5.0 GB 08:36:32 got it 08:37:00 told grep to only return 1 match, problem solved :) 08:45:34 Our instructions don't actually mention anything about configuring ccache 08:45:44 that's ok, maybe we'll switch over to a container-based thing soon enough and get to totally ditch various aspects of our setup, like the CHROOT 08:46:05 but we definitely still need a bunch of the functionality that the dgl scripts provide 08:46:16 "soon enough" heh 08:46:22 I can wish! 08:48:30 containerization is a huge pain just because of all the stuff stored on disk 08:49:14 specifically the read-write stuff 08:51:26 perhaps if the actual save updating and other dgl script functions were moved into the webserver, it'd be easier 08:52:13 but to refactor any of that you have to deal with dgl itself.. blech 08:57:52 aidanh: you wouldn't mind extending webtiles to implement dgamelaunch's functionality, would you?! 09:02:35 i think i'll leave that one to the next unsuspecting contributor, actually 10:13:03 ability.cc has 3.8k lines of code. is that ok? 10:20:40 don't look at beam.cc ... 10:20:47 that's general advice actually, not just because of the length 10:22:30 it might take me about a week to document the whole of ability.cc 10:23:10 is it ok to submit a commit for just documenting the Ability_List and everything in it? 10:23:36 i haven't read too much of the discussion, but i would be wary of investing too much time in documentation 10:23:55 we will of course accept documentation PRs 10:30:51 <12e​bering> CrawlCycle: I echo aidanh's concern. We're happy to take documentation PRs, but a wholesale project like yours is maybe not the best use of time. 10:30:51 where is the cleanest code in crawl? 10:31:06 <12e​bering> Heh 10:31:08 uhh 10:31:14 domino? 10:32:30 util/list_merged_branches.pl ? 10:32:36 crawl's code is not unclean at the micro level, but at the macro level 10:33:44 well, admittedly it's a little grubby at the micro level too.. 10:33:51 <12e​bering> My advice is to approach crawlcode like a forest ranger or land manager of a partial wilderness that's been through many hands of use. 10:34:20 I submit that gammafunk_its_a_trap may very well be the single cleanest instance of crawlcode in any version 10:34:44 it's technically code because DES gets turned into lua calls! 10:35:27 crawl also suffers from extreme lava-layer code: http://mikehadlow.blogspot.com/2014/12/the-lava-layer-anti-pattern.html 10:35:40 ooh, that's a term of art I've not heard before 10:40:49 <12e​bering> aidanh: perhaps for industrial or enterprise software that's an anti-pattern, but I'd posit that its a feature of the long lived stone soup model! 10:41:34 and lava could definitely be regarded as a sort of stone soup 10:43:37 As far as refactorings go, I really wish our object model for actor/player/monster didn't have this megaclass syndrom where we stuff a million things into them with little abstraction and use a billion little separately defined functions to manipulate them 10:43:50 that's one of the most confusing aspects of working with basic game logic 10:44:32 after working with libraries that have nice object models it feels painful to work with crawl's core classes 10:48:41 do you mean that spending lots of time on documentation doesn't make sense because the code changes constantly and quick 10:48:41 quickly* 10:48:41 ? 10:49:02 or, the code is too complex, it is impossible for anyone to understand the whole codebase? 10:49:39 i think it's safe to say that noone understands anywhere near the whole codebase 10:50:53 the code doesn't change constantly or quickly, but documenting individual functions is not worthwhile because you need to understand the broader context 10:54:52 CrawlCycle: yeah, to elaborate a little further, there's a sort of core set of commonly used classes, enums, and functions that do get used an awful lot on a day-to-day basis (I can't tell you what this set is offhand), and having documentation for those is relatively helpful 10:55:49 so ... find #usage of a file before trying to document the file. 10:55:51 But for the many many smaller set of (say) functions you'd find in a given source code file that a given crawlcode writer might encounter 0-2 times throughout their history working on the project and which are reasonably straightforward 10:56:03 documenting those formally not so useful 10:56:47 CrawlCycle: there could be something useful in doing that, if writing documentation is really what you want to do 10:56:54 alternately, we do need better testing 10:57:25 aidanh has recently started adding unit testing, and alexjurkiewicz (and advil and aidanh) have done a lot of work to get our github CI framework in good order 10:57:59 so adding better tests could be useful, if you get bored of writing doxygen comments 10:58:20 yes, we absolutely need more testing; that will have a much larger positive impact 10:58:44 CrawlCycle: and I don't think it's so much #usage on a per-file basis necessarilly, I was more thinking more on a per-entity basis really; obviously some files have more entitities in need of documentation than others 10:59:01 right, the nice thing about doing tests is that it tends to uncover bugs 10:59:53 it's also challenging because crawl's modules are so intertwined, so it's quite challenging to refactor a given bit of code to the point where it's a 'unit' that can be tested 11:00:32 s/entitities/entities/ 11:00:47 clion lets me search for #usage of an entity 11:02:24 wrt refactoring, making publically accessible data structures module-private is also a huge win, but again it's usually a lot of work 12:31:49 the _do_ability function in ability.cc contains 1302 lines of code 12:33:43 !source _do_ability 12:33:44 1/1. https://github.com/crawl/crawl/blob/master/crawl-ref/source/ability.cc#L259 12:34:10 huh, that line ref is wrong 12:35:28 yes, that's a big one 12:35:38 do you guys use a template for git commit message? 12:36:54 we can't even agree whether to use a period at the end of the subject line 12:38:07 I think sequell is not pulling from the repository regularly, so its line numbers are stale 12:38:26 wheals: well a quick check of the logs suggests that the rest of us can :-) 12:41:20 i guess that's just me being the last holdout of the period-users 12:41:36 it's like they say, crawl coding standards advance one funeral at a time 12:42:31 i don't see things like feat: abc or refactor: abc or doc: abc 12:42:43 so i guess i won't do that as well 12:42:59 <10P​leasingFungus> follow your heart 12:43:15 oh. then i would start it with doc: 13:06:03 Unstable branch on crawl.akrasiac.org updated to: 0.26-a0-665-gefeb406 (34) 13:30:56 New branch created: pull/1583 (1 commit) 13https://github.com/crawl/crawl/pull/1583 13:30:56 03CrawlCycle02 07https://github.com/crawl/crawl/pull/1583 * 0.26-a0-666-gc9702eb: docs: Update documentation for Ability_List 10(10 minutes ago, 1 file, 113+ 29-) 13https://github.com/crawl/crawl/commit/c9702ebddfd0 13:40:54 should I open another branch for another commit that documents another file? 13:42:40 hrm, I was going to say that additional branches are probably not necessary unless the scope of your documentation project changes 13:43:13 but I guess a branch per file does make merging easier to manage in that they don't all have to happen at once 13:45:10 yea. the documentation of each file doesn't depend on each other. 14:34:34 how long does running doxygen with call graphs and called by graphs take? 14:49:00 putting a period at the end of the subject line is a waste of the v tight character limit! 15:07:16 75 things called the silenced function in area.cc 15:11:03 somehow we have both map_bounds(int x, int y) and map_bounds(const coord_def &p) in coord.h 15:12:00 and the later function is the wrapper for the former function 15:14:08 and? 15:15:37 the int x, int y version has 36 usage 15:15:47 the coord_def &p version has 75 usage 15:16:37 Comment says the function returns true if inside the area that player can map 15:17:36 Does that mean the coordinate is within the rectangular boundary of the map, which include walls and places that player can't reach without digging? 15:18:18 "Note that terrain features should be in_bounds() leaving an outer ring of rock to frame the level" 15:19:39 oh. i get it. it is one step beyond the area that the player can move & dig. 16:40:40 is a bitfield always initialized to 0? 16:41:37 i mean the type made by the DEF_BITFIELD macro 16:44:08 probably a bitfield is initialized to zero. line 42 of enum.h has "constexpr enum_bitfield() : flags(0) {}" 18:24:19 Unstable branch on underhound.eu updated to: 0.26-a0-665-gefeb406119 (34) 18:33:21 New branch created: pull/1584 (1 commit) 13https://github.com/crawl/crawl/pull/1584 18:33:21 03CrawlCycle02 07https://github.com/crawl/crawl/pull/1584 * 0.26-a0-666-ga8bc06c: docs: Document invalidate_agrid 10(16 minutes ago, 1 file, 31+ 5-) 13https://github.com/crawl/crawl/commit/a8bc06c93d5e 19:24:17 https://www.reddit.com/r/dcss/comments/jaj5ad/sky_beast_plushie_for_my_sister/ 19:25:02 -!- bh is now known as Guest34445 19:44:56 what does the artefact_property function in artefact.cc do? 19:45:19 where can I find the meaning of the integer that it returns? 19:49:20 ok.. it is in the artp_data table in artefact.cc 20:18:13 What does ARTP_VAL_POS mean? 20:18:47 It is defined in artefact.h, which should mean the interpretation of the value of an artefact propertty 20:19:56 The value of an artefact property can be bool, pos, brand, or any. 20:19:56 I get what bool and brand means. But pos doesn't look like position 20:20:43 because the value of the Hungry and *Contam properties in the "artefact_prop_data artp_data[]" table 20:21:25 should be interpreted as ARTP_VAL_POS 20:24:01 Values of the *Curse, *Contam, and the old Hungry properties should be interpreted as ARTP_VAL_POS. 20:26:44 found it. POS means positive value 21:43:43 New branch created: pull/1585 (1 commit) 13https://github.com/crawl/crawl/pull/1585 21:43:43 03CrawlCycle02 07https://github.com/crawl/crawl/pull/1585 * 0.26-a0-666-ga40b9f3: docs: Document artefact_property 10(12 minutes ago, 2 files, 24+ 4-) 13https://github.com/crawl/crawl/commit/a40b9f392117 22:27:09 -!- amalloy_ is now known as amalloy 22:35:54 I try to find entities with high usage in the code by looking at the called-by graph generated by doxygen. 22:36:13 But that seems to miss class with high usage. 22:38:37 For example, the methods of the "actor" virtual base class in actor.h has 88 usage. 543 variables was declared with actor type. But I didn't find that class by looking at the called-by graphs. 22:39:58 Are there other ways to visually find entities with high usage? 22:42:42 The methods of the actor class has 61 usages within actor.cc, and 27 usages outside of actor.cc 22:43:11 I guess I should try to document it? 23:33:17 steves (L12 VpGl) Crash caused by signal #6: Aborted (D:11) 23:57:46 -!- DrPraetor39 is now known as DrPraetor