IRC logs for #openttd on OFTC at 2019-01-14
⏴ go to previous day
00:20:03 <Samu> gonna try make opf check for depot tiles somehow
00:20:13 <Samu> instead of me providing it
00:34:36 <LordAro> peter1138: can i be annoying and ask for commits 4 & 5 to be Codechanges?
00:39:19 *** HerzogDeXtEr has joined #openttd
01:03:53 <Eddi|zuHause> LordAro: i was just trying to sort out the capitalisation and then i drew a complete blank on how capitalisation is meant to work...
01:04:52 <Eddi|zuHause> would be easier if someone else did this, my brain is for some weird reason not able to do this
01:08:17 <Eddi|zuHause> gonna --abort this, makes no sense like this
01:18:13 <peter1138> One day I might post something other than food on Instagram. But not today.
01:22:33 <Eddi|zuHause> one day you upgrade for sublte advertising?
01:24:47 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7057: Fix: A few minor compile warnings under MinGW https://git.io/fhnHW
01:59:21 <Samu> wow, opf search method is really retarded
01:59:56 <Samu> without all the randoms choices, it just go straight until it finds an obstacle
02:02:09 <Samu> bird distance isn't used to help it make better choices
02:09:16 <peter1138> It's designed to be low CPU usage.
02:16:01 *** Smedles_ has joined #openttd
02:18:26 <Samu> oh? and then it ends up being the most intensive
02:21:52 <Samu> i guess the random choices makes it look "smarter"
02:22:11 <peter1138> They make it more likely to get there, heh.
02:22:28 <Samu> on my 5000 ship testing, OPF is too slow
02:22:50 <Samu> compared with the other 2
02:23:31 <Samu> but the test uses many buoys, so it could influence results
02:29:04 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7057: Fix: A few minor compile warnings under MinGW https://git.io/fhnQv
02:33:13 *** Thedarkb-X40 has joined #openttd
02:38:06 <Samu> just managed to decrease the stall from 14 seconds to 5 seconds
02:38:45 <Samu> that means, npf is the worst when mass sending 5000 ships to depot
02:40:46 <Samu> why is this a DoCommand, it tests before executing, so basically, it's 10000 ships
02:41:00 <Samu> does the same work twice
02:42:23 <Samu> npf still stalls for 14 seconds
02:44:07 <Samu> opf stalls for ~5 seconds
02:45:48 <Samu> 2.5 secs for yapf, the king
02:47:56 *** triolus has joined #openttd
02:48:37 <Samu> mass sending 5000 ships to depot results:
02:49:47 <Samu> must investigate what's so bad about npf for such a long stall
02:57:33 <peter1138> Did you investigate the underlying algorithms behind OPF, NPF and YAPF?
03:00:20 <peter1138> No, in the pathfinding code, heh.
03:00:31 <peter1138> Are you aware that NPF and YAPF are basically the same pathfinding algorithm?
03:01:17 <glx> NPF and YAPF are implementations of A*
03:04:54 <Samu> i dont know how to properly time a single search
03:06:34 <peter1138> NPF is a simple literal approach to the algorithm.
03:07:07 <peter1138> YAPF is heavily optimized by using C++ templating and implementing a cache.
03:07:49 <peter1138> So, yeah, YAPF is faster than NPF... by design.
03:08:47 <peter1138> What does a cache normally do?
03:09:08 <Samu> but in this case, feels like cache isn't doing anything yet
03:26:03 <Samu> there is no cache for ships, or i dont understand whether it's working
03:29:47 <Samu> CYapfShipAnyDepot2::stFindNearestDepot = 0x00007ff615ebb360 {openttd.exe!CYapfFollowShipT<CYapfShip_TypesT<CYapfShipAnyDepot2,CFollowTrackT<2,Ship,1,0>,CNodeList_HashTableT<CYapfShipNodeT<CYapfNodeKeyExitDir>,10,12>,CYapfDestinationAnyDepotShipT> >::stFindNearestDepot(const Ship *, unsigned int, T...
03:33:04 *** Wormnest has joined #openttd
04:06:20 <Samu> can't spot any cache being worked
04:07:02 <Samu> i think this cache is only for rail
04:38:57 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #6928: Fix #5713: Use pathfinder to find closest ship depot https://git.io/fhZzm
04:56:27 *** triolus has joined #openttd
05:09:46 *** triolus has joined #openttd
06:02:45 *** triolus has joined #openttd
06:23:58 *** triolus has joined #openttd
07:24:51 *** Smedles has joined #openttd
08:05:47 *** HerzogDeXtEr has joined #openttd
08:10:21 *** chomwitt has joined #openttd
08:35:00 <peter1138> He should be a pathfinder expert by now.
08:35:25 <peter1138> I fear though that he hasn't figured out there's a built-in profiling mode for one of them.
09:01:33 *** andythenorth has joined #openttd
09:02:00 <andythenorth> Eddi|zuHause: I have a custom python sort challenge
09:02:19 <andythenorth> current implementation is "sorted(wagon_consists, key=lambda wagon_consist: wagon_consist.subtype)"
09:02:38 <andythenorth> subtypes are 'A', 'B', 'C', or 'U'
09:03:08 <andythenorth> I want sort rank to be 'U', 'A', 'B', 'C'
09:03:15 <andythenorth> I thought of at least two bad ways to do it
09:03:55 <andythenorth> but presumably sort can be given a custom comparison, such that U < A, U < B, U < C, and A B C remain lexical w.r.t each other
09:17:26 *** D-HUND is now known as debdog
09:44:27 *** andythenorth is now known as Guest625
09:44:27 *** andythenorth has joined #openttd
11:38:18 *** andythenorth has joined #openttd
12:11:28 <peter1138> Anything left to close?
12:12:38 *** D-HUND is now known as debdog
13:11:13 *** kragniz is now known as kgz
14:17:37 *** tokai|noir has joined #openttd
14:17:37 *** ChanServ sets mode: +v tokai|noir
14:22:04 *** snail_UES_ has joined #openttd
14:28:39 *** andythenorth has joined #openttd
14:34:10 *** andythenorth has joined #openttd
14:52:16 <DorpsGek_II> [OpenTTD/OpenTTD] Gabda87 updated pull request #7047: Add #6887: Highlight tiles within local authority of towns https://git.io/fhn44
15:01:33 <DorpsGek_II> [OpenTTD/OpenTTD] Gabda87 commented on pull request #7025: Add #6887: Option to show zone inside local authority boundary of towns https://git.io/fhnpz
15:04:43 <Eddi|zuHause> andythenorth: depends how "exdentable" you need it, but as a start how about "sorted(wagon_consists, key=lambda wagon_consist: {"U": 1, "A": 2, "B": 3, "C": 4}[wagon_consist.subtype])"
15:05:10 <andythenorth> Eddi|zuHause: looks good I'll try
15:05:44 <Eddi|zuHause> you could also fiddle around with rexex
15:07:03 <Eddi|zuHause> or you could rename the subtypes so they are lexical ordering to begin with
15:07:38 <andythenorth> that was my crude solution
15:07:45 <andythenorth> but yours works, and is highly readable
15:35:55 *** sla_ro|master has joined #openttd
15:51:53 *** smoke_fumus has joined #openttd
16:01:11 <Samu> how do I measure the time a code part takes to complete?
16:02:11 <Samu> need to investigate why npf stalls for too long
16:03:12 <Samu> want to know where exactly the slowdown comes from
16:05:48 <LordAro> Samu: the thing you want to google is "profiling"
16:05:58 <LordAro> and probably add "visual studio"
16:18:33 <nielsm> visual studio community should have microsoft's profiler built in
16:18:50 <nielsm> just keep in mind it can take a LOT of memory/storage to capture a profiling run
16:27:43 <DorpsGek_II> [OpenTTD/OpenTTD] gregcarlin commented on pull request #7003: Feature #6918: Add option to adjust font size separately from GUI size. https://git.io/fhnjW
16:29:09 *** Wormnest has joined #openttd
16:40:12 *** HerzogDeXtEr has joined #openttd
16:41:41 <Samu> dont know how to make it work
16:42:07 <Samu> it always says no code was run during selected time range
16:42:17 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7003: Feature #6918: Add option to adjust font size separately from GUI size. https://git.io/fhnj7
16:52:13 <Samu> i always get no code was run during selected time range
17:00:49 <peter1138> Hmm, on my old server, I have an svn checkout from 2009 that contains patches to increase the cargo limit to 64...
17:14:06 <DorpsGek_II> [OpenTTD/OpenTTD] gregcarlin updated pull request #7003: Feature #6918: Add option to adjust font size separately from GUI size. https://git.io/fhLFX
17:14:28 <peter1138> Simulation rate: 34.30 frames/s
17:15:09 *** WWacko1976-work has quit IRC
17:16:48 <DorpsGek_II> [OpenTTD/OpenTTD] gregcarlin commented on pull request #7003: Feature #6918: Add option to adjust font size separately from GUI size. https://git.io/fhce5
17:20:58 <peter1138> It is running in a VM though.
17:21:08 <peter1138> Urgh, why is window resizing so broken.
17:21:19 <peter1138> Oh I remember, SDL doesn't technically support it.
17:21:36 <peter1138> It recreates the window every time. Some window managers cope.
17:31:19 *** GroovyNoodle has joined #openttd
17:44:48 *** Progman has joined #openttd
17:54:54 *** Alberth has joined #openttd
17:54:54 *** ChanServ sets mode: +o Alberth
17:58:34 <peter1138> Urgh, I really show clean up my stashes.
18:01:08 <Samu> the slower part of yapf is memset ?
18:03:41 <nielsm> Samu: means it spends a lot of time zeroing memory, I guess
18:05:17 <nielsm> reversing little programs like this is an oddly fun kind of puzzle
18:06:09 <nielsm> taking guesses at what some things are/do, then try building a skeleton program for that, then deriving some more meaning from the original, blindly re-implementing code you don't understand, and then slowly getting to an understanding
18:06:18 <nielsm> I'm sure you can get better at it with practice :)
18:07:08 <peter1138> Surely you just try something once, realise it doesn't work, keeping try, still doesn't work, then give up and move on to something else?
18:09:02 <Samu> in debug mode these times are skewed
18:11:48 <Samu> what takes 2.5 secs in release mode takes 40 secs in debug mode
18:12:58 *** GroovyNoodle has joined #openttd
18:16:22 <peter1138> That's because it's a debug build.
18:17:39 <Samu> sending 5000 ships to depots with NPF
18:18:03 <Samu> takes a spike of 14,112 s selected
18:18:16 <Samu> I'm not sure where to look at
18:19:36 <Eddi|zuHause> <peter1138> Hmm, on my old server, I have an svn checkout from 2009 that contains patches to increase the cargo limit to 64... <-- to whom should that be a surprise?
18:23:00 *** Thedarkb1-T60 has joined #openttd
18:30:03 <peter1138> Hmm, got a stash here that attempts to implement a path cache for ships.
18:30:59 <Samu> i was able to filter out memset stuff
18:31:52 <Samu> ah, memset was only shown on debug mode, i guess
18:32:44 <Samu> i'm still unsure what numbers are important
18:33:55 <Eddi|zuHause> i'm sure there were more people who attempted ship pathfinder optimisations
18:35:27 <Eddi|zuHause> hm, now even "Der Spiegel" is citing xkcd
18:36:11 <Eddi|zuHause> (that's one of the largest news magazines and one of the largest news websites in germany)
18:37:08 <Samu> the slower part of NPF is BinaryHeap::Delete and Has
18:37:53 <Samu> doesn't look like stuff I should care about
18:38:00 <nielsm> Eddi|zuHause, correct horse battery stable?
18:38:34 <Eddi|zuHause> nielsm: no, it's about protein folding, and they cited the "now imagine folding a live one"
18:42:43 <Samu> the slow part is queue.cpp, I never touched this file
18:42:52 <Samu> dont even know for sure what's doing
18:43:15 <nielsm> it's a data structure for a priority queue, I believe
18:43:28 <Samu> it has BinaryHeap and Hash
18:44:15 <Samu> BinaryHeap sounds familiar, I had that thing on my AI, and switched to Fibonacci
18:44:17 <nielsm> and it's likely the part that takes up the most time because stuffing elements into a queue and taking them out again might be the basis of the algorithm
18:45:07 <Samu> now, i dunno anything about the hash
18:46:20 <Samu> There's nothing I can do here then :(
18:48:48 <Samu> * Deletes the item from the queue. priority should be specified if
18:48:48 <Samu> * known, which speeds up the deleting for some queue's. Should be -1
18:49:01 <Samu> that's a funny comment, it ends being the slowest part of NPF
18:49:21 <Samu> bool BinaryHeap::Delete(void *item, int priority)
18:49:36 <peter1138> Don't bother trying to optimise NPF. YAPF exists for a reason.
18:50:46 <Samu> and yesterday I just shoved off 10 seconds from opf
19:14:17 *** acklen_ has joined #openttd
19:15:10 <Wolf01> Mmmh, I think it's a bit that I don't visit the forum... I don't remember the snow this winter
19:16:34 *** dwfreed is now known as Guest647
19:16:35 *** dwfreed has joined #openttd
19:25:47 *** Hobbyboy|BNC has joined #openttd
19:26:02 *** ChanServ sets mode: +v tokai
19:27:20 *** HerzogDeXtEr1 has joined #openttd
19:27:29 *** Eddi|zuHause2 has joined #openttd
19:28:28 *** ToBeFree has joined #openttd
19:28:28 *** reldred has joined #openttd
19:29:08 *** Hobbyboy|BNC is now known as Hobbyboy
19:30:13 *** Progman has joined #openttd
19:30:13 *** HerzogDeXtEr has joined #openttd
19:30:13 *** tokai|noir has joined #openttd
19:30:13 *** planetmaker has joined #openttd
19:30:13 *** TrueBrain_ii has joined #openttd
19:30:13 *** ericnoan has joined #openttd
19:30:13 *** argoneus has joined #openttd
19:30:13 *** V453000 has joined #openttd
19:30:13 *** luaduck has joined #openttd
19:30:13 *** ZirconiumX has joined #openttd
19:30:13 *** dacia.oftc.net sets mode: +vov tokai|noir planetmaker planetmaker
19:30:27 *** argoneus_ has joined #openttd
19:31:01 *** SpComb^ has joined #openttd
19:31:07 *** sla_ro|master has joined #openttd
19:31:07 *** FLHerne has joined #openttd
19:31:07 *** XeryusTC has joined #openttd
19:31:07 *** Terkhen has joined #openttd
19:31:07 *** ^Spike^ has joined #openttd
19:31:07 *** Hirundo has joined #openttd
19:31:07 *** coulomb.oftc.net sets mode: +ovov Terkhen Terkhen orudge orudge
19:31:07 *** KenjiE20 has joined #openttd
19:31:07 *** DorpsGek_II has joined #openttd
19:31:07 *** tyteen4a03 has joined #openttd
19:31:09 *** orudge` has joined #openttd
19:32:43 *** andythenorth has joined #openttd
19:33:56 *** Eddi|zuHause2 is now known as Eddi|zuHause
19:35:29 *** ericnoan has joined #openttd
19:35:37 *** V453000 has joined #openttd
19:35:59 *** planetmaker has joined #openttd
19:35:59 *** ChanServ sets mode: +o planetmaker
19:40:18 <andythenorth> I did a terrible thing
19:41:51 <andythenorth> I went onto LinkedIn
19:41:57 *** Progman has joined #openttd
19:42:28 <andythenorth> then...I messaged Yexo in it
19:43:22 <LordAro> andythenorth: any particular purpose?
19:43:28 <andythenorth> LordAro: none at all
19:43:46 <andythenorth> my favourite things to do have no purpose
19:47:09 <LordAro> andythenorth: excellent
19:48:42 <Samu> i have some patches here that i'm scared to PR
19:48:56 <Samu> because I know already they're not gonna be accepted
19:53:19 <nielsm> some of the code this compiler has generated is completely baffling... "and al, 0FFh"
19:53:19 <peter1138> Requires me to sign in.
19:53:32 <nielsm> al is a byte register, and'ing it with FFh is a no-op
19:53:41 <peter1138> nielsm, sets CPU registers though, no?
19:53:58 <nielsm> touching al should not touch ah
19:54:06 <andythenorth> nielsm: LinkedIn such very evil
19:54:07 <nielsm> though it should clear the top 16 bits of eax
19:54:20 * andythenorth wonders if MS will merge LinkedIn and github
19:54:26 <andythenorth> it's the obvious step
19:55:00 <peter1138> nielsm, I mean the FLAGS register. I dunno if it does.
19:55:05 <andythenorth> free recruiter spam with every PR
19:55:21 <nielsm> yeah no, the next thing it does it pushing ax to set up a function call
19:57:11 <Samu> theres microphone support on openttd now=
19:58:51 <nielsm> dwfreed: honestly I should just stop being shocked that a C compiler from 1994 (or earlier) generates bad code
20:00:07 <nielsm> Samu: no, xaudio is only used for sound out, as an alternative to dsound on windows
20:00:22 <nielsm> (because it makes it easier to port to UWP or something)
20:03:39 <Samu> Severity Code Description Project File Line Suppression State
20:03:39 <Samu> Warning C4146 unary minus operator applied to unsigned type, result still unsigned (compiling source file ..\src\map.cpp) openttd d:\openttd\openttd github\openttd\src\core\math_func.hpp 85
20:03:53 <Samu> this wasn't here yesterday
20:07:22 <Samu> identifier "uint" is undefined?
20:13:30 *** snail_UES_ has joined #openttd
20:13:30 *** Maarten has joined #openttd
20:13:30 *** HeyCitizen has joined #openttd
20:13:30 *** Antheus has joined #openttd
20:13:36 *** TinoDidriksen has joined #openttd
20:13:36 *** ccfreak2k has joined #openttd
20:13:36 *** mikegrb has joined #openttd
20:13:36 *** Extrems has joined #openttd
20:13:36 *** innocenat_ has joined #openttd
20:13:36 *** quiznilo has joined #openttd
20:13:36 *** greeter has joined #openttd
20:13:36 *** rocky11384497 has joined #openttd
20:13:36 *** wodencafe has joined #openttd
20:13:36 *** AKTheKnight has joined #openttd
20:13:36 *** acklen_ has joined #openttd
20:13:36 *** dwfreed has joined #openttd
20:13:36 *** daspork has joined #openttd
20:13:36 *** Smedles has joined #openttd
20:13:36 *** techmagus has joined #openttd
20:13:39 <Samu> i failed to do a push --force
20:14:07 *** ToBeFree has joined #openttd
20:14:07 *** reldred has joined #openttd
20:16:48 <Wolf01> I failed to raise my kitten, became a dog :D
20:17:27 <andythenorth> EMUs: same speed as DMUs, or same speed as electric pax engines?
20:17:43 <andythenorth> [Horse has two speed classes - normal and express]
20:17:54 <Wolf01> No, for real, it brings back what you throw and can be brought outside with a leash
20:19:26 <nielsm> EMUs same speed as DMUs but better acceleration
20:19:38 <andythenorth> nielsm: yeah that's what I coded
20:20:46 <Samu> how do i do a git push --force on visual studio?
20:21:28 <Samu> Sync wasn't it, turned out it was a merge
20:23:47 * andythenorth builds in a BAD EGG
20:23:52 <andythenorth> it's like a BAD FEATURE
20:25:28 *** gelignite has joined #openttd
20:29:13 <Samu> how do i delete a branch and leave no trace about it?
20:29:22 <andythenorth> branch -D generally
20:29:29 <andythenorth> but read the scm pages first
20:29:31 <Samu> i was only experimenting
20:29:58 <Samu> now i see some of my old deleted branches still listed as "deleted"
20:38:28 <Samu> github.com doesn't really delete my stuff
20:38:52 <andythenorth> branch -D, force push
20:38:55 <andythenorth> usually considered rude
20:38:57 <Samu> it leaves it hiden somewhere, allowing me to restore later
20:39:26 <Samu> it's stuff already implemented, so i dont need to keep these branches
20:40:12 <Samu> Team Explorer on visual studio apparently deletes them for good
20:52:54 <Samu> always commits ahead and commits behind :(
20:53:17 <Samu> do I have to rebase everyday force -push all the time?
20:55:16 <LordAro> Samu: in practice, you only need to rebase when something else interferes with something that you've done
20:55:37 <Samu> wow there's more ppl working on ship stuff
20:56:15 <LordAro> i.e. if misc_gui.cpp has been modified in master, and you've been fiddling with pathfinders, they're unlikely to interfere
20:56:52 <LordAro> but these interactions aren't easy to see in advance, so it's best practice to rebase often
20:57:23 *** Wormnest has joined #openttd
20:57:43 <Samu> those changes look scary as heck
20:57:58 *** GroovyNoodle has joined #openttd
20:58:44 <LordAro> as an example, the above will definitely interfere with the stuff you've been playing with :)
20:59:04 <glx> and you also rebase if you need to add something to the PR, but rebase just to rebase is useless
20:59:51 <Samu> if (v->dest_tile == 0 || DistanceManhattan(tile, v->dest_tile) > SHIP_MAX_ORDER_DISTANCE + 5) { using distance manhattan like this is gonna be a disaster waiting to happen, but let me test
21:00:24 <glx> "add something" as a new commit, or an modified commit
21:00:32 <LordAro> Samu: why do you think so?
21:00:41 <LordAro> distance manhattan is a very simple calculation
21:00:58 <Samu> the pathfinder may find a path that makes the ship move the opposite direction
21:01:17 <Samu> if the distancemanhattan check triggers.... rip ship
21:03:22 <LordAro> it was discussed in the PR (or possibly here) - you already can't set orders further than SHIP_MAX_ORDER_DISTANCE apart, so it shouldn't make any difference
21:04:13 <LordAro> but you're welcome to test these things
21:04:29 <LordAro> (or indeed, comment on PRs)
21:06:20 <LordAro> i am actually curious what would happen if you try to send to depot when the nearest depot is > 130 tiles away
21:07:37 <LordAro> *hopefully* it will say "cannot find depot", rather than just stopping the ship
21:17:00 *** GroovyNoodle has joined #openttd
21:18:00 * andythenorth realises simple things aren't simple :P
21:18:10 <andythenorth> cb36 loops are banned for obvious reasons
21:35:39 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep updated pull request #7056: Change #6060: Allow drawing dropdown lists with scrollbars above and fix scrolling movement https://git.io/fhnon
21:36:48 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7056: Change #6060: Allow drawing dropdown lists with scrollbars above and fix scrolling movement https://git.io/fhc3S
21:38:30 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7056: Change #6060: Allow drawing dropdown lists with scrollbars above and fix scrolling movement https://git.io/fhc3F
21:40:14 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7056: Change #6060: Allow drawing dropdown lists with scrollbars above and fix scrolling movement https://git.io/fhcsI
21:43:03 *** GroovyNoodle has joined #openttd
21:46:52 *** frosch123 has joined #openttd
22:15:31 *** DorpsGek has joined #openttd
22:15:31 *** ChanServ sets mode: +o DorpsGek
22:27:57 <glx> ok mingw-w64 command line limit is 32000, the depand command with args but without source files is 8312, source files list is 25155
22:28:14 <glx> not surprising the command line is too long
22:29:25 <glx> and I filtered out all non -D from CFLAGS and CXXFLAGS
22:30:06 *** Eddi|zuHause2 is now known as Eddi|zuHause
22:30:22 <Eddi|zuHause> why would you even build a command line this huge and expect it to work?
22:30:40 <LordAro> glx: i've not seen anything like that, how long are your paths?
22:30:57 <glx> D:/developpement/GitHub/glx22/OpenTTD/src/
22:31:59 <Eddi|zuHause> not short, but also not excessively long
22:32:19 <Eddi|zuHause> my "ancient DOS tricks" tells me you might want to try "subst" :p
22:33:03 <glx> I think I can use $(words) and friends to split in smaller parts
22:33:26 <glx> depend seems to have a -a flag for appending
22:35:30 <Eddi|zuHause> i would put my effort in trying to reduce the number of arguments
22:35:49 <Eddi|zuHause> like calling it in a loop
22:35:56 <Eddi|zuHause> once for each file
22:36:08 <nielsm> xargs does this afaik?
22:36:25 <glx> ha yes that's why I intended to use $(word) and $(wordlist)
22:36:49 <Eddi|zuHause> i don't know what abyss you're delving into, though
22:37:17 <LordAro> depend may want altering to use a file listing inputs or something
22:37:51 <Eddi|zuHause> yeah, put the names into a file, and read that?
22:38:14 <LordAro> it's the less hacky solution, anyway
22:45:05 <glx> modifying depend could work, but as it's also possible to use makedepend it's not the solution
22:50:37 *** Thedarkb2-T60 has joined #openttd
22:56:36 <Samu> distance manhattan is the reason why pathfinders get lost
22:57:00 <Samu> this ship i'm testing is currently not invoking the pathfinder
22:57:12 <Samu> it is a miracle it still finds its way to destination
22:58:00 <Samu> goes forward, reaches the map border, makes some turns, reaches the other map border, and it finally gets moving in a direction that will make the pathfinder be invoked again
22:58:22 <nielsm> someone should be using more buoys
22:58:24 <Samu> then it gets to its destination, after doing some weird turns
23:00:17 <Samu> i'm not sure, it doesn't feel right
23:00:50 <Samu> but yeah, buoys being the solution for ships :(
23:04:16 <Samu> buoys could be abused :( but i kind of like the idea of buoys being a guidance for pathfinders
23:06:04 <Samu> gonna try making buoys a negative penalty, essentially turning them into a bonus
23:07:08 <LordAro> that's unlikely to improve pathfinder performance, if that's what you're trying
23:11:52 <Samu> oh, it's a npf exclusive feature
23:13:48 <Samu> doesn't let me add negative values
23:15:43 <Samu> cost -= _settings_game.pf.npf.npf_buoy_penalty; // A small /*penalty */ bonus for going over buoys
23:16:04 <nielsm> oh, I think I'm almost code complete for the adlib music decoder, except for a bunch of static tables I need to copy over
23:18:21 <Samu> aystar asserts warning me that new_g > 0 failed
23:18:42 <milek7> and now i want to undo it and perform conflict resolution of single file again
23:20:11 <milek7> but reset will obviously throw away all changes
23:20:48 <Eddi|zuHause> yeah, modifying commits is rebase
23:20:52 <LordAro> alternatively, reset --soft
23:21:07 <LordAro> if the commit is still local
23:21:57 <Samu> if i want to go back to stuff I had, i take it back from recycle bin
23:22:47 <milek7> ok, maybe reset to before merge, start merge, checkout good files from new commit, resolve bad file and commit
23:23:30 <LordAro> milek7: that's probably what i'd do
23:28:31 <Eddi|zuHause> you don't need reset if you rebase
23:29:05 <Eddi|zuHause> just carefully consider what the target of the rebase is
23:29:07 <LordAro> Eddi|zuHause: except in this case you're literally removing a commit, rebase isn't the right solution
23:29:34 <Eddi|zuHause> in a rebase you can drop a commit
23:34:08 <peter1138> 22:20 < milek7> but reset will obviously throw away all changes
23:36:25 <milek7> it won't allow me to use merge with dirty working tree after soft/mixed, and i wanted to get file with conflict markers again
23:39:23 <nielsm> will it crash or burn, or will sound actually be produced???
23:40:02 <nielsm> at least nothing audible or visual
23:40:11 <peter1138> Samu, I didn't aim to improve pathfinder performance because that's a hard task. I aimed to prevent some situations that cause massive CPU usage from occuring. (But not all)
23:42:16 <nielsm> yeah I forgot to call Start on the driver :P
23:45:08 <Samu> just decreate max number of nodes
23:45:45 <Samu> it's defaulted to 10000, maybe 5000? dunno
23:46:45 <Samu> have the pathfinder invoked on order insertion
23:47:09 <Samu> let it decide whether destination is too far
23:49:59 <LordAro> few would mourn its loss
23:50:52 <peter1138> So there is a remaining CPU hog issue.
23:51:23 <peter1138> Trying to find a path to a tile that is within the max distance but actually not reachable causes a hitch.
23:52:24 <LordAro> presumably because it's searching the whole map?
23:52:34 <peter1138> I wonder how many new bug reports #6784 will cause :D
23:52:59 <peter1138> Not the whole map but enough. And it'll happen on every new tile.
23:53:28 <peter1138> Well, that's why ship pathfinding already sucks.
23:53:31 <peter1138> It happens on every new tile.
23:53:41 <peter1138> Hence I have a patch to cache paths, but it's very much WIP.
23:53:45 <LordAro> that does seem inefficient
23:54:09 <LordAro> i was thinking that it should cache paths, then follow them until there's something in the way
23:55:02 <nielsm> if it's within range but no path could be found, set a counter that indicates "temporarily lost" and random walk until that counter reaches zero?
23:55:10 <nielsm> and/or send a news message
23:55:41 <LordAro> would still cause a hitch every n tiles
23:55:43 <peter1138> It spreads the load out, so you don't get 5000 pathfinding attempts in one tick.
23:56:00 <LordAro> some sort of limit on the pathfinder would work
23:56:14 <peter1138> There's a distance limit already, iirc.
23:56:26 <peter1138> Or at least, there is now :)
23:56:29 <Samu> have you tried my ship pathfinding depot stuff yet?
23:56:36 <Eddi|zuHause> the main problem with the ship pathfinder is the large number of near-identical paths
23:57:03 <peter1138> Hmm, yes, if it's with-in range, I'm not sure how far the pathfinder will actually go.
23:57:06 <Eddi|zuHause> the second problem is that it is repeated on every tile, as every tile is a junction
23:57:33 <LordAro> peter1138: yeah, referring to your "within range but unreachable" case
23:57:41 <peter1138> Yeah, sorry, sidetracked.
23:58:01 <peter1138> Hmm, we could do with a way to cancel a "Manage list" -> "Send to Depot" command.
23:58:01 <Eddi|zuHause> and "no path exists" is always the worst case for a pathfinder
23:59:58 <peter1138> I think my changes my scupper Samu's testing :p
continue to next day ⏵