Log for #openttd on 10th June 2022:
Times are UTC Toggle Colours
14:01:07  <Samu> have you seen the bus issue?
14:01:54  <glx> yes, forcing speed to 0 was wrong here
14:02:27  <Samu> yes, i thought so too, and what about in the other place ?
14:02:31  <Samu> in the code
14:04:15  <Samu> this one, from 2021
14:04:54  <Samu> now that we know better, that one might also been a bad idea
14:06:25  *** Etua has quit IRC
14:07:48  <glx> might be suboptimal, but in this case vehicle just finished turning on the tile
14:08:21  <glx> maybe the same logic as entering on a tile should apply, copy speed from previous and check for 0
14:09:25  <glx> but this logic is broken for now in some very special situations
14:09:56  <glx> like the one in crash save
14:10:30  *** FLHerne has quit IRC
14:11:10  *** FLHerne has joined #openttd
14:13:04  <Samu> i'm also inclined to make it copy speed from previous on my PR
14:20:02  <Samu> there is a line just below with if (HasBit(r, VETS_CANNOT_ENTER)) {
14:20:28  <Samu> i wanted to trigger that somehow, do you know how to setup a scenario to reach there?
14:21:49  <Samu> because it may happen past a pathfinder call, wondering if there is also a need to pushfront the same tile into the cache again
14:26:29  <Samu> maybe i need to test tram
14:28:13  <LordAro> i need to set up an email rule to bin all dependabot mails
14:41:24  <glx> and all AIs in the save are dying from excessive cpu usage
14:49:21  <Samu> it's an old ai, before excessive thing was in openttd
14:52:01  <glx> consuming a lot cpu, and not able to build accessible stations
14:57:28  <andythenorth> was it lunch?
15:38:30  *** Flygon_ has joined #openttd
15:40:28  <andythenorth> ok so how can we patch nml to skip palette checks for OutputNFO
15:40:29  <andythenorth> ?
15:41:49  *** Flygon has quit IRC
15:42:39  <andythenorth> maybe wrap all of 512-541 in `if forced_palette == "ANY":` ?
15:43:28  <andythenorth> no that won't work :(
15:43:33  <andythenorth> oof
15:46:33  <_dp_> palette + nfo output check
16:25:36  <andythenorth> are there other output types where checking palette is useless?
16:26:01  <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #9917: Fix #9914, 86818e5: prevent more useless pathfinder run for blocked vehicles
16:28:04  <Samu> nice, what does const do anyway?
16:28:12  <Samu> unchangeable?
16:28:23  <LordAro> got it in one
16:28:46  <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #9917: Fix #9914, 86818e5: prevent more useless pathfinder run for blocked vehicles
16:30:02  <glx> possibly introduce more cache clearing, but should be less intensive than repetitive pf runs
16:30:13  *** HerzogDeXtEr has joined #openttd
16:31:13  <Samu> will test :)
16:33:43  *** frosch123 has joined #openttd
16:34:04  <Samu> okay i added the const stuff
16:34:08  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #9915: Fix #9914, 86818e5: prevent useless pathfinder run for blocked vehicles
16:34:15  *** Smedles has quit IRC
16:34:23  *** Smedles has joined #openttd
16:34:29  <glx> oh const is not vital here, it's just a good thing to do
16:34:45  <Samu> also changed speed checking to match yours
16:35:41  <frosch123> andythenorth: the palette stuff should already be part of the sprite-encoding-cache
16:35:42  <glx> I removed speed checks, now it just copy the speed of vehicle in front
16:35:56  <Samu> yeah, i meant that, also copies speed
16:36:06  <glx> and unconditional caching just in case
16:36:11  <frosch123> so you can change it to: iterate-over-spritecache instead of interate-over-files
16:36:18  <andythenorth> oo
16:36:49  <Samu> unconditional caching might be a bad idea, will test
16:37:03  <Samu> if it doesn't result in more pf runs, then fine
16:38:19  <glx> worst case will be for vehicles following another one, but not blocked, their cache will be discarded on each new tile, resulting in pf call on intersection
16:38:24  <glx> I think
16:38:28  <frosch123> since the palette/blitter stuff is part of action14, you cannot just skip it for nfo output, though possibly one could also deprecate the legacy W palette in nml, and error on wrong palette
16:46:01  <andythenorth> hmm
16:47:13  <andythenorth> a check of 'nfo' and '-p is set' would work, but it seems a bit magical
16:47:38  <andythenorth> this is a little bit 3D-chess
16:47:49  <andythenorth> or maybe just 2D chess, but I'm not great at chess
17:01:45  <Samu> tests begin!
17:02:10  <Samu> my connection today is very strange, it's so slow at uploading to both github and imgur, very strange
17:02:42  <Samu> 4 subjects
17:35:12  <Samu> i think im testing this wrong, none are synced with master anymore
17:35:37  *** Wormnest has joined #openttd
17:39:25  <LordAro> Samu: it's changing how the pathfinder behaves when vehicles are blocked, why are you expecting it to be identical?
17:39:25  *** Samu has quit IRC
17:39:30  <LordAro> lol
17:39:37  *** Samu has joined #openttd
17:43:20  *** Flygon_ has quit IRC
17:50:24  <Samu> i need another metric
17:50:33  <Samu> "time spent pathfinding"
17:50:38  <Samu> how do i do this
17:51:00  <Samu> because the number of pathfinding calls alone doesn't tell the whole story
17:51:20  <Samu> some calls can take longer to calculate
17:51:32  <Samu> and it still counts as 1 call
17:52:36  <glx> longest calls are for lost vehicles
17:52:49  <glx> with unexisting path
17:56:23  <Samu> this is of that savegame with all 15 ais non-running,
17:56:40  <Samu> of 2 days ago
17:56:42  <Samu> or 3
17:56:57  <Samu> so, no changes to the road network
17:57:36  <glx> seems good
18:23:54  *** HerzogDeXtEr has quit IRC
18:29:45  <Samu> yesterday I was rambling about TileVirtXY(x, y)
18:31:14  <Samu> turns out, i was adding TILE_SIZE to x and y
18:31:35  <Samu> adding 16 would mean i would end on another tile
18:31:45  <Samu> i fixed it with TILE_SIZE - 1
18:32:24  <Samu> that trackdir vs new_td is actually fine, it was false alarm
18:34:07  <Samu> should I post a PR of this? or is it unworthy
18:49:00  <Samu> I can see I can improve the code a bit there
19:18:19  <Samu> hmm this ship reverse cost on the starting tile became complex with the recent ship reversing feature picking up unorthodox trackdirs
19:19:19  <Samu> there are 135 degree turns
19:43:55  <Samu> what shall i call this reverse? unorthodox? need a variable name describing this type of reverse
19:57:54  *** gelignite has joined #openttd
20:04:59  <DorpsGek> [OpenTTD/nml] JGRennison opened issue #253: abs builtin function generates excessively verbose varaction2 output
20:09:32  *** WormnestAndroid has quit IRC
20:10:02  *** Wormnest_ has joined #openttd
20:16:55  *** Wormnest has quit IRC
20:24:13  *** wallabra has quit IRC
20:24:33  *** wallabra has joined #openttd
20:26:26  <andythenorth> so is the spritecache populated after the palette check?
20:28:21  <andythenorth> frosch123 with nfo output, cache isn't populated, maybe? :)
20:28:24  <andythenorth> afaict
20:30:51  <frosch123> no idea, you and regression-test are the only ones using the nfo output :)
20:32:08  <andythenorth> maybe I should just maintain an nml fork that skips this palette check :P
20:33:10  <DorpsGek> [OpenTTD/nml] glx22 commented on issue #253: abs builtin function generates excessively verbose varaction2 output
20:33:32  <andythenorth> trying to write an appropriate condition for the checks needs a smarter person than me :)
20:36:41  <andythenorth> completely unrelated: bananas has a dependencies field for newgrfs
20:36:57  <andythenorth> that will force download of deps, but won't cause them to be added when the grf is activated for a game?
20:37:14  <glx> exact
20:37:46  <frosch123> it is meant for scenarios and ai/game scripts
20:37:56  <andythenorth> could have been a nice compile time improvement if it was an map-gen dependency :P
20:38:16  *** Wormnest_ has quit IRC
20:38:41  <andythenorth> splitting Horse into 2 or 3 sub-grfs
20:39:56  <frosch123> one for each livery
20:39:57  <andythenorth> I did a little speculative test, and I think it would save about 30% of compile time, with make -j and enough thread units
20:40:06  <frosch123> then you do no need an in-game gui to select them
20:40:09  <andythenorth> ooo that is the best bad suggestion for liveries so far :D
20:43:25  *** Wormnest has joined #openttd
20:50:28  *** WormnestAndroid has joined #openttd
20:58:31  *** WormnestAndroid has quit IRC
21:00:24  <FLHerne> _dp_: When you made grf-py, did you consider instead modifying nml itself so it sucks less for that purpose?
21:01:23  <FLHerne> (asking because I've thought about the latter occasionally, but grf-py exists so presumably you thought it was better to make a new lib)
21:01:38  <_dp_> nah, not really
21:01:51  <_dp_> I made is coz I got tired of nml
21:02:00  <_dp_> also it started very small
21:02:06  <_dp_> as nml generator even
21:03:25  <FLHerne> oh, for clarity I meant modifying nmlc to have a reasonably usable Python API
21:03:36  <FLHerne> with `import nml`
21:03:56  <FLHerne> whereas at the moment it's a complete mess, even if some tools do use bits of it
21:04:53  <_dp_> one of the first versions xD
21:04:57  *** WormnestAndroid has joined #openttd
21:05:48  <_dp_> yeah, I understood what you mean but I was already half-way into grf-py when I realised that could be an option to consider
21:06:51  <FLHerne> hm, ok
21:07:01  <FLHerne> so you didn't actually rule it out as a terrible idea beforehand
21:08:17  <_dp_> yeah, was never much interested in nml code
21:08:27  *** gelignite has quit IRC
21:08:44  <_dp_> also grf-py has a bit different philosophy than nml in general
21:09:22  <Samu> 135 degree curve penalty "invented"!
21:09:27  <Samu> only ships can do it
21:09:44  <_dp_> for example, on a low level it's not opinionated, it's just matches grf capabilities as much as possible
21:09:56  <_dp_> so as a bonus it can decompile
21:11:26  <_dp_> and higher level tries to build on top of it to making it easier to use
21:13:05  <DorpsGek> [OpenTTD/nml] andythenorth opened pull request #254: Change: skip realsprite palette validation step iff output is nfo AND…
21:13:26  <andythenorth> I suspect that could be better but eh ^
21:14:02  <_dp_> funnily one of the reasons for early versions of grf-py was that I got tired of fixing palette in gimp after krita xD
21:14:36  <andythenorth> I suspect there's something flawed about nmlc's "guess the palette for the whole grf by walking over each input file"
21:14:42  <andythenorth> but I can't put my finger on what that might be :P
21:14:45  <Samu> last update before i go sleep
21:16:51  <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #254: Change: skip realsprite palette validation step iff output is nfo AND…
21:18:10  <andythenorth> why is palette a compile-time param to nmlc, and not just determined from action 14 or something? :)
21:21:45  <_dp_> any(isinstance(f, output_nfo.OutputNFO) for f in outputfiles) and forced_palette != "ANY"
21:22:32  <andythenorth> PR :P
21:22:50  <andythenorth> strictly I think it should also check for nml output
21:22:58  <andythenorth> because that's a bizarrely valid option afaict
21:23:01  <andythenorth> nml -> nml
21:23:02  <andythenorth> lol
21:23:06  <andythenorth> good use of CPU
21:23:27  <_dp_> lol
21:27:20  <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #254: Change: skip realsprite palette validation step iff output is nfo AND…
21:29:45  *** Wormnest has quit IRC
21:29:52  *** Wormnest has joined #openttd
21:38:40  <Samu>
21:38:57  <Samu> help me with that variable name, unorthodox reverse is bad
21:42:58  <andythenorth> chance anyone will approve my PR? :D
21:43:22  <andythenorth> I can use a forked nmlc, but that might have side-effects :P
21:44:02  <andythenorth> oh black fails?
21:44:26  <andythenorth> I ran black before the forced push though :(
21:45:41  <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #254: Change: skip realsprite palette validation step iff output is nfo AND…
21:48:35  *** Samu has quit IRC
21:50:03  <andythenorth> meh upgraded black, still no change
21:50:54  <frosch123> it's possible that nml uses an old black
21:51:06  <andythenorth> ah
21:51:21  <frosch123> iirc tb did some upgrade+reformat for bananas and eints and such
21:51:30  <frosch123> possibly noone cared about nml :)
21:51:57  <andythenorth> so far I will need to compile about 2400 times to earn back the time I've spent saving time :)
21:52:20  <andythenorth> might stop now :P
21:54:28  <_dp_> andythenorth, did you count the time you spent complaining about slow compilation? :p
21:54:47  <andythenorth> no, that would have been used complaining about _something_
21:56:46  *** Smedles has quit IRC
21:56:54  *** Smedles has joined #openttd
21:59:56  <andythenorth> ok 25s Horse compiles from clean with that patch :P
22:01:00  <andythenorth> wonder if it will be faster if I cut out the hundreds of duplicate realsprites :P
22:08:03  *** frosch123 has quit IRC
22:10:53  *** HerzogDeXtEr has joined #openttd
22:20:34  *** andythenorth has quit IRC
23:48:31  <_dp_> andythenorth[m], you can also try commenting this line and if after it
23:48:35  <_dp_>
23:48:51  <_dp_> for debug builds sho

Powered by YARRSTE version: svn-trunk