IRC logs for #openttd on OFTC at 2019-02-20
            
00:02:37 <peter1138> Yeah, tile scan is clearly better than FOR_ALL...
00:03:31 *** m3henry has quit IRC
00:04:24 <peter1138> Oh, no, FindStationsAroundTiles is a FOR_ALL :/
00:12:25 *** Wolf01 has quit IRC
00:20:14 <_dp_> ok, I blame cargodist
00:20:34 <_dp_> map<..., map<...>>[NUM_CARGO] definitely looks like a RAM black hole :p
00:21:15 <peter1138> Hmm
00:25:26 *** Samu has quit IRC
00:36:06 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas opened pull request #7253: Fix #7189: Fluidsynth volume gain too high https://git.io/fhdXI
00:38:33 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #7189: fluidsynth driver plays music too loudly https://git.io/fhdXt
00:40:41 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7253: Fix #7189: Fluidsynth volume gain too high https://git.io/fhdXI
00:41:53 <_dp_> sizeof(GoodsEntry) = 136 so each station gets NUM_CARGO * 136 = 8704 bytes of basically empty space
00:43:14 <_dp_> could probably be replaced with smth like map<pair<StationID, CargoID>, GoodsEntry>
00:44:08 <peter1138> Hmm
00:44:26 <peter1138> Yeah these fixed entries were okay when we only had 12 cargo types.
00:49:36 *** drac_boy has joined #openttd
00:49:49 <drac_boy> hi there .. any git fun tonight?
00:49:56 <peter1138> We're all gits.
00:52:18 *** Progman has quit IRC
00:59:39 <peter1138> Damn it. More optimizations and... scope :/
01:00:09 <Eddi|zuHause> fixing that cargodist mess is probably good for a separate PR
01:00:32 <peter1138> Separate to what?
01:00:47 *** Supercheese has joined #openttd
01:00:50 <Eddi|zuHause> to all the other PRs
01:01:02 <peter1138> Yes. Why wouldn't it be?
01:01:09 <peter1138> _dp_ isn't Samu :-)
01:01:44 <peter1138> /* New town doesn't happen very often so recomputing all stations should be fine. */
01:01:50 <Eddi|zuHause> _dp_ has so many names, how can you be sure one of them isn't Samu?
01:01:55 <peter1138> Time to test founding a town in _dp_'s save.
01:02:22 <peter1138> Eddi|zuHause, that would be clever social manipulation.
01:02:36 <peter1138> This one appears to know "a little" more.
01:03:24 *** tokai has joined #openttd
01:03:24 *** ChanServ sets mode: +v tokai
01:04:01 <peter1138> Hmm, how to get the location and size of a town :/
01:04:18 <drac_boy> :)
01:04:30 <peter1138> t->xy + radius?
01:05:15 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
01:06:08 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fhdXl
01:09:14 *** tokai|noir has quit IRC
01:10:59 <peter1138> Yeah, FOR_ALL_STATIONS() { FOR_ALL_TOWNS() { ...
01:11:04 <peter1138> No wonder it sucks.
01:20:09 *** Smedles has quit IRC
01:21:21 *** Smedles has joined #openttd
01:22:27 *** Ammler has quit IRC
01:22:47 *** Ammler has joined #openttd
01:23:34 *** Supercheese has quit IRC
01:23:56 *** Supercheese has joined #openttd
01:35:20 *** drac_boy has left #openttd
01:45:42 *** Smedles has quit IRC
01:46:31 *** Smedles has joined #openttd
02:06:32 *** Smedles has quit IRC
02:07:59 *** Smedles has joined #openttd
02:10:02 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z updated pull request #7213: Feature: BFS-based river generator https://git.io/fhHN6
02:10:28 <Eddi|zuHause> that last change was probably more crazy than the crazy hack :p
02:10:30 *** HerzogDeXtEr has joined #openttd
02:11:37 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z updated pull request #7213: Feature: BFS-based river generator https://git.io/fhHN6
02:13:30 <Eddi|zuHause> uhm, was that my force push that broke the build?
02:15:14 <Eddi|zuHause> ah, i think i caught it in some intermediate stage where it was not yet picking up the new one
02:15:51 <Eddi|zuHause> hm... no, weird
02:18:17 <Eddi|zuHause> i can't figure out what's wrong with the build
02:19:44 *** supermop_Home has joined #openttd
02:27:44 <glx> not the first time this error happens
02:29:14 <glx> https://dev.azure.com/openttd/OpenTTD/_build/results?buildId=1141&view=results <-- this one had a similar fail
02:30:50 *** TrueBrain_ii has quit IRC
02:31:05 *** TrueBrain_ii has joined #openttd
02:34:29 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z updated pull request #7213: Feature: BFS-based river generator https://git.io/fhHN6
02:35:15 <Eddi|zuHause> glx: i'm pretty sure it's a race condition between trying to fetch the PR and invalidating the build due to updated PR
02:35:25 <glx> possible
02:35:58 <dwfreed> fun fact, git has a flag to push to avoid accidentally force-pushing over somebody's push you don't know about
02:36:18 <dwfreed> --force-with-lease
02:36:44 <Eddi|zuHause> dwfreed: i'm fairly confident that nobody else pushed to my fork :p
02:37:15 *** supermop_Home has quit IRC
02:37:24 <glx> indeed commit 9fa29a7ed9c7a3a2dac7a812d84632a0ef9cbe68 seems wrong in the log
02:38:32 <glx> well maybe it was correct, but I can't check since you force pushed again :)
02:39:45 <Eddi|zuHause> there's no 9fa2... in my reflog, so i can't verify that either
02:40:50 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
02:41:18 <peter1138> +575-114 :/
02:42:30 <Eddi|zuHause> 600loc is only like a full week of work :p
02:43:12 <peter1138> 5 days, so yes.
02:44:15 *** Smedles has quit IRC
02:44:30 <Eddi|zuHause> even a bit more, if you assume 10 lines per hour and 8 hours per day
02:45:28 *** Smedles has joined #openttd
02:47:10 <Eddi|zuHause> (which comes out at 400 loc)
02:54:45 *** supermop_Home_ has joined #openttd
02:59:25 *** Gustavo6046 has quit IRC
03:04:56 *** Supercheese has quit IRC
03:19:14 <peter1138> I... was going to have an early night. Shit.
03:33:45 *** snail_UES_ has joined #openttd
03:36:44 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas opened pull request #7254: Codechange: introduce a few unit tests https://git.io/fhdMU
04:03:22 <supermop_Home_> hmm
04:06:21 *** Smedles has quit IRC
04:07:16 *** Smedles has joined #openttd
04:14:43 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7254: Codechange: introduce a few unit tests https://git.io/fhdMU
04:23:46 *** debdog has joined #openttd
04:25:56 *** Thedarkb-X40 has joined #openttd
04:27:09 *** D-HUND has quit IRC
04:29:50 *** supermop_Home_ has quit IRC
04:44:36 *** glx has quit IRC
05:04:52 *** HerzogDeXtEr has quit IRC
05:23:20 *** Thedarkb-X40 has quit IRC
05:44:28 *** snail_UES_ has quit IRC
06:22:11 *** SpComb^ has quit IRC
06:37:15 *** SpComb has joined #openttd
06:40:40 <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] commented on pull request #6980: GDI engine for font glyph rendering as a replacement for FreeType https://git.io/fhdyU
06:45:00 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7254: Codechange: introduce a few unit tests https://git.io/fhdMU
07:16:40 *** ericnoan has quit IRC
07:16:45 *** ericnoan has joined #openttd
07:18:22 *** Progman has joined #openttd
07:20:40 *** V453000 has quit IRC
07:21:17 *** V453000 has joined #openttd
07:26:40 *** planetmaker has quit IRC
07:27:17 *** planetmaker has joined #openttd
07:27:17 *** ChanServ sets mode: +o planetmaker
07:28:40 *** SmatZ has quit IRC
07:29:17 *** SmatZ has joined #openttd
07:43:29 <peter1138> hi
07:52:09 *** asdfgggfd has joined #openttd
08:21:32 *** andythenorth has joined #openttd
08:21:38 <andythenorth> yo
08:21:43 <andythenorth> @seen pikka
08:21:43 <DorpsGek> andythenorth: pikka was last seen in #openttd 2 days, 12 hours, 26 minutes, and 58 seconds ago: <Pikka> I guess I got over the idea :P
08:29:04 <andythenorth> shameful
08:29:06 <andythenorth> I have questions :P
08:30:30 <peter1138> Oh no.
08:30:46 <peter1138> nrt working?
08:33:40 <andythenorth> seems to be
08:33:48 <andythenorth> I just tried Eddi|zuHause's river patch though
08:33:58 <andythenorth> game dies on map gen, no meaningful error
08:34:02 <peter1138> Nice.
08:34:04 <andythenorth> how do I increase output level?
08:34:16 <andythenorth> "/bin/sh: line 1: 61123 Illegal instruction: 4 ./openttd"
08:34:18 <andythenorth> is all I get
08:34:34 <peter1138> Oh wow.
08:34:37 <andythenorth> no crash log is written
08:35:21 <andythenorth> https://github.com/OpenTTD/OpenTTD/pull/7213/commits
08:36:12 <andythenorth> ./configure
08:36:28 <andythenorth> oops that's not a shell :P
08:43:54 <andythenorth> I bisected, failure introduced here https://github.com/OpenTTD/OpenTTD/pull/7213/commits/97d60660faa429612e1a10a71c531783a56e2b32
08:44:03 <andythenorth> looks harmless :o
08:53:25 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7213: Feature: BFS-based river generator https://git.io/fhdSP
09:00:41 <LordAro> illegal instruction is usually some sort of stack corruption
09:01:10 <LordAro> valgrind will probably find something
09:01:21 <andythenorth> out of my depth :P
09:01:23 <LordAro> but you're right, i don't think it's that commit
09:02:09 <LordAro> install valgrind, run valgrind ./bin/openttd, post output :p
09:13:40 <andythenorth> I think valgrind is broken on macos
09:14:02 <andythenorth> https://paste.openttdcoop.org/pgtcjzyqf/ksb9ef/raw
09:14:24 <andythenorth> maybe I should valgrind valgrind :P
09:19:16 <LordAro> lol
09:19:39 <andythenorth> I feel there's an xkcd for this :P
09:19:58 <LordAro> i have successfully gdb gdb before now
10:18:19 <Eddi|zuHause> that commit "looks" harmless, but it makes the priority queue priorities non-zero more times
10:18:43 <Eddi|zuHause> so if i made mistakes with the priority queue, then they might show more often
10:19:42 <Eddi|zuHause> andythenorth: could uncomment the //DEBUG lines, and show me a log of that?
10:30:11 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z updated pull request #7213: Feature: BFS-based river generator https://git.io/fhHN6
10:30:42 <Eddi|zuHause> andythenorth: try now with "-d misc=9"
10:42:49 *** Gustavo6046 has joined #openttd
10:44:26 *** Yexo has quit IRC
10:44:47 *** Yexo has joined #openttd
10:57:14 *** fonsinchen has quit IRC
10:57:47 *** fonsinchen has joined #openttd
10:58:51 *** Gustavo6046 has quit IRC
11:01:31 <Eddi|zuHause> valgrind certainly goes crazy on my priority queue
11:02:19 <Eddi|zuHause> ==29258== More than 10000000 total errors detected. I'm not reporting any more.
11:02:20 <Eddi|zuHause> ==29258== Final error counts will be inaccurate. Go fix your program!
11:05:13 <peter1138> :)
11:06:20 <Eddi|zuHause> there's also one in libSDL, i'm ignoring that
11:07:16 <peter1138> Yes, that's known.
11:08:18 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z updated pull request #7213: Feature: BFS-based river generator https://git.io/fhHN6
11:08:31 <Eddi|zuHause> should be better now
11:09:17 <peter1138> Heh
11:10:04 <peter1138> Can I suggest using our codestyle?
11:10:21 <Eddi|zuHause> yes, any particular bit?
11:10:27 <peter1138> Spaces between operators.
11:10:38 <peter1138> if (mode==1) count+=5+(Random()&0xF);
11:10:45 <peter1138> if (mode == 1) count += 5 + (Random() & 0xF);
11:10:50 <Eddi|zuHause> i'm indeed sloppy with that
11:10:52 <peter1138> etc
11:10:59 <peter1138> That's why I mentioned it, yes.
11:11:20 <peter1138> Also, uint &count, not uint& count./
11:11:35 <peter1138> Yeah, and ' *' not '* '
11:12:40 <Eddi|zuHause> i might have picked some of those up from example codes
11:12:55 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7213: Feature: BFS-based river generator https://git.io/fhdQa
11:13:00 <peter1138> Not from our code.
11:13:08 <peter1138> We had that argument long ago with Tron.
11:13:32 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7213: Feature: BFS-based river generator https://git.io/fhdQr
11:15:09 <Eddi|zuHause> yes, i remember the argument, i just can never remember the outcome :p
11:16:31 <peter1138> I'm sure there's plenty of existing code in that file to follow if you are in doubt.
11:24:35 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z updated pull request #7213: Feature: BFS-based river generator https://git.io/fhHN6
11:24:48 <andythenorth> still crashing :)
11:24:56 <andythenorth> I'll have to run the debug stuff later
11:25:01 * andythenorth must now cycle to work :P
11:25:31 <peter1138> Yay cycling
11:27:27 <Eddi|zuHause> i think i covered both your points
11:29:39 <Eddi|zuHause> peter1138: unfortunately, there's no examples of using STL types with custom data types in that file :p
11:29:54 <peter1138> Plenty elsewhere? :)
11:30:18 <peter1138> non-rect catchment doesn't use STL anymore :/
11:30:29 <peter1138> I feel that's a bit backwards, but performance.
11:30:44 <peter1138> I could perhaps use std::vector instead of SmallVector.
11:30:54 <peter1138> Or I could let m3henry sort that one out later ;)
11:34:56 *** andythenorth has quit IRC
12:00:22 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7213: Feature: BFS-based river generator https://git.io/fhd7u
12:03:58 *** andythenorth has joined #openttd
12:06:10 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7213: Feature: BFS-based river generator https://git.io/fhd7w
12:13:01 <Eddi|zuHause> i'm now unsure if that applies to water border instead of freeform border maps...
12:13:48 <Eddi|zuHause> does std::vector do bounds checking?
12:16:20 <Eddi|zuHause> valgrind doesn't complain with water borders either
12:21:49 <LordAro> Eddi|zuHause: .at() does, [] does not
12:26:19 <Eddi|zuHause> i think i played with it too much, and it turned into DFS again :/
12:37:53 *** Laedek has quit IRC
12:38:25 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7252: Fix #7159, e934f09: Waiting time at red one-way signals was too short. https://git.io/fhd5I
12:41:38 *** Laedek has joined #openttd
12:44:00 <peter1138> git show efaeb275f
12:44:06 <peter1138> Always good for a laugh.
12:48:40 *** snail_UES_ has joined #openttd
12:55:21 *** m3henry has joined #openttd
12:55:26 <m3henry> SPAHS!
12:58:23 <peter1138> Who!
13:01:03 * m3henry decloaks
13:01:36 <Eddi|zuHause> gah... TF crashes on loading the game that worked yesterday :/
13:04:04 <Eddi|zuHause> terminate called after throwing an instance of 'std::system_error'
13:04:06 <Eddi|zuHause> what(): Resource temporarily unavailable
13:04:20 *** snail_UES_ has quit IRC
13:10:05 *** kiwitree has joined #openttd
13:23:23 *** sla_ro|master has joined #openttd
13:26:49 <peter1138> Hmm, I need that nearest-town voronoi patch...
13:26:53 <peter1138> Just for visualization :p
13:28:56 *** Progman has quit IRC
13:29:49 *** Progman has joined #openttd
13:37:20 *** Flygon has quit IRC
13:50:02 *** Mek has quit IRC
13:50:02 *** Mek has joined #openttd
13:52:21 *** Progman has quit IRC
14:00:26 *** guru3 has quit IRC
14:04:38 <Eddi|zuHause> huh? "no new process can be started, the system might have reached the maximum number of processes for a user"?!?
14:07:55 *** m3henry has quit IRC
14:10:40 *** guru3 has joined #openttd
14:31:54 <andythenorth> when I have a PR fetched, can I update it from remote
14:31:54 <andythenorth> ?
14:32:02 <andythenorth> currently I'm doing branch -D and fetching again
14:34:12 <andythenorth> Eddi|zuHause: still crashing hard /bin/sh: line 1: 99496 Illegal instruction: 4 ./openttd
14:34:14 <andythenorth> FWIW :)
14:34:55 <Eddi|zuHause> andythenorth: what's wrong with pull?
14:35:14 <andythenorth> let's find out
14:35:36 <Eddi|zuHause> andythenorth: can you make a log with -d misc=9?
14:35:47 <andythenorth> yeah git branch --set-upstream-to=upstream/pull/7213 7213 isn't valid
14:35:54 <andythenorth> can't pull with no remote :)
14:36:18 <peter1138> git pr 7213
14:36:19 <Eddi|zuHause> git pull remote branch
14:37:41 <andythenorth> what's the branch name for a PR?
14:38:00 <andythenorth> also how much log output do you want?
14:38:06 <andythenorth> most of it is just newgrf scanning :P
14:38:19 <Eddi|zuHause> andythenorth: how up to date are you?
14:38:34 <andythenorth> 9c1a399dce5c9366cd411f7dfcaefe58536f73ab
14:39:11 <andythenorth> current head
14:39:31 <Eddi|zuHause> i'm interested in the lines that look like "dbg: [misc] Tile: 896573 (573, 875); Height: 0; Size: 324"
14:39:45 <Eddi|zuHause> if it doesn't even get to those...
14:40:11 <Eddi|zuHause> then you need to do a debug build and make a backtrace
14:40:50 <andythenorth> after starting map gen, the only 2 relevant lines are https://paste.openttdcoop.org/pqkpfycxi
14:40:54 <andythenorth> then it crashes
14:41:14 *** dihedral has quit IRC
14:41:19 *** dihedral has joined #openttd
14:41:44 *** m3henry has joined #openttd
14:42:40 <Eddi|zuHause> yeah, it probably crashes in the initialization phase
14:42:47 <andythenorth> so...debug build
14:43:04 <andythenorth> is this going to be some stupid clang problem? :P
14:43:09 <Eddi|zuHause> yes
14:43:46 <Eddi|zuHause> either an STL bug, or me misabusing STL features which just happen to work
14:44:00 * andythenorth wonders what the CI is doing
14:44:11 * andythenorth thinks what the CI isn't doing is starting a game :P
14:44:51 <Eddi|zuHause> add a regression test for running new game creation code?
14:45:09 <Eddi|zuHause> i have no clue how to add a regression test
14:47:11 <andythenorth> well this isn't critical :P
14:47:20 <andythenorth> it's just not possible to give river feedback right now :)
14:47:30 <peter1138> Add asserts.
14:48:39 <Eddi|zuHause> andythenorth: really, i can't do anything before you post a backtrace
14:49:08 <andythenorth> ok let's try that tonight
14:49:10 <Eddi|zuHause> andythenorth: i think this is more critical than you think it is :p
14:49:28 <andythenorth> is enabling a debug build just a flag?
14:49:31 * andythenorth reads readme
14:49:47 <Eddi|zuHause> ./configure --enable-debug=3 or so
14:50:25 <andythenorth> compiling
14:50:45 <Eddi|zuHause> and then make run-gdb
14:51:23 <andythenorth> wish I had more cores :P
14:51:42 <Eddi|zuHause> compiling a debug build should be faster :p
14:51:52 <peter1138> make -j cores*2
14:51:56 <peter1138> Just pretend
14:52:32 * andythenorth installing gdb
14:52:42 <peter1138> cgdb is nice.
14:53:26 <andythenorth> looks like gdb doesn't work on macos :P
14:53:38 <Eddi|zuHause> then find a different debugger :)
14:53:53 <peter1138> Well, the crash should be more informative with a debug build, anyway.
14:54:14 <Eddi|zuHause> there apparently is an LLDB
14:54:16 <andythenorth> seems to be lldb
14:54:38 <peter1138> Hmm, never tried that.
14:54:44 <peter1138> 116MB o_O
14:55:27 <andythenorth> pure guessing here, probably did it wrong https://paste.openttdcoop.org/pqhbaoyzr
14:55:31 <andythenorth> I never did learn to debug
14:55:38 <andythenorth> not flash, nor python, nor js :P
14:55:42 <andythenorth> I just use prints
14:55:47 <peter1138> bt
14:56:24 <peter1138> It didn't crash there, did it?
14:56:44 <peter1138> Oh, EXC_BAD_ACCESS. Hmm.
14:56:52 <peter1138> Well, bt.
14:57:01 <peter1138> "backtrace" as we call it.
14:57:08 <Eddi|zuHause> yeah "bt"
14:57:24 <peter1138> https://twitter.com/thepetererer/status/1097574631286947840
14:57:27 <Eddi|zuHause> and then maybe one or more "up" and "l"
14:57:28 <andythenorth> any way to dump to a file?
14:57:33 <andythenorth> or I have to copy from shell?
14:57:46 <peter1138> It's just text, so copy it.
14:57:48 <Eddi|zuHause> it's interactive, hard to do a file
15:00:37 <andythenorth> https://paste.openttdcoop.org/py6mtez6a
15:01:01 <andythenorth> lldb is still open if you need more / different
15:01:16 <Eddi|zuHause> base 10 16 4392
15:01:19 <Eddi|zuHause> @base 10 16 4392
15:01:19 <DorpsGek> Eddi|zuHause: 1128
15:01:51 <Eddi|zuHause> that doesn't look close to the edge, at least
15:02:04 <peter1138> lldb seems a bit shit.
15:02:22 <Eddi|zuHause> most likely it died to recursion depth?
15:02:42 <andythenorth> I can install other debuggers
15:03:04 <Eddi|zuHause> nothing to do with the debugger
15:03:14 <peter1138> Eh, I was just saying :D
15:04:34 <Eddi|zuHause> andythenorth: try a map setting with less water? :p
15:05:14 *** crem2 has quit IRC
15:05:35 *** crem2 has joined #openttd
15:06:06 <Eddi|zuHause> i could try rewriting the flood fill also with a queue/iterative approach
15:06:19 <Eddi|zuHause> but i don't think there's anything wrong with the code
15:06:26 <andythenorth> Eddi|zuHause: so 128x128 map, 1% water, no crash
15:06:43 <Eddi|zuHause> andythenorth: it might be running into some stack size limit
15:07:13 <andythenorth> do you want me to try other map sizes to tickle it?
15:07:24 <Eddi|zuHause> nah, i think i have enough info
15:07:44 <andythenorth> ok
15:07:54 <andythenorth> river curve sprites are really awful
15:08:03 <andythenorth> I tried to fix that once, then I rage quit ottd for a bit :P
15:08:10 <Eddi|zuHause> i use MB's river graphics
15:11:57 <peter1138> Did we want half-tile rivers?
15:12:01 <peter1138> Or corner-slope rivers?
15:12:11 <Eddi|zuHause> arbitrary-slope-rivers
15:15:42 <Eddi|zuHause> so, here i need "high" water and 130736 deep recursion to hit a crash
15:16:49 <Eddi|zuHause> dunno why andy's system is so strict that it crashes with 4000 deep recursion
15:21:37 <andythenorth> I will draw arbitrary slope sprites :P
15:25:41 *** kiwitree has quit IRC
15:25:47 <peter1138> Maybe you want a non-recursive flood fill?
15:26:05 *** Samu has joined #openttd
15:34:03 <Eddi|zuHause> yes, working on that
15:34:10 <supermop_work> andy
15:34:45 <supermop_work> bad feature emus should switch sprites to the single cab
15:34:59 <Eddi|zuHause> iterative version having trouble not being an endless loop :p
15:35:41 <andythenorth> supermop_work: there are limits :P
15:35:46 <andythenorth> also it's a 4TC
15:35:52 <andythenorth> only powered
15:35:57 <andythenorth> so it's a 4REP
15:36:04 <andythenorth> https://en.wikipedia.org/wiki/British_Rail_Class_438
15:36:17 <supermop_work> i used a kelpie not a shoebox tho
15:37:40 <andythenorth> http://www.bloodandcustard.com/bournemouth1966.html
15:41:21 <andythenorth> I could just add unpowered trailer cars
15:41:27 <andythenorth> but seems really niche
15:41:35 <andythenorth> also DVTs :P
15:41:52 <andythenorth> I think I move on soon to other grfs though, Horse is enough
15:43:50 <Eddi|zuHause> i think i found the problem
15:44:48 <peter1138> Yay
15:45:43 <Eddi|zuHause> hm, so it's not an endless loop anymore, but i might have messed up the semantics
15:52:52 <Eddi|zuHause> oh... passed by value, not by reference...
15:53:06 <Eddi|zuHause> i think it now works as before :p
15:54:16 *** Thedarkb1-T60 has joined #openttd
15:55:18 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z updated pull request #7213: Feature: BFS-based river generator https://git.io/fhHN6
15:55:22 <Eddi|zuHause> andythenorth: try again?
15:56:01 <andythenorth> trying
15:57:56 <andythenorth> Eddi|zuHause: no longer crashing
15:58:03 <supermop_work> Pony Houses?
15:58:22 <andythenorth> Pony FIRS
15:59:16 <Eddi|zuHause> i think my attempts at prioritizing larger basinds mess with the BFS-y-ness of the queue
15:59:51 <andythenorth> it has made some pretty epic systems
16:00:08 <andythenorth> it's interesting when it makes a huge system, that passes near coast multiple times :)
16:00:16 <Eddi|zuHause> yes
16:00:35 <Eddi|zuHause> it has a few weird cases
16:00:49 *** Thedarkb-T60 has quit IRC
16:01:05 <andythenorth> https://dev.openttdcoop.org/attachments/download/9286/BFS_1.png
16:01:16 <andythenorth> that ends up in sea 16 tiles further NW
16:01:32 <andythenorth> in fact 64 tiles further NW
16:01:34 <Eddi|zuHause> is that a disconnected lake?
16:03:27 *** m3henry has quit IRC
16:04:07 <andythenorth> no, ends in sea
16:04:16 <andythenorth> I like the island that system made
16:04:23 <andythenorth> top left
16:04:26 *** urdh has quit IRC
16:04:37 <andythenorth> oh it's not in the screenshot
16:05:02 <Eddi|zuHause> i mean the section of coast it runs past, is that a separate lake from the one it actually flows into?
16:05:08 *** urdh has joined #openttd
16:05:13 <andythenorth> https://dev.openttdcoop.org/attachments/download/9288/BFS_2.png
16:05:40 <andythenorth> yes that sea / lake is non-contiguous with the one that the river empties into
16:06:00 <Eddi|zuHause> yeah, that's the "prefer larger basin" at work
16:06:48 <Eddi|zuHause> basically, each basin gets an exclusive zone of sqrt(area) of land inwards, and any tile in any exclusive zone can only run into the largest one
16:07:07 <Eddi|zuHause> which means smaller lakes get this weird "it runs around it" case
16:09:36 <andythenorth> yeah that makes sense
16:09:51 <andythenorth> looks weird but eh :)
16:10:14 <Eddi|zuHause> it might need some tweaking to not run quite so close to the shore
16:10:32 <andythenorth> there's a term for that
16:10:38 * andythenorth tries to remember it
16:11:05 <andythenorth> when one needs to push a path away from a point or points
16:11:54 <Eddi|zuHause> i could try log() instead of sqrt() for the priorities
16:12:26 <Eddi|zuHause> and special-case the tiny/zero-sized basins
16:14:02 *** tyteen4a03 has quit IRC
16:14:35 *** tyteen4a03 has joined #openttd
16:16:18 *** nielsm has joined #openttd
16:18:46 <peter1138> 14:52 < Eddi|zuHause> oh... passed by value, not by reference...
16:18:54 <peter1138> Yeah that might affect recursion...
16:19:47 <Eddi|zuHause> peter1138: it was happily inserting into the queue, but a copy of the queue, not the original one :p
16:20:04 <peter1138> Yeah.
16:20:20 <peter1138> The dangers of references.
16:26:51 *** Wormnest has joined #openttd
16:46:02 *** Meiki has quit IRC
16:46:07 *** Meiki has joined #openttd
16:47:37 <Samu> https://github.com/OpenTTD/OpenTTD/pull/7200/files
16:47:59 <Samu> you are missing the height of the lock itself for the lower part
16:48:23 <Samu> if (IsLock(tile) && GetLockPart(tile) == LOCK_PART_LOWER && GetTileMaxZ(tile) + 1 > z_start) return_cmd_error(STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN);
16:48:45 *** debdog has quit IRC
16:50:27 <Samu> how do I suggest code?
16:51:35 <andythenorth> PR comments of course ;)
16:51:40 <peter1138> The height of the lower part?
16:52:11 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7200: Change: Allow locks under bridges https://git.io/fhdpf
16:53:26 <peter1138> If you want to care about the height of bridges...
16:53:48 <peter1138> Then there's a shed load of stuff that needs to change.
16:54:56 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7200: Change: Allow locks under bridges https://git.io/fhdpk
16:55:04 *** Gustavo6046 has joined #openttd
16:55:11 <Samu> i'm terrible with the github site
16:56:23 <Samu> it came out really bad
16:58:00 <peter1138> A more pressing issue is the sprite sorting problem.
16:59:08 <nielsm> https://github.com/OpenTTD/OpenTTD/issues/6507 <-- unless someone can explain how the save became corrupted, is it really worth trying to fix a "corrupt savegame causes crashes" issue?
16:59:09 *** andythenorth has left #openttd
16:59:30 <nielsm> well I suppose maybe if you treat it as a potential security issue
16:59:38 *** Heiki has quit IRC
16:59:45 <Samu> .patch file type isn't supported?
16:59:47 <Samu> what the heck
16:59:56 <Samu> why's the site so horrible
16:59:57 <nielsm> (it'd be bad if you could join a multiplayer server and the server owner got arbitrary code execution on your machine)
17:00:24 <peter1138> nielsm, quite.
17:00:51 *** Heiki has joined #openttd
17:00:55 <peter1138> I can't remember what was invalid about them, though.
17:01:12 <nielsm> but that specific issue is an assertion failure which should not be exploitable
17:02:32 <peter1138> How much is Europe laughing at us now?
17:03:15 <peter1138> Hmm, it's crashing during loading the game, so maybe we can turn that assert into an exception.
17:03:27 <peter1138> Hmm, no asserts in release builds.
17:04:07 <Samu> I meant this, peter1138 https://www.tt-forums.net/download/file.php?id=194528
17:04:33 <Samu> can't upload patch file types
17:04:58 *** Progman has joined #openttd
17:05:11 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7254: Codechange: introduce a few unit tests https://git.io/fhdpn
17:05:22 <peter1138> nielsm, hmm, yes, I'm getting a different error to what my comment was about :P
17:05:27 <peter1138> We can fix this.
17:09:33 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7254: Codechange: introduce a few unit tests https://git.io/fhdMU
17:09:53 <peter1138> I imagine it's a bit whackamole though.
17:11:40 <peter1138> Eh
17:13:09 *** m3henry has joined #openttd
17:14:16 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7253: Fix #7189: Fluidsynth volume gain too high https://git.io/fhdpw
17:15:35 <nielsm> https://github.com/OpenTTD/OpenTTD/pull/6965 <-- 1.9 or not? :)
17:17:02 <peter1138> We still need the right algorithm.
17:26:34 <_dp_> if that makes into master without an option that would be a disaster for citymania
17:26:46 <_dp_> coz it completely breaks all classic citybuilder modes
17:27:16 <_dp_> including iconic 3h one that's been around for like 10 years starting with luuklan
17:27:51 *** debdog has joined #openttd
17:28:04 <_dp_> though with a new trend for changes without options I'm afraid it will still happen sooner or later :(
17:28:48 <nielsm> I'm advocating for keeping it an option
17:29:02 <nielsm> exactly because of it breaking economy in existing games
17:29:14 *** Speedy` has quit IRC
17:29:17 <nielsm> and it'd be easy to change the default in citymania
17:29:27 *** Speedy` has joined #openttd
17:29:39 <nielsm> or even use the option to introduce further new generation algorihms
17:29:46 <peter1138> Apparently we have too many options.
17:30:03 <peter1138> Non-rect station catchment could be one.
17:30:13 <peter1138> But I'm told it shouldn't be :-)
17:30:50 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #6965: Add: Option for population-linear town cargo generation https://git.io/fhdpA
17:31:41 <peter1138> Hmm, it's a one-liner, I think.
17:31:42 <_dp_> nielsm, there is no changing pax generation for existing modes. You basically need to balance it anew and that's a very time-consuming
17:32:07 <_dp_> non-rect at least doesn't break that much
17:32:15 <peter1138> It might.
17:32:17 <_dp_> and there is setting for fixed 4-tile catchment
17:32:25 <peter1138> It's still non-rect.
17:32:36 <peter1138> Just using 4-tile instead of variable.
17:33:09 <_dp_> well, personally I'm totally fine with having settings for everything :)
17:33:14 * peter1138 tests the one-liner.
17:33:24 <_dp_> that's how it worked for openttd all this time anyway
17:33:27 <peter1138> It's a bit silly, as it still calculates catchment :p
17:34:16 <peter1138> Yeah. It'll work though.
17:34:26 <_dp_> peter1138, well, 4-tile thing is to offset rail stations not extending bus stations coverage with non-rect
17:34:28 <Samu> more settings, less newgrfs
17:34:49 <peter1138> That's just nasty.
17:35:52 <_dp_> yeah, but that's how it was played for many years
17:35:59 <nielsm> could also add the town cargo gen patch to 1.9.0 but with the default remaining the old algorithm, ask players to try out the new, and adjust based on it, then change the default for the next version
17:37:10 <_dp_> speaking of nasty, how about bulding 3-tile channel and a dock to get 5-tile coverage?)
17:37:13 <Samu> do you want me to do a game setting for this? https://github.com/OpenTTD/OpenTTD/pull/7184
17:38:02 <nielsm> yes that absolutely requires a setting
17:38:10 <nielsm> also since it changes the rules for players competing for industries
17:39:49 <Samu> nobody really looked at the station portion
17:39:58 <Samu> is it fine?
17:40:02 <_dp_> oh, there is even a patch for 2-station cargo now
17:41:01 <peter1138> Oof, memset st->catchment_tiles 0xff
17:41:11 <peter1138> ^ old style catchment :p
17:41:50 <_dp_> sadly just spreading cargo across all stations won't cover all of mp issues with cargo distribution
17:42:28 <nielsm> distributing cargo to many stations requires a lot of care to make it feel "fair"
17:43:05 <nielsm> just look at all the algorithms that exist for assigning seats in a parliament based on votes in an election
17:43:35 <_dp_> nielsm, well it's still better to have limit of 2 stations as that can be easily abused
17:44:15 <_dp_> nielsm, but yeah, pretty much any decent mp server has some kind of cargo comptition rules, it would be nice to have them as part of game mechanics
17:45:08 <peter1138> I really hate the "nobody is allowed to compete with cargo output" rule bullshit :/
17:45:15 <_dp_> mostly it comes to forbidding self-comptition and "stealing" secondary cargo
17:46:09 <Samu> i hate it too, but it's understandable
17:46:31 <nielsm> I do remember breaking someone's network by placing two small stations near a factory and pumping ratings on those, so the player using the factory didn't get any cargo, and eventually had all tracks blocked by trains waiting for cargo and none could deliver inputs
17:46:38 <nielsm> and his entire network backed up as a result
17:46:55 <_dp_> peter1138, without it competitive games turn into a complete mess
17:47:44 <_dp_> when everyone starts attacking whover is in the lead
17:48:42 <peter1138> Maybe industries should consider how long a company has been providing good service.
17:49:04 <peter1138> s/should/could/
17:49:07 <_dp_> and, yeah, plenty of statino griefing even on non-competitive servers
17:49:37 <Samu> hmm transformed cargo
17:49:41 <nielsm> that's an idea, station rating based on years of service as well
17:50:03 <peter1138> nielsm, but maybe that's a newgrf thing too ;)
17:50:05 <Samu> track the company that delivered it
17:50:20 <Samu> what you deliver, is what you can transport
17:51:15 <Samu> nielsm also had an idea about exclusive transport rights
17:53:37 <Samu> so industries can stockpile cargo, right?
17:53:49 <nielsm> well it could also be that exclusive transport rights should only apply to stations within town limits!
17:53:51 <Samu> but they dont know who transported the cargo they stockpile?
17:53:55 <nielsm> that's something entirely different :)
17:54:51 <nielsm> the other thing was exclusive rights vs neutral stations, really neutral stations should not allow companies outside an exclusivity agreement to pick up or unload cargo at them, maybe
17:55:23 <nielsm> unless you argue it's a privately owned station by the industry and the town authority has no legal control of it
17:56:02 <Samu> needs to investigate if cargo has owners
17:56:04 <Samu> brb
17:56:54 <m3henry> Surely cargo should be distributed by company first, then by individual sttion rating second
17:58:14 <peter1138> So that if you provide a better service, it doesn't matter?
17:58:30 <m3henry> No
17:59:07 <Samu> well, according to how the game is currently played in multiplayer, it doesn't matter
17:59:13 <m3henry> The amount that each company receives is proportional to their average ratings of the stations servicing the industry
18:00:00 <m3henry> So if I have two stations servicing an industry, one with 50% and the other with 100%, my average rating for that industry is 75%
18:00:32 <m3henry> And suppose another player has one station with 75%, we would get the same amount of cargo each
18:00:42 <nielsm> hmm, about exclusivity, how does it actually work in this situation? https://0x0.st/ziVb.png
18:01:11 <nielsm> if red buys exclusive rights in Penfingway-on-sea, can the gold train station get and deliver passengers?
18:01:15 <m3henry> Just one of my stations would receive 1/3 of my goods, and the other would receive 2/3
18:01:31 <nielsm> maybe assuming the bus station was not near any houses either
18:01:33 <Samu> that's kinda cheating by station spreatind
18:01:37 <Samu> spreading
18:01:50 <Samu> can't remember the details of exclusive
18:01:54 <Samu> if it's a radius
18:02:02 <Samu> or if it's by st->town
18:02:04 <m3henry> Does that seem reasonable?
18:03:09 <Samu> imo, no
18:03:32 <Samu> station spreading is usually a rule
18:03:38 <Samu> servers forbid players doing it
18:04:31 <Samu> (but it should really be the game that should prevent it from happening)
18:07:34 <nielsm> apropos station spread, entering the realm of bad ideas: https://0x0.st/ziVM.png
18:10:11 <Samu> uint16 incoming_cargo_waiting[INDUSTRY_NUM_INPUTS]; ///< incoming cargo waiting to be processed
18:10:29 <Samu> i was thinking if there's a way to put COMPANY_ID somewhere there
18:10:46 <Samu> incoming_cargo_waiting[INDUSTRY_NUM_INPUTS][COMPANY_ID]; ///< incoming cargo waiting to be processed
18:11:20 <nielsm> hmm nah, than rather introduce a company rating per industry similar to how companies have a rating in a town
18:12:44 <Samu> delivery rate?
18:13:22 <Samu> hmm
18:13:48 <nielsm> making regular deliveries, as well as having good station rating for cargoes produced by the industry, would increase it
18:14:37 <nielsm> but it might be better to make that a newgrf thing
18:15:05 <Samu> company 1 delivers 100 oil, company 2 delivers 50 oil
18:15:14 <Samu> 66/33% rate
18:15:19 <Samu> for goods
18:17:01 <Samu> cargo monitor already exists
18:17:08 <Samu> maybe it could be repurposed
18:18:04 <Samu> (but it's buggy - https://github.com/OpenTTD/OpenTTD/pull/7176 should fix)
18:18:27 *** drac_boy has joined #openttd
18:21:15 <m3henry> Perhaps this would clear my suggestion up: https://pastebin.com/raw/xU3jYEeX
18:24:04 <Samu> 67 * 50 ? or 67 * 100
18:24:52 <Samu> confused still
18:25:08 * drac_boy can't make much sense so might just sit out of this :-s
18:25:50 <Samu> oh, michi_cc requested changes
18:30:05 <_dp_> there are at least two useful cargo distribution strategies: 1) share somehow 2) exclusive to whoever came first
18:30:19 <_dp_> and they need to be configurable at least for each industry type
18:30:26 <_dp_> or better for each industry individually
18:30:46 <m3henry> Sounds overly complex
18:31:30 <m3henry> Industry type would be as far as I'd go
18:31:57 <m3henry> but I do agree that configurable sharing strategies would be a good idea
18:32:35 <_dp_> well, yeah, industry type would be enough to implement current rules
18:33:05 <_dp_> it's just a bit more flexible with individual industries, may allow some interesting new mechanics
18:34:13 <m3henry> Perhaps cargo delivered TO the industry could be used for secondary industries
18:35:19 <_dp_> m3henry, you mean use that for some rating calculation?
18:35:46 <nielsm> well what ottd actually needs is continuous flow transport!
18:35:50 * drac_boy still doesn't exactly like the firs/ecs related "problem" of two different secondary industries sitting right next to each others :)
18:35:54 <nielsm> pipes, power lines, conveyor belts
18:35:59 <m3henry> Either for the rating calculation, or for afterwards, not sure
18:36:43 <Samu> trying to understand michi_cc complaint
18:37:17 <_dp_> there is also possible third strategy to make industries work separately for every company like in sp game
18:37:45 <_dp_> it's kinda the same as second one though gameplay-wise
18:39:39 <_dp_> nielsm, truck carousel is basically continuous flow :p
18:41:46 <_dp_> btw, sharing cargo by company first is definitely something that needs to be done
18:42:11 <_dp_> so smth like m3henry's suggestion can even be implemented without an option imo
18:42:42 <_dp_> will only screw up self-competing stations anyway
18:44:02 <m3henry> woo
18:44:04 *** m3henry has quit IRC
18:45:06 *** drac_boy_ has joined #openttd
18:45:14 *** gnu_jj_ has quit IRC
18:45:17 <drac_boy_> hmm weird server .. oh well
18:45:20 *** gnu_jj has joined #openttd
18:45:34 <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
18:45:44 *** drac_boy has quit IRC
18:47:16 <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/fhFev
18:49:18 *** HerzogDeXtEr has joined #openttd
18:49:22 <Samu> st->town->received[cs->town_effect].new_act += num_pieces - accepted_ind;
18:49:30 <Samu> is this what you want michi_cc?
18:51:49 <peter1138> Hi.
18:51:59 *** drac_boy_ is now known as drac_boy
18:55:42 <Samu> maybe it's a math problem
18:56:10 <Samu> if 3 out of 5 are accepted at the industry
18:56:19 <Samu> always accepted is false
18:56:43 <Samu> then, cargomonitor sends 3 cargo
18:56:58 <Samu> and then 5-3 = 2
18:57:04 <Samu> sends 2 cargo
18:57:08 <Samu> again
18:58:08 <Samu> maybe it should be accepted_total - accepted_ind
18:58:39 <Samu> 3-3 = 0
19:02:01 <Samu> help me think, what should be the intended behaviour?
19:02:07 <peter1138> Hmm, weird, I have fonts being ignored...
19:02:29 <Samu> 5-3 = 2 or 3-3 = 0?
19:02:37 <drac_boy> samu maybe its just one of these 1+1=3 thing? I could be wrong tho :)
19:02:48 <Samu> it's about cargo monitor
19:02:54 <Samu> https://github.com/OpenTTD/OpenTTD/pull/7176/files
19:03:00 <Samu> the last comment by michi_cc
19:03:21 <Samu> num_pieces - accepted_ind or accepted_total - accepted_ind?
19:04:28 <Samu> gonna change to accepted_total, seems to be better correct
19:04:55 *** Wolf01 has joined #openttd
19:08:02 <Wolf01> o/
19:08:29 <drac_boy> hi wolf?
19:10:15 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened issue #7255: Crashlog truncated with many news messages https://git.io/fhFei
19:10:53 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7176: Fix #6633: Cargo monitor industry delivery now accounts for which IndustryID the cargo was delivered to https://git.io/fhS1x
19:11:31 <peter1138> It never created a crashlog for me, it just hung.
19:15:47 *** andythenorth has joined #openttd
19:16:27 <Wolf01> So, I need to adapt to the file explorer in dark mode, when I fired it up I was like O_O "what is this.. oh"
19:16:55 *** gelignite has joined #openttd
19:17:07 <peter1138> heh
19:17:20 <nnyby> midnight commander mode? lol
19:18:02 <drac_boy> :->
19:18:04 <Wolf01> But I downloaded the windows 3.x one, which works and it has been updated for all the new features
19:18:08 <andythenorth> we put dark mode in OpenTTD? o_O
19:18:24 <andythenorth> I run my mac in some kind of half-assed dark mode
19:18:36 <drac_boy> andy technically you kinda could .. there was a night.grf several years ago
19:19:04 <nnyby> oh yea... there's ottd night mode in some newgrf's right? i wanna try that. That'd be funny.. and probably annoying, if the world's brightness fluxuated every day. lol
19:19:28 <drac_boy> I'm talking about a single grf
19:19:33 <drac_boy> dunno about in-game features :)
19:20:52 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7126: custom font settings in openttd.cfg seem to be ignored https://git.io/fhFe7
19:21:18 <Wolf01> So, regarding that idea to bring back Bjarni, we could train GPT-2 if they would like to open every bit of code
19:22:04 <peter1138> nnyby, there's a "nightgfx" baseset.
19:22:15 <andythenorth> well
19:22:21 <nnyby> yeah, that's what i was thinking of
19:22:21 <andythenorth> if we had some spare palette colours
19:22:27 <Wolf01> I read the articles written by the AI and it's impressive, only some inconsistencies
19:22:29 <andythenorth> windows and lights could be drawn in magic colours
19:22:39 <andythenorth> and then they could be recoloured by the game
19:22:51 <andythenorth> this would incidentally stop people drawing trains without the correct purple windows
19:23:22 <andythenorth> we would need quite a lot of palette range though
19:23:27 <andythenorth> we want some windows on, some off
19:23:36 <andythenorth> peter1138: ^ :P
19:23:52 <andythenorth> are palettes fixed size? o_O
19:24:08 <drac_boy> have fun..I need to go :-s
19:24:11 *** drac_boy has left #openttd
19:24:20 <peter1138> Palettes are 256 colours.
19:25:27 <andythenorth> funny how 8 bit works :P
19:25:50 <andythenorth> having an extra overlay layer for night mode is lame :P
19:26:12 <andythenorth> so we need a range for 3rd company colour
19:26:16 <andythenorth> and a range for lit windows
19:26:21 <andythenorth> and a range for unlit windows
19:26:30 <andythenorth> and a range for vehicle / town / industry lights
19:26:47 <andythenorth> shall we switch to 24 bit? :P
19:27:26 <Wolf01> @seen __ln__
19:27:26 <DorpsGek> Wolf01: __ln__ was last seen in #openttd 32 weeks, 2 days, 22 hours, 22 minutes, and 26 seconds ago: <__ln__> TrueBrain: also, how hard can it be to figure out my comment COULD be related to a repo that was mentioned on the previous line?
19:27:30 <Wolf01> mmmh
19:28:02 * Wolf01 wonders where's he/she/it
19:28:24 *** Thedarkb1-T60 has quit IRC
19:29:04 * andythenorth wonders if paletted 32 bit is a thing
19:30:00 <andythenorth> "NOTE: most of the formats will also support a color table with fewer colors than the maximum that a given bit depth can offer."
19:32:15 *** glx has joined #openttd
19:32:15 *** ChanServ sets mode: +v glx
19:32:35 <andythenorth> meh png indexed colour is 8 bit
19:32:47 <andythenorth> tiff does 16 bit, but it sounds horrible
19:34:47 * andythenorth wonders how layered pngs worked
19:34:59 <andythenorth> seems like it was a specific adobe hack/png extension
19:36:33 <andythenorth> hmm 'normal' windows could just be drawn in the normal window range
19:36:46 <andythenorth> so only one range is needed for window overlays
19:37:01 * nielsm temporarily makes RecomputeIndustriesNear do nothing
19:37:18 <andythenorth> industries and houses don't use 2CC afaict?
19:37:51 <andythenorth> in night mode, would *all* the windows on a plane/train/boat/RV be lit?
19:40:18 <nielsm> at least always the same ones
19:40:50 <andythenorth> so if we had different transforms for different sprites, I think we can do it
19:40:55 <andythenorth> dunno how objects or stations would be handled
19:41:13 <andythenorth> vehicles just repaint all the purple windows to yellow
19:41:33 <andythenorth> buildings gain a range for 'lit window', which is repainted purple or yellow
19:44:21 * andythenorth biab
19:44:35 * andythenorth awaits a PR for night mode, now I've done the spec :P
19:44:37 *** andythenorth has quit IRC
19:45:02 <nielsm> visual studio pls https://0x0.st/ziWS.png
19:46:04 <nnyby> ideally the window lights would turn on and off independently of each other as people stop reading and go to bed. Also, in the 2000s on there would be slightly less lights (or just a fainy blue glow) because everyone's on their laptops :P
19:46:19 <glx> nielsm: hehe
19:46:40 <Wolf01> nielsm: it's like when you turn the monitor to make the pc "see" the printer
19:46:56 <glx> and intellisense failing on all FOR_ALL_XXX loops
19:47:43 *** m3henry has joined #openttd
19:48:12 <glx> I even tried the suggestion visual studio gave, but it still not work
19:49:45 <nielsm> glx what do you mean this is not a top level symbol that should be indexed?? https://0x0.st/ziWf.png
19:50:24 <glx> you see the little light proposing to create a hint file ?
19:50:39 <glx> that doesn't seem to work
19:52:03 <glx> and of course it still doesn't understand doxygen
19:52:16 <nielsm> anyway, the problem I'm having seems to be that my Remove function does not work correctly
19:52:17 <nielsm> :(
19:55:09 *** Thedarkb-T60 has joined #openttd
19:58:06 <peter1138> So basically I can't use any fonts that don't support \u0142
19:58:42 <peter1138> Polish Zloty
19:59:17 <peter1138> Also if character 160 is missing, which is a space character. Hmm.
19:59:35 <nielsm> poland demands to not be forgotten
20:00:03 <peter1138> The font fallback system means that any font that doesn't support everything in the select language is just unusable
20:00:06 <peter1138> BUT
20:00:16 <peter1138> You don't get notification of that, it just uses a different font instead.
20:00:47 <peter1138> Now, I think detection is broken.
20:01:01 <peter1138> Hmm, no wait, my hack is off, trying again :D
20:01:19 <milek7> uh.. złoty have special symbol? it's just PLN or zł
20:01:36 <peter1138> Many fonts don't have ł
20:01:59 <peter1138> I'd rather see "Polish Z?oty (PLN)" than not be able to use a shed load of fonts.
20:03:43 <peter1138> Maybe there needs to be some kind of threshold?
20:04:38 <supermop_work> the inability to use Rail Alphabet or Transport has always frustrated me
20:05:18 <Eddi|zuHause> don't fonts have the ability to use fallback fonts just for the missing characters?
20:05:31 <peter1138> Not in our code, it's all or nothing.
20:07:38 *** Xaroth has quit IRC
20:08:01 *** Xaroth has joined #openttd
20:18:40 *** Thedarkb1-T60 has joined #openttd
20:24:50 *** Thedarkb-T60 has quit IRC
20:31:11 <DorpsGek_II> [OpenTTD/OpenTTD] M3Henry updated pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fhSz0
20:38:00 <nielsm> THIS IS MAGIC
20:38:09 <nielsm> the "step backward" feature is really working
20:38:14 <nielsm> I'm traveling back in time!
20:38:33 <Wolf01> W...what?
20:38:45 <nielsm> yeah that's a thing in visual studio 2019
20:38:45 <nnyby> hahah sweet! i know a few people who could use that
20:40:00 <nielsm> step over the function I suspect will produce an incorrect result, step into the assert I suspect would trigger, confirm the assert will produce false, step backwards out of it and then step into the function that did wrong to figure out what's going on
20:40:33 <Wolf01> Wonderful
20:40:55 <nielsm> oh... I can't actually resume debugging from that state, it seems
20:41:08 <nielsm> just inspect old stack and registers, pretty much
20:41:21 <nielsm> it's not a complete memory image rewind
20:41:25 <Wolf01> :(
20:42:22 <Wolf01> It's almost like when you move the cursor manually
20:43:09 <milek7> there is that mozilla rr stuff
20:43:17 <milek7> but it requires recent intel cpu
20:43:30 <LordAro> gdb can *sort of* do rewind stuff
20:43:44 <LordAro> there's also undodb, which i use at work, that can do it very well (also uses the snapshot method)
20:44:01 <milek7> https://rr-project.org/
20:44:53 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fhFfs
20:45:15 <milek7> undodb doesn't even have pricing on their website, which probably means 'too expensive'
20:45:25 <LordAro> i have no doubt
20:45:33 <LordAro> but i don't have to worry about such things :p
20:45:47 *** andythenorth has joined #openttd
20:49:34 <TrueBrain> lucky you :P
20:54:37 *** frosch123 has joined #openttd
21:00:04 <nielsm> ow this is _really_ bad? it seems a node removal has no effect, because while the node exists in the tree it is not found during the descent down to find it for removal
21:00:20 <nielsm> one particular node removal has no effect, that is
21:01:09 <LordAro> sounds like unit tests are wanted :p
21:02:59 <frosch123> can they use cmake?
21:03:14 <nielsm> problem is so far I have only been able to reproduce it with this save with 50000 stations in it
21:03:19 <LordAro> no reason why not
21:03:26 <nielsm> and it takes rather long to load and the tree is difficult to get a good overview of :)
21:04:29 <nielsm> tree is 16 levels deep
21:04:36 <nielsm> or more
21:06:14 <LordAro> heh
21:07:34 <nielsm> I should maybe write a function to check the tree invariant as well, and assert that after every insert and removal
21:12:26 *** Mahjong has quit IRC
21:12:48 *** Mahjong has joined #openttd
21:13:28 <Samu> im trying to implement exclusive transport rights the way nielsm suggested, but I'm having some trouble about reserved cargo
21:13:42 <Samu> a ship tries to full load passengers
21:13:56 <Samu> another ship also wants to full load passengers
21:14:03 <Samu> they're from 2 different companies
21:14:18 <Samu> the first ship that started loading, gets a few cargo in, like 19 passengers
21:14:37 <Samu> the 2nd ship, then buys exclusive transport rights
21:14:45 <Samu> ship 1 stops loading cargo, however
21:15:04 <Samu> the next 81 passengers that head to the neutral station are reserved to ship 1
21:15:11 <Samu> they don't go to ship 2
21:15:41 <glx> missing invalidation on exclusive status change
21:15:46 <Samu> only when this reserved amount is reached, the 2nd ship starts getting cargo moving into it
21:16:15 <Samu> so, when the station has more than 81 waiting
21:17:29 <Samu> the cargo is being reserved for ship 1, but will have to wait 1 year before the exclusivity ends
21:17:38 <Samu> weird
21:18:28 <Samu> well, it kinda "works", just not the way I was hoping for
21:19:40 <nielsm> nice, thanks compiler :3 "recursive on all control paths" was actually a warning
21:19:48 <Samu> edited line 1754 of economy.cpp
21:19:49 <Samu> if (cap_left > 0 && (v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0 || ge->cargo.AvailableCount() > 0) && (st->town->exclusive_counter == 0 || st->town->exclusivity == v->owner)) {
21:20:28 <Samu> must find a way to not reserve cargo for the first ship
21:20:51 <nielsm> cargo already reserved for loading should allow to finish loading imo
21:21:03 <nielsm> just don't reserve any more while exclusivity is in effect
21:21:45 <Samu> first ship was there first, ther may be some synchronization problem
21:21:59 <Samu> handling ticks
21:22:01 <Samu> or so
21:24:29 <nielsm> ahh, I found my bug
21:25:41 <nielsm> when I split the array of elements to insert in BuildSubtree, I take the middle element of the array and place everything left of it in the left subtreee, and everything right of it in the right subtree
21:26:02 *** Mazur has quit IRC
21:26:08 <nielsm> but it should actually search backwards from the middle element to make sure there aren't any more elements before it with the same coordinate value
21:26:16 *** Mazur has joined #openttd
21:26:54 <LordAro> nielsm: sounds like something for std::partition?
21:27:08 <nielsm> that's an algorithm?
21:27:11 <nielsm> sounds interesting :)
21:27:32 <LordAro> there are many algorithms, i'd highly recommend reading through them all
21:27:46 <LordAro> https://en.cppreference.com/w/cpp/algorithm
21:31:34 *** Flygon has joined #openttd
21:47:46 *** supermop_work has quit IRC
21:55:48 *** Gja has joined #openttd
21:55:49 <DorpsGek_II> [OpenTTD/OpenTTD] michicc dismissed a review for pull request #7176: Fix #6633: Cargo monitor industry delivery now accounts for which IndustryID the cargo was delivered to https://git.io/fhdOY
22:06:36 *** Eddi|zuHause has quit IRC
22:08:57 *** Eddi|zuHause has joined #openttd
22:10:50 *** KenjiE20 has quit IRC
22:11:20 *** KenjiE20 has joined #openttd
22:22:37 <Eddi|zuHause> continue using the tractor or put a seat on a medium rover?
22:25:31 <nielsm> okay, now I managed to build the tree of 50k stations without breaking the invariant
22:25:33 <nielsm> at least
22:34:43 <LordAro> grats
22:36:33 <nielsm> and simulated past jan 25th where it crashed before, too
22:36:46 <nielsm> https://en.cppreference.com/w/cpp/algorithm/nth_element
22:36:54 <nielsm> that one was more useful than std::partition
22:37:09 <nielsm> actually, I'm using both ;)
22:37:40 <nielsm> but a partial sort finding the median is indeed useful
22:39:34 <LordAro> :)
22:42:15 <nielsm> it's a sick save https://0x0.st/ziJA.png
22:42:47 <glx> one station per tile ?
22:43:04 <nielsm> every four tiles
22:45:26 <m3henry> And so the home straight is nearly i nsight
22:45:38 <m3henry> just have begin/end to do
22:47:21 <glx> you need to fix the error spotted by LordAro
22:47:31 *** seatsea has joined #openttd
22:47:39 <LordAro> and also the compile :p
22:48:12 <glx> wow even clang failed
22:48:18 <m3henry> :v
22:48:30 <glx> usually only platform specific files are forgotten
22:48:40 <m3henry> Itcompiles on my end
22:48:50 <m3henry> I'll look in a minute
22:49:14 <LordAro> missing a library dependency, perhaps?
22:51:04 *** gelignite has quit IRC
22:51:18 *** Gja has quit IRC
22:53:23 <m3henry> Error C2397: conversion from 'VehicleType' to 'storage_type' requires a narrowing conversion
22:53:32 <m3henry> Okay, but which argument is that?
22:54:17 <andythenorth> so how do I get this nml 16-cargos support finished then?
22:54:31 <andythenorth> I can check out peter1138's branch
22:54:39 <andythenorth> and try developing 16-cargo FIRS with it
22:54:50 *** sla_ro|master has quit IRC
22:54:56 <andythenorth> then someone has to decide about the commits :P
22:55:35 <glx> m3henry: clang error seems more explicit
22:55:57 <DorpsGek_II> [OpenTTD/OpenTTD] M3Henry commented on pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fhFUi
22:56:39 <peter1138> evening
22:56:53 <glx> VehicleType to VehicleTypeByte
22:58:35 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7229: Fix #7226: Partial revert of 7d06fec799 for ship pathfinding. https://git.io/fhFUQ
22:58:42 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed pull request #7229: Fix #7226: Partial revert of 7d06fec799 for ship pathfinding. https://git.io/fh7V2
22:59:07 <m3henry> Hmm, can't static cast it to that
23:00:38 <glx> it's a effectively a byte I think
23:01:00 <glx> typedef SimpleTinyEnumT<VehicleType, byte> VehicleTypeByte;
23:01:32 <michi_cc> Anybody caring about PR#6980 or should I just let it die by stalebot?
23:02:26 <m3henry> I'm going to look that up and see what it does
23:02:52 <LordAro> michi_cc: it'd be nice, but equally it introduces another conditional compile code path
23:03:59 <m3henry> Oh I see
23:04:37 <glx> it's mainly a "hack" for saveload ;)
23:05:00 <m3henry> Well that can be replaced with enum <name> : <base-specifier>
23:05:14 <m3henry> Introduced in C++11
23:05:23 <glx> oh
23:05:34 <m3henry> ;)
23:05:52 <m3henry> Even better
23:06:05 <m3henry> You can use enum class to prevent casting
23:06:20 <peter1138> Hmm
23:06:39 <peter1138> Didn't enum xxx : yyy work already?
23:06:53 <m3henry> may have been a gcc extension?
23:06:57 <peter1138> PR#6980 is the gdi font stuff, right?
23:07:04 <Eddi|zuHause> yes
23:07:07 <peter1138> Hmm.
23:07:27 *** andythenorth has quit IRC
23:08:11 <m3henry> I'll add it to the "future PR list"
23:09:30 <peter1138> michi_cc, it feels like there should be a better interface (in our code) for it, rather than #fidefs depending on code path.
23:10:28 <glx> like driver's pools ?
23:10:34 <glx> well factory
23:13:32 <DorpsGek_II> [OpenTTD/OpenTTD] M3Henry updated pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fhSz0
23:13:40 <peter1138> That sort of thing, yes.
23:13:49 <peter1138> Maybe not quite to that extent.
23:14:00 <peter1138> Btw, same with the fontdetection.cpp code.
23:14:16 <peter1138> There's basically 3 different pieces in there depending on OS.
23:16:11 <glx> ParagraphLayouter may benefit from a similar work
23:18:47 <LordAro> i expect so
23:19:08 <LordAro> m3henry: removing TinyEnumT can come later :p
23:19:57 <m3henry> Yeah, I thought I said that?
23:20:08 <LordAro> so you did
23:20:12 <LordAro> carry on
23:20:21 <m3henry> o/
23:20:48 <peter1138> Hmm, tempted to squash non-rect catchment down.
23:25:38 <Samu> what the hell is a linkgraph?
23:25:51 <Samu> erm
23:26:01 <glx> a graph on links
23:26:21 <Samu> seems to involve cargo, stations, refits
23:26:25 <nielsm> it's what makes cargodist work
23:26:33 <Samu> ah
23:27:23 <nielsm> the link graph describes what stations can have their cargo transported to other stations, and approximately the capacity of the connections
23:27:30 <DorpsGek_II> [OpenTTD/OpenTTD] M3Henry updated pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fhSz0
23:27:38 <nielsm> and cargodist uses that to decide which destinations to pick for cargo packets
23:28:45 <nielsm> first stop on the computer science theory behind it: https://en.wikipedia.org/wiki/Graph_(abstract_data_type)
23:29:33 <Samu> doesnt seem to be what I was looking for
23:30:05 <Eddi|zuHause> i don't think that commit message is according to the requirements :p
23:30:39 <glx> indeed :)
23:31:04 <m3henry> It'll get auto-squashed
23:31:11 <m3henry> No nned to care
23:31:27 <LordAro> the PR isn't getting merged until the CI is happy :p
23:31:38 <Eddi|zuHause> you can't merge with broken commit style
23:31:53 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhd4b
23:32:16 <m3henry> It will be auto-squashed next time I force push
23:32:28 <m3henry> It will be as if it never existed
23:32:30 *** Smedles has quit IRC
23:32:37 <m3henry> I don't get to choose what the commit message it
23:32:53 <LordAro> :)
23:32:59 <glx> Eddi|zuHause: not true, the admins can :)
23:33:00 <peter1138> What is doing autosquashing for you?
23:33:13 <m3henry> is*, git always gives it a commit message starting with fixup!
23:33:43 *** Smedles has joined #openttd
23:34:04 <m3henry> in .gitconfig [rebase] autosquash = true
23:34:23 <m3henry> Should be default IMO
23:34:29 <peter1138> Sounds dangerous to me, to be honest.
23:34:34 <LordAro> interesting, not used that for rebasing
23:34:42 <Samu> ReserveConsist
23:35:08 <m3henry> I want to amend the commit, might was well do it when its ref is changing anyway
23:37:43 <Samu> https://github.com/OpenTTD/OpenTTD/blob/master/src/economy.cpp#L1606
23:37:53 <Samu> i think this is where I need to edit
23:38:46 <Samu> ReserveConsist must not be called
23:38:47 <DorpsGek_II> [OpenTTD/OpenTTD] M3Henry updated pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fhSz0
23:38:56 <Samu> under exclusive transport rights
23:39:05 <Samu> but I'm not sure
23:41:45 <glx> missing Codechange: ;)
23:42:24 <m3henry> :VVVVV
23:45:03 <Samu> ReserveConsist works for both load and unload, right?
23:45:05 <Samu> hmm...
23:45:36 <Samu> this only matters for loading
23:45:43 <Samu> how to leave unload untouched?
23:48:59 *** Progman has quit IRC
23:50:49 *** HerzogDeXtEr has quit IRC
23:52:51 <Samu> ah no
23:52:56 <Samu> this is only for load
23:57:31 *** frosch123 has quit IRC
23:58:56 <Samu> how does autorefit works for consists? i'm too new for tihs
23:59:06 <Samu> it's autorefiting on full load?