IRC logs for #openttd on OFTC at 2024-02-29
โด go to previous day
00:19:46 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
02:17:57 *** Wormnest has quit IRC (Quit: Leaving)
03:53:02 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:58:31 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:28:31 *** Eddi|zuHause has quit IRC (Ping timeout: 480 seconds)
04:56:16 *** Eddi|zuHause has joined #openttd
04:56:17 *** Flygon has quit IRC (Read error: Connection reset by peer)
05:35:51 *** Leopold___ has joined #openttd
05:42:01 *** Leopold__ has quit IRC (Ping timeout: 480 seconds)
06:32:41 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:53:56 <kuhnovic> I don't know how you do it xarick but you've found another edge case again. Nice work. I'll try to look into it soon.
08:11:39 <truebrain> funny, ever since I bitched about vscode using unreasonable long DNS names, it got fixed. I suspect there are spies in this channel ๐
08:40:43 <merni> It would also be a lot easier if openttd's dropdowns stayed open without holding the click down, like most every UI in the last 20 years :p
08:41:05 <reldred> Yeah I gotta say I wouldn't mind that
08:41:24 <merni> It's especially a pain on a laptop
08:41:41 <reldred> I mean, I'm used to it after so many decades, but the behavior makes it hard to play on touch pads, touch screens, etc.
08:41:58 <merni> though the "double click to drag" option of windows somewhat lessens the pain on trackpads
08:50:47 <emperorjake> There was a PR for that
08:57:26 <peter1138> merni: Except for the toolbar menus, they do.
08:58:37 <_zephyris> Time to synchronise!
09:03:59 <andythenorth> also it would be easier to screenshot the railtypes selection window ๐
09:04:07 <andythenorth> window / very long menu /s
09:04:32 <truebrain> peter1138: let me guess, you have a patch for that? ๐
09:04:32 <merni> I think you mean s/window/very long menu :P
09:04:53 <andythenorth> irc sed was always /s
09:05:00 <merni> Someone should steal all the patches from peter's computer and make them into PRs
09:06:09 <merni> andythenorth: TIL there existed such a thing as IRC sed :p
09:06:27 <merni> I was thinking of the 'real' sed
09:09:31 <LordAro> andythenorth: i don't think it was
09:10:48 <LordAro> in modern times '/s' on the end of the message is usually used to explicitly mark out sarcasm
09:11:01 <peter1138> truebrain: I did, but I closed it because someone else did one too. That's still open.
09:12:30 <truebrain> ugh, sometimes Python, or libraries wrapping around databases, are just annoying. I was wondering why loading 20k entries took 1.5s .. it is purely in Python the creation of the objects that consumes all the time. Ugh.
09:15:54 <peter1138> You and your very large datasets...
09:16:20 <peter1138> I don't use /s to explicitly mark out sarcasm.
09:16:59 <truebrain> I wish Python would hurry with a JIT ๐
09:18:39 <merni> Maybe use a faster language?
09:19:24 <truebrain> or a less crappy library
09:19:35 <truebrain> or offload it to a binary libraryt
09:19:50 <truebrain> but in the end .... I did not expect 20k entries to take 1.5s to load ๐
09:20:36 <LordAro> at work we have an xpath-based xml parsing thing (just xml but with elements referring to other elements in various other ways), written in C. It's *stupidly* slow because it just reparses the xpaths repeatedly
09:20:51 <LordAro> so "a faster language" isn't all that good if the fundamental design is shit
09:21:05 <truebrain> I was like: let's try PyPy, maybe that fixes things
09:21:12 <truebrain> the ramp-up takes longer than the benefit ๐
09:21:23 <LordAro> truebrain: careful, you'll upset andythenorth
09:22:18 <truebrain> lolz @ PyPy .. not sure what it is doing, but not what I would like. 1 run: 1.9s. 10 runs: 32s
09:22:21 <truebrain> that is not adding up ๐
09:25:05 <truebrain> lolz, okay, the slow stuff went from 1.5s to 0.2s, but other stuff all of a sudden came looking around the corner, and takes longer ๐
09:25:16 <truebrain> briliant, just briliant .. I will be sitting here in the corner being annoyed by this all now
09:25:34 <peter1138> You'll have rewritten it soon.
10:03:35 <xarick> it finds a path towards the east dock, but the path is really dumb
10:04:38 <xarick> first, it goes northwest, hits the lumber mill, then turns around, goes southeast and then happens to get on track to reach the dock on the east
10:05:28 <peter1138> Do you want to fix it?
10:12:45 <kuhnovic> Please don't waste your time on NPF...
10:26:37 <merni> is there any actual advantage that NPF still has?
10:32:09 <andythenorth> pypy is always faster except where it isn't
10:32:33 <andythenorth> and it's behind python main, which has also been getting faster
10:33:15 <truebrain> merni: nostalgic ๐
10:37:38 <andythenorth> savegame compatibility?
10:37:50 <andythenorth> also what else would we periodically propose deleting?
10:38:18 <truebrain> merni: with 14.0 we will get some insights how people use the game, and we can make calls like that based on it ๐
10:44:21 <xarick> `fstd->dest_coords = CalcClosestStationTile(fstd->station_index, v->tile, fstd->station_type);` same syndrome
10:44:37 <kuhnovic> What to do when your train is delayed and you have nothing to do? Exactly, nothing more fitting than developing openttd at a train station
10:44:56 <truebrain> train being delayed? Pff, how unusual! ๐
10:48:16 *** Xaroth9232 has joined #openttd
10:56:00 <belajalilija> LordAro: and that *other* type of signals
11:05:10 <peter1138> Programmable signals?
11:07:02 <kuhnovic> Is that something YAPF can't do?
11:07:12 <peter1138> It's something OpenTTD can't do ;D
11:07:23 <belajalilija> peter1138: not quite
11:07:39 <belajalilija> those that shall not be named
11:07:40 <xarick> NPF is coded in a more general sense, for all transport types ๐ฆ
11:07:52 <kuhnovic> I have to admit, if you look at the rail PF part of YAPF, then it's hard to see what it can and can't do. Holy shit ๐
11:08:17 <kuhnovic> xarick: When ship signals
11:12:47 <xarick> for npf, seems that for every neighbour tile, CalcClosestStationTile is issued, the H cost is 0
11:13:04 <xarick> CalcClosestStationTile is... not fixed
11:14:02 <xarick> NPFCalcStationOrTileHeuristic what is the equivalent of this on yapf_ship?
11:14:30 <xarick> is it the EstimateCost?
11:16:58 <LordAro> belajalilija: nono, we need those for logic gates
11:17:25 <belajalilija> :angery:: :angery::angery:
11:17:42 <belajalilija> my plan is foiled
11:21:37 <belajalilija> oh no i know about logic gates
11:21:52 <belajalilija> i guess you're not in the discord or else you'd get why im saying it hahaha
11:27:22 <xarick> it does this for every transport type
11:28:38 <xarick> the estimate cost, in this extreme example, is 0
11:29:07 <xarick> always 0, until the ship moves out of the huge docking tile area
11:30:28 <peter1138> Okay but nobody cares about NPF ๐
11:30:39 <xarick> if (dist < ftd->best_bird_dist) {
11:30:57 <xarick> well, the best_bird_dist was already set to 0 on the previous neighbour
11:35:54 <ahyangyi> Perhaps our compilers already secretly compile away half of the NPF code?
11:36:05 <ahyangyi> if they are all like, if (0 < 0)
11:37:09 <xarick> the decision on whether a path is found or not found is done via: `path_found = (ftd.best_bird_dist == 0);`
11:37:41 <xarick> well in this case, it didn't find a path and yet the best_bird_dist is 0
11:40:32 <xarick> oh right, this calls the pf every tile
11:43:02 <xarick> how do I draw the path?
11:43:18 <xarick> need to visualize what it has
12:00:31 <xarick> 10000 nodes was not enough, let's try unlimited
12:01:31 <peter1138> Have you heard of buoys?
12:02:54 <xarick> map is 64x64, why would it need buoys
12:03:31 <peter1138> map is 64x64, why would 10,000 nodes not be enough?
12:04:46 <kuhnovic> If NPF uses trackdir+tile as the node hash, which it probably does, then a 64x64 map of pure water tiles already has 49152 potential nodes
12:05:13 <xarick> holy crap, it required 17130
12:05:28 <merni> Why exactly are you using NPF?
12:05:47 <kuhnovic> low level YAPF uses trackdir+exitdir which is already better, that's only 16384 on a 64x64 map
12:07:15 <xarick> okay, it found the west dock directly, but required 17130 max nodes :p
12:07:41 <kuhnovic> Now you see why a high level pathfinder was necessary ๐
12:08:09 <xarick> no nono, this is due to the huge docking area
12:08:18 <xarick> it's messing up the estimates
12:09:03 <xarick> it's 0 for every tile it advances
12:10:12 <xarick> i really wanted to see
12:10:42 <xarick> but npf is different, it always using free(current)
12:10:58 <xarick> need to catch the path right when it fails
12:11:45 <peter1138> Compare how it behaves with only a single docking tile.
12:12:11 <peter1138> Maybe it's really confused by always being in the docking area...
12:13:04 <kuhnovic> I keep saying it... why waste your time on NPF
12:13:39 <peter1138> He's going to waste his time anyway ๐
12:14:18 <kuhnovic> Better to waste it on YAPF, we might get something out of it ๐
12:44:30 <orudge> Have sent an e-mail to Microsoft to see if we can get onto the Azure Code Signing preview, which sounds like it would be a decent solution for us (though no indication of pricing yet). It seems ImageMagick is now using it.
12:44:58 <orudge> Failing that I guess I will need to fairly soon start properly investigating the Azure cloud certificate storage thing, that seems to be the best option, but not especially cheap :(
12:51:28 <peter1138> Ah the old signing extortion racket.
13:16:26 *** Ox7C5 has quit IRC (Ping timeout: 480 seconds)
13:19:18 <orudge> Yes, a bargain now at ยฃ299/year :|
13:27:02 <xarick> aha, got NPF drawing the path
13:28:27 <kuhnovic> Haha wow, I see why people prefere YAPF
13:29:36 <xarick> the leash is too short
13:31:46 <xarick> on the way back, it found the path without problems
13:31:55 <xarick> when going from dock to depot
13:32:12 <xarick> estimate works correctly in that case
13:37:06 <peter1138> Yeah so it just doesn't handle being inside the huge docking rea.
13:43:13 <xarick> oops i think i found a bug with AyStar, remember that fix about rivers stalling?
13:43:49 <xarick> changing the max nodes from the console now doesn't work ๐ฆ
13:49:26 <xarick> or maybe it didn't work previously? dang, need to recheck
14:03:24 <xarick> where are heightmaps saved?
14:03:29 <xarick> heightmap screenshots?
14:04:20 <xarick> oh, it's in the screenshot folder... that's where I didn't expect it
14:07:26 <kuhnovic> I have an odd question. Can somebody help me provide a savegame (preferable not a 4K 15 AI players one) that causes PruneIntermediateNodeBranch in yapf_costrail.hpp to be called? It seems the kind of function that gets called onlywhen Mars, Saturn and Jupiter all align...
14:12:52 <xarick> try AAAHogEx, or RailwAI
14:13:06 <xarick> they're both hella good with trains
14:14:31 <xarick> i think those may trigger when the rail route is changed, under construction and some rail got placed meanwhile ruining the current path cache?
14:15:21 <xarick> or when the signals change? block signals? path signals?
14:15:27 <xarick> a mix of both? i dunno
14:15:35 <xarick> you can also try ChooChoo
14:16:48 <xarick> confirmed, it didn't work previously...
14:31:27 *** gelignite has joined #openttd
14:36:09 *** georgevb has joined #openttd
14:36:09 <georgevb> Heed help with name callback.
14:36:09 <georgevb> I try to use it a display feature (because I can't find any way to check calculations)
14:36:09 <georgevb> STR_MODEL_NUMBER6 :{UNSIGNED_WORD}-{UNSIGNED_WORD}-{UNSIGNED_WORD}-{UNSIGNED_WORD}-{UNSIGNED_WORD}-{UNSIGNED_WORD}
14:36:11 <georgevb> switch (FEAT_TRAINS, PARENT, subway_81_765_name_can_attach_wagon_max,
14:36:11 <georgevb> [ STORE_TEMP(2, 0x100), STORE_TEMP(3, 0x101), STORE_TEMP(4, 0x102), 0])
14:36:13 <georgevb> { return string(STR_MODEL_NUMBER6); }
14:36:27 <georgevb> but if I try to get some calculated values
14:37:33 <georgevb> switch (FEAT_TRAINS, PARENT, subway_81_765_name_can_attach_wagon_max,
14:37:33 <georgevb> [ STORE_TEMP(num_vehs_in_consist, 0x100), STORE_TEMP(LOAD_TEMP(5), 0x101), STORE_TEMP(4, 0x102), 0])
14:37:33 <georgevb> { return string(STR_MODEL_NUMBER6); }
14:39:19 <georgevb> And it does not change (while it should, as I expect, return num_vehs_in_consist)
14:39:30 <georgevb> What am I doing wrong?
14:40:24 <georgevb> How can I check my calculations results?
14:49:18 <xarick> 17130 nodes doesn't exactly make the ship reach destination
14:50:49 <xarick> in one of the calls, 17130 is sufficient to find the destination
14:51:12 <xarick> but when on the next tile 17130 is not, and ship goes some other way, what a mess
14:53:01 <kuhnovic> Judging from your previous video, the PF is clearly confused and doesn't get its estimates right. This means it will steer the search fringe all over the place. You might find your goal with 17130 nodes, you might now. Without a proper estimate the number of nodes is going to grow very quickly.
14:53:03 <xarick> why it didn't stick with it
14:55:55 <kuhnovic> And if you consider the fact that A* with a heuristic (estimate) of 0 is the same as Dijkstra, you see why you need so many nodes.
14:56:31 <kuhnovic> Knowing you you're not going to look at it, but I thought I should mention it ๐
15:13:37 <peter1138> I think this might be quite old.
15:24:50 <xarick> there is no example in that page for ship depots... ๐
15:26:02 <xarick> or is it Dijkstraโs Algorithm?
15:27:56 <xarick> looks like my implementation of search ship depot is ~Dijkstra's
15:28:06 <andythenorth> peter1138: only Coke
15:32:46 <xarick> n.m_estimate = n.m_cost;
15:34:41 <xarick> the things I do without realizing
15:35:29 <xarick> I just copy paste until it works!
15:36:52 <peter1138> Like a true stackoverflow coder.
15:38:10 <xarick> I just had a very lol idea!
15:38:41 <xarick> with the advent of "multiple destinations", I wonder...
15:39:02 <xarick> if I can feed all ship depots destinations to a single pathfinder call
15:39:38 <xarick> and let the shortest_estimate dictate the result
16:19:29 *** Wormnest has joined #openttd
16:32:27 <LordAro> peter1138: definitely a brand new idea
16:35:25 <peter1138> I've got a commit here... `Remove $Id$`
16:35:32 <peter1138> How old even is this? ๐ฎ
17:23:30 *** gelignite has quit IRC (Quit: Stay safe!)
17:26:44 *** HerzogDeXtEr has joined #openttd
17:31:14 <kuhnovic> xarick: Now you're on the right track. This page talk about your exact use case
18:04:42 <xarick> how broken will this be ๐
18:05:28 <xarick> I need a depot.best_length from the high lvl pathfinder... help!
18:06:30 <xarick> Very reluctant to pass it via DistanceManhattan
18:09:45 <xarick> not gonna be expensive at all
18:32:52 *** D-HUND is now known as debdog
18:36:40 <DorpsGek> - Update: Translations from eints (by translators)
18:44:04 *** SigHunter has joined #openttd
18:51:30 <xarick> `} else if (max_returned_path_length == MAX_NUMBER_OF_NODES) { // shortcut for Nearest Depot Order`
18:51:57 <xarick> couldn't detect a nearest depot order otherwise
19:03:52 <xarick> my other method is faster
19:36:26 <peter1138> Deduplicating code that is almost but not quite the same. ๐ฎ
19:39:40 <xarick> need to time this the proper way
20:11:26 <georgevb> georgevb: Sorry for raising the question, but still, what am I doing wrong with name callback
20:15:46 <andythenorth> georgevb: When is the name callback re-evaulated?
20:17:37 *** Flygon has quit IRC (Read error: Connection reset by peer)
20:19:17 <andythenorth> Is there any bit shifting needed?
20:20:18 <andythenorth> Does anything thrash register 0x100 in this context?
20:32:07 <xarick> let's see if I know how to use AutoRestoreBackup
20:37:57 <georgevb> andythenorth: I do on see why should it be needed. I need to see numbers, and when I specify them directly, they are displayed correctly. But when I change them to values to vars, it becomes brocken
20:46:16 <xarick> what is faster than `std::find(m_destTiles.begin(), m_destTiles.end(), tile) != m_destTiles.end()`
20:46:39 <xarick> when m_destTiles size is about ~500?
21:01:57 <xarick> I don't think they're sorted, let me see
21:33:57 *** virtualrandomnumber has joined #openttd
21:34:35 *** virtualrandomnumber has quit IRC ()
21:54:41 <peter1138> `SLEG_CONDSTRUCTLIST("speclist", SlRoadStopTileData, SLV_NEWGRF_ROAD_STOPS, SL_MAX_VERSION),`
21:54:47 <peter1138> Well, that confused me for a while.
21:54:56 <peter1138> "speclist" is entirely the wrong string there, but too late.
21:57:26 <truebrain> just a bit late, yes ๐
22:09:56 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:13:27 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:18:28 <xarick> should I give NPF the multi-destination treatment?
22:18:37 <xarick> or screw NPF, just remove it?
22:22:46 <xarick> the multi destination feature
22:22:54 <xarick> for ship depots and docking tiles
22:23:17 <peter1138> `error: no viable conversion from returned value of type 'const SaveLoad[]' to function return type 'SaveLoadTable'`
22:28:05 <xarick> oops, forgot to clean something
22:33:42 <xarick> eh... forgot another thing ๐
22:37:06 <xarick> TicToc was not supposed to be there
22:38:15 <xarick> what is the same of the function that rounds up to the next integer from a division?
22:38:47 <xarick> I want a function that makes 50 / 2 = 3
22:43:35 *** Leopold___ has quit IRC (Read error: Connection reset by peer)
22:44:55 *** Leopold_ has joined #openttd
22:50:39 <xarick> (x + y - 1) รท y says stackoverflow
22:51:58 *** Leopold_ has joined #openttd
22:52:33 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:53:41 <andythenorth> I feel that mistakes were made
22:53:47 <andythenorth> "possibly by me"
22:54:19 <talltyler> Iโm not sure who else could have made this mistake ๐
22:56:36 <talltyler> I can try to make you a โbuy random variantโ button sometime (probably Ctrl+Click on the buy button), although cloned trains would all look the same
22:58:38 <andythenorth> could be worth testing
22:59:23 <andythenorth> I wonder if there's a way to do it where clone also works
22:59:34 <andythenorth> "it's just a pointer"
23:00:03 <talltyler> Cloning could work with a new flag like the random reverse one, โrandom variant when cloning/autoreplacingโ
23:00:19 <andythenorth> or if there's some property set giving the range
23:00:21 <talltyler> โฆwhich would also solve autoreplace ๐
23:01:24 <talltyler> That seems duplicate given the vehicle already had a variant group, no?
23:01:57 <andythenorth> oh random from variant group, yes ok ๐
23:03:27 <talltyler> My flight is leaving, bye me
23:06:01 *** ChanServ sets mode: +v tokai
23:12:53 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
23:57:46 <truebrain> Seems there is a bug, just not the one being reported ๐ can't run OpenTTD on mobile, but sounds like "total download size" isn't actually total, but just the filtered content ๐
continue to next day โต