IRC logs for #openttd on OFTC at 2024-11-07
            
00:05:17 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13063: Fix: VF_LOADING_FINISHED and VF_STOP_LOADING flags tested on wrong vehicle part. https://github.com/OpenTTD/OpenTTD/pull/13063
00:08:44 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13063: Fix: VF_LOADING_FINISHED and VF_STOP_LOADING flags tested on wrong vehicle part. https://github.com/OpenTTD/OpenTTD/pull/13063#pullrequestreview-2419683660
00:09:37 <_glx_> consist flags vs vehicle flags πŸ™‚
00:19:42 <peter1139> They share the same storage.
00:19:58 <_glx_> I know
00:20:05 <peter1139> They don't in my consist-split patch, which is how I noticed it.
00:25:09 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13063: Fix: VF_LOADING_FINISHED and VF_STOP_LOADING flags tested on wrong vehicle part. https://github.com/OpenTTD/OpenTTD/pull/13063
00:53:21 <talltyler> Consist patch, eh?
01:24:40 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
02:00:53 *** Wormnest has joined #openttd
02:07:35 *** Flygon has quit IRC (Read error: Connection reset by peer)
02:09:00 *** Flygon has joined #openttd
02:53:35 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
03:00:07 *** herms has quit IRC ()
03:03:45 *** herms has joined #openttd
03:05:11 *** Wormnest has joined #openttd
03:05:19 *** Wormnest has quit IRC ()
03:28:00 *** D-HUND has joined #openttd
03:31:23 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** Hirundo has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** Osai has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** Hazzard has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** Yexo has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** V453000 has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** avdg has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** Ammler has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** XeryusTC has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** planetmaker has quit IRC (Ping timeout: 480 seconds)
03:35:58 *** tneo has quit IRC (Ping timeout: 480 seconds)
03:37:08 *** Webster has quit IRC (Ping timeout: 480 seconds)
03:37:48 *** fonsinchen has quit IRC (Ping timeout: 480 seconds)
03:37:48 *** Guest3792 has quit IRC (Ping timeout: 480 seconds)
03:37:48 *** Terkhen has quit IRC (Ping timeout: 480 seconds)
03:37:48 *** SmatZ has quit IRC (Ping timeout: 480 seconds)
03:45:29 *** tneo has joined #openttd
03:45:29 *** planetmaker has joined #openttd
03:45:29 *** fonsinchen has joined #openttd
03:45:30 *** ChanServ sets mode: +o planetmaker
03:45:42 *** Hazzard has joined #openttd
03:46:29 *** SmatZ has joined #openttd
03:46:29 *** Yexo has joined #openttd
03:46:59 *** avdg has joined #openttd
03:46:59 *** Hirundo has joined #openttd
03:47:29 *** Ammler has joined #openttd
03:47:49 *** ^Spike^ has joined #openttd
03:47:59 *** Osai has joined #openttd
03:48:16 *** ^Spike^ is now known as Guest8696
03:48:29 *** Terkhen has joined #openttd
03:48:29 *** V453000 has joined #openttd
03:48:29 *** XeryusTC has joined #openttd
03:48:29 *** ChanServ sets mode: +o Terkhen
04:37:13 *** TinoDidriksen has quit IRC (Ping timeout: 480 seconds)
04:43:51 *** TinoDidriksen has joined #openttd
04:44:27 *** TinoDidriksen is now known as Guest8703
04:46:04 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/c9bd21d57986105ed08627967e5bcac5a0f0768e
04:46:05 <DorpsGek> - Update: Translations from eints (by translators)
05:06:18 *** keikoz has joined #openttd
05:51:34 *** Flygon has quit IRC (Read error: Connection reset by peer)
06:23:19 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:35:38 *** Guest8703 is now known as TinoDidriksen
08:18:00 *** Extrems has quit IRC (Quit: ZNC 1.7.5 - https://znc.in)
08:18:05 *** Extrems has joined #openttd
08:29:35 *** HerzogDeXtEr has joined #openttd
08:47:14 <peter1138> Its not what you think
09:11:05 <mnhebi> Aww you gave me hope we'd get shunting and broken couplers breakdowns!
09:32:59 <peter1139> Nothing like that.
10:10:49 <peter1139> Well, another set of figures that doesn't add up.
10:29:38 <xarick> is there a Notepad for ubuntu?
10:29:45 <xarick> i hate vi
10:29:59 <xarick> can i edit files with vscode?
10:31:35 <xarick> "sudo vi /etc/default/grub" gives me a brain aneurysm
10:34:19 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1304031170924777512/image.png?ex=672de92a&is=672c97aa&hm=20f79c1056231fc4b80d6dfb4844ef28836c5ab23eb10876f8da62d0d5d535f7&
10:34:19 <peter1138> Not bad.
10:34:39 <peter1138> More than JGRPP though.
11:12:01 <LordAro> xarick: yes
11:12:22 <LordAro> i am very deliberately not going to ask why on earth you would be editing grub
11:13:29 <LordAro> peter1138: nice
11:14:38 <LordAro> xarick: gedit is also a commonly used "basic" text editor
11:29:40 <peter1138> JGRPP is about half again, less than 6ms average.
11:30:07 <peter1138> We've got the non-flooding now.
11:30:31 <peter1138> My patch is animated-tile changing, but it's not the same as JGRPP.
11:47:10 *** D-HUND is now known as debdog
11:55:11 <xarick> yay, discord on linux
11:58:23 <peter1138> You'll be annoyed.
11:58:44 <peter1138> It doesn't automatically update, but the updates are forced.
11:59:09 <peter1138> It's easier to just use the website. It's the same thing really.
12:07:34 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304054639741763657/imagem.png?ex=672dff06&is=672cad86&hm=70b7e5a8a120e58ac6d354def8f17cfdd46ea7bb0c550d2e667f3c9be0ce019c&
12:07:34 <xarick> where do I see the return value?
12:08:40 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304054918507659274/image.png?ex=672dff48&is=672cadc8&hm=048e2c395ea2d5cf6136756a09f133f5cf9195955b1c6bd518babaf2fe074532&
12:08:40 <xarick> visual studio shows me the value it returned with
12:08:49 <xarick> but visual code is different...
12:18:54 <peter1138> It hasn't returned yet.
12:26:57 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304059518669422723/imagem.png?ex=672e0391&is=672cb211&hm=649fc5d2ddb9cf6b4241ab43bd1175fc41c4af585826158d721d4d04a22d82e5&
12:26:57 <xarick> well.. nope it returns and doesn't tell me what it did
12:31:42 <xarick> ah, it's 1333703 if I'm understanding this
12:32:04 <xarick> so very different than 7803334803604142689
12:32:16 <xarick> I don't understand why
12:32:31 <xarick> shouldn't it match?
12:34:14 <merni> how can you compare hash values across different OSs like that
12:35:29 <merni> it might be different even between different runs
12:40:04 <DorpsGek> [OpenTTD/OpenTTD] KogentaSan opened issue #13064: [Bug]: Traditional Chinese language does not display characters correctly in the stable version https://github.com/OpenTTD/OpenTTD/issues/13064
12:47:45 <DorpsGek> [OpenTTD/OpenTTD] merni-ns commented on issue #13064: [Bug]: Traditional Chinese language does not display characters correctly in the stable version https://github.com/OpenTTD/OpenTTD/issues/13064
13:12:30 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #13064: [Bug]: Traditional Chinese language does not display characters correctly in the stable version https://github.com/OpenTTD/OpenTTD/issues/13064
13:12:33 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #13064: [Bug]: Traditional Chinese language does not display characters correctly in the stable version https://github.com/OpenTTD/OpenTTD/issues/13064
13:13:24 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #13062: Fix: x-axis direction of industry production graph in wallclock timekeeping mode https://github.com/OpenTTD/OpenTTD/pull/13062
13:14:08 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #13036: Add: Improving town-owned bridges increases company rating https://github.com/OpenTTD/OpenTTD/pull/13036
13:16:07 *** k-man has quit IRC (Ping timeout: 480 seconds)
13:19:03 <peter1138> More non-code-change merges \o/
13:25:29 *** k-man has joined #openttd
13:25:59 <LordAro> novel idea
13:41:33 <talltyler> Development!
13:42:28 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1304078522662518826/image.png?ex=672e1544&is=672cc3c4&hm=68d089c1fbdfb3607f5d14d02be1eac6a95b8ee83201e10222c065f1543b6687&
13:42:28 <peter1138> Foiled by unit tests.
13:44:26 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304079016743145563/imagem.png?ex=672e15ba&is=672cc43a&hm=8846dc6d793174c9ab97f0490d6eec1a2a2ce79cefde79f08c910671ec2be273&
13:44:26 <xarick> so the hash is exactly the tile index?
13:44:57 <LordAro> maybe.
13:45:13 <kuhnovic> Depends on the hash function being used
13:45:19 <peter1138> Should I just remove the unit test...
13:48:52 *** Flygon has joined #openttd
13:48:53 *** nielsm has joined #openttd
13:56:15 <peter1138> Okay, I removed the unit tests but the unit tester still fails on them.
14:10:20 <xarick> visual studio does a prime number codification thingy of my hash...
14:10:38 <xarick> visual code does just take it
14:13:16 <xarick> _Fnv1a_append_value
14:19:46 *** k-man_ has joined #openttd
14:20:15 <peter1138> VS Code is just a text editor.
14:20:49 <peter1138> Whatever your compilers are doing is nothing to do with VS Code.
14:21:19 <peter1138> (Visual Studio is also just an editor, with a bundled compiler)
14:21:49 <merni> Plus, looking at exact numerical values of hashes is not very useful and implementation-dependent
14:26:30 *** k-man has quit IRC (Ping timeout: 480 seconds)
14:26:30 *** k-man_ is now known as k-man
14:29:26 <peter1138> There's no reason to believe that "using the same hash value" across platforms will mean that the implementation using that hash will behave the same across platforms.
14:46:54 <peter1138> Under 10 seconds using a std::vector for the list of marks.
14:53:14 *** squirejames has joined #openttd
14:53:14 <squirejames> peter1138: Had to do an uninstall and reinstall of Discord yesterday because it "got stuck" some time ago, and this is on Windows. Discord is really becoming poo
15:01:51 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304098497955631114/image.png?ex=672e27de&is=672cd65e&hm=d62b54e03f24e4fcb6e7b31af13c1579df75bc79ce96eee94db903f127210fa6&
15:01:51 <xarick> nice, we got somewhere at last
15:02:02 <xarick> still using unordered_set
15:02:14 <xarick> with a temp vector for sorting
15:02:49 <DorpsGek> [OpenTTD/appstore-data] orudge opened pull request #12: [WIP] Feature: Add support for generating Windows Store listing data. https://github.com/OpenTTD/appstore-data/pull/12
15:08:35 <DorpsGek> [OpenTTD/OpenTTD] felixprigge updated pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683
15:15:32 <xarick> anyone willing to investigate why std::set is slow on windows?
15:18:35 <LordAro> have you tried googling "std::set slow on windows" ?
15:19:57 <exceptik> might also be msvc slow, not just windows slow
15:30:29 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304105703341822042/imagem.png?ex=672e2e94&is=672cdd14&hm=3112d2fd131479fee50ac99c49c58910cf219899e3aac1a99a1c82bfd7258dad&
15:31:38 <xarick> hmm πŸ™‚
15:40:34 <xarick> downloading clang is 2 GB 😦
15:42:43 <truebrain> I am like 90% sure I typed a reply to #12
15:42:48 <truebrain> but ... I don't see it πŸ˜„
15:45:43 <DorpsGek> [OpenTTD/appstore-data] TrueBrain commented on pull request #12: [WIP] Feature: Add support for generating Windows Store listing data. https://github.com/OpenTTD/appstore-data/pull/12#issuecomment-2462571326
15:52:20 <xarick> cmake does not like clang <https://gist.github.com/SamuXarick/f647f85a39d067ef9e31a50d094c7855>
15:56:02 <_glx_> It should work
15:56:13 <peter1138> Correction, clang does not like msvc parameters.
16:01:30 <DorpsGek> [OpenTTD/appstore-data] orudge commented on pull request #12: [WIP] Feature: Add support for generating Windows Store listing data. https://github.com/OpenTTD/appstore-data/pull/12#issuecomment-2462611740
16:03:53 <LordAro> clang-cl should
16:07:25 *** keikoz has joined #openttd
16:11:03 *** Wormnest has joined #openttd
16:14:51 <xarick> im failing
16:15:15 <xarick> <https://gist.github.com/SamuXarick/f647f85a39d067ef9e31a50d094c7855>
16:18:09 <LordAro> line 76
16:20:04 <DorpsGek> [OpenTTD/appstore-data] TrueBrain commented on pull request #12: [WIP] Feature: Add support for generating Windows Store listing data. https://github.com/OpenTTD/appstore-data/pull/12#issuecomment-2462657038
16:25:20 <xarick> uninstalling clang
16:28:20 <exceptik> blaming tools for failures...
16:29:29 <xarick> )
16:32:18 <peter1138> JGRPP already replaced the set and list with non-standard structures.
16:32:28 <peter1138> (In FlowRiver)
17:03:10 <_glx_> https://gist.github.com/glx22/963d486fcdc53da005b8ac15fb24cb94 for me it works fine
17:05:59 <_glx_> maybe your cmake settings are wrong
17:07:54 <_glx_> and looking at logs it's indeed the reason, ```
17:07:54 <_glx_> 15:48:28:827 1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang.exe
17:07:54 <_glx_> 15:48:28:900 1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang.exe - broken```
17:08:05 <_glx_> it should use clang-cl.exe
17:09:35 <_glx_> notice how CXX compiler was correct in `15:48:25:594 1> [CMake] -- Check for working CXX compiler: C:/PROGRAM FILES/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/Tools/Llvm/x64/bin/clang-cl.exe - skipped` (skipped means known compiler, not need to check capabilities)
17:14:30 <xarick> okay gonna reinstall clang
17:26:34 <xarick> nop, doesn't work
17:27:58 <xarick> <https://gist.github.com/SamuXarick/8d3021f09735bcb337df3b4f4b53c349>
17:31:37 <peter1138> It needs to be using `clang-cl.exe`, not `clang.exe`
17:31:55 *** Wolf01 has joined #openttd
17:33:43 <xarick> it wants to use both
17:35:10 <xarick> line 276 uses clang-cl.exe
17:35:28 <xarick> line 312 uses clang.exe
17:36:20 <xarick> one is CXX compiler the other is C compiler
17:40:25 <xarick> hmm
17:42:53 <_glx_> I have ``` "cacheVariables": {
17:42:53 <_glx_> "CMAKE_C_COMPILER": "clang-cl.exe",
17:42:53 <_glx_> "CMAKE_CXX_COMPILER": "clang-cl.exe"
17:42:53 <_glx_> },
17:42:53 <_glx_> ``` in my cmake preset for clang
17:47:29 <xarick> wow, it worked now and i have no idea why
17:48:06 <xarick> it's generating a lot of warnings
17:48:09 <xarick> when building
17:49:27 <xarick> > E:\OpenTTD Visual Studio\SamuXarick\OpenTTD\out\build\x64-Clang-Release\clang-cl : warning : argument unused during compilation: '/Zc:preprocessor' [-Wunused-command-line-argument]
18:03:57 <xarick> new toy to play with
18:04:01 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304144341576454184/image.png?ex=672e5290&is=672d0110&hm=947ab25457e5341b822be1672e537f317ecbc32ed8eb3212038b3d52e0e86ec6&
18:04:12 <xarick> compilers matter?
18:04:14 <xarick> :9
18:07:38 <_glx_> different implementation for std lib
18:12:23 <xarick> how do i fix the /Zc:preprocessor ?
18:15:47 <_glx_> it doesn't matter, but it should be somwhere in CompileFlags/cmake
18:24:37 <xarick> :)<https://gist.github.com/SamuXarick/cbf5daa252f40caf54798b9a4ffff31a>
18:34:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304151965470687242/imagem.png?ex=672e59aa&is=672d082a&hm=f93e25987233a3303717f14eafa1bab60f3c8c9628a16f470aed9ea23a031719&
18:34:28 <xarick> linux still beating windows
18:41:48 <DorpsGek> [OpenTTD/OpenTTD] anatolyeltsov commented on pull request #13062: Fix: x-axis direction of industry production graph in wallclock timekeeping mode https://github.com/OpenTTD/OpenTTD/pull/13062#issuecomment-2462968588
18:46:33 <peter1138> Oh, it doesn't actually match the other graphs despite being flipped. Oh well.
18:47:12 <peter1138> The other graphs start at the left, being even more incomprehensible πŸ™‚
18:47:48 <xarick> ^_^
18:48:12 <peter1138> Either way, the correct solution is for all the graphs to use the same logic, not reimplement it.
18:48:34 <LordAro> best file an issue before you forget about it :)
18:49:51 <_jgr_> Newer stuff is on the right in all the graphs
18:50:14 <_jgr_> So the right hand side should have a larger value for t
18:50:55 <_jgr_> Industry production doesn't have a length as it's effectively pre-filled with 0s
18:51:40 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1304156332538073119/image.png?ex=672e5dbb&is=672d0c3b&hm=a1ab2e23ab5b976b07a3036dab540dfd4ef2f7e72d7a6b1d8839bbb222373128&
18:51:40 <peter1138> I'm referring to this.
18:52:17 <peter1138> It's a bit nonsensical.
18:52:49 <peter1138> Sure, one is economy quarters and one is economy months, so the time period is different as well.
18:54:36 <peter1138> On the top graph, the current data point could be 3, 6, 9, etc.
18:54:48 <peter1138> Once it's filled up the current data point is always 72.
19:03:18 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12979: Add #12975: Cargo class bits 13 and 14 now define potable and non-potable. https://github.com/OpenTTD/OpenTTD/pull/12979
19:24:54 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13056: Landscape grid.html fix https://github.com/OpenTTD/OpenTTD/pull/13056#pullrequestreview-2421929622
19:43:54 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #12986: [Bug]: Setting house property 16 to > 0 prevents callback 1B from running at the start of the game. https://github.com/OpenTTD/OpenTTD/issues/12986
19:44:54 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler started discussion #13065: Neutral Stations https://github.com/OpenTTD/OpenTTD/discussions/13065
19:48:17 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683#issuecomment-2463081565
19:48:24 <xarick> intellisense doesn't work for clang?
19:49:55 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #12986: [Bug]: Setting house property 16 to > 0 prevents callback 1B from running at the start of the game. https://github.com/OpenTTD/OpenTTD/issues/12986
19:52:32 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on discussion #13065: Neutral Stations https://github.com/OpenTTD/OpenTTD/discussions/13065
19:52:46 <DorpsGek> [OpenTTD/nml] andythenorth opened pull request #343: Change: cargo class bits 13 and 14 now define potable and non-potable… https://github.com/OpenTTD/nml/pull/343
19:56:38 <DorpsGek> [OpenTTD/nml] 2TallTyler commented on pull request #343: Change: cargo class bits 13 and 14 now define potable and non-potable… https://github.com/OpenTTD/nml/pull/343#issuecomment-2463095372
19:58:27 <DorpsGek> [OpenTTD/nml] andythenorth commented on pull request #343: Change: cargo class bits 13 and 14 now define potable and non-potable… https://github.com/OpenTTD/nml/pull/343#issuecomment-2463099047
19:59:07 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on pull request #12979: Add #12975: Cargo class bits 13 and 14 now define potable and non-potable. https://github.com/OpenTTD/OpenTTD/pull/12979#issuecomment-2463101048
19:59:22 <_glx_> xarick: It does, but some stuff needs to be set in the preset, will paste when I'm back in front of computer
20:09:46 <_glx_> ``` "vendor": {
20:09:46 <_glx_> "microsoft.com/VisualStudioSettings/CMake/1.0": {
20:09:46 <_glx_> "intelliSenseMode": "windows-clang-x64"
20:09:46 <_glx_> }
20:09:46 <_glx_> }
20:11:51 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1304176511749849119/image.png?ex=672e7086&is=672d1f06&hm=27928d7b45438215829c100a1900250791c52646854d45004bd9b6e8fa7539f9&
20:11:55 <peter1138> Why even have a parameter for it?
20:13:05 <Rubidium> because it's a choice to use it incorrectly!
20:14:11 <truebrain> lol
20:18:15 <peter1138> I wonder if that's replying to me or is about Xarick πŸ˜‰
20:22:50 <andythenorth> is it naptime?
20:45:04 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304184871954026539/image.png?ex=672e7850&is=672d26d0&hm=75b07a9457ab4965d6e10d6aa1d94b50a33797dc79734c25a367f1dd594c6632&
20:48:30 <_glx_> I'm using CMakePresets.json
20:54:14 <xarick> oh
20:58:03 <xarick> maybe a stupid question: how are std::unordered_set ordered? will push_backs always append to the end? or it is gonna be completely shuffled?
20:59:18 <xarick> guess i'll check myself
20:59:38 <andythenorth> goes it approve then? πŸ˜› https://github.com/OpenTTD/OpenTTD/pull/12979
21:00:58 *** tokai|noir has joined #openttd
21:00:58 *** ChanServ sets mode: +v tokai|noir
21:02:54 <xarick> oh, it's completely random 😦
21:04:02 <_glx_> it's ordered by the hash
21:04:50 <_glx_> "Internally, the elements are not sorted in any particular order, but organized into buckets. Which bucket an element is placed into depends entirely on the hash of its value. This allows fast access to individual elements, since once a hash is computed, it refers to the exact bucket the element is placed into. "
21:05:00 <_glx_> from <https://en.cppreference.com/w/cpp/container/unordered_set>
21:06:23 <_glx_> well there's no real ordering, but hash affects it
21:06:36 *** keikoz has quit IRC ()
21:07:19 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #13066: Codefix: Silence clang-cl warnings https://github.com/OpenTTD/OpenTTD/pull/13066
21:07:48 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:20:45 *** keikoz has joined #openttd
21:23:07 <xarick> thinking again... I want a container that keeps items ordered by insertion and with fast finding for items in it. I won't be removing items from it. It's not std::set, and it's not std::unordered_set and it's not std::vector due to being slow at finding
21:28:35 <exceptik> at this point, make your own
21:29:08 <peter1138> <https://github.com/OpenTTD/OpenTTD/compare/master...PeterN:OpenTTD:riverflow-tweak?expand=1>
21:29:20 <peter1138> Do I just PR at this point to put Xarick's misery to bed?
21:33:11 <andythenorth> should I sleep?
21:33:23 <andythenorth> or finish my cargo classes docs thing πŸ˜›
21:34:14 <xarick> keke
21:36:17 <peter1138> Inserting elements into a vector is slow, and yet this is still similar performance to the std::unordered_set version.
21:36:54 <peter1138> Probably the btree thing that JGRPP does is faster but we haven't used those 3rdparty containers.
21:37:42 <xarick> thanks, gonna test it here
21:39:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304198519602548806/imagem.png?ex=672e8505&is=672d3385&hm=44917dc40fdaa6d914774b86cd6178288a3260289f63ad61b91004d452ced20a&
21:39:18 <xarick> Copilot came up with this :p
21:40:19 <_jgr_> xarick: No thanks
21:40:43 <_glx_> list+map ? no way
21:42:26 <_glx_> peter1138: it's basically a sorted vector of unique values πŸ™‚
21:42:34 <peter1138> It is.
21:43:03 <peter1138> Sorting it means you can do a binary search, which is what std::lower_bound does.
21:43:28 <peter1138> (But it's sorted because it's using std::lower_bound...)
21:43:49 <_glx_> and it's of course faster than using find() on an unsorted vector
21:44:15 <_glx_> unless the value is near the end
21:45:04 <xarick> i've seen it sized 500 at times
21:45:05 <peter1138> If it's near then end then you would have had to search most of the list.
21:45:13 <xarick> but gonna test anyway
21:46:14 <peter1138> The vector can be static, and then cleared between runs. But I tested that and the difference was inconclusive. Margin-of-error type stuff.
21:48:45 <_glx_> yeah vector allocation is not the slowing part, insertion in middle of vector is costly
21:51:40 <peter1138> It's relative.
21:53:01 <_glx_> and it all depends on the river direction in the end
21:54:31 <peter1138> I'd like to be able to visualise which tiles it is checking in order, but... not yet πŸ™‚
22:00:08 <xarick> wondering if deque could be eliminated, i have a weird plan
22:00:16 <xarick> only use the vector
22:00:36 <xarick> 1 container
22:01:46 <xarick> but maybe the lower_bound won't help
22:01:54 <xarick> im not sure
22:02:54 <peter1138> The queue needs it to be unsorted.
22:02:59 <xarick> if the deque doesn't pop the items, it will contain the same stuff as the vector
22:03:05 <peter1138> You can use a vector that only appends, and manually track where you are.
22:03:19 <peter1138> But at that point... that's what a deque does.
22:04:12 <peter1138> Hmm.
22:04:39 <peter1138> Okay one time the insert had to move 9281 items. that's nearly 40KiB.
22:06:19 <peter1138> Still, all within my L1 cache, just about.
22:10:02 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:10:48 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:12:12 <andythenorth> do have an L1 cache?
22:12:18 <andythenorth> maybe I could get a USB-C one?
22:17:07 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304208036306620476/image.png?ex=672e8de2&is=672d3c62&hm=1bf8aaaf7517d929883ab7239c16e9d4327577994315b380023b7d2c96272ed3&
22:17:07 <xarick> strange
22:19:05 <xarick> clang builds slow
22:19:13 <xarick> gonna check what times i get there
22:21:23 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304209111428366377/image.png?ex=672e8ee3&is=672d3d63&hm=b4aa4eedb259f2ee196a49546928bef181e6862259e29ee5785775913a838756&
22:21:23 <xarick> clang does better
22:21:35 <xarick> gonna check ubuntu
22:22:40 *** Wormnest has quit IRC (Quit: Leaving)
22:29:54 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304211254705000520/imagem.png?ex=672e90e2&is=672d3f62&hm=d375796595f9e11cb431365e98320935de28c591502f5d7197126cd051c86cfb&
22:29:54 <xarick> faster yet
22:30:26 <peter1138> allegro... what on earth have you done to that poor thing.
22:31:31 <xarick> what is allegro?
22:32:32 <peter1138> One of the optional drivers that was created for 1 weird platform that didn't have SDL support at the time.
22:36:14 <peter1138> BeOS/Haiku.
22:36:43 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:49:41 <xarick> testing a single deque
22:51:09 <xarick> nop
22:51:11 <xarick> ugly slow
22:57:39 <xarick> im failing somewhere
23:00:02 <xarick> how do i get the next iterator lower_bound
23:00:06 <xarick> hmm
23:00:23 <xarick> not sure im making myself clear 😦
23:10:09 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304221382560845874/image.png?ex=672e9a50&is=672d48d0&hm=02998fa0e5ae15a6255ab6c368e0e0fac1b7542040d9437dfe55360099394dc4&
23:10:09 <xarick> i can't make it happen
23:11:10 <xarick> there is an iterator i want to increment and then there's items being added to the same vector
23:12:08 <xarick> when an item is added, i can't get to the next item 😦
23:13:00 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:24:11 <xarick> i don't think such container exists 😦
23:31:48 <xarick> https://en.cppreference.com/w/cpp/container
23:43:40 <peter1138> If it's a vector you can just use the index instead.