IRC logs for #openttd on OFTC at 2025-12-18
⏴ go to previous day
00:00:25 *** WormnestAndroid has joined #openttd
00:03:32 <kaji_kaede> xarick: I'm not familiar with the specifics. But there's only really one sensible answer to why regardless: it performs better.
00:06:38 *** Wormnest has joined #openttd
00:23:01 <talltyler> Do we want a Steam news post for RC2, or shall I just wait for RC3?
01:01:47 *** ChanServ sets mode: +v tokai
01:08:46 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
02:56:18 *** Wormnest has quit IRC (Quit: Leaving)
03:52:46 *** Flygon has quit IRC (Remote host closed the connection)
04:43:28 <DorpsGek> - Update: Translations from eints (by translators)
04:54:44 *** Zathras_11 has joined #openttd
04:58:16 *** Zathras_7 has quit IRC (Ping timeout: 480 seconds)
07:27:21 <_zephyris> talltyler: I'd do one, but mostly because it'd look odd to scroll back and have RC2 missing!
08:19:08 *** toktik is now known as Guest33846
08:24:23 *** Guest33846 has quit IRC (Ping timeout: 480 seconds)
08:28:09 *** felix has quit IRC (Ping timeout: 480 seconds)
09:06:10 <peter1138> talltyler, please do one, yes :)
10:32:31 *** Jake is now known as Guest33851
10:38:01 *** Guest33851 has quit IRC (Quit: Page closed)
10:41:47 *** SigHunter has joined #openttd
10:44:59 <xarick> 14805 will conflict when 14930 is merged
10:49:21 <peter1138> Brilliant Jira, the only way I can close a ticket is to mark it as Completed.
10:54:35 *** jinks has quit IRC (Ping timeout: 480 seconds)
10:58:16 <Borg> anyone interested in some LinkGraph DrawLine() math oddity and 32bit overflow?
11:01:25 <Borg> I noticed that in master, you do int64_t cast... with is not beuno imo..
11:02:19 <xarick> windows 95 style errors
11:05:36 <xarick> doesn't look like a me problem
11:09:25 <LordAro> looks like github having problems
11:17:39 <Borg> now DrawLineGeneric() is stable!!!!
11:18:45 <Borg> - int frac_sq = width * width * (dx * dx + dy * dy);
11:18:46 <Borg> + int frac_sq = width * ((dy > dx) ? dy + (dx>>1) : dx + (dy>>1));
11:18:46 <Borg> - if (frac_test * frac_test < frac_sq) {
11:18:46 <Borg> + if (frac_test < frac_sq) {
11:18:52 <Borg> aproxymation works very well
11:19:36 <Borg> I suggest to test this. instead doing pseudo sqrt w/ int64_t casting
11:20:27 <peter1138> Can you explain which problem you are solving?
11:21:36 <_jgr_> Borg, you should look at the code in master, this has most likely been resolved there already
11:23:21 <Borg> int64_t frac_sq = ((int64_t) width) * ((int64_t) width) * (((int64_t) dx) * ((int64_t) dx) + ((int64_t) dy) * ((int64_t) dy));
11:23:29 <Borg> like fucking w00t? :) you noticed that there is 32bit overflow
11:23:36 <Borg> so yeah.. lets throw 64bit on it ;D
11:24:21 <Borg> peter1138: I noticed that linkgraph lines width is not stable.. sometimes they are fatter and sometimes they are thiner... so I decided to take a look at it :)
11:27:17 <peter1138> And does that problem exist in master?
11:28:21 <Borg> peter1138: no, due to 64bit math.. question is.. will there be overflow on 8192x8192 maps there too?
11:29:09 <Borg> nope.. there will be no overflow
11:29:22 <Borg> so if you are ok with it :) then ok
11:29:34 <peter1138> When you increase the available space by 4 billion, usually not.
11:32:05 <peter1138> 99.2% of players are using a 64 bit build, so using 64 bit types isn't really a problem.
11:36:13 <Borg> okey ;) Ill keep my fix, seems more elegant
11:39:30 <xarick> I'm bored, shall I bench?
11:46:36 <xarick> gonna start with ValuateTests, about 120ish seconds each
11:48:45 <peter1138> Yes, obfuscating the algorithm to avoid a cast is definitley... "more elegant".
11:49:32 <Borg> its not abfuscating.. I just do aproximation..
11:49:50 <Borg> you kinda also, because not doing sqrt for peformance reasons.. common trick
11:52:17 <_glx_> Not using sqrt is not because performance, it's because float
11:57:47 <peter1138> Also if you are using sqrt you need to square something at some point, and that could be your overflow.
11:58:49 <Borg> thats not problem using floats..
12:02:20 <Rubidium> Borg: you're worried about performance, right? It looks like the multiply version is actually taking fewer cycles, instructions and micro-ops based on llvm-mca: https://godbolt.org/z/da9baYdEP
12:03:28 <peter1138> Less branches which is better for pipelining.
12:04:41 <Borg> Rubidium: assuming we run 64bit OS right?
12:04:54 <Borg> on 32bit.. I suspect my version should be slighty faster?
12:07:42 <Borg> Rubidium: still, interesting :) and indeed if targeting 64bit, its better to keep your version then
12:08:36 <Borg> Rubidium: oh wait. you used wrong code
12:10:11 <peter1138> Compilation is basicallly the same on x86-64. With -m32 it's a bit longer of course.
12:10:28 <Borg> it just switched registers to 64bit
12:13:50 <Borg> its funny.. they include 6502.. but no x86 32bit
12:16:36 <ahyangyi> Says something about the (un)popularity of x86-32 now
12:16:47 <ahyangyi> Anyways there is actually a x86-32 msvc
12:18:16 <Borg> yeah. okey. nevermind...
12:18:34 <ahyangyi> Actually you can just use the x86-64 gcc/clang
12:19:13 <jfkuayue> My family bought a x86-32 all-in-one computer in 2012
12:19:47 <jfkuayue> 4.00 GB memory (2.74 GB available)
12:20:08 <Borg> my CPU is 64bit capable.. OS isnt [;
12:20:25 <Borg> anyway.. case closed... interesting hints
12:20:46 <Borg> I need to keep that in mind
12:24:54 <talltyler> I also realized forgot to update the thumbnail of the RC1 and RC2 posts before publishing (separate from the image in the actual post), so I've updated those. It'll probably take a bit to refresh on Steam from showing the beta3 thumbnails, but I have fixed it 🙂
12:33:53 <ahyangyi> jfkuayue: Somehow the memory price today isn't much cheaper than that of 2015, after the recent price spike
12:34:45 <ahyangyi> lower is better right?
12:36:14 <_glx_> Most likely the effect of SetValue change
13:14:53 *** SigHunter_ has joined #openttd
13:17:21 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
13:29:34 *** Wormnest has joined #openttd
13:31:26 <audigex> xarick: what are you actually doing? Optimising build times?
13:31:51 <audigex> I've seen you post in here about performance-looking stuff for a while but haven't really tried to follow the conversation
13:32:07 <andythenorth> optimising Squirrel suspension of valuate, last I checked
13:32:17 <andythenorth> I may have lost the thread
13:40:19 <_glx_> Not related to suspension actually, but about more about global performance of ScriptList
13:46:27 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
13:46:43 *** MinchinWeb[m] has joined #openttd
13:53:33 <xarick> I expected greater variance here
13:53:48 <xarick> but i used random items
13:54:01 <xarick> nullifies all the optimization efforts
13:58:48 <ahyangyi> So, collect traces from various popular AI instead?
14:03:07 *** orange_above_50 has joined #openttd
14:04:02 <orange_above_50> Hey, what's the correct usage of the server authorized_key command? I'm trying rcon <password> authorized_key add admin client:5 but it's just printing help. I've also tried some variations.
14:04:32 <orange_above_50> i'm trying to add a client to the admin list basically
14:10:03 *** orange_above_50 has quit IRC (Quit: Page closed)
14:40:06 <_glx_> As with all rcon, the full command must be quoted (but too late)
14:44:48 *** Smedles_ has joined #openttd
14:47:27 *** Smedles has quit IRC (Ping timeout: 480 seconds)
14:53:28 *** Smedles has joined #openttd
14:56:37 *** Smedles_ has quit IRC (Ping timeout: 480 seconds)
15:15:22 <mmtunligit> how the hell did you manage to decode that ask in the first place
15:17:10 <talltyler> rito12_51026: I suspect #7851 is fair game to adopt if you feel like it 😉
15:19:06 <LordAro> talltyler: you may be pleased to know that 722 has been my work desktop background for at least a year now
15:19:15 <LordAro> (i've just noticed your GH tag line description thing)
15:20:11 *** openttd has joined #openttd
15:20:11 <talltyler> This is my desktop background 😄
15:31:33 <ahyangyi> I keep thinking even the biggest ship should fit 1x1 tile for some reason 😛
15:38:41 <rito12_51026> talltyler: 7185 new commits since it was last updated
15:47:38 <rito12_51026> enum EnumName : int {
15:49:48 <rito12_51026> enum class EnumName : int {
15:49:54 <rito12_51026> enum class EnumName : int {
15:50:18 <_jgr_> Those two are not equivalent
15:51:58 <ahyangyi> What happens if you add an E some day
15:52:04 <rito12_51026> enum class EnumName : int {
15:52:25 <LordAro> sounds like you need to have think about what those values actually are
15:52:38 <LordAro> because it doesn't seem like they're behaving in an very enum-ish way
15:52:51 <ahyangyi> Anyways, I like the last one
15:52:57 <ahyangyi> look at how I smiled at it:
15:53:53 <_jgr_> If they need to have specific values I would suggest explicitly setting them
16:16:25 <ahyangyi> _jgr_: I assumed this set of constraints:
16:16:25 <ahyangyi> * specific values don't matter
16:16:25 <ahyangyi> * as long as it's negative
16:16:25 <ahyangyi> * and old values don't change
16:16:25 <ahyangyi> Though I would still prefer explicitly setting the values as long as C++ doesn't have a "iota=-1" syntax
17:05:18 <xarick> oops, i just found a bad conflict resolution from 2.6 on
17:42:52 <andythenorth> important news: I finished refactoring Iron Horse
17:55:21 <audigex> andythenorth: Citizens celebrate
18:19:55 <talltyler> _zephyris: OpenGFX2 v0.8.1 is now shipped with the `testing` and `nightly` branches on Steam!
18:19:55 <talltyler> It'll start being shipped automatically with the `default` branch once we release 15.0. 😄
18:29:31 <_zephyris> How painful was the upload?
18:30:40 <talltyler> Pretty easy with truebrain's expert guidance! 🙂
18:30:56 <talltyler> We'll get you set up in the new year so you can see you for yourself 😄
18:46:22 <andythenorth> Horse 4 needs 15.0 so I should get on and finish it eh
18:55:43 <talltyler> _zephyris: In the new year I'd like to update the Steam store assets to show OpenGFX2, and also change to Steam's new size requirements (larger images than when we created the store page originally). I'd love your help if you're interested. 🙂
18:56:22 <_zephyris> On my todo list too 😉
19:02:22 <_zephyris> Oh, and clean install of testing works as expected
19:03:39 <talltyler> Yes, that's the current specs it wants
19:43:27 <xarick> 14930 merge merge merge!
20:26:02 *** Borg has quit IRC (Quit: leaving)
20:59:21 <Borg> anyway.. im hittng weird issue.. related to _current_company
20:59:30 <Borg> in logs nothing interesting..
20:59:57 <Borg> some info in 2010.. and then 2016 AI related and 2023.. town related
21:00:34 <Borg> im trying to differentiated industry location build based whatever its map generating.. random spawn by game (or GS) or user
21:00:49 <Borg> I use GS to preseed and then regenerate industries for a time..
21:01:29 <Borg> and acording to documentation... ci2 (0x18) of Callback 0x28 provides info whats going on.. 0 map gen, 1 random, 2 user build, 3 user prospect
21:01:54 <Borg> and.. when I do GSIndustryType::BuildIndustry().. I have 3 in ci2
21:02:27 <Borg> I did RTFS.. and only checks there is _current_company == OWNER_DEITY
21:03:54 <Borg> hmmm that stuff was seriously rewriten...
21:05:06 <andythenorth> I thought we added a value for GS building
21:05:11 <andythenorth> grf wiki doesn't have it
21:06:52 <Borg> I dont see anything special in IACT_ definition
21:08:13 <_glx_> it's IACT_RANDOMCREATION for GS
21:08:40 <Borg> yeah.. it should.. so bug on 1.8.0 probably..
21:08:54 <Borg> but I dont see anything interesting in master regarding _current_company
21:12:54 <Borg> hmm actually the code for secondary industries is same
21:13:36 <Borg> ret = CreateNewIndustryHelper(tile, it, flags, indspec, layout, random_var8f, random_initial_bits, _current_company, _current_company == OWNER_DEITY ? IACT_RANDOMCREATION : IACT_USERCREATION, &ind);
21:14:02 <Borg> okey, time to do Debug Build
21:16:32 <_glx_> GS might be impersonating a company using GSCompanyMode
21:16:49 <_glx_> in this case it acts like a user
21:18:18 <Borg> yeah I know it.. I dont use GSCompanyMode at all
21:18:28 <Borg> anyway. building debug version now.. lets see whats going on
21:26:08 <Borg> grr.. value of _current_company is valid.. 0x12
21:28:08 <Borg> hmm but this fix is only for RawIndustries right?
21:30:02 <_glx_> because of `Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);` before the ternary `_current_company` is always OWNER_TOWN
21:31:48 <_glx_> yeah I just copy pasted ByItem sorters into ByValue
21:31:49 <Rubidium> that is of course way outside the scope of your PR, but another reduction in the number of lines
21:32:20 <Borg> in helper I get wrong values
21:32:29 <Borg> _current_company=15 creation_type=3
21:32:35 <Borg> okey :) time for backporting
21:36:54 <xarick> oh no... a const_iterator
21:37:10 <xarick> typename Range::const_iterator iter; //
21:40:04 <Borg> _glx_: it workz! :) thanks a lot for the find
21:40:47 <Borg> _current_owner is wrong.. but this is not exposed to grf itself.. so I dont care..
21:41:02 <Borg> okey. wrong wording.. really
21:41:08 <Borg> not sure if its wrong.. its OWNER_TOWN
21:41:14 <Borg> so I guess it needs to be like that
21:45:17 <_glx_> I like the idea Rubidium, but there's a little mistake in constructor simplification commit
21:45:43 <_glx_> default value for `has_no_more_items` should be `true`
21:46:13 <_glx_> to replicate the effect of calling `End()` in the old constructors
21:53:15 <xarick> `template <bool ASCENDING, typename Range, auto CollectionProjection, auto ItemProjection>` oh, so that's how it's done
22:05:30 *** Borg has quit IRC (Quit: good nite)
22:12:56 <xarick> i have an itch against const_iterator :(
22:13:14 <xarick> gonna have to duplicate my bplustree stuff
22:27:46 <LordAro> ask mr copilot how to do it without fully duplicating everything
22:52:43 <xarick> initial tests show a bit of a regression
22:53:15 <xarick> 463 secs to 478 in one of the tests, but i better repeat
22:53:28 <xarick> with rubidium's deduplication code
22:55:28 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:12:15 <xarick> 467 on openttd master gca1c0007b6
23:12:15 <xarick> 480 on openttd rubidium script-list
23:12:50 <xarick> i blame garbage collection
23:19:17 <_glx_> might be the projections
23:20:29 <_glx_> but ~15s more just due to that feels weird
23:36:24 *** Zathras_7 has joined #openttd
23:37:56 *** hexdogg has joined #openttd
23:39:46 *** Zathras_11 has quit IRC (Ping timeout: 480 seconds)
23:46:58 *** hexdogg has quit IRC (Quit: dogstop)
continue to next day ⏵