IRC logs for #openttd on OFTC at 2025-05-29
β΄ go to previous day
01:05:33 *** Wormnest has joined #openttd
01:32:29 *** WormnestAndroid has quit IRC (Remote host closed the connection)
01:32:34 *** WormnestAndroid has joined #openttd
01:32:42 *** WormnestAndroid has quit IRC (Remote host closed the connection)
01:32:45 *** WormnestAndroid has joined #openttd
02:14:27 *** Wormnest has quit IRC (Quit: Leaving)
02:46:35 *** gnu_jj_ has joined #openttd
02:49:54 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:27:49 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:47:55 <DorpsGek> - Update: Translations from eints (by translators)
05:12:37 *** D-HUND is now known as debdog
06:52:00 *** cu-kai has quit IRC (Quit: Leaving for a bit.)
07:31:12 <peter1138[d]> Probably don't need that much data π
07:34:21 <andythenorth> do these use similar implementation to GS cargomonitor? or something else?
07:38:05 <peter1138[d]> I guess it probably hooks into the same place.
07:42:04 <peter1138[d]> What do I rename "Production Graph" to?
07:54:13 <andythenorth> "Production Graph" isn't awful
07:54:25 <andythenorth> the window is called "Production History" though
07:55:32 <peter1138[d]> Right, but with my tweaks it also shows deliveries, and 'final' industries don't have any production.
07:58:42 <andythenorth> if it was just icons, it would be a small bar chart or line chart
08:00:53 <peter1138[d]> How Do You Tell Someone Who Types Like This That It Is Improper To Do So?
08:01:15 <andythenorth> you just shun them, and cease all contact
08:01:38 <andythenorth> although Title Case was a thing in UIs for a long time π
08:03:11 <andythenorth> Oops, I started looking if OpenTTD UI is consistently sentence case or title case
08:03:16 <andythenorth> "no side quests pls"
08:14:07 *** mindlesstux has joined #openttd
08:16:52 <andythenorth> Maybe We Should All Talk Like This From Now On
08:19:53 <peter1138[d]> I think we'd need to change the language system to understand when a string should be capitalised or not.
08:20:04 *** mindlesstux has joined #openttd
08:20:07 <andythenorth> in the whole world
08:20:27 <andythenorth> can we just switch to kanji or similar?
08:20:39 <andythenorth> how complete is the emoji spec?
08:23:19 *** gelignite has joined #openttd
08:24:21 <Rubidium> peter1138[d]: why would the language system need to be changed? Isn't the 'cases' feature of the string system exactly what you need?
08:25:07 <peter1138[d]> I don't know, I never really understood the cases system π
08:25:49 <andythenorth> do we have css yet?
08:26:28 <peter1138[d]> So shoehorning capitalisation in to it seems weird.
08:26:54 <peter1138[d]> If you change colour in one string, it cascades so any substring. Does that count?
08:27:09 <andythenorth> we could use colours instead of caps
08:29:13 <Rubidium> peter1138[d]: sure, it's meant for that. But how is such a case different from capitalisation in English? Basically you could have STR_COAL:Coal, STR_COAL.lower:coal and then use {STRING} or {STRING.lower} depending whether you want the lower case variant or not. Okay, you could get a 'case' explosion for languages that already use cases. But then, if you were to add something different for lower/upper
08:29:19 <Rubidium> case, you'd also have that... and not all languages need lower/upper case, or have different wishes
08:29:56 <peter1138[d]> I only said weird, not wrong π
08:30:16 <peter1138[d]> But also, NewGRFs.
08:31:47 <peter1138[d]> Is "Witcombe Oil Tanker" the model name, or a description? Could it be "Witcombe oil tanker"
08:32:50 <peter1138[d]> Anyway, deciding on a standard and fixing the case of window titles and buttons would be the simplest place to start.
08:34:44 <peter1138[d]> Apparently I prefered title case back then :p
08:37:11 <peter1138[d]> Also my terse no-waffle bullet point list is seen as hostile, rather than points of debate/note.
08:39:01 <andythenorth> Title Case has been declared passΓ©
08:44:07 <peter1138[d]> Okay, looks like I didn't comment on the original PR, so it wasn't "just me" that was seen as hostile.
08:44:46 <peter1138[d]> But probably is.
08:44:54 <peter1138[d]> Right, probablky time for me to leave then.
08:44:54 <LordAro> ultimately the problem was a non-native speaker wanting to impose order on English text
08:45:23 <LordAro> but various things could've been handled better
08:46:56 <andythenorth> I don't remember any drama π
08:47:08 <andythenorth> I'm sure we all enjoyed ourselves
08:48:08 * andythenorth explores use of case in 'Trains' window
08:48:25 <andythenorth> dropdown menu entries: lower except when title
08:48:51 <andythenorth> labels: sentence
08:54:32 <peter1138[d]> `:wrong company in DoCommand` β this is oddly internal-specific.
09:28:14 <andythenorth> was it lunch yet?
10:15:49 <andythenorth> maybe elevenses?
10:16:54 <andythenorth> absence of cookies
10:17:23 <andythenorth> the cyber attacks on Coop and M&S have disproportionately affected availability of ginger cookies for some reason
10:17:43 <andythenorth> "civilisations end with a whimper, not a bang"
11:09:33 <andythenorth> [before I try it] vehicles would need a specific var to get the railtype badge?
11:09:45 * andythenorth reading the main badges PR diff
11:26:10 <peter1138[d]> Yeah, there's no variable for it, and no scope for it.
11:27:22 <andythenorth> curious if it's a wise idea
11:29:31 <andythenorth> badges are appealing as a way to reduce the semantics of railtype labels, back to an index
11:43:35 *** fairyflossy has joined #openttd
11:43:35 <fairyflossy> Badges for track gauge, badges for power sources, badges for quality of track, ~~badges for loading gauge, badges for Train Protection~~
11:44:47 <andythenorth> I suspect using badges for railtype behaviour is unwise
11:44:50 <andythenorth> it's appealing though
11:45:11 <andythenorth> for something like "change speed" or "change power", or "change visual effect" on a vehicle
11:45:23 <andythenorth> currently a list of known railtype labels has to be checked
11:46:41 <_glx_> Badges for power or compatibility would simplify vehicle/track handling I think
11:49:10 <andythenorth> to make that work with railtype grfs, I need to add more railtype labels, for specific railtype grfs
11:49:43 <andythenorth> I could use hidden railtypes to manage the compatibility instead of extending the vehicle varact2 expression
11:49:56 <andythenorth> but railtype authors need Horse to be able to disable internal railtypes
11:50:15 <_glx_> With badges you could simply ignore labels, and just check if track has the badges you need
11:50:36 <andythenorth> it wouldn't eliminate any of the debate about standards
11:50:41 <andythenorth> but the namespace would be easier
11:50:47 <_glx_> Kinda like cargo classes
11:50:51 <andythenorth> because we wouldn't be fighting for 64 UUIDs
11:51:10 <andythenorth> "there are 64 UUIDS"
11:51:21 <andythenorth> "and we're going to make each of the 4 characters mean something"
11:52:02 <andythenorth> there are 8 million possible combinations, but you get to use 64 of them
11:52:08 <peter1138[d]> Badges can't influences powered-by or compatible-with attributes.
11:52:26 <peter1138[d]> Not impossible to do that, but it wasn't a design intention, so I didn't tackle it.
11:52:50 <andythenorth> the issues that come up relate to behaviour, not pathfinding
11:53:15 <andythenorth> pathfinding on labels seems fine, we have approximately 4 properties to control that at railtype level
11:53:40 <andythenorth> "fine" apart from frosch's PR, but fine
11:54:15 <andythenorth> that's definitely solvable without mixing badges in IMHO π
11:56:35 *** reldred has joined #openttd
11:56:36 <reldred> Badges will save us from everything
11:56:47 <andythenorth> "apart from badges"
11:57:43 *** belajalilija has joined #openttd
11:57:51 <reldred> Someone will need to disregard the spec peters written and write a new community spec for badges
11:58:17 <reldred> With an incomprehensible set of letters and numbers
11:58:38 <reldred> That nobody will ever implement properly
12:00:35 <andythenorth> fortunately the namespace is hard to exhaust
12:00:39 <andythenorth> like cargo labels
12:00:44 <andythenorth> so it doesn't matter
12:01:02 <andythenorth> tragedy of the commons only applies when it's an easily exhausted resource
12:01:09 <reldred> But the scheme the scheeeeeeme
12:02:49 <peter1138[d]> Well, someone needs to use it first.
12:03:35 <peter1138[d]> (But cargo subtype refits!)
12:03:47 <andythenorth> I am using part of The Scheme
12:04:14 <andythenorth> But I havenβt shipped yet so that could be fixed
12:05:06 <peter1138[d]> Oh, #14021 was still a draft, whoops.
12:13:39 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
12:14:27 <peter1138[d]> My unit tests have disappeared.
12:15:00 *** WormnestAndroid has joined #openttd
12:16:22 <peter1138[d]> Ah, restarting extensions and rebuilding made it all come back. Annoying.
12:16:47 <peter1138[d]> Probably too many stupid `copilot` PRs clogging up the dotnet repository.
12:22:35 <xarick> clone object, hmm sounds interesting
12:33:23 <xarick> how can I use it to my advantage
12:47:59 <LordAro> peter1138[d]: farm shop
12:48:11 <LordAro> wait, that's produces
12:48:36 <peter1138[d]> Hmm, gusts of 35mph, maybe not great for cycling.
12:50:09 <peter1138[d]> More like PFFFFFT
12:55:12 <andythenorth> Just keep the wind at your back
12:55:31 <andythenorth> Get a fletner rotor thing
12:59:33 <peter1138[d]> `Npgsql.PostgresException (0x80004005): 40001: could not serialize access due to concurrent update`
12:59:38 <peter1138[d]> I guess that's what I want.
13:01:01 <xarick> dust from north africa coming to portugal again...
13:03:31 <peter1138[d]> andythenorth: Just make sure someone taller than me is riding in front.
13:03:41 <peter1138[d]> Which is difficult as I'm on the tall side.
13:04:25 <xarick> but the weather is dry this time
13:12:06 <xarick> unsure how to take advantage of list cloning
13:15:22 <peter1138[d]> Do you need to clone a list?
13:15:39 <xarick> `this = clone list` is it even valid code?
13:17:53 <xarick> looks like it didn't work
13:18:40 <peter1138[d]> Is `this` ever assignable?
13:22:12 <xarick> there was no error, but it seems it did nothing
13:22:45 <peter1138[d]> Can you see a trend here?
13:23:50 <peter1138[d]> Getting clearer...
13:24:24 <xarick> factory producing grain or something?
13:25:16 <peter1138[d]> The delivered stats start late because they are not currently recorded. I didn't leave the game running long enough to cover the whole range.
13:29:46 <peter1138[d]> Hmm, now, JGRPP does daily stats for cargo waiting in a station.
13:30:03 <peter1138[d]> I don't know if there are any other stats.
13:41:08 <peter1138[d]> What's the best way to store absolute stats? So far it's just incremental.
13:41:43 <peter1138[d]> Taking 1 value for a month could easily miss highs & lows.
13:42:02 <peter1138[d]> Taking max may inflate the percieved value.
14:04:57 <peter1138[d]> Tools solved this problem.
14:06:15 <xarick> I just invented 2 functions
14:15:24 <xarick> there were a few gains
14:15:30 <xarick> at the cost of some ops
14:36:00 <xarick> i just discovered that `this` costs operations too
14:39:47 <xarick> or maybe not, now I'm unsure
14:42:45 <xarick> maybe it's `GSList` in GSList.SORT_BY_ITEM
15:10:51 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
15:11:09 *** WormnestAndroid has joined #openttd
15:30:56 <xarick> just discovered string parsing in squirrel costs a bit of cpu
15:46:45 <andythenorth> Letβs not spoil the metagame π
16:04:10 <xarick> the `.tointeger()` operation was costing 400 ticks in my test!
16:23:22 <xarick> it's a double edged sword
16:24:02 <xarick> 1401 with 50 ms or 1001 with 70 ms
16:24:34 <xarick> leaning towards 1001 with 70 ms
16:24:44 <xarick> 400 is just too huge of a gain
16:32:25 <andythenorth> maybe xarick would enjoy measuring the Iron Horse compile
16:33:23 <xarick> can I port one of my changes to master
16:44:04 <xarick> yay optimized some part on openttd's side, it's down to 63 ms
17:12:20 <xarick> no wonder it was being fast π¦
17:15:57 <LordAro> you're trying to do too much as usual
17:16:22 <LordAro> i'd imagine the vast majority of the actual speedup would be from factoring sq_gettype into a variable
17:16:36 <LordAro> the rest of the changes look at best unnecessary
17:17:03 <xarick> using fallthrough between OT_BOOL to OT_INTEGER
17:19:19 <xarick> i don't understand how fallthrough works π¦
17:19:29 <xarick> cannot be used in this context
17:20:53 <LordAro> this is so very basic
17:21:06 <LordAro> i really wish we'd put our foot down years ago and banned this
17:21:10 <LordAro> it's far too late now
17:22:19 <xarick> just force pushed the fixes
17:23:31 <xarick> auto converting bool to integer saves 400 ticks, it's the only reason I think it's worth it
17:25:14 <xarick> wondering if I'm doing something wrong yet
17:36:12 <talltyler> LordAro: Does IRC not have a "block vibe coding messages" function? π
17:42:03 *** Smedles has quit IRC (Read error: Connection reset by peer)
17:42:54 *** Smedles has joined #openttd
17:45:04 <andythenorth> this would go slightly better if it was just blind application of copilot I think
17:58:01 <xarick> 50005000 calls in 1148981 us
18:17:00 *** gelignite has joined #openttd
18:38:28 <xarick> 50005000 calls in 1042777 us
18:52:35 <peter1138[d]> Come on, occasional worthwhile improvements
18:58:28 <xarick> just discovered an issue
19:00:17 <xarick> vargc however says there's 8
19:00:17 <peter1138[d]> I think I forgot to eat. Had no energy on the bike.
19:01:46 <xarick> the function I defined in the function corrupts vargc?
19:02:57 <andythenorth> peter1138[d]: have a protein bar
19:11:20 <xarick> where in openttd do i find vargc stuff
19:24:24 <xarick> why is vargc size 8 when it should be 0? I'm trying to figure out where things go wrong in openttd
19:25:10 <_glx_> it's from squirrel and it's always correct
19:25:30 <_glx_> it's the number of parameters for current function
19:26:31 <_glx_> and valuator_function count for 1 IIRC
19:33:22 <xarick> ```function SlowValuate() {
19:33:22 <xarick> local f = function() { return true; };
19:33:48 <xarick> wrong number of parameters
19:34:21 <xarick> for some reason it detected 8
19:36:03 <xarick> fails with either Valute
19:37:26 <_glx_> ah my bad, just tested and indeed `vargc` only counts for `...`
19:37:58 <_glx_> `vargc` in `f` is 0, as expected
19:40:51 <_glx_> but there's no `...` so could be undefined behaviour
19:44:05 <xarick> gonna define the function outside
19:45:17 <xarick> nops... wrong number of paramenters, did I break something
19:46:01 <xarick> i'm soooo stupid, it expects the item first, sorry for all this mess
19:46:40 <xarick> `local f = function(item) { return true; };`
19:48:49 <xarick> and all I wanted was to test my auto bool to int converter
19:50:56 <andythenorth> all I wanted was to make 10 trains in Iron Horse
19:51:05 <andythenorth> [cries in code generator]
19:55:50 <peter1138[d]> What's more useful, average stockpiled or maximum stockpiled?
19:56:58 <xarick> for raw cargo the industry produces, I prefer average
19:57:21 <xarick> for processed cargo, i prefer max
19:58:44 <peter1138[d]> So processed cargo is a counter, and doesn't need the concept of avg or max.
19:59:15 <peter1138[d]> You just count it for a month and then reset for the next month.
19:59:39 <peter1138[d]> But stockpile is a gauge. It contains a quantity that can go up or down over time.
20:00:01 <xarick> bool was true and became 1
20:01:46 <andythenorth> I never did learn about bounding boxes
20:01:56 <andythenorth> quite flickery that one π
20:03:26 <peter1138[d]> Something went horribly wrong.
20:05:52 <peter1138[d]> Could be worse, it could be deliberately wrong instead of ... ineptly? wrong ;D
20:07:16 <andythenorth> we'll probably know by the end
20:09:09 <peter1138[d]> Well, a proper average is a bit of a pain to maintain.
20:09:34 <andythenorth> averages are often a PITA
20:09:43 <andythenorth> what would you want to see there?
20:12:51 <peter1138[d]> Okay, look, it's ME asking the question, you can't throw it back at me.
20:13:24 <andythenorth> dunno, unrelated, but am I playing correctly?
20:13:35 <andythenorth> chart has gone biggerer?
20:14:04 <andythenorth> the existing grfs in master are quite validating
20:14:21 <andythenorth> I never saw the need, but actually they add quite a bit
20:14:37 <andythenorth> it helps see if new routes are working as expected
20:14:49 <peter1138[d]> Did you mean to type graphs?
20:14:50 <andythenorth> did I type that?
20:24:57 <peter1138[d]> Of course, default industries don't ever stockpile anyway.
20:26:59 <peter1138[d]> Probably needs a better way to differentiate between series.
20:28:26 <peter1138[d]> Does FIRS stockpile?
20:30:56 <peter1138[d]> Hmm, indeed, what does a graph of stockpiling tell you?
20:32:02 <peter1138[d]> By itself, max doesn't tell you if it's being depleted and refilled.
20:32:15 <peter1138[d]> But having both... that tells you.
20:33:40 <peter1138[d]> Average is not half way between the two, though π
20:37:16 <peter1138[d]> So for the 'perfect' average, sample the current stockpile for all industries every tick.
20:37:33 <peter1138[d]> Seems like a good way to tank performance.
20:37:44 <xarick> is _set function a metamethod function or what is the right lingo?
20:38:04 <peter1138[d]> Hmm, can I sample daily, but spread out over the 74 ticks...
20:39:43 <peter1138[d]> Alternatively, keep a rolling average that is updated every time it's changing. This doesn't need to sample, but is somewhat skewed.
20:40:31 <peter1138[d]> Hmm, store the tick of the last update, and take that into account...
20:44:39 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
20:49:53 <xarick> will squirrel understand `list[i] = false.tointeger();`
20:51:36 <peter1138[d]> So in squirrel are "false" and "0" somehow not equivalent?
20:52:03 <xarick> one is OT_BOOL the other is OT_INTEGER
20:52:42 <xarick> and there's also OT_NULL
20:59:30 *** Flygon has quit IRC (Read error: Connection reset by peer)
20:59:45 <xarick> unsure if moving OT_NULL into the switch was a smart move
21:00:26 <xarick> it's not that much different than what it was
21:00:58 <xarick> SQInteger val was also there before with no good use
21:12:38 <_glx_> and yes supporting `OT_BOOL` in `_set` makes sense as `Valuate` does it
21:15:04 <xarick> OT_BOOL needs {} ? i never know why
21:17:35 <_glx_> local variable in the case
21:19:41 <_glx_> hmm actually sq_getinteger might be able to auto convert a bool
21:20:03 <_glx_> so switch might be unneeded
21:20:35 <peter1138[d]> > load average: 72.38, 83.67, 39.71
21:21:09 <_glx_> ha no, code seems to say it's not
21:23:57 <_glx_> yeah it doesn't (just tested `AddItem` with a bool)
21:31:03 <_glx_> if you understood the original code you wouldn't get `idx` in multiple places
21:31:30 <peter1138[d]> -"the original" π
21:31:44 <xarick> index isn't required in ot_bool or ot_integer
21:32:12 <_glx_> index is needed for all
21:33:11 <_glx_> yes just get `idx` before the switch
21:33:25 <_glx_> like it was before you add the switch
21:33:54 <_glx_> no need to modify all code
21:36:22 <xarick> waiting for CodeQL before force pushing
21:41:25 <xarick> CodeQL has no complains π
21:42:21 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:00:54 *** ChanServ sets mode: +v tokai
22:04:25 *** WormnestAndroid has quit IRC (Remote host closed the connection)
22:04:28 *** WormnestAndroid has joined #openttd
22:07:46 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:08:21 <xarick> GSBase.RandRange itself is heavy
22:09:14 <xarick> but the overhead from custom valuator... is meh
22:11:16 <xarick> 26 ms vs 62 ms, oh well
22:12:15 <xarick> guess calling it Slow Valuator was okay :
22:13:25 <peter1138[d]> Literally slower.
22:20:12 <andythenorth> "pot: kettle" time, but what about just valuating fewer things? π
22:24:04 <peter1138[d]> Hmm, flash white when hovering over the legend, like the smallmap?
23:00:02 <peter1138[d]> I can't really see how to capture guages properly π¦
23:02:12 <peter1138[d]> The stockpile can fill and empty so quickly... is it really stockpiling?
23:32:20 <peter1138[d]> Let's see how JGRPP handles station waiting.
23:57:48 <peter1138[d]> Okay, it just updates every statistic for every station, iterating the pool. every 2 days.
continue to next day β΅