IRC logs for #openttd on OFTC at 2025-12-11
β΄ go to previous day
01:01:16 *** tokai|noir has joined #openttd
01:01:16 *** ChanServ sets mode: +v tokai|noir
01:01:50 *** MinchinWeb[m] has joined #openttd
01:08:10 *** tokai has quit IRC (Ping timeout: 480 seconds)
01:30:15 *** MinchinWeb[m] has quit IRC (Remote host closed the connection)
01:30:37 *** MinchinWeb[m] has joined #openttd
02:28:59 *** Wormnest has quit IRC (Quit: Leaving)
03:00:07 *** herms2 has quit IRC (Quit: bye)
03:25:24 *** keikoz has quit IRC (Ping timeout: 480 seconds)
03:35:45 *** keoz has quit IRC (Ping timeout: 480 seconds)
03:38:55 *** WormnestAndroid has quit IRC (Remote host closed the connection)
03:38:58 *** WormnestAndroid has joined #openttd
04:00:40 *** Flygon has quit IRC (Read error: Connection reset by peer)
04:19:23 *** Zathras_11 has joined #openttd
04:22:46 *** Zathras_7 has quit IRC (Ping timeout: 480 seconds)
04:44:15 <DorpsGek> - Update: Translations from eints (by translators)
07:40:28 <kuhnovic> jfkuayue: Clearly you don't have kids π
08:03:50 <peter1138> locosage, probably not.
08:09:31 *** gelignite has joined #openttd
08:11:57 <peter1138> AFAIK it was only a TTDPatch thing.
09:32:29 <locosage> cool, that simplifies things a lot
09:39:00 <xarick> `auto const &src_alt` or `const auto &src_alt` ?
09:47:07 <LordAro> $ git grep "const auto" ':^src/3rdparty' | wc -l
09:47:13 <LordAro> $ git grep "auto const" ':^src/3rdparty' | wc -l
10:02:39 <xarick> co-pilot likes auto const
10:57:28 <xarick> if (auto *leaf = std::get_if<Leaf>(node)) {
10:57:28 <xarick> is this code style accepted?
10:58:42 <xarick> node is a std::variant<Leaf, Internal>
10:58:43 <peter1138> Lots of get_ifs is usually a bad sign.
10:59:21 <peter1138> And our coding style requires ` != nullptr`, so add `; leaf != nullptr)`
10:59:42 <peter1138> Also `Leaf *leaf` would be better here.
11:21:54 *** ahyangyi has joined #openttd
11:21:54 <ahyangyi> xarick: That seems to be a sign that it reads too little existing code before writing new stuff
11:25:36 <peter1138> Stop using the slop-generator and try a good book or video series? I dunno.
11:30:02 <xarick> without slop I wouldn't get this far
11:31:49 <mmtunligit> learning is impossible
11:32:35 * LordAro makes a docker image 2.3GB smaller by deleting some installers
11:36:58 <peter1138> Oof. And that's why you find `rm -rf /var/lib/apt/lists/*` everywhere in Dockerfiles :)
11:59:18 <LordAro> peter1138: oh i did that for the linux image as well
11:59:26 <LordAro> this was chocolatey package cache though ;)
12:11:24 <peter1138> Cool, on Windows it repeatedly just loads Arial.
12:36:08 <Borg> howdy, so OpenTTD Coop is pretty dead? as they Wiki?
12:41:40 <peter1138> Hmm, I need to create some kind of sandbox that has no fonts installed...
13:00:10 <LordAro> peter1138: Windows Sandbox is a thing...
13:00:49 <Borg> LordAro: well yeah, but it would be neat to grab the backup and rehost it..
13:01:31 <peter1138> Hmm, so it's a VM, but I have to be running Windows?
13:02:18 <cu-kai> one of the few useful features - but yes. it's a disposable VM
13:02:33 <cu-kai> windows is required as it uses the system files of your own installation iirc
13:02:42 <peter1138> Ok but I don't run Windows.
13:03:11 <cu-kai> indeed, nor do i, just filling in the gaps. sorry for the interruption :)
13:03:55 <peter1138> I have previously tested with Wine, but it's not a great environment.
13:14:07 <peter1138> I guess I could just uninstall fonts.
13:15:27 <jfkuayue> jfkuayue: 0200-1200β¦
13:30:22 *** Zathras_4 has joined #openttd
13:31:32 *** Wormnest has joined #openttd
14:11:40 <xarick> seems that future coding style is to use spaces instead of tabs
14:12:43 <kuhnovic> It's all just a matter of style / preference. The most important thing is not to mix styles.
14:12:47 <peter1138> Has been for a long time, we just never changed.
14:15:28 <Borg> im not sure who came w/ TABs .. but its imo terrible idea
14:15:40 <Borg> sure.. IDE people dont care.. but terminal people suffer
14:16:05 <Borg> I use 2 spaces for ident always.. thats why it code looks consistent on whatever enviroment you open it
14:16:12 <Borg> also terminal git diff looks proper too
14:16:23 <Borg> AFAIR git finally got some option for fixtabs.. I think?
14:18:04 <rito12_51026> Borg: I prefer tabs in terminal as it is easier to press a button once than multiple times
14:19:16 *** kaji_kaede has joined #openttd
14:19:16 <kaji_kaede> Borg: ~~...maybe somebody invented tabs because there are insane people who like using 2 spaces for indentation rather than 4~~
14:19:51 <Borg> rito12_51026: come on... pressing 2 spaces arent hard
14:19:58 <Borg> there are plenty of stuff you double press in C
14:20:49 <Borg> kaji_kaede: huh? whats wrong w/ 2 spaces? I think its enough.. 4 spaces looks already too much
14:21:06 <Borg> yeah yeah.. people have today those super wide montors 24:9
14:21:18 <Borg> so they can see all that x-mass tree IFs
14:21:32 <rito12_51026> I prefer 4 spaces because in my opinion it looks to crowded with 2.
14:21:32 <rito12_51026> And pressing 4 times one button can end up in 3 or 5 spaces sometimes
14:21:49 <Borg> yeah.. 4 times is indeed excesive
14:22:03 <Borg> luicky, ViM have that handy ctrl+t :) for ident
14:22:05 <kaji_kaede> Borg: Nothin'. I say it in jest, though 2 spaces feels too compact for me.
14:22:28 <Borg> kaji_kaede: hah :D im glad you dont see my C code :D
14:23:40 <jfkuayue> What will vscode auto indent do? Tab?
14:24:22 <rito12_51026> during RTL pass: expand
14:24:22 <rito12_51026> Strings: In member function βconstexpr int fmt::v11::basic_string_view<Char>::compare(fmt::v11::basic_string_view<Char>) const [with Char = char]β:
14:24:22 <rito12_51026> Strings: internal compiler error: in make_decl_rtl, at varasm.cc:1442
14:27:04 <kaji_kaede> jfkuayue: It should detect tabs, I think?
14:27:17 <kaji_kaede> I don't recall if it auto-detects based on looking at the file or on language.
14:27:44 <jfkuayue> What if i firstly typed 4 spaces and then some code, and enter?
14:28:00 <jfkuayue> Will the second line start with 4 spaces or a tab
14:28:22 <peter1138> That's the main benefit to tabs, anyone can use their preferred tab stop depth without affecting anyone else.
14:28:41 <kaji_kaede> jfkuayue: ...Maybe you should open VSC and find out.
14:29:20 <peter1138> Any decent editor will do the right thing when pressing the tab key in either mode, and not require you to press spacebar multiple times to indent.
14:29:30 <jfkuayue> The problem would be, vscode automatically convert 4 spaces to a tab in vscode
14:29:55 <Borg> jfkuayue: some setting to fix it?
14:29:57 <peter1138> No it doesn't. Only if it's configured (or detected) that the file is using tabs instead of spaces.
14:30:07 <Borg> in vim you can have et sw=2 or sw=4 if you preffer 4 spaces
14:30:44 <peter1138> Or even, if you insist, voila.
14:31:32 <kaji_kaede> *Squeaky instrument noises.*
14:31:49 <rito12_51026> Borg: You can also turn expandtab off .
14:33:49 <peter1138> A long time ago I use to use ts=3 :)
14:35:01 <jfkuayue> I struggle writing my blog in two languages but I would not use translation software and/or LLM since my blog is ccby3.0.
14:35:53 <Borg> rito12_51026: but I want tabs to spaces expansions in source code (C or Ruby)
14:36:48 <peter1138> Then there's the cursed people who use indentation of 4 spaces, but use tab characters when it's a multiple of 8.
14:37:31 <Borg> peter1138: those are usually terminal illeterates (using GUI editors ;)
14:38:01 <rito12_51026> I'm really frustrated that black only allows spaces and no tabs.
14:38:12 <Borg> I have docs system (network, asset, IPAM, etc) that uses .txt files and uses TAB as separator... cursed people w/ weird editor settings [;
14:41:07 <peter1138> The irony of "illeterates"
14:45:06 <jfkuayue> i am happy with being called an illeterate
14:45:20 <jfkuayue> i can never handle the emacs shortcut
14:49:30 <Borg> jfkuayue: haha, I cannot handle emacs at all [;
15:00:33 <xarick> `while (Internal *internal = std::get_if<Internal>(n); internal != nullptr) {`
15:13:16 <Rubidium> Borg: for compact, look at nforenum/grfcodec (especially versions from a decade ago)
15:31:41 <LordAro> anyone who complains that spaces are harder to use because you have to press the spacebar multiple times is a moron
15:33:07 <Rubidium> that's harsh... think of those using a physical typewriter :D
15:34:21 *** Flygon has quit IRC (Remote host closed the connection)
15:41:44 <ahyangyi> peter1138: I think the GNU style is one of them?
15:43:06 <ahyangyi> jfkuayue: Write in one language, everyone can use AI translators so it's OK π
15:49:10 <xarick> just updated the code to support std::variant<Leaf, Internal> as requested by JGR
15:49:23 <xarick> it compiles! the dang slop machine is good
15:50:01 <xarick> > 15:48:15:398 Start 95: regression_regression
15:50:01 <xarick> > 15:48:42:007 95/96 Test #95: regression_regression ........................................................................................................... Passed 26.61 sec
15:50:01 <xarick> > 15:48:42:007 Start 96: regression_stationlist
15:50:01 <xarick> > 15:49:03:169 96/96 Test #96: regression_stationlist .......................................................................................................... Passed 21.16 sec
15:50:10 <_jgr_> xarick: That is not actually what I was requesting, specifically, but is also fine
15:52:19 <xarick> copilot went that route
15:53:03 <xarick> so now I should see less memory usage, right?
16:02:58 <xarick> that values array in leaf map seems weird
16:05:01 <xarick> template instantiator is buggy
16:07:36 <mmtunligit> is ```!foo(a) && !foo(b)```
16:07:36 <mmtunligit> the same as ```!(foo(a) && foo(b))```
16:07:44 <mmtunligit> asumming foo returns a bool
16:08:01 <_jgr_> mmtunligit: No, absolutely not
16:10:08 *** fairyflossy has joined #openttd
16:10:08 <fairyflossy> mmtunligit: If I'm not mistaken
16:10:08 <fairyflossy> "Not either A or Not B"
16:10:08 <fairyflossy> the second one is
16:10:08 <fairyflossy> "Not both A and B"
16:10:33 <locosage> `!(A && B) == !A || !B`
16:11:29 <peter1138> theorems? Once of those words.
16:17:17 <rito12_51026> What about `!(A || B)` ?
16:23:02 <ahyangyi> I was thinking about various _illogical_ things about programming, and I think the only way `!(A && B) == !A || !B` doesn't work that I can think of is when someone overloads `&&` π
16:23:44 <LordAro> ahyangyi: i think you can safely assume that we're talking in the pure CS sense, not whatever bastardisation C++ does ;)
16:23:45 <ahyangyi> ( even if their overloading is faithful, shortcutting is still lost and the two expressions are no longer equivalent )
16:24:10 <locosage> well, they can also overload ||, == or ! xD
16:24:46 <locosage> and don't even let me get started on #defines π€£
16:25:01 <_jgr_> ahyangyi: My response to overloading && is just don't
16:26:03 <ahyangyi> _jgr_: logical operator --> illogical operator
16:26:24 <LordAro> just because you can, doesn't mean you should
16:28:07 <peter1138> Don't be like grfcodec, use bits of boost, but wrap it in macros...
16:28:31 <ahyangyi> So you can have the worst of the both worlds?
16:46:57 <jfkuayue> would you like some tea or coffee
17:21:19 * LordAro orders 4x 16TB drives
17:35:03 *** lemuria0685 has joined #openttd
17:35:03 <lemuria0685> i read a blog post about a big company updating their servers and the specs make me jealous π
17:35:20 <xarick> `while (Internal *internal = std::get_if<Internal>(cur)) {` if this is unnacceptable code style, how do I fix?
17:38:04 <LordAro> lemuria0685: yeah, i get very jealous of LTT or L1Techs doing something with some ridiculous NVMe array
17:38:14 <LordAro> meanwhile i'm stuck on 2016 xeons with HDDs
17:44:24 <Borg> I think I have broken Oil chain
17:44:45 <Borg> I have 13 Oil Rigs.. and they still cant stuff enough Oil to overflow single Rafinery..
17:45:00 <Borg> Paper Mill on the other hand, is happy w/ 3 Forests
17:50:45 <Borg> I have they lower production.. just max around 720 m3/month
17:51:18 <Borg> still.. avarage is 400m3/month.. thats 5600... assuming 50% rating.. thats 2800..
17:51:30 <Borg> still enough.. Rafinery can process 2048 m3/month max
17:56:38 <dwfreed> LordAro: I have a 2013 xeon!
17:57:06 <Borg> okey.. 3 sending to powerplants.. so 11 left.. thats 2200
17:57:13 <Borg> and.. it seems ok :) it slowly starts to overflow
17:58:09 <Borg> LordAro: what you want to do thats your XEON is not enough? ;)
17:58:45 <LordAro> host a company's worth of internal services
18:00:59 <Borg> I remember when you could host plenty of stuff on P2/350 w/ 64MB RAM! ahh good old times
18:01:12 <Borg> today.. even simple static webpage needs 4 core CPU and 4GB RAM! [;
18:02:08 <dwfreed> LordAro: AVX2, for one; Haswell was the first x86-64-v3 compatible (which is what RHEL 10 needs)
18:02:36 <LordAro> you'd think RHEL would be the last to drop support for hardware
18:08:15 <andythenorth> just go serverless
18:08:34 <LordAro> how much is rental for your MBP?
18:10:36 <Rubidium> LordAro: actually... given they seem to be really into the commercial space, they'll probably just assume hardware > 5-7 years doesn't exist anymore. Just like Microsoft
18:12:32 <peter1138> Right, let's see if it compiles...
18:13:44 <peter1138> Not sure on that one.
18:19:34 <LordAro> andythenorth: good answer
18:19:46 <LordAro> ooh, ARM servers are almost viable, price-wise
18:29:10 <lemuria0685> i used to dream of a mansion, but now i just dream of a normal-sized home attached to a datacenter
18:31:23 <Borg> haha at least, you will have free heating [;
18:31:41 <lemuria0685> i live in the philippines where it's hot all year round though π
18:32:32 <lemuria0685> i have a 2GB ram vps, i guess that's my starter apartment in this analogy lmao
18:34:20 <Borg> my cheap dedi box have 2GB ram too
18:34:42 <lemuria0685> i would have originally gone for an 8GB ram vps with hetzner but i got rejected π
18:34:52 <lemuria0685> so i had to use a different provider. it works though
18:34:57 <peter1138> Remember when 2GB was a fantasy luxury that nobody needed...
18:35:11 <lemuria0685> oh yes, the old days of 32MB ram
18:35:19 <lemuria0685> i never lived those days, i only read about them
18:35:25 <peter1138> Remember when 32MB was a fantasy luxury that nobody needed...
18:35:50 <lemuria0685> oh yes, the old days of only having your 7-item human brain working memory...
18:36:21 <lemuria0685> the even older days of being an ape or whatever the precursor to humans were... the even older days of not even having a mitochondri-
18:37:00 *** Tirili has quit IRC (Remote host closed the connection)
18:37:35 <xarick> ```std::visit([&]([[maybe_unused]] auto &alt) {
18:37:35 <xarick> assert(alt.parent == internal);
18:40:00 <xarick> because ch is a variant :/
18:41:22 <xarick> is the compiler smart enough to completely skip this std::visit with asserts diabled?
18:42:25 <Rubidium> that's unknown. You need to test that
18:42:47 <Rubidium> easiest would be godbolt
19:04:17 <peter1138> When the CI is your compiler :p
19:18:17 <jfkuayue> LordAro: Is this real?
19:24:58 *** Borg has quit IRC (Quit: leaving)
19:27:04 <andythenorth> why wouldn't it be? π
19:27:30 <andythenorth> 16TB RAID 10 array
19:41:17 <xarick> need to check memory usage
20:19:00 <xarick> safe btree still more efficient π
20:27:22 <xarick> i downloaded 15.0-rc1, 25 sprites missing? is that intended?
20:28:51 <xarick> not really a release candidate, is it?
20:32:35 <Rubidium> well... you have chosen to use a graphics baseset that doesn't have all the sprites
20:43:53 <xarick> strange, i downloaded 0.8 but it still loads 0.7
20:46:03 *** _zephyris has joined #openttd
20:46:03 <_zephyris> Idle thought, if sprites are missing, might be useful for openttd to point to the bananas bootstrap baseset
20:49:29 <_zephyris> This isn't the most useful error message if there is no updated version of that baseset
20:51:58 <xarick> original_windows has no missing sprites
21:26:57 <_zephyris> It's impossible for it to have missing sprites...
21:30:02 <andythenorth> how would it have missing sprites?
21:54:07 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
21:54:10 *** MinchinWeb[m] has joined #openttd
21:56:04 <_glx_> original can't have missing sprites
21:58:07 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:08:16 <xarick> Mr Copilot is now telling me a tagged union or typeβerased base class could shave off ~8β16 bytes per child pointer
22:16:54 <xarick> looks like my children are still fat
22:16:54 <xarick> `std::array<std::unique_ptr<std::variant<BPlusLeafMap<Tkey, Tvalue, B>, BPlusInternalMap<Tkey, Tvalue, B>>>, B + 1> children;`
22:30:03 *** audigex has joined #openttd
22:30:45 <andythenorth> are we doing democratic coding now?
22:33:16 <_glx_> actually this PR might help RVG with too many towns
23:14:05 <peter1138> It doesn't really. It hangs for ages and then gives up, though it doesn't crash.
23:57:03 <utrain> xarick: Maybe put them behind a pointer?
23:57:51 <utrain> If you're worried about the size of it on the stack then the easiest trick in the book is to move the big blob of data off it
continue to next day β΅