IRC logs for #openttd on OFTC at 2025-01-17
β΄ go to previous day
00:01:24 <xarick> not sure my math is correct
00:01:32 <xarick> ` size_t short_springs_tries = available_springs.size() * wells / (wells - num_short_rivers);
00:01:32 <xarick> size_t long_springs_tries = available_springs.size() - short_springs_tries;`
00:02:21 <xarick> nop, it's very incorrect lol
00:02:54 <xarick> ok bed, I'll do it tomorrow
00:55:29 *** Extrems has quit IRC (Read error: Connection reset by peer)
00:56:22 *** Extrems has joined #openttd
03:11:18 *** Wormnest has quit IRC (Quit: Leaving)
03:33:34 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:45:23 *** Extrems has quit IRC (Read error: Connection reset by peer)
03:52:15 *** Extrems has joined #openttd
03:57:54 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:44:49 <DorpsGek> - Update: Translations from eints (by translators)
06:30:30 *** k-man has quit IRC (Ping timeout: 480 seconds)
06:30:30 *** k-man_ is now known as k-man
09:05:18 *** D-HUND is now known as debdog
09:42:43 *** mindlesstux has joined #openttd
10:04:23 <peter1138> Frooms are pretty slow right now.
11:18:50 *** akimoto has joined #openttd
11:46:19 <xarick> alright, I "think" i got a solution ready for the river fiasco
11:54:19 *** akimoto has quit IRC (Remote host closed the connection)
12:24:40 <andythenorth> probably lunch then
12:25:55 <andythenorth> combining multiple nml -> nfo -> combined nfo never worked for me
12:26:01 <andythenorth> too many issues with IDs
12:28:11 <peter1138> Should I pre-order another synth?
12:29:19 <andythenorth> is it a lunch synth?
12:29:48 <peter1138> If I spend money on synths I spend less on food. Perhaps.
12:33:40 <andythenorth> how long will my 750GB of data take to transfer to new infra (MBP)
12:33:47 <xarick> new test results, better amount of river tiles, but not always faster π¦
12:33:57 <xarick> where am I failing π
12:41:23 <andythenorth> mmm lunch though
12:49:49 <peter1138> Hmm, left-over pizza...
13:27:14 <xarick> so the flatests the worse
13:29:01 <xarick> let's see how many springs does it find
13:30:09 <peter1138> Map-gen rewrite when?
13:30:13 <xarick> available_springs = { size=217160 }
13:30:23 <xarick> wow, that's more than i've ever seen before
13:30:48 <LordAro> peter1138: after GRFv9
13:31:03 <peter1138> So a very long time then.
13:31:39 <peter1138> Reticulating Splines.
13:33:20 <xarick> probably erase(it) slowing down
13:33:35 <xarick> which container is faster at erasing?
13:36:14 <xarick> peter, teach me how to binary insert or whatever the heck in a vector
13:36:52 <_jgr_> xarick: You can just google things and do some reading, you know...
13:38:17 <LordAro> if the last what must be close to a decade has taught us anything, it's that xarick doesn't really do reading
13:38:26 <LordAro> so much time wasted...
13:39:27 <xarick> I mean, I read, but then with the passage of time, I forget
13:39:35 <andythenorth> you are human π
13:39:40 <andythenorth> unless you're a GPT π
13:40:14 <LordAro> can confirm, i definitely don't know how to do a binary tree inversion without looking it up
13:40:29 <kuhnovic> I wish I had as much spare time as Xarick
13:42:00 <xarick> whatever tgp does in arctic, it is the best for rivers
13:46:50 <peter1138> Fortunately all the lower_bound/binary_search stuff I've been doing recently are nothing to do with binary trees.
13:46:54 <peter1138> Otherwise it would all be wrong :p
14:11:56 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
14:42:31 <xarick> i need a different method to count rivers
15:05:30 <johnfranklin> andythenorth: what is tapas exactly? I mean, it seems to mean any food...
15:05:50 <andythenorth> it's a Spanish format
15:08:36 <xarick> Created 520789 river tiles, 819/819 long rivers, 7373/7373 short rivers.
15:08:36 <xarick> those are good statistics
15:19:32 <_zephyris> Wow, that'd be useful
15:20:28 <LordAro> basically templates too
15:27:19 <peter1138> > Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance. [CA1860]
15:33:24 *** Flygon has quit IRC (Read error: Connection reset by peer)
15:38:58 *** Wormnest has joined #openttd
16:12:58 <kuhnovic> Nice catch. That could have caused desyncs.
16:19:04 <LordAro> not providing context for your screenshots
17:04:01 <peter1138> Now Windows say no.
17:06:42 <xarick> Context: Create Rivers 2 matches the build in the PR
17:06:52 *** kuka_lie has joined #openttd
17:07:05 <xarick> Create Rivers is my 3rd experiment
17:08:18 <xarick> config 1a is 4096x4096, Alpinist, Very High Variety, Very Smooth, Many Rivers, Very Low Sea:
17:09:22 <xarick> config 2 is 4096x4096, Flat, None Variety, Smooth, Many Rivers, Very Low Sea
17:09:37 <xarick> config 3 is 4096x4096, Very Flat, Medium Variety, Rough, Many Rivers, 1% Sea
17:16:22 <xarick> there's a clear indication on openttd2a that there isn't many spots for rivers
17:17:01 <xarick> master is doing brute force testing to try to create as many rivers as possible
17:17:44 <xarick> but "Create Rivers 2" build for some reason, even with all the springs collected, can't match the number of rivers of master
17:18:11 <xarick> something tells me there's very few springs
17:18:17 <xarick> hence the times so low
17:18:21 <kuhnovic> peter1138: Windows the OS, or the window system?
17:20:07 <peter1138> I'll assuming MSVC and the tools surrounding it.
17:20:28 <peter1138> I guess it does not like the Span constructor...
17:20:30 <xarick> they should both create the same amount of rivers anyway, so... there's something's missing
17:21:04 <kuhnovic> I had some weird issues building on Windows today. It started complaining about coroutines, which we don't even use. Turned out I had to update the Windows SDK...
17:24:03 <peter1138> Well, it's the CI not me.
17:24:04 <Rubidium> I can concur with the issue, though updating the SDK didn't help... but #undef-ing some stuff works around it (don't care about the themed title bar)
17:25:03 <Rubidium> though that might be 'cause that computer is still at Windows 10 because TPM
17:41:38 <peter1138> Hmm, does godbolt have a way to target apple...
17:46:32 <kuhnovic> Rubidium: Same haha. I did have to do a full clean cmake build after the sdk update, otherwise it would take the old one from the cache
17:47:15 <Rubidium> not that I'm aware of, but didn't next to Apple also CodeQL fail? Not that there seems to be a CodeQL in godbolt either. Though, maybe Clang 16 has the same issue (seems to be the one MacOS' compiler is based off)
17:50:09 <xarick> doing dumb tests: for every river created, repopulate springs π
17:51:20 <peter1138> CLutching at straws here.
17:52:48 <peter1138> Rubidium, no, it was Emscripten.
17:53:30 <xarick> is it possible to multi-thread iterating map?
17:54:15 <LordAro> key word being "possible"
17:55:10 <xarick> 1 million tiles per thread
17:55:15 <Rubidium> he wasn't asking whether it would be faster or desync free
17:55:53 <xarick> 4k map iterated 16 times faster
17:56:43 <xarick> at the end combine the 16 vectors into 1
17:59:04 <xarick> need to learn how to multi task in openttd code
18:03:24 <Rubidium> peter1138: maybe use std::initializer_list and just embed the content of _tags_info as parameter?
18:12:20 <andythenorth> Multithreaded OpenTTD eh?
18:16:18 <peter1138> I guess I could make a new branch and use a 'local' PR.
18:17:20 <Rubidium> not that that'll save a lot CPU cycles, just a few DorpsGek cycles
18:17:50 <peter1138> No, but it means it doesn't block the main CI resources.
18:17:53 <xarick> where would i start? I wanna try something simple
18:19:37 <_glx_> oups updated VS17.12.3 to VS17.12.4, full rebuild needed
18:30:47 <andythenorth> xarick: By understanding why we mostly donβt multithread? π
18:44:47 <andythenorth> Is grf v11 multithreaded? π
18:47:38 *** ChanServ sets mode: +v tokai
18:48:24 *** greeter has quit IRC (Remote host closed the connection)
18:49:29 <LordAro> xarick: asking questions to copilot seems a good start
18:51:03 *** greeter has joined #openttd
18:54:44 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:19:40 <peter1138> Okay I think I'm done now.
19:48:17 *** firmat has quit IRC (Remote host closed the connection)
19:55:42 <andythenorth> Too early for naptime?
19:59:46 <xarick> I think i just multithreaded openttd
20:00:05 <xarick> got no error, got 16 vectors, and joined all 16 vectors, exactly what I was hoping for
20:03:35 <xarick> it wasn't too hard... I expected mayhem
20:31:03 <peter1138> Hmm, I'm not sure MIDIHDR needs to be a pointer at all.
20:33:27 <peter1138> Ah but it may need to live longer than the call.
20:42:04 <Rubidium> peter1138: you mean like it should rather be calling delete[] instead of free?
20:42:44 <peter1138> Just delete. You didn't allocate an array.
20:47:26 <Rubidium> I'm almost tempted to make an unordered_map<ptr_address, unique_ptr<>> so in MidiOutProc we just erase the appropriate element and don't need delete. But that seems like way too much effort
20:47:51 <xarick> multithreaded findspring
20:48:08 <xarick> CreateRivers 3 - multi, CreateRivers 2 - single
20:49:44 <peter1138> You could make a unique_ptr again, out of the raw pointer in MidiOutProc... but not much point.
20:52:48 <Rubidium> can we find an even more eleborate way to write `delete hdr` ;)
21:13:20 <kuhnovic> I'm playing openttd right now
21:14:30 <Rubidium> I would've called it testing ;)
21:17:31 <xarick> Rubidium, what am I doing wrong
21:18:24 <xarick> TileIndex is now difficult
21:20:18 <xarick> start.base() + tiles_per_thread works
21:20:46 <xarick> actually doesn't compile
21:23:02 <xarick> `TileIndex end = TileIndex((i == num_threads - 1) ? Map::Size() : start.base() + tiles_per_thread);`
21:41:06 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:54:30 *** goddess_ishtar has joined #openttd
21:54:30 <goddess_ishtar> starting to get seriously annoyed with the NewGRF Settings menu to the point of considering writing a PR to fix it
22:06:18 *** talltyler has joined #openttd
22:06:18 <talltyler> As many a project has started π
22:06:37 <xarick> I'm going back to the RandomTile
22:06:58 <xarick> I see potential of pre-computing springs, but I'm not ready
22:09:36 <xarick> > Deduplicated river generation code.
22:09:52 <xarick> instead of 2 loops, have 1 intelligent loop only
22:17:24 *** kuka_lie has quit IRC (Quit: Lost terminal)
22:19:49 <goddess_ishtar> talltyler: it's, to put it politely, *absolute hell* to use with more than 10 grfs active at once
22:21:51 *** gelignite has joined #openttd
22:27:00 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:28:46 <xarick> that bool long_river is kinda redundant
22:29:06 <xarick> reviewers will tell me something
22:29:28 *** gelignite has quit IRC (Quit: Stay safe!)
22:30:00 <xarick> makes it readable enough
23:06:58 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:40:42 <michi_cc> Sorry for having accidentally read that sentence not long ago π¦
23:41:17 <peter1138> It seems particularly... breakable.
23:51:16 <xarick> i think i screwed up again... π¦
continue to next day β΅