IRC logs for #openttd on OFTC at 2024-12-16
⏴ go to previous day
02:47:04 *** Flygon has quit IRC (Read error: Connection reset by peer)
03:00:45 *** Wormnest has quit IRC (Quit: Leaving)
03:03:15 *** D-HUND is now known as debdog
03:20:42 *** gnu_jj_ has joined #openttd
03:23:54 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:45:16 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:46:13 *** D-HUND is now known as debdog
04:45:57 <DorpsGek> - Update: Translations from eints (by translators)
05:11:44 <wensimehrp> Are these lines legacy?
07:18:01 <DorpsGek> - Add: summary for week 50 of 2024 (by OpenTTD Survey)
07:52:58 <truebrain> wensimehrp: It is spamming, as it is highly irregular to leave comments like that. GitHub makes non attempt to show them in any way that makes sense, doesn't allow you to list them, etc. So we make a very verbose message here to give them some visibility. But GitHub is not designed for the workflow you are attempting here 😉
07:55:13 <wensimehrp> I see. Maybe I'll find another way to get in touch with them.
07:58:30 <truebrain> Up to you, I am just explaining why it is spammy like this, and that the receiver of your messages only has his email notifications to find back your comments 😦
07:59:19 <truebrain> (In other words, I am not judging your approach; I am just being annoyed how difficult GitHub made this 😄 )
09:21:31 *** mindlesstux has joined #openttd
10:16:30 <peter1138> Squash into one giant commit right?
10:17:04 <truebrain> That is the pro-way to go, so I read!
10:56:15 <peter1138> With no commit message.
10:58:28 <andythenorth> "Change: roadtypes"
11:02:28 *** kuka_lie has joined #openttd
11:10:12 <peter1138> Hmm, how to write "do X to commit changes" in normal person English?
11:12:55 <peter1138> Never mind. I ate a Wispa instead.
11:14:32 <peter1138> It's basically good for you.
11:25:24 *** kuka_lie has quit IRC (Quit: leaving)
11:46:31 <peter1138> Ok, how many parameters is the newgrf TextRefStack allowed to access?
11:47:58 <peter1138> I'm assuming that the num entries refers to the number of registers used rather than the number of parameters.
11:51:21 <peter1138> Although strings.cpp:1559 suggests it might be. That might be wrong.
11:54:28 <peter1138> That the text ref stack modifies the existing parameters, instead of having its own set of private parameters, is awkward.
11:59:24 <andythenorth> does anyone know? 🙂
11:59:34 <andythenorth> also is it lunch?
12:01:59 <_glx_> Text ref stack is a set of register with variable size params
12:03:14 <peter1138> I know that, I'm just trying to determine if there is some sort of limit.
12:04:28 <_glx_> I think most have 6 registers
12:04:47 <peter1138> But does 6 registers mean only 6 parameters?
12:04:57 <_glx_> But it's painful to use stack
12:05:22 <_glx_> It's possible to pack more than one param in a register
12:06:06 <_glx_> And rotate stuff in the string commands
12:08:16 <peter1138> Okay so for maximum "make sure it's not breaking anything" I need to reserve 20 parameters just in case.
12:13:32 <peter1138> Also need to test the error messages, which first means trying to find a NewGRF error that uses the stack...
12:20:54 <peter1138> ECS likes to give error messages, but they're probably fixed strings.
12:26:37 <peter1138> There must be at least one, because the textrefstack is invokved in the error window for a reason already.
12:26:53 <andythenorth> I am sick and hallucinating, otherwise the easiest thing would be to just write a grf
12:32:38 <peter1138> Hmm, resolving the stack earlier would be nice.
12:34:59 <peter1138> It's got lettuce in it, it's basically a salad and therefore healthy.
12:58:06 <peter1138> andythenorth: Clearly you've turned into an LLM.
12:59:18 <andythenorth> 'turned into'? 😛
12:59:33 <andythenorth> there was a difference before?
13:17:42 <LordAro> andythenorth: tell me about David Faber
13:22:27 <truebrain> seems you broke it; most likely a tokenizer issue
13:25:55 <andythenorth> I'd have to google "David Faber"
13:26:02 <andythenorth> would you like me to google it for you?
13:26:14 <LordAro> nah, you've already proved you're not
13:27:33 <andythenorth> I can probably give a custom GPT those rules 😛
13:27:49 <truebrain> can we train an LLM on all the talk andy does, to make a chatbot that looks&feels like andy?
13:27:54 <truebrain> I feel there is enough chat to actually do that
13:28:20 <LordAro> i feel a markov chain would do
13:28:45 <andythenorth> I trained a GPT earlier this year
13:29:00 <truebrain> LordAro: not sure that is an insult or not 😛 😛
13:29:04 <andythenorth> it's only allowed to respond as a dog
13:29:06 <truebrain> (insult to andy, to be clear)
13:29:23 <andythenorth> `from math import random` would do
13:29:32 <truebrain> no, you are everything but not random
13:29:36 <truebrain> so that would be wrong
13:29:40 <andythenorth> then `random.choice(['hmm', 'lunch?"])`
13:29:54 <truebrain> You would never ask for lunch after 1130 😛
13:29:57 <andythenorth> could just data mine the irc logs for the weights
13:30:09 <andythenorth> well it could have a timestamp vector too
13:30:19 <truebrain> so we are back to a markov chain 🙂
13:30:33 <truebrain> You are not helping your own case here btw 😛
13:31:14 <andythenorth> there was a case? 😮
13:36:59 <peter1138> Ah yes, the obvious `ModelState.Clear();` to make things work.
14:54:11 *** kuka_lie has joined #openttd
16:00:01 <peter1138> wensimehrp: sort them out :p
16:11:13 <FLHerne> I like the screenshot :-)
16:11:53 <_glx_> reading comments on commits is the worst interface
16:12:32 <peter1138> it's not great, but there's not much option here.
16:30:31 *** ialokin has joined #openttd
16:36:22 *** virtualrandomnumber has joined #openttd
16:36:49 *** virtualrandomnumber has quit IRC ()
16:39:16 <wensimehrp> Oof, just learned that this dude intentionally used the incorrect term
16:58:02 <peter1138> I'm now imagining Wikipedia-style edit wars...
17:05:37 <peter1138> Alright anyone found a NewGRF error that uses the textref stack yet?
17:06:38 <andythenorth> FIRS uses substrings in errors
17:06:51 <andythenorth> but I assume nmlc composes those to static action 4s
17:09:56 <_glx_> peter1138: you mean action B?
17:10:35 <peter1138> Callback I guess? Whatever it is that uses the textref stack.
17:11:17 <peter1138> Hmm, some clues. Old though.
17:11:27 <wensimehrp> tinygroxviaGitHub: bruh
17:12:39 <kuhnovic> wensimehrp: Come on, just update the entire translation, since you clearly have all the time in the world 😛
17:13:46 <wensimehrp> After they are done, sure
17:13:56 <_glx_> that looks like action B, and it doesn't use stack IIRC
17:18:19 <peter1138> Well anyway, there exist errors that use the textrefstack.
17:18:43 <peter1138> Or ShowErrorMessage() invokes StartTextRefStackUsage() for no reason, which seems unlikely.
17:20:42 <andythenorth> maybe we should data mine grfs
17:23:08 <_glx_> yeah text stack is usable for industry build failure like CB28 result
17:25:35 *** kuka_lie has quit IRC (Quit: leaving)
17:29:09 <_glx_> hmm or maybe not, I don't see it passing the text stack
17:29:42 <_glx_> the error stuff is hard to follow
17:33:13 <_glx_> only call location where stack info could pass is `CommandHelperBase::InternalPostResult()` it seems
17:37:25 <_glx_> all other call seems to use the other signature and never fill stack related args
17:37:36 <peter1138> Yeah, GetErrorMessageFromLocationCallbackResult.
17:37:46 <peter1138> So it's only used by the industry location callback.
17:42:39 <peter1138> Okay, does FIRS use this? 😄
17:44:41 <peter1138> Oh, not only that. Stations, objects, and industries.
17:56:42 <peter1138> Hmm. Yeah, damn, this does not work.
18:08:07 <peter1138> Wonder if that's stack usage or just... utterly broken.
18:16:43 <peter1138> Just broken, no stack usage.
18:17:15 <peter1138> Still a leftover of game-script string ID limits applied to internally encoded strings.
18:21:24 *** gelignite has joined #openttd
18:30:18 <peter1138> Okay, fixed. But it's not the stack.
18:32:10 <_glx_> let see if I can quickly make a grf with an error using stack
18:45:00 <_glx_> just build the station, it will always error
18:47:51 <_glx_> station location check puts 1234 and 5678 in 0x100 and 0x101, then returns "Error test {COMMA} {COMMA}"
18:57:48 <_glx_> do you need a more complex string ?
18:58:11 <peter1138> std::array<StringParameter, 20> params{};
18:58:11 <peter1138> res.UseTextRefStack(grffile, 4);
18:58:11 <peter1138> res.SetDetailedMessage(GetEncodedStringWithArgs(res.GetErrorMessage(), params));
18:58:42 <peter1138> So this is my working solution. Pre-allocate parameters by encoding them into the string.
18:59:04 <peter1138> It's a bit overkill though, because each uninitialised parameter is actually just a `:` in the encoded string.
18:59:43 <peter1138> (Uninitialised isn't quite right, it's initialised to "no value")
19:00:39 <peter1138> I was surprised because it really was as simple as adding parameters to the encoded string.
19:01:54 <peter1138> And `20` becuase that's the old global parameter size. I don't think 20 is really usable here, but without pre-parsing the string I don't think I there's a way to know.
19:02:41 <peter1138> But also, I wonder if we _should_ pre-parse it, so that we don't need to store any copies of the stack.
19:58:05 *** gelignite has quit IRC (Quit: Stay safe!)
20:06:18 <_glx_> At most stack is 32 bytes (6 registers), but read size is variable
20:20:04 <peter1138> Yes, my idea is if we parsed the string before sending it to GetString() then we could maybe dynamically fill a parameter vector in advance, and modify the string. It's then suitable for passing into GetString() to use directly, or into GetEncodedString() to save for later. The textrefstack is no longer needed as it's been applied already.
20:20:12 <peter1138> But for now, I'm not touching it.
20:33:03 <_glx_> but params is always empty here
20:53:26 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:03:40 <wensimehrp> Now they're making things personal
21:50:11 *** SigHunter has joined #openttd
22:05:25 <xarick> town generation stalls
22:11:22 <xarick> deleting towns during gen costs a bit
22:12:46 <xarick> it's the issue of bridges having no town owner
22:14:06 <xarick> need to dig into the past to refresh my memory
22:30:58 <xarick> oh, debug build, bad test
22:56:18 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:10:15 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
continue to next day ⏵