Times are UTC Toggle Colours
00:28:15 *** Mek has quit IRC 00:28:40 *** Mek has joined #openttd 01:14:29 *** Wolf01 has quit IRC 02:32:15 *** tokai|noir has joined #openttd 02:32:15 *** ChanServ sets mode: +v tokai|noir 02:39:26 *** tokai has quit IRC 03:09:15 *** D-HUND has joined #openttd 03:12:36 *** debdog has quit IRC 04:01:53 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler reopened issue #12654: [Bug]: Catchment area gets deselected when expanding a station https://github.com/OpenTTD/OpenTTD/issues/12654 04:02:55 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #12654: [Bug]: Catchment area gets deselected when expanding a station https://github.com/OpenTTD/OpenTTD/issues/12654 04:17:04 *** Smedles_ has joined #openttd 04:20:15 *** Smedles has quit IRC 04:29:42 *** keikoz has joined #openttd 04:47:28 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/26ae50baf9323d5593e930f6450417cd190cbb1d 04:47:29 <DorpsGek> - Update: Translations from eints (by translators) 05:29:13 *** Flygon has joined #openttd 05:31:05 *** Mek has quit IRC 05:31:34 *** Mek has joined #openttd 05:43:21 *** keikoz has quit IRC 05:48:16 *** Mek has quit IRC 05:51:03 *** keikoz has joined #openttd 05:57:47 *** Smedles has joined #openttd 06:05:25 *** Smedles_ has quit IRC 06:07:09 *** soylent_cow[m] has joined #openttd 06:07:10 <soylent_cow[m]> weird.... can't see .scn files with ls, but load_scenario filename totally worked 06:07:41 *** Mek has joined #openttd 06:15:48 *** Mek has quit IRC 06:20:27 *** Mek has joined #openttd 06:28:31 *** Mek has quit IRC 06:33:12 *** Mek has joined #openttd 07:19:11 <Rubidium> soylent_cow[m]: load_scenario (and load) are a bit magic as they will look in multiple folders, whereas ls only shows the content of one folder 07:21:47 <soylent_cow[m]> the thing is, it wouldn't show the file after i cd into the correct folder, though it shows folders and sav files in a current folder 07:28:28 *** D-HUND is now known as debdog 07:45:07 *** nielsm has joined #openttd 07:49:24 *** asasnat has quit IRC 08:02:29 *** Wolf01 has joined #openttd 08:09:22 <peter1138> Hmm, vector vs unordered_map? 08:13:31 <peter1138> | master | vector | unordered_map | 08:13:31 <peter1138> | ------- | ------ | ------------- | 08:13:31 <peter1138> | 597853 | 164 | 121 | 08:13:31 <peter1138> | 1073950 | 75 | 113 | 08:13:39 <peter1138> Pff, no markdown here ๐ญ 08:23:33 <michi_cc[d]> So O(1) versus O(n), except that nobody is telling you how big the O really is? 08:27:05 <peter1138> Right. 08:28:33 <peter1138> However the second result seems invalid. 08:29:01 <peter1138> Turns out if you have too many vehicle NewGRFs loaded then AIs will not build anything for some reason. 08:29:26 <peter1138> But master was slower as not building anything. 08:29:30 <peter1138> *at 08:35:00 <peter1138> Anyway, it's basically noise at this point, this is 100,000 iterations of finding an element, which should be quick for unordered_map. fairly quick for vector (binary search) and slow for linear search (master) 08:35:13 <peter1138> Approximately 19,000 elements. 08:36:58 <peter1138> Probably. 08:38:00 *** k-man has quit IRC 08:38:01 <peter1138> So the issue with the callback approach is having to repeat it for every engine type. Concurrent act2ids... 08:40:10 <peter1138> 16 bit action 2 ids would fix things. 08:41:26 <peter1138> Or, perfect for NFO but useless for NML, an act2 that links back to a previous act2 by NFO line number! 08:42:03 <peter1138> act2 labels 08:42:56 <peter1138> Huh, that might even be a workable idea. 08:44:31 <peter1138> No, gotos are harmful. It's a jump ๐ 08:45:50 <peter1138> 16 bit IDs might be simplerthough. 08:46:47 <peter1138> Although actually they'd be 15 bit, because we need to distinguish between callback result and act2 id. 08:46:57 <peter1138> Yes but no change there. 08:48:37 <peter1138> Ok, even with no-expire off, these AIs still didn't build anything 08:59:18 <peter1138> Hmm, desync. 08:59:35 <peter1138> (Or rather different game state) 09:21:20 *** Wolf01 has quit IRC 09:23:56 *** Wolf01 has joined #openttd 09:59:45 *** k-man has joined #openttd 10:30:02 <peter1138> Well. 10:40:56 <Rubidium> ... computer says it's lunch time but phone says it's not 10:44:56 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13109: Codechange: Use std::visit for ScriptDataVariant and ScriptText::Param https://github.com/OpenTTD/OpenTTD/pull/13109#pullrequestreview-2456386148 10:55:45 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13109: Codechange: Use std::visit for ScriptDataVariant and ScriptText::Param https://github.com/OpenTTD/OpenTTD/pull/13109 10:58:21 <peter1138> uint8 substitute_id; ///< The (original) entity ID to use if this GRF is not available (currently not used) 10:58:23 <peter1138> Can I get rid of this? 10:59:58 <peter1138> Oh, FinaliseEngineArray uses it. 11:02:09 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112#issuecomment-2495440459 11:05:52 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112#issuecomment-2495441303 11:10:15 <johnfranklin> andythenorth: Anything sweet cannot be lunch. 11:14:05 <xarick> hi 11:21:12 *** HerzogDeXtEr has quit IRC 11:39:11 *** benjaminv has quit IRC 11:42:04 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13114: Codechange: Tidy up GRFParameterInfo. https://github.com/OpenTTD/OpenTTD/pull/13114#pullrequestreview-2456393414 11:48:26 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13089: Codechange: Avoid unnecessary re-reads/seeks in RandomAccessFile::ReadBlock https://github.com/OpenTTD/OpenTTD/pull/13089 11:53:04 <peter1138> memset ๐ญ 11:53:27 <peter1138> Eh, memcpy ๐ญ 11:54:35 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13107: Change: Treat recolour sprites as regular sprites in the SpriteCache. https://github.com/OpenTTD/OpenTTD/pull/13107#pullrequestreview-2456395031 11:56:51 <johnfranklin> Rain 11:57:02 <belajalilija> rain here also 11:57:31 <belajalilija> we have currently a yellow snow warning i think (idk i dont pay attention to the news much) but it is 5c here 11:57:40 <belajalilija> yes 12:01:13 <LordAro> teehee, yellow snow warning 12:12:59 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112 12:13:32 <peter1138> (HasBit instead of array, maybe) 12:13:55 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13114: Codechange: Tidy up GRFParameterInfo. https://github.com/OpenTTD/OpenTTD/pull/13114 12:14:49 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13107: Change: Treat recolour sprites as regular sprites in the SpriteCache. https://github.com/OpenTTD/OpenTTD/pull/13107 12:15:37 <peter1138> Oops, that push doesn't work. 12:15:41 <johnfranklin> Fuck, the bus missed me waiting at station. 12:16:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112 12:16:58 <peter1138> Must have accidentally ctrl-z 12:18:07 <peter1138> Hmm, suboptimal, tbh. 12:24:13 <peter1138> A single value for first visible column should be enough. 12:40:46 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112 12:40:57 <peter1138> Different solutions all over the place. 12:46:37 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #13113: Fix #13110: [Script] convert table keys to string when generating JSON https://github.com/OpenTTD/OpenTTD/pull/13113 12:46:40 <DorpsGek> [OpenTTD/OpenTTD] glx22 closed issue #13110: [Crash]: CTD when calling GSAdmin.Send https://github.com/OpenTTD/OpenTTD/issues/13110 13:25:35 <peter1138> Oh, turns out I do need forward and reverse lookups :/ 13:44:04 <mnhebi> but what about right and left 13:58:41 <peter1138> Hmm, I think I can get the info from grf_prop instead. 14:09:02 <kuhnovic> I made a benchmarking setup for YAPF a while ago, and I'm using it to test a little improvement I've made to the AddNewNode logic. I'm wondering if someone wants to run it on their machine to see if the same results roll out on different machines / OS'es. https://github.com/Kuhnovic/OpenTTD/tree/yapf_benchmarking 14:09:03 <peter1138> mnhebi: Do I need a kdtree of kdtrees? 14:09:53 <peter1138> Maybe kdtree of std::vector of std::pairs of kdtrees. 14:09:56 <mnhebi> no no, a switch tree of switch trees. 14:10:13 <peter1138> if/else-if/else conditions 14:10:37 <kuhnovic> To run it: Build my branch in release with asserts disabled. Run the game with -d -g <savegame>, and look at the debug output. Wentbourne is a good candidate as usual. 14:14:27 <kuhnovic> This is what I get (I shared this a while ago already): 14:14:27 <kuhnovic> `[2024-11-23 15:13:52] dbg: [yapf:0] 0xc1396e5040 ^ : runs = 1107, results skipped = 13 (1.2%), ratio = 0.9974 (0.26% faster) 14:14:27 <kuhnovic> [2024-11-23 15:13:53] dbg: [yapf:0] 0xc1396f9ef0 t : runs = 601, results skipped = 8 (1.3%), ratio = 0.9856 (1.44% faster) 14:14:27 <kuhnovic> [2024-11-23 15:13:53] dbg: [yapf:0] 0xc1396f5250 w : runs = 1654, results skipped = 36 (2.2%), ratio = 0.9624 (3.76% faster) 14:14:27 <kuhnovic> [2024-11-23 15:13:53] dbg: [yapf:0] 0xc1396fc960 r : runs = 2410, results skipped = 31 (1.3%), ratio = 0.8358 (16.42% faster)` 14:15:53 <kuhnovic> ^ = ships (high level) , t= trains, w = ships (low level), r = road vehs. I'm extremely curious if this hold up for other people. This is running Wentbourne for a few minutes. The results are all summed to they converge after a while. 15:01:20 <LordAro> peter1138: i would like to report a bug 15:01:29 <LordAro> https://fuzzle.org/~petern/ottd/wentbourne.sav opens as a text file :p 15:01:38 <peter1138> ๐ฎ 15:03:36 <Wolf01> hmmm, I think I found a bug in factorio ๐ซข 15:04:50 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073 15:05:03 <peter1138> (Bloats EngineInfo again :o) 15:05:22 <Wolf01> Linked a roboport to a buffer chest and set the content from logistic network, it started to fill it with flamethrowers requests... which I don't have anywhere, lol 15:07:07 <peter1138> Did the dethrobulator not garble the manifold preprocessor into a slot bucket bin? 15:12:15 <LordAro> kuhnovic: https://gist.github.com/LordAro/906b3b31867681e36afb8272b23331fa 15:12:59 <kuhnovic> Thanks LordAro. That seems pretty consistent with what I get. 15:15:37 <kuhnovic> I do wonder if I'm using the right metrics. Right now I'm taking the average duration of YAPF implemnation A and B (the nanobench framework runs it X times and takes the average). I then sum that average duration over time between different calls to YAPF. The final performance increase number is then simply the ratio between "total duration A" and "total duration B". 15:19:11 <LordAro> summing averages can get a little wonky 15:19:34 <LordAro> but i think in general it's fine? 15:19:37 <kuhnovic> That does skew the results towards PF calls that take longer, as they contribute more to the average. ANother metric could be calculating the average ratio between A and B, taking the sum of those ratio's over time and calculating the average of that. That would mean each comparison would have the same "weight", but I feel it leads to less objective results. In the end "less total time spent" is 15:19:37 <kuhnovic> what the user is going to notice, not some theoretical improvmenet ratio. 15:20:47 <peter1138> Although if you manage to make it super fast for most things but result in a 1 second call every so often... 15:22:13 <kuhnovic> You would notice that as jitter, but I see your point 15:22:44 <kuhnovic> Statistics. The witchcraft of the academic world. 15:28:41 <peter1138> Oh, failing in windows. 15:30:00 <peter1138> Ah, vector in a constexpr object. 15:30:29 <peter1138> gcc and clang just don't care. 15:38:39 <mnhebi> :thisisfine: 15:42:58 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073 16:00:52 <xarick> i have a weird question 16:01:15 <xarick> in a vector with TileIndex elements, is it faster to use emplace_back or push_back? 16:12:07 <mnhebi> depends on the code. 16:12:38 <peter1138> "No." 16:22:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073 16:34:21 <xarick> how do I run that kind of script that runs console commands? 16:34:42 <xarick> when a newgame is created i want it to do newgame again ๐ infinite newgame loops 16:36:15 <xarick> are those scripts no longer available with openttd? 16:57:37 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073#pullrequestreview-2456441044 16:59:41 <peter1138> Moar 17:00:36 *** ahyangyi has quit IRC 17:01:55 <xarick> can i place scripts folder in the documents folder? 17:03:35 <peter1138> Hmm, this is probably going to be slower :S 17:05:31 <peter1138> Eh, it's not. 17:06:24 *** D-HUND has joined #openttd 17:06:29 <peter1138> Well, that's better, my reverse lookup is now THE lookup, there's no forward lookup any more. 17:09:09 *** D-HUND has quit IRC 17:18:26 <xarick> I can, but the newgame command doesn't run 17:18:35 <xarick> not sure if bug or intended 17:20:15 <peter1138> 637595us -> 76us... eh. 17:34:17 <xarick> CreateDesertOrRainForest can be made 1 second faster out of 5 17:34:33 *** XYZ has joined #openttd 17:34:59 <xarick> replace all table/genland.h from TileIndexDiffC to TileIndexDiff 17:35:29 <xarick> go for it? 17:36:34 <xarick> maybe a bad idea 17:38:23 *** D-HUND has joined #openttd 17:40:43 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13117: Codechange: Sort Engine ID mapping for fast lookups https://github.com/OpenTTD/OpenTTD/pull/13117 17:42:47 <xarick> openttd fast 17:43:44 <peter1138> 77ยตs per 100,000 calls is not accurate as it's that's well within TicToc's noise level. 17:43:51 <peter1138> But the difference... well. 17:46:25 <peter1138> Added a missing stat... 17:50:41 <peter1138> Maybe it's not actually working... 17:51:01 <peter1138> I did test before & after results, but changed it a bit since. 17:51:29 <xarick> this check is weird <https://github.com/OpenTTD/OpenTTD/blob/681b1928b4fc54f0701fe21f091227ff180185a5/src/landscape.cpp#L958C1-L964C4> 17:51:52 <xarick> if the tile is invalid, it allows desert? 17:54:04 <peter1138> Ah, I can't use the old way anymore anyway... 17:58:39 <peter1138> Oh yeah, 32bit size_t systems. lol 17:59:06 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13117: Codechange: Sort Engine ID mapping for fast lookups https://github.com/OpenTTD/OpenTTD/pull/13117 18:04:07 <xarick> nevermind, can't use TileIndexDiffs alone, depends on the Map size 18:04:08 <xarick> x 18:07:48 <peter1138> It's like you've forgotten what you were doing last month ๐ 18:23:44 <peter1138> Learning about excludes. 18:32:30 <mnhebi> peter1138: I thought he was doing a door to door survey.. 18:39:37 <peter1138> I'm doing a Doom to Doom survey. 18:56:11 <johnfranklin> I made some pasta for my second lunch, and the plate "accidentally" fell upside down. 18:57:42 <johnfranklin> Why is it so unlucky today... rain, bus miss me, ruined lunch... 19:11:45 <peter1138> johnfranklin: 5 second rule 19:11:52 <johnfranklin> NO 19:12:04 <johnfranklin> that was fakre 19:12:30 <johnfranklin> Anyway I have remade and eaten it. 19:25:01 *** NGC3982 has joined #openttd 19:32:39 <mnhebi> peter1138: Brutal Doom? 19:33:14 <peter1138> No, proper Doom. 19:33:43 <mnhebi> :thonk: 20:01:43 <peter1138> Well 20:03:27 *** reldred has quit IRC 20:19:32 <DorpsGek> [OpenTTD/nml] andythenorth opened pull request #345: Change: add constants for FRAX cargo classes https://github.com/OpenTTD/nml/pull/345 20:20:02 <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #345: Change: add constants for FRAX cargo classes https://github.com/OpenTTD/nml/pull/345 20:23:24 <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #345: Change: add constants for FRAX cargo classes https://github.com/OpenTTD/nml/pull/345 20:37:44 <johnfranklin> why spotify has advertisement? 20:38:06 <johnfranklin> I mean, "new way of planting advertisements" 20:38:18 <johnfranklin> after the song ends 21:21:06 *** keikoz has quit IRC 21:30:01 <DorpsGek> [OpenTTD/OpenTTD] mrslate420 commented on issue #12654: [Bug]: Catchment area gets deselected when expanding a station https://github.com/OpenTTD/OpenTTD/issues/12654 21:35:09 *** nielsm has quit IRC 21:45:20 *** Flygon has quit IRC 21:53:12 <_glx_> andythenorth: I'd say just cherry pick and add to your callback PR 21:59:01 <xarick> I did a thing to CreateDesertOrRainForest again 21:59:55 <xarick> made it 100% algorithmic generated, no recourse to "table/genland.h" 22:00:38 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13097: Change: Determine industry directory width only on visible rows. https://github.com/OpenTTD/OpenTTD/pull/13097#pullrequestreview-2456484653 22:01:02 <xarick> it's not an exact copy though 22:01:21 <xarick> doesn't generate the same, but it's a very close approximation 22:01:41 <xarick> I think I've been on this a few years ago 22:03:57 *** keikoz has joined #openttd 22:06:07 <xarick> it's "faster" 22:06:20 <xarick> very subjectively 22:07:14 <xarick> 5.4 secs to 2.4 secs 22:07:20 <xarick> on a 4k map ๐ 22:07:36 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13069: Codechange: Start using parts of std::ranges to simplify finding/counting in containers. https://github.com/OpenTTD/OpenTTD/pull/13069#pullrequestreview-2456485388 22:13:18 <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #344: Change: add vehicle 'refit' callback (cb 0x163) https://github.com/OpenTTD/nml/pull/344 22:14:38 <DorpsGek> [OpenTTD/nml] andythenorth commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) https://github.com/OpenTTD/nml/pull/344#issuecomment-2495670391 22:19:27 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1310006828901470308/image.png?ex=6743a66e&is=674254ee&hm=f22aae5c68bdfe894ee6f6434eabebd70100b84c40ca44177ed7c7cf0679b8f4& 22:19:27 <xarick> time for a stupid test: 22:19:38 <xarick> oops 22:20:14 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1310007027585650809/image.png?ex=6743a69e&is=6742551e&hm=7205d72014c36ed1af9bbefe89988c7e6fe534b3fa2bd4d660a0ab21bd4e2d52& 22:29:58 *** keikoz has quit IRC 22:30:21 <xarick> [2024-11-23 22:29:43] dbg: [misc:0] [EmplaceBack] 4157371 us [avg: 4157371.0 us] 22:30:21 <xarick> [2024-11-23 22:29:47] dbg: [misc:0] [PushBack] 4114057 us [avg: 4114057.0 us] 22:32:30 <herringland> herringland: Spent some time working on bananas-api today, built out a half-decent test environment, I'll be documenting this for the next person who wants to do work on this. I think I found a couple solutions that will work! I'll be adding two new ways to authenticate the user, with the `GITHUB_TOKEN` provided in Github Actions, or with a Personal Access Token. NewGRF deployment pipelines coming 22:32:30 <herringland> soon ๐ 22:37:55 <talltyler> andythenorth: The โlatestโ versions linked in the NML PRs have a lot of cabbage remaining, not sure if thatโs intended ๐ 22:44:50 *** Wolf01 has quit IRC 23:16:18 <truebrain> herringland: Nice! And isnt a GITHUB_TOKEN identical to a PAT from an authentication point of view? 23:16:55 <truebrain> As in, isn't a single new flow sufficient for both? ๐ 23:21:15 <herringland> truebrain: No, it's not unfortunately. You use Basic Auth (Username + PAT as PW) for PAT auth, you can use the GITHUB_TOKEN as a Bearer token. 23:21:30 <herringland> (Just had to test this to make sure I wasn't overcomplicating it :P) 23:21:51 <truebrain> Do know 'username' can be anything with a PAT 23:21:57 <truebrain> But Basic Auth? 23:22:21 <truebrain> That is oldskool shit right there ๐ 23:23:06 <truebrain> And yeah, true. You first need to retrieve an access token based on the PAT 23:23:22 <truebrain> The GT ofc already is an access token 23:23:25 <truebrain> Makes sense 23:23:39 <herringland> truebrain: Lol scratch that, wrote a bad header (Authentication instead of Authorization) :facepalm: 23:23:47 <herringland> you can use the PAT as a bearer 23:23:56 <truebrain> Haha, okay 23:23:58 <herringland> or as Basic auth? wacky 23:24:55 <truebrain> Possibly for compatibility with different software 23:25:07 <truebrain> There is still stuff out there that doesn't support Authorization header 23:25:45 <herringland> yeah, I know it's how you do git on the command line 23:25:57 <truebrain> Also most likely the reason the username can be anything 23:26:06 <truebrain> Just converted to a Bearer anyway ๐ 23:26:28 <truebrain> Anyway, great you got it to work etc ๐ 23:26:51 <truebrain> Improvements to the README etc are very welcome. Just keep the PRs small and manageable please ๐ 23:27:03 <herringland> totally, will be breaking all these up ๐ 23:27:11 <truebrain> I rather have 10 small PRs than one "fixed everything" ๐ 23:27:18 <truebrain> Tnx ๐