IRC logs for #openttd on OFTC at 2025-06-03
โด go to previous day
00:41:54 *** aperezdc has quit IRC (Ping timeout: 480 seconds)
00:48:18 *** Flygon has quit IRC (Read error: Connection reset by peer)
01:21:15 *** aperezdc has joined #openttd
01:28:50 *** Wormnest has joined #openttd
01:50:28 *** Wormnest has quit IRC (Quit: Leaving)
02:22:13 *** ipravd_ has joined #openttd
02:47:11 *** gnu_jj_ has joined #openttd
02:47:18 *** WormnestAndroid has quit IRC (Remote host closed the connection)
02:47:22 *** WormnestAndroid has joined #openttd
02:47:22 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:47:24 *** WormnestAndroid has joined #openttd
02:47:27 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:47:38 *** WormnestAndroid has joined #openttd
02:50:31 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:22:04 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:30:44 *** ipravd_ has quit IRC (Ping timeout: 480 seconds)
04:32:33 *** WormnestAndroid has quit IRC (Remote host closed the connection)
04:32:38 *** WormnestAndroid has joined #openttd
05:04:06 *** ipravd_ has joined #openttd
05:15:39 *** ipravd_ has quit IRC (Ping timeout: 480 seconds)
07:48:56 <andythenorth> hmm we have multiple AIs no?
07:49:31 <andythenorth> so multiple GS was a "authors can't co-ordinate" choice, not a fundamental limit of the implementation?
07:50:12 <peter1138[d]> Only one AI per company.
07:58:55 <peter1138[d]> So probably SDL3 or wayland striking again.
08:01:49 <andythenorth> I have no confidence that authors would write co-operative GS ๐
08:02:07 <andythenorth> but it would be nice to bundle an industry placement GS with industry grfs
08:13:03 *** reldred has joined #openttd
08:13:03 <reldred> But likewise we have plenty of grfโs that donโt cooperate with each other, compatible and incompatible GSโs doesnโt seem too removed from where we are atm.
08:32:31 <peter1138[d]> There are some things that would need to be namespaced, or restricted to only one GS able have access.
08:39:34 <andythenorth> there's something in how OSes do things
08:40:04 <andythenorth> for all the protected memory, pre-emptive multitasking, etc
08:40:22 <andythenorth> I can still write a script that will mess with .docx files on my filesystem, and probably crash Word
08:40:32 <andythenorth> but that's not a common case
08:43:21 <peter1138[d]> OpenTTD is not an OS.
08:44:02 <andythenorth> but at some level there's a boundary where "GS A changed the map, then GS B did. So what?"
08:44:16 <andythenorth> OpenTTD won't crash or desynch
08:44:18 <peter1138[d]> 1) CargoMonitors probably need to know which GS requested it. Or they can send the result to all GS even if it didn't ask for it, maybe that's fine.
08:44:44 <peter1138[d]> 2) Strings need to be separated to avoid collisions.
08:45:32 <peter1138[d]> 3) The info/instance/configs need to be stored in a container instead of just one. (Duh)
08:45:40 <peter1138[d]> 4) The UI needs to be changed.
08:47:08 <andythenorth> how many opcodes does each script get?
08:47:28 <andythenorth> or rather, is the current limit divided across n scripts?
09:26:20 <xarick> hmm it must have reached station limit
09:26:31 <xarick> it should have 5k vehicles by now
10:32:09 <xarick> i'm being fed stuff I don't care about
10:33:30 <xarick> some american drama between pride month vs men mental health month
10:33:32 <peter1138[d]> You say that as if that's new.
10:35:12 <xarick> why does the world have to export all this garbage coming from them
10:50:12 <xarick> ``` typedef std::set<SQInteger> ScriptItemList; ///< The list of items inside the bucket
10:50:12 <xarick> typedef std::map<SQInteger, ScriptItemList> ScriptListBucket; ///< The bucket list per value
10:50:12 <xarick> typedef std::map<SQInteger, SQInteger> ScriptListMap; ///< List per item
10:50:12 <xarick> wondering if I could change the container types
10:52:53 <_glx_> Someone tried, it's a pain
10:58:02 <peter1138[d]> Yup, old and fails regression test, or the regression test doesn't test enough.
10:58:25 <xarick> oh, that's your other name
10:58:47 <pickpacket> xarick: it's a very common name
10:58:52 <peter1138[d]> Iterator invalidation is all sorts of weird.
10:59:07 <peter1138[d]> And while performance is better, it's not that much better.
10:59:25 <peter1138[d]> I didn't test with 4 million entry tile lists though...
11:10:17 <xarick> can't rebase stuff that isn't mine
11:13:03 <xarick> a single vector of key-val pairs?
11:16:55 <xarick> i got some GS/AI tests I can run through
11:18:47 <xarick> wow... AddRectangle 4k map is much faster
11:22:23 <pickpacket> xarick: git has a learning curve. I think it's really easy, but I've been using it for 10+ years. Even if the tool isn't complicated in itself it can be hard to learn
11:22:32 <pickpacket> git forges abstracting things don't help either
11:22:49 <peter1138[d]> Does it matter if quarterly figures are up to 2 (absolute) out, and yearly up to 11 out?
11:23:16 <peter1138[d]> Probably depends on the expected range.
11:24:46 <xarick> this test takes 6.2 seconds on master
11:24:56 <xarick> here it only takes 0.55
11:25:07 <xarick> this is worth pursuing
11:29:43 <xarick> oh no... RemoveRectangle on the other hand....
11:33:23 *** WormnestAndroid has quit IRC (Remote host closed the connection)
11:33:27 *** WormnestAndroid has joined #openttd
11:35:06 <xarick> afk, still removing rectangle ๐
11:37:11 <peter1138[d]> AddRectangle is probably fast for the first one, because it's adding to the add.
11:37:23 <peter1138[d]> If you add another earlier, it'll have to shuffle the items.
11:38:25 <peter1138[d]> RemoveRectangle only removes one tile at a time and has to move all the other items.
11:39:06 <peter1138[d]> Something like a marker that says it's deleted without actually deleting it might work.
12:19:02 <peter1138[d]> Does this fix whatever it is that is going on elsewhere? ๐
12:22:42 <xarick> it still hasn't finished removing a rectangle ๐ฆ
12:24:40 <xarick> 14322 merged... RIP AIs
12:25:51 <xarick> could play heightmap and play scenario buttons be switched positions
12:26:30 <xarick> or I could just get used to it
12:49:18 <xarick> RemovingItems becoming a "soft-delete"
13:03:10 <xarick> 30 25 15 40 20 10 oops
13:37:32 <xarick> wish i could understand this stuff
13:50:11 *** boydsquirrel has quit IRC (Quit: User went offline on Discord a while ago)
14:03:20 <xarick> i just copy pasted around
14:03:42 <xarick> dbg_assert doesn't exist
14:03:59 <xarick> replaced NULL to nullptr
14:04:15 <xarick> and now i'm getting unreferenced formal parameters
14:07:23 <xarick> This diff contains a change in line endings from 'LF' to 'CRLF'. i dont know how to solve this
14:09:38 <_glx_> squirrel has some nice stuff
14:16:38 *** tateisukannanirase has quit IRC (Quit: User went offline on Discord a while ago)
14:27:43 <xarick> well, assuming everything is working correctly:
14:27:43 <xarick> that safe btree map/set is fast
14:28:22 <xarick> unsure if my copy paste skills are fine
14:29:22 <xarick> gonna test the Coronas
14:30:03 <xarick> but the issue with coronas is iterating vehicles ๐ฆ
14:34:27 <xarick> regression failed though
14:36:09 <xarick> oh, maybe my copy paste skills failed somewhere
14:45:07 <xarick> oh, snap, SaveLoad is missing
14:56:15 *** Wormnest has joined #openttd
15:10:42 <LordAro> not unless you actually understand what you've done
15:12:07 <xarick> then I solved some issues
15:12:56 <xarick> accidental removal of Load/Save lists
15:13:46 <xarick> in that 3rd party code
15:13:53 <LordAro> sounds like a no to me
15:15:09 *** Yexo has quit IRC (Ping timeout: 480 seconds)
15:16:51 <_jgr_> Even if you did understand it, it wouldn't be merged
15:17:02 <_jgr_> Peter is working on something for vanilla
15:18:12 <xarick> it's bad at removing rectangles
15:19:15 <xarick> It however adds stuff fast
15:49:34 <xarick> i should add my stuff for good measure ๐ฆ
15:52:11 <xarick> peter vs jgr vs xarick vs master
15:56:57 <xarick> disabling variable opcodes and slow valuate to make it as apples to apples as possible
15:57:30 <xarick> disabling spectator slot too
16:07:10 <xarick> for some reason my stuff costs more memory
16:07:31 <xarick> possibly the compat_15.nut overhead?
16:08:47 <_jgr_> Don't take the memory values shown there too literally, they don't include the memory used within ScriptList
16:57:35 <xarick> Search ".AddRectangle(" (1928 hits in 160 files of 194 searched) [Normal]
16:58:31 <xarick> 82% AIs use AddRectangle
16:59:56 <xarick> 38% use RemoveRectangle
17:01:57 <xarick> 87% use AIVehicleList*
17:22:57 <riuzaki56> Would it be possible to add a borderless fullscreen mode, please? At the moment, the only options are windowed and fullscreen.
17:24:11 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
17:28:06 <Heiki> at least Xfce and KDE have an option to hide the borders of maximized windows
17:32:13 <_glx_> everything is possible, but somebody has to code it
17:32:44 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:34:53 *** WormnestAndroid has joined #openttd
17:36:50 <xarick> my stuff takes most memory
17:37:17 <_glx_> your stuff has extra caching of VehicleID IIRC
17:39:25 <xarick> ah, ya, group vehicle lists and bigger tilehash
17:43:52 <xarick> `state = list.Valuate(**state**, GSBase.RandItem);`
17:44:02 <xarick> isn't that the valuator function there?
17:46:32 <xarick> must feed the state to itself is kind of ... meh
17:47:45 <xarick> isn't it possible to store the state somewhere it the ... hmm.. similar to how a vehicle_id is stored
17:48:23 <xarick> the Storage stuff each script have
18:02:06 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
18:02:31 *** WormnestAndroid has joined #openttd
18:43:59 <xarick> peter1138[d]: where did that error come from?
18:44:44 <peter1138[d]> AAAHogEx I think.
18:53:42 <xarick> hmm unsure where it came from...
19:00:07 *** WormnestAndroid has quit IRC (Remote host closed the connection)
19:00:20 *** WormnestAndroid has joined #openttd
19:03:59 <xarick> yeah, it's here, 95% sure
19:04:32 <xarick> GetTrainInfo on an engine that isn't in the dictionary
19:09:12 <xarick> how did it print the message though?
19:09:31 <xarick> it has already been through a DoCommand before
19:09:50 <xarick> should have failed before the message
19:10:23 <peter1138[d]> Quarterly and Yearly graphics. Should they still show monthly data?
19:10:26 <_glx_> based on the partial log it's definitely not there I think
19:12:17 <_glx_> because I fail to see how the snippet could call a command
19:12:21 <peter1138[d]> Nice, #14322 fixes AIAI from trying to... add a large rectangle... :p
19:13:37 <xarick> oh, it's already in an entirely different place
19:14:38 <xarick> and selector is a function of functions
19:16:53 <xarick> so yeah, it still goes through GetTrainInfo, which in turn tries to build a depot if the info is not in the dictionary
19:19:34 <xarick> what an amazing piece of engineering
19:20:20 <xarick> pushing a function into the array
19:21:25 <xarick> is this magically conserving opcodes or
19:21:39 <_glx_> hmm script debuglevel >5 should give more details about the error
19:25:19 <xarick> what's the square root of 200000
19:25:34 *** WormnestAndroid has quit IRC (Remote host closed the connection)
19:25:51 *** WormnestAndroid has joined #openttd
19:29:32 <xarick> for my AI I know i create large rectangles to cover the intercontinental airport + its coverage radius + estimated size of the town I want to place it
19:29:32 <andythenorth> hmm any new master commits? ๐
19:29:34 <_glx_> peter1138[d]: of course before #14303 it would report 2 errors, one inside Valuate() with info about Valuate arguments, plus the error shown now
19:30:06 <xarick> but 447*447.... i think I'm safe, it all depends if the town is toooooo big
19:30:14 <_glx_> airport+coverage is not that huge
19:38:13 <_glx_> peter1138[d]: hmm there's should be the stack info under the call stack
19:39:42 <xarick> well, it's big enough even for big towns
19:49:27 <andythenorth> this adds remarkable QoL feeling
19:55:09 <peter1138[d]> andythenorth: So many cargoes.
19:58:34 <andythenorth> but not all required
20:00:13 <andythenorth> think this is the high water mark
20:01:21 <peter1138[d]> No stockpiles though.
20:35:51 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
20:37:54 <xarick> I'm about to stop the test
20:41:00 <xarick> since you're the guys with brilliant ideas, what can be done about ScriptVehicleList, regarding free wagons
20:41:55 <xarick> talking about groups caching vehicle lists, and groups being unable to take free wagons
20:45:23 <xarick> I have weird ideas myself, like keeping track of their existence, signal the company that it has them
20:50:09 <xarick> a vector just for free wagons ๐ฎ
21:21:52 <xarick> I tried to use erase here, didn't work
21:28:15 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:31:12 <xarick> are disastered trains temporarily free wagons?
21:31:31 <xarick> when their vehicles start being removed
21:40:54 <_glx_> of course, erase wants an iterator, as the doc says
21:47:09 <_glx_> hmm I somehow broke something in #14323
21:48:55 <xarick> where should I look for if I wanna keep track of Free Wagons
21:49:24 <xarick> Vehicle::PreDestructor() maybe?
21:49:31 <_glx_> I'm guessing it's because
21:56:37 <_glx_> and indeed that's the issue
22:01:05 *** ChanServ sets mode: +v tokai
22:07:56 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:33:53 <xarick> they're all maxed out in stations
23:01:29 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
23:02:36 *** WormnestAndroid has joined #openttd
23:05:10 *** Heiki has quit IRC (Ping timeout: 480 seconds)
23:31:32 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
23:32:02 *** WormnestAndroid has joined #openttd
continue to next day โต