IRC logs for #openttd on OFTC at 2024-11-11
โด go to previous day
02:31:29 *** ChanServ sets mode: +v tokai
02:38:29 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
03:20:22 *** Wormnest has quit IRC (Quit: Leaving)
03:26:09 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:45:47 <DorpsGek> - Update: Translations from eints (by translators)
05:00:39 *** D-HUND is now known as debdog
06:46:03 <andythenorth> PeterNviaGitHub: ๐ just in time for me being done with cargo classes! A new project ๐
06:54:54 *** SigHunter has quit IRC (Remote host closed the connection)
06:55:55 *** SigHunter has joined #openttd
07:16:18 <DorpsGek> - Add: summary for week 45 of 2024 (by OpenTTD Survey)
09:01:56 *** keikoz has quit IRC (Ping timeout: 480 seconds)
09:30:44 <kuhnovic> After having used windows 11 for a while on my work machine, I can only conclude that I truly hate it
09:35:43 *** reldred has joined #openttd
09:35:43 <reldred> yeah it's not great hey
09:36:00 <reldred> feels like a relationship that steadily gets more and more abusive.
09:36:42 <truebrain> kuhnovic: I do not share that opinion ๐
09:37:13 <truebrain> Even worse, I truly appreciate it more than Win10
09:37:13 <reldred> I love it when Explorer just decides to slowly flake out over a day
09:37:43 <reldred> right click menu just stops working, etc.
09:38:19 <reldred> Seems to be worse on any file with a cloud storage provider backing. At first I thought it was just my home machine with nextcloud, but no, I get the same behavior on my brand new work computer with onedrive...
09:51:29 <peter1138> I hated the random start menu adverts.
09:51:55 <peter1138> (Adverts for Microsoft services, not malware-type adverts)
09:56:25 <peter1138> Hmm, is it possible to host an html file directly on github or does it need to be deployed somewhere.
09:58:39 <LordAro> yeah, needs to be deployed
10:03:58 <kuhnovic> Today I wanted to create a CMakeLists.txt, but when I used the right-click -> New menu, the Text Document was gone. This just sums up my general problem with Win11: small but very annoying things that require registry fixes to disable.
10:04:20 <kuhnovic> To be fair, I just did a windows update and now it seems to be back
10:05:48 <mnhebi> reldred: If you got onedrive enabled, watch out win11 likes to save Documents stuff to onedrive
10:06:26 <reldred> mnhebi: Yes, I do that deliberately.
10:08:09 <LordAro> that's just onedrive, nothing to do with win11
10:08:31 <reldred> Nextcloud does the exact same thing
10:08:46 <reldred> Seems to be anything using the cloud file provider backend
10:09:12 <reldred> Same symptoms on two seperate machines using two seperate cloud backends
10:12:30 <peter1138> I only tested it compiles, I assume it still works.
10:13:17 <peter1138> Why don't you do that?
10:13:27 <xarick> I'm too slow and cumbersome
10:13:55 <peter1138> You get distracted by trying to find everything else that might be the wrong type and then finding a performance bottle neck... ๐
10:20:53 <johnfranklin> Launching Microsoft Office. There is "office plus" advertisements even if I have the license.
10:23:35 <peter1138> Hmm, coming up to nearly 2 years back on Linux full-time.
10:23:59 <peter1138> Though maybe it took some time after installation to actually be using it full time again.
10:24:23 <andythenorth> I have been on Unix for about 23 years or so
10:25:10 <LordAro> at some point i should fix my bootloader such that i can actually boot into my linux drive
10:25:18 <LordAro> it's been... 9 months?
10:25:49 <andythenorth> what was the Slashdot thing? This might finally be the year of the Linux desktop?
10:26:17 <LordAro> this might happen sooner if i actually upgrade to win11
10:26:33 <reldred> yฬตฬอeฬถฬฬaฬทฬฬพrฬธออ ฬตอฬoฬดฬฬfฬถอ the linuxฬธออ ฬทออdฬดอesktopอฬ
10:26:46 <reldred> I might consider it, honestly
10:26:48 <peter1138> Since those days Gnome and Kde are vastly different. Not necessarily better...
10:26:54 <reldred> my portables all run linux
10:27:00 <peter1138> Windows is different but mostly the same.
10:27:16 <andythenorth> which OS has the worst packaging ecosystem?
10:27:20 <reldred> but my home desktop runs win11 as does my work laptop
10:27:23 <peter1138> They experimented with full-screen start menu and then went back. That's about it.
10:29:00 <andythenorth> why are my ears snotty?
10:32:22 <xarick> microsoft should make a linux distro or something
10:32:41 <reldred> they have a standarized distro they've made for azure
10:32:52 <reldred> yeah it's not really for desktops lol
10:59:02 <kuhnovic> Has anyone ever experienced a situation where the train pathfinder was the bottleneck in a game? We have a caching mechanism in YAPF, which is only used for trains. It does make the train PF significantly faster, about 1.3 - 1.7 times according my measurements. That's all great, but the caching code requires a ton of extra logic and is truly an enigma. I would love to remove it.
11:00:51 <xarick> i dont have an AI that could make 5000 trains ๐ฆ
11:01:00 <xarick> and build nice networks while at it
11:01:19 <peter1138> I believe that was one of the core features of Yapf.
11:01:39 <peter1138> 1) It has caching so it's faster 2) nobody knows how the caching works
11:02:03 <kuhnovic> That doesn't necessarily make it a good feature ๐
11:02:41 <xarick> i might "persuade" AAAHogEx to make 5000 trains, maybe i should try the newer versions
11:04:02 <kuhnovic> I usually use large maps from one of the online servers to test these type of things, they tend to contains mostly trains
11:11:36 <peter1138> I think reducing performance to avoid complexity is not really wanted.
11:11:51 <peter1138> If you can reduce complexity and increase performance that's definitely a win.
11:13:16 <peter1138> Most MP games are 'average' and not useful for much performance testing beyond normal case
11:13:41 <_jgr_> Does really no one know how it works? Caching things outside the signal lookahead distance does not seem like it should have such a big impact on the overall understanding of what is going on
11:14:20 <peter1138> They're useful to see if things are better or worse, but not 'is it worse but still acceptable', at least when specifically dealing with performance.
11:17:33 <xarick> tgp using floats and doubles.... i just realized something
11:17:55 <xarick> reproducing the same map between openttd builds might not work
11:19:26 <peter1138> There's no that much difference.
11:19:55 <peter1138> It's not important for landscape generation. It is important when you need game-state to be 100% in sync.
11:20:10 <xarick> so far the maps have matched between os'es
11:20:13 <peter1138> (And even then, using floats/doubles would "probably be fine", buy why risk it)
11:20:26 <xarick> of they follow some standards
11:27:57 <xarick> there seems to be no performance loss with 13074, comparing to master
11:28:21 <xarick> but i dont feel like testing indepth
11:29:50 <peter1138> There's a bug in it though.
11:30:06 <peter1138> A space where there shouldn't be a space ๐
11:30:19 <peter1138> I would not expect any performance loss with it.
11:30:58 <peter1138> If anything the lack of function pointer should be a benefit, but if it's not a hot-path then it's not going to make a difference.
11:40:28 <peter1138> As a function pointer, the existing `inline` makes no difference.
11:41:05 <peter1138> As a functor it can actually be inlined.
11:41:39 <kuhnovic> _jgr_: The confusing part is knowing when to invalidate the cache. This also seems to be done somewhat arbitrarily. The YapfNotifyTrackLayoutChange function takes a tile a and trackdir, but these are ignored in all use cases. So one layout change essentially invalidates the entire cache.
11:41:51 <kuhnovic> (there is more stuff that is confusing)
11:51:45 <LordAro> peter1138: goodness, a whole 18 more symbols
11:52:30 <peter1138> I'm just highlighting what changes, not whether it's a problem or not ๐
11:53:55 <peter1138> And someoneโข might complain that compilation becomes even slower.
11:55:02 <truebrain> kuhnovic: why on earth would you want to do that? That sounds painful ๐
11:55:20 <truebrain> use a code editor or something ๐
11:55:40 <kuhnovic> It was the root cmake file, chicken-and-egg-situation ๐
11:56:08 <kuhnovic> And I had the contents of it on the clipboard
11:56:36 <peter1138> Is that a VS thing? Cos with VS Code the file is... just a file.
11:57:14 <kuhnovic> With VS you need a solution. Cmake generates that solution. First you need a cmake file.
11:57:19 <truebrain> kuhnovic: but that is like saying Linux is terrible because `vim` is impossible to use
11:58:07 <truebrain> I expected you had actual reasons; not just 1 bad experience with a minor subsystem ๐ ๐
11:58:08 <kuhnovic> It's just that windows decides that certain things are no longer convenient for me. Don't tell me what to do, or not to do ๐
11:58:31 <truebrain> QUICK! WHAT IS THE XKCD LINK!
11:58:36 <truebrain> spaceheaters .. they are everywhere ๐
11:58:55 <kuhnovic> Yup, this is definitely one of those ๐
11:59:21 <kuhnovic> I don't have one big gripe with win11, just a lot of smaller ones. And i'm just venting here :p
11:59:37 <truebrain> I could use the fresh air ๐
12:03:50 <kuhnovic> I'm going to vent in the form of lunch
12:12:32 <xarick> I want an array of IndustryKdtree's
12:13:00 <_jgr_> I'm not sure that venting is the ideal verb for your lunch ๐
12:13:08 <peter1138> `std::array<IndustryKdtree, NUM_INDUSTRYTYPES> _industry_kdtrees{};`
12:13:53 <peter1138> (And yes, use `NUM_INDUSTRYTYPES`, not `INVALID_INDUSTRYTYPE`)
12:14:15 <xarick> i want 240 types + alltypes
12:14:58 <peter1138> Use separate instance.
12:15:47 <peter1138> `INVALID_INDUSTRYTYPE` has the same value as `NUM_INDUSTRYTYPES`, but only `NUM_INDUSTRYTYPES` has the correct meaning here.
12:24:32 <xarick> it still doesn't build ๐ฆ
12:25:55 <xarick> i was using NUM_INDUSTRYTILES in one place
12:34:16 *** exceptik has joined #openttd
12:34:16 <exceptik> Don't forget to reserve vector sizes
12:38:25 <peter1138> If you know the size in advance, sure.
12:40:50 <peter1138> It's known for the global case, but not for the per-type case.
13:01:43 <_glx_> This array is a waste of space for common case
13:02:31 <_glx_> A map might make more sense
13:08:31 *** Flygon has quit IRC (Read error: Connection reset by peer)
13:09:27 <_jgr_> The size of an empty kdtree container is not so large that this is a problem
13:11:13 <_jgr_> The extra space used by maps largely negates the space saving
13:16:05 <andythenorth> we need to discuss lunch
13:19:10 <LordAro> i'd like to second that
13:22:46 <peter1138> I agree with JGRPP. kdtree is 2 `vector`s and 2 `size_t`s. 64 bytes. It's not nothing but it's likely less than dealing with a (unordered) map.
13:24:42 <peter1138> It could potentially be a std::unique_ptr<IndustryKdtree> and created on first use.
13:25:43 <xarick> this is still slightly ugly... because it has to exlclude itself from the search
13:27:35 <peter1138> Oh dear. That's not really going to work then.
13:28:31 <peter1138> In the location check var isn't available anyway, is it?
13:29:31 <peter1138> Or is there a fake industry created. Hmm.
13:30:03 <xarick> it has a *current so I assume it already exists
13:30:05 <peter1138> Ah yes, a fake industry.
13:30:21 <peter1138> In this case the industry's index is INVALID_INDUSTRY.
13:30:53 <peter1138> For CBID_INDUSTRY_LOCATION, as long as you never add that to the kdtree it won't need to be excluded...
13:31:05 <peter1138> But for regular calls where the industry does exist it does matter.
13:31:40 <peter1138> Does kdtree have a "closest tile that isn't current tile" search?
13:41:06 <xarick> MapNewGRFIndustryType(parameter, indspec->grf_prop.grffile->grfid) this thing returned 240
13:42:22 <xarick> maybe ez to fix, let me take a look how it was handled for invalid types
13:44:19 <xarick> oh, it means.... "any type" apparently
13:45:56 <peter1138> Having both `INVALID_INDUSTRYTPE` and `IT_INVALID` is a bit... what.
13:46:04 <peter1138> Defined in different places, and different values.
13:47:27 <xarick> 240 and 255? hmm funny
13:47:50 <xarick> I accidentaly stepped on a bug?
13:51:49 <_glx_> no, you most likely assumed incorrect stuff
13:53:26 <_glx_> invalid is not always num+1
13:56:51 <xarick> newgrf is so difficult
14:01:22 <truebrain> There has to be a "that's what she said" joke here ...
14:30:29 <xarick> current->index == 65535
14:51:03 <peter1138> That's the fake industry when testing the location callback.
14:51:20 <peter1138> That one should not be added to the Kdtree.
14:54:12 <xarick> it's not in the tree yet
14:57:09 <xarick> kdtree can't be called for this
15:02:42 <xarick> before I test for performance, I rather check if it's outputting same results
15:45:50 <xarick> is GetClosestIndustry called outside industry generation?
15:46:06 <xarick> i guess it may be, but haven't found any evidence yet
16:01:59 <peter1138> It could be, the variable exists.
16:57:13 <_glx_> and it's also used for var68
16:59:05 <xarick> 1.1 CheckIfFarEnoughFromConflictingIndustry and 3. CheckIfCallBackAllowsCreation
16:59:15 <peter1138> Test 2. became more expensive
17:00:09 *** gelignite has joined #openttd
17:00:29 <xarick> CheckIfIndustryTilesAreFree, i didn't look at this one
17:00:30 <peter1138> Is this testing map generation with the same seed?
17:04:48 <xarick> windows might be influencing
17:08:33 <xarick> strange, what could there be that makes step 2 slower
17:12:28 <peter1138> Maybe generation isn't the same.
17:19:20 *** HerzogDeXtEr has joined #openttd
18:02:04 *** michi_cc[d] has joined #openttd
18:02:04 <michi_cc[d]> _jgr_: I think itโs almost more like a meme by now. The actual algorithm is bog standard A*. The only uncommon thing is its use of templates composition to build the actual implementation, but memorizing the โingredientsโ isnโt that hard either.
18:08:45 <peter1138> When squashing a load of commits, remember to not squash the hacky debug testing commits. Pom-te-pom
18:38:11 <xarick> heh... I suspect it's the TicToc
18:38:24 <xarick> the bloat is measurable
18:39:54 <peter1138> As we keep saying, it's only useful on something that takes an appreciable amount of time individually.
18:42:34 <xarick> let's remove all TicTocs
18:47:18 <_glx_> truebrain: it seems bananas server is having issues, web frontend is super slow and ingame fails to connect
18:54:20 <truebrain> let's see what the server is up to
18:55:24 <truebrain> ghehe, "funny", the cluster still thinks some dead servers are active
18:55:27 <truebrain> which is impressive, ofc ๐
19:08:17 <truebrain> _glx_: frontend should be fixed now; but in-game I have to check out, as that is totally unrelated to the issue I was seeing
19:11:55 <truebrain> okay, indeed unrelated. And an issue for over 3 hours already ๐
19:12:30 <truebrain> ```2024-11-11 19:12:17 INFO [__main__] Public IPs detected:
19:12:30 <truebrain> 2024-11-11 19:12:17 INFO [__main__] ```
19:12:34 <truebrain> yes, it detect an empty list ๐
19:15:41 <michi_cc[d]> Has somebody stolen your public IPs? ๐
19:16:05 <truebrain> what is especially weird, is that it stopped working 3 hours ago .. like .. I wasn't touching anything .. let's see why it went bonkers
19:20:46 <truebrain> lolz; OCI removed some essential tags from some instances
19:20:49 <truebrain> why would it do that?!
19:24:14 <truebrain> owh, no, worse: they are still there, just no longer in the API result
19:33:28 <truebrain> ah, okay, was chasing down the wrong rabbit. Something in Nomad itself is still funky ... hmm
19:34:15 <truebrain> okay, piecing it together ...
19:34:25 <truebrain> 24h after my maintenance it garbage-collected some stuff
19:34:33 <truebrain> but because of some weirdness, this removed a service that it should not remove
19:35:00 <truebrain> okay, DNS entries are repopulated again. But as it was a negative DNS result, it takes a while for DNS caches to purge those results
19:35:04 <truebrain> so things should slowly recover
19:35:35 <truebrain> and tnx again for the poke _glx_ ๐
19:42:27 <truebrain> Let's hope it still works in 24h! Otherwise I will just tear down the cluster and rebuild it
19:43:59 <xarick> master vs kdtree mismatch
19:49:49 <xarick> okay I guess I know where
19:53:10 <xarick> no wonder it was hyper mega fast!.... it was doing nothing
19:54:20 <peter1138> Well, let's not PR that then ๐
19:54:39 *** gelignite has quit IRC (Read error: Connection reset by peer)
19:55:48 <xarick> i didn't have static initially
19:56:05 <xarick> then I added it without much thought
19:56:12 <xarick> and that's where I fail
19:59:40 *** gelignite has joined #openttd
20:41:49 <xarick> wow... with FIRS is like 4 times faster
20:54:58 <peter1138> 4 times faster during the game, or just generation?
20:56:31 <peter1138> It looks like it's about twice as fast but of course the existing algorithm keeps getting slower and slower.
20:56:58 <peter1138> Like you see 11000 vs 19000 at one point.
20:59:49 <peter1138> Still need to split 13073 up a bit.
21:00:13 <peter1138> I got fed up with having to rewrite things through all the different commits :p
21:00:24 <peter1138> If only I had a good design.
21:02:19 *** wensimehrp has joined #openttd
21:02:19 <wensimehrp> Badges for badgers
21:02:36 <peter1138> Also the "B" button is just a placeholder, heh
21:04:31 <truebrain> _glx_: I read back the entitlement was high this evening ๐ I like your easy-answer ๐
21:05:11 <_glx_> yeah I didn't want to name drop ๐
21:05:45 <truebrain> it was an amusing readback ๐
21:06:01 <truebrain> I always imagine someone barging into a room of a place they have never been, and start yelling
21:07:44 <truebrain> nothing to uh-oh ๐ glx handled it like a champ ๐
21:07:58 <peter1138> I know but I missed whatever it was.
21:11:04 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:11:06 <xarick> Generating FIRS 4.15.1
21:13:39 <xarick> ok let me try that one
21:15:04 <xarick> which climate for steeltown?
21:25:40 <xarick> steeltown wasn't that slow
21:29:15 <_glx_> and you selected steel town economy in settings ?
21:36:19 <xarick> which climate is it worst?
21:36:41 <peter1138> I doubt it matters.
21:39:26 <xarick> FIRS 5.0.0-beta2 Steeltown in Arctic
21:40:33 <xarick> not terribly slow compared to the other test
21:41:10 *** gelignite has quit IRC (Quit: Stay safe!)
21:46:13 <peter1138> Ok, I entered a room with 12 megaspheres. This is going to hurt, I think.
21:47:47 <xarick> FIRS 5.0.0-beta2 Arctic Basic in Arctic
21:47:50 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:56:35 <xarick> FindTownForIndustry I think I can speed this one up too
21:57:41 <peter1138> That already uses the town kdtree.
21:58:31 <xarick> yes, but then also iterates industries
22:06:52 <andythenorth> FIRS makes the game slow still?
22:07:47 <_glx_> it's just about mapgen here
22:19:24 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:26:53 <xarick> i need geometry skills
22:29:22 <xarick> if I know the ClosestTownFromTile, I can extract the distance manhattan to it, then use kdtree.FindContained with this distance to get all industries in the radius, and test each industry if they have the same town.
22:30:01 <xarick> probably wrong somewhere...
22:42:33 <kuhnovic> Searching with a limited manhattan distance will give you a diamond shaped area around the start of the search
22:43:14 <kuhnovic> If you want a circle you'll have to use distance squared < radius squared
22:45:39 <xarick> I want DistanceManhattan
23:05:36 <xarick> my geometry skills are bad
23:11:04 <xarick> I can't do Kdtree magic here
23:12:06 <xarick> I can however iterate over the industry_type_kdtree of this industry type to check if it's unique
23:12:42 <xarick> it's less industries to search for, but not quite what I wanted
23:21:49 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:58:35 *** TinoDidriksen has quit IRC (Read error: Connection reset by peer)
23:59:05 *** TinoDidriksen has joined #openttd
23:59:36 *** TinoDidriksen is now known as Guest9135
continue to next day โต