IRC logs for #openttd on OFTC at 2023-09-13
⏴ go to previous day
01:38:53 *** Wormnest has quit IRC (Quit: Leaving)
01:41:41 <xplusc> Ok I'm running into an error while trying to compile OpenTTD from source.
01:41:41 <xplusc> - Visual Studio 2022 Community Edition
01:41:41 <xplusc> - Installed Platform SDK
01:41:42 <xplusc> - Installed libraries listed under "Windows" in "COMPILING.md" with vcpkg
01:41:42 <xplusc> - Used the `cmake.exe .. -G"Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="<location of vcpkg>\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"` command to make the `.vcxproj` files
01:41:44 <xplusc> - Opened up and built the `ZERO_CHECK` project for good measure
01:41:44 <xplusc> - Attempted to build the `openttd` project
01:41:46 <xplusc> Error received after attempting last step:
01:41:46 <xplusc> ```Error C1033 cannot open program database 'C:\...\OpenTTD\build\openttd_lib.dir\Debug\openttd_lib.pdb' openttd_lib```
02:41:37 <_glx_> I don't use the project files, I just open the folder in visual studio
02:53:01 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:06:43 <xplusc> ok, now cmake can't find nlomannjson.
03:10:44 <xplusc> I've messed around with trying to get cmake to find the libraries in `/vcpkg`, but I couldn't figure it out/fix it.
03:19:03 <pickpacket> andythenorth: that was thorough work! I'm impressed and very happy :D
04:44:05 <xplusc> cmake seems to find it now? Now it can't be found at compile time. Current error:
04:44:05 <xplusc> Error C1083 Cannot open include file: 'nlohmann/json.hpp': No such file or directory C:\...\OpenTTD\out\build\x64-Debug\OpenTTD C:\...\OpenTTD\src\tests\test_script_admin.cpp 23
04:44:05 <xplusc> Error C1083 Cannot open include file: 'nlohmann/json.hpp': No such file or directory C:\...\OpenTTD\out\build\x64-Debug\OpenTTD C:\...\OpenTTD\src\script\api\script_admin.cpp 17
04:44:59 <xplusc> I have verified that this file exists in my `/vcpkg` directory.
05:01:45 *** D-HUND is now known as debdog
05:23:08 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:14:24 *** Rubidium_ has joined #openttd
06:16:09 *** Rubidium has quit IRC (Ping timeout: 480 seconds)
06:16:58 *** Artea has quit IRC (Ping timeout: 480 seconds)
06:33:34 <xplusc> Alright, I fixed it. I added this line to `CMakeLists.txt`:
06:33:34 <xplusc> `include_directories(C:/<fill in your path here>/vcpkg/packages/nlohmann-json_x64-windows-static/include)`
07:24:21 *** xarothbrook has joined #openttd
07:24:21 <xarothbrook> It almost sounds like there's something off with your setup, at least, having to edit CMakeList just to get things to build sounds odd.
07:38:58 <peter1139> There's a configuration for cmake when you configure that tells it to look at vcpkg. Maybe that is missing -- but then I'd expect all the other vcpkg dependencies to be problematic.
08:03:58 <peter1139> Hmm, giving up trying to install an -rt kernel for now. nvidia bullshit :/
08:21:40 <_pruple> eee, #11282 appears to work as advertised (not that there was any doubt) 🙂
08:21:49 *** ufo-piloot has quit IRC (Quit: you click on fancy icons. i execute code !)
08:22:25 <_pruple> so good to be able to just check the airport layout direction instead of having to play 20 questions with the ID of surrounding tiles.
08:30:47 <truebrain> hmm .. there was one advantage of subversion over GitHub .. when the amount of people doing reviews of the more complex-looking PRs is low, with subversion progress remained (for better or for worse 😛 ). With GitHub it just halts 😄
08:30:56 <truebrain> what can we do to make it easier, I wonder ... hmm
08:46:46 <truebrain> it is a very old PR 🙂
08:56:43 <truebrain> the downside of having all these old-nobody-is-working-on-it PRs in the list, it is impossible to see if anything still actually needs attention 😛
09:05:12 <xplusc> xarothbrook: The weird part is that it was only the nlohmann-json library that was causing issues. *Maybe* MSVC C/C++ components had zlib, liblzma, libpng, etc. built in? Unlikely. I'll think about things I did during setup that might have been weird.
09:05:24 <truebrain> did you compile OpenTTD before?
09:05:27 <truebrain> or was this your first time?
09:06:31 <truebrain> very odd .. but also confirms I should make a PR in a bit .. pretty much done with the annoyance called nlohmann-json 😄
09:07:16 <truebrain> nah, nothing that drastic 🙂
09:07:24 <truebrain> just a PR I had ready but didn't want to PR yet, as it felt unneeded
09:07:37 <truebrain> first, found a clever way to make the crashlog-json every so slightly easier to review
09:15:44 <truebrain> the amount of full recompiles you do in a month when working on OpenTTD as developer are a bit insane 😛
09:22:38 <truebrain> peter1139: that is what I had in mind ^^ 🙂
09:23:13 <truebrain> similar in size as `fmt` and `catch2`, which we deal with the same .. so yeah
09:25:00 <truebrain> ugh, preview ofc fails, as it uses the workflow from master .. why do we keep forgetting that shit 😄
09:27:29 <truebrain> fmt is 13k, catch2 is 18k
09:27:53 <truebrain> so it is a bit heavier than the rest, but otherwise nothing really unusual for us to do
09:29:13 <truebrain> oof, that blue header is a bit odd LordAro
09:29:24 <truebrain> as in, text is hard to read
09:30:37 <truebrain> also editing a language entry is ... weird
09:31:13 <truebrain> I should write that in the PR 😛
09:32:06 <peter1139> We always do this...
09:32:25 <peter1139> But yes, looks like there's more work needed on the BS 5 migration.
09:37:22 <truebrain> I correct my mistake! 😛
09:38:11 <truebrain> grrr, I can't stand I can't hide a widget from a window without the window moving its location 😛 I want to know what is causing that ...
09:39:15 <truebrain> owh, crap, forgot to update all the includes .. and ofc it still compiles locally, as I have nlohmann installed system-wide .. lolz .. "oops" 😄
09:41:53 <truebrain> truebrain: it only jumps when it is shown, not when it is hidden .. well, that is at least a clue ..
09:42:29 <truebrain> ah, no, the height gets smaller when it is hidden
09:42:45 <truebrain> seems the height is changed to something that fits a full line
09:49:05 <truebrain> okay, so the trick is to make sure that the part that is being hidden is a multiply of a lineheight
09:59:30 <alfagamma7> truebrain: What UI is this for
10:01:06 <truebrain> alfagamma7: our translator tool
10:05:08 <locosage> thing with savegame size is that it's pretty much all trees xD
10:05:26 <locosage> unless you have huge networks with thousands of vehicles everything else compresses to nothing with lzma just fine
10:07:06 <locosage> even that single bit of randomness left in #11263 has a significant impact
10:07:43 <truebrain> peter1139: is there an easy way to make sure a panel is always in a multiplier of FONT_HEIGHT_MONO ? 🙂
10:07:48 <truebrain> (the height, that is)
10:08:32 <truebrain> I tried setting `resize->height`... that didn't end well 😛
10:15:29 <peter1139> That makes it resizeable as well.
10:15:42 <truebrain> ah, hmm, yeah, that makes sense
10:16:02 <peter1139> I guess I should take a look at this PR to see what the issue is.
10:16:37 <peter1139> But I'm out tonight. Hmm.
10:16:39 <truebrain> well, currently I am more looking for some pointers how I can enforce the height of a panel .. but UpdateWidgetSize is not even called on the panel, so I am banging my head against that 😛
10:17:03 <peter1139> UpdateWidgetSize is called for all widgets.
10:17:21 <peter1139> IF they have an index.
10:17:27 <truebrain> turns out, not if there is something inside that widget 😦
10:18:04 <truebrain> WWT_PANEL without anything in it: gets called
10:18:11 <truebrain> WWT_PANEL with WWT_DROPDOWN in it, not called
10:18:19 <truebrain> so that explain why I couldn't get that to work 😛
10:19:11 <pickpacket> watched a yt video with someone who'd built so much industries in Cities: Skylines that it caused traffic jams everywhere. Suddenly the game becomes a transport tycoon simulator
10:19:37 <peter1139> Ah yes, in that case you need to adjust the layout inside. But needing this to be a specific size seems to be solving the wrong part of an XY problem.
10:19:54 <truebrain> the thing is .. the window fits exactly N lines
10:20:09 <truebrain> so when I hide an element that is not on the exact pixel of a line
10:20:20 <truebrain> the window starts to change its height to ensure it does fit exactly N lines again
10:20:29 <truebrain> this causes a small reduction (always reduction) in height of the window
10:20:37 <truebrain> so when I switch back and forth between having the element visible and not
10:20:43 <truebrain> the window slowly gets smaller and smaller
10:20:52 <truebrain> which totally makes sense, ofc, you want full lines to fit in the window
10:21:08 <LordAro> truebrain: it's very much still in the "make it work" phase
10:21:17 <peter1139> Have you called ResizeWindow(this, 0, delta, false)?
10:21:33 <truebrain> I do not call such function, no; should I?
10:21:38 <peter1139> Not sure if that is right or wrong, tbh.
10:21:45 <peter1139> But we have other windows that resize themselves using that.
10:22:21 <truebrain> how ever you resize, mathematical, you have to make the window smaller if the element you are hiding is not exactly a multiplier of a lineheight
10:22:26 <truebrain> if you want an exact line to fit
10:23:44 <truebrain> so the most obvious thing to me is to make the thing I am hiding a multiplier of the font height, and then indeed it works. But I have a hard time doing that while the widget also has padding 😄
10:28:28 <peter1139> Okay, does this hiding exist in the preview branch, and how do you trigger it?
10:28:41 <truebrain> It is not in there, no; I have a local patch
10:28:50 <truebrain> can you change padding after-the-fact?
10:28:56 <truebrain> as in, overrule SetPIP?
10:29:37 <truebrain> it is a `const` in UpdateWidgetSize 😦
10:30:08 <peter1139> No, basically ReInit() is the way to reflow a window when you want things to resize.
10:30:22 <truebrain> yeah, but basically the padding is a non-const
10:30:22 <peter1139> (Beyond resizeable widgets)
10:30:25 <truebrain> which might be a bit unusual
10:32:02 <truebrain> the other option would be to resize the window manually when it is hidden and when it is shown, but that is also rather annoyingly pixel-perfect work .. hmmmmmm
10:32:06 <truebrain> what else can I do to fake this ..
10:33:07 <truebrain> there is `SetPadding` .. is that worth anything? Hmm
10:33:20 <peter1139> All this stuff is for initial initializing.
10:33:31 <truebrain> so before ReInit, right?
10:33:44 <peter1139> Can you describe the behaviour you are seeing?
10:33:55 <peter1139> (As I can't see it myself)
10:34:11 <truebrain> Like I said before .. the window always fits an exact line
10:34:19 <truebrain> the ToC is not the height of an exact line
10:34:25 <truebrain> so if you hide it, the window gets a bit smaller
10:34:30 <truebrain> which makes total sense
10:34:36 <truebrain> but then if you show it ... it gets also a bit smaller
10:34:39 <truebrain> as it doesn't align
10:37:01 <_glx_> xplusc: JSON is the only required lib, if other are missing they don't prevent cmake to pass, but you won't be able to open most savegames
10:42:07 <truebrain> okay, `SetPadding` seems to do the trick, to cheese my way through this 😄
10:43:35 <peter1139> Hmm, yeah, xplusc's steps don't mention using vcpkg to install the dependencies.
10:44:33 <peter1139> Oh, yes it does, briefly.
10:45:51 <truebrain> that moment you calculate all the pixels exactly, and it still doesn't work 😛 Lol 🙂
10:46:13 <truebrain> ah .. height is 27 ...
10:46:19 <truebrain> I was doing equal top/bottom padding ..
10:46:39 <_glx_> I remember some widgets height being defined by number of lines
10:46:58 <truebrain> that only works for leafs, basically
10:51:32 <truebrain> peter1139: and sorry for being not more helpful in showing you what I am doing, but I am trying to understand how the system works rather than being told what to do to fix it 🙂
10:53:28 <peter1139> You have described the behaviour in a programmer-centric way, starting with some other rule that isn't part of the behaviour ;)
10:53:51 <truebrain> I don't follow, sorry 😦
10:54:01 <truebrain> how is what I say not part of the behaviour?
10:55:16 *** ufo-piloot has joined #openttd
10:56:04 <truebrain> the behaviour is: the window always shows an exact line. Never a partial (height-wise), always a full line is visible
10:56:06 <peter1139> I mean "what happens?" -> "when i do <something>, window does <something>", you've done "because of this rule, and this other condition, this happens when i do something"
10:56:26 <truebrain> yeah, but we have to start with the behaviour of the window here 🙂
10:57:04 <truebrain> then I continue with: when I hide the ToC, the window gets a bit smaller (as to still fit a full line exactly in view)
10:57:23 <truebrain> when I then show the ToC again, it gets even smaller, to again fit a full line exactly
10:57:35 <truebrain> so the window gets smaller, and smaller, and smaller, when I toggle the ToC
10:58:17 <peter1139> Okay, that last line... that's the complete behaviour.
10:58:51 <peter1139> All the rest is conditions which are probably important in the code, but not for describing the behaviour :)
10:58:56 <truebrain> I already mentioned that earlier, but that is okay 🙂
10:59:03 <truebrain> as long as we are at the same place now 😄
10:59:22 <truebrain> btw, in reality, it is slightly more complex. The window is set to be centered in the screen, so the top also changes location
10:59:28 <truebrain> but this is an after-effect of the height changing
10:59:30 <truebrain> so not all that relevant
10:59:50 <peter1139> That's because it's centred, if you move it it's no longer centred so that doesn't happen. But yes, irrelevant.
11:02:26 <truebrain> hmm ... for some reason, my idea of just using the padding to make the element in the height of a line, doesn't work .. meh .. it does when I just slap a panel of that height on it .. hmm
11:06:42 <peter1139> _glx_, all our other 3rdparty includes start with #include "3rdparty"
11:07:19 <peter1139> Huh. Not all. Never mind.
11:14:36 <truebrain> bah .. why doesn't this work .. so the whole widget measures 28 pixels .. so I add 6 pixels of padding on top, and 6 on bottom
11:14:45 <truebrain> that should bring it to 40 pixels .. and the font is 20 pixels exact
11:14:52 <truebrain> so .. hmm .. something else I am missing ...
11:17:00 <peter1139> Yeah, font sizes ;)
11:17:15 <truebrain> the font is 20 pixels, it says in UpdateWidgetSize
11:18:36 <peter1139> Does `SetMinimalTextLines(2, 0, FS_MONO)` do anything to the panel...
11:19:11 <peter1139> Not sure if it's the bread's fault or the toaster's fault, but this doesn't fit :/
11:20:21 <truebrain> does absolutely nothing 😦
11:21:02 <truebrain> still trying to understand how the system actually works, and something I get these weird results from something I thought I was doing good 😄
11:22:31 <truebrain> so I thought: let's add a WWT_PANEL left of the dropdown, which we set a height
11:22:41 <truebrain> but now most of the window is gone 😄
11:22:53 <peter1139> It'll probably still do it even if you make a widget that is exactly a multiple of FONT_HEIGHT_MONO.
11:23:22 <truebrain> when I make it a single panel with FONT_HEIGHT_MONO, it does exactly what I expect it to do
11:23:43 <peter1139> Alternative: Make the text pixel-scrollable instead of line scrollable. Then it doesn't have to fit into FONT_HEIGHT_MONO chunks.
11:24:00 <truebrain> that is another solution, yeah
11:24:30 <truebrain> but complicates a lot of other code a bit more, I am afraid
11:24:38 <truebrain> a lot of this assumes a line starts at an exact place
11:24:42 <truebrain> (for click handling etc)
11:26:21 <truebrain> owh, I forgot an EndContainer .. that is why everything went missing
11:26:40 <truebrain> it doesn't tell you when EndContainer isn't balanced 🙂
11:27:09 <truebrain> okay, by adding a fake panel for the height, it works lovely with your suggestion
11:27:51 <peter1139> Phew, I've been slightly helpful!
11:28:23 <truebrain> hmm .. given a HORIZONTAL box, with 2 things in there. One of height 40, one of height 28 .. can I center the second?
11:28:34 <truebrain> now it also gets stretched
11:30:47 <peter1139> I think you may need an NWID_SPACER above and below with SetFill(0, 1)
11:31:06 <peter1139> Widget system likes explicitness...
11:31:24 <truebrain> alsowly getting there
11:31:32 <peter1139> Btw, I did start on that patch to move where padding is calculated... it's somewhere.
11:31:34 *** ufo-piloot has quit IRC (Quit: you click on fancy icons. i execute code !)
11:33:36 <peter1139> Panel (no padding) { horizontal box { spacer (minimal height), vertical box { spacer (setfill 0, 1), dropdown, spacer (setfill 0, 1) }, spacer (minimal height) }
11:33:51 <peter1139> (Two horizontal spacers to balance it out)
11:34:37 <peter1139> I failed to close that widget layout :D
11:34:39 <truebrain> something like that, yes; as it needs to be resizable, it is a tiny bit more involved, but yes 😛
11:35:12 <peter1139> setresize(1, 0) on the dropdown
11:35:39 <truebrain> but, although appreciated, you are doing exactly what I was hoping to avoid 😄 🙂 Luckily, I already had very similar code 😉
11:36:01 <truebrain> peter1139: `NWidget(NWID_SPACER), SetFill(1, 1), SetResize(1, 0),` is needed too, it seems
11:36:13 <truebrain> for above and below the dropdown
11:37:44 <truebrain> okay, this actually seems to work 😮
11:38:06 <peter1139> You don't want the spacers to resize horizontally though.
11:38:17 <truebrain> if I don't, the layout goes all weird
11:38:24 <peter1139> Oh, duh, the ones above & below, not left & right. Sorry.
11:38:36 <truebrain> and I only need one left, not right
11:38:40 <peter1139> SetFill(1, 1) definitely, anyway.
11:39:02 <peter1139> Meh, some of these things are "why isn't that the default", then I remember there are places where it can't be...
11:39:06 <truebrain> tnx peter1139 🙂 I think I understand it now ever so slightly more .. it is so hard to actually get how our system works 😛
11:39:57 <peter1139> And you don't need an UpdateWidgetSize()!
11:40:03 <peter1139> (At least, not for that lot)
11:40:18 <truebrain> so no more manual calculating \o/
11:42:18 <truebrain> I am actually pretty proud of the result 😄
11:42:41 <truebrain> yes, the padding is a bit on the low side, but .. that versus constantly showing it, I take it 🙂
11:43:16 <truebrain> this bug still exists, where the text of the line above shines through 😛
11:43:26 <truebrain> but that already exists 🙂
11:43:53 <truebrain> similar at the bottom line .. things like `p` aren't really showing as `p` 😄
11:44:33 <truebrain> pretty sure it has more to do with the font than anything else
11:46:28 <peter1139> Try with truefont again :)
11:46:48 <peter1139> I've mentioned before that OpenGFX is bad with font sprite alignment.
11:48:05 <truebrain> yup; with a decent font, no issues 🙂
11:50:02 <truebrain> so that should resolve the comment from LordAro and niels (talking about the help-window) 🙂
11:51:34 <peter1139> truebrain, btw there is #include <squirrel.h> which got me
11:51:47 <truebrain> lol ... we so have to clean up our include mess 😛
11:51:53 <truebrain> we include too much, in general
11:52:03 <truebrain> and we are not consistent with ... anything 😛
11:53:09 <peter1139> I think being explicit with #include "3rdparty/..." is correct, one point of vendoring them is to make sure it's the right version.
11:53:29 <peter1139> And as you found, not actually including a system version by mistake :D
11:53:37 <truebrain> now it is unlikely someone has another version of Squirrel installed, but still
11:53:54 <_glx_> VS could have helped to clean includes but they removed the feature until maybe next minor version
11:54:32 <truebrain> we are absolutely horrible at minimizing includes in header-files
11:54:36 <truebrain> we just drag in whatever we want 😛
11:55:29 <peter1139> LordAro, do I attempt a 250km ride in 10 days, or go via train...?
11:56:07 <peter1139> If you start with a rule of "no includes from includes" where does that leave us? Probably about 100 lines of includes per source file...
11:56:51 <truebrain> you can have includes in includes, as far as I am concerned
11:56:54 <truebrain> but only the ones you actually use 😛
11:57:32 <truebrain> now you often see that an include is done, which includes something else, which was needed in that header file
11:57:39 <_glx_> Else you need to order the includes
11:57:40 <truebrain> so just by accident the right things got dragged in 😄
11:58:13 <truebrain> ah, the squirrel include is because it is a weird path, for squirrel includes
11:59:05 <truebrain> `#include "../3rdparty/squirrel/include/squirrel.h"`
12:00:46 <truebrain> and the library itself also uses `<>` .. so I guess we just inject our system include path to it, which also means any local install won't work, as it will pick up our version first
12:00:49 <truebrain> but I agree, it is weird
12:01:26 <truebrain> anyway, about includes, we once, years and years ago, wrote a script which "shakes" include-files
12:01:35 <truebrain> (it just removes an include, sees if things still compile, repeat)
12:01:51 <truebrain> it started with the header-files
12:01:54 <truebrain> then the source-files
12:03:00 <truebrain> jfs: seeing as you are online, I solved the ToC issue; it now only shows when it needs to 🙂 Much better, visually
12:03:09 <truebrain> curious if you agree; it is your child after all 🙂
12:03:45 <peter1139> Wasn't there a TOC for the changelog before?
12:04:26 <peter1139> It would be nice if the TOC could exclude the hashes.
12:04:44 <peter1139> (But still indent the ToC)
12:05:53 <truebrain> there was not; I did consider making one
12:06:28 <peter1139> Possibly because it's a .txt
12:06:38 <truebrain> yeah, kinda. It has its own loader
12:06:41 <truebrain> and I forgot about that
12:06:45 <truebrain> good call peter1139!
12:07:26 <peter1139> Could just make it .md :D
12:07:37 <truebrain> would remove the stupid `--------` shit 😛
12:07:48 <truebrain> but, I can bikeshed this PR for a few more months, honestly
12:08:12 <truebrain> there are weird things in our readme, that could addressing
12:08:14 <peter1139> Well, that sort of change would be for another time, tbh.
12:08:21 <truebrain> in general the way of talking could be improved
12:08:28 <truebrain> but yeah .. let's just finish up this PR
12:08:38 <truebrain> more important to have it, than to have it EVEN MORE perfect 😄
12:08:55 <peter1139> The readme.md has some URLs in it, they aren't navigable though.
12:09:14 <peter1139> Section 1.4.1, links to Open*
12:09:28 <truebrain> yeah, also examples of "we could do better there"
12:09:35 <truebrain> but that can all be done post 7786 🙂
12:09:46 <peter1139> Right, they are literally not links in the MD. Sorry!
12:10:04 <truebrain> and we are not going to regex any https:// in the markdown 😛
12:10:11 <truebrain> I did consider it for the .txt files
12:10:18 <truebrain> but we now disabled all linking in those files
12:10:29 <truebrain> as ... user content 😛
12:10:39 <truebrain> (I meant things like READMEs from NewGRFs etc)
12:11:12 <peter1139> Can content download provide .md files?
12:11:28 <truebrain> most likely we will enable it after this PR
12:11:42 <truebrain> it is why this PR doesn't allow any navigation from .md files that are not trusted (Read: our documents only)
12:13:38 <peter1139> Hmm, our Markdown parser doesn't combine multiple blank lines into 1.
12:13:52 <peter1139> (Not very important, just noting)
12:14:04 <truebrain> it really only picks up headers (which it doesn't modify) and links (which it does modify)
12:14:41 <peter1139> There is also the thought... why is it in monospace anyway?
12:14:51 <truebrain> it already was, I guess
12:15:00 <truebrain> another thought .. why is wrap-text not enabled for NewGRF licenses etc
12:15:09 <truebrain> why would you ever want to read it in non-wrap-text
12:15:25 <truebrain> currently also ` is not supported
12:15:28 <truebrain> which might be nice to have
12:15:38 <truebrain> this PR opens up so many of these questions and thought 🙂
12:16:25 <truebrain> for example, when you start a new version of the game for the first time, should we now tell you: welcome to 14.0, click here to see the changelog? 😄
12:17:49 <truebrain> anyway .. what shall we do with this PR .. I can approve it, but I wrote a few bits and pieces myself .. but asking someone else to review it, there aren't many of us that active in the last few weeks ..
12:18:14 <LordAro> protip, don't try to install your OS onto the usb HDD that contains the image
12:18:34 <truebrain> lol ... there is a story there, but do I want to know @ LordAro 😛
12:19:33 <LordAro> i have a fancy device that can present as an iso of my choice, and/or the underlying drive
12:19:46 <LordAro> i apparently did not select the correct drive when installing the OS
12:20:09 <truebrain> hard to recover from?
12:20:40 <peter1139> Hmm, is there a tool for X11 that accelerates the mouse wheel scroll?
12:22:05 <LordAro> not too bad, just requires reformatting the drive and recopying all the ISOs
12:22:06 <peter1139> Why is jquery packaged in Debian...
12:29:01 <jfs> truebrain: I'm honestly only on by mobile (and at the time was out touristing and probably just went online to share a picture somewhere) so I can't really check in detail.
12:29:01 <jfs> But having the ToC only shown when there are actually items in it was probably on my mental "would have been nice to have" list
12:30:02 <truebrain> jfs: good! It is now a reality 😄
12:33:03 <truebrain> hmm .. would a GitHub Project help .. you can drag PRs there into columns .. would that give a bit of an overview what PRs are worth spending time on ..
12:36:42 <_glx_> ok #11291 is easy to trigger
12:37:05 <truebrain> does that mean you can also fix it? 😄
12:37:22 <_glx_> helps a lot when it's easy to reproduce
12:37:54 <_glx_> I just tried in nightly before starting VS
12:39:06 <_glx_> of course there's a VS update available
12:42:34 <_glx_> this window will need a huge rewrite to be as usable as bananas page 🙂
12:42:49 <truebrain> as with many of our windows 😛
12:42:59 <truebrain> just nobody to build it 😄
12:43:27 <truebrain> mostly the 2 minutes between changes, is really annoying me really quick 😄
12:43:59 <truebrain> so many PRs on our tracker that are ... "not a bad idea, but .. is this worth my time?" 😛
12:44:43 <_glx_> and again 543 files to compile
12:45:29 <truebrain> and I am really struggling with the shittyness of the GitHub UI here .. I don't actually care about drafts .. and I keep seeing them 😄
12:45:42 <_glx_> my checkout was at least 30 commits old
12:46:53 <peter1139> I must stop getting side-tracked.
12:46:55 <truebrain> no, it is the GitHub UI 😄
12:47:02 <truebrain> having the drafts is great
12:47:07 <truebrain> as it also shows others what they can work on etc
12:47:17 <truebrain> but to see "what needs attention" .. it is very annoying 😄
12:47:38 <_glx_> they have a different colour
12:47:46 <truebrain> yeah ... not really helping 🙂
12:48:53 <_glx_> what I'd like is CI result directly visible in notifications list
12:53:47 <truebrain> GitHub Projects intension was to have automatic transitions .. curious if that got ever done
12:57:09 <_glx_> ah no it's not the same crash
12:57:19 <truebrain> haha, talltyler , that was not my intention 😄
12:57:31 <truebrain> but yeah, pick your battles, this isn't as simple as adding the info 🙂 So I get it 🙂
12:57:35 <talltyler> I’ve been considering that for a while though
12:58:15 <talltyler> Picking my battles indeed, I need to focus on “things I want in the game” rather than “things I want people to stop complaining about”
12:58:41 <truebrain> that gives more motivation, yes 😄
12:58:43 <talltyler> I sound like andythenorth doing grf development based on Reddit comments (sorry Andy) 😛
12:59:36 <truebrain> kinda want to try GitHub Projects, but from what I have seen last, it adds noisy information to each ticket you add to a project .. that isn't actually useful 😛
13:00:05 <talltyler> NoDL might be a good test case, there are lots of PRs that go in that bucket
13:02:22 <truebrain> crashes either way 😄 Resolving either of the two is already an improvement
13:03:11 *** virtualrandomnumber has joined #openttd
13:03:25 *** virtualrandomnumber has quit IRC ()
13:05:41 <andythenorth> That town count request can be done in GS. Story page can count towns
13:06:03 <andythenorth> Not doing lolz, it’s a totally fine solution
13:06:09 <truebrain> lol .. "Q: I want to see in-game how many cities there are" - "A: just write a GS!"
13:06:18 <andythenorth> I have something like it in my GS
13:06:21 <truebrain> not sure those are the same type of users 😛
13:06:33 <talltyler> It really should be in the directory, but I don’t care enough to make it happen
13:07:02 <andythenorth> Not very different to grf though - around 2008 many users wanted vehicle editing in game
13:07:41 <truebrain> talltyler: I agree; it should be in there, just the "how" is the question .. and that requires a level of care 🙂
13:07:43 <andythenorth> We need an OpenAI API helper liv for OpenTTD
13:08:05 <andythenorth> Let GPT answer all this stuff in text chat
13:08:22 <andythenorth> “What’s my best vehicle?”
13:10:51 <truebrain> if anyone wants to voice an opinion on 7786, you have about an hour 😛
13:13:49 <squirejames> andythenorth: I am reminded of that Family Guy episode where Peter gets a sycophantic assistant at work and he manages to make their head explode through logical fallacies
13:13:51 <andythenorth> No just close it
13:14:18 <andythenorth> On my phone, no GH creds 😛
13:15:18 <peter1139> truebrain, last time I did that it resulted in... "Well"
13:15:34 <truebrain> peter1139: did what, sorry? 🙂
13:15:38 <_glx_> bytes math on a stringview, what could go wrong ?
13:15:41 <peter1139> Took over someone elses PR.
13:16:05 <truebrain> ah, yes, I understand. Hmm.
13:16:15 <truebrain> well, I start a new job Monday, so screw you all 😛 😄 🙂
13:16:16 <talltyler> I like 7786 but have no useful comments about it
13:16:38 <peter1139> Review the code, if you see nothing bad, write that :D
13:16:51 <talltyler> truebrain: Care to review 10700 before then? 😛
13:17:04 <truebrain> talltyler: Only if you care to review any of my PRs 🙂
13:17:08 <jfs> TrueBrainviaGitHub: And huge thank you for picking this up and finishing it, I don't think I could have done all of those finishing touches myself tbh
13:17:28 <truebrain> jfs: no worries; I am still amazed by the work you did, it looks really really good.
13:17:58 <truebrain> talltyler: pfff, 1 .. a small one even! 😛 😄
13:18:08 <truebrain> I will look at 10700 later today 🙂
13:18:49 <jfs> Random idea, maybe some of this can be reused for the storybook for GS to have more interactive pages
13:19:07 <truebrain> jfs: I like the idea! (as with many ideas that come out of your head)
13:19:39 <jfs> I think someone asked a while ago (maybe on the forums) if there was a way to have in-line links in storybook text
13:22:53 <andythenorth> I am using story pages as general purpose UI
13:23:05 <andythenorth> It’s quite a thing
13:23:50 <jfs> truebrain: I'm on the side of it being a way too complex area to just have some fixed rules in the base game, when those are somewhat set aside by newgrf items
13:24:21 <jfs> Controlling industry density and count is definitely already possible with GS
13:25:39 <jfs> But I am also starting to lean into the idea that allowing multiple GS at once might be the better long term solution
13:26:01 <andythenorth> Industry opening might be worth looking at one day, but I would just close 10314
13:26:27 <truebrain> jfs: Thanks, that is what I needed 🙂
13:26:36 <truebrain> I think I worded it nicely 🙂
13:26:55 <jfs> However multiple GS at once can get messy under the "but what if they both try doing opposite things?" line of thought
13:26:57 <truebrain> jfs: I have been really toying with bringing "brains" into OpenTTD, where a brain controls a town, an industry, etc
13:27:03 <truebrain> but in WASM, not in GS 🙂
13:27:47 <andythenorth> Would it be a “truebrain”
13:27:55 <truebrain> there are a few rough places, but for Towns it is pretty decently possible to have a WASM script decide per town when to grow, where to grow, how to grow
13:28:23 <truebrain> (reason for WASM btw is speed)
13:28:44 <jfs> So if OpenTTD is to allow multiple GS I think it should probably be via some manifest system where a GS can only control eg industry settings if it has declared that it wants to.
13:28:44 <jfs> And the user can only load a non-overlapping set of GS then.
13:29:22 <truebrain> jfs: this has been written down before 🙂
13:29:42 <jfs> That might be the better long term thing yeah... Deprecate GS entirely and maybe make "old GS" basically a plug in or wrapper under a new system
13:29:57 <truebrain> I can never find back where, but frosch wrote a lot for that
13:30:14 <andythenorth> frosch has wiki pages
13:30:45 <andythenorth> I can look when I’m back later if we want (am out right now)
13:31:52 <truebrain> in other words, the idea itself isn't novel, but the issue here is the amount of time it takes to actually implement 😄
13:32:00 <truebrain> it is hard to start with something small
13:32:24 <andythenorth> Multiple GS would be lol if they can all write to squirrel root table
13:32:52 <andythenorth> Sorry, not helpful, just amuses me 🙂
13:33:04 <jfs> Multiple GS would be like AIs in that are completely isolated
13:33:46 <andythenorth> I suspect either GS never changes, or it gets replaced entirely 🙂
13:34:06 <truebrain> when we say "multiple GS" we mean that each town / industry / whatever becomes its own agent
13:34:22 <jfs> No that's not what I mean, in this
13:35:09 <truebrain> sorry: "in the documents I wrote with frosch ... " should be prefixed there 😄
13:35:53 <jfs> (and even if each individual world entity has its own "brain" you still need a "director" or "game master" that controls the big picture)
13:36:07 <truebrain> the next question becomes "regions" 🙂
13:37:11 <andythenorth> jfs: I tried regions in GS
13:37:33 <truebrain> really, I have too many drafts about stuff .. and too little time to do anything with it 😄
13:38:17 <andythenorth> I think it’s the most interesting area of the game…but eh 🙂
13:38:26 <andythenorth> It’s no small thing
13:39:49 <_glx_> ok even entering japanese in console from main menu triggers the assert
13:40:46 <talltyler> Auto merge still makes me jump 🙂
13:40:56 <_glx_> and I can't use breakpoints to follow events as IME is closed when they are reached
13:51:39 <truebrain> funny to read we share our view here talltyler 😄
13:54:53 <talltyler> I was busy on Saturday so I missed your entire thought process while designing this 🙂
13:55:06 <talltyler> Too much scroll back to pay attention when I got home
13:55:20 <truebrain> well, I didn't design it; locosage did. But I went through the emotions you are going through 🙂
13:55:46 <truebrain> which is nice to hear/read, that we both think it should not work like this 😛
13:57:29 <locosage> I designed 11274/11283, as a separate change 11281 is questionable in my opinion :p
13:58:56 <truebrain> hmm .. time to merge help menu!
13:59:11 <andythenorth> maybe it was a gist, or we hallucinated it
13:59:19 <truebrain> I already linked it
13:59:32 <truebrain> owh, CodeQL still isn't done
14:00:05 <alfagamma7> The archive is not publicly available
14:00:09 <andythenorth> truebrain: thanks
14:03:40 <alfagamma7> Do you mind if I use it for documentation?
14:03:54 <truebrain> If you agree with the license, go nuts!
14:13:41 <truebrain> will post a teaser about 7786 later today on Discord, when the nightly is out 🙂
14:19:12 <truebrain> hmm ... my cmake runs are getting slower and slower ... not actually sure what it is all doing here ...
14:20:56 <andythenorth> I suspect this is on the lines of asking "can we eat children?" but can we get rid of drive-in roadstops?
14:21:55 <truebrain> what did they ever do wrong to you?
14:24:12 <truebrain> although I could self-approve, I would appreciate a second opinion on my solution here 🙂
14:26:18 <andythenorth> truebrain: they impose a design on RV grfs
14:26:24 <andythenorth> although possibly that is false
14:26:54 <truebrain> you still have to draw 8 directions
14:26:58 <andythenorth> or the problem is using RL not gameplay as a guide
14:27:27 <truebrain> even in RL those stops exist
14:27:35 <truebrain> but I might be missing something here 🙂
14:27:55 <andythenorth> no let's test my stupid rationale, because it must be wrong
14:28:11 <andythenorth> - articulated vehicles can't use drive-in stops
14:28:21 <_glx_> they don't impose anything, the only limitation is this one
14:28:26 <andythenorth> - therefore articulated vehicles should get a buff (gameplay advantage)
14:28:45 <andythenorth> - therefore because articulated vehicles are OP, non-articulated vehicles need a balancing buff
14:28:45 <_glx_> and now the player gets a nice error message
14:29:05 <truebrain> you lost me on the second point
14:29:22 <truebrain> "should get" => "have"?
14:29:29 <truebrain> still makes no sense 😛
14:29:55 <_pruple> "not being able to use drive-in stops" is not [necessarily] a disadvantage
14:29:57 <andythenorth> if a vehicle type can only use 50% of the stops, the player should get a reward for choosing it
14:30:09 <truebrain> that conclusion is wild 😛
14:30:11 <andythenorth> because "balancing"
14:30:21 <_pruple> but that all brings us back to "why does anything that isn't the best thing exist at all [in openttd]"?
14:30:37 <_pruple> because it's fun to watch little vehicles driving around doing little vehicle things
14:30:48 <andythenorth> which is why Horse is totally unbalanced
14:31:19 <andythenorth> because it's just pixel trains
14:31:30 <truebrain> drive-throughs are OP anyway against drive-ins
14:31:42 <truebrain> (if you talk about balancing)
14:31:55 <truebrain> so you are fucked anyway
14:31:57 <andythenorth> unless you already built drive-in everywhere because you don't understand the difference
14:32:12 <andythenorth> then you're like 'no give me a narrative reason for this awkward gameplay'
14:32:34 <andythenorth> I don't have a conclusion btw, I'm totally confused, and I'm about to design 2 RV grfs
14:33:15 <truebrain> well, let's say, we are not going to remove drive-ins because you can't see a way to balance your RV GRF against it 😛
14:34:48 <_jgr_> Removing them creates a fairly large save game compatibility problem
14:35:16 <_jgr_> Unless it's just a soft "remove", such wouldn't really be much of a saving
14:35:17 <truebrain> we are also not removing airplanes because they are unbalanced 😛
14:35:43 <andythenorth> airplaces aren't unbalanced 🙂
14:35:56 <andythenorth> they're simple, you just have planes and helicopters, and that's it
14:36:17 <andythenorth> _pruple: may disagree 😛
14:36:29 <_pruple> in the case of my trucks, they're sufficiently underpowered that short trucks get speed/acc boost, and the questionably beneficial ability to use drive-in stops, and the long trucks get a capacity boost.
14:36:29 <_pruple> the double/triple trucks are just the single trucks with an extra trailer, not much extra design work.
14:37:09 <truebrain> I love the pragmatic approach here 🙂
14:37:42 <_pruple> and it's "realistic" in a trucksim way, single trailer can reverse into a loading space, double can't.
14:37:57 <_pruple> because we all love realism in our pixel traintrucks
14:38:06 <truebrain> busses the size of houses
14:38:28 <_pruple> truebrain: that's solved by drawing bigger houses 😛
14:38:34 <andythenorth> all trucks could just be non-articulated
14:38:39 <andythenorth> this might be the solution
14:39:41 <andythenorth> Truebrain was mean about my Hog articulated sprites anyway 😄
14:39:57 <andythenorth> I think the exact phrase was "lol no that is just horrific sorry"
14:40:22 <truebrain> there are no smilies, so that is a lie
14:46:15 <peter1139> Hmm, so when I self-build the documents are missing of course...
14:46:31 <truebrain> I did consider to address that, but was like: meh, such a niche issue
14:46:47 <truebrain> regression copies some files to make the regression work .. we could do the same ..
14:47:07 <squirejames> I apparently did something to offend :/
14:47:19 <truebrain> do we need to slap someone?
14:48:00 <squirejames> I tried to thumbs up one of Pruples comments, it wouldn't let me. I even tried to on the one you reacted to, TrueBrain, still rejected my reaction
14:48:07 <squirejames> So, I would appear to be blocked :
14:48:39 <truebrain> some people are just more important on this Discord than others 😛 I am sure it is nothing personal
14:50:08 <talltyler> Sounds like a Discord issue, you don’t appear to have reactions blocked
14:50:43 <peter1139> truebrain, next trick, Ctrl-F to search in-game documentation ;-)
14:51:00 <_glx_> if I read correctly `p2` is always `p1`
14:51:01 <truebrain> I like how this one change made an explosion of new ideas 🙂
14:51:16 <truebrain> _glx_: my head hurts now. Not even a comment explaining what the intention is
14:51:35 <truebrain> pretty sure that p2 should have "to"
14:51:42 <truebrain> too much copy/paste kills again
14:52:46 <_glx_> anyway I'm stuck with the annoying crash
14:52:50 <squirejames> talltyler: I tested it on one of Andys comments. No issue. Just Pruples. Which again, implies a block. But, again "oh well". not the end of the world. Just puzzling.
14:53:39 <talltyler> If you were blocked by Pruple, I imagine you couldn’t see the post at all 🤷
14:54:02 <truebrain> does it go both directions?
14:54:06 <truebrain> I never tested Discord like that 😄
14:55:05 <talltyler> Why would I know how Discord’s community management tools work? I don’t need this information for anything… 😛
14:55:54 <talltyler> “It’s probably like Facebook from a decade ago, how could anyone implement a block feature in a different way?” 😛
14:56:29 <squirejames> Being blocked on Discord means they can see a "blocked message" prompt, and choose whether to see it, you aren't aware you're blocked
14:56:30 <squirejames> but if you try and interact with their posts, well, you can't.
14:56:48 <peter1139> Simple rule with suspecting you are blocked: don't fill the discussion channel about it because it was probably deliberate.
14:57:21 <squirejames> Which feels very different to "it probably wasn't person", Peter
14:57:34 <squirejames> and sorry but, being randomly blocked for no reason isn't really acceptable
14:57:49 <truebrain> lol, that is a weird thing to say 🙂
14:59:28 <talltyler> If it is indeed a block and not a technical glitch, then there’s probably a reason. But complaining about it here won’t help anything. 🤷
14:59:33 <truebrain> ffs, I am getting angry at templates and trying to put a function in a cpp file .. I did everything right .. ffs
14:59:49 <truebrain> (clearly I didn't, as the compiler bitches, but still)
14:59:53 <squirejames> talltyler: I did say "oh well, not the end of the world, just puzzling"
15:00:25 <squirejames> but being told that its verboten, because it was "probably deliberate" so I should apparently not mention it, because how dare I, its hitting different, you know?
15:01:13 <peter1139> The great thing about IRC is you can actually block people, and not be constantly reminded that you blocked them.
15:01:14 <squirejames> I mean sure, i'll just randomly block people then tell them to be quiet if they ask why 🤷♂️
15:03:45 <truebrain> makes you wonder if the tenary operator is actually worth it
15:04:12 <_glx_> layout stuff can be expensive 🙂
15:04:36 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
15:05:31 <truebrain> I hate that the compiler is mean to me 😦
15:05:45 <peter1139> Urgh, OpenStreetMap not letting me route through a gate that that is passable by bike :/
15:07:16 <truebrain> I am trying to define a template function in a cpp file, but it is having none of it .. I saw an example of how to do it recently, where was it ...
15:08:32 <truebrain> I used the slightly wrong syntax .. it is `template`, not `template<>` ...
15:09:48 <LordAro> needs a bike: yes tag or whatever
15:10:14 <truebrain> I don't like your proactive attitude towards problems
15:10:22 <peter1139> I know but I want to route now for tonight... and I'm doing it via Komoot :D
15:11:00 <peter1139> When I did my exploring ride I got an earful for riding on a private road that leads to 2 or 3 houses. So I marked it as private.
15:11:34 <LordAro> can't really be private if it leads to more than one house
15:11:51 <LordAro> "yes, i'm going to visit <other house>"
15:12:49 <peter1139> So now, anything using OSM routing stops on the public road instead, which is 1km away.
15:13:19 <LordAro> i did something similar too
15:13:25 <LordAro> though that was very obviously a farm
15:13:39 <_jgr_> If they really wanted it to be private they ought to put a sign up
15:13:44 <peter1139> This was presumably a "farm" that had been expanded to multiple dwellings.
15:16:37 <truebrain> that way you know for sure the function isn't being generated in 20+ places, but just once 🙂
15:18:18 <peter1139> Does that work? Hmm...
15:18:34 <truebrain> ofc it does; if you use the right syntax 😛
15:18:40 <truebrain> I ran across it in the CargoActions
15:20:33 <peter1139> Hmm, so it's the instantiation at the bottom that is important.
15:20:40 <peter1139> I wonder what deleted code I can recover... :p
15:20:58 <peter1139> I remember trying something with templates and then deleting it because it didn't work... but don't know what.
15:21:10 <truebrain> normally you don't really want to do this, as you need to know all your users, which is a bit anti-templating
15:21:23 <truebrain> but in this case, we use it to deduplicate complex logic that requires separate instantiation
15:22:42 <truebrain> and the trick is `template `, not `template<> ` 😛
15:22:56 <truebrain> (the latter adds another overload, instead of implementing it 😄 )
15:23:46 <truebrain> `INSTANTIATE_NEWGRF_CLASS_METHODS` does it too, lol
15:23:57 <truebrain> but in a way that is more special
15:25:13 <truebrain> let's not reuse that black-magic 😄
15:26:12 <peter1139> No, I quite dislike that macro magic.
15:28:04 <truebrain> The other thing I considered was including a cpp from the other cpps
15:28:14 <truebrain> But that felt errorprune
15:32:31 <peter1139> "Includes a very steep uphill segment. You may need to push your bike."
15:33:01 <peter1139> 12% is not really... no.
15:33:22 *** ufo-piloot has joined #openttd
15:50:21 *** HerzogDeXtEr has joined #openttd
15:52:32 <truebrain> Did you mean to duplicate the if statement?
15:58:17 <_glx_> there's one for begin and one for end
16:00:01 <_glx_> in the flow used to reproduce the crash `from` is `markpos` and `to` is `markend` but the code is generic to work in all cases
16:00:45 <truebrain> Owh, wow, that variable naming is terrible for visual understanding 😄
16:05:37 <_glx_> btw I don't think #11291 is related
16:10:02 <_glx_> and I don't know how to reproduce it yet
16:11:24 <_jgr_> I don't have a definitive link between #11291 and that function
16:11:39 <_jgr_> The code referenced in #11291 looks wrong even in the absence of any crashes
16:17:54 <_glx_> first call is to get the required buffer size
16:20:44 <_glx_> seems the buffer is actually much bigger than needed
16:21:08 <peter1139> Hmm, are there any rules as to when a URL should be linked vs raw in our MD docs...
16:21:26 <peter1139> (Other than the obvious one for code blocks)
16:22:51 <_glx_> documentation for `ImmGetCompositionString` is not the best
16:26:26 <_jgr_> The return value is in bytes even when using the W variant which uses wchar_t
16:27:10 <_jgr_> The std::wstring use the number of byte values as number of wchar_t
16:27:38 <_jgr_> Also in Windows sizeof(wchar_t) is 2 so there's horrible UTF-16 surrogate nonsense
16:28:06 <_glx_> buffer size is double as what is actually needed, but not a big issue
16:33:06 <_glx_> I agree caret_bytes math looks wrong
16:35:03 <_glx_> but as buffer is much bigger than needed it should be fine
16:59:05 *** gelignite has joined #openttd
17:14:17 <LordAro> truebrain: so Harvester is a bit nuts
17:14:52 <LordAro> underneath it all it is itself a k8s cluster, using kubevirt or whatever to run the VMs
17:15:26 <LordAro> and they say to run containers on Harvester you should use 'Rancher', which can manage a k8s cluster for you
17:16:13 <LordAro> However it's not recommended to use the underlying k8s cluster for any of this, so you have to set up a brand new k8s cluster just to run Rancher, which you then use to set up the actual "production" k8s cluster on top of Harvester
17:16:50 <LordAro> leaving you with Baremetal > k8s > VMs > k8s > Rancher --> VMs > k8s
17:17:03 <LordAro> which surely is completely stupid
17:21:38 <andythenorth> I prefer Hungry Horse
17:22:03 <andythenorth> or even Berni Inn
17:31:00 <truebrain> LordAro: lol, that is close to insanity
17:31:04 <truebrain> Rancher itself is pretty good btw
17:31:53 <truebrain> hmm, since when is it part of SUSE? missed some news I guess 😛
17:32:04 <LordAro> truebrain: it seems to be useful when you have multiple existing clusters to manage?
17:32:16 <LordAro> in the "actual" cloud?
17:33:07 <truebrain> owh, Harvester is of the same product line
17:33:12 <truebrain> I know Rancher, k3s and longhorn
17:33:36 <truebrain> anyway, I still believe that if you have a problem you are solving with k8s, you have 2 problems 🙂
17:34:31 <LordAro> k3s seemed worth looking into a bit more though, seemed like a "lightweight" k8s
17:34:48 <truebrain> it is the only k8s variant I am willing to run myself 😛
17:34:56 <LordAro> but otherwise i think tomorrow i'll go back to the original idea of proxmox + truenas
17:34:56 <truebrain> it is somewhat better to understand 🙂
17:35:16 <truebrain> you can always give Nomad also a try; but you need at least 3 nodes
17:35:38 <LordAro> yeah, need to give that another read too
17:35:50 <LordAro> now that i better understand how all these buzzwordy things fit togeter
17:36:04 <truebrain> what a world it is to read yourself into, not? 🙂
17:37:28 <truebrain> right, what else was I going to do .... did the thingy for talltyler .. did the PRs ... hmm .. I think my list is empty. Scary.
17:39:57 <talltyler> #11225 needs a smarter reviewer than me... I can see that it works, but not if there's a better way to do it 🙂
17:40:05 <talltyler> (not my PR, but I was requested by the author to review it)
17:41:39 <truebrain> do you have a savegame that shows the issue?
17:42:36 <truebrain> as when I try what I think the bug is, it just works
17:43:00 <truebrain> 2 vehicles in the group, only the oil-one shows up
17:45:37 <truebrain> owh, something to do with shared order, okay, that wasn't all that clear .. the title mentioned it, but that was abou tit 😛
17:49:31 <talltyler> You need to group them
17:49:46 <truebrain> yeah, it is more that the description didn't mention shared orders
17:50:03 <talltyler> Of the bug or the issue? I thought I was pretty thorough in the issue but maybe I missed something...
17:50:42 <truebrain> I just overlooked it, that is all
17:51:10 <truebrain> there are way too many options and settings in that one little window 😄
17:53:47 <truebrain> yeah, I get the proposed solution, but that is kinda nasty
17:57:23 <truebrain> I think it would be better to extend CargoFilter to actually work on groups with more than one vehicle
18:00:44 <truebrain> the filtering is a bit of a weird code .. CDECL statements?
18:03:51 <truebrain> the "freight" is a bit weird .. if you can have only a single passenger on the vehicle, it isn't considered freight
18:03:57 <truebrain> guess it depends on your definition
18:05:39 <truebrain> okay .. so how are shared orders suppose to work .. if one in the group matches, match the whole group, I guess?
18:09:52 <andythenorth> hmm regions (unrelated to above)
18:10:08 <andythenorth> sometimes I want to prospect an industry in a region
18:10:11 <andythenorth> not the whole map
18:10:37 <andythenorth> GS could do it, but I'd have to add a button for every industry type
18:11:17 <andythenorth> FIRS could do it, by only building near 'survey camp' industries which would be free for the player to place
18:11:57 <andythenorth> lol I just invented a whole set of NPCs, basically a surveyor and a coal company and stuff
18:13:05 <andythenorth> "Bob from Kippax Coal says they've found a new coal seam. If you agree to service it they'll open a mine somewhere near Kippax, but they're keeping the exact location secret. Do you want the contract? You'll need to pay £1.2m up front for the transport rights"
18:14:10 <andythenorth> "Sandra from Elstree Aggregates has a new dredging platform. Would you like to transport their cargo until 2028?"
18:15:47 <kamnet> andythenorth: When you prospect, how about a little bulldozer to appear on the screen that randomly drives around until it finds the spot and then a little person to get out of the bulldozer and waddles to the spot and plant a flag and blows a horn? ;D
18:15:48 <andythenorth> "Ashington Quarry needs reliable service. They'll pay an annual bonus if service rating at your stations stays above 65%. But they're planning to double their output soon, so you'll have to provide enough vehicles to keep the rating up, or pay a penalty fee"
18:16:23 <andythenorth> kamnet: I believe most industrial prospecting is actually via hovercraft. Paging frosch123
18:16:34 <truebrain> talltyler: sorry, not what you asked for, but it is what you get 😛
18:16:47 <talltyler> Nah, that’s much more helpful
18:17:11 <truebrain> talltyler: please leave your opinion, which method you prefer 🙂
18:17:18 <truebrain> I am pretty sure neither are wrong
18:23:37 <truebrain> did not know `std::avdance` existed. That is pretty handy
18:39:08 <DorpsGek> - Update: Translations from eints (by translators)
18:42:08 <xplusc> _glx_: Ok I’ll have to verify if my build lets me open savegames then :P. If not I know how to add the libraries now.
18:48:12 *** Wormnest has joined #openttd
18:50:06 <andythenorth> I wonder how situational that is?
18:53:11 <talltyler> truebrain: So, remind me why only `ConvertDateToYMD()` was templated and not `ConvertYMDToDate()`? Is it because of the pointer parameter?
18:58:09 *** gelignite has quit IRC (Remote host closed the connection)
18:58:25 *** gelignite has joined #openttd
18:59:01 *** gelignite has quit IRC (Read error: Connection reset by peer)
18:59:09 <andythenorth> can I prevent non-articulated vehicles using drive-through stops?
19:03:18 <talltyler> If they encounter a drive-in stop first, they should use it
19:04:36 <truebrain> talltyler: They both are a template
19:05:03 <truebrain> Just one is currently in the header, the other in the source. You can move them both to source if you like
19:05:16 <andythenorth> are we *sure* drive-through stops are more efficient? 🙂
19:05:23 <andythenorth> they have 3 bays, drive-through only have 2
19:05:35 <andythenorth> seems like more vehicles can load per tile, with drive-in
19:05:51 <talltyler> Try it and find out 🙂
19:06:22 <truebrain> talltyler: Important to realise the template is on class level, not on function level btw
19:06:51 <andythenorth> talltyler: I'm not sure what my test criteria are yet
19:07:06 <andythenorth> is it throughput? or number of tiles used?
19:07:19 <truebrain> Templates in headers are automatically extended when used. In source files this is more difficult as well .. when that file is compiled, the users aren't known yet
19:07:21 <talltyler> But the problem is the `TimerGame<T>` type, no?
19:07:27 <truebrain> That is what these extra lines are for
19:08:15 <talltyler> I dunno, you said it was a problem in your review 🙂
19:08:24 <talltyler> I still don't quite understand why
19:08:50 <truebrain> A template in a header is resolved when being compiled in to an object file
19:09:11 <truebrain> So when 20 cpp files use them, there are 20 copies in object files
19:09:27 <truebrain> This is fine for inline and constexpr functions
19:09:37 <truebrain> But can, don't have to, be nasty for other functions
19:10:12 <truebrain> Also, the variables they needed don't need to be in the headerfile
19:11:25 <truebrain> now in the way it was written, it really shouldn't be a problem, but it was still nagging me that we had a whole function defined in a header file
19:11:36 <truebrain> so I remembered you could solve that, and move them where you would expect them
19:12:28 <truebrain> this is the main issue with templates btw .. they only exist when used ..
19:12:38 <truebrain> does that make sense?
19:13:47 <locosage> andythenorth: with how bad drive-in ones are you can probably pick any criteria you want
19:14:06 <truebrain> I guess a bit in general the rule of thumb is: if your function is large (say, 10+ lines), it shouldn't be in the header 🙂
19:14:17 <andythenorth> drive-in stops use less tiles per bay though?
19:14:22 <andythenorth> they have 3 vs 2?
19:14:36 <andythenorth> so more vehicles can wait?
19:14:42 <locosage> drive-through have 4 if used both ways
19:14:51 <andythenorth> drive through do this
19:15:09 <talltyler> You need a depot overflow
19:15:11 <locosage> yeah, but then they fill in again
19:15:26 <andythenorth> do overflow depots work for RVs? 😮
19:15:54 <Eddi|zuHause> probably only with forced depot order
19:16:06 <talltyler> Yes, place a drive-through station and a depot right next to each other, then have the first order be the depot
19:16:06 <locosage> I just do and not bother
19:16:34 <andythenorth> hmm point-to-point segregated road routes?
19:16:42 <andythenorth> same as trains, most efficient set up?
19:16:51 <talltyler> truebrain: Thanks, this is a good rule. I moved ConvertYMDToDate(), let's see if it compiles 🙂
19:17:08 <locosage> it's fastest to build, that's the only effeciency that matters with rvs xD
19:17:11 <truebrain> talltyler: mostly to keep the local variables out of the header, that sounds like the best thing to do
19:17:23 <locosage> it's not like you can make significant money with them
19:17:49 <locosage> oh, actually, no, there is also throughput thing with carousels
19:18:21 <locosage> yeah, but you can have that with 30 trains
19:18:37 <andythenorth> so meta is still trains?
19:18:49 <andythenorth> this is basically same as when I was doing Hog 1
19:18:56 <locosage> unless it's some weird setup
19:19:02 <andythenorth> coop irc was like 'yo, nobody uses RVs, don't bother'
19:19:35 <andythenorth> so what are RVs for?
19:19:49 <andythenorth> serious question, informs grf design
19:20:13 <truebrain> coop was: use trains, that is what we want
19:21:01 <truebrain> OpenTTD is a sandbox game; not everything is about making money .. as it is the least interesting aspect in the game
19:21:05 <Eddi|zuHause> i believe there was at least one RV oriented coop game
19:21:28 <truebrain> we could remove Money, and it still plays fine
19:21:32 <andythenorth> HEQS was quite popular with coop
19:21:36 <andythenorth> but HEQS is .... HEQS
19:21:38 <truebrain> (without joking, we could, and you would have very similar gameplay)
19:21:50 <talltyler> Overflow and dropoff station
19:21:55 <andythenorth> every day is a school day
19:21:57 <talltyler> It's a neat trick 🙂
19:23:21 <andythenorth> remove money, you say? 😛
19:24:17 <andythenorth> so my current puzzle:
19:24:17 <andythenorth> - if drive-in stops are worse
19:24:17 <andythenorth> - non-articulated vehicles need a buff to compensate
19:24:17 <andythenorth> - but they can also use drive-through stops, which makes them OP
19:24:29 <andythenorth> * so I need to buff articulated vehicles somehow to compensate
19:24:42 <andythenorth> something is wrong here, but I don't see the logical flaw
19:24:53 <truebrain> you say: A > B, and B > A
19:24:57 <truebrain> so maybe they are just equal
19:26:12 <andythenorth> trams are all equal
19:26:24 <andythenorth> they only use drive-through 🚊
19:26:44 <locosage> there are ways to play where money matters
19:26:52 <andythenorth> Hog 1 only has articulated trucks, except for mail trucks
19:26:56 <locosage> i.e. most citymania servers
19:27:04 <andythenorth> but Hog 1 isn't really used by players
19:27:18 <andythenorth> because it doesn't have vehicles for drive-in stops
19:27:31 <andythenorth> players need vehicles for drive-in stops because they're more tile efficient
19:28:00 <andythenorth> oof, sometimes I wish my brain worked 🙂
19:28:07 <andythenorth> it can draw pixels, but it can't see sense
19:28:50 <locosage> andythenorth: I mostly use rvs for this xD
19:28:55 <locosage> and very close transfers
19:33:00 <talltyler> Mostly teleportation exploits 😉
19:40:46 <talltyler> truebrain: I can't get seem to get the function header right in the cpp file, I've got:
19:40:46 <talltyler> /* static */ constexpr TimerGame<T>::Date TimerGame<T>::ConvertYMDToDate(Year year, Month month, Day day)
19:40:46 <talltyler> But it doesn't like the Date, either with or without the `TimerGame<T>::`
19:41:28 <truebrain> my commit worked; so copy/pasting that work doesn't work?
19:41:57 <talltyler> I cherry-picked your commit, it's fine. But the function you moved is a void, mine returns a Date
19:42:44 <truebrain> I will check a bit later; would need to see the compiler error etc 🙂
19:42:51 <michi_cc[d]> _glx_: There's a possible simpler solution for #11291
19:43:03 <talltyler> `syntax error: identifier 'Date'`
19:51:52 <andythenorth> Option A: Hog 2 cargo trucks are all non-articulated (players will ask for articulated vehicles, but can't have them)
19:51:52 <andythenorth> Option B: Hog 2 cargo trucks are all articulated (this is like Hog 1, and players ask for non-articulated vehicles so they can take advantage of drive-in stops)
19:51:52 <andythenorth> Option C: Hog 2 cargo trucks have both articulated and non-articulated, and there's an economic balance (I don't know what)
19:51:52 <andythenorth> Option D: do something else instead 😄
19:52:41 <talltyler> Option C, rigid trucks have half the capacity of articulated trucks?
19:53:01 <talltyler> But cost half as much
19:53:16 <talltyler> Go for the Horse model, where there's no incentive, just whatever the player feels like
19:53:34 <andythenorth> that's what I'm trying to do
19:53:45 <andythenorth> but the RV stop types make it hard
19:53:59 <andythenorth> drive-in stops are less efficient, but more efficient
19:54:16 <andythenorth> so balancing the vehicles for them is really puzzling
19:55:18 <talltyler> andythenorth: No idea what it means, but I'd say let the vehicles be the same and make players choose which type of efficiency suits their needs
19:55:31 <andythenorth> prima facie drive-in stops are better
19:55:41 <andythenorth> they have 3 bays where drive-through have 2
19:55:51 <andythenorth> moar is clearly better, our brains are made this way
19:56:07 <talltyler> Except vehicles can move in and out of drive-through stations faster
19:56:52 <talltyler> You should do some throughput tests before trying to Sherlock Holmes which one is "better" 😉
19:57:07 <andythenorth> I think I did for Horse 1
19:57:12 <andythenorth> which is why they're all articulated
19:57:36 <andythenorth> also why all the trams are max 16/8, it seemed to be efficient for some layouts and not block too much
19:57:43 <andythenorth> but there's no arguing with logic
19:57:53 <andythenorth> this is the same as PBS is actually slow, because it's red
19:58:14 <talltyler> Someone earlier mentioned that drive-in stations are better when vehicles are full-loading multiple destinations/cargos
19:58:22 <talltyler> Because they don't block each other
19:58:58 <talltyler> Throwing out an entire type of vehicles because "the other type is better" sounds silly
19:59:35 <andythenorth> which returns us to the start: Hog 2 should have vehicles for drive-in stops
19:59:48 <talltyler> Yes, it should have both
20:00:02 <talltyler> I see it similarly to ships of different sizes in Sam
20:00:16 <talltyler> Big ships are "best" but there's variety for fun
20:00:20 <andythenorth> well...nobody uses Sam, and the feedback is generally that it's stupid
20:00:27 <andythenorth> because all the ships have the same stats
20:00:39 <andythenorth> and they don't have different speeds or power or anything
20:01:08 <talltyler> I use Sam, and haven't seen anybody give feedback besides "people don't hate it stop being silly" 😛
20:01:20 <andythenorth> it's widely not recommended
20:01:26 <andythenorth> as in, other ship grfs are recommended, Sam is not
20:01:35 <andythenorth> whereas Horse is sometimes recommended
20:01:46 <andythenorth> net promoter score 😛
20:02:08 <andythenorth> like FIRS 3 is widely recommended
20:02:50 <talltyler> Well, the other ship GRF is SHARK, because it has passenger ships. Sam is not recommended alongside SHARK because SHARK already includes most of SAM (albeit I think it's an outdated version)
20:03:18 <andythenorth> I could drop the vehicle grf and draw ferries 🙂
20:03:42 <andythenorth> feels like RVs are just fail
20:04:06 <talltyler> andythenorth: That does seem to be the story you're telling yourself 🙂
20:04:31 <talltyler> I will refrain from being a broken record and suggesting Moose 😛
20:05:18 <andythenorth> RVs kind of got under my skin 🙂
20:05:26 <andythenorth> we know how to design a train grf now
20:05:38 <andythenorth> and the ship grf is ok, I probably just need to add ferries 😛
20:05:48 <andythenorth> although my design for ship variants seems to completely suck
20:06:02 <andythenorth> we know how to do planes and industries
20:06:14 <andythenorth> but nobody won RVs yet
20:08:01 <talltyler> Playing the real game 🙂
20:08:04 <andythenorth> whoever did station coverage in vanilla, thanks 🙂
20:10:40 <andythenorth> hmm what if loading speed varied by road stop type?
20:11:27 <andythenorth> the circle I'm trying to square currently is:
20:11:27 <andythenorth> - articulated vehicles need an advantage compared to non-articulated
20:11:27 <andythenorth> - non-articulated vehicles need an advantage compared to articulated
20:11:27 <andythenorth> maybe the problem could be moved elsewhere
20:12:05 <andythenorth> what if only drive-in stops could be built in towns?
20:12:12 <andythenorth> what if the road stop is limited by roadtype?
20:12:23 <andythenorth> so e.g. drive-through is only allowed on slow roads
20:13:13 <andythenorth> or to put it another way: why are trains allowed to use any station type? Why don't we limit some to terminus, and some to drive-through?
20:14:05 <andythenorth> what if some cargo types need terminus road stops?
20:17:00 <talltyler> What if you left those decisions to players?
20:17:24 <talltyler> I guarantee you'll get more complaints if you impose arbitrary restrictions than if you don't incentivize things
20:17:46 <andythenorth> yeah, that's what I'm trying for: no incentive
20:17:52 <truebrain> ```template <class T>
20:17:52 <truebrain> /* static */ const typename TimerGame<T>::Date TimerGame<T>::ConvertYMDToDate(Year year, Month month, Day day)```
20:17:58 <truebrain> ```template const TimerGame<struct Calendar>::Date TimerGame<struct Calendar>::ConvertYMDToDate(Year year, Month month, Day day);```
20:18:01 <truebrain> works fine talltyler
20:18:10 <andythenorth> Horse manages it, even with the stupid railtypes, like narrow gauge and metro and ELRL
20:18:16 <andythenorth> it's ultimately just eye candy choices
20:18:31 <andythenorth> there must be a way to achieve the same with RVs
20:23:01 <andythenorth> can I disable a grf if drive-in stops are in use?
20:30:11 <_jgr_> GRFs disabling themselves based on random things is in general not a good pattern to perpetuate
20:30:48 <andythenorth> Horse disables if inflation is on 🙂
20:35:05 <_glx_> but inflation is broken 🙂
20:35:33 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
20:38:54 <talltyler> truebrain: Why is it const now? Do we not need constexpr? (Did we ever need constexpr?)
20:39:06 <truebrain> how would a constexpr work in a cpp file?
20:39:58 <talltyler> I barely know what a constexpr is (I did read the link you sent me last month or so); I didn't know they don't work in cpp files 🙂
20:40:14 <talltyler> I know that it can be computed at compile time
20:40:15 <truebrain> a constexpr is: the compiler can reason over this function and reduce it to a single answer
20:40:35 <talltyler> Right, but I don't understand why it can't do that when it's in a cpp file
20:41:34 <truebrain> let me win this game, and I will explain a thing or two about compilation 🙂
20:42:13 <andythenorth> we're not going to do composable RVs, yes/no?
20:42:36 <_glx_> isn't it already possible ?
20:42:56 <andythenorth> some work was started years ago, but it stalled
20:43:33 <truebrain> talltyler: so as you notice when you compile, things are done 1 cpp file at the time
20:43:37 <_glx_> I can't really see differences between a truck and a wagon, they can both have a common part and different cargo
20:43:42 <truebrain> the compiler makes object files out of this; for each cpp, 1 object file
20:43:50 <truebrain> after all that, the linker will combine those objects, making it into an executable
20:43:57 <truebrain> this is the moment it resolves that all symbols exist etc etc
20:44:14 <truebrain> what inline and constexpr do, is tell the compiler: you should really try to embed this function into the code
20:44:28 <truebrain> but as compiling is done per object, it can only reason about this within a single cpp file; nothing behind that
20:44:36 <truebrain> this is also why templates etc have to be in header files
20:44:51 <truebrain> one cpp file knows ABSOLUTELY NOTHING about another cpp file, other than what is told by header files
20:45:07 <truebrain> also why we have things like 'extern blablabla', to tell a cpp file: trust us, when linking, this function / variable will exist
20:45:14 <truebrain> but it cannot look into that function, or do anything with it
20:45:39 <truebrain> so in this case, having a class member that is in a cpp file .. it cannot be a constexpr, or, if it could, nobody would be helped .. as nobody can look into that cpp file to know how to deal with it
20:45:58 <truebrain> this is how all compilers work btw; not just MSVC, gcc or clang .. just how C(++) works
20:46:19 <andythenorth> if RVs were composable, articulated vs non-articulated is no longer my problem 😛
20:46:23 <talltyler> Ah, but a bunch of cpp files can look into a header file, and take an inline or constexpr function, and import it into itself before being turned into an object?
20:46:38 <talltyler> Aha, that makes sense
20:46:41 <truebrain> a constexpr btw is a hint
20:46:46 <truebrain> a compiler MIGHT do cool things with it
20:46:54 <andythenorth> hmm but also we have the turning angle var for RVs in grf?
20:46:59 <truebrain> in C++20 we get a statement that FORCES the compiler to inline it
20:47:08 <truebrain> (constinit, I believe)
20:47:23 <talltyler> Okay, so then what's a const?
20:47:25 <_glx_> inline used to be a hint for C, but the meaning changed with C++
20:47:35 <truebrain> const is ... well .. it tells the developer the object cannot be changed
20:47:45 <truebrain> the compiler validates this
20:47:50 <truebrain> and it might use that information to do optimizations
20:48:11 <truebrain> there are a ton of these keywords in C++ that .. sometimes appear to do the same, but not really
20:48:22 <truebrain> "static const int a = 1" is very similar to "static constexpr int a = 1"
20:48:32 <truebrain> most compilers, if not all, will optimize the usage of "1" out everywhere
20:48:56 <_glx_> there's also const after the class function signature to tell it doesn't change members
20:48:59 <truebrain> but `static const std::string a = "abc"` and `static constexpr std::string a = "abc"` are already a bit more different
20:49:05 <truebrain> the first rarely does what you expect
20:49:17 <talltyler> Right, I get const variables, but the code you gave me makes a const function. Aren't functions already unchangable?
20:49:29 <truebrain> functions, yes, returnvalue no
20:49:34 <truebrain> in this case, `const` is completely redudant
20:49:49 <andythenorth> I could do non-articulated RVs, but check the curve var, and pre-compose 'turning sprites' so it looks like an articulated truck
20:49:50 <truebrain> as the return value is a POD; and making PODs `const` is .. well .. there are endless debates about that on the internet
20:50:00 <truebrain> (Date is just an `uint32_t`)
20:50:15 <talltyler> Got it, so I can ditch the const keyword then
20:50:20 <truebrain> so add it, remove it, nobody actually cares
20:50:26 <truebrain> but if you return `const Vehicle *` for example
20:50:35 <truebrain> you tell: here is a pointer to a Vehicle .. YOU CANNOT MODIFY THIS OBJECT
20:50:47 <_glx_> compiler will yell if you put a const where you should not 🙂
20:51:25 <truebrain> but `const int` as return value .. well .. yeah .. long debates, long long debates .. you give the intention with that, that the returning value should be considered "final" .. it is a nonsense discussion and splitting hairs
20:51:44 <truebrain> ```const int A() { return 1; }
20:51:51 <truebrain> the `a` here gets a copy of the value 1
20:52:08 <truebrain> so what good did adding `const` do here .. I dunno .. some people are very ... "make everything const that you can"
20:52:44 <truebrain> I only find `const` (as return value) useful if they are non-PODs; but okay .. in this case, `const` is "more correct", but it makes no difference
20:53:34 <truebrain> and yes, as _glx_ says, you can also add `const` after the class member, to tell it is not going to modify `this`. Only useful for non-statics, ofc
20:54:52 <truebrain> owh, and we do `static constexpr ..` for variables, but most people advise `inline constexpr ..` .. I have no clue how they actually differ 😛
20:56:34 <_glx_> truebrain: allows to do `obj->function()` on `const Type *obj`
20:57:09 <truebrain> yeah, but the reason you add `const` is because you make a promise
20:57:18 <truebrain> as a result, you can use the object as a constant too
20:57:38 <truebrain> it is a bit easier to understand, that you should add `const` after a class member when you don't modify anything inside `this`
20:57:45 <truebrain> when explaining to people 😛
20:57:48 <talltyler> Let's see if this works 🙂
20:58:14 <truebrain> _glx_: lol @ 11293 .. using lambdas like that .. you sneaky 😄
20:59:22 <talltyler> Thanks as always for the explanations, truebrain
20:59:43 <talltyler> You are the senior developer I want in my real job ❤️
21:01:18 <truebrain> haha, says more about your job, sadly 😛
21:05:18 <andythenorth> should articulated RVs have lower top speed? Because they're less safe?
21:05:38 <truebrain> hmm .. nlohmann gives warnings when compiling as release ... oh-oh?
21:05:44 <truebrain> `warning: writing 1 byte into a region of size 0`
21:06:51 <andythenorth> hmm also articulated RVs can't overtake
21:07:38 <xplusc> xplusc: Yup, their missing too, lol.
21:07:40 <_glx_> a warning for something that looks like a buffer overflow ?
21:08:28 <talltyler> andythenorth: They can in JGRPP, we could upstream that
21:08:45 <_glx_> xplusc: most likely a missing `VCPKG_TARGET_TRIPLET`
21:08:56 <truebrain> no, we had a vote, we said no. Way too dangerous, to have those big lorries do overtaking. What is a child is crossing the road?! It just can't be done.
21:10:06 <_glx_> as `CMAKE_TOOLCHAIN_FILE` should be filled correctly by VS if vcpkg is activated system wide
21:10:08 <andythenorth> your WASM town thing can build schools, then only allow slow roads near them
21:10:15 <andythenorth> finally a use for speed limits
21:11:33 <_glx_> though I set both in my CMakePresets.json
21:12:18 <truebrain> final bits and pieces on #10700 .. if anyone has a strong disagreement with the direction we are going for NoDL, please speak now 🙂
21:13:06 <andythenorth> how long do we have? 🙂
21:13:07 <_glx_> proper spilt feels less hacky than any other implementation of variable day length
21:13:33 <truebrain> _glx_: this is why I am a big fan of this approach; it is the first time I am like: this might actually work 🙂
21:14:15 <truebrain> there will be bumps in the road, there will be discussions, there will be opinions .. but .. yeah, I think it is a nice direction. But if you don't feel like that, please let us know ASAP 🙂
21:14:22 <andythenorth> is it even better than using the date cheat every 5 years?
21:14:55 <_glx_> as you noticed, the date cheat has side effects 🙂
21:15:56 <andythenorth> trying to find time-based puns right now though
21:16:04 <truebrain> it isn't the time for puns
21:16:13 <andythenorth> what about later?
21:16:52 <andythenorth> give me a minute to think about it
21:17:05 <truebrain> no time in the world is going to give you a better answer
21:17:17 <truebrain> at my hourly rate, you don't want that anyway
21:17:38 <andythenorth> this conversation is taking too long, can't it go faster?
21:17:41 <truebrain> time flies when you have a useless conversation
21:17:53 <truebrain> is anyone timing this?
21:18:00 <andythenorth> I've lost track of time
21:18:24 <truebrain> your comment is not only priceless, it is also timeless!
21:18:45 <andythenorth> ok, so FIRS might need adjusted for NoDL
21:18:59 <andythenorth> it has some gameplay features on '30 days' or '90 days'
21:19:07 <andythenorth> but they actually don't count calendar days
21:19:35 <andythenorth> currently it relies on callback loop being on a predictable number of calendar days
21:19:54 <andythenorth> old versions can just be deleted from Bananas, right? 😛
21:20:18 <truebrain> andy can be such a troll
21:21:02 <andythenorth> it's only funny because FIRS 3 is recommended over FIRS 4
21:21:39 <andythenorth> I am more than happy to update main FIRS for NoDL
21:22:35 <talltyler> andythenorth: Does it not? Some internal logic based on the every-256-ticks callback?
21:23:04 <andythenorth> or monthly cb, can't remember
21:24:39 <andythenorth> yeah supplies logic runs on 256 tick cb
21:26:17 <andythenorth> it also uses a fixed number of registers, so scaling it to NoDL isn't trivial
21:26:22 <andythenorth> which makes it more interesting TBH
21:26:44 <andythenorth> I suspect that the industry production logic could be moved to GS
21:27:26 <jfs> truebrain: I'm really on the edge about at one now, actually thought I had already closed it
21:30:35 <talltyler> andythenorth: I love fun comments in code
21:31:18 <xplusc> _glx_: This is in `cacheVariables`?
21:31:25 <andythenorth> talltyler: "all my wrongs"
21:31:52 <jfs> The original idea that spawned it was a thought about how the company rating scoring is difficult to get to max because of the fixed £10k profit/year requirement for all vehicles.
21:31:52 <jfs> So I wanted to try out a way to make vehicle "is efficient and worth its while" measured in a different way, at the assumption that that rating component is intended as a way to measure "company does not have any useless vehicles".
21:31:52 <jfs> But the only talk I've seen about the company ratings since then has been how they're overall useless and nobody ever looks at them.
21:32:13 <andythenorth> we do have group utilisation
21:32:35 <talltyler> We could at least replace the "minimum profit" goal that nobody seems to ever achieve, judging by how the "game over" screen was broken for years without anybody reporting it 😛
21:32:45 <truebrain> jfs: only in your first few runs you care about the company rating, yes 😛
21:32:47 <andythenorth> I won the high score once years ago
21:32:54 <andythenorth> then it seemed stupid
21:33:11 <andythenorth> the meta is daft, just replace all the vehicles in last year, and then delete any non-profitable
21:33:19 <jfs> And the big (other) issue is that even if you add in this "efficiency" measure it's rather opaque but will still take up a lot of space in the UI
21:33:42 <truebrain> what I like about efficiency, is that it tells me a bit about how my vehicle is actually doing, without having to micromanage it. And this is also my issue with the current PR: it only calculates it when vehicles deliver goods. But if it would tell me how efficient it was in bringing the goods towards the endgoal, I can see when things get stuck much easier .. instead of waiting on the "made no
21:33:52 <andythenorth> jfs: I liked the idea TBH, and still do. But it is another stat anxiety
21:34:16 <andythenorth> Should sandbox games be judging the player?
21:34:24 <andythenorth> what is ideal utilisation? 100%?
21:34:33 <xplusc> Nope, the other libaries are still not there. I'm gonna try another method.
21:34:49 <truebrain> so yeah, for your goal, I guess it could work for that, but I see that as a side-thing. For day-to-day play, I would use something like this a lot, more than the profit made 😛
21:35:01 <truebrain> this is because my trains never make a stable profit, per year .. the routes are always too long
21:35:01 <andythenorth> if ideal utilisation is 100%, I win by loading it, then stopping it?
21:35:09 <truebrain> so 1 or 2 years they make no money, then A LOT
21:35:18 <andythenorth> lifetime profit? 😛
21:35:29 <truebrain> so I am more interested in another form of knowing my trains are still going towards their goal 🙂
21:35:36 <andythenorth> profit per orders cycle?
21:35:42 <jfs> andythenorth: No, because it needs to make a delivery
21:36:03 <andythenorth> there's no rondje style cheat I can use?
21:36:11 <andythenorth> it will just annoy me if it's less than 100%
21:36:15 <andythenorth> like station ratings
21:36:21 <truebrain> it will be less than 100% 😛
21:36:32 <truebrain> having any vehicle doing 100% efficiency is .. weird
21:36:35 <talltyler> Freight trains will be less than 50%
21:36:39 <jfs> TrueBrainviaGitHub: Not signed in to gh so just answering here: settings are at least useful during development to tune things related to scoring
21:36:56 <talltyler> Passenger trains could hit 100% if there's more demand than capacity, I guess
21:37:01 <truebrain> yeah, but after that, we can drop the setting 🙂
21:37:04 <jfs> talltyler: Unless you can make them full both ways
21:37:18 <andythenorth> there's always loading time?
21:37:18 <andythenorth> so it's unwinnable?
21:37:24 <talltyler> Full both ways is a try-hard strategy
21:37:44 <truebrain> so I was thinking in the context of 7353, to make it slightly different, and monthly also check how much closer we are to the station we are going to, and already add that share to the stats
21:37:55 <truebrain> so trains that are in motion towards delivering, also get a higher efficiency
21:37:59 <andythenorth> grf prop to improve utilisation factor? 😛
21:38:14 <peter1139> hmm, i can't read all that scrollback
21:38:42 <jfs> Loading time in this patch only counts against the vehicle if it's "idle loading", ie not receiving cargo
21:38:49 <andythenorth> lol, what about relative utilisation? "This vehicle is better than **your** other vehicles"
21:39:01 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:39:40 <truebrain> jfs: yeah, I liked that approach. Efficiency only goes down when the train is not doing something. Stopped by a red light, not receiving cargo, etc etc
21:39:40 <talltyler> GitHub bot can't handle the chat either, we should've seen a "#10700 updated" post 3 minutes ago
21:39:57 <jfs> Since another very opinionated thing I wanted in this patch is to punish players spamming vehicles and having way too many for the actual production
21:40:01 <truebrain> talltyler: I did get the email 😉 Will do a final round of checks tomorrow, but it looks good
21:40:15 <talltyler> You get emails? That must be...exhausting 🙂
21:40:18 <andythenorth> value-adding work. vs. non-value-adding-work
21:40:33 <truebrain> I got .. 61 mails from GitHub today
21:40:45 <andythenorth> what's the target for utilisation?
21:40:54 <talltyler> That alone will make me think and make sure I've compiled, tested, committed, etc., before pushing 😛
21:42:42 <truebrain> how I look at the efficiency ... as we said many times here in the past, money in OpenTTD is kinda meaningless after the first year or so. So I like these other ways of measuring how "good" I am doing .. where to improve, etc
21:42:42 <jfs> andythenorth: The scoring target is 40% I think
21:43:02 <_glx_> for some unknown reason I stopped receiving github emails
21:43:02 <truebrain> andythenorth: some multiplayer servers have that, yes 🙂
21:43:28 <talltyler> After this gets merged, care to lend a hand with network changes? (multiplayer window says "years", we will need hours/minutes instead)
21:43:51 <talltyler> I can do GUI, but you previously volunteered to help with network packets and game-coordinator stuff
21:44:01 <andythenorth> might be nice to do relative utilisation compared to the rest of the playerbase
21:44:06 <andythenorth> as 100% isn't possible
21:44:14 <truebrain> talltyler: yeah, no problem. Just as long as economy and calendar are the same, it is pretty meaningless.
21:44:19 <andythenorth> so it's more important to beat other people, than beat the number
21:44:24 <truebrain> so maybe we should first look into a PR that shows the value of having them different?
21:44:51 <talltyler> Hmm, I guess it could wait until last
21:44:51 <truebrain> andythenorth: I don't think that will work. I want to know how my train is doing. I really don't care about your train
21:45:27 <andythenorth> I don't know if that is a UK thing, but my generation wanted 10 out of 10 on every test
21:45:40 <andythenorth> I kind of hate it, but it was drilled into us
21:45:53 <talltyler> The next big thing is Real Time Mode, which will decouple economy and calendar time and cause all sorts of fun bugs 😉
21:45:53 <truebrain> look at it this way .. your utliziation, as a human, is like, what, 70%? You sleep 6 - 8 hours, so that is 25% to 33%
21:45:56 <andythenorth> if you show me a %, I'm like "ok, needs to be 100"
21:45:58 <truebrain> that is an interesting value
21:46:05 <truebrain> you shouldn't get it to 100
21:46:17 <truebrain> that would be pretty deadly in the long run
21:46:37 <truebrain> talltyler: maybe thinker with that first, before we prepare everything for it to find out it doesn't actually work or something 😄
21:46:45 <andythenorth> IRL lean factories aim for about 80% utilisation, 100% is unrealistic and can only be done by skimping maintenance
21:46:47 <andythenorth> but this is a game
21:46:55 <truebrain> are you also going for 100% reliability?
21:47:05 <andythenorth> breakdowns are off
21:47:17 <truebrain> still, a vehicle has a reliability value
21:47:26 <andythenorth> I hate that stations never get 100% though, and am going to fix it in GS, once we extend the API for that 😛
21:47:34 <talltyler> Sure, I can do that, assuming #10700 is reasonably stable now and I won't need to rebase continuously
21:47:36 <truebrain> station RATING is something different 🙂
21:47:50 <andythenorth> no my trains are not 100%
21:48:01 <truebrain> so I think you are a bit .... in dutch we call it: "je bent aan het doorslaan"
21:48:04 <truebrain> not sure how to translate that 🙂
21:48:04 <andythenorth> I think it can be done briefly by frequent forced depot servicing
21:48:16 <andythenorth> is it dutch for "wired wrong asshole"
21:48:58 <truebrain> I am not disagreeing, but also not saying yes 😛
21:49:10 <andythenorth> anyway utilisation is cool
21:49:15 <andythenorth> it's just another thing to fuck with my brain
21:49:43 <truebrain> I wll toy with it a bit tomorrow, see if I can get something nice that also works for trains that haven't delivered anything yet
21:49:57 <truebrain> as I really can't stand that arbitrary "a train must deliver something every year, OR ELSE"
21:50:11 <andythenorth> I don't like that red profit thing
21:50:11 <talltyler> This is going to be a super fun rebase of Real Time Mode; last time it was updated, dates were a bunch of global variables, `_cur_economy_year` and such 😄
21:50:13 <andythenorth> ships have same issue
21:50:19 <truebrain> ships have it the worst 🙂
21:50:27 <truebrain> my airplanes too, in 4kx4k maps 😛
21:50:42 <truebrain> it is like .. if you use transfers, they aren't red
21:50:44 <andythenorth> I think I'm about to roleplay a Dutch person here, but if the problem is red annual profit...should we fix that? 😛
21:50:45 <truebrain> but because I didn't, they are
21:50:48 <truebrain> it makes no sense 😦
21:50:51 <andythenorth> not add more things?
21:51:08 <truebrain> I have no clue how you got to the red anual profit, and that being the issue
21:51:14 <truebrain> I think you just pulled that out of your own .... hat
21:51:25 <andythenorth> what's the OR ELSE?
21:51:30 <truebrain> my issue is that profit is meaningless, and I love this PR for giving me a stats I can thinker with
21:51:55 <truebrain> in my head, money is deleted
21:51:55 <andythenorth> go for efficiency
21:52:00 <truebrain> it is irrelevant after the first year
21:52:15 <truebrain> but I have no clue if a train got stuck or something till the game starts complaining at some random moment in time
21:52:27 <truebrain> I can have those slow deadlocks, that auto solve themselves
21:52:31 <truebrain> but still delay all trains by months
21:52:34 <truebrain> you will never know 😛
21:52:36 <andythenorth> true utilisation in OpenTTD is "units cargo delivered / tiles used for infra"
21:52:45 <andythenorth> tiles are the true currency
21:53:10 <jfs> Random thought, maybe instead of updating the cargo-tiles value on delivery, do something with incrementing counters every tick a vehicle decreases it's distance to the destination, and incrementing different counters every tick it does not get closer
21:53:26 <Eddi|zuHause> iirc both cities skylines and transport fever have "remove money" mods
21:53:27 <truebrain> jfs: yup, not so random thought
21:53:38 <truebrain> I was thinking every 30 days or so have vehicle update how they are doing
21:53:48 <truebrain> doesn't have to be every tile or every day, but just once in a while: I am 50% close to my goal
21:53:53 <andythenorth> closer as crow flies, or manhattan, or measuring the route?
21:53:57 * andythenorth doesn't care, just interested
21:54:05 <andythenorth> some of those are exploitale
21:54:06 <truebrain> we use Manhattan for all those calculations
21:54:12 <jfs> I think "every 30 days" is too long between
21:54:21 <truebrain> well, once in a while, but fair 🙂
21:54:49 <truebrain> with the recent PR that got merged, we know the tile stuff got loaded .. we know our destination .. so we can make a good estimate constantly
21:55:09 <andythenorth> utilisation being affected by route shape would be quite interesting
21:55:19 <andythenorth> I mean, implicitly it is anyway
21:55:24 <kamnet> Eddi|zuHause: What about just implementing BaseMod NewGRF as a new feature and include disabling money?
21:55:37 <jfs> Since you have bigger risk of hitting some unfortunate moment and not have a chance to make up for it again, if you check too rarely
21:55:53 <Eddi|zuHause> kamnet: you mean basecost?
21:56:04 <truebrain> also why I was thinking about a sliding window, but that is more complicated to implement 🙂
21:56:18 <truebrain> so prope every day, report every 7 days over the last 7 days, so to say
21:56:19 <jfs> Sampling needs to be often enough that the true trend is picked up, but not so often that noise dominates
21:56:22 <truebrain> gives more room for deviations
21:56:28 <Eddi|zuHause> kamnet: i think that grf is "bad" in the sense that the UI doesn't mean much to someone new
21:56:37 <truebrain> something to toy with tomorrow, I think 🙂
21:56:45 <truebrain> unless you want to jfs , don't want to steal it away from you
21:56:52 <andythenorth> we can't just do like trucks do, loaded ton-miles?
21:57:33 <jfs> I think that's what I do in this pr?
21:57:44 <andythenorth> that will teach me to speak 🙂
21:58:39 <truebrain> andythenorth: just means we all agree on the approach 😛
21:58:52 <jfs> The efficiency is "traveled capacity-miles (capacity-tiles)" compared to "delivered load-tiles"
21:59:31 <andythenorth> IRL there are so many ways to measure utilisation
21:59:34 <jfs> The delivered load-tiles is how much actual cargo was delivered by the Manhattan distance between stations
21:59:54 <jfs> But the traveled capacity-tiles is how far the vehicle actually moved
22:00:26 <jfs> So it also punishes non*direct paths
22:00:36 <truebrain> means with trains you could go above 100% 😛
22:00:44 <truebrain> (diagonal vs Manhattan)
22:00:51 <truebrain> airplanes too ... ships too 😛
22:01:51 <jfs> The one thing I don't remember if I've tested is what happens with trains sitting in a depot (used as overflow storage)
22:02:10 <truebrain> should be the same as waiting for a redlight, not?
22:02:14 <andythenorth> maybe we need a detailed report? 😛
22:02:35 <truebrain> first step is to rebase that PR 🙂
22:02:37 <andythenorth> * utilisation for tiles travelled
22:02:37 <andythenorth> * utilisation (absolute by time)
22:03:08 <truebrain> a detailed report isn't the worst idea .. "time waiting for red light", etc .. but the storage for that might be a bit .. much 😄
22:03:17 <andythenorth> can you expose it to GS in detail, per vehicle, and let GS authors storybook it
22:03:44 <truebrain> before you know it, people complain the savegame gets too big 😛
22:03:51 <jfs> Actually... I think that pr is the first patch I worked on for OpenTTD
22:04:03 <andythenorth> truebrain: shocking
22:04:05 <jfs> Though the first I finished was one relating to music
22:04:07 <xplusc> Ok now I get this on existing saves:
22:04:14 <xplusc> But saving and loading a new saves works.
22:04:19 <truebrain> xplusc: means you didn't install vcpkg properly 🙂
22:04:25 <andythenorth> hmm we could interpolate the detailed stats
22:04:31 <andythenorth> do them probabilistically 😛
22:04:36 <andythenorth> not based on the actual facts
22:04:43 <andythenorth> another use for an LLM I reckon
22:04:48 <peter1139> truebrain, you vendored nlohmann for no reason ;)
22:05:05 <truebrain> peter1139: haha, in some sense. At least they can compile now 🙂
22:05:06 <andythenorth> can we do this, but like "time spent waiting in depot, time spent loading" etc
22:05:47 <truebrain> that error shows lzma was not compiled in the binary
22:06:16 <jfs> Tbh my experience with the train movement state machine is that it's really weird and is very difficult to pull status of what the vehicle is actually doing out of
22:06:33 <xplusc> Well, I thought I did that already.
22:06:44 <jfs> That actually goes for all the vehicle movement
22:07:09 <truebrain> xplusc: sorry to tell you that you didn't 😦 All I know is if you follow that doc to the letter, it works. At least, it worked for me, and I am not a Windows user 😄
22:07:36 <andythenorth> jfs: nah just let the LLM work it out
22:07:37 <jfs> Anyway, I'm off, need to get ready for the day here
22:07:38 <truebrain> xplusc: remember to follow the vcpkg install documents, bootstrap vcpkg etc
22:07:44 <truebrain> jfs: enjoy the day 🙂
22:08:59 <truebrain> xplusc: but not actually a MSVC user, so all I can tell you: the compiler did not find the lzma you should have installed with vcpkg 🙂 Save/load locally will work just fine, just depending on what got actually compiled in your binary (zlib yes/no), they can be HUGE
22:09:02 <truebrain> like 100+ MiB huge 🙂
22:09:21 <truebrain> just loading savegames from others fails
22:09:28 <truebrain> so depending on your goal of self-compiling, it might just be okay
22:09:45 <andythenorth> ```Here's a conceptual outline of what such a feature might report and how it could be implemented, based on the general principles of OpenTTD development:
22:09:45 <andythenorth> 1. Vehicle Utilization Metrics:
22:09:45 <andythenorth> a. Idle Time: The amount of time a vehicle spends waiting without loading or unloading cargo.
22:09:45 <andythenorth> b. Cargo Waiting Time: The amount of time a vehicle spends waiting to load or unload cargo at stations.
22:09:45 <andythenorth> c. Distance Traveled: The total distance a vehicle has traveled since its creation.
22:09:46 <andythenorth> d. Average Speed: The average speed of the vehicle during its lifetime.
22:09:49 <truebrain> all these dependencies make OpenTTD better .. none of them are actually needed
22:09:59 <xplusc> Well, upon reading rereading the instructions for like the eighth time I believe I have found another lead.
22:10:17 <truebrain> improvements to the docs are welcome btw!
22:10:22 <xplusc> Does vcpkg need to be in certain directories?
22:10:31 <truebrain> you just need to bootstrap it
22:10:46 <andythenorth> ```The OpenTTD community and developers are typically quite open to feedback and contributions, so you may also consider engaging with them directly for the most up-to-date information.``` Thanks GPT
22:10:47 <truebrain> and MSVC install it
22:10:56 * andythenorth takes GPT's advice
22:11:01 <jfs> It needs to be somewhere that Visual Studio can find it
22:11:12 <truebrain> vcpkg has a command to integrate with MSVC
22:11:19 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:11:37 <truebrain> (purely accidental called ` integrate install` )
22:11:42 <xplusc> Yeah `vcpkg integrate install`.
22:11:47 <xplusc> I remember doing that.
22:12:33 <truebrain> sadly, you are a bit on your own here to figure out where your install goes wrong if you did all that. All I can contribute is: it worked for me 😦 Such a useless statement, I know, sorry 😦
22:13:19 <truebrain> I am as fast as lightning
22:13:27 <talltyler> I blame the bot for delaying me
22:13:51 <truebrain> right, time to find some zzzs
22:14:06 <andythenorth> my alarm gets closer
22:14:41 <talltyler> You'll have to talk to somebody above my paygrade 😛
22:15:38 <peter1139> andythenorth, build-on-pause
22:16:29 <xplusc> truebrain: Goal of contributing, you mean.
22:17:34 <xplusc> Wait, I might've figured it out.
22:17:51 *** ChanServ sets mode: +v tokai
22:18:39 <xplusc> I think I ran `bootstrap-vcpkg.sh` instead of `bootstrap-vcpkg.bat`.
22:24:44 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:40:15 <_glx_> what's the output of `vcpkg list` ?
22:40:55 <xplusc> Ok, previous idea was no dice.
22:41:12 <xplusc> `vcpkg list` lists all the libraries I installed for OpenTTD.
22:41:41 <xplusc> New lead: MSVC has *its own* install of vcpkg separate from the one I'm using to install the libraries.
22:41:44 <peter1139> What's the output, though?
22:42:04 <_glx_> ah yes that's an annoying thing MSVC did recently
22:42:15 <_glx_> I remember being hit by it
22:42:36 <xplusc> So how do I change `VCPKG_ROOT` in MSVC?
22:42:53 <xplusc> Or any other things I might need to do.
22:42:59 <_glx_> just remove it in visual studio installer
22:43:58 <_glx_> if you have your own vcpkg setup you don't need the provided MSVC one
22:44:37 <_glx_> uncheck vcpkg in individual components
22:45:07 <xplusc> It's not in MSVC anymore.
22:45:45 <_glx_> it should now use your vcpkg and everything will be fine
22:55:15 <_glx_> oh it seems we should be able to auto install our deps
23:04:34 <xplusc> So, that still doesn't get MSVC to see my instal of vcpkg.
23:16:01 <xplusc> Ok that didn't do anything. I see now that VCPKG_ROOT is undefined.
23:16:16 <xplusc> It used to point to MSVC's version of vcpkg.
23:16:26 <xplusc> Now it just doesn't exist I guess.
23:16:44 <xplusc> The toolchain filepath still tries to use it of course.
23:25:47 <_glx_> maybe need `vcpkg integrate remove` then `vcpkg integrate install` and a restart of VS
23:32:02 <xplusc> HOWEVER, I got it fixed.
23:32:27 <xplusc> Loaded this existing save.
23:34:11 <xplusc> I just changed the `cacheVariables` in `CMakePresets.json`:
23:35:10 <xplusc> Instead of using `VCPKG_ROOT`, which was now undefined, I just put the absolute path in as a whole.
23:40:32 <_glx_> `VCPKG_ROOT` is set with `vcpkg integrate install` IIRC
continue to next day ⏵