00:27:36 Unstable branch on CRAWL.XTAHUA.COM updated to: 0.21-a0-361-g4efd3f9 (34) 01:20:40 Unstable branch on crawl.develz.org updated to: 0.21-a0-361-g4efd3f9 (34) 01:59:36 Windows builds of master branch on crawl.develz.org updated to: 0.21-a0-361-g4efd3f9 02:54:46 Monster database of master branch on crawl.develz.org updated to: 0.21-a0-361-g4efd3f9 03:11:43 Unstable branch on crawl.beRotato.org updated to: 0.21-a0-361-g4efd3f9 (34) 04:54:47 FR: don't even announce skill increases with gnolls 04:54:58 it's not like they ever make a difference. 09:03:25 for anyone who's interested, I do have the fixed point stuff on a branch now: https://github.com/crawl/crawl/compare/master...rawlins:fixedpoint 09:15:45 <|amethyst> advil: the constructors and a lot of those functions (both member and free) can be constexpr 09:17:41 oh interesting 09:17:54 <|amethyst> advil: and some of the ones that can't be made constexpr in C++11 currently could be made so with a tiny change 09:17:54 they are already inline because they are declared in the class, what's the difference? 09:18:07 <|amethyst> constexpr means they can be evaluated at compile time 09:18:28 <|amethyst> inline just means the compiler can inline them so they run at runtime without a function call 09:18:52 <|amethyst> which can sometimes be optimised in similar ways, but not always 09:19:02 ah I see, because some of these are just multiply by scale + static cast 09:19:10 <|amethyst> yeah 09:20:12 <|amethyst> in C++11 the rule is that your function body has to consist of a single return statement and no other statements or declaration (there are a few things like typedef, using, and static_assert that are allowed) 09:20:44 <|amethyst> and all the things they call have to be constexpr as well 09:21:18 <|amethyst> in C++14 that is relaxed significantly 09:21:27 <|amethyst> the first part, they still can't call something non-constexpr 09:22:04 <|amethyst> so operator *= is probably too complicated to reasonably do that in C++11 09:24:12 <|amethyst> hm 09:24:15 <|amethyst> oh, in operator float() 09:24:41 <|amethyst> hm, never mind 09:25:58 <|amethyst> maybe instead of operator int() that should be operator BaseType() ? Or maybe you have to write it as operator typename BaseType() 09:26:41 <|amethyst> if the base type is int64_t or even uint32_t it would be better to convert to that than to int 09:27:09 the problem there is that if BaseType is not int, you probably want an int cast, but if BaseType is int, then you run into problems having both. It might be solvable with type traits 09:27:25 there is a function that gives you the basetype 09:27:31 just not an operator 09:27:38 <|amethyst> hm 09:28:20 <|amethyst> IIRC C++ is willing to chain together a user-defined conversion with a built-in numeric conversion 09:28:47 integral_part or to_scaled will give you back something of BaseType 09:28:49 oh, I see 09:28:54 <|amethyst> so you could have just the conversion to BaseType (and not to int or long) and let the result of that get turned into int or long by the usual conversions 09:30:54 I'll have to see if that still works with explicit casts though 09:30:58 that would be better if it works 09:31:26 <|amethyst> yeah, I'm not 100% certain because it is explicit 09:31:51 <|amethyst> so it might require static_cast(static_cast(fixp)) 09:31:58 <|amethyst> which would be terrible of course 09:32:10 <|amethyst> you could template it of course 09:32:21 <|amethyst> but that gets hairy pretty quickly :) 09:32:25 heh 09:32:58 <|amethyst> also, it would be nice if it detected when it is initialised with something too big 09:33:11 yeah, really want to be able to write stuff like "(int) AC" even if the BaseType is not int 09:33:17 you mean a Scale that is too big? 09:34:32 <|amethyst> e.g. fixedp foo{90000000}; where the product of the integer part and the scale is bigger than the numeric_limit for int 09:34:48 ah right 09:34:59 <|amethyst> I don't know if the operators all need to do that, but IMO the constructor should 09:35:16 <|amethyst> (though that might conflict with making it constexpr for C++11) 09:35:17 I think overflow protection is one of those things that would be a lot easier if I were just doing powers of 2 09:36:00 <|amethyst> I bet things go a lot faster if you use powers of 2, since all this stuff is inline 09:36:15 oh definitely, and there are much better ways of dealing with signed stuff 09:36:18 <|amethyst> and since the template parameter is known at compile time 09:36:59 right now all my signed stuff has to do comparisons, but if you use powers of 2 there are very simple rounding algorithms that exploit twos complement 09:37:29 <|amethyst> n.b. C++ doesn't guarantee twos complement for signed types 09:37:46 <|amethyst> so you'd probably need casts to unsigned types to make it guaranteed to work on obscure platforms 09:37:54 yeah, a "real" fixed point library would probably enforce a storage type that does 09:38:02 which would be yet another headache 09:38:14 maybe it was a bad idea, but I stuck with arbitrary scales because (a) that's what crawl already does, and (b) it makes it a lot easier to interpret, and (c) ^ 09:38:39 well, a lot easier to interpret if you use decimal scales 09:39:09 <|amethyst> yeah, and it's not like fixedpoint math is a huge percentage of runtime 09:39:18 yeah, it should all still be fast 09:39:27 fast enough 09:39:41 <|amethyst> I mean, even if you made it slow, I doubt anyone would notice 09:39:44 heh 09:39:53 <|amethyst> unless it were really really really slow 09:40:25 this will be very slightly slower because right now the ad-hoc fixed point math doesn't deal with rounding on truncation, but otherwise the math should be mostly the same 09:41:57 <|amethyst> BTW, I need to buy this: http://www.tmplbook.com/ 09:42:12 in principle once a bit of code is converted to fixedp<>, it ought to be trivial to switch to a different fixed point internal representation 09:42:20 looks interesting. part of why I wanted to do this project was just to try to figure out a bit more about templates 09:43:52 (forms of type polymorphism are one of my professional interests actually, and c++ templates are way off from how linguists usually think about polymorphism) 09:46:02 <|amethyst> templates are kind of... ad hoc 09:46:37 heh 09:46:58 one of the things I've learned is that c++ standards groups aren't concerned with c++ syntax looking like a parody of itself 09:47:26 <|amethyst> advil: well, we did get constexpr at least 09:47:43 <|amethyst> advil: before that, you could do the same things, but you needed recursive template metaprogramming 09:48:24 heh...I guess I should say, they are at one end of a power/elegance tradeoff in syntax 09:48:31 <|amethyst> but the concern about how it looks does usually come several years after something becomes possible 09:49:03 was thinking of stuff like "template T _safe_abs(T n, typename std::enable_if::value, T>::type=0) const", which is still pretty simple on the scale of what you can write involving type traits 09:49:12 <|amethyst> yeah 09:49:18 <|amethyst> C++20 should hopefully improve that 09:49:31 I did notice that even c++17 has simplified some of it 09:49:53 <|amethyst> requires is_signed 09:50:15 <|amethyst> or something along those lines 09:51:40 <|amethyst> hm 09:51:42 that would be much better 09:52:19 <|amethyst> I think what you wrote might be better if the enable_if were in a template parameter... that way people can't call the function with a second ignored parameter 09:53:08 can you do that? 09:53:14 <|amethyst> e.g. see the zero-argument enum_bitfield::range::range 09:53:25 <|amethyst> you can have a non-type template parameter on that function 09:53:47 (_safe_abs is private, at least) 09:55:52 <|amethyst> hm, those don't even use the class 09:56:08 huh, could std::round possibly be constexpr? 09:56:38 <|amethyst> "could be" but it isn't 09:56:56 I don't get an error declaring the float constructors constexpr 09:57:00 should I expect one? 09:57:16 <|amethyst> are you using it? 09:57:25 yeah 09:57:36 <|amethyst> oh, right, in your tests 09:59:06 wonder how stdlib-implementation-sensitive constexpr is 09:59:12 we are on c++11, right? 09:59:31 some of this stuff could be constexpr on c++14 apparently 09:59:52 <|amethyst> there are a couple of tricks to make some of them work in C++11 as well 10:00:15 <|amethyst> e.g. instead of content -= rhs.content; return *this; you could probably do return content -= lhs.content, *this; 10:00:59 <|amethyst> less ugly, instead of lhs -= rhs; return lhs; you can return lhs -= rhs; 10:01:15 <|amethyst> but that only helps if you do the ugly things first :/ 10:01:39 heh 10:01:59 hm, I am a bit worried about os x clang's error reporting for constexpr 10:02:13 or could there be some automatic determination of constexpr happening? 10:03:09 <|amethyst> not automatic, but I guess it's possible libc++'s std::round is constexpr 10:03:35 <|amethyst> I was under the impression that it wasn't necessarily compliant to stick constexpr on something that's not constexpr in the standard, but I'm not sure about that 10:04:05 it lets me make from_basetype constexpr even though it uses from_scaled, which can't be constexpr (on the hacky implementation there) in c++11 10:05:27 <|amethyst> oh, "No diagnostic is required for a violation of this bullet." 10:05:36 <|amethyst> according to cppreference 10:06:03 haha ok 10:06:08 <|amethyst> and that's only for "at least one set of argument values" 10:06:36 I guess it will just silently be non-constexpr in that case? 10:06:41 <|amethyst> yeah 10:07:08 <|amethyst> since not everything can be done at compile time, even if the function is constexpr, there's always the ability to fall back to runtime 10:07:32 <|amethyst> but apparently you're not required to get a diagnostic if it always will fall back to runtime 10:07:37 <|amethyst> for constexpr functions 10:08:07 <|amethyst> constexpr variables do have to initialised in a constexpr way 10:08:41 <|amethyst> hm 10:08:59 <|amethyst> looks like a *constructor* doesn't have as much flexibility as a function in that respect 10:09:19 <|amethyst> so you should get an error if you did something like that in a constructor 10:09:41 <|amethyst> Anyway, I've got to go, but I'll leave you with this if you don't already have it open :) http://en.cppreference.com/w/cpp/language/constexpr 10:09:51 thanks for the help 10:10:00 <|amethyst> no problem, thanks for the template :) 10:52:00 by this no-error logic, probably one should just make everything constexpr and let the compiler sort it out. But then, if the compiler can be trusted to sort it out, why not have everything be constexpr by default? 10:52:32 I guess the overwhelming majority of functions are not constexpr 12:51:29 <|amethyst> advil: also, "this can be done at compile time" is a contract 12:52:15 <|amethyst> advil: if you make it automatic, and a user comes to rely on the fact that your library function happens to be automatically constexprable, then you break client code if you change the implementation so that it is not 12:52:57 <|amethyst> advil: this seems like a pretty good answer: https://stackoverflow.com/a/14472576 12:53:20 <|amethyst> advil: also regarding "why isn't there a diagnostic?" 12:57:53 holy halting problem, batman 12:58:09 <|amethyst> geekosaur: you can already write compile-time infinite loops :) 13:04:55 Unstable branch on crawl.akrasiac.org updated to: 0.21-a0-361-g4efd3f9 (34) 14:03:29 03Aidan Holm02 07https://github.com/crawl/crawl/pull/620 * 0.21-a0-362-gda83561: Improve layout+spacing of tiles main dungeon view 10(25 hours ago, 3 files, 26+ 6-) 13https://github.com/crawl/crawl/commit/da835613c030 14:03:29 03Aidan Holm02 07https://github.com/crawl/crawl/pull/620 * 0.21-a0-363-gbd7d0fb: Fix sidebar monster/inv background flicker on resize 10(22 hours ago, 2 files, 2+ 2-) 13https://github.com/crawl/crawl/commit/bd7d0fb7b24a 14:03:29 03Aidan Holm02 07https://github.com/crawl/crawl/pull/620 * 0.21-a0-364-g930914a: Fix tiles minimap viewport indicator leaving the sidebar 10(21 hours ago, 1 file, 2+ 0-) 13https://github.com/crawl/crawl/commit/930914a9e967 16:19:21 03Aidan Holm02 07https://github.com/crawl/crawl/pull/620 * 0.21-a0-365-gb6ba517: Stick message region to the bottom of the window 10(2 minutes ago, 1 file, 5+ 0-) 13https://github.com/crawl/crawl/commit/b6ba51755bbb 17:34:47 03Lasty02 07* 0.21-a0-362-gb6c469d: Spell out that all Ru's powers scale with piety in Ru god text 10(18 minutes ago, 1 file, 2+ 1-) 13https://github.com/crawl/crawl/commit/b6c469d0e832 17:34:47 03Lasty02 07* 0.21-a0-363-g3c89746: Try to improve a clumsy Ru message. 10(67 seconds ago, 1 file, 2+ 2-) 13https://github.com/crawl/crawl/commit/3c89746c4e7b 17:44:35 Lasty: i notice that in that text it is spelled both sacrificiant and sacrificant 17:44:48 i think the latter is the correct one 17:46:06 amalloy: ah, crap 17:46:10 thanks for pointing that out :) 17:48:23 03Lasty02 07* 0.21-a0-364-gbd1fde4: Fix a typo (amalloy) 10(21 seconds ago, 1 file, 1+ 1-) 13https://github.com/crawl/crawl/commit/bd1fde41eaf2 17:48:52 hey guys, im the maintainer of the alternative lookupdb at https://github.com/guyht/lookup - I am trying to update it to 0.20 but looks like a lot has moved around - in particular, I am trying to work out how to compile 'monster' as looks like the makefile has disappeared https://github.com/crawl/crawl/tree/master/crawl-ref/source/util/monster 17:49:31 btw sacrificant makes two new words i've learned this week! very unusual. the other one was "sapid" 17:50:02 "sapid" is new to me 17:50:31 oo, good word 17:51:01 except that nobody else will ever understand you if you use it :P 17:51:19 haha 17:51:41 you make it sound like you think language is for communication! 18:01:06 mrwooster: as of a9541e6b72cc6e843925e8560f32452036f7dd61 you just run `make monster` in the source/ directory, ie util/monster/../.. 18:02:28 amalloy - thanks, should have guessed :) 18:02:40 i couldn't guess either, i had to go find the commit that changed it 18:03:45 Unstable branch on underhound.eu updated to: 0.21-a0-364-gbd1fde4 (34) 18:03:56 @??fire dragon 18:03:56 fire dragon (04D) | Spd: 10 | HD: 12 | HP: 73-106 | AC/EV: 10/8 | Dam: 20, 13, 1307(trample) | fly | Res: 06magic(60), 05fire++, 03poison, 12drown | Vul: 12cold | XP: 1073 | Sp: fire breath (3d24) [11!AM, 06!sil, 08breath] | Sz: Giant | Int: animal. 18:04:14 @??spriggan 18:04:14 spriggan (15i) | Spd: 10 (move: 60%) | HD: 7 | HP: 19-29 | AC/EV: 3/18 | Dam: 15 | 10weapons, 10items, 10doors, see invisible | Res: 06magic(60) | XP: 216 | Sz: little | Int: human. 18:04:36 weird things i just learned about util/monster: sizes small and below are in lower-case, while sizes Medium and above are title-cased 18:06:23 oooo, github added a feature to their Blame feature. there's now a handy "view blame prior to this change" button so you can page through the history of a line or function 18:08:04 haha, blame for that Medium nonsense goes to |amethyst: https://github.com/crawl/monster/commit/85f448b314d92cedb19a227338ec92106c0194b6 18:08:17 he later toned down from GIANT to the mere Giant we see today 18:09:27 -!- MarvinPA__ is now known as MarvinPA 18:09:31 Unstable branch on crawl.jorgrun.rocks updated to: 0.21-a0-364-gbd1fde4 (34) 18:22:57 its a nice touch 20:35:23 -!- The topic of ##crawl-dev is: Crawl Development | Logs: http://s-z.org/crawl-dev/ | People with +v have commit access. | Please keep general Crawl-related chat to ##crawl. | Dev wiki: http://crawl.develz.org/wiki | Long stuff to a pastebin service, please. 20:35:24 -!- The topic of ##crawl is: Play Dungeon Crawl Stone Soup online now! Type ??servers for instructions. | http://crawl.develz.org | FooTV: http://termcast.develz.org - ??footv for instructions | See also ##crawl-offtopic 21:47:36 -!- capablanca is now known as mikee_ 21:48:03 wow 21:48:33 latest post in the gnoll thread is certainly something 21:49:25 "I was in the middle of a game (now finished 15 runes), and I could cast level 9's in gold dragon armour at 45%-50%. I applied a patch after reloaded because spectators got one of my windows stuck, and then my cast rate was at 70-75%." 21:49:32 "So pretty much, besides support spells along the way, new Gnoll is just going to be melee focus now." 21:49:43 "I don't see the point in putting points into INT now if it's not going to pay off in level 9's before the end of the game, or if that means I'd have to wear some weak armour to do it." 21:50:30 svendre also had a quality suggestion along the lines of "half score for gnolls, they are too easy" 21:54:19 Wow, serious mourning here going on for the inability to cast L9s in GDA.... 21:58:10 My gnoll could cast DMsl in plate mail at 17% and silence at low fail. Glad to hear the spellcasting is getting toned down a bit. 22:01:39 Also thank you for the change to pan floors! 22:01:58 np 22:02:13 nikheizen: yeah, ease of casting every L6 spell in the game in heavy armour was exactly why I pushed apts down a bit 22:04:16 good stuff 23:59:37 Unstable branch on CRAWL.XTAHUA.COM updated to: 0.21-a0-364-gbd1fde4 (34)