IRC logs for #openttd on OFTC at 2024-05-27
โด go to previous day
00:13:03 *** Wormnest has joined #openttd
02:01:57 *** Wormnest has quit IRC (Quit: Leaving)
02:36:04 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:22:01 *** XYZ_ has quit IRC (Ping timeout: 480 seconds)
04:38:16 *** XYZ has quit IRC (Ping timeout: 480 seconds)
04:41:39 <DorpsGek> - Update: Translations from eints (by translators)
07:15:03 <DorpsGek> - Add: summary for week 21 of 2024 (by OpenTTD Survey)
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: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:56:28 <peter1138> Okay, DB Set XL + NewCargoes does work in master, somehow.
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.
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: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: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: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: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:36:59 <peter1138> Anyway, if this container is also of use to you, then I can put it somewhere else.
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: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:19:30 *** Wormnest has joined #openttd
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:44:40 <peter1138> It's probably been cleared and reinitialised a few times at that point though.
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:37 <peter1138> std::map is clearly worse...
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:49:26 <andythenorth> I give it a linkgraph
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: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: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: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:54:26 <talltyler> Finally fixed that up, ready for review ๐
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:02:18 <peter1138> Oh, that delete shouldn't be there, lol
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: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: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: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: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: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: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!
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: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)
continue to next day โต