IRC logs for #openttd on OFTC at 2025-02-07
⏴ go to previous day
00:24:11 <talltyler> Build before push, etc
00:33:59 <peter1138> Unpack OpenGFX End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.
01:22:52 <peter1138> Probably sleep time.
03:06:25 *** Wormnest has joined #openttd
03:41:46 *** Wormnest has quit IRC (Quit: Leaving)
03:59:04 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:44:29 <DorpsGek> - Update: Translations from eints (by translators)
05:10:20 <ahyangyi> peter1138: Hmm, does that mean decoupling "map" and "playable area" 😛
05:11:10 <ahyangyi> So you can have, say, a map of Europe and only Belgium is the playable area.
05:11:58 <ahyangyi> ( I don't remember the shape of Belgium but pretty sure it's not rectangular )
06:09:13 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:33:52 *** D-HUND is now known as debdog
07:18:42 *** HerzogDeXtEr has joined #openttd
07:30:58 <andythenorth> ModelDef (base model type + variant config) -> ModelVariantFactory -> ModelVariant(s)
07:31:08 <LordAro> andythenorth: have you rewritten Horse in Rust yet?
07:31:36 <andythenorth> last weekend, GPT rewrote a 10k LOC python module for me
07:31:41 <andythenorth> using AST and stuff
07:32:01 <andythenorth> "for me" -> I did most of the work
07:32:44 <andythenorth> suspect a python -> rust port could be automated
07:33:14 <andythenorth> hmm wonder if nml -> rust could be automated
07:48:50 <ahyangyi> grf-py -> rust might be more straightforward?
07:50:04 <ahyangyi> Perhaps I should adopt it to make building faster
07:50:37 <ahyangyi> and gorender -> rustrender
09:02:26 <pickpacket> I don't know if you've all noticed, but just in case: it's FRIDAY!
09:17:08 <peter1138> Yes, that means I have another Teams call in a moment.
09:55:40 <johnfranklin> The proportion of UK people that can recite and fluently read “llanfairpwllgwyngyll…”?
09:56:52 <reldred> welsh isn't real, it's a myth made up to scare tourists
10:13:43 <peter1138> johnfranklin, about 0%.
10:23:43 <belajalilija> Barely anyone in Wales speaks welsh
10:24:19 <belajalilija> Nevermind the UK as a whole
10:24:40 <peter1138> Doubling down on bridge-burning, whoops.
10:25:21 <belajalilija> Most people say Llandudno as if the Ll is said like English L and not like C or whatever
10:26:33 <peter1138> Nah, everyone knows how that is pronounced, they'll just assume it's spelled Clandudno.
10:26:51 <belajalilija> Different experiences i guess
10:28:15 <belajalilija> Even within England there’s place names idk how to pronounce
10:28:32 <belajalilija> But I’m convinced that’s just the locals being dickheads
10:28:38 <peter1138> Maybe. I think Ll is mostly known, but we definitely get stuck on w-vowel, and then the later ll combos, no idea.
10:29:54 <belajalilija> Like how in NYC there’s a street called like Housten Street and they don’t say it like Housten Texas
10:30:34 <peter1138> Because that's Houston.
10:31:19 <belajalilija> My spelling was wrong but my point still stands
10:33:24 <belajalilija> I maintain that English is an awful language when it comes to spelling and we need a major reform
11:02:22 <LordAro> helps us distinguish the Americans
11:05:18 <audunm> Anyone know how the max cargo limit for a station is calculated? I've been told one exists.
11:09:09 <belajalilija> LordAro: The Americans should have their own spelling tbh and aligns better with their pronunciation
11:10:34 <belajalilija> I’m for all languages being phonetic
11:24:59 <ahyangyi> peter1138: Cwm is pronunceable though. I guess the problem with Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is: nothing is pronunceable at this length.
11:25:42 <ahyangyi> The other famously long location name, Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu, contains no "difficult sounds" but I don't try to pronounce it either 😛
11:28:14 <_jgr_> Locals don't actually use the full name, Llanfair PG or just Llanfair is not hard to pronounce
11:47:16 <gwyd4016> Billericay - not hard just fun to say tbh
11:53:23 <belajalilija> That one is mostly hard because it reminds you it exists
12:00:56 <xarick> it looks like it's going to rain this weekend
12:18:04 <xarick> dear probably peter1138[d] shaded vehicle list windows are costing performance
12:26:40 <peter1138> I've got more than enough side quests.
12:27:32 <xarick> AAAHogEx is commiting suicide of some kind... why
12:27:57 <xarick> would it be related to frozen time
12:30:52 <xarick> transporting valuables by air
12:32:03 <xarick> the "recent" changes to the profit formula doesn't hit well with some AIs, I just noticed
12:34:05 <peter1138> Stop doing everything with 4k x 4k maps.
12:43:51 <peter1138> Ah yes, if it's a string from NewGRF it must go past STR_JUST_RAW_SRTING to get properly formatted.
12:45:13 <peter1138> EncodedStrings already have protection from being directly used as strings (although strings set via GS don't have this protection). Maybe strings from NewGRF should be wrapped to prevent accidents.
12:45:30 <peter1138> E_TOO_MANY_SIDEQUESTS
12:48:55 <_glx_> xarick: My guess is it's doing useless stuff
12:50:52 *** kuka_lie has joined #openttd
12:51:38 <peter1138> It builds and sorts the vehicle list OnPaint.
12:51:47 <peter1138> This was meant be a lazy way to defer updates.
12:53:12 <_glx_> Yeah useless when shaded
12:55:35 <peter1138> I reckon xarick coukd figure this one out.
12:56:09 <peter1138> They'd ve best placed to confirm if it improves it.
13:33:08 *** nielsm has quit IRC (Ping timeout: 480 seconds)
14:04:44 <andythenorth> peter1138: do a few more, you might get an overflow, then it self limits
14:23:44 <peter1138> Hmm, the CmdTownSetAText and CmdIndustrySetText commands...
14:25:45 <peter1138> Ah, yes, there are loads of other commands that accept std::string.
14:25:52 <xarick> framerate_gui was changed again
14:27:02 <peter1138> I wonder if it makes sense to have the commands that are intended to store a GS-encoded string use a signature that isn't std::string.
14:29:21 <_glx_> any raw string can be transformed into encoded
14:30:22 <peter1138> Yes, but I'm wondering if it should be stronger. Like `company->name` should not ever be an encoded string.
14:30:24 <_glx_> but FormatString happily accepts encoded and non encoded strings anyway
14:31:15 <peter1138> My "issue" is that with introducing `EncodedString`, it is obvious when things are storing that.
14:31:16 <_glx_> should not be too hard to validate it doesn't start with SCC_ENCODED
14:31:27 <peter1138> But there are also encoded strings from GS that are stored in std::string, and this is not obvious.
14:33:18 <_glx_> a command flag to allow encoded string, and a check for SCC_ENCODED
14:33:35 <_glx_> then it can return an error
14:33:45 <peter1138> That's all very run-timey.
14:33:50 <peter1138> I'm thinking compile-timey.
14:34:00 <peter1138> Or code-time either.
14:34:21 <peter1138> So you can look at the signature of a function, or a member, and know that it is an encoded string.
14:37:18 <_glx_> at least scripts use GetDecodedText() and GetEncodedText(), so a non std::string type for encoded should be possible
14:38:11 <_glx_> a simple wrapper around std::string
14:52:17 <_glx_> anyway since it's received from network the only safe way is runtime validation
14:55:03 <peter1138> I'm not looking at removing that validation.
15:09:07 <peter1138> What are you trying to do?
15:09:26 <xarick> show a column of Max OpCodes
15:09:37 <xarick> depending on scripts being available
15:10:32 <xarick> scripts already use memory
15:13:50 <xarick> i'd like ALLOCSIZE to be the rightmost column while at it
15:14:22 <peter1138> My change there just removes the optional-ness of that widget. But you can just add it back for just your widget if you need to.
15:14:49 <peter1138> Seems fairly trivial tbh.
15:24:16 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
15:47:22 <xarick> oh, because of this: size = GetStringBoundingBox(STR_FRAMERATE_CURRENT + (widget - WID_FRW_TIMES_CURRENT));
15:48:27 <xarick> or maybe not, I'm unsure
15:50:39 <_glx_> it's the columns' SetFill() and SetResize() most likely
15:51:46 <xarick> picking a string based on widget position, such evil
15:52:07 <xarick> so i need to see what string is this actually calling
15:54:36 <xarick> STR_FRAMERATE_DATA_POINTS
15:55:48 <xarick> > {BLACK}Data based on {COMMA} measurements
15:56:45 <_glx_> is your string inserted in the correct place ?
15:57:29 <xarick> it's running UpdateWidgetSize but getting the size of the wrong string
15:57:58 <xarick> because I placed the widgets inbetween ALLOCSIZE and TIMES_AVERAGE
15:59:03 <_glx_> place the strings between STR_FRAMERATE_AVERAGE and STR_FRAMERATE_MEMORYUSE
16:00:25 <xarick> I only have 1 string STR_FRAMERATE_OPCODES :{WHITE}Max Ops
16:00:43 <xarick> because it's a NWID_SELECTION
16:01:32 <peter1138> Put WID_FRW_SEL_OPCODES outside that list.
16:02:08 <peter1138> If you look at the original list, SEL_MEMORY was after ALLOCSIZE, even though in the tree it's before it.
16:04:16 <_glx_> making it non optional works too 🙂
16:05:32 <_glx_> but WidgetID order must match StringID order
16:07:45 <peter1138> What's the relevance of 500 ops though.
16:08:39 <xarick> nice, everything works
16:09:20 <xarick> in debug mode, max ops is usually low
16:09:52 <peter1138> Like why are most AIs using 500 ops, some more, but none less?
16:10:11 <xarick> 500 is the lowest possible value for opcodes
16:11:03 <peter1138> I understand max opcodes, but not min opcodes.
16:11:32 *** toktik has quit IRC (Remote host closed the connection)
16:12:31 <xarick> let me build a release build
16:13:02 <_glx_> yeah minimal limit is weird
16:13:49 <_glx_> a script doing only sleep will be at less than 10 always
16:17:42 <_glx_> or the window will just tell a script reached the limit once, even if it usually uses less than that
16:18:29 <peter1138> Overheads of setting up the VM each tick...? No idea :)
16:18:48 <_glx_> doesn't feel like a useful stat in current screenshots 🙂
16:24:23 <xarick> it's not a perfect system 😦 spiking tends to ruin it
16:24:48 <_glx_> as said, it just tells a script reached max limit at some point, while the average usage will be more useful
16:26:52 *** Wormnest has joined #openttd
16:26:53 <peter1138> Oh I see, so it's literally the max ops of all time.
16:27:00 <peter1138> Yeah, that's not very useful.
16:27:45 <xarick> tries to guess the impact in performance and lowers the max ops allowed each frame
16:28:11 <xarick> or raises the max ops if it hasn't been impacting
16:29:10 <xarick> makes uses of the 512 frame time points collected by the framerate
16:29:55 <_glx_> though the only useful info from it is which script it's better to not run 🙂
16:33:07 <_glx_> we can see wormAI reached max opcode, but in reality it almost never use any opcodes
16:35:32 <_glx_> while ludi after fix never reach max, but actually consumes more cpu than others 🙂
16:37:51 <peter1138> Yeah, max ops isn't all that useful really. You already have the time.
16:39:27 <peter1138> I think I should get the rest of the EncodedString stuff done before looking at changing command signatures.
16:39:35 <peter1138> Leave that side-quest for later :-)
16:39:52 <_glx_> makes sense to wait indeed 🙂
16:40:09 <peter1138> If the rest of my changes are implemented then it becomes a lot easier to pass the correct things around.
16:48:08 <xarick> it means my maths suck
16:48:31 <xarick> an ideal system would make it fair to all
16:49:32 <xarick> wormai is allowed 250k ops because it has been "performing well", aka doing nothing
16:50:07 <peter1138> You can't force scripts to use ops if they don't want to :)
17:02:50 <peter1138> o/~ Are you waiting for the street car?
17:02:52 <xarick> how does savegame conversion works for settings now? I remember I need not do anything for old savegames
17:03:10 <xarick> but forgot the details
17:06:55 <peter1138> Gotta love repetitions :D
17:14:26 <Wormnest> IIRC WormAI (without changing settings) does indeed try to not do too much all at once.
17:34:36 *** Flygon has quit IRC (Read error: Connection reset by peer)
(this day is still ongoing; reload to check for any updates)