IRC logs for #openttd on OFTC at 2019-03-23
            
00:00:05 <Samu> and the fact that AI companies are started every tick
00:00:21 <Samu> and the fact that the network can delay execution of commands by one tick
00:00:29 <Samu> or another
00:00:57 <Samu> I fail at explaining
00:01:24 <Samu> line 598 has a Company::GetNumItems()
00:01:42 <Samu> this test is done before starting the command
00:03:12 <Samu> Company::GetNumItems() is not correct at that point
00:03:25 <Samu> it may or may not
00:04:59 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 approved pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjJcm
00:05:31 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 dismissed a review for pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjJcm
00:07:48 <Samu> gonna try write everything there instead
00:15:00 *** Supercheese has joined #openttd
00:15:10 *** sla_ro|master has quit IRC
00:18:56 *** Progman has quit IRC
00:23:28 *** Supercheese has quit IRC
00:23:49 *** Supercheese has joined #openttd
00:38:44 *** frosch123 has quit IRC
00:44:51 *** Supercheese has quit IRC
01:27:54 *** m3henry has quit IRC
01:29:31 *** Wolf01 has quit IRC
01:36:57 *** Flygon has joined #openttd
02:09:30 *** HerzogDeXtEr1 has quit IRC
02:20:37 *** circ-user-3HYVs has quit IRC
02:31:49 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjJC6
02:32:03 <Samu> oh boy, that was too long
02:32:29 <Samu> took me 2h30m to write
02:44:54 *** Pikka has joined #openttd
02:52:32 *** nielsm has quit IRC
03:01:46 *** Wormnest has quit IRC
03:18:27 *** Thedarkb-T60 has quit IRC
03:20:56 *** circ-user-3HYVs has joined #openttd
03:25:24 *** Thedarkb-T60 has joined #openttd
04:07:00 *** D-HUND has joined #openttd
04:10:04 *** Thedarkb-X40 has joined #openttd
04:10:27 *** debdog has quit IRC
04:16:57 *** Thedarkb-T60 has quit IRC
04:54:03 *** tokai has joined #openttd
04:54:03 *** ChanServ sets mode: +v tokai
05:00:50 *** tokai|noir has quit IRC
05:27:30 *** glx has quit IRC
05:38:02 <Samu> wow, they're making it a big deal... https://akshatmittal.com/youtube-realtime/compare/#!/UC-lHJZR3Gqxm24_Vd_AJ5Yw$$UCq-Fj5jknLsUf-MWSy4_brA
05:39:07 *** Samu has quit IRC
06:09:37 *** Thedarkb-X40 has quit IRC
07:10:41 *** sla_ro|master has joined #openttd
07:36:31 *** andythenorth has joined #openttd
07:40:42 <andythenorth> moin
08:00:30 *** sla_ro|master has quit IRC
08:11:13 <peter1138> hi
08:12:51 *** Alberth has joined #openttd
08:12:51 *** ChanServ sets mode: +o Alberth
08:12:52 *** Progman has joined #openttd
08:12:54 <Alberth> o/
08:38:41 <andythenorth> hi Alberth
08:39:04 <andythenorth> _probably_ not java Alberth
08:44:03 <Alberth> :)
08:46:59 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fjJ83
08:50:54 <andythenorth> I have no information on the 'Python is slow' problem
08:51:34 <andythenorth> might be easiest to just go to C++?
08:52:37 <Alberth> safest, at least, and generally accepted
08:53:11 <andythenorth> then we could distribute a cross-platform binary?
08:53:15 <LordAro> moin
08:53:18 <andythenorth> avoid all the python packaging problems
08:53:54 <Alberth> computers without default installed python aren't useful anyway :p
08:54:12 <Alberth> but yeah, just compile it at all relevant platforms
08:56:34 *** nielsm has joined #openttd
08:57:13 <andythenorth> not sure how maintainability is affected by python vs C++
08:57:33 <LordAro> needs some profiling, before making assumptions
08:58:36 <andythenorth> I think maintainability is +/-0
08:59:01 <andythenorth> lots of contributors here dislike python
08:59:13 <andythenorth> nml has fallen into a poor maintenance state
08:59:34 <andythenorth> python helps me maintain trivial things like constants, but I can't work with the parser / lexer :P
09:00:03 <Alberth> LordAro: expression optimizing is done too often, but it's pretty much impossible to say which ones are actually needed
09:00:39 <Alberth> it can't get much worse than current nml :)
09:00:53 <andythenorth> a spike rewrite to C++? o_O
09:01:16 <andythenorth> pick a subset of features, and make a minimally functional compile?
09:01:49 <Alberth> could be an option
09:02:21 <Alberth> just grfid, I bet :p
09:02:29 <Alberth> maybe town names?
09:12:48 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fjJ8B
09:13:31 <peter1138> LordAro, "this line looks potentially wrong" ... which line? :p
09:14:01 <peter1138> I think github is being silly to me :/
09:14:59 <peter1138> Oh yes, I didn't mention the line number either, oops.
09:15:05 <peter1138> But yes, that's the offending one.
09:17:22 <nielsm> wth you never required that before during the point updates? https://0x0.st/zKsf.png
09:22:37 *** nielsm has quit IRC
09:25:48 *** nielsm has joined #openttd
09:46:34 *** Wolf01 has joined #openttd
09:48:15 <Wolf01> o/
09:54:01 <LordAro> peter1138: :)
10:07:12 <Alberth> o/
10:23:09 <andythenorth> well
10:23:47 <Pikka> wellington
10:24:11 * Pikka dindins
10:35:15 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjJ4Z
10:35:33 <TrueBrain> who made Samu write a PhD on the issue? :P
10:35:58 <andythenorth> it was me!
10:36:00 <andythenorth> or not
10:36:12 <andythenorth> also....it's a TrueBrain
10:43:35 <TrueBrain> hmm .. how to backport language changes ..
10:43:41 <TrueBrain> I know people had clever scripts for that ..
10:47:00 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain opened pull request #7397: Backport marked PRs to 1.9 https://git.io/fjJ4C
10:49:02 <TrueBrain> should, once merged, this also be backported: https://github.com/OpenTTD/OpenTTD/pull/7396 ?
10:49:13 <TrueBrain> (given it is linked to a ticket that I just backported)
10:49:18 <TrueBrain> LordAro, happen to know?
10:52:21 <andythenorth> hmm
10:52:23 <andythenorth> FIRSes then?
10:54:45 <TrueBrain> can't find scripts people created/used to backport languages
10:54:47 <TrueBrain> annoying
10:59:27 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #7397: Backport marked PRs to 1.9 https://git.io/fjJ4C
11:01:46 *** HerzogDeXtEr has joined #openttd
11:02:48 <DorpsGek_II> [OpenTTD/OpenTTD] M3Henry commented on pull request #7165: [core] Implement SmallVector using std::vector https://git.io/fjJ4a
11:04:13 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7371: Kdtree is built too early in savegame loading process https://git.io/fjJ4w
11:05:36 *** Alberth has left #openttd
11:09:40 <nielsm> hmm something missing? :( https://0x0.st/zKz1.jpg
11:10:40 <TrueBrain> what did you dooooooo :D
11:11:10 <nielsm> just loaded it :|
11:11:20 <nielsm> all newgrfs are in place
11:12:27 <nielsm> suspicious... https://0x0.st/zKzj.png
11:14:28 <TrueBrain> hmm .. I forgot that modifying a patch in place is difficult, because it also tracks 'adds' and 'removes'
11:24:10 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7398: Fix #7371: Avoid dependency on foundations of town tile during saveload https://git.io/fjJ49
11:37:08 <TrueBrain> patch files are picky :D
11:37:19 <TrueBrain> if a chunk has no changes, it errors
11:37:34 <TrueBrain> so how can I, in a streaming way, remove additions .. hmm
11:38:25 <TrueBrain> I don't want to complicate my script by tracking chunks :(
11:43:17 <nielsm> gah I wish assert breaks in the VS debugger would take me to the assert call, instead of inside the assert library code
11:48:50 *** m3henry has joined #openttd
11:49:57 <TrueBrain> ghehe, yes, yes indeed
11:50:11 <m3henry> o/
11:56:26 *** circ-user-3HYVs has quit IRC
11:59:06 <nielsm> hmm did we do the changes from /*virtual*/ to c++11 "override" qualifier?
12:07:08 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #7397: Backport marked PRs to 1.9 https://git.io/fjJ4C
12:07:14 <TrueBrain> lets see if I did this correctly :D
12:10:45 <TrueBrain> no language errors; so I guess I did :)
12:12:30 <TrueBrain> 115 lines of Python
12:12:34 <TrueBrain> I should store this somewhere ..
12:12:43 <nielsm> I guess it's not a catastrophe if the 1.9 lang files end up containing a new string only necessary for 1.10
12:13:09 <TrueBrain> the main issue for me were strings that were modified in 1.10
12:13:13 <TrueBrain> you don't want those in 1.9 :)
12:13:58 <TrueBrain> so I wrote a simple script that ignores any id that is changed in master (from release branch), and ignores those lines in the translations
12:14:32 <TrueBrain> both removal, additions or modification
12:14:39 <TrueBrain> "best effort" :D
12:15:04 *** Samu has joined #openttd
12:15:13 <Samu> hi
12:15:44 <TrueBrain> hmm .. how can we poke translators to fix those '35' outdated strings and stuff ..
12:16:09 *** Thedarkb-T60 has joined #openttd
12:16:42 <TrueBrain> do we normally email them or something?
12:17:18 <TrueBrain> many have not been updated for 1.9, it seems
12:17:35 <TrueBrain> German even is outdated :P
12:19:36 <nielsm> maybe? no idea
12:20:19 <Samu> TrueBrain, I made a small mistake. On the last tick, both DC_TEST and DC_EXEC are run, they both fail on my patch
12:21:39 <Samu> I edited it
12:22:26 <nielsm> I'm amazed the latin translation is among the almost complete ones...
12:22:48 <Samu> as for trying to start multiple AIs in just one command... I don't know how to do that
12:23:01 <Samu> I mean, I know, but I don't think it will work
12:23:19 <Samu> OnTick_Companies never stops being called
12:23:51 <nielsm> Samu: My suggestion for fixing AIs starting correctly "simultaneously" would be to send the next "start AI" command within the execution of the previous
12:39:50 <Samu> how?
12:40:06 <Samu> I'm always worried about OnTick_Companies
12:41:46 <TrueBrain> nielsm: that would work too; I would just add the 'amount of AIs to start' to that command, and loop in there :)
12:41:57 <TrueBrain> just moving of code, basically
12:42:13 <Samu> but OnTick_Companies...
12:42:45 <TrueBrain> nielsm: funny, tail recursion or loop recursion :D
12:42:47 <Samu> uhm, so it starts 10 AIs as 1 command, then next tick it could do the same
12:42:53 <Samu> start 10 more
12:43:37 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7399: Fix #7374: Ensure k-d trees are always updated when station sign moves https://git.io/fjJBj
12:44:50 <Samu> explain, I'm failing to understand
12:45:16 <nielsm> buried in kdtrees atm, want to finish these up before thinking too much about other things
12:45:23 <Samu> ok
12:59:10 *** Alberth has joined #openttd
12:59:10 *** ChanServ sets mode: +o Alberth
13:04:26 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjJRn
13:05:42 <Samu> ah bitmask magic
13:06:41 <Samu> i think you mean 15 bits
13:06:46 <Samu> but i see it can work
13:07:49 <nielsm> may as well reserve a full 16 (initially) instead of making some weird odd positions
13:08:21 <Samu> OnTick_Companies will still be queued a second time
13:08:32 <Samu> but fail against the bitmask
13:09:00 <Samu> instead of dozens of commands failing, it's just 1 or so
13:12:05 *** synchris has joined #openttd
13:13:24 <Samu> hmm
13:13:38 <Samu> actually, I'm not sure
13:21:34 *** DrSegfault has left #openttd
13:25:04 <Samu> will have to make changes in AI::GetStartNextTime()
13:25:29 <Samu> for some reason, this doesn't look like it's not another hack
13:28:28 <m3henry> nielsm: #7324 has merge conflicts, but I can resolve them tomorrow
13:31:10 *** gelignite has joined #openttd
13:45:34 *** gelignite has quit IRC
13:50:45 <DorpsGek_II> [OpenTTD/OpenTTD] M3Henry updated pull request #7324: Codechange: [C++11] Use override specifer for overriding member declarations https://git.io/fhxq0
13:50:54 <m3henry> Actually it didn't take long xD
14:01:12 <andythenorth> well
14:08:37 *** Thedarkb-T60 has quit IRC
14:10:09 <peter1138> hi
14:11:44 *** m3henry has quit IRC
14:14:03 *** Flygon has quit IRC
14:14:59 <Samu> DoCommandP(0, CCA_NEW_AI | INVALID_COMPANY << 16, 1 | _settings_client.network.max_companies << 1 | num_to_start << 5, CMD_COMPANY_CTRL);
14:15:03 <Samu> ugly?
14:15:31 <Samu> i dont know about the bitsmask
14:16:48 <Samu> must work on a bitmask thing
14:17:38 <Alberth> not working mostly
14:18:34 <Alberth> CCA_NEW_AI | INVALID_COMPANY << 16 is interpreted as (CCA_NEW_AI | INVALID_COMPANY) << 16 rather than the most often intended CCA_NEW_AI | (INVALID_COMPANY << 16)
14:19:20 <nielsm> also you probably should not store data in the command number?
14:19:38 <nielsm> hmm...
14:19:39 <nielsm> oh
14:19:43 <nielsm> I'm misreading
14:19:44 <Samu> INVALID_COMPANY is meant to start AI as spectator
14:19:59 <peter1138> AI specatator? What?
14:20:11 <Samu> the command is issued by 255
14:20:17 <Samu> it's fine
14:20:33 <Alberth> AIs like to watch too :p
14:20:56 <Samu> I didn't change that, it's how the command is issued
14:21:02 <Samu> the owner of the command
14:21:27 <Alberth> that doesn't mean it makes sense :)
14:22:20 <Samu> i fail at explaining
14:22:29 *** andythenorth has quit IRC
14:23:19 <Samu> it's a DoCommand thing that stuff are executed as Spectators
14:34:02 <peter1138> nielsm, so did you forget to compile?
14:34:25 *** Thedarkb-T60 has joined #openttd
14:34:34 <nielsm> :(
14:41:12 <Samu> sorry nielsm I don't think I can do what you asked
14:41:34 <Samu> it's becoming hackier
14:41:39 <Samu> as TrueBrain would say
14:43:55 <TrueBrain> please don't put words in my mouth; that is not a nice thing
14:45:45 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7399: Fix #7374: Ensure k-d trees are always updated when station sign moves https://git.io/fjJBj
14:51:02 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7398: Fix #7371: Avoid dependency on foundations of town tile during saveload https://git.io/fjJEt
14:51:34 <Alberth> strcmp result swaps sign if you swap arguments :p
14:58:50 <Samu> this is starting to look like a terrible mess
15:09:30 *** Thedarkb1-T60 has joined #openttd
15:15:49 *** Thedarkb-T60 has quit IRC
15:18:15 <Samu> sorry I didn't do the bitmask thing as requested
15:18:25 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjvY8
15:18:31 <Samu> how does it look now?
15:19:47 *** sla_ro|master has joined #openttd
15:23:00 *** Wormnest has joined #openttd
15:25:30 <TrueBrain> you are still fixing symptoms .. not the issue
15:26:04 <Samu> :( ok i give up
15:26:49 <Samu> somebody else take over
15:29:37 <peter1138> ok
15:30:16 <peter1138> > out
15:30:30 <TrueBrain> you seem to be so focused on the symptoms, that you forget to look at the problem itself. And I think the problem already started with the initial patch that introduced this behaviour
15:30:39 <TrueBrain> the system is not designed to start more than one company in a single tick
15:30:46 <TrueBrain> so there the problem already starts
15:31:07 <TrueBrain> fixing it at the other end of the spectrum only results in lines and lines of code validating if things have changed in the meantime
15:31:21 <TrueBrain> but you have to ask yourself .. why can it queue more AIs than intended?
15:31:32 <TrueBrain> and does that part of the system make sense?
15:32:26 <TrueBrain> as when I look at the code, I wonder if the original patch didn't introduce another issue too: to me it looks like that every tick the system checks if it should start an AI
15:32:31 <TrueBrain> every
15:32:32 <TrueBrain> tick
15:32:38 <TrueBrain> sounds a bit wasteful on the CPU
15:32:54 <TrueBrain> Normally this was only done AT MOST once a game-day
15:33:00 <TrueBrain> which is still iffy, but at least less wrong
15:33:13 <TrueBrain> seems the initial review didn't spotted this
15:33:51 <TrueBrain> specifically, here: https://github.com/OpenTTD/OpenTTD/blob/011257dc8804175dd7d1e839e97e796c0a88aee6/src/company_cmd.cpp#L723
15:34:34 <TrueBrain> if GetStartNextTime is zero, _next_competitor_start is always one, so every tick it runs MaybeStartNewCompany .. every tick
15:34:39 <TrueBrain> I think there it already went wrong
15:34:47 <TrueBrain> and the rest just is an escalation of that issue
15:35:23 *** andythenorth has joined #openttd
15:47:16 <Alberth> o/
15:53:05 <Pikka> eek
15:53:30 *** keoz has quit IRC
15:54:08 <TrueBrain> bah; glx broke cmake :P
15:54:58 <andythenorth> ook
15:57:51 <Pikka> pongo?
15:58:29 <andythenorth> yes
15:58:34 <andythenorth> and tanks
16:13:23 <Samu> :(
16:14:08 <Samu> checking every tick was so it could start AIs immediately
16:14:29 <Samu> it was the whole point of the patch
16:14:32 <TrueBrain> so for the whole of the rest of the game, you checking something every tick, just so you could start them at the beginning
16:14:38 <TrueBrain> can you see there is some logic error in there?
16:15:36 <TrueBrain> and as such, my suspicion is that if you fix the root cause (checking every tick till the end of time if there might be a reason to start an AI), the symptom you are currently fixing goes away too
16:15:39 <Samu> maybe I can now change that part back to checking daily, since it can now start multiple AIs in 1 command
16:17:34 <DorpsGek_II> [OpenTTD/OpenTTD] gbomfim opened issue #7400: Funding a new primary industry https://git.io/fjJu2
16:18:03 <Samu> the double check is probably not gonna be needed
16:18:06 <Samu> hmm
16:18:49 <Samu> ok, brb gonna try
16:18:58 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on issue #7400: Funding a new primary industry https://git.io/fjJuV
16:39:09 *** Thedarkb2-T60 has joined #openttd
16:43:20 <Samu> how to detect the first tick of a game?
16:44:07 *** Thedarkb1-T60 has quit IRC
16:47:14 <Samu> ah
16:47:15 <Samu> MakeNewGameDone
16:54:27 *** supermop_Home has joined #openttd
16:55:17 *** Thedarkb2-T60 has quit IRC
17:01:16 <Samu> hmm
17:01:29 <Samu> AIs now start before the HU company
17:01:32 <Samu> keks
17:05:41 <Samu> this all feels so different
17:25:47 <TrueBrain> "/usr/bin/rpmbuild can't handle paths with spaces, use a build directory without spaces for building RPMs."
17:25:48 <TrueBrain> LOL!
17:26:14 <LordAro> lol.
17:28:49 <andythenorth> LOL1!!!!!111!!
17:29:17 <peter1138> Oh dear.
17:29:42 <Eddi|zuHause> ... at least they check and don't silently fail? :p
17:30:06 <peter1138> Well the thing about checking if you need to start a tick is that traditionally it was with a delay of a year or so. But it still checked every tick.
17:31:33 <andythenorth> let's delete something
17:31:38 <TrueBrain> okay, changing build directory with cmake is really easy .. which makes me happy :)
17:33:49 <Samu> i'm reworking MaybeStartNewCompany
17:35:13 <Samu> the delay was 74 ticks
17:36:25 <LordAro> hmm
17:36:38 <LordAro> why did instant starting AIs get included in the game?
17:36:50 <LordAro> wouldn't it be more appropriate for an admin console thing?
17:37:32 <Samu> beucase it's a new feature
17:37:40 <Samu> and I like it :p
17:37:41 <Samu> hehehe
17:38:02 <Samu> j/k
17:39:33 <peter1138> LordAro, well, revert it all, and then the problem is solved :p
17:39:48 <LordAro> peter1138: well indeed
17:39:53 <andythenorth> revert
17:40:30 <peter1138> Hmm, why are news items not saved?
17:42:39 <_dp_> peter1138, who needs that spam :p
17:42:59 <peter1138> Dunno, just seems like missing game-state.
17:44:20 *** Wormnest has quit IRC
17:44:28 <TrueBrain> hmm ... what version to give non-tagged, in terms of bundling ..
17:44:39 <TrueBrain> take a 'deb' package .. what version should a random master commit have ..
17:45:25 <LordAro> 1.9.0.revisioncount ?
17:45:42 <LordAro> well, trunk would be 1.10.0.revisioncount
17:45:53 <TrueBrain> so 1.10.0 is older? :D
17:46:00 <TrueBrain> also, I only have major/minor/patch
17:46:18 <TrueBrain> 1.10.0-dev<revisioncount> ? Not sure that works tbh
17:46:22 <TrueBrain> Python-style :D
17:46:49 <LordAro> yeah, not great
17:46:52 <TrueBrain> okay, can't be bothred with this today .. something to table for now
17:47:44 *** glx has joined #openttd
17:47:44 *** ChanServ sets mode: +v glx
17:47:47 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
17:48:17 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjvY8
17:48:27 <Samu> there
17:48:44 <Samu> I hope this is it
17:49:00 <andythenorth> hmm
17:49:17 <Samu> the enforce title is now wrong though
17:49:29 <Samu> there's no enforce any more
17:49:33 <peter1138> NRT?
17:49:48 <peter1138> Or does that need a new vision?
17:49:54 <DorpsGek_II> [OpenTTD/OpenTTD] stormcone opened pull request #7401: Change: Do not display a newspaper about old vehicles for which repla… https://git.io/fjJg0
17:50:08 <TrueBrain> Samu: a lot better, in my opinion. But to me it reads you are slipping in additional changes :)
17:50:21 <TrueBrain> the src/openttd.cpp changes seems unrelated to the fix
17:50:41 <Samu> it is, otherwise it would have to wait 1 day
17:51:08 <Samu> or actually... wait
17:51:14 <Samu> that is wrong :(|
17:51:28 <Samu> damn... i fail
17:52:17 <TrueBrain> and GetStartNextTime() for sure needs some love. 'skip_counter' is not very verbose, and comments in that function are now wrong :)
17:52:30 <peter1138> Why did I buy more snacks? I have tons of snacks :/
17:52:45 <peter1138> Brexit-snack-stockpiling?
17:52:47 <TrueBrain> seems more you mean 'index' or something, instead of 'skip_counter'
17:52:51 <TrueBrain> peter1138: yes
17:53:01 <Samu> _next_competitor_start = max(DAY_TICKS, AI::GetStartNextTime() * DAY_TICKS); this is wrong, halp
17:53:01 <TrueBrain> also, because you are inviting us to a party are your house
17:53:16 <Samu> or is it right?
17:53:21 <glx> hmm TrueBrain, seems you drop my timestamp commit
17:53:27 <peter1138> TrueBrain, go for it.
17:53:28 <TrueBrain> glx: yes, I did
17:53:34 <TrueBrain> glx: it failed horribly here
17:53:44 <TrueBrain> on a clean build, it refused to work
17:53:54 <TrueBrain> so I wanted to ask you if you knew what was going on
17:54:05 <TrueBrain> well, I did not mean to drop your patch as such
17:54:06 <Samu> max(74, 0 *74) = 74
17:54:11 <TrueBrain> but ... my push did :P
17:54:25 <TrueBrain> glx: I tried another approach to fix your itch; does that also work?
17:54:27 <Samu> getstartnexttime will still be 74 ticks
17:54:36 <TrueBrain> https://github.com/OpenTTD/OpenTTD/pull/7270/commits/a8929d0691ab7b1d3a135a0cfebf6fd457452a4d <- glx
17:54:47 <TrueBrain> (and sorry, I wanted to push to another branch of mine, but I forgot :( )
17:55:30 <glx> for baseset your approach is ok as they are not used later in build
17:55:35 <Samu> but then --_next_competitor_start means MaybeStartNewCompany() will never run
17:55:44 <TrueBrain> glx: I couldn't find a way to break the other 2 you changed
17:56:50 <TrueBrain> I now got what you meant with the configure_file() btw
17:56:54 <TrueBrain> are there other places that break?
17:56:57 <glx> easy, build, touch window_type.h and it will regenerate script_window.hpp everytime
17:57:11 <TrueBrain> owh, in your other branch?
17:57:21 <glx> in cmake branch
17:57:41 <TrueBrain> hmm .. let me try; as I don't get what your commit fixed for that?
17:58:01 <TrueBrain> anyway, what broke with your commit, was that it kept telling me it couldn't find table/strings.h or something, in the dependency
17:58:13 <glx> oh forget it that's in my api branch :)
17:58:17 <TrueBrain> it only worked if I manually touched that file in existence
17:58:19 <Samu> nevermind, it's correct apparently, I'm stupid
17:58:38 <TrueBrain> glx: pfew, was afraid I was going mad :P :D
17:58:41 <glx> in cmake branch touch any .ini for settings
17:58:48 <glx> or english.txt
17:59:01 <TrueBrain> testing ...
17:59:02 <peter1138> How do you run your Manley-Morel DMUs? As is, or with extra carriages?
17:59:34 <nielsm> occasionally adding up to two extra cars
18:00:09 <glx> it will the "regenerate" strings.h and settings.h everytime
18:00:15 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
18:00:16 <glx> *then
18:00:37 <TrueBrain> glx: as I came to the realization when I was debugging your commit, that it feels a bit off; keeping another file to avoid Makefile doing the wrong thing
18:00:47 <TrueBrain> what do you think about the commit above; can we also live with that? (touching the files)
18:01:10 <glx> will then rebuild a lot for a non real change
18:01:17 <TrueBrain> but only once
18:01:47 <glx> will be a pain for api ;)
18:02:07 <supermop_Home> yo
18:02:13 <TrueBrain> it is the same as when you touch CMakeLists.txt, it also triggers a recompile for some files, which might not have been needed
18:02:24 <TrueBrain> what is the usecase for those files to change glx?
18:02:39 <supermop_Home> apparently I had left the window in the room open slightly all winter and just noticed it now
18:03:20 <glx> you can change english.txt just to fix a typo without needing to rebuild all files using strings.h
18:03:20 <TrueBrain> glx: I expected settingsgen to always touch the output file .. I guess it does not :)
18:03:38 <TrueBrain> glx: good usecase
18:04:02 <TrueBrain> the issue is, I guess, that we are fighting against how 'make' expects things to work
18:04:51 <TrueBrain> owh, there was btw a real bug in your macros glx, at least I think: if the dependency in add_target didn't have byproduct set, it was never added again
18:05:00 <TrueBrain> so it could miss dependencies, from what I could tell
18:05:08 <glx> not needed
18:05:21 <glx> byproducts is mainly a ninja thing
18:05:30 <TrueBrain> yes, dependencies is not :)
18:05:53 <Samu> /* Find the first company which doesn't exist yet, but skip some */
18:05:54 <TrueBrain> https://github.com/OpenTTD/OpenTTD/commit/eb8f74c77e338fabb99f8e191aab6c5b04367729#diff-329abb7dc9357c4e0885581a0509b09bR98 <- that IF is missing an ELSE, from what I can tell :)
18:06:04 <Samu> good comment? :p
18:06:19 <TrueBrain> Samu: no
18:07:06 <glx> the original depends file is added before the if
18:07:07 <peter1138> Comments should really explain why. The what is covered by the code.
18:07:23 <TrueBrain> glx: gatcha!
18:07:30 <TrueBrain> glx: it is really hard to read, as you notice :D
18:08:04 <glx> yes cmake language doesn't always help
18:08:09 <TrueBrain> glx: I also could not figure out what all the ;:::, :::, and :::; was about
18:08:26 <andythenorth> AIs are too hard to code
18:08:30 <andythenorth> and need to be improved
18:08:36 <peter1138> Yes ;)
18:08:40 <andythenorth> they're unintuitive
18:08:46 <andythenorth> and hard to figure out
18:08:46 <peter1138> I hope in the future...
18:08:46 <glx> I replace the keyword with ::: so each command stay separated
18:08:57 <andythenorth> are AIs hard to code?
18:09:20 <peter1138> Yes, but that's the AI part, not the API part.
18:09:31 <TrueBrain> glx: blaming CMake is easy; but what I notice that newlines, some comments, etc, really help :)
18:09:34 <peter1138> We delegated them to scripts for a reason :)
18:09:47 <glx> because cmake_parse_arguments merges all matching keywords into a single list
18:10:12 <TrueBrain> glx: now THAT is a useful comment to add ;) As it explains the "why" more than the "what" :)
18:10:15 <glx> so 3 commands end up in only one
18:11:23 <TrueBrain> we really have to work in the CMake files to not add comments telling what we can read in the code below, but WHY we added those lines :D
18:11:29 <TrueBrain> (I noticed that with some of my own code too)
18:11:55 <TrueBrain> anyway, please check if you can fix your patch breaking on an clean build directory, would be nice :D
18:13:26 <Samu> maybe reserved_counter?
18:13:28 <glx> I'm fighting again with VS and cmake after a branch switching
18:13:35 <glx> this stuff is really unstable
18:13:48 *** rubenwardy has joined #openttd
18:13:52 <glx> stuck in cancel
18:14:04 <TrueBrain> 2017 or 2019?
18:14:11 <glx> 2017
18:14:22 <TrueBrain> 2019 seems to integrate CMake a bit nicer
18:15:20 <glx> I'll switch to 2019 when it's official ;)
18:15:42 <Samu> it's not really an 'index'
18:15:47 <glx> in 10 days or so
18:16:52 <Samu> it's a skip, it's a count of companies that are yet not valid to be skipped because they were already accounted for last while
18:17:04 <Samu> english?
18:17:52 *** andythenorth has quit IRC
18:17:59 <Samu> a company index skipping?
18:18:38 <peter1138> Should I update to 2019?
18:18:42 <peter1138> I don't really use it.
18:19:01 <Samu> company_index_skipping_counter ... good name?
18:19:11 <peter1138> Debian VM + vim + vnc is... a better developing experience o_O
18:20:32 <TrueBrain> glx: I think what breaks in your patch is exactly the else() what I was talking about. I think it should not depend on the file itself when there is a '.timestamp' alternative
18:20:33 <TrueBrain> :D
18:20:51 <TrueBrain> I somewhat start to understand how this is wokring and what is going on :P
18:23:54 <Samu> indexes_to_skip?
18:24:07 <TrueBrain> glx: yup, that fixes it :)
18:24:14 <TrueBrain> glx: I will make this into a patch, if you don't mind
18:24:32 <TrueBrain> add some comments and things, see if together we can create macros people can understand :D
18:24:40 <glx> np :)
18:25:01 <glx> but indeed working around cmake requires good comments
18:25:05 <TrueBrain> neck deep in Macro shit :P
18:25:16 <TrueBrain> first some food
18:25:54 <Samu> ids_to_skip
18:26:34 <peter1138> Wasn't cmake supposed to be great? :p
18:27:07 <glx> cmake is nice
18:27:53 <Samu> * @param ids_to_skip Number of company indexes to skip during evaluation.
18:39:00 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7376: Fix 011257d: Enforce the max_no_competitors and network.max_companies tests before creating an AI company in multiplayer. https://git.io/fjvY8
18:40:28 <Samu> just renamed title, looks a bit big now :)
18:41:39 *** Thedarkb-T60 has joined #openttd
18:42:26 <Samu> oops
18:44:10 <Samu> crap, num_ais still wrong
18:44:23 <Samu> let me quick fix
18:44:49 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7402: Fix: Filtered file list did not scroll properly. https://git.io/fjJ2m
18:46:15 <Samu> what is a better fix? uint num_to_start = max((uint)1, GB(p2, 0, 4)); ? or go change everywhere in the code the value of p2?
18:46:45 <Samu> https://github.com/OpenTTD/OpenTTD/pull/7376/files#diff-a642ac2d124f2c9d89c466a024a6a47eR875
18:46:50 <Samu> this is the line with problem
18:47:17 <peter1138> (uint)1 -> 1U
18:47:34 <Samu> 1U ok
18:47:39 <Samu> but p2 or 1U?
18:49:22 <Samu> i'm inclined towards uint num_to_start = max(1U, GB(p2, 0, 4));
18:49:34 <peter1138> Hmm
18:49:44 <peter1138> Are you saying that I can't start up multiple AIs instantly during a game, now?
18:49:55 <peter1138> (By increasing max competitors)
18:50:03 <Samu> no, p2 in some places is still 0
18:50:23 <Samu> start 0 AIs makes not much sense
18:50:44 <peter1138> I'm refering to _next_competitor_start and the removal of the loop.
18:50:54 <peter1138> I guess it doesn't matter to much. DAY_TICKS is quite short.
18:50:57 <peter1138> *too
18:51:28 <Samu> p2 is meant to be the number of ais to start
18:51:32 <Samu> not the delay
18:52:22 <peter1138> I'm not talking about p2.
18:52:27 <peter1138> FFS, learn to read :/
18:52:47 *** utack has joined #openttd
18:52:52 <Samu> ah
18:52:57 <utack> hi. does anyone know a good grf with school buildings?
18:53:51 <Samu> it should
18:53:55 <Samu> hmm let me test
18:54:40 <Samu> it will be slightly delayed though, it's not exactly next tick right away
18:55:51 <Samu> yep, it works
18:55:54 <peter1138> Yeah, just 1 day instead of instantly. No biggie mid-game.
18:56:01 *** Thedarkb1-T60 has joined #openttd
18:56:24 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7402: Fix: Filtered file list did not scroll properly. https://git.io/fjJ24
18:57:26 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7376: Fix 011257d: Allow multiple AI companies to be started with just 1 command, but revert the starting of companies back to once per day. At the start of a new game, check whether to start AI companies immediately, to avoid having to wait one day for that to happen. https://git.io/fjvY8
18:57:29 <peter1138> TrueBrain, does using "rebase and merge" or "squash and merge" affect backporting?
18:58:26 <TrueBrain> peter1138: no; it is just a bit more work that we have both options
18:58:30 <TrueBrain> but that is fine :)
18:58:57 <peter1138> I like squash-and-merge cos it adds the PR number. But sometimes you don't want to squash, so... heh.
18:59:16 <TrueBrain> I agree :)
18:59:22 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7402: Fix: Filtered file list did not scroll properly. https://git.io/fjJ2m
19:00:24 <peter1138> "I'm unsure if this is really really correct," that's a scary start, nielsm :-)
19:01:21 <nielsm> :P
19:01:54 <nielsm> well, the original kdtree PR was the same situation, "I hope I've caught all places that need to maintain this"
19:02:07 *** Thedarkb-T60 has quit IRC
19:03:54 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain requested changes for pull request #7376: Fix 011257d: Allow multiple AI companies to be started with just 1 command, but revert the starting of companies back to once per day. At the start of a new game, check whether to start AI companies immediately, to avoid having to wait one day for that to happen. https://git.io/fjJ2u
19:03:54 *** Thedarkb-T60 has joined #openttd
19:04:36 *** Supercheese has joined #openttd
19:05:05 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjJ2g
19:05:55 <TrueBrain> Samu: the art of programming is more with less. Not the other way around.
19:06:19 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7301: Feature: When filtering purchase list by cargo type, make buy button perform a refit if required. https://git.io/fhAIp
19:08:07 *** Thedarkb1-T60 has quit IRC
19:08:47 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjJ2w
19:09:34 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjJ2o
19:16:39 <Samu> the value can never be over 15
19:16:48 <Samu> @calc 0x1111
19:16:48 <DorpsGek> Samu: 4369
19:16:50 <Samu> meh
19:17:18 <Samu> @calc 2^^4
19:17:18 <DorpsGek> Samu: Error: invalid syntax (<string>, line 1)
19:17:23 <Samu> @calc 2**4
19:17:23 <DorpsGek> Samu: 16
19:17:31 <Samu> or ?
19:17:57 <Samu> isn't binary 1111 15?
19:18:20 <Alberth> 1+2+4+8, so yes
19:18:36 *** circ-user-3HYVs has joined #openttd
19:18:54 <nielsm> but 0x is hexadecimal
19:19:09 <Samu> no need to check num_to_start > MAX_COMPANIES then
19:23:42 *** supermop_Home has quit IRC
19:26:35 <Samu> that 'possibly' word was peter1138's suggestion
19:26:39 <Samu> :(
19:27:27 *** Pikka has quit IRC
19:27:45 <TrueBrain> I doubt he meant this
19:28:11 <TrueBrain> "Allow multiple AIs to possibly start in the same tick" <- this is now just bad english. Without 'possibly' it means what you want
19:28:21 <TrueBrain> allowing something to possibly happen is as vague as fog
19:28:36 <TrueBrain> I am allowing you to possibly merge this .. doesn't mean anything
19:28:52 <Samu> ok
19:29:15 <TrueBrain> comments should not be vague or unspecfic .. it is rarely helping the reader along .. "is it? Owh .. I dont know .. I have to figure this out myself"
19:29:38 <TrueBrain> next step is a comment like: /* Doing stuff */ :D
19:29:40 <Samu> /** Start new competitor companies if possible. */ this one was already there, even before the initial comment
19:29:51 <TrueBrain> yes; and that is perfectly fine
19:29:58 <Samu> oh? ... ok
19:30:03 <TrueBrain> 'Allow a new competitor to possibly start' is now
19:31:01 <TrueBrain> the problem is with 'allow' vs 'possibly'
19:31:44 <Samu> 'some' :(
19:31:55 <Samu> this one is tricky to explain
19:32:23 <Samu> they've already been accounted for, but they're currently not created
19:32:38 <Samu> i have to pretend they were
19:32:44 <Samu> so I skip some indexes
19:33:05 <TrueBrain> you are not skipping SOME indexes
19:33:09 <TrueBrain> you skipping a VERY SPECIFIC amount
19:35:50 <peter1138> I've got a can of IPA. Woo.
19:36:18 * LordAro has a curry
19:36:23 <peter1138> Lidl brand, so it may not be any good :p
19:36:26 <peter1138> Ooh curry.
19:36:49 <peter1138> Ah, phew, I found a stash :D
19:37:58 <Samu> I don't know how to comment
19:38:38 <LordAro> i feel the last few hours has made that abundantly clear
19:39:18 <LordAro> it's quite hard to get right, but the important part is that comments should explain why the code is the way it is, not what the code does. if code requires comments to explain what it is doing, *in general* the code is not clear and should be changed
19:42:52 *** Thedarkb-T60 has quit IRC
19:44:05 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
19:44:44 <Samu> ids_to_skip--; // number of company indexes to skip, that are pretended to have been started, but actually aren't
19:44:53 <Samu> looks ok now?
19:44:55 <TrueBrain> there glx :) Let me know if I misunderstood any :)
19:45:48 <TrueBrain> fixed 3 minor bugs while going through it; nothing fancy :) (as we were not using it that way)
19:49:16 *** Thedarkb-T60 has joined #openttd
19:51:12 <TrueBrain> time to rebase the branch I guess ..
19:54:08 <glx> I considered adding ALL in options, but I think its location matters
19:54:29 <glx> so I left it in unparsed, with the target and first command
19:54:44 <TrueBrain> glx: that should have been in a comment :D
19:54:52 <glx> true :)
19:55:28 <glx> feeding time for me
19:56:18 <TrueBrain> fixed ALL, and rebased
19:56:20 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
19:57:08 <Samu> Comparing, incrementing, and substracting in a single statement.
19:57:15 <Samu> i thought that was code efficiency :(
19:57:23 <TrueBrain> efficient for who?
19:57:41 <TrueBrain> that statement you made there is VERY error prune
19:57:49 <TrueBrain> a - ++b > 0
19:57:50 <TrueBrain> I mean ...
19:58:48 <rubenwardy> readability is way more important
19:59:06 <rubenwardy> "premature optimisation is the root of all evils"
19:59:20 <rubenwardy> also, the compile does a lot of optimisations like that anyway
19:59:26 *** D-HUND is now known as debdog
19:59:30 <rubenwardy> and it will result in the same machine code
19:59:42 <Samu> 4 - ++0 > 0 becomes 4 - 1 > 0, becomes 3 > 0
19:59:59 <LordAro> Samu: no, stop trying to explain it to us, we already understand it
20:00:12 <LordAro> we're telling you that it's confusing and error prone, so stop trying to do it
20:00:30 <Samu> ok let me try another way
20:00:32 <rubenwardy> yeah, bad code
20:00:41 <peter1138> b++; if (a - b > 0)
20:00:46 <peter1138> ^ obvious
20:01:00 <TrueBrain> I believe it is even in a while statement :p
20:01:11 <TrueBrain> reinventing for(), basically :)
20:01:16 <rubenwardy> oh fun
20:02:49 <DorpsGek_II> [OpenTTD/OpenTTD] stormcone opened issue #7403: Game crashes https://git.io/fjJaG
20:03:17 <peter1138> TrueBrain, ah...
20:03:42 <peter1138> "In the main menu donwload and activate LuDiAI AfterFix (v9)"
20:03:46 <rubenwardy> b++; for(; a -b > 0; b++)
20:03:48 <peter1138> ^ blame the bug on Samu :D
20:04:47 <peter1138> Erm...
20:04:53 <peter1138> Refit Cost: -£25,122
20:04:59 <peter1138> I may have got that sum the wrong way around :-)
20:05:20 *** circ-user-3HYVs has quit IRC
20:06:51 <TrueBrain> okay, first steps of making a bundle are there ... w00p :D
20:06:55 <TrueBrain> CPack is pretty cool
20:07:24 <TrueBrain> FHS is annoying, but that is Linux only, so meh :)
20:07:47 <Samu> converting a do while into a for is complicated
20:08:34 <DorpsGek_II> [OpenTTD/OpenTTD] gbomfim commented on issue #7400: Funding a new primary industry https://git.io/fjJaW
20:09:14 <Samu> i can't do this, it was fine the way I had it :(
20:11:58 <Samu> oh a bug with my AI?
20:12:01 <Samu> no wai
20:12:28 <TrueBrain> changing a do/while into a for, especially if that do/while has a line: int a = 0, before it, is the most trivial thing to do
20:12:38 <TrueBrain> converting a while{} to a for, that can be tricky
20:12:59 <TrueBrain> you basically wrote a for(), just as a do/while
20:13:52 <DorpsGek_II> [OpenTTD/OpenTTD] gbomfim opened issue #7404: Diagonal bridges and tunnels https://git.io/fjJa8
20:14:37 <peter1138> If 7404 was a PR...
20:14:41 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjJaR
20:14:57 <TrueBrain> lol
20:16:21 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on issue #7404: Suggestion: Diagonal bridges and tunnels https://git.io/fjJa0
20:16:22 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain closed issue #7404: Suggestion: Diagonal bridges and tunnels https://git.io/fjJa8
20:17:11 <TrueBrain> I want templates to reply with
20:17:29 <TrueBrain> owh, that exists!
20:17:34 <TrueBrain> well, for next time :)
20:17:44 <peter1138> I think you can have multiple templates somehow, as well.
20:17:53 <TrueBrain> yes
20:17:56 <TrueBrain> many many even :D
20:18:00 <TrueBrain> and put them even on shortcuts
20:18:05 <TrueBrain> it is the top right button in the reply box
20:18:08 <TrueBrain> never noticed :D
20:20:23 <Alberth> look for it, and you'll find it :)
20:20:48 *** supermop_Home_ has joined #openttd
20:20:57 <supermop_Home_> there should be a many rivers tool in SE
20:21:07 <Samu> good idea
20:21:52 <supermop_Home_> as it is you get whatever rivers the SE generates at the beginning, but can't make more later except manually
20:22:20 <supermop_Home_> in case you had to terraform a valley that has an odd slope stopping a river making it to the shore
20:23:02 <supermop_Home_> regardless if the river generator is good or bad, it should be usable like the 'many random towns' or 'many random industries' tools
20:23:36 <Samu> perhaps the same for GetNumItems
20:25:13 <LordAro> peter1138: TrueBrain: you can only have multiple issue templates displayed through the interface. you can have multiple PR templates, but you need to use a specific link to get to them.. which rather defeats the purpose
20:26:18 <TrueBrain> I meant reply templates :)
20:26:25 <TrueBrain> of which you can have many
20:26:49 <peter1138> supermop_Home_, PR? ;)
20:29:14 <LordAro> TrueBrain: oh, didn't know about thos
20:29:15 <LordAro> e
20:29:41 <TrueBrain> me neither; that was the whole point :D
20:30:34 <supermop_Home_> peter1138 idk how to do that
20:33:02 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjvY8
20:33:09 <Samu> :)
20:33:23 <Samu> what about now?
20:36:56 *** andythenorth has joined #openttd
20:38:03 <Samu> hmm about the 'some' comment... meh... i dunno what to say there
20:38:21 <Samu> it is commented in the declaration thing
20:38:25 <Samu> hope it's enough
20:39:18 <Samu> i still need to change commit message, and do the fix up's rebases thingies
20:39:34 <Samu> before I do, I wanted to know if it needs further changes
20:40:51 <TrueBrain> for sure it is improving every iteration :)
20:41:08 <TrueBrain> GetStartNextTime is a bit annoying to have this skip-thingy .. it misses context what it is for
20:41:23 <TrueBrain> you need to read the code now, and assume that start_date is different for every AI, for this to make sense
20:44:33 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain requested changes for pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjJaS
20:44:46 <TrueBrain> Samu: and you never answered why the changes in src/openttd.cpp are important :)
20:45:39 <Samu> because they were set up to start immediately, I did comment there
20:46:05 <Samu> it won't start on the OnTick_Companies because there is a 74 ticks delay now
20:46:12 <TrueBrain> a) you did not; b) answering the the question is not an answer ;)
20:46:21 <TrueBrain> I can read WHAT it does. I am asking WHY it needs to do that
20:46:33 <TrueBrain> you keep falling for this :)
20:51:38 <Samu> regression test failed? :(
20:53:43 <Samu> :|
20:59:19 *** gnu_jj_ has joined #openttd
21:00:15 <Samu> I forgot how to check the result of regression
21:00:31 <Samu> have to edit regression.bat but can't remember what
21:02:34 <peter1138> If regression is changed, you have probably broken something.,
21:03:17 <Samu> i want to see what
21:05:04 *** Thedarkb-T60 has quit IRC
21:06:52 *** gnu_jj has quit IRC
21:07:09 <Samu> glx, how to log regression into a .txt? I forgot
21:08:09 *** circ-user-3HYVs has joined #openttd
21:08:23 <glx> add -k in regression.bat IIRC
21:10:45 <Samu> created an empty file :(
21:11:19 <Samu> so... the AI didn't start, I assume?
21:11:31 <glx> maybe
21:12:56 <Samu> ah, found the problem
21:13:03 <glx> TrueBrain: something like -k option may be useful in cmake branch
21:13:19 <Samu> the test is being done before the HU company is created
21:13:24 <Samu> t.t
21:14:39 <_dp_> can we just ban non-bananas grfs?
21:14:57 <_dp_> wanted to check that funding bug but couldn't find all that grf crap :(
21:15:30 <Samu> actually, 2 errors, that and then some more
21:15:33 <Samu> t.t
21:16:08 <Samu> turns out that bool isn't necessary
21:17:22 <Samu> it's my for cycle
21:17:25 <Samu> i failed
21:18:26 <Samu> the do while cycle was working fine
21:18:37 <Samu> the for cycle is now what's failing regression
21:18:56 <Samu> can I go back to do while?
21:18:57 <Samu> :p
21:19:22 <TrueBrain> only if you agree that makes you a stackoverflow kiddy
21:20:45 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7400: Funding a new primary industry https://git.io/fjJVY
21:21:29 *** Thedarkb-X40 has joined #openttd
21:24:12 <_dp_> ehm, why is it called eGRVTS on nielsm screenshot but for me it says GRVTS (without e)? o_O
21:24:55 <nielsm> mysterious
21:25:34 <_dp_> also what is "This is a replacement for an existing NewGRF" supposed to mean on that screen?
21:26:30 <_dp_> why is it calling all unknown grfs a replacement for smth?
21:27:26 <Samu> Running ai/regression/tst_regression... passed!
21:27:38 <nielsm> and is it missing two or three files? https://0x0.st/zKH0.png
21:27:44 <Samu> great, so I'm back to do, while :( failed to convert it into a for
21:28:33 <_dp_> nielsm, ha, indeed xD
21:28:52 <Samu> https://paste.openttdcoop.org/pixwxtrxo
21:29:04 <Samu> who's a do while to for convertion expert? :p
21:29:18 <peter1138> Damn, showing correct capacity and cost of refits in purchase menu is such a rabbit-hole
21:29:46 <Samu> and all those shennanigans about readability too?
21:29:57 <nielsm> https://www.tt-forums.net/viewtopic.php?f=67&t=63651&hilit=newstats.grf
21:30:00 <Samu> cus I'm afraid if I touch it, I will break it again
21:30:05 <Samu> it currently works
21:30:19 <nielsm> and eGRVTS 1.0 shows as "matching not found, loaded compatible"
21:30:21 <nielsm> for me
21:30:25 <nielsm> so just missing one file now
21:31:04 <planetmaker> o/
21:31:27 <Samu> meanwhile, dinner, afk
21:34:37 *** synchris has quit IRC
21:37:30 <_dp_> nielsm, http://bundles.openttdcoop.org/isr/nightlies/v5574-186/
21:38:06 <nielsm> ty!
21:40:09 <_dp_> weird, I can fund stuff but not on trees %)
21:40:57 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7400: Funding a new primary industry https://git.io/fjJVz
21:41:35 <nielsm> yeah, same here
21:41:42 <nielsm> trees make the site unsuitable
21:41:55 <andythenorth> oh wait
21:42:01 <andythenorth> I asked for that to be 'fixed'
21:42:05 <andythenorth> for water tiles
21:42:14 <andythenorth> has it broken something related?
21:42:22 <andythenorth> trees on coasts were preventing industry funding
21:42:44 *** Alberth has left #openttd
21:43:19 <andythenorth> https://github.com/OpenTTD/OpenTTD/commit/b242a04c7d530e5d73c809c53ae857455231a4c6
21:44:08 <nielsm> yeah, converted savegames can't place industries on trees
21:44:44 <peter1138> New games can?
21:46:07 <peter1138> But yeah, that's a glaring ommission now that you pointed it out :/
21:46:15 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7400: Funding a new primary industry https://git.io/fjJVg
21:46:56 <nielsm> hmm aren't trees supposed to convert cleared terrain back to grassland immediately?
21:47:16 <planetmaker> you clear trees like all other tiles
21:47:25 *** Thedarkb-T60 has joined #openttd
21:47:29 <planetmaker> with the same dirt to grass procedure
21:47:33 <nielsm> I mean, when you plan trees on tiles
21:48:48 <nielsm> okay guess not
21:50:39 *** Thedarkb-X40 has quit IRC
21:51:04 <planetmaker> plant? No, when planting trees, it doesn't get dirty
21:51:32 <planetmaker> When removing trees... that is normal to convert it to dirt
21:52:24 <nielsm> when planting trees on clear dirt, I remebered that the land would instantly convert to grass
21:53:57 <peter1138> nielsm, nope.
21:54:02 <peter1138> Just tested in 1.8.0
21:54:22 <nielsm> anyway, it looks like m1 is 0x70 on new trees planted, which can be built over
21:54:33 <nielsm> and is 0x10 on converted saves where you can't build industries over them
21:54:33 <DorpsGek_II> [OpenTTD/OpenTTD] michicc commented on pull request #7324: Codechange: [C++11] Use override specifer for overriding member declarations https://git.io/fjJVi
21:56:20 <Samu> back
21:57:52 *** circ-user-3HYVs has quit IRC
21:57:57 <peter1138> nielsm, yeah.
21:58:02 <peter1138> Looks like a fucked up :(
21:58:13 <peter1138> No savegame conversion.
21:58:35 <nielsm> actually, if I plant a tree on a clear grass tile, its m1 remains 0x10
21:59:14 <peter1138> And imho, waterclass should only be tested for the coast tiles, but... waterclass is how that is determined. Hmm.
21:59:16 <nielsm> but if I plant a tree on a dirt tile m1 is also 0x10, but then wait until the dirt has grown fully back to grass then m1 becomes 0x70
22:00:10 <peter1138> Heh
22:00:17 <nielsm> as soon as grass begins to grow back underneath the new tree m1 changes to 0x70
22:00:35 <michi_cc> Who wants to buy PR#7379 from me for review? Barely used, $0.
22:01:24 <Samu> https://paste.openttdcoop.org/pixwxtrxo transform this into a for, plz
22:04:25 <DorpsGek_II> [OpenTTD/OpenTTD] gbomfim commented on issue #7400: Funding a new primary industry https://git.io/fjJV9
22:05:22 <peter1138> nielsm, it's duplicated information anyway :/
22:05:32 *** Thedarkb-T60 has quit IRC
22:06:06 <peter1138> So I think we should revert and do the fix differently.
22:08:32 <peter1138> IsCoastTile can just check for TREE_GROUND_SHORE
22:09:17 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7400: Tree tiles converted wrong in savegames, block new industry creation https://git.io/fjJVQ
22:10:20 <nielsm> so, can't do a savegame version upgrade in 1.9 branch
22:10:36 <peter1138> It's unnecessary.
22:11:36 <peter1138> I'm working on it :-)
22:14:02 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjvY8
22:15:05 <peter1138> nielsm, probably shouldn't change the subject of bug reports like that :/
22:15:23 <nielsm> hmm :/¨
22:16:10 <nielsm> changing it back + adding the "on trees" detail
22:16:12 <peter1138> Which industry type is it? Any or a specific one?
22:16:17 <nielsm> any
22:16:19 <peter1138> Thanks.
22:16:23 <peter1138> Stock or newgrf?
22:16:37 <nielsm> tried both stock and a game with SPI
22:16:39 <nielsm> so either
22:16:56 <nielsm> any industry that requires flat, dry land
22:17:08 <peter1138> Ok, so most of them :-)
22:18:41 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7376: More than max_no_competitors could be created in network games https://git.io/fjJVx
22:19:13 <peter1138> And for the water test, I need FIRS I guess.
22:21:04 <DorpsGek_II> [OpenTTD/OpenTTD] gbomfim commented on issue #7404: Suggestion: Diagonal bridges and tunnels https://git.io/fjJVh
22:25:59 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on issue #7403: Game crashes https://git.io/fjJwe
22:28:55 <glx> Samu: I tried to reproduce but couldn't, thanks for the hint but without a full trace it won't be easy
22:29:05 *** gelignite has joined #openttd
22:29:53 <Samu> oh, my bad
22:31:24 <Samu> something about kdtree, definitely not my AI causing it
22:32:26 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on issue #7403: Game crashes https://git.io/fjJwT
22:33:16 *** supermop_Home_ has quit IRC
22:35:12 <Samu> zoom in and zoom out
22:35:15 <Samu> should crash
22:37:16 <Samu> uhm, nop, not crashing now
22:37:18 <Samu> weird
22:41:23 <Samu> now I managed to crash the way he reported
22:41:48 <Samu> clicked ignore, and game still runs lol
22:42:57 <glx> I followed the steps, no crash for me
22:44:27 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on issue #7403: Game crashes https://git.io/fjJw3
22:54:15 *** Supercheese has quit IRC
22:54:36 *** Supercheese has joined #openttd
23:06:37 *** nielsm has quit IRC
23:08:47 *** sla_ro|master has quit IRC
23:21:50 <Samu> it's funny, I wrote this code, and now I can't follow it
23:22:04 <Samu> i just know that it works
23:23:40 <Samu> Need to make this into a for https://paste.openttdcoop.org/pixwxtrxo
23:31:49 <Samu> assert(num_to_start_do_while == num_to_start_for);
23:31:52 <Samu> let's test!
23:32:40 *** Thedarkb-T60 has joined #openttd
23:33:56 <Samu> https://paste.openttdcoop.org/phxge1bu8
23:34:40 <Samu> https://paste.openttdcoop.org/poldjwubs
23:35:12 <Samu> oops
23:35:57 <Samu> https://paste.openttdcoop.org/pxd5mqdhw 3rd time
23:37:30 <Samu> i think do while looks simpler
23:37:42 <Samu> or i just suck at turning this into a for
23:37:54 <_dp_> Samu, don't use ++ in expressions, I'm not even sure if that's a defined behavior there
23:38:25 <Samu> the do while part is tested as correct
23:38:34 <Samu> can u help me create a for version of it?
23:38:38 <milek7> why it would be undefined?
23:38:44 <milek7> it is just ugly
23:39:44 <_dp_> milek7, is evaluation order of operands in binary operator defined?
23:40:01 <_dp_> milek7, it may be for && but I'm not 100% sure
23:40:19 <peter1138> For && and ||, yes.
23:40:40 <_dp_> milek7, it definitely is ub for function arguments
23:41:21 *** andythenorth has quit IRC
23:42:58 <Samu> i think im missing a check, now that i closely look at it
23:43:00 <Eddi|zuHause> i'm fairly sure && is a sequence point
23:43:27 <Eddi|zuHause> but it is definitely a dangerous field to step in
23:47:08 <_dp_> yeah, while(--x) is borderline acceptable imo but not that
23:48:14 <Eddi|zuHause> there's no reeal reason why it couldn't be a separate statement
23:50:22 <Eddi|zuHause> also "(uint)_settings_game.difficulty.max_no_competitors - num_to_start_for > 0" is probably better expressed as "num_to_start_for < (uint)_settings_game.difficulty.max_no_competitors"
23:57:00 <Eddi|zuHause> on a separate note, why is it checking for _settings_client.network.max_companies? i would have taken that as max human companies...
23:57:20 <Eddi|zuHause> so people can set those things separately
23:57:34 <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] commented on issue #7037: Smarter random town names https://git.io/fjJwA
23:58:38 <Samu> it was already there
23:58:53 <Samu> I kept the same functionality
23:59:32 <Samu> my while is missing a check, speaking of which, that one