IRC logs for #openttd on OFTC at 2025-11-28
            
00:18:47 *** kuka_lie has quit IRC (Quit: Lost terminal)
02:03:56 *** Tirili has quit IRC (Read error: Connection reset by peer)
03:38:32 *** Wormnest has quit IRC (Quit: Leaving)
03:50:47 *** gnu_jj_ has joined #openttd
03:54:10 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
04:08:37 *** Zathras_4 has joined #openttd
04:12:01 *** Zathras_1 has quit IRC (Ping timeout: 480 seconds)
04:40:49 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/ff578faf95f44323358d2b1f5feb6f6118146ffb
04:40:50 <DorpsGek> - Update: Translations from eints (by translators)
05:38:13 *** Flygon has joined #openttd
06:41:18 *** tokai|noir has joined #openttd
06:41:18 *** ChanServ sets mode: +v tokai|noir
06:48:15 *** tokai has quit IRC (Ping timeout: 480 seconds)
08:12:17 *** gelignite has joined #openttd
08:55:19 <peter1138> Hmm, appear to have misplaced all my USB memory sticks.
09:41:35 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1443899616474173520/image.png?ex=692abfce&is=69296e4e&hm=7d17b083b7693a30e77895debedb420170a0c3b44cfd651be9e6365ac769ed0c&
09:41:35 <xarick> oops
09:42:21 <xarick> how do i make it default initialize itself to this->values.end() ?
09:54:59 <peter1138> You need to pass the container as a parameter to the constructor.
10:00:01 <xarick> let's see if it builds <https://github.com/SamuXarick/OpenTTD/pull/28/checks>
10:00:10 <xarick> erm, passes the tests
10:39:02 <xarick> success!
10:47:10 <DorpsGek> [OpenTTD/OpenTTD] Wuzzy2 commented on issue #14342: [Bug]: German industry names should be [industry] [town name] https://github.com/OpenTTD/OpenTTD/issues/14342
11:12:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #14835: Fix #8062: Overlapping text in vehicle group info panel. https://github.com/OpenTTD/OpenTTD/pull/14835#issuecomment-3588920362
11:16:03 *** Zathras_4 has quit IRC (Quit: Connection reset by beer!)
12:11:14 <xarick> i just realized how big an iterator is
12:13:19 <xarick> wait a minute...
12:13:31 <xarick> 8 bytes in release, 24 bytes in debug?
12:13:38 <xarick> why's different
12:13:59 <peter1138> Well, one is in release, and one is in debug.
12:15:23 <LordAro> :o
12:15:48 <xarick> if i'ts 8 bytes, that's still acceptable
12:15:54 <xarick> 24 bytes - that is not!
12:19:20 <peter1138> Well, don't use debug builds then :)
12:19:35 <peter1138> Certainly don't benchmark them, but that's a given anyway.
12:26:15 <xarick> so an std::map entry is now...
12:27:45 <xarick> 8 bytes for the key(item) 8 bytes for value, 8 bytes for viter
12:28:04 <xarick> or am i wrong
12:28:23 <peter1138> With std::map there is internal stuff going on that is difficult to measure.
12:29:10 <xarick> gonna turn on the memory debug thingie
12:29:13 <xarick> should tell me
12:30:33 <locosage> I'd guess internal stuff takes about sizeof(_Rb_tree_node_base) per element
12:31:36 <locosage> so 3 pointers
12:32:11 <xarick> lunch... be back later to check this
12:39:02 <LordAro> https://about.gitlab.com/blog/gitlab-discovers-widespread-npm-supply-chain-attack/ excellent
12:57:22 <peter1138> As usual.
13:03:33 *** gelignite is now known as Guest32452
13:03:36 *** gelignite has joined #openttd
13:10:12 *** Guest32452 has quit IRC (Ping timeout: 480 seconds)
13:20:00 <xarick> ins't gitlab github with another name?
13:39:12 <xarick> 30 million items take aproximately 2 GB of memory, but this also includes the this->values container 😐
13:39:22 <xarick> let me try separate it
13:43:38 <xarick> oh, right, it's not 30 million items, my bad
13:43:49 <xarick> it's up to
13:43:57 <xarick> in reality, about 18 million are created
13:45:25 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1443960980336939151/image.png?ex=692af8f5&is=6929a775&hm=19cf0d546e9d6a10485df57012514ea326ca2f8ee9136afd1de60889571eb077&
13:46:34 <xarick> ~56 bytes per element
13:47:37 <xarick> I expected 24
13:49:21 <xarick> let me roll back to a commit where i don't have viter
13:54:31 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1443963269696983090/image.png?ex=692afb17&is=6929a997&hm=c3654417e0c4314ba10f68cfac3da2c856c268ecb4d735dc29f160ab96407f96&
13:54:58 <xarick> ~48 bytes
13:55:14 <xarick> viter takes exactly 8 bytes, now I know
13:58:23 <xarick> i expected 16, 8 for key, 8 for value. 48-16 = 32 bytes for red black tree own doings
13:59:13 <peter1138> 13:20 < xarick> ins't gitlab github with another name?
13:59:14 <peter1138> No.
14:05:17 <xarick> let me check safe btree sizes
14:06:07 <LordAro> peter1138: tbf, in the way that xarick probably means it, the answer is mostly yes
14:11:13 <xarick> erm, i dont understand how safe btree works
14:11:58 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1443967660302930114/image.png?ex=692aff2d&is=6929adad&hm=a35435c4bc198a769606dfcfc720093dbfa0cae650a291a68a7e1d1221195f20&
14:14:13 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1443968228002107603/image.png?ex=692affb5&is=6929ae35&hm=c24a2223e33ad6ee98af8f6c6fdeb81e12c6e8097d88150545f27b3079be1774&
14:14:13 <xarick> that's not a good number
14:14:32 <xarick> ~21 bytes per element?
14:16:10 <locosage> try reading what b-tree is :p
14:16:58 <xarick> whatever it is, it's efficient!
14:18:25 <rito12_51026> Do rails have NewGRF extra text?
14:25:21 <brickblock19280> No
14:33:36 <xarick> mister copilot suggests me to use flat map
14:33:51 <xarick> or at least, experiment with and benchmark
14:36:33 *** Wormnest has joined #openttd
14:39:09 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #14762: Change: [Script] Spread ScriptList::Valuate load over multiple ticks https://github.com/OpenTTD/OpenTTD/pull/14762
14:57:20 <xarick> nice
15:03:44 <peter1138> _glx_, what's new? :)
15:04:22 <_glx_> just rebased and fixed LordAro's comments
15:24:27 <LordAro> i made comments?
15:24:29 <LordAro> doesn't sound like me
15:30:29 <peter1138> :)
15:30:36 <peter1138> Something about an early return.
15:30:49 <peter1138> Hmm, can't get this laptop to boot a USB device :/
15:38:39 <peter1138> Ah ha, had to disable SecureBoot.
16:13:40 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #14762: Change: [Script] Spread ScriptList::Valuate load over multiple ticks https://github.com/OpenTTD/OpenTTD/pull/14762#issuecomment-3589834001
16:35:58 *** gelignite has quit IRC ()
16:51:16 *** tokai has joined #openttd
16:51:16 *** ChanServ sets mode: +v tokai
16:53:40 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
17:00:27 <DorpsGek> [OpenTTD/OpenTTD] zephyris commented on pull request #14828: Change: Lighthouses/transmitters generate near towns/industries https://github.com/OpenTTD/OpenTTD/pull/14828#issuecomment-3589947042
17:07:05 *** tokai has quit IRC (Ping timeout: 480 seconds)
17:08:02 <DorpsGek> [OpenTTD/OpenTTD] zephyris approved pull request #14833: Fix #9071: Don't consider tram tracks when growing towns https://github.com/OpenTTD/OpenTTD/pull/14833#pullrequestreview-3519571542
17:11:14 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #14342: [Bug]: German industry names should be [industry] [town name] https://github.com/OpenTTD/OpenTTD/issues/14342
17:11:17 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #14342: [Bug]: German industry names should be [industry] [town name] https://github.com/OpenTTD/OpenTTD/issues/14342
17:12:23 *** tokai has joined #openttd
17:12:23 *** ChanServ sets mode: +v tokai
17:16:15 *** Tirili has joined #openttd
17:26:03 <_zephyris> This wind needs to chill out...
17:36:50 *** Tirili has quit IRC (Quit: Leaving)
17:40:35 *** tokai has quit IRC (Ping timeout: 480 seconds)
17:42:56 *** tokai has joined #openttd
17:42:56 *** ChanServ sets mode: +v tokai
18:24:07 *** Tirili has joined #openttd
18:36:21 <xarick> question. if i do erase at the item at begin, what will be the returned iterator?
18:38:16 <xarick> meh, dumb question it seems
18:40:31 <xarick> handling vector iterators is even more complicated
18:43:14 <_glx_> usually the answer to your questions are in the doc: https://en.cppreference.com/w/cpp/container/vector/erase.html
18:44:12 <andythenorth> Why am I cold? It is not cold weather
18:48:09 *** moll has quit IRC (Ping timeout: 480 seconds)
18:57:07 <xarick> alright, i got a std::vector replacing std::map, let's see what kind of performance it gets
18:57:48 <xarick> not handling the same way as peter's
18:57:57 <xarick> something i cooked
19:00:20 <xarick> alright, I regret already, it's bad
19:00:50 <xarick> letting it run, be back later to see results... dinner time
19:09:50 *** Zathras_4 has joined #openttd
19:25:44 <xarick> wow... ok i give up, taking too much time
19:26:01 <peter1138> Heh
19:34:46 <xarick> it's as slow as peter's
19:34:52 <xarick> i guess vector is busted
19:35:09 <peter1138> "busted" :)
19:35:32 <peter1138> You should learn what the different containers do, and what they're for.
19:37:41 <andythenorth> When we have desktop quantum, xarick will find all problems solved
19:37:52 <xarick> 12 seconds for 300k items
19:37:53 <andythenorth> But Horse will still compile slow
19:41:48 <peter1138> The sorted-vector approach is okay when the size of the data is smaller.
19:53:33 <xarick> next: std::list
19:54:30 <xarick> ScriptListList heh...
19:54:34 <xarick> very original
19:57:56 *** kuka_lie has joined #openttd
20:03:00 <peter1138> Well.
20:03:26 <peter1138> Fairly sure that'll end up worse than a sorted vector :-)
20:16:51 <xarick> 183 seconds for ~300k items
20:17:28 <xarick> 316219 items
20:27:24 <peter1138> I was not wrong.
20:27:57 *** gnu_jj has joined #openttd
20:30:05 <_glx_> there's a reason ScriptList uses std::set + std::map
20:31:15 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
20:43:08 <rito12_51026> How do I concatenate two initializer_lists? Should I even try to do it?
20:47:07 <Rubidium> std::view::concat or std::ranges::concat I'd reckon
20:53:32 <andythenorth> I had naptime
20:53:49 <andythenorth> Now what? 😮
20:56:39 <peter1138> Again.
21:04:24 <rito12_51026> Rubidium: Looks great but it's available since C++26 and OpenTTD is on C++20
21:05:26 *** lobster has quit IRC (Read error: Connection reset by peer)
21:05:34 *** lobster has joined #openttd
21:52:00 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14831: Codechange: Use SetDisplayedPlane instead of UpdateWidgetSize to hide various buttons https://github.com/OpenTTD/OpenTTD/pull/14831
21:53:25 <mmtunligit> so much for easy win :P
21:54:10 <mmtunligit> man i have been *rotting* this week, hopefully my schedule goes back to normal tomorrow, im tired of waking up and still being tired
21:55:06 *** Zathras_4 has quit IRC (Quit: Connection reset by beer!)
23:06:13 *** Flygon has quit IRC (Remote host closed the connection)
23:06:25 *** jinks has quit IRC (Quit: ZNC - http://znc.in)
23:06:44 *** jinks has joined #openttd