IRC logs for #openttd on OFTC at 2024-01-11
            
00:12:48 <wensimehrp> What does `Max memory usage per script: {STRING}` means? iirc only one gs could be used in one game. Does it mean AI or something else?
00:15:21 <wensimehrp> Also, in `Maximum number of computation steps that a script can take in one turn`, what is `one turn`?
00:20:06 <reldred> peter1138[d]: Infinite OpenTTD worlds here we come
00:37:48 <_glx_> wensimehrp: AI and GS are scripts
00:39:16 <_glx_> and they are run every tick for at most "max number of computation steps"
00:40:22 <_glx_> executing a command (building something, changing an order... every action a human can do to affect the game world) ends their turn
00:40:46 <wensimehrp> I think changing `scripts` to `AI and GS` would be better
01:02:56 *** johnfranklin has joined #openttd
01:02:56 <johnfranklin> reldred: 60m*60m
01:30:22 <DorpsGek> [OpenTTD/OpenTTD] WenSimEHRP opened issue #11752: [Bug]: Charactors in NewGRF menu being displayed incorrectly while using zh_CN and zh_TW https://github.com/OpenTTD/OpenTTD/issues/11752
01:35:43 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on issue #11752: [Bug]: Charactors in NewGRF menu being displayed incorrectly while using zh_CN and zh_TW https://github.com/OpenTTD/OpenTTD/issues/11752
01:47:47 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #11752: [Bug]: Charactors in NewGRF menu being displayed incorrectly while using zh_CN and zh_TW https://github.com/OpenTTD/OpenTTD/issues/11752
02:49:07 *** Flygon has quit IRC (Read error: Connection reset by peer)
02:57:08 <DorpsGek> [OpenTTD/OpenTTD] WenSimEHRP commented on issue #11752: [Bug]: Charactors in NewGRF menu being displayed incorrectly while using zh_CN and zh_TW https://github.com/OpenTTD/OpenTTD/issues/11752
03:13:55 *** Wormnest has quit IRC (Quit: Leaving)
03:47:30 *** D-HUND has joined #openttd
03:50:50 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:08:12 *** keikoz has joined #openttd
05:10:59 *** asymptotically2 has quit IRC (Write error: connection closed)
05:11:48 *** HerzogDeXtEr has joined #openttd
05:17:47 *** rau117 has quit IRC (Quit: User went offline on Discord a while ago)
05:42:18 *** D-HUND is now known as debdog
06:11:31 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:53:43 <andythenorth> Generalised Regions next? ๐Ÿ˜›
07:31:34 *** tokai has joined #openttd
07:31:34 *** ChanServ sets mode: +v tokai
07:38:26 *** Smedles_ has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
07:38:32 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
07:39:57 *** Smedles has joined #openttd
08:35:02 <peter1138[d]> Generalised generalisations?
08:40:01 <andythenorth> Abstract Generalisations
08:40:19 <andythenorth> we can declare everything is an Object
08:40:23 <andythenorth> with Attributes
08:48:53 <wensimehrp> WenSimEHRPviaGitHub: I think it could be fixed by slightly modifing the lang file, while sacrificing alignment...
09:03:26 <peter1138[d]> Meh, because trams are road vehicles, we don't have a separate group_all for trams.
09:03:41 <peter1138[d]> (And also sometimes bus vs truck is needed)
09:52:15 <peter1138[d]> Uh oh, CI failed :/
09:52:22 <peter1138[d]> api.nuget.org 502 ๐Ÿ˜ฎ
10:08:57 <peter1138[d]> Well this is awkward, I guess I could override and force a merge.
10:10:36 <peter1138[d]> But my CI does release builds too, so, uh... Hmm.
10:12:14 <peter1138[d]> Should I try turning it off and on again?
10:24:58 *** Flygon has joined #openttd
10:55:08 <peter1138[d]> Maybe the issue is DNS... or IPv6.
11:06:10 <xarick> why does it take about 5 seconds to exit openttd fully?
11:06:31 <xarick> the main window closes, but it's still running something in the background for 5 secs
11:07:14 <xarick> most noticeable with debug build
11:07:31 <xarick> as it opens 2 windows instead of 1
11:10:27 <peter1138[d]> Does it reduce if you turn off surveys?
11:11:35 <xarick> oh is that it?
11:11:53 <peter1138[d]> No, I'm just asking a question.
11:11:54 <xarick> how do i turn it off
11:11:57 <peter1138[d]> Settings.
11:13:06 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1194962184598466580/image.png?ex=65b24242&is=659fcd42&hm=9547cf724e0eab5c675b7e02870c5b22737fcbdee08528259e1ef746574dd003&
11:13:10 <LordAro> that was supposed to be fixed recently
11:13:23 <peter1138[d]> Eh, sorry, Game Options.
11:13:48 <peter1138[d]> The fixed was to stop it hanging indefinitely.
11:14:04 <peter1138[d]> It could also be audio thread clean up.
11:14:42 <peter1138[d]> Or it could be data being cleaned up in destructors.
11:26:23 <xarick> the button for participate surveys and others in game options should toggle red/green for disabled/enabled.
11:27:08 <peter1138[d]> It could but it doesn't. Red/Green also infers dangerous / safe, which isn't necessarily related.
11:28:06 <peter1138[d]> "Fullscreen: Green / Red" ... ?
11:29:58 <_glx_> Maybe we need some kind of sliding on/off button
11:30:23 <xarick> have some text
11:30:43 <peter1138[d]> Yes | No
11:31:00 <xarick> Fullscreen: yes | no [ ]
11:31:03 <xarick> the button
11:31:17 <peter1138[d]> There's a text button widget that switches strings automatically.
11:31:17 <xarick> on off
11:40:35 <xarick> suggestion, update really old savegames to use yapf for ships instead of npf
11:41:01 <xarick> that way the intro save would have more stuff to debug with
11:48:16 <xarick> yeah it closed instantly!
11:48:24 <xarick> with surveys disabled
11:49:46 <peter1138[d]> Okay, so it's collecting the survey data (not sure how long that takes, probably not noticeable but debug might affect it), and then sending the data to survey server.
11:50:33 <peter1138[d]> That shouldn't take very long either, but as long as it doesn't hang then taking a few seconds after the main window is closed seems fine to me.
12:10:58 <xarick> i can extract a bit more performance for that Force Update
12:13:42 <xarick> it's doing a TrackBitsToTrackdirBits(TrackdirBitsToTrackBits(TrackStatusToTrackdirBits(GetTileTrackStatus ts)
12:14:22 <xarick> the two first convertions can be dropped
12:17:02 <xarick> oh maybe not, he wants both directions?
12:17:12 <xarick> but hmmm let's try
12:18:58 <kuhnovic> Please be very careful with that region update. The region labeling must happen 100% correct for the pathfinder to work properly. Otherwise you can easily get false postives (path is found where there is none) or false negatives
12:20:10 <xarick> I see, I found it converting back and forth, wondering now if that's really needed to be
12:21:00 <xarick> will place some assert there to compare results
12:24:42 *** keikoz has joined #openttd
12:27:08 <xarick> OH, IT's 1 less conversion, not 2, my bad
12:27:53 <kuhnovic> There's more to gain in the way the CCL algorithm works. That does some unnecessary double work. I went for robustness over performance.
12:29:16 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1194981353247232030/image.png?ex=65b2541c&is=659fdf1c&hm=cfb5012ceb6fad535f12e3cb16811c35d965524cd59a8c2966abde96e2677e0c&
12:29:16 <xarick> kek
12:30:27 <xarick> oh, my bad, I did the wrong copy paste
12:30:42 <peter1138[d]> Robustness over being wrong is also useful ๐Ÿ˜‰
12:32:16 <xarick> alright, now I copied correctly
12:32:25 <xarick> no asserts so far, gonna have lunch and leave this running
12:33:41 <kuhnovic> Yup that too ๐Ÿ˜›
12:33:53 <_jgr_> These conversions are pretty much free
12:36:12 <peter1138[d]> Yup
12:39:42 <kuhnovic> Some of them might even get optimized away by the compiler. If you really want to find out where the precious CPU time is spent, do some profiling (in RelWithDebInfo, not in Debug)
12:40:55 <kuhnovic> The VS performance profiler is pretty easy to use and should give some good insights
12:41:00 <LordAro> kuhnovic: we only just got xarick using TICC/TOCC variables over AI/GS output
12:41:40 <kuhnovic> Someone has to show him the way ๐Ÿ˜›
12:41:45 <LordAro> along with just running the game in FF side by side and seeing which was further ahead after running overnight
12:46:08 <kuhnovic> Hey, it ain't stupid if it works ๐Ÿ˜‰
12:46:25 <LordAro> "if" doing a lot of heavy lifting there
12:51:07 <peter1138[d]> Hmm, is it going to be a frozen weekend...
12:51:36 <peter1138[d]> 1ยฐC at 9am.
12:52:00 <kuhnovic> That's not frozen
12:52:41 <peter1138[d]> No but the ground can still be icy. Cold spots etc.
12:52:56 <peter1138[d]> Urgh, ยฃ46 for overshoes... wtf no.
12:54:20 <LordAro> peter1138[d]: similar here
12:54:26 <kuhnovic> Hehe that's true. It's been cold here too (NL). People are iceskating. Guess who's stuck at home with the flu...
12:56:15 <peter1138[d]> I wouldn't mind spending that much if they lasted more than one season.
12:59:40 <peter1138[d]> Overshoes. Largest size "Large", shoe size 7.5 - 9. No.
13:11:12 <peter1138[d]> Such complaining.
13:24:42 *** asymptotically2 has joined #openttd
13:27:27 <xarick> ^_^ no asserts!
13:32:51 <xarick> `static inline TrackdirBits GetWaterTrackdirs(TileIndex tile) { return TrackStatusToTrackdirBits(GetTileTrackStatus(tile, TRANSPORT_WATER, 0)); }`
13:32:51 <xarick> (...)
13:32:51 <xarick> `const TrackdirBits valid_dirs = GetWaterTrackdirs(track_tile);`
13:35:00 <xarick> oh, GetWaterTracks is needed further below, ewww i missed that
13:42:00 <kuhnovic> This won't land you any noticable performance gains, you know that right?
13:43:52 <xarick> looks like it won't
13:43:57 <xarick> dang
13:44:16 <xarick> was thinking about keeping the 2 inline functions
13:44:20 <andythenorth> peter1138[d]: Generalised Trams
13:44:54 <kuhnovic> Run the VS profiler xarick . You'll be surprised what you'll find.
13:44:58 *** asymptotically2 has quit IRC (Ping timeout: 480 seconds)
13:47:32 <xarick> how do I do the profiler thing, is it the cpu usagetab in diagnostic tools window?
13:49:16 <kuhnovic> https://cdn.discordapp.com/attachments/1008473233844097104/1195001483909943406/image.png?ex=65b266db&is=659ff1db&hm=493669aa22757711a8c1f5eb9a6888343da75c8c558f3402eb42fb10bc574a79&
13:50:39 *** limyx826 has joined #openttd
13:50:39 <limyx826> Which code control the cargo payment rates graph render?
13:51:23 *** asymptotically2 has joined #openttd
13:55:41 <kuhnovic> xarick: Enable the CPU usage only, run it for a bit (the longer you run it the longer it takes to analyze). Inspect the results a bit, there are multiple views that provide different kind of information. You can double click a function to jump to it's source to see which lines take a lot of execution time. Keep in mind that you need to build with RelWithDebInfo in order to get a real performance
13:55:41 <kuhnovic> measurement. Debug doesn't properly optimize stuff but you can to play around with the profiler a bit, but you should take results with a grain of salt. Don't bother building in Release, it will mangle the function names and you won't be able to get any useful information from the performance report.
13:58:40 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195003852752179250/image.png?ex=65b26910&is=659ff410&hm=8cb55f63ec3bfbbc195fe7886f74e59a2890a89bcee48ec7ef6958d8fe05bc0c&
13:58:46 <xarick> I am dumb
13:59:28 *** asymptotically2 has quit IRC (Ping timeout: 480 seconds)
14:00:10 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195004229509709905/image.png?ex=65b2696a&is=659ff46a&hm=06e01cf4a8530d60958f4a19c019bcda2c03f80fccda7c39977080bd5d1efd5b&
14:00:10 <xarick> Isnt this what I want?
14:00:39 <LordAro> no
14:02:51 <kuhnovic> Restart VS
14:03:16 <kuhnovic> And make sure you don't have any openttd instances running
14:10:36 <xarick> I'm going with the Diagnotic Tools CPU Usage instead, seems simpler, right to the point
14:11:05 <LordAro> kuhnovic: see what i mean?
14:11:32 <xarick> it complains about missing symbols
14:11:36 <xarick> so i gave up
14:13:16 <kuhnovic> Do you get the same missing symbols message if you do a clean build?
14:18:03 <limyx826> Which file define to build bus station?
14:18:27 <xarick> Performance Profiler, Select Process
14:18:57 <xarick> how do i select it if it's not running
14:20:12 <kuhnovic> https://cdn.discordapp.com/attachments/1008473233844097104/1195009268210995271/image.png?ex=65b26e1b&is=659ff91b&hm=919fbe43d6c6f339240cf485382fd48c0243df5e0268f50c2a163a2c6395ccf9&
14:20:31 <kuhnovic> You just start it from the profiling tab
14:22:01 <xarick> I dont have that option
14:22:06 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195009747896782999/image.png?ex=65b26e8e&is=659ff98e&hm=858246c8f8e76f54234dc76668216ad89c8dc6a67b3016a4fb12b7047fc61474&
14:22:21 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195009811515977788/image.png?ex=65b26e9d&is=659ff99d&hm=45508e73c8438a3278d8f478ec1ec2d950de52b3e40a5b49588a19a33b9d17c2&
14:22:56 <kuhnovic> Is your openttd project set as the startup project?
14:23:22 <kuhnovic> https://cdn.discordapp.com/attachments/1008473233844097104/1195010065959231600/image.png?ex=65b26ed9&is=659ff9d9&hm=8ecd2117c076ed6a71a7df16573e4b58841ab389f34e12dc1a92104c70ffb44e&
14:24:13 <_jgr_> At the risk of opening a can of worms, there are things other than CPU usage which you can optimise
14:25:08 <xarick> how do I get that list?
14:25:15 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195010539714265138/image.png?ex=65b26f4a&is=659ffa4a&hm=95c9c295dbeb6dc9386f61e5b8df02193e96f7cc2cf753cfb9003979ea709e67&
14:25:31 <_jgr_> Making it use less memory is an easier job, and more likely to actually move the needle
14:26:51 <kuhnovic> That definitely helps, especially if you can do things in a more cache-optimal way. But one thing at a time ๐Ÿ˜›
14:27:52 <peter1138[d]> It's important to shave 10ยตs off a task that only runs once a year ๐Ÿ™‚
14:28:17 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195011304310718504/image.png?ex=65b27001&is=659ffb01&hm=8915241113abe16f96b80d5453d6e1baf83b5fc05669d34471f6121960f81544&
14:28:17 <xarick> I switch to cmake targets view?
14:29:27 <xarick> found it!
14:29:29 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195011607026208860/image.png?ex=65b27049&is=659ffb49&hm=488abb4fdaba6ae5ec6343a43b079406800028dac8f2df0260fb518f6676a753&
14:32:43 <xarick> nop, diagnostics still doesn't let me
14:32:50 <xarick> still gray
14:42:38 <xarick> there is no data in the current set of filters, it's too fast!
14:47:47 <xarick> hmm how do i make it collect data multiple times?
14:48:23 <xarick> multiple samples of this ForceUpdate
14:49:16 <xarick> akin to TICC TOCC, but within visual studio, I wanna look at CPU Usage
14:55:08 <xarick> managed something! Customizable breakpoints
14:58:22 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195018876321280201/image.png?ex=65b2770e&is=65a0020e&hm=90190c3c7e499748d63e40223e150fbea736dfc611151442b00039079a47f8fa&
15:02:38 <kuhnovic> Can you take a screenshot of your performance profiler tab?
15:03:20 <kuhnovic> I'm using VS2022 community btw
15:05:30 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195020669872787577/image.png?ex=65b278ba&is=65a003ba&hm=250a741d3cb6c35f9214a9b3a4b046a022bba1ea58df99443fde7e52ae2694c3&
15:06:23 <kuhnovic> Oh nice, it's working
15:06:42 <xarick> this is from the diagnostic tools
15:08:46 <xarick> at this pace, I tihnk im gonna need 10000 samples
15:10:19 <kuhnovic> I don't worry about the sample amount, the defaults are generally "good enough"
15:10:35 <kuhnovic> https://cdn.discordapp.com/attachments/1008473233844097104/1195021948632186893/image.png?ex=65b279ea&is=65a004ea&hm=0203d072da5d17aeea37e14181ce5437ab0b3f6f6e9c41a43b6051a4f63b1d82&
15:10:35 <kuhnovic> And I find the Call Tree window especially helpful, but you do you
15:16:26 <kuhnovic> xarick: This is typically not what's going on. Remember that you are compiling in Release (with debug info) mode. As a result a lot of optimizations are happening, such as inlining functions. You'll never get a hit no matter how many samples you add.
15:18:56 <kuhnovic> And I feel you're still missing the point. Rather than looking at what the effect is of your small local optimization, look at the bigger picture instead. Which functions take up most of the time? Look at the high level functions with big numbers and work your way down the call stack. This is where the big gains are.
15:21:09 <kuhnovic> It will take a bit of time to get good at it, but at least you'll be chasing actual performance problems. Not things that you think or assume are problems while they really aren't.
15:23:09 <kuhnovic> (Trust me, I'm stubborn myself. It took me a while to accept this fact ๐Ÿ˜› )
15:57:35 <peter1138[d]> SQL queries that require deferrable constraints are... probably design of a smell.
16:12:26 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195037513652387910/image.png?ex=65b28869&is=65a01369&hm=4cc96c52996a77bf49df1401c47f74940bf2b6081261ce495d4e3b3325f2ff69&
16:12:31 <xarick> too cheap
16:13:34 <xarick> checking depot tile is cheaper than
16:13:41 <xarick> tiletrackdir
16:14:56 <xarick> in 2 months it registered 1000 ForceUpdates
16:15:07 <xarick> 14 AIs just started
16:16:33 <xarick> next 1000 updates in just 16 days
16:20:34 <xarick> this isn't helping
16:21:55 <xarick> can't seem to get a substancial amount of samples
16:23:04 <xarick> it's either too light, or I'm doing it wrong
16:23:30 <kuhnovic> If you want to focus on that function alone, just make sure it's pretty much all that's being called. Just add a for loop that calls the update function 1000 times where normally one call would be done
16:23:58 <kuhnovic> But then you are assuming that that function is the bottleneck
16:23:59 <merni> xarick: is there such a thing :p
16:24:40 <xarick> oh, good idea, while true loop time
16:25:57 <kuhnovic> But if ForceUpdate is eating up 0,03% of total CPU, is it really worth looking at that function?
16:27:07 <xarick> I think so, it's the one I'm changing
16:27:47 <merni> seems like circular reasoning
16:28:21 <merni> "I think it's an issue because I'm changing it, I'm changing it because I think it's an issue"
16:28:44 *** nielsm has joined #openttd
16:28:48 <xarick> im not focused on the others
16:29:25 <merni> if you want to have some impact on performance, maybe you should be...
16:34:53 *** Wormnest has joined #openttd
16:54:30 <kuhnovic> The numbers don't lie. Sure, you might be able to change that 0,03% into a 0,02%. But that's just not worth the trouble.
17:06:46 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195051188807278692/image.png?ex=65b29526&is=65a02026&hm=edfc47eccbbd05d0c3112742a7a268899548a7661b8ee5bf667d45a3ed2590bd&
17:06:46 <xarick> ah this is the kind of thing I wanted
17:07:22 <xarick> however, this was forced with a loop repeating 1000 times, unnatural
17:08:41 <_glx_> if you need artificial calls to see it, then it doesn't really need to be improved
17:11:57 <peter1138[d]> "Let's make it slower to see if it needs to be made faster"
17:12:15 <xarick> yeah, exactly
17:16:18 <kuhnovic> Debug or release build?
17:18:03 <xarick> RelWithDebInfo
17:28:40 <peter1138[d]> Hmm, this query is going through the motions but never doing anything :
17:28:44 <peter1138[d]> ๐Ÿ˜’
17:32:49 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195057744621879327/image.png?ex=65b29b41&is=65a02641&hm=058cd6a637b15dad69ec111e5ac3111f54b5c091a2aea9fe5981984a6710eab3&
17:32:49 <xarick> the entire map regions Force Updated once, on a savegame with 5000 ships
17:33:00 <xarick> no repetition
17:33:28 <xarick> on my code, mind you, sorry, didn't test the original
17:41:21 <peter1138[d]> Split the transaction into smaller pieces and its now working, but... wtf...
17:42:29 <peter1138[d]> I'd expect an exception if a transaction fails ๐Ÿ˜ฎ
18:14:09 <xarick> there's WaterRegionPatchDesc, WaterRegionDesc and WaterRegion
18:15:48 <xarick> if i have a TWaterRegionIndex, why can't i use it to get the WaterRegion
18:16:14 <xarick> I don't have the tile
18:38:54 <xarick> I can't do something so simple, it drives me crazy
18:39:20 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/94d31864b3c2bd432c7fd6e9a4722926678b722a
18:39:21 <DorpsGek> - Update: Translations from eints (by translators)
18:40:20 <peter1138[d]> "Seems early" ... "Oh shit, I forgot to stop working"
18:41:38 <xarick> ` const WaterRegionPatchDesc &patch = n.m_key.m_water_region_patch;
18:41:38 <xarick> const WaterRegionDesc &region(patch);`
18:41:38 <xarick> next step is getting to WaterRegion, I don't know how to do this
18:41:44 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11378: Change: Use Town Production Effect for town cargo production https://github.com/OpenTTD/OpenTTD/pull/11378
18:44:13 <_glx_> hmm no we have <https://github.com/OpenTTD/OpenTTD/blob/master/src/script/api/script_list.cpp#L870>, I guess we could remove <https://github.com/OpenTTD/OpenTTD/blob/master/src/script/api/script_list.cpp#L917-L925>
18:45:05 <peter1138[d]> Makes sense.
18:46:09 <peter1138[d]> They both limit total the valuate call, not per item?
18:46:31 <_glx_> yes it's total run
18:46:43 <kuhnovic> xarick: The Desc classes are public class for whoever is using the water regions, they are part of the API. WaterRegion is the internal implementation and not meant to be used directly.
18:46:52 <_glx_> we could limit per item
18:47:06 <_glx_> it's a matter of moving the limiter
18:48:55 <_glx_> the limiter limits to MAX_VALUATE_OPS (plus maybe some ops)
18:49:42 <_glx_> while the other check depends on what happened before the valuate call
18:50:39 <_jgr_> Valuate calls aren't interruptible, and the motivation is to prevent scripts from blocking progress for excessively long
18:50:58 <_jgr_> A per-item limit wouldn't really achieve that
18:51:55 <_glx_> yes and the new limiter is nice because it catches infinite loops inside the valuator
18:55:41 <xarick> well, and this is how I lose 3 days
18:55:50 <xarick> trying to do something and still unable to
18:57:15 <xarick> if WaterRegion is inaccessible, how do I get to check its tiles
18:59:09 <_jgr_> If you already have the ID, you can trivially turn it back into a the start tile index
19:00:04 <_jgr_> That said, if you're doing your own patch, you can just add methods as necessary to make thigns accesible
19:00:08 <xarick> i need access to its members
19:00:12 <xarick> one or 2
19:14:37 <peter1138[d]> _glx_: yeah, might as well remove the old one.
19:20:03 *** Wolf01 has joined #openttd
19:36:16 <xarick> *cough* remove both
19:37:10 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11721: Fix: [Script] Improve ScriptText validation https://github.com/OpenTTD/OpenTTD/pull/11721#pullrequestreview-1816420588
19:37:48 <xarick> ๐Ÿ™„
19:39:04 <Rubidium> yeah, just remove the limit and valuate ;)
19:49:48 <xarick> suspend more times instead of kill
19:52:08 <Rubidium> so, just implement it
19:53:00 <xarick> one day I will try
20:05:36 <xarick> TVisitWaterRegionPatchCallBack these names are gigantic
20:24:22 <_glx_> I just did a quick test to see how much ops is the vehicle filter function in regression test (6 ops), and MAX_VALUATE_OPS / max vehicle pool size 7,8125, so for simple function the limit is fine
20:25:29 <_glx_> oh and using an API function as filter cost nothing
20:26:50 <_glx_> while valuate cost is at least 5 per item
20:35:00 <peter1138[d]> Hmm, I need to define a couple of values that are only used when loading old saves... won't where to put them.
20:35:06 <peter1138[d]> *wonder where
20:35:31 <peter1138[d]> Cargo-related value.s
20:36:02 <_glx_> something similar already exists
20:36:20 <_glx_> check *Handler
20:37:21 <_glx_> some use local variables because they just discard the values, some use globals for AfterLoad
20:38:36 <peter1138[d]> Ah, no I don't need to do that. I need to replace CT_PASSENGERS and CT_MAIL which are used a array indices with something else as those have different values "now"
20:39:03 <peter1138[d]> I used literal "0" and "2" during test, but that's a bit magic.
20:39:46 <peter1138[d]> It's needed by both `town_sl.cpp` and `oldloader_sl.cpp` which is why I'm looking for somewhere to share a definition.
20:40:30 <peter1138[d]> I guess I could just put it in `cargo_type.h`
20:45:23 <peter1138[d]> Hmm, maybe I could just document the 0 and 2 ๐Ÿ™‚
20:48:46 <frosch123> if you put it into the saveload folder (saveload/oldcargos.h or something), you do not have to taint cargo_type.h
20:49:36 <frosch123> but if it is only about pax and mail, i guess 0 and 2 is fine
20:52:05 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #11753: Fix #11485: new run on same line must not use last_space of previous run https://github.com/OpenTTD/OpenTTD/pull/11753
20:54:11 <Rubidium> can't reproduce #11752; might be an issue with the Windows layouter, or might I need a specific font for that?
20:54:26 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #11754: Revert a2edf52: SQOpsLimiter does a more precise job https://github.com/OpenTTD/OpenTTD/pull/11754
20:55:16 <_glx_> frosch123: yeah magic values in AfterLoad are expected
21:00:10 <xarick> how do I calculate the diag dir between water regions, if that is a thing
21:01:37 <xarick> I have a region and the parent region, I wanna find out from which edge tile(s) they're connected
21:02:48 <xarick> i might have a problem with aqueducts
21:03:24 <xarick> but for now, let's assume the ship goes from a region to another
21:03:33 <xarick> by sea
21:05:05 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #11721: Fix: [Script] Improve ScriptText validation https://github.com/OpenTTD/OpenTTD/pull/11721
21:10:16 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11753: Fix #11485: new run on same line must not use last_space of previous run https://github.com/OpenTTD/OpenTTD/pull/11753#issuecomment-1887966960
21:13:45 <Rubidium> hmm...
21:14:13 <Rubidium> oh dear...
21:17:32 <peter1138[d]> Arguably one way is less broken than the other, at least ๐Ÿ™‚
21:21:03 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #11753: Fix #11485: new run on same line must not use last_space of previous run https://github.com/OpenTTD/OpenTTD/pull/11753
21:23:10 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11753: Fix #11485: new run on same line must not use last_space of previous run https://github.com/OpenTTD/OpenTTD/pull/11753#issuecomment-1887984571
21:25:17 *** gelignite has joined #openttd
21:26:45 *** virtualrandomnumber has joined #openttd
21:26:58 <peter1138[d]> Did you change something?>
21:27:02 *** virtualrandomnumber has quit IRC ()
21:28:01 <Rubidium> I hope so
21:28:02 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #11753: Fix #11485: new run on same line must not use last_space of previous run https://github.com/OpenTTD/OpenTTD/pull/11753
21:28:10 <Rubidium> that's better
21:28:42 <_glx_> add and push -f without commit ?
21:29:09 <Rubidium> commit without -a :(
21:29:16 <_glx_> happens too
21:31:04 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:50:13 <peter1138[d]> ICU layouting is weird too.
21:50:26 <peter1138[d]> Missing fragments of words.
21:53:36 <peter1138[d]> Or sentences, rather.
21:54:33 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1195123612231929956/image.png?ex=65b2d899&is=65a06399&hm=a1d735112e5c02d95ab9bf86a35dcf9ca2d244425e1b3a138a05eaf3d0f28f97&
21:54:33 <peter1138[d]> Same text wrapped at different points with different bits missing.
21:56:46 <Rubidium> the second line on the left smells like it's counting characters from the start of the line, but it should've from the start of the run or something
21:59:12 *** gelignite has quit IRC (Quit: Stay safe!)
22:00:15 *** moll has quit IRC (Quit: "If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs.")
22:24:45 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:57:31 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:59:44 <xarick> how do I name a lambda, '<lambda_8182a87606cf7dee770f73f3b1e6784b>::operator()' - this name is ugly
23:03:19 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #11755: Fix: Build button text when train purchase window using "Engines" filter https://github.com/OpenTTD/OpenTTD/pull/11755
23:07:16 <DorpsGek> [OpenTTD/OpenTTD] James103 opened issue #11756: [Bug]: Nightly builds are failing since January 10 https://github.com/OpenTTD/OpenTTD/issues/11756
23:08:38 <_glx_> again ?
23:09:40 <_glx_> ah indeed, looks like rust doesn't like the old linux
23:16:53 <xarick> i think i finally did it, can't believe it was so simple
23:17:07 <xarick> but it looks a bit spaghetti
23:18:29 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #11756: [Bug]: Nightly builds are failing since January 10 https://github.com/OpenTTD/OpenTTD/issues/11756
23:18:44 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1195144798504489050/Screenshot_from_2024-01-12_04-48-07.png?ex=65b2ec54&is=65a07754&hm=5d55343af7fe04613a7a0b9d14a4f5dbd73ee685f811cc7b1fed6bf508996fa0&
23:18:44 <locosage> dunno if it was reported
23:20:26 <xarick> alright, i need now a biiig distance depot to see how this restrict thing works
23:23:03 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:23:32 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #11755: Fix: Build button text when train purchase window using "Engines" filter https://github.com/OpenTTD/OpenTTD/pull/11755#pullrequestreview-1817009615
23:23:37 <xarick> m_intermediate_dest_tile = GetWaterRegionCenterTile(water_region_patch); woah, that's gonna ruin costs for real
23:24:05 <wensimehrp> peter1138[d]: How did openttd handle non-latin languages in storybooks?
23:25:00 <_glx_> story book uses the same string format as openttd
23:25:28 <wensimehrp> I mean, openttd, not storybooks.
23:42:09 <peter1138[d]> I don't understand the question.
23:43:49 <xarick> what's the opposite of push_back? push_front doesn't exist
23:45:18 <xarick> it's a std::vector
23:45:48 <peter1138[d]> insert (but it's slow)
23:45:56 <_glx_> vector doesn't have push_front
23:46:24 <xarick> insert didn't compile
23:47:08 <_glx_> insert(begin(), value)
23:47:10 <xarick> oh, it needs more parameters
23:47:17 <xarick> I see, thanks
23:47:43 <_glx_> but if you need to do it a lot it might be better to use a different container
23:48:18 <xarick> for (int i = 0; i < max_returned_path_length - 1; ++i) {, as many as whatever that max value is
23:51:08 <xarick> max_returned_path_length = NUMBER_OR_WATER_REGIONS_LOOKAHEAD + 1
23:51:14 <xarick> 4 + 1 - 1
23:52:33 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1195153308113969292/image.png?ex=65b2f441&is=65a07f41&hm=dcedd545d2748fb06ccb3600bcefed8b83ef059b82a14a7240ff19ab2a5da589&
23:52:33 <xarick> this still looks wrong, I wonder
23:53:52 <xarick> does it mean I have to fast forward to the last parents
23:56:55 <xarick> is there an easy way to count how many node->m_parent; remain? I guess there is
23:57:04 <xarick> I want the last ones
23:57:07 <xarick> not the first ones