IRC logs for #openttd on OFTC at 2024-12-22
⏴ go to previous day
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:39:01 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:40:01 *** D-HUND is now known as debdog
06:40:41 *** gelignite has quit IRC (Quit: Stay safe!)
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: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:44:14 <peter1138> If it's not before 9 o'clock it always feels too late to head out :p
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: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:02:33 <Rubidium> there doesn't really seem to be STL support for it (yet?)
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
15:00:50 <xarick> nice! my stuff being merged
15:19:00 <andythenorth> Could we build macOS as WASM and Webkit?
15:50:39 <xarick> why is `TVisitWaterRegionPatchCallBack` named with a T at the begining?
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`
17:06:54 *** Wormnest has joined #openttd
17:18:11 <xarick> TestCallBackInWaterRegionPatchPath
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:27:17 <xarick> make it look professional
17:29:04 <xarick> using TVisitWaterRegionPatchCallBack = std::function<void(const WaterRegionPatchDesc &)>;
17:34:06 <xarick> TTestTileIndexCallBack ?
17:36:15 <xarick> I'm bad with names, not even with suggestions from Copilot I can make up my mind
18:46:26 <xarick> now I just need to update the PR message
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: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: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: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: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: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:38:30 <xarick> I'm still not completely satisfied, but it's getting closer to set it Ready for Review
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)
continue to next day ⏵