00:01:43 170 commits for advil...what if he overtakes me eventually :o 00:01:54 I have to pass elliptic before that happens 00:05:04 I've still got a ways to go 00:09:29 Unstable branch on crawl.jorgrun.rocks updated to: 0.21-a0-344-g2144152 (34) 00:12:13 Unstable branch on CRAWL.XTAHUA.COM updated to: 0.21-a0-344-g2144152 (34) 01:05:24 you can always console yourself "checkwhite is not a real commit" 01:20:27 Unstable branch on crawl.develz.org updated to: 0.21-a0-344-g2144152 (34) 01:58:28 Windows builds of master branch on crawl.develz.org updated to: 0.21-a0-344-g2144152 02:16:38 !tell gammafunk https://www.linkedin.com/pulse/act-philip-holt/ 02:16:39 ProzacElf: OK, I'll let gammafunk know. 02:16:49 !tell lasty https://www.linkedin.com/pulse/act-philip-holt/ 02:16:50 ProzacElf: OK, I'll let lasty know. 02:22:25 !tell hellmonk i appreciate your recent commit messages 02:22:26 alexjurkiewicz: OK, I'll let hellmonk know. 02:29:32 -!- Rast- is now known as rast 02:54:02 Monster database of master branch on crawl.develz.org updated to: 0.21-a0-344-g2144152 03:15:57 Unstable branch on crawl.beRotato.org updated to: 0.21-a0-344-g2144152 (34) 03:42:59 -!- amalloy_ is now known as amalloy 03:45:29 -!- amalloy is now known as amalloy_ 03:46:20 -!- amalloy_ is now known as amalloy 05:13:11 -!- amalloy is now known as amalloy_ 05:15:02 -!- amalloy_ is now known as amalloy 05:36:41 -!- yeeve_ is now known as yeeve 05:47:51 -!- amalloy is now known as amalloy_ 09:38:47 <|amethyst> gammafunk: hm, does get_species_def actually have to be "public" (non-static)? I would kind of prefer to just have a fixup_gnoll_stats and export that instead 09:41:31 03|amethyst02 07* 0.21-a0-345-ge0b234a: Unbrace 10(16 minutes ago, 1 file, 0+ 2-) 13https://github.com/crawl/crawl/commit/e0b234a320f3 09:41:31 03|amethyst02 07* 0.21-a0-346-g330ab2c: Describe entry layout in species-data.h 10(18 minutes ago, 1 file, 19+ 0-) 13https://github.com/crawl/crawl/commit/330ab2c3618d 09:45:31 oops 09:45:31 advil: You have 1 message. Use !messages to read it. 09:45:34 |amethyst: I noticed yesterday that unbrace isn't catching for loops with multi-line bodies (e.g. for if ... sequences) 09:45:40 !messages 09:45:41 (1/1) gammafunk said (8h 27m 44s ago): mibe says you did a great job on skill targets 09:45:59 :) 09:46:54 ...I didn't notice that by actually trying to run unbrace though 09:47:15 <|amethyst> advil: for if is specifically excluded 09:47:34 oh, huh...is that supposed to be ok? 09:47:48 I just manually corrected a bunch of cases 09:48:14 <|amethyst> coding_conventions says "may be" omitted, so that's fine 09:48:22 <|amethyst> When for-loops are nested and the outer loop has no further statements, the 09:48:22 <|amethyst> braces may be omitted. 09:48:27 <|amethyst> The same is true for combined for- and if-conditionals as long as all 09:48:27 <|amethyst> statements fill less than four lines. 09:48:32 <|amethyst> If the order of if- and for-conditionals is reversed, however, place braces. 09:49:13 huh 09:49:17 well, these were >4 lines I think 09:49:18 <|amethyst> kind of baroque if you ask me :) 09:49:28 <|amethyst> ah 09:49:31 <|amethyst> then good :) 09:49:52 <|amethyst> I guess unbrace doesn't count lines 09:50:06 <|amethyst> probably the for-if and for-for cases are folded together in unbrace 09:50:14 <|amethyst> and for-for doesn't have the line count restriction 09:50:50 <|amethyst> hm 09:51:12 <|amethyst> looks like unbrace would also permit if-for 09:51:21 <|amethyst> (without braces) 09:52:48 <|amethyst> I think fixing that would approximately double the size/number of nasty regexps 09:53:09 <|amethyst> on the other hand, removing the special case from coding_conventions would simplify the regexps a little 09:55:09 <|amethyst> (maybe more than a little_ 09:55:14 <|amethyst> s/_/)/ 09:58:39 I vote for removing the special case 09:59:01 <|amethyst> but think of the millimarvins! 09:59:05 haha 09:59:42 sounds like a very old-school exception, like typing that extra key in that one situation just was too annoying to someone who was using ed or whatever 09:59:55 <|amethyst> I think it's more for readability than typing 10:00:17 <|amethyst> for people who prefer to read compact things 10:00:26 <|amethyst> and/or have 24-row editors 10:00:27 yeah, maybe it's really about for if if sequences 10:00:50 I do agree that a for if if probably looks better without the braces 10:01:40 (but so does an if body that is one line that has been line-broken for people who use 80 columns) 10:02:48 <|amethyst> I'm half-tempted to say "curly braces everywhere", but that is a pretty big vertical expansion in some places 10:03:48 <|amethyst> I like the look of more compact code, but I'm more concerned with preventing errors (and to a lesser extent with having simple rules) 10:04:11 probably you (and now me) are the only one who doesn't realize that it isn't curly braces everywhere >1 line 10:04:17 er 10:04:20 who does realize 10:04:29 too many negations 10:05:52 <|amethyst> also note that, for the actually important stuff (naming), the conventions doc is noncommittal 10:05:58 <|amethyst> but for indentation, whoo boy 10:06:33 <|amethyst> just replace the section with a clang-format invocation and maybe a vim indent function, and be done with it 10:07:01 <|amethyst> (emacs too for people who still use that) 10:09:19 Unstable branch on crawl.jorgrun.rocks updated to: 0.21-a0-346-g330ab2c (34) 10:54:23 we enforce *curly braces everywhere* at our shop. better uniformity overall, no mental overhead (do i put them or not?), IDE does it automatically so you don't have to manually add them when it finaly become necessary. 10:59:38 <|amethyst> trm: does everyone get big monitors? That would help :) 10:59:44 <|amethyst> at least, tall ones :) 11:27:55 we are on 2 or 3 20+inch monitor 11:56:17 -!- amalloy_ is now known as amalloy 12:23:43 -!- amalloy is now known as amalloy_ 13:11:02 -!- amalloy_ is now known as amalloy 13:12:28 Unstable branch on crawl.akrasiac.org updated to: 0.21-a0-346-g330ab2c (34) 14:53:52 -!- amalloy is now known as amalloy_ 15:21:49 |amethyst: feel free to refactor that, the only code guru around at the time when I asked was advil 15:23:37 I'm not sure that having a public fixup_gnoll_stats is all that much cleaner, but I guess if we want to minimize external declarations/use of headers it is 15:34:06 -!- yesno_ is now known as yesno 15:44:26 -!- yesno_ is now known as yesno 18:00:47 -!- fazizzz is now known as fazisi 18:06:40 %git 18:06:40 07|amethyst02 * 0.21-a0-346-g330ab2c: Describe entry layout in species-data.h 10(9 hours ago, 1 file, 19+ 0-) 13https://github.com/crawl/crawl/commit/330ab2c3618d 18:08:20 Crash when describing double sword of elec in inventory: ASSERT(xp >= 0) in 'player.cc' at line 2702 failed. 13https://crawl.develz.org/mantis/view.php?id=11245 by Thalfon 18:08:27 Unstable branch on underhound.eu updated to: 0.21-a0-346-g330ab2c (34) 18:11:01 %git 17ab366a468859063ace431347d7dadcc85a566b 18:11:01 07advil02 * 0.21-a0-319-g17ab366: Remove some doubles, and fix a wrong assumption about shields 10(5 days ago, 2 files, 25+ 17-) 13https://github.com/crawl/crawl/commit/17ab366a4688 18:51:04 -!- amalloy_ is now known as amalloy 21:26:21 -!- amalloy is now known as amalloy_ 21:46:17 If a monster summons something, then you enslave its soul, the summoned monster can persist after you kill the summoner (who becomes a friendly Z) 21:46:45 -!- amalloy_ is now known as amalloy 22:23:45 |amethyst: wip http://dpaste.com/04Y0594 22:29:14 uh, version with less stupid indentation: http://dpaste.com/1SQ587X 22:34:51 so when using this default Scale gets me two decimal points of precision? 22:35:04 yeah 22:35:20 I set that because that's what crawl already mostly uses 22:35:40 still not really sure whether integrating this into crawl is a good idea or not 22:36:00 this is a bit interesting, as in how this defined postfix ++: http://dpaste.com/1SQ587X#line-128 22:36:07 taking an int argument? 22:36:23 yeah, it's pretty lame 22:36:53 the int is just a dummy 22:37:05 yeah, ok 22:37:25 https://stackoverflow.com/questions/4421706/what-are-the-basic-rules-and-idioms-for-operator-overloading was super useful for doing this 22:39:30 once I've tested this more I'll create a branch to demo converting a few things in crawl to this, and see if anyone actually likes it 22:43:55 advil: i think the conversions should be explicit rather than implicit, at the floating-point ones if you keep them 22:44:43 aren't they already all explicit? 22:45:11 i thought single-argument constructors were implicit unless marked explicit 22:45:11 or maybe you mean the constructor 22:45:11 yes 22:45:21 I see 22:45:52 is it really kosher to put a using std::swap in the middle of a function definition? what does that do? 22:45:53 I have them like that right now because if they are implicit, stuff like "fixedp<>(2) + 3.9" autoatically works. but yeah, I guess you could be concerned about that. 22:46:41 well, it works, but I'm not sure why it's that way (I got that idiom from elsewhere) 22:47:13 https://stackoverflow.com/q/4782692/625403 22:47:40 tldr yes, the way you wrote it is best 22:48:39 ah, interesting 22:48:41 although the answer points out that for a simple argument type like an int it's almost surely useless 22:49:54 yeah...in principle BaseType could be anything numeric-y (though that's more because I wanted to get some experience writing template code than I think crawl needs that) 22:50:28 your hard work will pay off when someone realizes that what they really need is a fixedp 22:51:13 fixedp Kreygasm 22:51:13 I got that somewhere in https://stackoverflow.com/questions/3279543/what-is-the-copy-and-swap-idiom 22:51:14 heh 22:54:57 does fixedp compile? it seems like it should have duplicate constructors 22:55:06 no, it won't 22:55:13 which like, okay, you shouldn't use floats as the base 22:55:21 I've been tweaking that, in the current version I don't have a BaseType constructor 22:55:40 it's sort of annoying, do you know a good way to deal with that? 22:56:16 well, what do you want fixedp(100) to represent? 1 * 100, or 100 * 100? 22:56:47 1.00 22:56:55 er 22:56:57 100.00 22:57:07 I see what you mean 22:57:10 so how am i supposed to construct 0.05? 22:57:37 ah, well, the float constructors will work fine for that 22:57:40 I'll think about that 22:58:15 the int constructor really needs to deal in scaled values in order for arithmetic to work, in the current version 22:58:26 i agree 22:58:42 but then your int constructor and float constructors are inconsistent. one take scaled values, the other takes values and then scales them 22:58:49 the type will be easy to use incorrectly 22:59:22 in the paste version both take a value and scale them? 23:00:32 i guess you're right, that's not the problem. i mistunderstood what you mean by "scaled values" 23:00:51 the problem is that you have to use the float constructor to represent a non-integral value 23:01:12 right? which means you have to deal with floating point in order to use fixed point 23:01:27 yeah 23:01:44 well, only if you need the extra precision at the start 23:01:55 a standard crawl idiom is to start the function by multiplying everything by 100 23:02:01 i think it would be better to remove the implicit floating conversions, and add a two-argument constructor or something that says "here is an int and its scale" 23:02:18 but i guess that is sorta the same thing as our current fixed-point hacks 23:02:44 having a two-arg constructor seems reasonable 23:03:01 well, maybe only have one constructor, which takes a non-scaled int (ie, 1 represents 0.01) 23:03:16 and have a different convert function of some sort, which lets 1 represent 1.00 23:03:33 or maybe the opposite of that, so that implicit conversions work reasonable? 23:03:58 to have integer arithmetic / comparison work (e.g. fixedp<>(10) + 2 == 12) I'd rather the int constructor is taking ints that will be scaled 23:04:03 right 23:04:32 I guess c++ frowns on factory functions? 23:04:43 it frowns on putting them in the class, i suspect 23:04:54 that's what I'd do in python for this kind of situation 23:04:55 but functions that return values is like...programming 23:05:06 heh 23:05:11 i guess you still need a constructor for it 23:05:25 having that two-value constructor is a good idea anyways 23:06:04 operator bool btw, to test for zero? 23:07:16 yeah, good catch 23:07:45 my assumptions about what might happen automatically in terms of overloading are all skewed by python 23:09:04 operator- makes me worry about what will happen if someone makes a fixedp. does that behave well? 23:10:48 I have only cursorily tested unsigned so far 23:11:18 I saw advice that defining unary - was just a bad idea, so I could drop that entirely 23:13:56 allowing -x doesn't seem any worse than allowing 0 - x 23:13:59 but what do i know 23:16:44 heh - on an unsigned leads to overflow issues here 23:17:09 "- (unsigned int) 10" actually gets -10, not sure why 23:17:23 I guess - casts it back? 23:21:09 did anyone talk about this ijyb thread https://www.reddit.com/r/dcss/comments/74brrj/ijyb/ 23:21:31 i upvoted it to be a troublemaker 23:21:45 if that counts 23:22:00 i do think one shot kills from ijyb are bad 23:22:11 and that without dangerous wands ijyb is really boring 23:23:33 i wonder if you could give ijyb hex wands and a loud shout 23:23:44 so she polymorphs you and then attracks the level 23:25:00 attrack. gell's gravitas is the only attrack in the game now that singularity is gone 23:25:59 advil: (int)-(unsigned int)10 is implementation-defined behaviour afaict, so it will depend on what system you target 23:26:18 (the cast to int is implied, because -foo can't possibly be an unsigned value) 23:26:58 ah, interesting 23:59:30 Unstable branch on CRAWL.XTAHUA.COM updated to: 0.21-a0-346-g330ab2c (34)