IRC logs for #openttd on OFTC at 2023-07-19
⏴ go to previous day
00:31:50 <pickpacket> Good morning! (Well… 2:30am…)
00:33:39 *** johnfranklin has joined #openttd
00:33:39 <johnfranklin> In UTC+8 it’s morning
00:42:56 *** Wormnest has quit IRC (Quit: Leaving)
02:02:39 *** herms has quit IRC (Quit: bye)
02:03:32 <Eddi|zuHause> it's morning whenever i have slept
02:06:29 <debdog> vielleicht verstehe ich das. aber da müsst ich mehr infos haben
02:26:40 *** debdog has quit IRC (Ping timeout: 480 seconds)
06:20:14 <pickpacket> Well, debdog, if you’d still been here I would’ve asked what kind of info youneed
06:20:48 *** D-HUND is now known as debdog
07:57:14 <peter1138> There's a CodeQL warning ;p
07:57:34 <truebrain> owh, why didn't that pop up more clearly .. lol
08:01:49 <truebrain> are windows called sticky or pinned, when they cannot be closed?
08:08:16 <truebrain> is that an approval in disguise? 😛
08:12:56 <peter1138> I have a pain-au-chocolat sitting in front of me.
08:14:13 <peter1138> Quick, take a bite before I finish (or even start) it...
08:14:32 <peter1138> (Is it big, or just close?)
08:14:49 <truebrain> "hands for scale" 😛
08:16:10 <truebrain> I hope that text makes a bit of sense 😛
08:20:31 <truebrain> always questioning old decisions 😛 (not saying that is bad)
08:21:02 <peter1138> Hey, I vaguely knew or didn't know we even had config versions 😄
08:21:12 <truebrain> it is relatively recent
08:21:26 <truebrain> as I got kinda tired we had no way to convert configs, and we tended to just throw away user-choices
08:21:29 <truebrain> which is terrible 😛
08:22:31 <truebrain> but you want to make it even more code .. hmm .. I am not against it, but the amount of code needed is getting a bit out of hand
08:24:58 <truebrain> a bit of an issue really is that at this point we also no longer have access how the variable in the struct is called in the ini-file
08:37:06 <peter1138> Isn't it just something like ```IniItem *autosave = gui->GetItem("autosave"); IniItem *autosave_interval = gui->GetItem("autosave_interval"); if (autosave != nullptr && autosave_interval == nullptr) { ...```
08:37:18 <truebrain> yeah, the issue is, you need to know the name again
08:37:25 <truebrain> so it becomes a bit thin in those regards
08:37:50 <truebrain> defining `autosave` there one can argue is the only place the old name exists
08:37:57 <peter1138> nameof(autosave_interval) 😉
08:38:04 <truebrain> but now you also add the new name, again. It isn't very clear those two things are linked at that point
08:38:23 <truebrain> if we would do the setting-stuff in a C++ way, instead of this ini-generated way, things would be possible 😛
08:38:42 <peter1138> Sounds like you have a PR 😉
08:38:55 <peter1138> Hmm, I think I need to create a data-generator for this work project.
08:39:02 <peter1138> "Can you just put some data in to demo?"
08:39:04 <truebrain> it is so much work for something that rarely changes anymore 😛
08:39:40 <peter1138> No, no I can't just fill in a relational database with fabricated data just like that.
08:40:16 <peter1138> To be honest I'd rather have no config conversion rather than overwriting my current settings. Sorry!
08:40:25 <merni> peter1138: sounds like a job for manual `INSERT INTO` commands :p
08:40:48 <truebrain> peter1138: But you are not the 99% that will disagree with that statement 🙂
08:41:04 <truebrain> we are the odd duck here 😛
08:42:18 <peter1138> merni: that is a right ballache to do.
08:45:42 <truebrain> so annoying this whole setting stuff is not class-based
08:45:45 <truebrain> flat-files with local variables
08:46:20 <truebrain> so you end up with endlessly sending information from A to B
08:47:30 <peter1138> There's quite a bit of pushback in the C++ world to "everything an object" even now.
08:47:48 <truebrain> but having function arguments which send through the whole context, seems like a poor choice to make 😄
08:49:01 <peter1138> Argument against is mainly for things to do with generic algorithms.
08:49:15 <truebrain> I just want traits! 😛
08:49:35 <peter1138> Anyway, we have that json lib now... settings.json? 😉
08:50:20 <peter1138> (And of course, if you did, the massive cruft of old code to parse the ini files because backwards compatibility)
08:50:49 <peter1138> This patisserie is still looking at me.
08:54:05 <truebrain> okay, found a somewhat clean way to not repeat yourself endlessly in the config conversion
08:54:11 <truebrain> and it also actually seems to work
08:57:53 <truebrain> lol, for `server_advertise` we removed the old setting
08:57:58 <truebrain> I guess we are saying now we don't want that
08:58:31 <truebrain> we did do so in splitting generic and private ini, but I guess it is okay there .. and that is long past us now 😛
08:58:51 <truebrain> but it is funny how we care about stuff now we didn't care about then 😄 Let me write down what choices we make now, to prevent us going in circles 🙂
09:04:02 <truebrain> how about something like that? 🙂
09:07:16 <truebrain> because every setting has its own type, it is a bit harder to put this in a table .. I tried that at first, but that requires more work than it is worth 😄
09:07:37 <truebrain> oops, deleted a bit too much code
09:08:58 <peter1138> Seems like you could include the test for generic_version < XXX in the IsConversionNeeded call?
09:09:07 <truebrain> yeah, that is what I was talking about
09:09:15 <truebrain> for that I need to give it both generic_version and the version to check for
09:09:21 <peter1138> Although that assumes it's also a < test.
09:09:24 <truebrain> that is not actually improving the readability 😄
09:09:36 <peter1138> Ahh, okay. It's not global like savegame version 😄
09:10:04 <peter1138> Well, less globals is good, but yeah...
09:10:24 <truebrain> yeah, but a bit more stateness would be good here .. but let's not rewrite the whole thing for a setting conversion 😄
09:10:48 <truebrain> in theory I could deduce the version based on the ini-file, but the parsing isn't cheap
09:11:51 <truebrain> anyway, a bit more robust conversion code .. should make everyone happy I guess .. 99% of the users, as we don't dismiss their preference (without telling them) .. the 1% as you can jump between versions without issue 🙂
09:12:07 <peter1138> So... probably change the commit title? Or do the framework stuff in a extra commit before the autosave minutes stuff? Sorry :/
09:12:26 <truebrain> nothing to be sorry about
09:12:42 <truebrain> you can bug me for anything if that improves shit 🙂 I really don't mind
09:12:51 <truebrain> but you agree with this approach? That is more important 😄
09:13:48 <peter1138> It's tidier than before...
09:16:11 <truebrain> rebuilding when splitting up the PR takes the most time 😛
09:18:38 <peter1138> You changed a timestamp!? Uh oh
09:19:18 <peter1138> Is it normal to not specify a base font size on websites now?
09:19:40 <truebrain> So happy I can honestly say: no clue! Fucking website world ...
09:20:58 <peter1138> Should be a gopher site.
09:21:10 <peter1138> "All websites should be written in Markdown"
09:22:00 <truebrain> (fuck, I hate LaTeX 😛 )
09:23:10 <peter1138> Stupid Teams, going back to the old version as the new one is so so broken.
09:23:14 <peter1138> More broken than the old one.
09:23:42 <truebrain> recompile ... recompile ... recompile ....
09:23:45 <truebrain> I need a faster CPU
09:27:16 <truebrain> there you go, 3 tiny commits 🙂
09:28:18 <truebrain> I can make it a tiny bit more pretty with macros, but yeah .. not going to add macros in C++ code 😛
09:30:03 <peter1138> Ok now you know what I'm going to say...
09:30:12 <truebrain> no really? But go for it!
09:30:28 <peter1138> "std::string and ==" vs "const char* and strcmp"
09:30:38 <truebrain> ha, yes, the whole shit is still C-style
09:30:43 <truebrain> Rubidium should hurry up 😛
09:31:03 <truebrain> I just moved the strcmps, they already existed
09:31:08 <truebrain> so not going to touch that in this PR if you don't mind 🙂
09:31:14 <peter1138> I think that's on us not approving his original massive PR 😉
09:32:26 <truebrain> had to double-check, but I indeed avoided introducing new C-style strings
09:32:35 <truebrain> I only moved one, and the others all don't use either 😄
09:32:55 <truebrain> so yeah, converting the settings to C++ std::string is a bit out of scope 😛
09:33:11 <truebrain> I was proud on my `std::optional<bool>`! 🙂
09:33:44 <truebrain> the other `ParseSingleValue` returns `-1` to indicate the "did-not-found" part .. makes for such ugly code 😛
09:38:18 <pickpacket> should be ”true, false, maybe”
09:41:21 <truebrain> oops, pinged a random person
09:41:29 <truebrain> his fault for having `@JGR` on github honestly
09:49:50 <truebrain> right, the autosave thing was a nice escalation of: are we really going to dismiss the user-preference in another PR 😛 Happy I didn't try to figure out how to do that in that PR, as it clearly takes more work than just a remark on Discord 😄 😄 I love these rabbitholes 😄
09:50:10 <truebrain> now to get some lunch .. I am hungry
10:26:24 <peter1138> Coding with a non-fixedwidth font is weird.
10:26:48 <peter1138> And shows up the fruitlessness of aligning things after the initial indentation...
10:29:44 <peter1138> When your code all compiles, and runs, and doesn't through database exceptions, but data in the new field you added is all blank despite it being populated in the database...
10:30:25 <peter1138> ... it's because you're looking at some cached data that works fine because the cache is serialized as json so the missing field isn't a problem.
10:31:15 <truebrain> Lol .. these problems 😛
10:36:51 <peter1138> There was a once-expensive database query and caching it in redis was most efficient...
10:37:41 <peter1138> Multi-layer caching at that, base query is cached in redis, and then that is filtered and cached in memory. It's a sign of a bad design I'm sure, but it made everything super fast for end users and that's what counts, right?
10:39:03 <peter1138> One reason it was originally slow is because it pulled from a remote database which had no indices, no foreign keys, and the relationships were by string comparison.
11:17:27 <truebrain> lol .. that would be slow, yes 😄
11:34:46 <peter1138> Hmm, annoying. pinentry-fltk is now just showing a blank window instead with no way to enter my pin :/
11:41:58 <truebrain> talking about slow stuff ... lol. What crazy, that yaml loader doesn't enable the C-variant by default when available
11:52:55 <truebrain> only approving 1 of the 2, that is funny 😛
11:54:49 <peter1138> Hmm... delete reddit account?
11:56:13 <truebrain> purely by accident I ran into this while parsing YAML files for another project .. but this solves a few issues I had with startup times 🙂
11:56:24 <peter1138> Oh, disappointing, this extra mature cheddar isn't crumbly at all 😦
11:56:48 <peter1138> Means if it crashes nobody is going to notice 😉
11:58:14 * peter1138 checks broadband availability
11:58:36 <peter1138> Bah, still only G.Fast.
12:06:52 <LordAro> truebrain: the CI failed on the other
12:07:13 <truebrain> regression sometimes fails due to timing issues
12:07:22 <truebrain> so I have to retrigger those sometimes
12:07:32 <LordAro> you should fix that :p
12:15:10 <LordAro> i have enough issues with that at work
12:15:31 <LordAro> the tests are already retried 3 times...
12:29:07 <truebrain> so a small effort to also fix these!
13:34:12 <peter1138> Hmm, looking at some code and finding a big commented out section, with return; just above it. I should, at least, have document that :/
14:12:40 <_glx_> looks like a very old bug
16:00:34 *** HerzogDeXtEr has joined #openttd
16:18:42 <Rubidium> truebrain: regarding hurrying up... yeah, but it's a lot of cascading stuff where one thing can't be done before the other thing is done :(
16:19:34 <truebrain> Remove everything and start from scratch? 😄
16:20:24 <Rubidium> yeah, removing command line options will help a lot :D
16:23:41 <Rubidium> though I think people would not like there not being any language other than English (UK) because of that
16:28:12 <truebrain> "Non-sticky" we have in strings, and all other instances seem to avoid calling it sticky or pinned or anything
16:28:31 <truebrain> Some just describe the effect 😄
16:30:37 *** Smedles has joined #openttd
16:31:59 <truebrain> Guess we should fix the comment while at it 😄
16:32:05 *** shrekshellraiser has joined #openttd
16:32:05 <shrekshellraiser> truebrain: Yeah.. that comment was based off what I remember from working on it months ago
16:32:12 <shrekshellraiser> Which evidently wasn't right
16:33:00 <truebrain> Keeping things consistent in our strings is diiiiifffffiiiiicccccuuuuulllllttttttt
16:33:41 <truebrain> It is mostly funny how past-us avoided naming it anything 😄
16:57:30 *** snoopdogg has joined #openttd
16:58:57 <snoopdogg> resolution doesn't change to desired resolution on postmarketos
17:14:44 <peter1138> Hmm, 0 - 1440 is .. quite a large range 😄
17:16:17 <peter1138> ^ I kinda like the non-wedge slider...
17:17:00 <peter1138> That ^ should be a down arrow, oh well.
17:22:17 <peter1138> Anyway, with the range of 0-1440, my original 0-120 minute scale is a bit off :p
17:23:53 <peter1138> I guess it'll have to be < > buttons, text, and a clickable number. (a bit weird but that's our standard, i.e. in the AI window...)
17:44:11 <truebrain> peter1138: haha, yeah, sorry, I was a bit funny ... I was like: maybe someone wants an autosave every day 😛
17:44:15 <_glx_> That broke all open PRs ?
17:45:52 <snoopdogg> do anyone know why resolution is glitched
17:55:58 <Rubidium> _glx_: I think you've just proven it didn't break all open PRs!
17:56:01 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:06:43 *** Wormnest has joined #openttd
18:24:23 *** snoopdogg has quit IRC (Ping timeout: 480 seconds)
18:39:01 <DorpsGek> - Update: Translations from eints (by translators)
18:55:39 *** gelignite has joined #openttd
18:58:18 <_glx_> snoopdogg: resolution is just the window size (except on windows with full screen)
19:17:44 *** pickpacket has quit IRC (Ping timeout: 480 seconds)
19:32:56 *** gelignite has quit IRC (Read error: Connection reset by peer)
19:36:27 <shrekshellraiser> so my patch that was compiling before, is no longer compiling after rebasing
19:36:30 <shrekshellraiser> /media/mason/1fd64b32-0d22-477e-bc63-cf9628e9a9d1/Code/OpenTTD/src/script/api/../../settings_type.h:81:22: error: found ‘:’ in nested-name-specifier, expected ‘::’
19:36:30 <shrekshellraiser> 81 | enum RightClickClose : uint8 {
19:36:43 <shrekshellraiser> this doesn't make sense to me. It was working with the single `:`
19:36:56 *** kuhnovic has joined #openttd
19:37:08 <LordAro> that's a surprisingly bad error message
19:37:32 <shrekshellraiser> that's been my experience with C/Cpp
19:37:37 <shrekshellraiser> just terrible error messages
19:38:20 <LordAro> you can get some horror ones, but the majority are fairly reasonable
19:38:28 <kuhnovic> Wait until you try using any of the STL algorithms on some templated class and something goes wrong 😛
19:38:45 <kuhnovic> Those can get truly horrific
19:38:50 <shrekshellraiser> oh it's very fun when you mess something up in the weird INI system openttd uses
19:43:23 <kuhnovic> But did changing it to uint8_t work?
19:44:28 <shrekshellraiser> Waiting for it to build
19:46:22 <kuhnovic> My local changes also won't build any longer after rebasing to the latest master. Thanks a lot Rubidium 😛
19:46:30 <kuhnovic> Just kidding of course, it's a good change
19:56:10 <shrekshellraiser> okay that appears to have fixed it
20:00:45 <kuhnovic> Good. Just for fun, take a look at eaae0bb5e71b237cc1fe1388ab74e6bd3aa0c69e 😛
21:08:00 *** frosch123 has joined #openttd
21:08:00 <frosch123> funny, tb blogs about aws, and we get a mail to participate in a survey about aws open-source credits
21:08:22 <frosch123> i am not entirely sure it is legit. it's kind of 50/50 legit or scam
21:08:54 <frosch123> it's not obviously a scam, but it also does not look like how I would expect a mail from aws to look like
21:18:06 <shrekshellraiser> well what's the address it claims to be from?
21:19:11 <truebrain> lol, that would be really funny 😛
21:20:21 <truebrain> but given we haven't received those credits in .. 3 years? I doubt it is legit 🙂
21:21:23 <truebrain> owh my, it is actually legit
21:21:30 <truebrain> wauw ... that is ... yeah, let's not fill in that survey 🙂
21:22:00 <truebrain> SPF and DKIM are both legit
21:23:12 <frosch123> i just would not expect aws to have mails <first-name>@amazon.com
21:23:29 <frosch123> while it is current style to call everyone by their first name
21:23:52 <frosch123> i think aws too big to have that kind of unique mail address for an employee
21:25:04 <truebrain> frosch123: did you btw see the work in 10204: setting is converted from older client to newer, but also renamed, so older clients don't barf. Best of both worlds 🙂
21:25:22 <frosch123> yes, i saw it, looks nice 🙂
21:25:35 <truebrain> spares us a needless rant on tt-forums 😛
21:25:36 <frosch123> i did not know we could just load ini settings from an old name
21:25:52 <truebrain> I found out a lot of things when splitting those ini-files 😄
21:25:54 <frosch123> i only remembered how annoying the transparency option change was 10 years ago :p
21:27:20 <frosch123> oh, i also wanted to mention: ottd's PR checks are quite nice
21:27:38 <frosch123> i made a PR to some other game the other day...
21:27:55 <frosch123> first i was surprised some maintainer needs to approve the PR checks to start
21:28:03 <frosch123> but that became obvious when it turned out the checks run for 3 hours...
21:28:11 <truebrain> same for us; first time contributors need to be approved
21:28:21 <truebrain> 3 hours?! Wauw ....
21:28:26 <truebrain> and here we are complaining about 30 minutes ...
21:28:47 <frosch123> they run unit tests for about 32 flavours of platform/compiler and debug/release build
21:29:08 <frosch123> unit tests for release build take 45 minutes, unit tests in debug build take 2 hours on some platforms
21:29:12 <truebrain> ah, those projects ... "run EVERYTHING"
21:29:55 <frosch123> i can understand checking compilation on 4 compilers, but running units tests on clang 7,8, 14, 15, 16 in debug and release build, and dito for other compilers... sounds excessive
21:30:11 <truebrain> I already think our mingw target is excessive 😛
21:32:49 <_glx_> yeah and we just do it because it doesn't fail like standard gcc or MSVC
21:34:08 <_glx_> but it's just so slow with disk accesses
21:34:56 <_glx_> though wsl is worse when reading from host
21:45:07 <Rubidium> frosch123: it could also be that the whole open source/advertising team uses the same <first-name>@amazon.com, just to make it feel nicer or something?
21:49:17 <frosch123> not sure why you can find such statistics, but apparently 6.2% have that kind of email
21:51:45 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:58:48 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:00:03 <belajalilija> Is there any call for a setting that makes the stated introduction date the true date?
22:00:03 <peter1138> Hmm, bed or rebase?
22:00:27 <belajalilija> belajalilija: So everyone unlocks something at once
22:00:43 <belajalilija> And things that are designed to unlock together do
22:01:01 <frosch123> i think the latter is the case
22:01:45 <frosch123> i am not entirely sure, sometimes we just discuss things 100 times, until you forget whether it was actually implemented or not :p
22:02:16 <frosch123> but i think if you set the same intro date for two vehicles, they also get the same random amount
22:03:09 <belajalilija> Because I’m making a set where vehicles with a different carriage count are technically different vehicles
22:03:17 <belajalilija> So it’s good if that’s the case
22:03:39 <belajalilija> belajalilija: Realistic consists
22:04:11 <frosch123> so i did not dream 🙂
22:05:12 <frosch123> it only applies to vehicles from the same grf, so it does not apply to add-on grfs
22:05:56 <belajalilija> Is it a setting or just there in the game?
22:06:56 <belajalilija> Is it a game setting or is it just something that’s always on?
22:07:33 <frosch123> there are settings "vehicle never expire" and "breakdowns off"
22:07:39 <frosch123> but the intro-randomisation stays
22:08:07 <frosch123> every game is slightly different, you cannot plan exactly on what engines to expect
22:08:20 <frosch123> if you play with breakdowns/reliability you do not even know which engine will be useable
22:08:24 <belajalilija> Hold on I’ll send voice
22:08:36 <frosch123> i don't listen to voice 🙂
22:09:05 <belajalilija> I’ll try to explain it the best i can
22:11:17 <belajalilija> So if i have a 2 and 4 car version of a train in the grf with the same intro dates
22:11:17 <belajalilija> Is it the game that makes sure they arrive together and does it have a setting or is it dependent on grf code to control it?
22:11:18 <peter1138> Yes, the sync randomised start dates is always there
22:12:45 <belajalilija> I needn’t worry about people unlocking the 4 car version first then xd
22:15:18 <peter1138> If you do variants (as it sounds like you should for that) then there are also more flags for synchronisation.
22:15:34 <peter1138> e.g. to keep engine reliability the same.
22:16:13 <belajalilija> Yeah I’m doing variants
22:16:21 <belajalilija> I’ll tell dP about this
22:16:37 <belajalilija> Shame there’s no control over the reliability itself xd
22:17:02 <peter1138> That's the fun of the game 😉
22:18:18 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:18:38 <belajalilija> I can see that in some cases
22:18:58 <belajalilija> Would be nice to make vehicles that were awful irl also awful in game though xd
22:19:25 <frosch123> there is "reliability_decay"
22:29:57 <peter1138> Well, that's weird.
22:30:44 <peter1138> Oh no, it's a stupid bug 😄
22:30:54 <peter1138> SetDParam before DrawString but after GetStringBoundingBox.
23:08:14 *** tokai|noir has joined #openttd
23:08:14 *** ChanServ sets mode: +v tokai|noir
23:15:03 *** tokai has quit IRC (Ping timeout: 480 seconds)
23:55:44 <johnfranklin> Ahyangyi is trying to merge airport terminal version and the newest version into one, and he seems to succeed
continue to next day ⏵