IRC logs for #openttd on OFTC at 2023-02-24
β΄ go to previous day
00:02:01 <dP> hm cmserver api, unlike GS, is callback-based making instant execution quite harder...
00:36:10 *** Wormnest has joined #openttd
01:09:52 *** ChanServ sets mode: +v tokai
01:16:44 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
01:28:21 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
02:07:22 *** Wormnest has joined #openttd
03:00:38 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
03:20:33 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:20:42 *** WormnestAndroid has joined #openttd
03:20:45 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:20:48 *** WormnestAndroid has joined #openttd
03:37:32 *** Wormnest has joined #openttd
03:41:32 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:48:49 *** _aD has quit IRC (Quit: leaving)
03:52:39 *** Wormnest has quit IRC (Quit: Leaving)
04:10:49 *** D-HUND is now known as debdog
04:15:27 *** TROILUS9 has joined #openttd
04:21:05 *** TROILUS has quit IRC (Ping timeout: 480 seconds)
04:21:06 *** TROILUS9 is now known as TROILUS
04:33:23 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
04:34:23 *** WormnestAndroid has joined #openttd
06:19:38 *** sla_ro|master has joined #openttd
09:11:10 <andythenorth> we already log GS/AI performance and memory use
09:11:52 <andythenorth> we could have active monitoring, with user alerts or throttling
09:12:10 <andythenorth> we went through a run of crashes where AI seemed to be running out of RAM
09:12:24 <andythenorth> and Samu seems to be finding crashes or performance issues
09:13:13 <andythenorth> oh we could stress test AI + GS that are uploaded to bananas also π
09:14:54 <petern> Huh, even Discord unescaped that, it's actually 4 * \
11:04:21 <TrueBrain> So Ubuntu will no longer install flatpak by default. On the other axis we have KDE and Gnome which are investing more money in Flathub .. this world is fun π
11:14:45 <LordAro> i read about the KDE & Gnome side, hadn't heard about the other
11:15:51 <TrueBrain> But seems AppImage is mostly out of the picture now
11:16:02 <TrueBrain> No big distro betting on that
11:16:15 <TrueBrain> Snap, flatpak or Nix is what we have currently in the race, it seems
11:16:46 <LordAro> Nix seems unlikely to be going anywhere, from the little I know of it?
11:16:52 <LordAro> Happy bumbling along doing its own thing
11:16:56 <Merni> wait why does it show every github bot post being by "GNosii"?
11:17:56 <TrueBrain> LordAro: Dunno, seems more and more popular. But yeah, doing their own thing
11:38:33 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
11:38:37 *** WormnestAndroid has joined #openttd
11:41:31 <FLHerne> AppImage is pretty much designed to sidestep around distro packaging concerns entirely
11:41:39 <FLHerne> so a distro betting on it would be a bit odd
11:42:16 <FLHerne> it still makes sense as the "run on any Linux system, I don't care about managed updates" option
12:01:55 *** APTX has quit IRC (Quit: Farewell)
12:18:19 <Samu> with the power of slow-valuate and variable-script_max_opcodes combined, 4096x4096 + 14 AIs + 250k opcodes/veryfast is nearly acceptable performance
12:22:11 <Samu> my target is average of 20.00ms GS/AI total
13:20:42 <Samu> i think the discord bot is crazy
13:21:33 <LordAro> i think there's an open issue about that somewhere
13:25:04 <LordAro> that's very different
13:35:23 <TallTyler> Huh, you look like Samu to me
13:35:41 <TallTyler> I donβt know how that could differ between Discord clients
13:36:19 <petern> Is it because web interface?
13:37:07 *** wyndbain has joined #openttd
13:37:07 <wyndbain> That shouldnβt have fuck all to do with client side tho? It may just be a bug on one system cah itβs fine for me
13:37:34 <wyndbain> Iβm actually not sure
13:37:47 <petern> Yeah, discord web client shows it wrong.
13:38:22 <wyndbain> I didnβt realise it was discord web
13:38:52 <petern> So the bot changes name for each message. Discord app keeps the name as was when the message was received, but Discord web updates the name.
13:41:24 <petern> Discord app also shows the wrong name if messages are reloaded (I just updated the client)
13:42:27 <petern> Wonder if Discord have changed something, or I've just never noticed.
14:01:38 *** sla_ro|master has quit IRC ()
14:09:08 <TrueBrain> the first petern , as we tested this in all kind of different ways π It wasn't doing this before π
14:09:57 <TrueBrain> also wonder how long it will take them to fix it, as .. kinda a lot of bots work that way π
14:10:28 <petern> It even shows the correct name when you click on it, so the data is there...
14:10:46 <TrueBrain> the avatar is also correct
14:10:55 <TrueBrain> so yeah .. seems like QA missed something π
14:22:47 <TrueBrain> peter1138: I wonder who this will quote ..
14:22:59 <TrueBrain> lol, the name even fixes itself in the quote
14:23:26 <TrueBrain> to give the IRC-dudes an insight π
14:24:15 <TrueBrain> and why does it render those images on Discord to poorly .. lol ..
14:24:44 <Brickblock1> they want to avoid image spam
14:24:49 <Brickblock1> so they changed it
14:25:04 <TrueBrain> in making it worse, gotcha, checks the box π
14:35:27 <Samu> found something strange, maybe a bug?
14:36:16 <Xarick> the rail track is reserved but there's no train in there to make it reserved
14:36:28 <Xarick> there's no train inside the tunnel either
14:36:51 <Xarick> how did it get into this state?
14:37:13 <dP> crashes can break reservation, there is a bug about it
14:39:45 <TrueBrain> why make an issue AND a discussion .. that makes no sense π¦
14:40:20 <TrueBrain> "must be implement", I assume they also volunteer, given the strong words used? π
14:41:16 <petern> Not much point though, I have a patch for it...
14:49:39 <Samu> oh, I remember that issue
14:49:55 <Samu> so there was a train crash that I missed
14:52:13 <reldred> Resolve as hash tag wonβt fix.
14:52:37 <reldred> Surprised itβs not zorg again
14:57:13 <petern> Oh yeah.... blitters...
15:00:54 <Samu> the reservation is being eaten by the "illegal" train, I like how he explains things
15:02:28 <TallTyler> I wonder if hand-drawn 1.5 sprites would be worth the inconsistency in approach, since it seems quite popular
15:06:02 <Samu> reserved tracks always have a train on it, right?
15:06:30 <Samu> if a piece of reserved tracks can't find a train, lift off the reservation
15:06:56 <LordAro> Samu: path reservations can be hundreds of blocks long
15:07:02 <LordAro> no need for a train to be directly on top of it
15:08:32 <LordAro> that might be fun to construct, 4k map, single path covering the whole map, and a train + path signal at one end
15:08:47 <TrueBrain> lol, the Discord bug is so weird .. it is a bit random π
15:19:30 <dP> LordAro: I did this at some point
15:19:38 <dP> didn't quite achieve what I wanted though
15:21:46 <LordAro> what did you hope to achieve? :p
15:21:49 <Samu> store vehicle ID of the train in the map array, to know which vehicle made the reservation
15:22:05 <Samu> if the vehicle poofs, unreserve the tracks
15:31:33 <andythenorth> TallTyler: I would kinda want those who are asking for it to contribute the sprites π
15:31:55 * andythenorth is in "I'm alright Jack" territory, with a screen resolution where 2x looks like original TTD
15:32:39 *** nielsm has quit IRC (Ping timeout: 480 seconds)
15:36:25 <dP> TallTyler: I think they are, can also be used for 3x and 4.5x
15:36:56 <petern> TallTyler: "issue" is slotting it in to the sprite loader system that only expects power-of-two scales.
15:37:20 <dP> you'll just have a separate set of 1x sprites for 1.5
15:37:47 <petern> You can create 1.5x sprites can say they are 1x, but then when you set interface scale to 1.5x you'll get padding around the sprites still π
15:38:17 <dP> well, padding needs to be fixed as well ofc
15:38:36 <petern> And having to manually load a separate NewGRF for 1.5x sprites is clumsy too.
15:38:58 <petern> If the system knows that 1.5x sprites exist, and that they are 1.5x the size of 1x sprites, then the padding will work just fine.
15:50:21 <dP> svg isn't exactly a solution either
15:50:31 <dP> ideally you need different svg for 1x and 1.5x
15:51:01 <dP> as non-aligned lines look bad
15:51:46 <dP> though it will help on the higher scales
15:56:21 <petern> Along with some sizes looking bad, incorrect cropping is also a problem.
15:57:24 <petern> Hmm, the Windows music files are much louder than The Dos music file (GM.CAT)
15:58:20 <petern> Also the start is perhaps not delayed properly.
16:01:41 <petern> I think some of the instruments are different too, anyway.
16:11:48 <Samu> dang, need 20 bits per owner
16:11:53 <Samu> forget the map array idea
16:16:58 *** TROILUS0 has joined #openttd
16:16:58 *** TROILUS has quit IRC (Read error: Connection reset by peer)
16:17:01 *** TROILUS0 is now known as TROILUS
16:23:55 *** gelignite has joined #openttd
17:07:55 *** sla_ro|master has joined #openttd
17:39:56 *** Wormnest has joined #openttd
17:50:10 <glx[d]> (on PC and I got an update today IIRC)
17:52:00 <TallTyler> Yes, I'm seeing the same thing in the desktop application on Windows 10
17:53:14 <LordAro> i was wondering why discord would have two different deployments for electron and web apps, guess it was just slowly rolling out
17:57:04 <andythenorth> hello I am andythenorth
18:01:02 <glx[d]> at least avatars are correct
18:05:53 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
18:09:44 *** HerzogDeXtEr has joined #openttd
18:16:12 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
18:20:43 *** WormnestAndroid has joined #openttd
18:45:05 <Xarick> why can't the train exit?
18:47:19 <debdog> its path blocks its own path
18:48:27 <Samu> guess that saves me from a headache
18:48:42 <DorpsGek> - Update: Translations from eints (by translators)
18:49:20 <debdog> IIRC depots have built-in path signals, right?
18:50:26 *** Wormnest has joined #openttd
19:02:19 *** Eddi|zuHause has quit IRC (Remote host closed the connection)
19:06:06 *** nnyby has quit IRC (Remote host closed the connection)
19:06:17 *** Eddi|zuHause has joined #openttd
19:20:24 <LordAro> though not quite that bad
19:21:04 *** Flygon has quit IRC (Read error: Connection reset by peer)
19:32:09 *** gelignite has quit IRC (Quit: Stay safe!)
19:42:18 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
19:42:43 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
19:45:25 *** WormnestAndroid has joined #openttd
19:48:40 *** Wormnest has joined #openttd
19:53:15 <andythenorth> you'll need your big coat
19:53:26 <frosch> sometimes it's difficult to guess the age of people sending mails to info@
19:54:52 <andythenorth> is it chatGPT though?
19:54:52 <TrueBrain> what a cute email π
19:54:59 <andythenorth> might just be an AI researching
19:55:47 <TrueBrain> so does this mean non of you make any profit of developing for OpenTTD?
19:56:21 <frosch> they are talking singular, so must be referring to you or orudge
19:57:39 <TrueBrain> Mandatory image for the context
19:58:33 <frosch> tv references are lost on me
19:59:24 <TrueBrain> I was afraid it might; so now you understand. Good movie too, but that is not important π
20:01:27 <andythenorth> so do I need to write a test GS then?
20:02:03 <frosch> you won't get paid for it
20:02:51 <andythenorth> will you earn $500k from it?
20:05:57 <andythenorth> is it possible to have a version of GetSystemTime() that times in ms
20:06:31 <andythenorth> current resolution is seconds, and sometimes a function run reports as 0s or 1s due to rounding π
20:06:39 <andythenorth> I'm timing a lot of GS
20:06:51 <glx[d]> Ah your obsession with timing
20:06:51 <andythenorth> it's the only way to know what's expensive
20:07:30 <andythenorth> it's unlikely we'll add a performance framework for GS function calls
20:08:28 <glx[d]> GS can do a lot in 1 tick (except multiple commands)
20:09:39 <andythenorth> I did look if I could patch it myself
20:09:55 <andythenorth> is it just some fmt thing?
20:11:50 <JGR> Because of script suspension, how long some script took is not the same as how expensive it is performance wise
20:12:23 <andythenorth> maybe we need a better way to understand performance then
20:12:41 <JGR> You can use standard performance profiling tools
20:13:28 <JGR> Or at least whichever of the standard tools works on a mac
20:13:40 *** TROILUS has quit IRC (Remote host closed the connection)
20:13:57 *** TROILUS has joined #openttd
20:14:54 <JGR> That said the measurements in the FPS window do handle script suspension
20:22:54 <andythenorth> so profiling would see the script API calls?
20:22:59 <andythenorth> but not the squirrel?
20:23:05 <andythenorth> or can it see the squirrel also?
20:25:04 <JGR> You'd be profiling the squirrel interpreter and the various script APIs as it ran your code, in effect
20:25:35 <andythenorth> standard tool on Mac is Instruments, but normally it's only run for a few minutes
20:25:44 <andythenorth> it's resource intensive and eats a lot of disk
20:26:59 <JGR> I usually use valgrind/callgrind, which is mega slow, but gives pretty detailed info
20:27:28 <LordAro> is `perf` available on macOS?
20:29:49 <andythenorth> I'm not too worried about seeing the full call stack
20:29:55 <andythenorth> more that GS is a massive foot gun
20:30:06 <andythenorth> it's trivial to use excess CPU or RAM
20:30:41 <andythenorth> possibly resolution to the nearest second is adequate though?
20:31:04 <glx[d]> excess CPU happens only in valuate
20:31:20 <andythenorth> or if the sleep value is changed
20:32:50 <JGR> If GSs try to found new towns and the wrong town name generator is being used, you can quite easily use up all your CPU
20:33:18 <andythenorth> I think it's just the 0 seconds that irritates me
20:33:24 <andythenorth> it's obviously not 0
20:33:38 <andythenorth> I might just detect that and change the string to 'less than 1s'
20:34:00 <JGR> GetSystemTime is for wallclock time
20:34:22 <JGR> It's not guaranteed to be monotonic or useful for performance measurements
20:34:42 <andythenorth> what means the wallclock can't be trusted?
20:34:51 <andythenorth> other than the obvious 'people change their system date/time'
20:35:00 <glx[d]> with wallclock time you'll count GS + anything happening between timing calls
20:35:23 <glx[d]> as you can be suspended
20:35:26 <andythenorth> I want to know how long gameplay effects take IRL
20:35:37 <andythenorth> this is about when users start reporting bugs
20:35:43 <andythenorth> "my town didn't update" etc
20:36:04 <andythenorth> or things that scale horrifically with map size
20:36:12 <andythenorth> everything scales horrifically with map size
20:36:16 <andythenorth> just need to know how bad it gets
20:36:28 <andythenorth> is it geometric etc π
20:37:16 <JGR> andythenorth: One day the clock goes backwards 1s due some NTP quirk and your system falls over
20:37:38 <JGR> It's a common enough fairly mode
20:37:44 <TrueBrain> hihi, then don't use posix conditional_variable π
20:38:09 <TrueBrain> still can't believe it uses system_clock instead of steady_clock
20:39:10 <andythenorth> am I supposed to be testing a PR yet? π
20:39:28 <andythenorth> or can we all watch TV? π
20:40:49 <glx[d]> there's only a gist π
20:41:08 <andythenorth> I tested the gist π
20:41:41 <TrueBrain> wait, glx[d] didn't implement it yet? Pff π
20:56:58 <andythenorth> petern: I think National Grid uses Mode 2
21:29:29 *** _aD has quit IRC (Quit: leaving)
22:22:14 <Samu> station platform reservation :(
22:23:08 <Samu> I was going to have trains store which tracks they have reserved
22:23:38 <Samu> but station platforms is... complicated to deal with
22:36:34 <glx[d]> there's nothing wrong with reservation, unless someone modified signals in a live junction or forced a train to ignore a signal
22:40:48 <glx[d]> but it's not a bug, if you modify tracks while trains are running you risk crash
22:41:24 <Samu> the bug is that the tracks don't unreserve themselves even after the crash is cleared
22:41:32 <dP> it's a bug that it clears reservation incorrectly
22:41:56 <dP> but storing reserved tracks is very ineffecient
22:42:21 <glx[d]> right, in this case it should just walk toward signals in bot directions and unreserve
22:42:31 <dP> I see two possible ways to resolve it, either store train id that reserved it in map array
22:42:37 <dP> or never allow reservations to touch
22:43:17 <Samu> a vehicle requires 20 bits, not easy to store
22:47:00 <Samu> pathfinder also temporarily reserves paths, then unreserves, makes this quite complicated to store on a train
22:48:34 <JGR> Train crashes happen so infrequently that it'd make more sense to make the post-crash cleanup more thorough/expensive, instead of normal operations
22:49:34 <dP> it's not just crashes, reservations can collide in other cases too
22:49:36 <glx[d]> clearing reservation when removing crashed trains could easily check the adjacent tracks
22:50:19 <glx[d]> but usually reservations collide if you mess with tracks/signals
22:52:42 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:54:38 <Samu> there can be 2 trains on the same tile, the engine and the wagon
22:54:54 <Samu> maybe more if the size is extra short
22:55:28 <Samu> but there's 2 that reserve, they're touched
22:56:05 <dP> may be enough to only store direction of reservation on the tile instead of train
22:56:51 <JGR> You can run over reservations in a converging direction just the same
22:58:29 <dP> train can have a flag whether it has any reservation at all
22:58:51 <JGR> Trains reserve the track under them, so that is always?
22:58:53 <Samu> they always reserve the tile they're on
22:59:19 <dP> JGR: so, don't reserve if it's already reserved
22:59:59 <glx[d]> hmm if tile store reservation direction it should be simple to follow on cleaning
23:01:36 <JGR> You'll need to follow it in both directions anyway
23:02:09 <glx[d]> I was considering possible branches in the block
23:02:14 <dP> second direction can be found by checking neighbors
23:02:25 <JGR> Reservations don't support branches
23:03:09 <JGR> The map array format specifically doesn't have a representation for that
23:03:57 <dP> well, with direction they could in theory
23:04:17 <dP> just need to point in to train so it can't branch
23:05:28 <dP> though I guess doesn't matter much, just make sure not to connect them
23:06:49 <dP> it kinda like storing them on train, but just as a linked list in map array
23:08:02 <JGR> I store a summary of the reservation on the train (in realistic braking mode), but I don't bother saving every tile
23:08:39 <dP> summary is not enough to clean it
23:08:48 <dP> hm, every trackbit kinda needs its own reservation direction though...
23:09:12 <JGR> Why, you can never reserve more than two bits on a rail tile at once?
23:09:13 <dP> or some optimization as at least two bits can have reservation
23:11:11 <dP> hm, do reservations never touch normally?
23:11:20 <dP> just train flag may be enough then
23:11:32 <dP> just don't let it reserve next to existing reservation
23:13:12 <Samu> what if a train collides with another and they're both goin the same direction?
23:13:33 <Samu> fast train catching up to slow train
23:15:10 <Samu> well i guess in this case, there's no issue of reservation being incorrectly eaten
23:17:20 <glx[d]> train didn't want to ignore signal while waiting for free path, and it didn't start to move when I removed the signal
23:17:49 <JGR> You need to click ignore signal twice for it to do anything
23:18:49 <glx[d]> anyway on crash all reservation were removed except those under the trains
23:21:08 <dP> if it cuts off a part of reservation it won't be removed
23:21:37 <Samu> I'm off to bed, take car
23:21:41 *** Samu has quit IRC (Quit: Leaving)
23:22:10 <glx[d]> ah my test was just a straight track (like TB did in the issue)
23:24:10 <dP> actually, another option would probably be for train to always clean reservation in both directions
23:24:48 <dP> so it will clean the cut off part when leaving the tile
23:25:28 <glx[d]> like clean under and behind up to the signal
23:26:16 <dP> should end on signal anyway unless it's backwards pbs
23:37:22 <glx[d]> oh seems we already have a function for that
23:38:02 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:39:18 <dP> same function as cleaning reservation when reversing and stuff I'd guess
23:39:36 <dP> so may be as simple as just calling it when leaving tile
23:40:18 <glx[d]> well the function I see only follows reservation
23:42:10 <JGR> FreeTrainTrackReservation
23:43:37 <dP> doesn't really need vehicle anyway, only tile and trackdir
23:44:36 <dP> hmmm, compatible railtypes though....
23:45:06 <dP> that may actually be a problem
23:45:38 <JGR> It is only a problem if the NewGRF railtype compatibility tables are incorrect
23:46:11 <JGR> (Which is true for a non-zero fraction of NewGRFs, but anyway)
23:46:56 <JGR> If you correct the tables after GRFs have been loaded it's not an issue
23:48:39 <glx[d]> when leaving tile you can try to find the train in front of you and make it clear the reservation
23:49:57 <dP> though I guess you can follow reservation ahead...
23:50:13 <dP> reservations can touch on incompatible railtypes
23:50:24 <dP> and compatibility depends on the vehicle afaict
23:52:05 <glx[d]> GetTrainForReservation() should find the other train then ourself
23:52:46 <glx[d]> but checking will be expensive
23:53:41 <dP> yeah, can probably be abused as it will be checking quite often
23:54:25 <dP> having a flag to mark the end of reservation may help
23:55:50 <dP> but by then it's no simpler than having a flag on the train
continue to next day β΅