IRC logs for #openttd on OFTC at 2024-12-22
            
01:51:35 *** Wormnest has quit IRC (Quit: Leaving)
02:14:13 *** gelignite is now known as Guest3766
02:14:18 *** gelignite has joined #openttd
02:21:29 *** Guest3766 has quit IRC (Ping timeout: 480 seconds)
03:14:18 *** gnu_jj_ has joined #openttd
03:17:26 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:35:40 *** D-HUND has joined #openttd
03:39:01 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:40:01 *** D-HUND is now known as debdog
05:26:03 *** keikoz has joined #openttd
06:40:41 *** gelignite has quit IRC (Quit: Stay safe!)
08:31:41 *** nielsm has joined #openttd
09:03:41 *** Wolf01 has joined #openttd
09:22:49 <xarick> hi
09:24:40 <xarick> Revert: "Codechange...
09:24:55 <xarick> that's accepted by commit checker?
10:12:58 <Rubidium> I'd suggest to check the PR to see whether it was accepted
10:15:25 <xarick> https://github.com/OpenTTD/OpenTTD/commits/master/
10:16:07 <andythenorth> I'm hungry
10:19:12 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1320334821444030514/image.png?ex=67693920&is=6767e7a0&hm=36ba207ac07c381ae1def3cd1e3d408f8794a5ac0b275e1bc6160932e631b1de&
10:22:10 <LordAro> xarick: why would it not be?
10:38:26 *** Flygon has quit IRC (Read error: Connection reset by peer)
10:40:01 <peter1138> Hmm, it's not quite a windy as the forecast said, and the skies are clear.
10:40:08 <peter1138> But also...
10:42:46 <andythenorth> coffee though
10:42:47 <andythenorth> is needed
10:44:14 <peter1138> If it's not before 9 o'clock it always feels too late to head out :p
10:44:39 <truebrain> But is it? 😄
10:44:59 <peter1138> I mean, I have a coffee to drink now, and probably some patches to rebase.
10:45:19 <truebrain> there is always a reason not to do something 😄
10:46:02 <peter1138> Alright, what's the C++ way to read/write binary files...
10:46:47 <truebrain> `rb` 😛
10:48:07 <peter1138> Seems everyone likes to type-cast to char * and ignore endianness.
10:48:52 <andythenorth> there's always a rebase to do
10:50:01 *** gelignite has joined #openttd
11:01:45 <Rubidium> peter1138: yeah, it seems to "standard" way is "just go with your gut": https://isocpp.org/wiki/faq/serialization#serialize-binary-format
11:02:33 <Rubidium> there doesn't really seem to be STL support for it (yet?)
11:36:56 <FLHerne> protobuf?
11:42:25 <kuhnovic> I'm pretty sure c++37 will have a solution for it
11:44:23 <johnfranklin> Is newer version of C++ than C++20 out?
11:46:26 <Rubidium> C++23 is out for years, C++26 will be frozen in like half a year
11:48:18 <Rubidium> it only takes a while for the whole standard to be implemented by the three major compilers, and then for the compilers to get into stable releases
12:19:27 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13184: Codechange: use (better) named constants for the bridge sprite table https://github.com/OpenTTD/OpenTTD/pull/13184
12:21:49 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13184: Codechange: use (better) named constants for the bridge sprite table https://github.com/OpenTTD/OpenTTD/pull/13184#pullrequestreview-2519615884
12:59:23 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13184: Codechange: use (better) named constants for the bridge sprite table https://github.com/OpenTTD/OpenTTD/pull/13184
13:01:44 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13175: Codefix: Remove duplicated include https://github.com/OpenTTD/OpenTTD/pull/13175
13:02:17 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13176: Codefix: Ensure assertions are properly encapsulated within WITH_ASSERT directive https://github.com/OpenTTD/OpenTTD/pull/13176
15:00:50 <xarick> nice! my stuff being merged
15:10:39 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073#pullrequestreview-2519642300
15:19:00 <andythenorth> Could we build macOS as WASM and Webkit?
15:50:23 <xarick> I have a question
15:50:39 <xarick> why is `TVisitWaterRegionPatchCallBack` named with a T at the begining?
15:51:46 <xarick> It's not a template
15:52:47 <xarick> hmm
16:00:28 <_glx_> indeed T should be for template parameters, but here it's T for Type it seems
16:01:42 <_glx_> same for `TWaterRegionPatchLabel` and `TWaterRegionIndex`
16:18:24 <LordAro> it's just yorkshire
16:18:28 <LordAro> t'water region
17:06:54 *** Wormnest has joined #openttd
17:18:11 <xarick> TestCallBackInWaterRegionPatchPath
17:18:14 <xarick> great names
17:18:26 <xarick> trying to abstract
17:19:50 <xarick> TShipDepotRegionCallBack this name is not abstract enough 😦
17:21:33 <xarick> help me with a long name, mr kuhnovic
17:22:06 <xarick> TShipDepotWaterRegionPatchCallBack ? But I wanna abstract "ShipDepot"
17:22:29 <xarick> using TShipDepotRegionCallBack = std::function<bool(const TileIndex)>;
17:23:59 <_glx_> this type looks very generic
17:26:50 <xarick> i'm trying to avoid any mention of ShipDepot in water_regions files
17:26:57 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12288: Change: Increase house type limit to 4096. https://github.com/OpenTTD/OpenTTD/pull/12288
17:27:17 <xarick> make it look professional
17:29:04 <xarick> using TVisitWaterRegionPatchCallBack = std::function<void(const WaterRegionPatchDesc &)>;
17:29:04 <xarick> similar to this one
17:34:06 <xarick> TTestTileIndexCallBack ?
17:35:24 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12288: Change: Increase house type limit to 4096. https://github.com/OpenTTD/OpenTTD/pull/12288
17:35:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #12288: Change: Increase house type limit to 4096. https://github.com/OpenTTD/OpenTTD/pull/12288#pullrequestreview-2519672824
17:36:15 <xarick> I'm bad with names, not even with suggestions from Copilot I can make up my mind
17:54:29 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #12288: Change: Increase house type limit to 4096. https://github.com/OpenTTD/OpenTTD/pull/12288#pullrequestreview-2519675304
18:14:10 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #12288: Change: Increase house type limit to 4096. https://github.com/OpenTTD/OpenTTD/pull/12288
18:14:44 <talltyler> 🥳
18:45:39 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10544: Fix #5713: Use pathfinder to find closest ship depot https://github.com/OpenTTD/OpenTTD/pull/10544
18:46:05 <xarick> it's clean!
18:46:26 <xarick> now I just need to update the PR message
18:46:32 *** tokai has joined #openttd
18:46:32 *** ChanServ sets mode: +v tokai
18:46:36 <xarick> I'll do it after dinner
18:53:29 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:46:59 <xarick> why is this warning me?https://github.com/OpenTTD/OpenTTD/pull/10544/files#diff-825f2767fa89e68fc6b21e6735fda3e5afe3f5e23e6efc98bcac7d98e08bc89fR495
19:48:15 <xarick> it warns me for line 495, but doesn't for line 465 which does exactly the same thing
19:50:56 <Rubidium> warnings are generally best-effort. Though in general you should use by-reference in ranges for loops
19:53:32 *** Flygon has joined #openttd
19:55:13 <Rubidium> also std::vector and TileIterator work differently internally
19:55:21 <xarick> what's going to happen if tile is by reference in `best_tile = tile;`
19:56:43 <Rubidium> with a vector you got a table with TileIndex objects, with TileIterator a new TileIndex object is generated for each step... so with vector it would need to copy with your by-value iteration, but with TileIterator return value optimisation removes the actual copy
19:57:44 <Rubidium> then there's still a copy going to happen. You might also consider making best_tile by-reference, and only create the copy upon returning
20:15:46 <xarick> couldn't make &best_tile = INVALID_TILE;
20:36:09 <xarick> question to
20:36:17 <xarick> whoever it may concern
20:37:08 <xarick> should ships reverse when manually sent to ship depot if the ship depot is behind the ship?
20:37:15 <xarick> much like trains do?
20:37:31 <xarick> but there is no Command for forced ship reversing 😦
20:41:23 <_glx_> xarick: because INVALID_TILE is not a variable
20:54:21 *** gelignite has quit IRC (Quit: Stay safe!)
21:14:00 <xarick> how to reverse mid-lock elevator operation?
21:18:09 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10544: Fix #5713: Use pathfinder to find closest ship depot https://github.com/OpenTTD/OpenTTD/pull/10544
21:56:13 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:02:51 *** virtualrandomnumber has joined #openttd
22:03:26 *** virtualrandomnumber has quit IRC ()
22:37:09 <xarick> Updated the message: https://github.com/OpenTTD/OpenTTD/pull/10544#issue-1610243251
22:38:30 <xarick> I'm still not completely satisfied, but it's getting closer to set it Ready for Review
22:39:21 <xarick> <https://github.com/OpenTTD/OpenTTD/pull/10544/files#diff-99cfdb4c4d8d65d1f7d7bdfefb350eba2e7dc0b7708863e0262002b6c71f5e0dR253>
22:39:21 <xarick> I believe this is rather slow
22:39:34 <xarick> insert at the front on a vector
22:42:26 <xarick> I'm considering push_back all path, then do a reverse in the container at the end before returning the path
22:42:54 <xarick> will need to benchmark or something
23:03:13 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:19:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)