IRC logs for #openttd on OFTC at 2024-05-27
            
00:13:03 *** Wormnest has joined #openttd
00:45:59 *** Flygon has joined #openttd
02:01:57 *** Wormnest has quit IRC (Quit: Leaving)
02:32:40 *** D-HUND has joined #openttd
02:36:04 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:09:53 *** keikoz has joined #openttd
04:22:01 *** XYZ_ has quit IRC (Ping timeout: 480 seconds)
04:22:26 *** XYZ has joined #openttd
04:38:16 *** XYZ has quit IRC (Ping timeout: 480 seconds)
04:41:38 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/692943669d6431d48ceea51bcafcafbe558ce6a8
04:41:39 <DorpsGek> - Update: Translations from eints (by translators)
04:51:21 *** XYZ has joined #openttd
06:40:57 <peter1138> Opps.
07:15:02 <DorpsGek> [OpenTTD/survey-web] survey-summary[bot] pushed 1 commits to main https://github.com/OpenTTD/survey-web/commit/80d5ebf36afe80b1d91cc42ddb83dcab5d531000
07:15:03 <DorpsGek> - Add: summary for week 21 of 2024 (by OpenTTD Survey)
07:56:01 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #12722: Change: Don't reinitialise font caches when setting initial interface scale. https://github.com/OpenTTD/OpenTTD/pull/12722
08:12:07 *** SigHunter has quit IRC ()
08:14:18 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #12641: Fix: Allow changing size of default OpenTTD font. https://github.com/OpenTTD/OpenTTD/pull/12641#issuecomment-2132907744
08:14:52 *** SigHunter has joined #openttd
08:16:50 *** tokai|noir has joined #openttd
08:16:50 *** ChanServ sets mode: +v tokai|noir
08:23:36 *** tokai has quit IRC (Ping timeout: 480 seconds)
09:27:10 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #12723: Fix: Incorrect dump_info output with labels outside of ascii range. https://github.com/OpenTTD/OpenTTD/pull/12723
09:29:10 <peter1138> Should I bother trying to found out when cargoset/newcargoes broke?
09:29:22 <peter1138> (Maybe it never worked...)
09:43:11 *** XYZ has quit IRC (Ping timeout: 480 seconds)
09:44:06 <peter1138> Hmm, I guess they never worked.
09:55:57 *** XYZ has joined #openttd
09:56:28 <peter1138> Okay, DB Set XL + NewCargoes does work in master, somehow.
10:08:04 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #12722: Change: Don't reinitialise font caches when setting initial interface scale. https://github.com/OpenTTD/OpenTTD/pull/12722#pullrequestreview-2080566101
10:08:48 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #12723: Fix: Incorrect dump_info output with labels outside of ascii range. https://github.com/OpenTTD/OpenTTD/pull/12723#pullrequestreview-2080567494
10:24:01 <peter1138> @orudge, zernebok's on a go slow :/
11:34:33 <peter1138> These old non-label cargo sets barely work anyway. Hmm.
11:44:38 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #12722: Change: Don't reinitialise font caches when setting initial interface scale. https://github.com/OpenTTD/OpenTTD/pull/12722
11:44:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #12723: Fix: Incorrect dump_info output with labels outside of ascii range. https://github.com/OpenTTD/OpenTTD/pull/12723
12:00:22 <andythenorth> peter1138: should we fix them?
12:00:41 <andythenorth> probably got open source repos and licenses?
12:00:47 <andythenorth> and are written in modern grf ways?
12:01:52 <andythenorth> do they use var 0x18?
12:05:35 <peter1138> Oh yes, definitely.
12:06:20 <peter1138> These are so old it's difficult to know what is meant to work with what anyway.
12:06:27 <johnfranklin> I cannot believe my eyes: Planet Coaster 95% off
12:08:50 <peter1138> Include all the addons and it's a bit more expensive...
12:09:17 <johnfranklin> Is it better than OpenRCT2?
12:14:19 <johnfranklin> hmm, with all DLCs its current price is CNY 135.45
12:14:19 <johnfranklin> Its full price itself is CNY 122.00
12:14:19 <johnfranklin> But I am not sure, if I bought it, I would still leave it to dust, and only play openttd...
12:23:57 <peter1138> Does it matter for ยฃ1.49...
12:27:30 <peter1138> 'Sparse' array structure... use custom container, or go with std::map?
12:27:59 <peter1138> (Custom countainer is somewhat faster depending on how "sparse" we're talking)
12:33:58 <kuhnovic> What is it for?
12:34:12 <peter1138> Fontcache stuff.
12:38:01 <kuhnovic> Does that require tons of map lookups all the time, or just the occasional lookup?
12:39:58 <kuhnovic> I have found the std::map / std::unordered_map pretty decent. There are open source options that do better, usually either in terms of memory usage or speed. But they all have their strengths and weaknesses, and it really depends on the use case.
12:40:17 <kuhnovic> I'm kinda going down the same rabbit hole with the pathfinder atm
12:40:25 <peter1138> Every time a character is drawn.
12:40:33 <kuhnovic> That's pretty often :p
12:40:50 <peter1138> It's currently a 'custom container' except it's not, it's pointers and pointers and... bleh.
12:43:31 <kuhnovic> I recently tried having an array function as the initial layer of a map-like lookup table. Any collisions would be stored in an std::unordered_map. In my case it made quite a difference, but it all depends on how often you need to lookup / insert / delete etc.
12:44:03 <kuhnovic> But just stuffing everything into an stl container is definitely much easier
12:47:43 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #12724: Codechage: Add SparseArray for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724
12:48:33 <peter1138> insert/delete - basically never. lookup - lots.
12:49:10 <peter1138> It is GUI so normally I wouldn't really care too much about performance, but string drawing is slightly different.
12:50:16 <merni> Just use a printer instead
12:50:23 <merni> CLI time
12:51:11 <peter1138> Real TTY support.
12:56:45 <kuhnovic> The more lookups you have, the more the aforementioned array trick will help, assuming you have a reasonably good hash function
12:58:08 <_jgr_> At that point you're probably better using a proper hash table implementation?
12:59:00 <peter1138> For my use I'm basically just cleaning up manual mallocs ๐Ÿ™‚
12:59:17 <peter1138> Keeping the basic data structure the same.
13:00:50 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12724: Codechange: Add SparseArray for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724
13:00:52 <peter1138> And spelling badly.
13:01:06 <kuhnovic> That hurts performance the most
13:04:49 <_jgr_> "Proper hash table" doesn't mean std::unordered_map ๐Ÿ˜›
13:06:23 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12724: Codechange: Add SparseArray for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724
13:06:28 <peter1138> Such doxygen.
13:36:59 <peter1138> Anyway, if this container is also of use to you, then I can put it somewhere else.
13:38:27 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #12720: Change: Use UK OSK layout for English (UK) https://github.com/OpenTTD/OpenTTD/pull/12720#pullrequestreview-2080948997
13:39:54 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
13:58:16 *** SigHunter has joined #openttd
14:19:14 *** salut3585 has quit IRC (Quit: User went offline on Discord a while ago)
14:20:33 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #12724: Codechange: Add SparseArray for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724#issuecomment-2133584664
14:28:21 *** squirejames has joined #openttd
14:28:21 <squirejames> peter1138: Fortunately, all the DLC is included in the download. You just need to um, well, there are ways to activate them. (Yes, I loathe "actually you're not buying DLC, you're buying an unlock code to use files that are already on your PC)
14:35:48 <peter1138> Hmm, of course I can no longer recreate my timings :/
14:49:25 <peter1138> Okay. managed to get some timings but they aren't the same as before.
14:49:41 <peter1138> std::map is about 1.6x the SparseArray
14:49:56 <peter1138> And std::unordered_map is about the same as SparseArray.
14:50:13 <peter1138> So std::unordered_map wins for less-code.
14:51:34 <peter1138> No idea what it's like for memory usage though.
15:00:02 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12724: Codechange: Add SparseArray for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724
15:02:25 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #12724: Codechange: Use std::unordered_map for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724#issuecomment-2133657838
15:04:41 *** Ox7C5 has joined #openttd
15:05:06 <peter1138> Well then.
15:18:05 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #12724: Codechange: Use std::unordered_map for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724#issuecomment-2133683272
15:19:30 *** Wormnest has joined #openttd
15:20:26 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #12724: Codechange: Use std::unordered_map for SpriteFontCache's glyph map. https://github.com/OpenTTD/OpenTTD/pull/12724#issuecomment-2133686782
15:22:09 <peter1138> Ah, custom memory allocator.
15:29:08 <_jgr_> valgrind's "massif" heap profiling tool is probably easier than modifying the code to measure it
15:31:56 <peter1138> If I knew how to use that...
15:37:07 <LordAro> overall memory usage with /usr/bin/time might be enough?
15:37:15 <LordAro> or is it a really tiny amount?
15:39:34 <peter1138> It's pretty small, yes.
15:43:48 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1244677445324640316/image.png?ex=6655fbb3&is=6654aa33&hm=1e2c7de28668430bc9c809e2fd7da289003b835a6c986c54659cad19214523d0&
15:43:48 <peter1138> I dunno...
15:44:40 <peter1138> It's probably been cleared and reinitialised a few times at that point though.
15:46:00 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1244678000880914492/image.png?ex=6655fc38&is=6654aab8&hm=3c88f1334397fc3149aa368ef9dfe5274f50e92ec9d5c2c87730f4f70eb7b6d3&
15:46:01 <peter1138> hm
15:46:10 <peter1138> I have no idea.
15:50:11 <peter1138> ~75KB vs 48KB or something.
15:50:53 <andythenorth> maybe I can train a custom GPT to write GS
15:50:57 <andythenorth> 4o might be able to
15:51:02 <peter1138> Neither of these values are with in any ballpark I recognise though.
15:51:19 <peter1138> LLMs cannot write code.
15:53:34 <andythenorth> for some value of 'cannot' ๐Ÿ™‚
15:53:44 <andythenorth> GPT 4 writes python better than me
15:54:57 <andythenorth> so far it's absolutely dreadful at GS ๐Ÿ˜›
15:55:10 <andythenorth> I have asked it to analyse FIRS GS
15:55:31 <andythenorth> it is now writing pseudo code in an imaginary language for the "FISH Industry Replacement Set"
15:55:39 <andythenorth> vector hyperspaces eh?
15:58:53 <andythenorth> because it saved me 10 mins of python recently, I'm now going to spend an hour trying to teach it GS, then giving up in frustration
15:58:58 <andythenorth> who's helping who here?
16:03:30 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1244682404732600471/image.png?ex=66560052&is=6654aed2&hm=4b36fc24dd42abd130079964b359e585d34957f23c02f82e1943733051a69840&
16:03:37 <peter1138> std::map is clearly worse...
16:04:15 <peter1138> Oops, that's totB.
16:04:27 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1244682643937955902/image.png?ex=6656008b&is=6654af0b&hm=14bf21499f966d150f035fe6f1b9f5e939bfcaba7b7a0cdece5b8bdda5df389b&
16:04:27 <peter1138> Still worse, but not that drastic.
16:07:28 <peter1138> Hmm, measured in blocks, my SparseArray is much better. But what is a block...
16:19:27 <peter1138> Ah, I forgot there are 4 instances of it, so these values make more sense now.
16:19:58 <andythenorth> hmm after a bit of training GPT 4o might be able to write squirrel
16:20:13 <andythenorth> it's generate the basic outline of a new feature for my GS
16:21:08 <peter1138> But can it play Doom?
16:21:29 <_glx_> GPT can't write code, it cannot do math either
16:29:18 <peter1138> I suppose "block" is separately tracked memory allocations.
16:29:37 <peter1138> In which case, my array is superior.
16:33:24 *** Wolf01 has joined #openttd
16:49:20 <andythenorth> lolz in GPT
16:49:26 <andythenorth> I give it a linkgraph
16:49:28 <andythenorth> it reads it
16:49:30 <andythenorth> gets it wrong
16:49:33 <andythenorth> hallucinates
16:49:46 <talltyler> What a surprise ๐Ÿ˜›
17:00:03 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
17:09:38 <andythenorth> Tried to teach a custom GPT ๐Ÿ˜›
17:09:44 <andythenorth> gave up ๐Ÿ˜›
17:11:02 *** gelignite has joined #openttd
17:26:59 *** HerzogDeXtEr has joined #openttd
17:33:41 <andythenorth> GPT is generating goal text
17:33:47 <andythenorth> `SteelWheel Industries: "Roll out the best! Bring 400 tons of tyres and 250 tons of steel wire rod to our plant."`
17:40:22 *** alfagamma7 has joined #openttd
17:40:22 <alfagamma7> Interesting
17:58:36 <talltyler> Oof full rebuild, 707 steps
17:58:48 <talltyler> Havenโ€™t touched this branch in a while ๐Ÿ™‚
18:07:43 <andythenorth> can I implement an LLM directly in squirrel?
18:10:28 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #12725: Codechange: Use std::unordered_map for storing TrueTypeFontCache's GlyphEntry map. https://github.com/OpenTTD/OpenTTD/pull/12725
18:13:27 <peter1138> Slightly more involved...
18:20:32 *** gelignite has quit IRC (Read error: Connection reset by peer)
18:21:43 *** gelignite has joined #openttd
18:37:11 <peter1138> Yay, regression timeouts ๐Ÿ˜„
18:40:17 <peter1138> talltyler: My MinGW buildhas 859 ๐Ÿ˜ฎ
18:51:51 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10409: Feature: Import real-world town data via JSON file https://github.com/OpenTTD/OpenTTD/pull/10409
18:53:19 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10409: Feature: Import real-world town data via JSON file https://github.com/OpenTTD/OpenTTD/pull/10409#pullrequestreview-2081369685
18:53:50 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10409: Feature: Import real-world town data via JSON file https://github.com/OpenTTD/OpenTTD/pull/10409#pullrequestreview-2081370018
18:54:26 <talltyler> Finally fixed that up, ready for review ๐Ÿ˜„
18:56:34 <talltyler> https://cdn.discordapp.com/attachments/1008473233844097104/1244725958972276786/smallmap.png?ex=665628e2&is=6654d762&hm=b9cab4478685211c5696b2a8eb091c1e6a765beb408fa8f3177ac3400efe1a0b&
18:56:34 <talltyler> This now takes under 10 seconds to load from file ๐Ÿ˜„
18:57:07 <talltyler> With perfect positioning each time
19:00:27 <peter1138> 0114:err:virtual:virtual_setup_exception stack overflow 2128 bytes addr 0x17005717e stack 0x207b0 (0x20000-0x21000-0x220000)
19:00:27 <peter1138> Hmm
19:02:18 <peter1138> Oh, that delete shouldn't be there, lol
19:03:02 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12725: Codechange: Use std::unordered_map for storing TrueTypeFontCache's GlyphEntry map. https://github.com/OpenTTD/OpenTTD/pull/12725
19:17:41 <merni> talltyler: Nice ๐Ÿ˜
19:17:47 <merni> Now we just need a way to do rivers...
19:23:58 <talltyler> That is significantly harder, due to terraforming
19:24:11 <talltyler> Wide rivers was a major challenge
19:25:04 <truebrain> YOU CAN DO IT!
19:25:07 <truebrain> I believe in you!
19:25:20 <talltyler> ...but do I want to? ๐Ÿค”
19:25:32 <truebrain> that I cannot answer
19:25:35 <truebrain> well, I can, but not really
19:26:46 <talltyler> The easiest way to do rivers might be to allow them on any slope ๐Ÿ˜›
19:27:38 <truebrain> slippery slope
19:27:55 <truebrain> (I just wanted to say that; it has no actual value, what I said)
19:28:03 <talltyler> It is a fitting pun ๐Ÿ˜„
19:28:19 <truebrain> in other news, still haven't been able to spin up an instance on Oracle Cloud
19:28:27 <truebrain> they really don't want free users to have anything for free ๐Ÿ™‚
19:28:36 <talltyler> Not even lunch?
19:28:51 <truebrain> from what I read, if you pay a one-time advance of 100 dollars, it becomes better
19:29:04 <truebrain> but still, so weird, to offer something for free for anyone, but always say: SHORT ON RESOURCES
19:29:21 <truebrain> too bad I can't change region; maybe I just picked a bad region to be in
19:29:30 <truebrain> still funny
19:36:46 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #12726: Fix #12492: Clarify helptext for "minutes per year" setting https://github.com/OpenTTD/OpenTTD/pull/12726
19:37:54 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #12492: [Bug]: The description for "minutes per year" could improved https://github.com/OpenTTD/OpenTTD/issues/12492
19:45:45 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
19:52:16 <kuhnovic> talltyler: I wish I had that json importer when I made the southern norway map. I hacked it in using a text file.
19:54:45 <kuhnovic> And I remember the GPS-coordinate-to-tileindex being a real pain
20:01:10 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #12727: Fix #12283: Vehicle group dropdown shouldn't have default action https://github.com/OpenTTD/OpenTTD/pull/12727
20:01:40 <talltyler> kuhnovic: That's why it doesn't use GPS coordinates, but the relative position to the heightmap edges ๐Ÿ™‚
20:01:40 <peter1138> I know I had a patch for that... weird.
20:02:26 <talltyler> The idea is to overlay a labelled map onto the heightmap using an image editor, and just look at the pixel coordinates
20:02:51 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #12727: Fix #12283: Vehicle group dropdown shouldn't have default action https://github.com/OpenTTD/OpenTTD/pull/12727#pullrequestreview-2081418949
20:03:30 <talltyler> The original implementation needed special "towns" for the map extents, which was confusing and made it too easy to make a map that doesn't fit the aspect ratio of an OpenTTD map ๐Ÿ™‚
20:03:30 *** mindlesstux has quit IRC (Read error: Connection reset by peer)
20:03:48 *** mindlesstux has joined #openttd
20:05:01 <peter1138> "population": 217.16,
20:05:04 <peter1138> Oddly specific ๐Ÿ™‚
20:05:48 <peter1138> I'm too lazy to read the patch right now. Can you put population 100,000,000 and have it do that?
20:06:33 <talltyler> You can put whatever number you want, but OpenTTD probably can't generate a town that big
20:07:01 <talltyler> If the town is expanded 500 times and still hasn't reached the population target, the algorithm gives up and moves on to the next town ๐Ÿ™‚
20:07:52 <talltyler> I took the real populations and divided them all by some factor in the spreadsheet I used to generate the JSON, which is probably where the decimal came from ๐Ÿ˜„
20:11:01 <peter1138> Basically, is it going to sit there an hang trying to reach that population, or is there a limit it to prevent that?
20:11:18 <talltyler> There is a limit of 500 growth attempts, so it will not hang
20:12:13 <talltyler> That said, it does look like it's hanging during the loading process. I have tried repeatedly to show the busy cursor and release the game loop to redraw the game, but have never figured it out ๐Ÿ˜ฆ
20:14:27 <kuhnovic> I ended up placing three towns by hand that were quite far away from each other. Then all the others were triangulated from those using a python script with some dodgy math. Worked well though!
20:17:06 <talltyler> Oh, nice!
20:26:11 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #12727: Fix #12283: Vehicle group dropdown shouldn't have default action https://github.com/OpenTTD/OpenTTD/pull/12727
20:26:14 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #12283: [Bug]: Inconsistent default action in vehicle group dropdown https://github.com/OpenTTD/OpenTTD/issues/12283
20:31:03 *** Ox7C5 has quit IRC ()
21:07:29 <peter1138> Hmm.
21:11:56 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:19:17 *** dropboxkenshiro has quit IRC (Quit: User went offline on Discord a while ago)
21:22:36 *** gelignite has quit IRC (Quit: Stay safe!)
22:10:02 <_glx_> peter1138: I tried many ways to not open a window for asserts, but for some reason asserts in msvcrt for std:: stuff still opens a window
22:28:56 <Eddi|zuHause> so this exists https://www.deviantart.com/costamiri/art/Transit-diagram-of-regional-rail-in-Germany-2024-1006737243
22:40:46 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:57:57 *** Wormnest has quit IRC (Ping timeout: 480 seconds)