IRC logs for #openttd on OFTC at 2023-05-13
โด go to previous day
00:07:35 *** ChanServ sets mode: +v blathijs
01:26:27 *** Wormnest has quit IRC (Quit: Leaving)
02:33:33 *** nebulabc has quit IRC (Quit: Must have rage quit ยฏ\_(ใ)_/ยฏ)
02:33:53 *** nebulabc has joined #openttd
03:00:01 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
03:17:46 *** HerzogDeXtEr has joined #openttd
05:25:35 *** leohoo_sdu[m] has joined #openttd
05:25:38 *** leohoo_sdu[m] has left #openttd
09:23:42 *** SpComb^ has joined #openttd
11:48:56 *** Elouin has quit IRC (Quit: So long and thanks for all the fish!)
12:13:33 <TrueBrain> okay, weirdest one with that PR is that timetable remains on calendar
12:13:44 <TrueBrain> so if you would to freeze the calendar ... timetables stop working? ๐
12:18:37 <TrueBrain> all in all, we need a bit more work to split out some odd timers first ... newgrf profiling is one of them .. based on calendar dates .. weird
12:19:25 <TrueBrain> CodeQL in 10719 lies ... that variable is used. Why does it think it isn't? Hmm
12:19:52 <TrueBrain> ah, no JSON support installed for the CodeQL run .. oops
12:41:54 <TrueBrain> lol, you can't stop a newgrf profile of a grf that didn't generate any events yet
12:42:00 <TrueBrain> that is a bit unclear at first use ๐
12:42:56 <TrueBrain> if you start a profile for N time, and it didn't generate an event, it will continue to run on the background
12:59:06 <pickpacket> I think Iโm gonna start experimenting with pre-signals in my next game
13:08:18 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
14:10:28 <TrueBrain> boooo, the new ClampTo template can't be used by strongtypedef, as it is but isn't an integer ๐
14:18:18 <TrueBrain> guess I need to specify it per resulting type .. which is fine-ish ๐
14:18:31 <TrueBrain> I am sure a template-way exists to fix that ๐
14:23:57 <TrueBrain> `error: call to function 'ClampTo' that is neither visible in the template definition nor found by argument-dependent lookup`
14:24:02 <TrueBrain> never seen that error before ๐
14:40:41 <michi_cc[d]> TrueBrain: Making a template is possible, except that you need have the reversed condition on the original `ClampTo`, which is unfortunate due to the header dependency:
14:40:41 <michi_cc[d]> template <typename To, typename T>
14:40:41 <michi_cc[d]> constexpr std::enable_if_t<std::is_base_of_v<StrongIntegralTypedef<typename T::Type, T>, T>, To> ClampTo(T value) {
14:40:41 <michi_cc[d]> return ClampTo<To>(value.value);
14:40:58 <TrueBrain> yeah ... I got to that point .. then was like: nah, I'm good ๐
14:41:41 <TrueBrain> `IsInsideMM` is a nasty function, template-wise
14:41:48 <TrueBrain> the casting to `size_t` is .. annoying
14:42:09 <TrueBrain> `use of overloaded operator '-' is ambiguous`
14:42:14 <TrueBrain> I am fighting overloads, which is fun ๐
14:46:24 <TrueBrain> but I can now do `using Date = NewStrongTypedef<int32, struct DateTag>;`
14:46:32 <TrueBrain> which at least is better than copy/pasting the whole template for every type ๐
14:59:23 <TrueBrain> lol, the auto-conversion to int32 for these kind of types kinda makes it a bit pointless .. ๐ Compilers are too smart ..
15:46:12 <TrueBrain> wauw, that was a lot more messy than I expected ... being explicit when we want the integer value and when we want the type requires a lot of places that needs .. attention ๐
15:49:28 <TrueBrain> michi_cc[d]: if you have some time, curious what you think of this `NewStrongTypedef` approach ๐
15:49:36 <TallTyler> Huh, why do my replies to your comments not show your comments? Silly GitHub... ๐
15:49:58 <TallTyler> Oh, they do, just not below my review reply...
15:50:18 <TrueBrain> curious if this works with TileIndex .. or how much that depends on implicit conversion ๐
15:53:17 <TrueBrain> michi_cc[d]: seems TileIndex isn't as strong as the name suggests ๐ Anything that can go to/from uint32 silently works ๐ Not sure that is a bad thing; but funny nevertheless ๐
15:54:53 <TrueBrain> TallTyler: no clue what you did, but yeah, comments are weird ๐
15:54:58 <michi_cc[d]> TrueBrain: Yes, because the `TileIndex` class explicit adds it.
15:55:20 <michi_cc[d]> Otherwise the change PR would have been like 500000 modified lines.
15:55:25 <TrueBrain> hihi, like my PR is now? ๐
15:55:30 <TrueBrain> well, not for TileIndex
15:55:32 <TrueBrain> but for Date / Year ๐
15:55:57 <TrueBrain> but more my point, because it is not explicit, it isn't really strong; compilers disapoint me ๐
15:56:22 <TrueBrain> `TimerGameCalendar::Date d = TileIndex(0)` works, basically ๐
15:56:54 <TrueBrain> (again, not sure that is a bad thing)
15:57:05 <michi_cc[d]> Well, the `StrongIntegralTypedef` base does have the implicit conversion, but the point of the strong typedef for TileIndex isn't to prevent assignability, but to make sure templates resolve differently.
15:57:22 <TrueBrain> yeah, okay, so it doesn't use the strong part ๐
15:57:35 <TrueBrain> as long as it was intentional ๐
15:57:55 <TrueBrain> I really did want the strong part for Date / Year, as we will have Calendar and Economy .. and boy, it shows a lot of weirdness ๐
15:58:02 <michi_cc[d]> It is strong in the sense that it is a new type, which a normal typedef is not.
15:58:21 <michi_cc[d]> So the whole point is about the c++ type system, not casting/conversions.
15:58:31 <TrueBrain> TallTyler: please check time-table again; your PR still had a lot of Calendar references to it, not economy ๐
15:59:09 <TrueBrain> michi_cc[d]: yes, I got you the first time ๐ It was just unexpected, but as I said a few times already: I am not saying this is a bad thing ๐
16:00:43 <michi_cc[d]> If you want unassignable types, just start/modify the base to remove any implicit or explicit cast or assignment operators. It can probably still look nice by using custom literals for numbers.
16:01:54 <TrueBrain> and from int to date, I am fine with that conversion; so I left that in
16:02:00 <TrueBrain> but from date to int is now only allowed explicit
16:02:58 <TrueBrain> still no clue if we want to go this way; but I am still scared we will mix up `Year` from `Calendar` to `Economy`; this would protect against that
16:03:40 <TrueBrain> custom literals are an interesting idea ... `1Y` ๐
16:04:20 <michi_cc[d]> One could bike-shed though if the using approach is really needed or a `struct Bla : StrongTypedef<int, Bla> {}` isn't also good enough.
16:04:44 <TrueBrain> the errors I got back were much more understandable with a `using` ๐
16:04:55 <TrueBrain> so the bike-shed goes both ways ๐
16:07:15 <TrueBrain> there is btw no fundamental difference, I think. In one case the struct is defined outside, in the other case it is defined as tag inside the template
16:09:11 <michi_cc[d]> The only difference really is `TileIndex` as that needs some custom code for dealing with the use of both int32 and uint32 in the code. And for that at least using the derived type as the operator results is better.
16:09:30 <TrueBrain> I have seen some nice ways to do that; going to experiment with that next ๐
16:09:36 <TrueBrain> just as a fun "wtf can you do with templates" ๐
16:09:58 <TallTyler> Should be fixed, unless I'm looking in the wrong place ๐
16:10:16 <michi_cc[d]> So, C++20 for concepts then? ๐คฃ
16:10:26 <TrueBrain> btw, question you might now: in `StrongTypedef` there are 2 `operator =` on `StrongTypeDef` .. they scared me a tiny bit, as how I read it, you can assign any `StrongTypedef` to any other, not? (again, fine for the `TileIndex` usecase, but they might negate mine ๐ )
16:10:38 <TrueBrain> michi_cc[d]: yeah ... if only we could!
16:10:51 <TrueBrain> well, maybe we can even .. ๐
16:11:44 <michi_cc[d]> No, as `StrongTypedef` is a templated type, so it only refers to the same (templated) type.
16:12:07 <TrueBrain> with inheritance, that becomes a bit annoying to read ๐
16:12:10 <TrueBrain> but that makes sense ๐ Tnx ๐
16:12:51 <TrueBrain> I am btw shocked with the amount of magic in STL .. `std::min` needs `<`, but if you have an implicit cast to `int32` that is also fine ๐
16:13:07 <TrueBrain> sometimes things compiled .. where I did not expect it to compile ๐
16:15:47 <glx[d]> std::min can guess if possible
16:15:58 <gnomechomsky> Do little internal helper methods require a declaration in the header? I don't think the code style document covers this
16:16:39 <glx[d]> in header if you want it available everywhere
16:17:01 <glx[d]> we have a lot of static functions local to the cpp files only
16:19:34 <gnomechomsky> Ah I'll do the second one
16:19:51 <gnomechomsky> It's just extracting a big switch common to two methods
16:20:53 <TrueBrain> `โconstexprโ call flows off the end of the function` lol @ error
16:21:04 <TrueBrain> today I found the weirdest errors ๐ For my collection!
16:26:06 <TrueBrain> michi_cc[d]: can we use C++23? I kinda want explicit this ๐ Makes it even easier to make it look pretty!
16:28:25 <TrueBrain> has no support yet what so ever!
16:29:11 *** Wormnest has joined #openttd
16:29:51 <TrueBrain> ugh, okay, enough toying with templates .. first dinner ๐
16:37:25 <glx[d]> looks like gcc13 has some issues with your templates
16:41:30 <TrueBrain> Nah, it is not gcc13
16:41:55 <TrueBrain> Just me being silly
17:20:27 <TrueBrain> michi_cc[d]: I was thinking something like `using Date = NewStrongTypedef<int32, struct DateTag, Comparable, Integer>;`
17:20:37 <TrueBrain> where you can give some mixins to define how the new type should behave
17:20:48 <TrueBrain> one of them could be `Convertable<uint>` or something, for TileIndex
17:27:34 <TrueBrain> more than I do all year ๐
17:27:39 <andythenorth> I want to move "More..." sub-group to the end of the list ๐
17:27:46 <andythenorth> I guess I write more python ๐
17:27:53 <petern> Literally move it in the source ๐
17:28:18 <petern> Wasn't there a sort order thing, that maybe works if you have < 255 engines...
17:28:43 <andythenorth> sort order works fine
17:28:54 <andythenorth> I have a thing that automates it
17:29:01 <andythenorth> but it's not variant aware
17:29:37 <petern> Hmm, variants should appear in that order within the group.
17:31:31 <andythenorth> all is well in grf spec
17:31:51 <andythenorth> but I am kind of gaffer-taping variants into Horse
17:36:13 <TrueBrain> `error: must use a qualified name when declaring a conversion operator as a friend`
17:36:14 <TrueBrain> ` error: friend function definition cannot be qualified with 'TType::'`
17:43:01 <TrueBrain> bah, all operators behave excellent, but cast-operators are like: NO! We work differently! NANANANANA
17:50:07 <michi_cc[d]> TrueBrain: Why not if it works.
17:50:28 <TrueBrain> I don't always know what is good to use from C++ ๐
17:50:34 <TrueBrain> too many options .. not all are good ๐
17:52:53 <TrueBrain> grr, GitHub closed down their most efficient way of searching for code in their codebase .. now all we got left is this weird thing they consider "code search"
17:55:34 <andythenorth> this was 4 lines of python ๐
17:55:45 <andythenorth> I assumed I'd be here all evening failing
18:00:36 <TrueBrain> `does not specialize an instantiated member` .. grr, I hate these errors .. so impossible to figure out what it actually means ๐
18:04:13 *** cebopp1[m] has left #openttd
18:09:44 *** gelignite has joined #openttd
18:31:07 <TrueBrain> hmm, the implicit conversion is annoying ๐ Such mean things, compilers ...
18:31:26 <TrueBrain> still can't believe all operators behave like A, but one is like: nnnooooo, I am going to be like B!
18:32:40 <petern> Sometimes we want it, sometimes we don't...
18:32:47 <petern> Compilers should KNOW!
18:41:15 <DorpsGek> - Update: Translations from eints (by translators)
19:00:28 <TrueBrain> so my PR fixes that \o/ ๐
19:02:15 <TrueBrain> michi_cc[d]: ironically, `concepts` does allow for solving explicit / implicit nicely ๐
19:02:26 <TrueBrain> just .. so many warnings and errors when switching to C++20! ๐ฎ
19:02:41 <TrueBrain> (I had to try .. my SFINAE sucks :P)
19:02:52 <petern> Your what? (Bless you)
19:02:57 <TrueBrain> ` explicit constexpr operator TValueType () const requires (TExplicit == 1) { return this->value; }`
19:02:57 <TrueBrain> ` constexpr operator TValueType () const requires (TExplicit == 0) { return this->value; }`
19:03:00 <TrueBrain> that at least works nicely ๐
19:03:21 <TrueBrain> when I try that with C++17, with `enable_if`, it keeps trying to enable both ..
19:03:44 <TrueBrain> suggestions or ideas are very welcome ๐
19:04:44 <TrueBrain> C++20 really doesn't like our `SaveLoad` for some reason
19:08:43 <andythenorth> in the context of name callback, do I still OR strings with 0xD000?
19:08:50 <andythenorth> or some other value?
19:09:15 <andythenorth> 0xD000 is the value used in additional_text cb
19:10:13 <michi_cc[d]> Depends on how you use it. All text CB results itself are 0..3FF and OTTD implicitly adds the D800 to them. For use on the text stack you (or NML) has to give the full string ID.
19:16:30 <andythenorth> trying to use the return value of a procedure
19:17:18 <michi_cc[d]> The actual CB result has to be 0..3FF.
19:17:32 <michi_cc[d]> So not adding any Dxxx to it.
19:18:33 <TrueBrain> (well, it works with `concepts`, but .. yeah :P)
19:21:54 <petern> Hmm, adding features to work around gamescripts being unable to do bulk changes because we applied AI limits to them... Not sure.
19:23:10 <gnomechomsky> petern: what's the background here?
19:24:15 <petern> It would be nice if GS could just send more than one command before being suspended somehow
19:24:24 <TrueBrain> I made a draft for that! ๐
19:25:43 <petern> That's a gist not a draft ๐
19:25:50 <TrueBrain> a draft for an idea ๐
19:26:19 <dP> fyi, I did equivalent of my insta-gs branch on citymania and it works just fine executing commands instantly
19:26:25 <gnomechomsky> Still the current method involves deleting and recreating the goal which I think would reorder it in the list
19:26:43 <dP> except citymania has callbacks so there is recursion issues but gs is event-based doesn't have them
19:26:47 <petern> I think conceptually deleting and recreating is correct, though.
19:27:00 <petern> (Especially if it's the company that changes)
19:27:22 <andythenorth> what other values can I add to strings to make them work?
19:27:28 <andythenorth> 0xD000 isn't doing it in this case
19:27:47 <gnomechomsky> Hmm, it's the destination as in where the user is taken when they click on the goal. I haven't supported changing the company the goal applies to
19:27:57 <andythenorth> I've tried ORing before the procedure call, in the procedure call, and after the procedure call
19:28:06 <andythenorth> I have to use the text stack because I'm out of string IDs
19:28:12 <petern> I know you didn't, you wrote that ๐
19:28:48 <dP> goal ordering is a pita though
19:29:00 <dP> they're just not meant to be ordered
19:29:17 <dP> took me like 3 rewrites or smth to get it right xD
19:30:20 <petern> Hmm, that's probably easily solvable... include sort order in the API?
19:30:49 <michi_cc[d]> No idea why though ๐
19:30:50 <TrueBrain> michi_cc[d]: do I dare to ask WHY that works? ๐
19:30:52 <dP> yeah, I did that with league tables
19:31:26 <dP> so now that I no longer need to abuse goals for league tables I'm not sure they need to be ordered xD
19:31:32 <gnomechomsky> petern: Why was the limit applied? It's because the GS runs as if it were an AI script?
19:32:28 <michi_cc[d]> It's not a "limit" in the normal sense. Commands are async in network games, but the script interface has no concept of an async function.
19:32:49 <dP> it a limit in a sense that they don't need to be async
19:33:40 <michi_cc[d]> andythenorth: Could be DC00. Depends in which range NML allocated the string.
19:34:30 <andythenorth> this string stuff ๐ฆ
19:35:02 <andythenorth> 0xDC00 doesn't work
19:35:06 <TrueBrain> michi_cc[d]: it compiles; but it doesn't work in the way it does without the typename statement ๐ฆ But .. this does give good snippets to work from ๐
19:35:07 <andythenorth> callback is failing in all cases
19:35:08 <michi_cc[d]> NML is not very meta at all, otherwise it would provide usable functions for handling strings and text stack stuff.
19:36:11 <michi_cc[d]> The callback result must be a string in the D800 range and returned as the offset from D800 (which should be what the `string()` built-in does).
19:36:20 <andythenorth> I think this is probably just not usable with procedures
19:37:06 <michi_cc[d]> Can you post the NFO of the procedure that NML generates so we can see what is actually returned?
19:39:59 <andythenorth> I haven't read the nfo to check it's not user error
19:40:06 <andythenorth> but it's just a pass through currently
19:40:11 <andythenorth> it's passed a string, and it returns a string
19:40:22 <andythenorth> in actual intended use, it will put up to 8 values on the text stack
19:40:55 <michi_cc[d]> Well, as long as the string is also allocated by NML in the D8xx range, the procedure result should be a valid CB result.
19:41:05 <andythenorth> YouTube has been showing me a lot of those java sugarcane railroads
19:41:19 <petern> I'll blame you then ๐
19:41:22 <andythenorth> michi_cc[d]: thanks, I think I just do without the procedure
19:41:54 <andythenorth> it will be a slower compile and bigger grf, but probably I spend so long figuring out how to make it work ๐
19:44:23 <TrueBrain> `using TileIndex = StrongTypedef<uint32, struct TileIndexTag, false, STCompare, STMath, STCompatible<int32>, STCompatible<int64>>;` <- works! Tnx michi_cc[d] ๐
19:44:32 <TrueBrain> we will see if MSVC also likes it, but that is another battle ๐
19:46:25 <andythenorth> so many vehicles, so extending the varact 2 chain for any callback is horrible bloat
19:46:37 <andythenorth> I've added 300 KB just to handle one buy menu name case
19:47:06 *** argoneus has quit IRC (Read error: Connection reset by peer)
19:48:18 <TrueBrain> right, now to find where some magic happens to allow converting a TileIndex to a stream-like something ๐
19:49:57 <michi_cc[d]> TrueBrain: `endian_buffer.hpp:55`
19:50:15 <TrueBrain> ah, yes, I read that part ..
19:50:19 <michi_cc[d]> And line 50 with the lovely templates, too ๐
19:50:22 <TrueBrain> didn't know it worked for `fmt` too ๐
19:50:51 <michi_cc[d]> Oh, the other stream-like seomthing ๐
19:50:59 <TrueBrain> ah, they are different ๐
19:51:05 <TrueBrain> as this code should just work still
19:52:08 <TrueBrain> btw, those two lines in `endian_buffer` are the reason `value` is public ๐
19:53:02 <glx[d]> I think sometimes nml adds the string range, sometimes it doesn't
19:55:25 <TrueBrain> okay, the cast operator remains weird ... if I remove the template stuff, everything compiles ... it I add it, most things work, except for `fmt` ๐
19:55:33 <TrueBrain> paint me yellow and call me a banana ๐
19:59:55 <TrueBrain> concepts really are more readable ๐
20:02:17 <michi_cc[d]> For endian_buffer, making it `this->Write((typename T::Type)data);` doesn't require a public value BTW, except that for TileIndex specifically, it is also accessed in map_func.
20:02:52 <TrueBrain> hmm .. how do I combine two checks with SFINAE ..
20:03:07 <michi_cc[d]> std::conjunction_v
20:03:27 <TrueBrain> `std::conjunction_v<std::is_same<T, TValueType>, TCond>` fails .. let's see ...
20:04:52 <michi_cc[d]> conjunction wants a TCond::value in this case.
20:05:21 <TrueBrain> `error: 'TCond' is not a class, namespace, or enumeration`
20:05:41 <TrueBrain> I understand people become expert in SFINAE after they became a rocket scientist ๐
20:06:35 <michi_cc[d]> I think `std::is_same<T, TValueType> && TCond` is supposed to work, but I didn't have good experiences with this either.
20:07:10 <TrueBrain> you get silly errors like `error: type-id cannot have a name`
20:07:22 <TrueBrain> totally non-descriptive what it was trying to do :p
20:07:56 <michi_cc[d]> Or `std::conjunction<std::is_same<T, TValueType>, std::integral_constant<bool, TCond>>` (totally untested).
20:09:30 <michi_cc[d]> sorry, confunction_v of course
20:09:46 <TrueBrain> that does a bit more ๐ But now `base_tiles[tile]` is confused again
20:09:51 <TrueBrain> argh, why did they make this so difficult?
20:09:56 <TrueBrain> can I just upgrade to C++20 and be done with this?
20:10:52 <andythenorth> can I update to grf v9 and be done with string crap? ๐
20:20:29 <TrueBrain> this is just so weird .. that template influences how the cast-operator works .. but not in a way that is really understandable ๐
20:23:30 <michi_cc[d]> Would it be possible to inject one of the two casts with a mixin class like the other traits you teased at?
20:23:44 <TrueBrain> couldn't get it to work
20:23:46 <TrueBrain> all operators work fine
20:23:49 <TrueBrain> but a cast-operator fails
20:26:57 <TrueBrain> lol, godbolt doesn't always do what I expect ๐ Closing random windows ...
20:33:14 <TrueBrain> okay, GCC shows most clear what is actually happening .. cast-operators are just very special ๐
20:38:52 <TrueBrain> right, so far fixing the C++20 warnings seems an easier approach to this problem ๐
20:51:36 <petern> Yeah, I was converting to range-for and... er yeah.
20:54:17 <TrueBrain> I figured out how to do it with a mixin! That does not work how I expected it to .. but fine ๐
20:58:42 <TrueBrain> but, another nightly bug report! ๐
20:59:08 <TrueBrain> yup, broken for me too
21:00:16 <petern> I cloned a train from the viewport, not from the depot list. mistake
21:00:50 <TrueBrain> seems your scroll changes made it off-by-one ๐
21:01:33 <glx[d]> yup it clones the line above the clicked one
21:01:34 <petern> Only that window though :p
21:02:04 <TrueBrain> let's see how other compilers think about my work ๐ And yes, the game is broken, the year starts at year 0 .. haven't looked into what ๐ But that is not the point of that PR ๐
21:05:53 <petern> this->GetVehicleFromDepotWndPt(pt.x - nwi->pos_x, pt.y - nwi->pos_y, &v, &gdvp);
21:06:19 <petern> Ah, it's already removed the widget position.
21:06:46 <TrueBrain> owh, lol, ofc 10761 breaks regression .. I removed 4 settings, and I didn't want to deal with fixing the error they produced ๐ Lol
21:15:51 <TrueBrain> `TileIndex size = Map::Size();` .. that is a weird type for size ..
21:16:28 <TrueBrain> owh, it is meant to be "last-tile" of sorts
21:16:32 <TrueBrain> lol, that took a bit too long ๐
21:19:07 <TrueBrain> hmm, funny, with my PR, only on Windows, TileIndex is no longer 4 bytes ๐ Interesting ....
21:20:14 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:21:52 <petern> Ah ha, that's why I keep messing up trailing spaces -- it's a plugin and I've not enabled it for WSL-VS Code.
21:22:11 <TrueBrain> plugin? It is a setting, to remove trailing whitespaces on save?
21:22:14 <TrueBrain> or you mean something else ๐
21:22:20 <petern> No, a plugin to highlight them.
21:22:27 <TrueBrain> ah; I just let VSCode fix it ๐
21:22:50 <petern> Turned that on as well now ๐
21:23:12 <TrueBrain> a lazy programmer is a good programmer ๐
21:25:47 <TrueBrain> I am sure you tested it ๐
21:26:06 <petern> I even successfully compiled it ๐
21:26:15 <andythenorth> and wrote tests!
21:26:38 <petern> That doesn't look testable right now.
21:26:57 <TrueBrain> hmm, my strongtypedef is twice the size it should be on Windows .. interesting
21:27:26 <TrueBrain> all because of that stupid implicit conversion ๐
21:29:38 <TrueBrain> okay, MSVC writes an extra byte for some reason ... interesting ๐
21:31:12 <TrueBrain> one byte for every mixin .. do I want to know? ๐
21:35:14 <TrueBrain> `__declspec(empty_bases)` resolves the issue
21:35:38 <TrueBrain> `This is a longstanding bug in the Visual C++ compiler. When a class derives from multiple empty base classes, only the initial empty base class will be optimized using the empty base optimization (EBO).`
21:36:37 *** m3henry has joined #openttd
21:37:11 <m3henry> Does cargo value decay as soon as it is loaded into a train, or after the train first leaves the station?
21:37:38 <TrueBrain> michi_cc[d]: lol; can't possibly change it now!
21:37:39 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:38:18 <michi_cc[d]> Well, chances are something somewhere in the Windows API depends on this.
21:39:30 <TrueBrain> at least I now know how to fix this in my PR ๐
21:39:56 <TrueBrain> no clue yet how to fix settings .. they silently cast to and from the base type
21:40:05 <TrueBrain> which works for tileindex, but not for my date/year ๐
21:40:26 <TrueBrain> guess, like the endianbuffer, I should just hardcode it in the saveload to still accept these types, and just pickly out the value
21:41:41 <TrueBrain> but, that is for another day ๐ Enough templating for one evening .. this was fun ๐ (well, "fun" :P)
21:42:38 <michi_cc[d]> Templates is usually feeling completely stupid for hours and hours, but when it finally works, you can feel like king for a moment ๐
21:42:52 <TrueBrain> exactly! Really happy these mixins work
21:43:09 <TrueBrain> makes it a bit more readable while keeping it optional ๐
21:43:44 <TrueBrain> and it would just be nice if we can have a bit more stronger types in certain places .. would really help out the code (without losing speed)
21:44:23 <TrueBrain> well, I am sure compiling takes a bit longer, but we have a bit more time now given someone enabled precompile headers ๐
21:57:18 <petern> Hmm, sometimes refactor takes ages. I guess searching so many files ๐
22:03:16 *** ChanServ sets mode: +v tokai
22:09:59 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:13:45 <petern> ```/usr/bin/ld: /usr/bin/ld: DWARF error: could not find variable specification at offset c21
22:13:45 <petern> /usr/bin/ld: DWARF error: could not find variable specification at offset 2009```
22:17:53 <petern> Okay, turns out this unused function is still needed for during linking apparently.
22:35:19 *** patrick[m] has quit IRC (Quit: Client limit exceeded: 20000)
23:33:26 *** argoneus has joined #openttd
23:33:56 *** argoneus has joined #openttd
continue to next day โต