Log for #openttd on 18th January 2020:
Times are UTC Toggle Colours
00:36:58  *** y2kboy23_ has joined #openttd
00:41:43  *** y2kboy23 has quit IRC
00:58:12  *** sla_ro|master has quit IRC
01:21:20  *** Wormnest has joined #openttd
01:42:07  *** WormnestAndroid has quit IRC
01:42:30  *** WormnestAndroid has joined #openttd
01:42:39  *** Wormnest_ has joined #openttd
01:49:28  *** Wormnest has quit IRC
01:50:32  *** WormnestAndroid has quit IRC
01:50:54  *** WormnestAndroid has joined #openttd
02:03:11  *** snail_UES_ has joined #openttd
02:13:52  *** Pikka has joined #openttd
02:13:58  *** Wormnest_ has quit IRC
02:14:21  *** Thedarkb has quit IRC
02:20:51  *** mindlesstux_ has joined #openttd
02:23:05  *** ToBeFree has quit IRC
02:28:51  *** HerzogDeXtEr has quit IRC
03:09:23  *** debdog has joined #openttd
03:12:42  *** D-HUND has quit IRC
03:45:07  *** WormnestAndroid has quit IRC
03:45:12  *** WormnestAndroid has joined #openttd
04:03:22  *** glx has quit IRC
04:04:20  *** Wormnest_ has joined #openttd
04:16:58  *** Wormnest_ has quit IRC
05:29:16  *** snail_UES_ is now known as Guest14004
05:29:16  *** snail_UES_ has joined #openttd
06:34:53  *** snail_UES_ has quit IRC
08:25:44  *** andythenorth has joined #openttd
08:26:26  <andythenorth> huzzah
08:27:24  <Pikka> o/
08:30:19  <andythenorth> seems I can upgraded my CivilAI savegame to 32 :)
08:31:00  <andythenorth> Pikka: does it understand vehicle current reliability?
08:31:51  <Pikka> not in any meaningful way
08:32:05  <andythenorth> I have breakdowns off, I was wondering about turning it on :P
08:32:15  <Pikka> do it
08:32:23  <andythenorth> they're running some very old trains though
08:32:35  <Pikka> it shouldn't be
08:33:07  <Pikka> only if it's taking a long time to do things... how long it takes to plan a long route is currently the biggest problem the AI has, it can be several years
08:33:10  <Pikka> during which it does nothing else
08:33:25  <Pikka> that's the big thing that needs addressing
08:33:32  <andythenorth> 57 year old train
08:33:36  <andythenorth> 40 year lifespan
08:33:58  <andythenorth> allowing though that this game all the AIs have crashed twice while it was on ffwd
08:33:59  <Pikka> what's the AI doing? What does the debug window show?
08:34:26  <andythenorth> currently I've just reloaded the save, so they're making notes
08:34:41  <andythenorth> they've only had 3 months of game
08:34:50  <Pikka> ya. it'll get to replacing them then
08:35:19  <Pikka> normally it's fine. I always play with reduced breakdowns on
08:35:22  <andythenorth> the colour schemes are so rad, tests the Horse sprites a lot
08:35:34  <Pikka> o/
08:37:05  <andythenorth> it's very confused by my high speed electric trains
08:37:19  <andythenorth> it will have no idea how to build them
08:37:31  <Pikka> how do they work?
08:39:27  * andythenorth trying to remember :P
08:39:28  <andythenorth> code knows
08:40:12  <andythenorth> there's double headed electric engine with relatively low power and very high speed
08:40:31  <andythenorth> and then dedicated articulated coaches (16/8) which gain power when attached to engine
08:40:50  <andythenorth> for some reason it builds the engine, then attaches nothing, leaves it sitting in depot
08:40:54  <andythenorth> multiple AIs are doing this
08:41:23  <Pikka> hmm
08:41:35  <andythenorth> there's no way to teach it to build the right coaches
08:41:44  <Pikka> maybe
08:41:46  <andythenorth> I expected it to run around with milk tankers or something :)
08:41:55  <Pikka> is this in the current version? what year?
08:42:51  <andythenorth> 'Helm Wind' 1990 or 'Brenner' 2020
08:44:36  <Pikka> passenger trains it's building them for?
08:45:34  <andythenorth> not sure :)
08:45:37  <andythenorth> I'll check the route
08:45:58  <andythenorth> yes
08:46:03  <andythenorth> oh but one of them has built it
08:46:06  <andythenorth> with correct coaches also
08:46:22  <andythenorth> wonder if the others just crashed during the build
08:47:12  <Pikka> seems to work here
08:47:22  <Pikka> yes, I'd say those were the cause of the crash
08:47:30  <Pikka> it was when it tried to build a mailvan for them, but couldn't find one
08:47:40  <andythenorth> yup
08:47:42  <andythenorth> no mailvan
08:48:04  <andythenorth> should I add 186mph mailvan? o_O
08:48:12  <andythenorth> was going to do it for French Horse TGV
08:48:13  <andythenorth> :P
08:48:22  <Pikka> only if you want to. it's fine without? :P
08:48:26  <andythenorth> super!
08:48:28  <andythenorth> I won't
08:49:52  *** nielsm has joined #openttd
08:51:20  <andythenorth> yo nielsm
08:51:50  <nielsm> morning
08:53:50  <andythenorth> Pikka so fix route pathfinding, make it do FIRS Steeltown, profit!
08:53:52  <andythenorth> it's pretty nice
08:54:06  <andythenorth> then you can do EuroTrainsRevivalSet
08:54:07  <Pikka> o/
09:22:43  <peter1138> Hi
09:22:50  <peter1138> I had breakfast about 30 minutes ago.
09:22:59  <peter1138> And then I just had a biscuit with my coffee. Oh dear.
09:29:18  <peter1138> Hmm, warnings in squirrel about using std::move.
09:31:08  *** Progman has joined #openttd
09:38:21  <peter1138> Now I remember why I had Pulseaudio installed on Windows. Audio for Linux.
09:39:31  <peter1138> Hmm, rebased newgrf-docks. Let's see...
09:39:54  <andythenorth> I should have coffee
09:39:59  <andythenorth> with more coffee
09:41:47  *** zvxb has quit IRC
09:45:12  <peter1138> It runs, it doesn't crash.
09:45:14  <peter1138> Ship it?
09:46:49  <peter1138> (It's definitely not ready)
09:54:16  <andythenorth> PR I can test
09:54:23  <andythenorth> with my slow ass local build
09:54:43  * andythenorth wonders if the farm can build me a binary of a PR :P
10:00:21  <LordAro> peter1138: i thought we fixed the warnings in squirrel
10:00:32  <LordAro> andythenorth: yes, it can
10:00:41  <LordAro> but i don't know how
10:00:44  <andythenorth> pls moar docks
10:00:53  <LordAro> TB needs to press some buttons, probably
10:01:01  <andythenorth> also this is ass :D
10:02:12  <andythenorth> maybe I could make my local build run faster
10:05:45  *** crazystacy has joined #openttd
10:07:49  <peter1138> LordAro, you have, I hadn't rebased :-)
10:08:08  <LordAro> :)
10:08:12  <TrueBrain> hmm .. why is it so difficult to estimate with git what it is going to do with certain commands ... need to experiment ...
10:08:31  *** Wolf01 has joined #openttd
10:11:55  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
10:27:06  <andythenorth> nielsm: [this is a terrible idea] if we restricted max depth for enclosed bodies of sea (no route to map edge), and industries could read max depth for an area of sea
10:27:18  <andythenorth> FIRS could stop spawning ports into small landlocked seas :P
10:31:08  <nielsm> it'll be difficult to keep track of I think, unless you just make a (potentially very expensive) query function
10:35:41  <nielsm> (read: I can't think of a good iterative algorithm that can provide correct results within reasonable time, on large maps, and can handle being run across game ticks where the map might change between)
10:36:17  <nielsm> (and is also not memory hungry)
10:43:28  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
10:45:09  <andythenorth> nielsm: we have lots of free bits in water?
10:46:59  <nielsm> sure but I'd have to spend 16 bits to implement the ideas I have, and that's still a lot
10:49:49  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
10:51:02  <nielsm> my idea to do it without much performance impact and having constant-time lookup: store a "distance to map edge" value for every sea tile, in the tile loop set it to one less than the max of all neighbors; tiles on the edge get a fixed value of the 2x (or so) the longest map edge length
10:51:38  <nielsm> that should result in sea tiles with outside connection having positive value, and sea tiles without eventually getting zero after being cut off
11:01:27  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
11:01:38  <TrueBrain> it is so difficult to test stuff with gitttt :(
11:26:42  *** sla_ro|master has joined #openttd
11:37:41  <crazystacy> andythenorth, i love the ports in lakes
11:37:59  <crazystacy> what is the "player base" of openttd now compared to 2009?
11:38:03  <crazystacy> (that is when i first tried it)
11:39:18  <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
11:41:41  <nielsm> nobody knows :)
11:41:58  <nielsm> there isn't any good way to know how many are playing ottd
11:42:12  <crazystacy> i have very little memory of it back then except the actual game
11:42:24  <crazystacy> can't recall how many people played online
11:43:37  *** sla_ro|master has quit IRC
11:47:11  <crazystacy> how about chat events for AIs?
11:55:12  <Pikka> would be fun ;)
11:56:39  <crazystacy> well somewhere it said it's good to ask before adding something :P
11:58:16  <crazystacy> there's no way to create an empty AIStationList? i have to create it and go in and empty it? :P
12:00:11  <Pikka> an empty list is just a list
12:00:21  *** Thedarkb has joined #openttd
12:00:40  <crazystacy> ok. seems like it. cause the API said AIList.AddValue takes two ints
12:00:56  <Pikka> AddItem?
12:01:12  <crazystacy>
12:01:17  <crazystacy> yes
12:01:21  <Pikka> yes
12:01:40  <Pikka> a list always contains items with an associated value
12:01:58  <Pikka> so if you're just interested in the items you need to give them a dummy value, eg 0
12:02:25  <crazystacy> that is curious
12:02:30  <crazystacy> so it's a map with Station : int ?
12:02:51  <Pikka> the value is so you can sort the list to find the item you want
12:03:21  *** Wormnest_ has joined #openttd
12:04:12  <crazystacy> ok
12:18:24  <crazystacy> hm. when i AddItem to my list, it is not there the next time i call this method
12:20:04  <crazystacy> nvm
12:23:06  <Pikka> k :)
12:23:16  <peter1138> When your git commits contain lots of WIP...
12:32:31  <andythenorth> nielsm: could we just store an index of all water tiles that have a route to map edge, calculated once at game start?
12:33:03  <nielsm> hmm not sure that's a good idea
12:33:22  <andythenorth> probably not, most of mine aren't :)
12:33:33  <andythenorth> what's the downside?
12:34:12  <nielsm> player expectations, "I connected this lake to the ocean with a canal, why can't I build a port industry in it?"
12:34:37  <andythenorth> oh yes
12:34:38  <nielsm> and also "lol I cut this piece of water off but can still build port industries in i"
12:34:45  <andythenorth> I had already discounted the canal case
12:35:33  <andythenorth> I thought I had solution for 'map changed' but no
12:35:45  <andythenorth> I was going to propose looking up neighbouring tiles in the index
12:35:57  * andythenorth must to chores :)
12:36:59  <nielsm> chores, yes... laundry needs doing soon or I will have trouble
12:41:57  *** Wormnest_ has quit IRC
12:45:10  <nielsm> anything you do has to deal with stupid situations like
12:45:35  <nielsm> and you can imagine even longer spiral situations
12:48:43  *** WormnestAndroid has quit IRC
12:49:04  *** WormnestAndroid has joined #openttd
12:50:03  *** HerzogDeXtEr has joined #openttd
12:53:09  <crazystacy> well typically you don't have *ports* up canals?
12:54:16  <FLHerne> crazystacy: There are some quite large ports up canals ;-)
12:54:26  <FLHerne> (and used to be more)
12:59:17  <crazystacy> ok :P
12:59:55  <crazystacy> is there some easy way to get the individual station platforms from AI? or do i have to go there and search them out/
13:00:36  <nielsm> there isn't really anything that keeps track of "platforms"
13:01:14  <crazystacy> ok. but i can finda station, then inspect the tiles where it is to see how the platforms look?
13:01:22  <FLHerne> Salford Quays used to be huge (and they're currently building/planning a new container terminal a bit further down)
13:01:25  <nielsm> that should be possible
13:01:37  <crazystacy> either that, or save every station i create
13:01:48  <crazystacy> save information about*
13:02:10  <crazystacy> isn't salford that town in that song
13:02:19  <FLHerne> Which song?
13:02:22  <crazystacy> dirty old town
13:02:34  <andythenorth> nielsm: I'm wondering if there's a 'good enough' heuristic that approximates the size of the enclosed area
13:02:45  <andythenorth> absolute connection to map edge isn't necessary
13:02:58  <FLHerne> Apparently so
13:03:38  <nielsm> well you coud probably make a tile-count-limited flood fill
13:04:26  <nielsm> i.e. it searches for having at least N reachable water tiles, and if it finds that number or reaches an edge water tile succeeds
13:04:41  <nielsm> that should be reasonably bounded in execution time
13:05:02  <Pikka> crazystacy, are you writing an AI?
13:05:06  <crazystacy> yes
13:05:26  <crazystacy> do i have to put x = null; in class ABC { x = null; constructor () { x = 123; }} ?
13:05:53  <nielsm> I believe yes, to have it declared as a field of the class
13:05:59  <crazystacy> ok
13:06:23  <_dp_> some random sampling should be decent for area approximation
13:06:53  <andythenorth> if it occasionally fails on pathological cases, like a lake with weird islands in it
13:06:56  <andythenorth> probably fine tbh
13:07:17  <andythenorth> it's eye candy improvement to industry placement, not critical
13:07:48  <andythenorth> @calc 32^2
13:07:48  <DorpsGek> andythenorth: Error: Something in there wasn't a valid number.
13:07:55  <andythenorth> @calc 32 * 32
13:07:55  <DorpsGek> andythenorth: 1024
13:08:03  <crazystacy> what does a newgrf have access to when it's placing industries?
13:08:08  <crazystacy> is it gamescript?
13:08:26  <andythenorth> @calc 32 * 84
13:08:26  <DorpsGek> andythenorth: 2688
13:08:33  <nielsm>
13:08:40  <nielsm> newgrf is arcane :D
13:08:53  <andythenorth> for FIRS, it probably wants about 2048 water tiles in a lake before allowing ports
13:09:02  <crazystacy> aha. there is an AITileList_StationType
13:09:04  <andythenorth> I've got one in my current game on about 2.5k tiles
13:09:20  <crazystacy> i am sure i saw one in a tiny lake :P
13:09:32  <andythenorth> it happens often, it looks stupid
13:10:22  <andythenorth>
13:12:08  <crazystacy> that looks like the screen from some tactical nuke control panel
13:12:17  <crazystacy> don't nuke salford
13:13:05  <andythenorth> so how long to search for 2048 contiguous tiles, then return true or false?
13:13:47  *** Flygon has quit IRC
13:14:43  <nielsm> hmm worst case you have to visit 8192 tiles or a little more, I think, if all the tiles are in a row in the worst possible pattern for the search order
13:15:06  <nielsm> and then you're affected by constants that depend on the total map size due to memory cache lines
13:16:23  *** mikegrb has joined #openttd
13:17:22  <nielsm> maybe I should go forward with NoLandscapeArray ideas
13:17:46  <nielsm> move the landscape to a bunch of blocks instead, that will potentially give more memory locality for looking at tiles near each other
13:17:51  <crazystacy> isn't is 2048 * 3 if you mean it has to check each adjacent tile for water?
13:17:59  <crazystacy> - in a straight line
13:18:15  <nielsm> right, yeah
13:18:37  <crazystacy> i was thinking about keeping a list of "bodies" of water and update them whenever you terraform
13:18:50  <crazystacy> if the tile you lower is touching 2 bodies, you can add them together, etc
13:18:54  * andythenorth looks for some known method
13:19:01  <nielsm> that'll require some funky algorithms/data structures I think
13:19:04  <andythenorth> it's just like a contiguous flood fill
13:19:15  <crazystacy> it does remind me of a data structure, not sure which
13:19:19  <crazystacy> i think some set type
13:19:20  <nielsm> that kind of things you could do research on as a computer scientist
13:19:23  <andythenorth> photoshop does it for pixels :P
13:19:34  <andythenorth>
13:20:02  <crazystacy> i don't know if you are wanting to go in there and really jam your hands into the landscape code but
13:20:03  *** glx has joined #openttd
13:20:03  *** ChanServ sets mode: +v glx
13:20:47  <andythenorth> hmm
13:23:06  <_dp_> dsu is a good structure for fast joining
13:23:15  <_dp_> not so much for splits though
13:25:40  <crazystacy> DSU was the one
13:28:01  <crazystacy> well the only point was that it would be a constant time operation to check which body we are in and get the attributes of it (map edge-connected, landlocked, whatever). and only have to do flood fills when the world is changed
13:28:03  <andythenorth> needs to be fast enough to run as an industry tile var during industry creation cb
13:28:16  <andythenorth> subsequent calls on related tiles could maybe be cached :P
13:28:25  <crazystacy> after mapgen you wouldn't have to do any flood filling until someone changes the map
13:31:16  <nielsm> hmm... I'm thinking whether the way I make industry placement check callback access water depth right now is really the right way
13:31:42  <andythenorth> o_O
13:32:00  <nielsm> same as the height/slope var, give a +-7 tiles x/y offset to look at a tile and get its depth
13:32:32  <nielsm> but maybe the better would be to just check all tiles in the selected layout for depth and offer a var with the max/min depth found in the covered tiles
13:33:22  <andythenorth> I see no problem with that
13:33:41  <andythenorth> I wouldn't design industries where different tiles have different depth requirements
13:33:42  <andythenorth> others might
13:34:02  <nielsm> industry tiles on the map don't store depth either, so the depth-for-tile var wouldn't be usable after construction either, but storing the min/max depths as a property in the industry structure would allow grf to check it later
13:34:17  <nielsm> and could make restoring the water when the industry is removed easier
13:34:20  <andythenorth> can depth be changed under the industry?
13:34:33  <nielsm> not right now
13:35:28  *** crazystacy has quit IRC
13:35:54  <andythenorth> can't see why it would be needed
13:36:31  *** Pikka has quit IRC
13:41:34  *** Samu has joined #openttd
13:43:18  <Samu> hi
13:46:57  *** Thedarkb has quit IRC
13:48:23  *** sla_ro|master has joined #openttd
13:53:26  *** crazystacy has joined #openttd
13:53:37  <crazystacy> class A { function b () {} } b is static?
13:53:55  <crazystacy> ok i will read the manual :p
13:55:22  <nielsm> read the pdf version of the squirrel language reference, the html version has terrible formatting
13:56:24  *** Wormnest_ has joined #openttd
13:56:26  <crazystacy> yeah i noticed
13:56:38  <crazystacy> it had to touch the screen with my nose to read the text
14:07:00  *** MarkS- has joined #openttd
14:08:15  <MarkS-> Hello, what is the best documentation (example/howto if possible) to follow to create some own/custom newgrf? I couldn't find information about how to do it
14:09:08  <nielsm> if what you want to make can be made with NML, that's probably the best place to start
14:12:17  <Samu> found a nasty very buggy behaviour about my permanent rivers :p
14:12:43  <Samu> if there was a ship on the river and u build a dock there, BAM ship! lol
14:12:56  <Samu> buried below the dock
14:13:05  <crazystacy> nice
14:13:14  <crazystacy> the griefing continues
14:13:28  <crazystacy> tbh that needs to be a patch. OpenTTD: Battleships
14:13:35  <Samu> then openttd crashes because pathfinder complains
14:13:41  <crazystacy> remov eit
14:14:52  <Samu> i'm still not sure where i place this piece of code
14:14:54  <Samu> 			if (IsRiver(tile) && _game_mode == GM_NORMAL && ! && !_cheats.magic_bulldozer.value) {
14:14:54  <Samu> 				return CommandCost();
14:14:54  <Samu> 			}
14:15:30  <Samu> can't be inside DC_EXEC
14:15:35  <Samu> can't be outside it
14:15:51  <Samu> if it's inside, it will complain about costs not matching
14:15:58  <Samu> DC_TEST vs DC_EXEC
14:16:15  <Samu> if it's outside, I'm making it not even go through DC_EXEC
14:21:36  <crazystacy> what is TileIndex? len 2 array?
14:21:58  <crazystacy> or just an int?
14:25:55  <DorpsGek_III_> [OpenTTD/OpenTTD] SamuXarick updated pull request #7937: Build on competitor canal
14:26:34  <Samu> now it ensures there's no ship on the tile
14:26:38  <Samu> hue
14:26:50  <Samu> the order of these checks seriously matter
14:26:59  <crazystacy> yay
14:27:13  <crazystacy> next stable release i'll go on reddit vanilla and cover the world in canals
14:27:17  <crazystacy> they'll fear my canals.
14:29:02  *** Thedarkb has joined #openttd
14:31:08  * andythenorth sleepy
14:33:44  <Samu>
14:33:52  <Samu> now it's located just before DC_EXEC
14:33:59  <MarkS-> nielsm: thank you for the NML pointer (reading about it)
14:39:29  <Samu> i need to make sure i can pass INVALID_OWNER to MakeWaterKeepingClass
14:39:46  <Samu> it should never happen, but who knows...-
14:40:02  <Samu> im a terrible coder yet
14:40:20  <Samu> I can't pass* terrible typo
14:43:53  <Samu> funny, I just tested and I'm really passing INVALID_OWNER to it, lol I wonder how's it dealing with it atm
14:45:00  *** Pikka has joined #openttd
14:48:41  <crazystacy> hmm. does anyone else use squirrel.vim for Vim?
14:49:04  *** Wormnest_ has quit IRC
14:54:46  *** Mazur has joined #openttd
15:00:45  <Samu> it's handling it really well actually
15:00:56  <Samu> in short, doesn't even look at the owner
15:03:49  <Samu> AIs are squirrels
15:05:36  <Samu> must check what kind of owner does it get with original code
15:09:25  <Samu> heh, original code gets Company 1 as owner, but then it also doesn't do anything with it
15:11:16  <Samu> so, in short... whatever owner it's there, as long as it's not canal, doesn't matter
15:11:24  <Samu> my code is thus, fine
15:59:13  <crazystacy> that AI script debug red font is a pleasure to read...
16:00:13  <Samu> god damn visual studio, don't force me to buy an SSD
16:00:24  <peter1138> It doesn't make it any faster...
16:00:52  <Samu> i see dockingtile code is in my way now
16:01:05  <peter1138> That's positive.
16:03:26  <Samu> im not sure how to handle that bool remove
16:03:34  <Samu> if i am to keep rivers
16:05:21  *** crazystacy has quit IRC
16:07:24  <_dp_> damn, I can fix sprite sorter being cubic but apparently it's comparisons that usually take the most time and they're quadratic already
16:08:12  *** Thedarkb has quit IRC
16:10:07  <peter1138> I'm sure "that bool remove" means something to someone, but not to me.
16:12:29  <andythenorth> is it nap time?
16:12:38  <peter1138> Isn't it always?
16:13:01  <andythenorth> my nap skills are poor
16:13:06  <andythenorth> I do it wrong
16:17:08  *** crazystacy has joined #openttd
16:17:27  <crazystacy> north == -1:-1 or?
16:17:46  <crazystacy> RAILTRACK_NE_SW  // Track along the x-axis (north-east to south-west)
16:17:50  <crazystacy> surely that is along the Y axis
16:18:04  <crazystacy> if NE is 0:-1 and SW is 0:1
16:23:48  <Samu> i hear my HDD doing rararararraaraararararara
16:24:57  <peter1138> It's 2020, why would you not have an SSD anyway?
16:25:14  <Samu> im poor
16:25:38  <Samu> and i don't want a 256 gb SSD or 512
16:25:42  <Samu> i only settle with a 1 tb
16:27:28  <crazystacy> you can do the classic 50 gb ssd + big HDD
16:27:33  <crazystacy> put OS on ssd and files on HDD
16:29:47  <Samu> dockingtile versus restoring river when demolishing canal
16:29:53  <Samu> peter1138,
16:30:27  <Samu> MakeRiver has a SetDockingTile
16:30:49  <Samu> it would be weird to have it RemoveDockingTile afterwards
16:30:53  <Samu> but i'm not sure
16:33:30  *** Pikka has quit IRC
16:55:22  *** Thedarkb has joined #openttd
17:01:45  *** Thedarkb has quit IRC
17:23:33  <crazystacy> tunnels crossing each other is an amazing cheat
17:23:37  <crazystacy> was the original TTD like that?
17:26:30  <peter1138> Mandalorian is quite good.
17:27:33  <crazystacy> it is very good
17:27:51  <andythenorth> is it the Dark Tower, but in Star Wars?
17:28:01  <nielsm> crossing tunnels was never possible in vanilla TT
17:28:01  * andythenorth reading about it
17:28:17  <nielsm> was added by ttdpatch relatively early
17:29:05  <crazystacy> was ttdpatch before openttd?
17:29:10  <nielsm> yes
17:29:16  <crazystacy> cause i saw on its feature page it had lots of fancy features openttd also has
17:29:17  <crazystacy> ah ok
17:30:06  <peter1138> Well. It's got Baby Yoda. And droids.
17:30:39  <andythenorth> I failed at napping
17:31:37  <crazystacy> peter1138, did you see the mudhorn yet?
17:34:40  <peter1138> I've not watched it all yet.
17:39:52  <crazystacy> ok :P
17:48:24  *** Heili has joined #openttd
17:58:29  *** Heiki is now known as Heisi
17:58:29  *** Heili is now known as Heiki
18:01:15  *** snail_UES_ has joined #openttd
18:04:49  <andythenorth> hi snail_UES_
18:05:06  <snail_UES_> hey andythenorth
18:21:21  <Samu> what's your decision on 7944/7946
18:22:49  <Samu> I believe I got my Permanent Rivers ready, but is depending 7946 whether it's going to be merged
18:23:04  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
18:27:01  <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
18:29:52  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
18:35:11  <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
18:45:33  <TrueBrain> glx: I am not really worried about the commits in the pull-request itself, more about how many commits they are behind master .. can be tricky to find how high fetch-depth you need to find the commit in the master-tree
18:46:06  <glx> well the commits in the pull request are needed for the commit check :)
18:46:26  <TrueBrain> yeah, but you can't tell if they are part of the master, till you also have seen the history of master
18:46:37  <TrueBrain> so you need to increase the depth of both
18:46:59  <TrueBrain> too bad the merge commit doesn't tell FROM where it started
18:47:19  <glx> working from the merge I can easily get the list
18:47:49  <TrueBrain> not sure what you mean, but fiddle away :)
18:48:01  <TrueBrain> what a good alternative might be, to simply use shallow-since, and set it to one week or so
18:48:15  <TrueBrain> and just bail out if someone makes a PR that is older than 1 week on the master
18:48:26  <TrueBrain> that could nicely ask for a rebase :D
18:49:07  <glx> what about very old PRs still up-to-date with master ?
18:49:10  <TrueBrain> hmmmmmm ... why not use the GitHub API, I wonder ...
18:49:38  <TrueBrain> don't know why I didn't think of that earlier ... GitHub does all this complex logic for us
18:51:49  <TrueBrain> we can do two things: port that script to work directly on the GitHub API, or use the GitHub API to get the parent of the first commit in the PR :)
18:51:54  <TrueBrain> the latter is the easiest, I guess
18:56:35  <peter1138> Did we cmake yet?
19:00:39  <TrueBrain> documentation for GraphQL is ..... special
19:03:21  <TrueBrain> curl ... -d '{"query": "query { repository(owner: \"OpenTTD\", name:\"OpenTTD\") { pullRequest(number: 7270) { commits(first: 1) { nodes { commit { parents(first: 1) { nodes { oid } } } } } } } }"}' | jq .data.repository.pullRequest.commits.nodes[0].commit.parents.nodes[0].oid
19:03:27  <TrueBrain> well, it does fit on a single line, I guess
19:05:15  <TrueBrain> owh, this can be done easier
19:07:57  *** crazystacy2 has joined #openttd
19:14:07  *** crazystacy has quit IRC
19:19:21  *** crazystacy2 has quit IRC
19:34:17  *** syr has quit IRC
19:34:48  *** syr has joined #openttd
19:38:05  <TrueBrain> glx:
19:38:26  <TrueBrain> the only drawback is, that if someone pushes new commits BEFORE the curl has taken place, it can report on the wrong set of data
19:38:31  <TrueBrain> but ... yeah ...
19:39:02  <TrueBrain> runs in 10 seconds :o
19:39:07  <TrueBrain> that is a huge improvement over the current :P
19:41:48  <TrueBrain> owh, I think I need to fetch one more commit
19:41:58  <TrueBrain> as otherwise the diff of the first commit is not possible ofc :D
19:42:07  <TrueBrain> or is it ..
19:44:06  <TrueBrain> no, it is not :D
19:44:08  <TrueBrain> makes sense
19:51:03  <DorpsGek_III_> [OpenTTD/workflows] TrueBrain opened pull request #2: Fix: also support the 'new_pullrequest' trigger
19:51:30  <DorpsGek_III_> [OpenTTD/workflows] TrueBrain merged pull request #2: Fix: also support the 'new_pullrequest' trigger
19:53:25  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain opened pull request #7948: Move commit checker from Azure Pipelines to Github Actions
20:08:03  *** crazystacy2 has joined #openttd
20:15:32  <Samu> what is newgrf_canal.cpp ? I suppose I need to add some functionality there ?
20:18:36  <TrueBrain> @random yes no
20:19:09  <glx> the filename seems explicit to me :)
20:21:13  <Samu>
20:23:07  <Samu> this link doesn't work
20:24:25  <TrueBrain>
20:32:32  *** Mazur has quit IRC
20:35:04  <Samu> it's here:
20:36:31  <glx> the link won't help you, it's a asm source file :)
20:42:24  <glx> Samu:
20:42:36  <glx> but as said it's probably unreadable for you :)
20:43:41  <Samu> eww i see
20:44:03  <snail_UES_> so andythenorth, done any extra work on your steamers yet?
20:44:10  <andythenorth> nah
20:44:29  <andythenorth> 42 other trains to draw first :P
20:44:43  <andythenorth> done any french diesel/electrics yet?
20:45:00  <snail_UES_> wow! 42 more engines to add to your set?  :O
20:45:21  <snail_UES_> nope not yet. I guess I’m going to do steamers only for the next couple of years…
20:45:31  <snail_UES_> I’ve got a ton to draw (or fix) and I want to get the hang of it
20:47:16  <andythenorth> 42 is mostly wagons :P
20:47:28  <andythenorth> I am considering Euro Horse :P
20:47:44  <snail_UES_> Continental European trains?
20:47:51  <andythenorth> yep, mixed up
20:48:30  <snail_UES_> it’d be hard to make a “balanced” set. Each player would like to have trains from their country :p
20:48:41  <andythenorth> it's ok, I'm only designing for one player :P
20:48:47  <snail_UES_> hahaha
20:48:52  <andythenorth> Nez cassés
20:48:55  <andythenorth> TGV poste
20:48:58  <andythenorth> Krokodil
20:49:09  <snail_UES_> “best of breed”?
20:50:07  <andythenorth> probably
20:50:15  <snail_UES_> you could put a “basic block” of French and German trains, plus some Italian and Swiss electrics, Dutch MUs...
20:50:41  <snail_UES_> early Austrian steamers are cool too
20:52:30  <andythenorth> I could include that high-speed SNCF freight train that uses covered vans at 125mph or so
20:52:38  <andythenorth> not le post TGV, there's another one :P
20:52:55  <snail_UES_> is there one? do you have a link?
20:54:33  <Samu> i'm completely clueless about NewGRF code
20:54:37  <Samu> feels like a new world
20:56:35  <andythenorth> snail_UES_: MVGV 200 (Messagerie à Grande Vitesse )
20:57:03  <andythenorth>
20:57:12  <andythenorth> the speed it passes other freight trains...
20:58:07  <andythenorth>
21:01:56  <snail_UES_> well but it’s not freight, it’s mail
21:02:55  <andythenorth> makes sense
21:03:05  <andythenorth> my translator suggested parcels/ packages
21:03:39  <snail_UES_> yep…
21:07:34  *** crazystacy has joined #openttd
21:09:16  <peter1138> OpenTTD or... Heretic in GZDoom?
21:09:55  *** crazystacy has quit IRC
21:10:21  <crazystacy2> messagerie lol
21:10:25  <crazystacy2> that's a great wor
21:10:26  <crazystacy2> d
21:12:24  <andythenorth> peter1138: both?
21:12:49  <peter1138> I need to let my dinner settle before multitasking
21:31:21  *** andythenorth has quit IRC
21:34:29  *** andythenorth has joined #openttd
21:34:31  <andythenorth> oops I forgot to have chocolate
21:34:56  <peter1138> Solid or liquid?
21:35:09  <peter1138> Have you got an array of Apple Pro Display XDR yet?
21:36:03  <andythenorth> ouch
21:36:12  <andythenorth> solid
21:36:16  <DorpsGek_III_> [OpenTTD/OpenTTD] JMcKiern opened pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window.
21:37:26  <peter1138> Hugh :-)
21:39:45  <peter1138> I could have chocolate. I had banana and blueberries.
21:44:18  <peter1138> 71% dark from... Aldi :p
21:47:11  <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro approved pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window.
21:47:30  *** snail_UES_ has quit IRC
21:47:42  <LordAro> wish we had some sort of compile time thing for providing the correct number of parameters to strings
21:48:27  *** Wolf01 has quit IRC
21:48:29  <milek7_> runtime assert wouldn't be more doable?
21:48:38  <LordAro> well, perhaps
21:48:57  <LordAro> but that's harder to confirm correctness
21:48:59  <DorpsGek_III_> [OpenTTD/OpenTTD] JMcKiern commented on pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window.
21:52:06  <TrueBrain> LordAro: LGTM might allow to validate these things
21:52:41  <TrueBrain> Needs some preprocessing, but possibly it can be done
21:54:22  *** andythenorth has quit IRC
21:55:52  <peter1138> Compile-time would depend on the string being constant, which isn't always the case.
21:58:07  <TrueBrain> Not sure if that is true. But we first need to be able to load our project in LGTM to experiment :)
21:58:33  <TrueBrain> Hurry up with 1.10! :p :p
22:01:10  *** andythenorth has joined #openttd
22:05:54  <DorpsGek_III_> [OpenTTD/OpenTTD] nielsmh merged pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window.
22:05:55  <DorpsGek_III_> [OpenTTD/OpenTTD] nielsmh closed issue #7927: Giant screenshot warning reports incorrect dimensions of screenshot
22:05:55  <crazystacy2> hm. maybe i'm better off just using an AI library right away. would save time. anyone have a recommendation?
22:09:40  <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro commented on pull request #7947: Fix #7945: Add cost of clearing the sloped tile when placing a dock
22:12:32  <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro commented on pull request #7890: Fix #6452: Reset only editable and visible settings from GUI
22:13:06  *** sla_ro|master has quit IRC
22:13:29  <LordAro> andythenorth: feel like playing with #7886 at all?
22:14:59  * andythenorth looks
22:15:07  <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 updated pull request #7943: Move commit checker from Azure Pipelines to Github Actions
22:15:58  *** nielsm has quit IRC
22:22:13  <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro requested changes for pull request #7886: Group management enhancements
22:25:49  <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro requested changes for pull request #7859: Feature #7756: Allow server to supply a reason to kicked/banned clients
22:26:48  <peter1138> Hi
22:26:52  <LordAro> o/
22:26:56  <peter1138> So...
22:26:57  <peter1138> I have master...
22:27:00  <peter1138> Now what?
22:27:25  <LordAro> ?
22:32:49  <peter1138> Anything more pressing?
22:33:15  <LordAro> ¯\_(ツ)_/¯
22:33:22  <peter1138> Hmm, just finished off some nuts... you can tell I stopped carolie counting... :s
22:33:24  <LordAro> one of those is milestoned for 1.10...
22:33:43  <peter1138> Eh, that's the one that causes performance issues for some.
22:35:05  <TrueBrain> glx: guess we need to battle which solution is best :p guess others have to be the judge :D
22:35:13  <glx> hehe
22:35:54  <glx> for now I use depth 3 but it can be increased
22:36:00  <TrueBrain> Mine depends on their API, yours can hammer their server for a while
22:36:27  <glx> depth 3 is ok for PR with only 1 commit
22:36:38  <TrueBrain> And on a recent master
22:36:59  <glx>
22:37:03  <TrueBrain> I am most worried about that btw
22:37:09  <glx> this test is not on latest master
22:37:59  <glx> but as it's using the merge it's always on latest master, unless it's not mergeable and github tells it
22:38:31  <TrueBrain> There can be many commits before deepen gives a hit
22:39:11  <glx> deepen just adds commits
22:40:14  <TrueBrain> deepening
22:40:19  <TrueBrain> some letters fell off there
22:40:53  <glx> git rev-list --reverse HEAD^..HEAD^2 should take care of that
22:41:01  <TrueBrain> not what I mean
22:41:10  <TrueBrain> it can take a long time before it read enough commits to find a common point
22:41:24  <glx> deepen doesn't search for common point
22:41:52  <glx> it just increase depth
22:41:56  <TrueBrain> I love how sometimes we can talk to each other, but not understand what we are saying :)
22:42:21  <TrueBrain> your while loop, is trying to find a common parent, right?
22:42:59  <glx> no, my loop just search for the full commit list as given by git rev-list
22:43:28  <TrueBrain> that is what it is executing
22:43:30  <TrueBrain> but it is doing something
22:43:40  <TrueBrain> your comment suggests it is finding a common parent of HEAD^1 and HEAD^2
22:44:46  <glx> the check for parent is just to check we are not on a grafted one
22:44:55  <DorpsGek_III_> [OpenTTD/OpenTTD] stormcone commented on pull request #7886: Group management enhancements
22:45:04  <glx> my comment is probably not good :)
22:45:16  <TrueBrain> that can be the other conclusion, yes ;)
22:46:20  <TrueBrain> so what is it doing? (and don't tell me the actions you perform; I want to know what you think it is doing)
22:46:35  <TrueBrain> because "search for full commit list" is not something I can proces :D
22:46:54  <TrueBrain> you have 2 parts of a tree, ^1 and ^2 .. what are you doing to them :)
22:47:14  <LordAro> is there a better way to strip out a string's size formatting?
22:48:21  <DorpsGek_III_> [OpenTTD/OpenTTD] stormcone commented on pull request #7886: Group management enhancements
22:49:06  <glx> part ^1 is the latest master, ^2 is the merged branch
22:50:09  <glx> in an unshallowed checkout git log or git rev-list shows all commits from ^2 on top of ^1
22:51:02  <glx> basically without specifying a range you get merge, PR commits list, master commits list
22:51:57  <glx> in shallowed checkout each list can be incomplete
22:52:44  <glx> log shows merge, PR commit 1, PR commit 2 [grafted], master commit 1, master commit 2 [grafted]
22:53:42  <glx> so with rev-list HEAD^..HEAD^2 I get PR commit1, PR commit 2
22:54:24  <glx> the loop checks the latest commit on the list is not a grafted one
22:54:44  <TrueBrain> okay, so maybe you did not realise this, but basically you are looking for the first parent they have in common :)
22:55:23  <TrueBrain> (as soon as the parent of the inner rev-list last entry (or first as you reversed it) is valid, that is the first parent of both master and the pull-request)
22:55:40  <TrueBrain> the problem is, one of your assumptions is not correct: a merge does not do: merge, PR, PR, master, master
22:55:47  <TrueBrain> it can as well do: merge, master, master, master, PR, PR
22:55:52  <TrueBrain> 7270 is a nice example where this happens
22:56:08  <TrueBrain> and the older a pull-request is, the longer the list is
22:56:24  <TrueBrain> so my worry is, that you are not only deepening to get through the PR commits, but also a part of the master list
22:56:28  <glx> oh I can test that locally
22:56:34  <TrueBrain> I just did ;)
22:56:37  <glx> I just need to get the merge SHA
22:56:54  <TrueBrain> git -c protocol.version=2 fetch --no-tags --prune --depth=3 origin refs/pull/7270/merge
22:57:06  <TrueBrain> but okay, your rev-list entries can be replaced with "git merge-base FETCH_HEAD^ FETCH_HEAD^2"
22:57:19  <TrueBrain> as it does exactly what you invented yourself :D Check for the first common parent :P
22:57:28  <TrueBrain> (even the result is the same :D)
22:57:47  <LordAro> what does protocol.version=2 do?
22:57:51  <TrueBrain> new git protocol
22:57:57  <TrueBrain> allows more stuff
22:58:04  <TrueBrain> in this case not needed; but needed for some new commands
22:58:22  <TrueBrain>
22:58:24  <TrueBrain> pretty neat
22:58:39  <TrueBrain> (lot faster)
22:58:43  <DorpsGek_III_> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7890: Fix #6452: Reset only editable and visible settings from GUI
22:59:44  <TrueBrain> glx: between 12 and 15 depth, 7270 finds the first parent.  The PR is only 9 commits (and it fetches 27 commits at that point in time)
23:00:04  <TrueBrain> so I am guessing the "deepen" is deepening both branches of the tree .. not sure :)
23:00:23  <glx> yes deepen works on both branches
23:00:37  <TrueBrain> that is funny
23:00:38  <glx> like depth
23:00:51  <TrueBrain> anyway, my main worry with your solution is, that we could be hammering the server for a while
23:01:00  <TrueBrain> not sure if that is a good or bad thing
23:01:27  <TrueBrain> my solution only does 3 calls in total, no matter what. But uses a non-git source to get the data (which has its own risks)
23:01:45  <glx> can be mitigated by increasing initial depth and deepen
23:01:45  <TrueBrain> say someone makes a PR that does merge but has no common parent, it will be fetching all commits
23:01:55  <TrueBrain> no, only increasing won't help
23:02:00  <TrueBrain> but doing a *= 2 every time does
23:02:02  <TrueBrain> but even then
23:02:36  <TrueBrain> a 'git merge' is a strange thing
23:02:40  <TrueBrain> it is nothing what I thought it was
23:02:48  <TrueBrain> (I learnt way too many details about git today :P)
23:06:26  <crazystacy2> arrays: "index 'find' does not exist"
23:06:32  <crazystacy2> i used the find function before O_o
23:07:34  <peter1138> Hmm, well, that's the second episode of Heretic completed. 3 more to go.
23:07:49  <DorpsGek_III_> [OpenTTD/OpenTTD] SamuXarick updated pull request #7947: Fix #7945: Add cost of clearing the sloped tile when placing a dock
23:11:44  *** Samu has quit IRC
23:12:54  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions
23:13:08  <TrueBrain> glx: okay, I think yours is easier to maintain .. just getting the numbers right will be interesting :D
23:14:59  <TrueBrain> doing at most 7 calls is fine I guess .. not much anyone can complain about that tbh
23:15:10  <TrueBrain> the server clearly caches the merge result, so meh
23:16:17  <glx> and it's still better than using fetch-depth:0
23:17:06  <TrueBrain> especially in the most common case :) From 1+ minute to 10 seconds
23:17:27  <TrueBrain> my GitHub API solution is even faster, but .... it could potentially be wrong
23:17:50  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7948: Alternative: move commit checker from Azure Pipelines to Github Actions
23:17:50  <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain closed pull request #7948: Alternative: move commit checker from Azure Pipelines to Github Actions
23:18:44  <glx> and it's probably very rare to update a very old PR without rebasing first, same for opening I guess
23:19:19  <TrueBrain> I do see happening that people create PRs against the wrong base, but .. if it takes a bit longer in those cases, I am fine with that
23:30:46  <DorpsGek_III_> [OpenTTD/OpenTTD] stormcone updated pull request #7886: Group management enhancements
23:34:22  <andythenorth> is it sleeping?
23:34:27  * andythenorth woke up at 3am
23:34:30  <andythenorth> such sleep!
23:34:31  *** andythenorth has left #openttd
23:36:53  <DorpsGek_III_> [OpenTTD/OpenTTD] stormcone commented on pull request #7886: Group management enhancements
23:38:22  <DorpsGek_III_> [OpenTTD/OpenTTD] stormcone commented on pull request #7886: Group management enhancements
23:44:06  <crazystacy2> hm, removebottom doesn't work as expected
23:48:07  *** nielsm has joined #openttd
23:53:29  <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro commented on pull request #7890: Fix #6452: Reset only editable and visible settings from GUI
23:55:10  <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 updated pull request #7943: Move commit checker from Azure Pipelines to Github Actions
23:59:45  <TrueBrain> glx: your comment block is formatted weird :P It is not a sentence per line, and it is also not a prefixed width
23:59:49  <TrueBrain> MY OCD IS HITTING HERE :P

Powered by YARRSTE version: svn-trunk