Times are UTC Toggle Colours
00:02:12 <peter1138> I guess andy didn't want to fix his PR :( 00:04:37 * nnyby drinks a brooklyn lager 00:05:36 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7306: Add: Chrono based TIC() and TOC() in debug https://git.io/fhhWH 00:05:50 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7306: Add: Chrono based TIC() and TOC() in debug https://git.io/fhA6p 00:06:03 * nielsm sips a bit of limoncello 00:06:09 <Samu> best station was receiving 6 coal periodically, maintaining the same ratio 00:06:17 <Samu> erm, rating* 00:06:20 <Samu> 67% 00:06:29 <peter1138> const char _openttd_revision[] = "r2234M"; 00:06:34 <peter1138> Hmm, that's a fairly old version 00:06:51 <Samu> the other station had a low rating of 30% percent, was receiving 1 coal periodically, but it started raising 00:07:11 <Samu> over time the best station started to receive less 00:07:14 *** Thedarkb-T60 has joined #openttd 00:07:15 <Samu> 5 coal 00:07:24 <Samu> as the other increases rating 00:07:30 <Samu> is this intended? 00:08:30 <Samu> I suppose it is, I'm a bit rusty in maths 00:09:33 <nielsm> Samu: That was difficult to understand what you mean 00:09:37 <Samu> the way I had it, if I recall, the rating of the nearby stations would not impact the amount delivered to the best station 00:09:47 <Samu> until it was surpassed 00:10:45 <Samu> best station: 67% rating, 6 coal per period 00:10:59 <Samu> other station: 30% rating, 1 coal per period 00:11:16 <Samu> other station puts a vehicle full loading, rating increases slowly 00:11:29 <Samu> best station maintains a stable 67% rating 00:11:54 <Samu> however, 6 coal is reduced to 5 coal at some point, when rating of the 2nd station gets to... i dunno 50% 00:15:08 <Eddi|zuHause> peter1138: nah, still same century :p 00:15:35 <nielsm> it's difficult to hit the right distribution ratio when the number of discrete items to distribute is low, as it typically is with any cargo production 00:16:45 <nielsm> you can try to smooth other the difference by keeping some kind of counter for how much was distributed to each recipient, but when the parameters controlling the distribution change all the time you need to also limit how far back the counter goes 00:17:11 <nielsm> and it becomes a really difficult puzzle to make it look any kind of fair 00:17:51 <nielsm> that may also be part of the reason the original algorithm only considers at most two stations: to avoid too much unfairness by rounding of very few items of cargo 00:18:15 <Samu> the amounts are multiplied by 255 00:18:29 <Samu> fractored into a byte 00:18:59 <Samu> fractured* 00:19:26 <nielsm> you still can't distribute two-thirds of a unit of goods to a station 00:20:00 <Samu> there is a remainder 00:20:22 <Samu> it's... amount_fract 00:20:33 <Samu> Fractional part of the amount in the cargo list 00:22:17 <DorpsGek_II> [OpenTTD/OpenTTD] michicc commented on pull request #7245: Remove: OPF https://git.io/fhhlf 00:24:31 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7245: Remove: OPF https://git.io/fhhlI 00:25:46 <peter1138> ./oldhome/petern/.openttd-old/data/metro/sprites/metro.nfo 00:25:54 <peter1138> That looks like a likely railtype grf :D 00:27:28 *** nielsm has quit IRC 00:30:18 <Eddi|zuHause> lots of "old" 00:30:51 <Eddi|zuHause> beware of https://xkcd.com/1360/ 00:32:15 *** synchris has quit IRC 00:35:31 <Samu> gonna investigate what it was like before 00:41:19 <Samu> oh, I was wrong 00:42:13 *** Progman has quit IRC 00:42:22 <Samu> 5 (70%), 6 (83%) 00:42:32 <Samu> 2 (18%), 9 (83%) 00:45:13 *** Gustavo6046 has quit IRC 00:45:20 <Samu> with nielsm: 4 (70%), 7 (83%) 00:46:11 <Samu> with nielsm: 1 (18%), 10 (83%) 00:46:21 <Samu> averages 00:49:55 <Samu> why was I wrong? 00:50:40 <Samu> I used to be good at math, why am I so tragic now 00:54:00 <Samu> coal mine produced 12 coal 00:54:05 <Beerbelott> Are PR good for tiny changes? Or is it better to keep a commit in one's own GitHub fork and ask you to take it from there as part of bigger modifications sets? 00:54:21 <peter1138> PR is the only way. 00:54:35 <Beerbelott> Yup, but PR for single liners feels wrong somehow 00:54:39 <peter1138> Even the original core developers have to use PRs. 00:54:42 <Beerbelott> Wilco then 00:54:44 <peter1138> It's not wrong. 00:54:53 <Beerbelott> noted 00:55:05 <Samu> @calc 12 * (210 + 1) 00:55:05 <DorpsGek> Samu: 2532 00:55:29 <Samu> @calc 2532 / 255 00:55:29 <DorpsGek> Samu: 9.92941176471 00:55:58 <Samu> erm nop 00:56:15 <Samu> @calc 12 * (255 + 1) 00:56:15 <DorpsGek> Samu: 3072 00:56:37 <Samu> @calc 2532 / (255 + 1) 00:56:37 <DorpsGek> Samu: 9.890625 00:57:41 <Samu> whatever, so there is 2532 fractional coal amount to distribute between stations 00:58:46 <Samu> worst station got 18% rating or 48 01:00:06 <peter1138> Urgh, this devzone stuff doesn't build :s 01:00:42 <Samu> @calc 2532 * 48 * 48 / (48 * 48 + 210 * 210) 01:00:42 <DorpsGek> Samu: 125.71605896 01:01:39 <Samu> @calc 2532 - 125.71605896 01:01:39 <DorpsGek> Samu: 2406.283941 01:04:38 <Samu> @calc 2532 * 48 / (48 + 210) 01:04:38 <DorpsGek> Samu: 471.069767442 01:04:59 <Samu> @calc 2532 - 471.069767442 01:04:59 <DorpsGek> Samu: 2060.930233 01:13:27 <Samu> hmm I don't know if I like nielsm suggestion after all 01:13:44 <Samu> it's also changing the default behaviour for 2 stations 01:25:00 <Samu> in short, nielsm's approach actually benefits more the best rating station than my approach, than in the one in master 01:25:38 *** Supercheese has joined #openttd 01:26:19 <Samu> my approach does the same as master for 2 stations 01:27:04 <Samu> but the more stations there are, the less the best rating station gets 01:27:30 <Samu> less that nielsm's that is 01:27:56 <Samu> I don't know, I'm undecided 01:29:02 <Samu> less than* 01:33:32 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7184: Feature: Distribute cargo to multiple stations or industries https://git.io/fh9lr 01:35:31 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7184: Feature: Distribute cargo to multiple stations or industries https://git.io/fhh8c 01:36:20 <Samu> ow... conflicts 01:41:44 <DorpsGek_II> [OpenTTD/OpenTTD] Berbe opened pull request #7348: Fix: BaseMedia<Tbase_set>::AddFile searches for fullpaths instead of files https://git.io/fhh88 02:04:01 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7184: Feature: Distribute cargo to multiple stations or industries https://git.io/fh9lr 02:04:13 <Samu> DeliverGoodsToIndustry is changed all the time 02:11:32 <peter1138> Urgh, I need to modify nmlc to make this test work :( 02:17:29 <Samu> i need more tests 02:17:36 <Samu> i have 3 test cases 02:17:43 <Samu> wonder if i can open visual studio 3 times 02:18:08 <Eddi|zuHause> which part? 02:18:35 <peter1138> /bin/sh: 1: Syntax error: "(" unexpected 02:18:40 <peter1138> Hmm, I wonder where that is :p 02:19:07 <Eddi|zuHause> at 1: obviously :p 02:19:30 <Samu> stupid visual studio 02:19:39 <Samu> i changed branch in one, and the other followed 02:20:08 <glx> I like the CMake style, ")" expected at <last line of the file> 02:20:19 <Samu> I want to work with different branches at the same time 02:21:14 <glx> it's not visual studio's fault 02:21:40 <peter1138> `which unix2dos 2>/dev/null` 02:21:43 <peter1138> fails on my system 02:21:50 <peter1138> cos unix2dos outputs to stdout, not stderr. 02:21:52 <glx> you need to commit or stash before switching branches 02:22:23 <Samu> no, it's not that 02:22:28 <Eddi|zuHause> you can have two working copies... 02:22:34 <Samu> I want to run 3 different builds at the same time 02:22:44 <peter1138> You need 3 copies of the repo. 02:22:46 <Samu> master, my branch, and my other branch 02:23:10 <Samu> oh really? :( 02:23:25 <peter1138> Obviously. You can only be on one branch at a time. 02:23:54 <Samu> that kinda sucks 02:24:05 <Samu> duplicates of duplicates 02:24:08 <glx> it was the same with svn 02:24:58 <Samu> wow 6,20 GB? 02:25:04 <Samu> lol, i better clone from web 02:25:59 *** Thedarkb-X40 has joined #openttd 02:27:19 <glx> peter1138: I made a PR for one of your branches 02:28:43 <Samu> I just cloned my clone, cool stuff 02:33:10 *** Thedarkb-T60 has quit IRC 02:37:11 <Samu> I finally have a reason to get a better cpu 02:37:26 <Samu> building 3 openttds at the same time 02:44:20 <peter1138> Shit, I got X & Y wrong :( 02:51:03 <Eddi|zuHause> there's no XX and XY, it's all just social construct. 02:53:46 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7231: Add: Add flag and railtype sprite type to draw pre-combined ground sprites. https://git.io/fh71z 02:55:48 <peter1138> glx, yup, I saw, thanks. 02:56:19 <DorpsGek_II> [OpenTTD/nml] PeterN opened pull request #22: Add: New railtype flags and precombined spriteset type. https://git.io/fhh4q 02:59:59 <Samu> https://paste.openttdcoop.org/pnp04lwfn 2 stations only 03:02:13 <Samu> and thus is confirmed, mine mimics master when there's only 2 stations 03:04:51 <Samu> now i need to test more stations 03:04:53 <Samu> 3 03:05:04 *** debdog has joined #openttd 03:05:17 *** Wormnest has joined #openttd 03:08:24 *** D-HUND has quit IRC 03:17:22 *** Wormnest has quit IRC 03:25:33 <Samu> 3 stations: https://paste.openttdcoop.org/po46thby7 03:29:24 <Samu> too confusing to follow 03:36:50 <Samu> Samu: 642 (47%) / 991 (72%) / 1136 (83%) 03:36:50 <Samu> nielsm: 426 (47%) / 1012 (72%) / 1331 (83%) 03:36:50 <Samu> Master: 0 (47%) / 1290 (72%) / 1479 (83%) 03:37:26 <Samu> resumed ^^ 03:38:51 <Samu> those values are the fractional amounts 03:39:15 <Samu> aka multiplied by 256 03:39:49 <Samu> which approach is better? 03:42:56 *** Supercheese has quit IRC 03:43:17 *** Supercheese has joined #openttd 03:51:34 *** glx has quit IRC 03:53:09 *** tokai has joined #openttd 03:53:09 *** ChanServ sets mode: +v tokai 03:59:56 *** tokai|noir has quit IRC 04:03:44 *** D-HUND has joined #openttd 04:07:09 *** debdog has quit IRC 04:50:43 *** Beerbelott has left #openttd 04:54:06 *** kiwitree has joined #openttd 05:00:21 *** Samu has quit IRC 06:06:32 *** Alberth has joined #openttd 06:06:32 *** ChanServ sets mode: +o Alberth 06:28:42 *** Supercheese has quit IRC 07:02:02 *** andythenorth has joined #openttd 07:02:12 <andythenorth> moin 07:03:50 *** kiwitree has quit IRC 07:06:18 <andythenorth> why do some people need sudo to install nml deps? 07:06:24 <andythenorth> that seems all kinds of wrong 07:08:24 <Alberth> o/ 07:09:03 <Alberth> people think in system-wide installs, not being aware that user-install exist as well 07:09:15 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7231: Add: Add flag and railtype sprite type to draw pre-combined ground sprites. https://git.io/fhhRt 07:09:36 <Alberth> Usually, I add ply to the code that uses it, I wonder why I didn't do that here 07:09:54 <andythenorth> I have a long-standing suspicion of sudo 07:10:06 <andythenorth> and it should never ever be needed for python deps 07:10:42 <andythenorth> also hi :) 07:11:12 <Alberth> I do have a system-wide python install, but that's managed by the package manager 07:11:32 <Alberth> there is probably also a ply as package that they can use 07:11:55 <andythenorth> should just be pip install 07:12:05 <andythenorth> preferably to a virtualenv 07:12:33 <Alberth> that would be a user-install then, which causes havoc if you install nml at system level 07:12:39 <andythenorth> I haven't looked at the nml instructions for ages 07:12:45 <Alberth> although for a single user... :p 07:13:05 <Alberth> your post made me consider writing nml2 :p 07:13:28 <andythenorth> I really think nml needs to die 07:13:40 <Alberth> ok, what then? 07:14:48 <andythenorth> I seriously considered switching to m4nfo http://www.ttdpatch.de/grfspecs/m4nfoManual/ 07:15:05 <andythenorth> but I'd end up falling out with Michael 07:15:06 <Alberth> yeah, m4 is a nightmare though 07:15:36 <andythenorth> the m4nfo syntax looks a lot more compact and easy to read 07:15:44 <Alberth> not sure how magic that code is, but we could try re-implementing it in py-xpd 07:15:49 <andythenorth> nml is very labour intensive to write and read 07:16:21 <Alberth> https://github.com/Alberth289346/py-xpd 07:16:25 <andythenorth> one of the advantages of m4nfo is 07:16:27 <andythenorth> "so there's no need for any external tools, like CPP for macro usage or artificially crafted extra Python layers, resulting in bloated installations" 07:16:47 <Alberth> instead we have a m4 layer 07:18:43 <andythenorth> interestingly m4nfo has a linker 07:18:45 <Alberth> writing m4 is complicated 07:19:00 <Alberth> :o could be nice :) 07:19:11 <andythenorth> I tried writing a linker with nml 07:19:20 <andythenorth> but it's just not engineered with that in mind 07:19:25 <Alberth> it generates nfo? 07:19:35 <andythenorth> nml can output nfo 07:19:45 <andythenorth> so I wrote something that split that into fragments 07:19:51 <andythenorth> then tried to re-combine the fragments 07:19:54 <Alberth> I was asking about m4nfo, sorry 07:20:03 <andythenorth> m4nfo generates nfo yes 07:20:25 <andythenorth> I don't know how the linker works, I haven't used m4nfo 07:20:41 <Alberth> other option is to borrow the m4nfo interface, and re-implement it 07:22:36 <Alberth> while trying to understand stations, I started renaming the action numbers to a useful name 07:22:56 <andythenorth> stations would be one obvious vector to use for a rewrite 07:23:00 <andythenorth> because nml doesn't have them 07:23:35 <andythenorth> but an alternate vector would be something where the newgrf spec isn't *just weird* :P 07:23:43 <Alberth> the nice thing about nml is that you have expressions 07:23:46 <andythenorth> yes 07:24:02 <andythenorth> have you ever made anything run on pypy? 07:24:23 <andythenorth> I haven't tried co-ercing nml to use pypy, planetmake said he failed 07:24:23 <Alberth> no, not even sure what it is 07:24:35 <andythenorth> https://en.wikipedia.org/wiki/PyPy 07:24:58 <Alberth> I was also considering making a nicer nfo, dropping all the insanity 07:25:11 <andythenorth> nfo, or grf? 07:25:38 <andythenorth> I have no idea about the format of the actual compiled bytecode 07:25:45 <andythenorth> just wondering if that could be changed :P 07:25:58 <andythenorth> instead of adding more / different abstraction layers 07:26:22 <Alberth> I was thinking nfo, grf is mostly wrapping, as fas as I know 07:27:07 <Alberth> of course you can change it, we have source of everything :p 07:27:25 <Alberth> linking could also be a nice vector for a rewrite 07:27:31 <Alberth> as well as performance 07:28:10 <Alberth> :o pypy is a jit thing 07:28:13 <andythenorth> yes 07:28:28 <Alberth> ever considered a java-python? 07:28:40 <andythenorth> I haven't tried it with nmlc, but we might switch to pypy at work, instead of migrating to python3 07:28:57 <andythenorth> the performance benefits are apparently now consistent and worthwhile 07:29:08 <Alberth> nice 07:29:14 <andythenorth> I think nmlc has a custom cpython extension by frosch though 07:29:22 <andythenorth> which might block nml pypy, not sure 07:29:28 <Alberth> yeah, image processing 07:29:32 <andythenorth> so I have a simple list of nml goals 07:29:34 <andythenorth> 1. speed 07:29:35 <andythenorth> 2. speed 07:29:37 <andythenorth> 3. speed 07:29:44 <andythenorth> 4. declutter the syntax 07:29:46 <Alberth> 4. linking :p 07:29:51 <andythenorth> 5. maintainability 07:30:14 <andythenorth> so compile times for Iron Horse, current head of the repo 07:30:22 <andythenorth> nmlc: real 1m3.393s 07:30:27 <Alberth> :o 07:30:30 <andythenorth> grfcodec: real 0m2.513s 07:31:03 <Alberth> yeah, nml is horribly inefficient, it rewrites expressions to themselves all the time, making zillions of copies of them 07:31:23 <andythenorth> I think it also scales somewhere in a non-linear way 07:31:36 <Alberth> didn't frosch try making a linker? 07:31:45 <andythenorth> this is the part where somebody says o(n) or log o(n) or something 07:31:49 <Alberth> or at least intended to 07:32:01 <andythenorth> from what I remember, the linker effort is severely impeded by string IDs 07:32:12 <Alberth> o(n) isn't bad, that's linear 07:32:32 <Alberth> ... 07:32:42 <andythenorth> iirc nmlc has a magic phase to automatically assign string IDs (action 4 IDs) 07:33:00 <andythenorth> so trying to do partial compiles doesn't work because the string IDs are unstable 07:33:04 <Alberth> yeah, makes sense, you have to do that 07:33:16 <andythenorth> so there needs to be a way to preserve consistent tokens for those strings 07:33:24 <Alberth> yep, it's information you have to export and fill in, in other parts 07:33:30 <andythenorth> otherwise my crude linker nearly worked 07:34:06 <Alberth> starting from the bottom could also work, invent a linkable format 07:34:18 <Alberth> not sure how to move from there though 07:34:38 <Alberth> you'd be stuck with nml not generating the right format 07:35:14 <andythenorth> this was pretty awful but eh https://dev.openttdcoop.org/projects/iron-horse/repository/revisions/be67b4fe5858/entry/src/render_nml_nfo.py 07:35:25 <Alberth> ie I see no major problem in the linking process itself, so that format will work as far as I can see 07:35:34 <andythenorth> that rev could probably still be used for experiments 07:35:46 <andythenorth> grfcodec seemed to have no problems linking at all 07:36:10 <Alberth> grfcodec just writes out what it gets 07:36:37 <Alberth> a glorified text hex digits -> binary bytes conversion 07:37:41 <Alberth> if you mess up, it just won't do anything useful :p 07:38:02 <andythenorth> oof that Horse rev above might be python 2 :P 07:38:07 * andythenorth trying it 07:39:42 <Alberth> this might need a cunning plan first 07:40:17 <andythenorth> I removed the partial compile stuff in Horse a couple of years ago 07:40:37 <andythenorth> it's slow enough that I'm considering removing features 07:41:26 <Alberth> I am pretty busy today, i'll be back in the afternoon 07:41:43 <Alberth> better speed nml up then :p 07:41:46 <andythenorth> NP :) 07:42:34 <andythenorth> removing all the cargo sprites support from Horse drops the compile to 37s 07:43:29 <andythenorth> hmm my results are distorted, there's a graphics processing step that accounts for 13s of the nml times 07:43:50 <andythenorth> but still, the nmlc step is one order of magnitude slower than grfcodec 07:46:13 <Alberth> yes, I tried to sanitize the expressions in nml, but it so entangled, and you don't have compiler support for finding bad uses 07:47:12 <Alberth> nml is about 80-90% expression manipulation 07:50:13 *** nielsm has joined #openttd 07:50:13 <andythenorth> hmm 07:50:46 <andythenorth> it would be somewhat interesting to pick that apart and find out what's fast and what's slow 07:51:20 <andythenorth> when it was designed, theree would be no real-world nml test grfs 07:51:29 <andythenorth> and nothing to really benchmark 07:52:29 <andythenorth> an nml2 should take care to make different mistakes :) 08:02:38 <nielsm> okay read the backlog a bit 08:03:21 <nielsm> as Alberth suggests, starting from a linkable format might be the smartest, something containing raw grf bytes except for some references that need to be assigned and fixed up by means of symbol names 08:03:34 <nielsm> (and some size fields need to have their final size calculated) 08:04:29 <nielsm> you get basically all the symbol resolution in that, including strings, callback sprite ids 08:05:00 <andythenorth> I think strings are non-trivial 08:05:11 <nielsm> and then write some more compilers on top of that to generate the intermediate linkable grf bytes 08:05:21 <andythenorth> m4nfo has to also work around string challenges http://www.ttdpatch.de/grfspecs/m4nfoManual/ 08:06:34 <andythenorth> it's probably just an extra table of symbold, or something :P 08:06:41 * andythenorth wavey hands about compiler design 08:07:49 *** sla_ro|master has joined #openttd 08:13:13 <Alberth> yeah, I do that stuff for a living :p 08:14:41 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth updated pull request #7341: Change: Add windowshade to rail station construction window https://git.io/fhhmy 08:14:55 <andythenorth> I do wavey hands for a living 08:15:42 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth updated pull request #7341: Add: windowshade for rail station construction window https://git.io/fhhmy 08:16:26 <andythenorth> hmm 08:16:38 <andythenorth> I can't teach my editor when to use tabs and when to use spaces 08:16:42 <andythenorth> that's annoying 08:17:15 <Alberth> kill it 08:18:31 <andythenorth> makes complying with tab-based projects hard 08:19:39 <Alberth> most editors are just total crap 08:19:51 <Alberth> ah well, I'm off now, see you 08:19:54 <andythenorth> bye :) 08:21:06 *** Alberth has left #openttd 08:22:18 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth updated pull request #7341: Add: windowshade for rail station construction window https://git.io/fhhmy 08:22:20 *** Progman has joined #openttd 09:13:42 <peter1138> Morning 09:13:47 <peter1138> I overslept :( 09:15:46 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7231: Add: Add flag and railtype sprite type to draw pre-combined ground sprites. https://git.io/fhh0W 09:19:51 <peter1138> andythenorth, install the git hooks locally :-) 09:20:14 <peter1138> That'll avoid embarrassing yourself ;) 09:20:58 <peter1138> andythenorth, you've still got the unrelated file in there? 09:21:15 <peter1138> andythenorth, and didn't do the early return change. 09:27:19 <andythenorth> oof why is that .nut there 09:27:45 <andythenorth> clown shoes 09:27:54 <peter1138> https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Precombined_overlay_sprites_.280C.29 09:27:59 <peter1138> That's a lot of sprites 09:28:34 <peter1138> I wonder if NRT should have a similar option. 09:28:38 <andythenorth> how do I drop a file from the manifest during a rebase? 09:28:47 <andythenorth> I could just delete the commit and go again, it's only 1 09:28:52 <peter1138> Or actually I think roads normally do that. 09:28:57 <LordAro> moin 09:28:58 <peter1138> andythenorth, git rm 09:29:32 <andythenorth> do I actually want to delete bin/ai/regression/tst_regression/info.nut 09:30:04 <andythenorth> hmm I can figure it out in a bit, tanking right now 09:30:09 <peter1138> Well I don't have an info.nut there 09:31:02 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth updated pull request #7341: Add: windowshade for rail station construction window https://git.io/fhhmy 09:31:23 <andythenorth> ok just the return to fix now 09:52:22 <andythenorth> so how does one return in C++ :P 09:52:24 <peter1138> Hmm, need to make sure neutral industries still work. 09:52:30 * andythenorth had better copy something 09:52:31 <peter1138> andythenorth, "return" 09:52:55 <andythenorth> so if it's shaded, just return? 09:53:05 <andythenorth> rest is not wrapped in conditional? 09:53:58 <peter1138> Yup. 09:54:07 <peter1138> The rest basically becomes untouched from master. 09:59:06 <nielsm> https://www.tt-forums.net/viewtopic.php?f=29&t=84933&p=1219165#p1219165 09:59:15 <nielsm> does anyone know why the reliability might be different? 09:59:25 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7348: Fix: BaseMedia<Tbase_set>::AddFile searches for fullpaths instead of files https://git.io/fhh07 09:59:31 <nielsm> also power 10:00:27 <peter1138> Power is due to display units, it's actually the same internally. 10:00:58 <peter1138> And reliability is based on introduction date which is randomized. 10:01:03 <andythenorth> reliability is randomised 10:01:05 <andythenorth> oh that 10:03:09 <TrueBrain> I am scared .. andythenorth making code-PRs ... should we hide in the shelters? :D 10:03:12 <TrueBrain> hi andythenorth :) 10:03:40 <andythenorth> yo 10:04:18 <nielsm> TrueBrain: can you do something with this? https://github.com/OpenTTD/OpenTTD/pull/7346 10:05:30 <nielsm> or should we just be committing directly to the branch instead of going through PRs? 10:06:21 <TrueBrain> hmm .. I wonder if we can see the tracking branch of a PR 10:09:26 <TrueBrain> "System.PullRequest.TargetBranch" 10:09:28 <TrueBrain> seems so 10:09:30 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7348: Fix: BaseMedia<Tbase_set>::AddFile searches for fullpaths instead of files https://git.io/fhh0b 10:10:09 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain requested changes for pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhh0N 10:11:27 <DorpsGek_II> [OpenTTD/CompileFarm] TrueBrain commented on issue #29: Commit checker always expect origin/master, even for non master PRs https://git.io/fhh0h 10:11:48 <LordAro> TrueBrain: wrong repo for ^, surely? 10:11:59 <TrueBrain> LordAro: ? 10:12:06 <TrueBrain> nielsm: nah, seems someone needed to google for 2 minutes and come up with a more solid game plan :D 10:12:37 <LordAro> TrueBrain: oh no, i thought that was part of githooks for some reason 10:12:38 <LordAro> carry on 10:15:30 <TrueBrain> so yeah, someone has to fix this up :) Seems mostly trivial 10:15:59 <TrueBrain> I would suggest also to do it for master, btw 10:16:38 <TrueBrain> nielsm: I do think the backport PRs are silly 10:16:45 <TrueBrain> especially the one by one 10:16:56 <TrueBrain> can't we make them just a single PR to backport a lot? 10:17:06 <LordAro> that's why i said :p 10:17:21 <TrueBrain> as they are already reviewed .. you only want to know if the CI finds any issues 10:18:36 <TrueBrain> #7346 needs fixing no matter what btw, as commits n the branch currently fail for the same reason :) 10:22:01 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhhEI 10:26:10 <TrueBrain> and just to set expectations .. I most likely won't have time to fix this anytime soon .. but it is also a "good first issue" so anyone can help out \o/ 10:40:37 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth updated pull request #7341: Add: windowshade for rail station construction window https://git.io/fhhmy 10:41:59 <peter1138> andythenorth, no change? 10:43:50 <andythenorth> oops 10:43:55 <andythenorth> playing tanks and trying to commit 10:45:04 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth updated pull request #7341: Add: windowshade for rail station construction window https://git.io/fhhmy 10:46:36 <DorpsGek_II> [OpenTTD/nml] michicc merged pull request #22: Add: New railtype flags and precombined spriteset type. https://git.io/fhh4q 10:49:43 <peter1138> andythenorth, much nicer :) 10:49:51 <andythenorth> 2 lines :P 10:49:55 <peter1138> Yup 10:49:56 <andythenorth> I am GUI expert now 10:51:20 <andythenorth> newgrf docs need an update for railtype flags? https://newgrf-specs.tt-wiki.net/wiki/Action0/Railtypes#Rail_type_flags_.2810.29 10:52:02 <andythenorth> or am I looking in wrong place? https://github.com/OpenTTD/OpenTTD/pull/7231#issuecomment-471160732 10:53:44 <peter1138> Oh, I missed that bit 10:53:58 <peter1138> I did the spritesets part :p 10:54:38 <peter1138> I'll add it 10:55:35 <andythenorth> \o/ 10:55:46 <andythenorth> I want to play OpenTTD 10:55:49 <andythenorth> but I broke FIRS 10:56:02 <peter1138> Done. 10:56:12 <andythenorth> :) 10:58:00 <andythenorth> nmlc needs the 16-cargo update done 10:58:06 <peter1138> Is it not working? 10:58:07 <andythenorth> and then I need to rewrite FIRS prod cb 10:58:26 <andythenorth> hmm 10:58:39 <peter1138> Oh shit, I modified nml recently, that means I'm the maintainer now, right? :( 10:58:43 <andythenorth> nielsm was the nmlc branch choking on syntax, or just giving me a warning about FIRS? 10:58:48 <andythenorth> "there is no maintainer" 10:58:55 <andythenorth> it's like a spoon 10:58:59 <andythenorth> there is no spoon 10:59:18 <nielsm> andythenorth, I think it was just bad at reporting your syntax error in a comprehensible way 10:59:49 <andythenorth> ok I have an hour or so I can try and update FIRS to work with the new syntax 10:59:59 <andythenorth> nml is such a turkey :) 11:00:01 <andythenorth> nml2! 11:00:05 <andythenorth> NotNML! 11:00:20 <nielsm> NotNFO 11:00:33 <andythenorth> NFO is lovely 11:01:00 <LordAro> YANML 11:01:14 <andythenorth> oof 11:01:38 <andythenorth> let's not confuse the input syntax with the blazing slowness of the compiler :D 11:02:01 <andythenorth> I suspect if any of you made a newgrf for a month, it would get fixed rapido 11:02:05 <andythenorth> maybe you shoul! 11:02:09 <andythenorth> peter1138Trains 11:02:10 <peter1138> non-rect-catchment basically causes the neutral-stations patch to be rewritten "lol" 11:02:19 <andythenorth> LordAro.grf 11:02:24 <nielsm> peter1138 haha 11:03:18 <peter1138> it simplifies it, all the catchment updating code just needs to check the neutral station/industry and ignore all the tile loops. 11:03:26 <peter1138> and then the cargo delivery... just works anyway. 11:03:32 <peter1138> annoying :p 11:03:37 *** Thedarkb-T60 has joined #openttd 11:03:42 <peter1138> OH WELL 11:03:43 <nielsm> should have merged them in the opposite order 11:03:49 <peter1138> Yeah 11:04:20 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7341: Add: windowshade for rail station construction window https://git.io/fhhEV 11:04:38 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7341: Add: windowshade for rail station construction window https://git.io/fhhmy 11:04:46 <andythenorth> life-changing that one ^ 11:04:51 <andythenorth> I made a video even 11:06:45 <peter1138> Hmm. 11:07:02 <peter1138> When an oil rig is created, it doesn't have a station yet, does it. 11:07:19 <andythenorth> takes a short time to get one 11:07:24 <andythenorth> you could 'fix' that :P 11:08:04 <nielsm> the station only appears after the month of construction 11:08:07 <nielsm> afiak 11:08:08 <peter1138> Yeah. 11:08:17 * andythenorth wonders if FIRS compiles yet 11:08:21 <peter1138> I wonder if the already committed patch even works :Lp 11:08:23 <andythenorth> so slow to test 11:08:46 <peter1138> I'm sure it does :) 11:13:15 <peter1138> Thinking about edge cases when loading games with partially built oil rigs 11:13:45 <peter1138> Not a problem in master as catchment and nearby stuff isn't cached so much. 11:14:07 <andythenorth> FIRS compiles \o/ 11:14:14 <andythenorth> by deleting everything that uses old syntax 11:14:17 <andythenorth> now I just need to port it 11:14:33 <andythenorth> eh I have commits in master, I want them in a branch, not master 11:14:40 <andythenorth> make new branch, then rebase master, dropping commits? 11:16:15 <andythenorth> seemed to work 11:16:20 <andythenorth> git is like a truck 11:16:36 <andythenorth> very reliable, but don't go round corners to fast, you'll stack it 11:21:10 <andythenorth> nielsm: is the syntax deprecation documented anywhere? I am looking in commits, but not in the correct places :P 11:21:16 <andythenorth> I want to drop old properties 11:21:29 <andythenorth> or I just diff master I guess 11:21:52 <andythenorth> that works 11:23:49 <nielsm> nope :/ 11:24:09 <andythenorth> diff of master is actually the easiest 11:24:56 <andythenorth> I just need to make this generic to n cargos now https://github.com/andythenorth/firs/blob/v4-development-track/src/templates/produce_secondary.pynml 11:25:16 <andythenorth> not sure how I'll do the cargo combining calculation 11:26:51 <Eddi|zuHause> i'm not sure if this still happens, but it used to be that in crowded areas, oil rigs would fail to get a station (running out of names? station ids?) 11:27:28 <andythenorth> I have never seen that, doesn't mean it doesn't happen 11:27:28 <peter1138> Running out of station IDs, but that's pretty hard these days. 11:27:49 <peter1138> Running out of names is more likely. Hmm. 11:29:46 <peter1138> Hmm, doesn't look like BuildOilRig can fail. 11:30:15 <peter1138> Oh wait, duh. 11:30:20 <peter1138> Yeah, only if it can't allocate an ID. 11:30:32 <peter1138> So names is not the reason. 11:31:39 *** Thedarkb-X40 has quit IRC 11:34:48 <Eddi|zuHause> right, and i suppose station IDs is now much higher? 11:36:06 *** blelch has joined #openttd 11:36:13 <blelch> Hi! 11:37:03 <blelch> I recently began playing, and I just completed the tutorial, and played around quite a bit during the course of that. 11:37:27 <blelch> I'm starting a new game against RandomAI and AdmiralAI, 11:37:28 <Eddi|zuHause> there's a tutorial? 11:37:32 <blelch> and I want some advice 11:37:35 <blelch> Eddi|zuHause: yes 11:37:40 <blelch> under 'Scenario' 11:37:58 <blelch> So one thing I'm a bit confised about is this: 11:38:20 <blelch> I'm going to be transporting coal to powerstations as the first thing I do, 11:38:49 <blelch> and do I make more money transporting it over large distances, or small? 11:39:09 <blelch> I mean... there are lots of coal & power on this map, 11:39:17 <blelch> so then do I just connect the nearest ones> 11:39:20 <blelch> *? 11:40:02 <nielsm> you usually earn more for transporting longer distances 11:40:35 <nielsm> but on the other hand, if the distance is too long you need more trains/vehicles to keep the loading station busy as to not get low ratings 11:40:49 <nielsm> so the investment for a longer line can be much larger 11:42:00 <blelch> I see... 11:42:14 <andythenorth> I used to start with coal 11:42:16 <andythenorth> which is fine 11:42:20 <andythenorth> but pax is the better start 11:42:28 <andythenorth> higher payment rate, loads both directions 11:42:28 <nielsm> pax = passengers 11:42:30 <blelch> what is pax? 11:42:32 <blelch> ah 11:42:42 <andythenorth> find 2 cities with around 1000 popn 11:42:44 <andythenorth> easy money 11:42:45 *** Thedarkb-T60 has quit IRC 11:42:51 <nielsm> if you can find reasonably large towns it's a better start yes 11:42:52 <blelch> and do trains or planes? 11:42:56 <nielsm> trains usually 11:43:02 <blelch> why? 11:43:09 <blelch> higher capacity? 11:43:10 <nielsm> depends on the year I suppose also 11:43:15 <blelch> 1950 11:43:25 <nielsm> yeah you don't have very many really good planes then 11:43:33 <blelch> ah 11:43:46 <nielsm> around 1960-1970 jet planes appear and become more viable 11:43:46 <blelch> but isn't the return on planes very high? 11:44:10 <nielsm> the investment is also large :) 11:44:47 <nielsm> my experience is that it's usually best to establish a small income base before beginning really big investments 11:44:47 <blelch> ya 11:44:53 <blelch> okay 11:44:57 <blelch> makes sense 11:45:09 *** Thedarkb-T60 has joined #openttd 11:45:13 <blelch> one other confusion I have: 11:45:22 <blelch> if I'm transporting passengers, 11:45:29 <nielsm> but really, there are as many strategies for TT as there are players :) 11:45:36 <blelch> will people get in, nomatter where the transport is going? 11:46:12 <nielsm> under default settings, passengers don't have a destination in mind, they go whereever you take them 11:46:26 <blelch> ah, okay :) kinda non-intuitive 11:46:34 <peter1138> In TTD pax generally means passengers and mail together. 11:46:36 <blelch> so ther eare settings that change that> 11:46:44 <nielsm> you can enable the "Cargo distribution" settings to get a kind of simulation of destinations (and yet not really) 11:46:48 <peter1138> (They're both generated by town tiles, rather than industries) 11:47:35 <blelch> peter1138: okay... and looks like Mail haas higher payments too 11:47:46 <peter1138> There's less of it. 11:48:01 <blelch> nielsm: I'll look into it; but I'll play default for now 11:48:07 <blelch> peter1138: ah 11:49:10 *** Hi has joined #openttd 11:49:12 <Hi> Hi 11:49:26 <nielsm> hello 11:49:27 *** Hi has quit IRC 11:51:11 <TrueBrain> hit and .. run! 11:51:41 <andythenorth> self highlighting also 11:52:29 <TrueBrain> so how is your NewGRF CI going andythenorth? 11:53:15 <blelch> Does 'pause' have a hotkey? 11:53:22 <andythenorth> CI is fine, the rest TB is a shitshow currently :) 11:53:23 <andythenorth> https://paste.openttdcoop.org/pvvikkhmh/9a46f9/raw 11:54:46 <TrueBrain> that is not too bad 11:54:51 <TrueBrain> I expected more issues tbh :D 11:55:15 <blelch> is there a keyboard shourtcut to pause? 11:55:35 <nielsm> F1 11:55:42 <andythenorth> the current thinking is we just keep bundles on coop virtualisation infra 11:55:55 <andythenorth> it's not exactly a commodity thing to just get in the cloud 11:56:04 <andythenorth> and we put some creds in AP somehow to publish to it 11:56:32 <TrueBrain> that is how the rest of OpenTTD works too, yes 11:56:50 <TrueBrain> well, we use Service Connections there 11:56:55 <TrueBrain> which connect to DO CDN 11:57:32 <TrueBrain> why not use GitHub releases for bundles btw? 12:01:48 <andythenorth> it's quite limited 12:01:59 <blelch> thanks nielsm 12:02:13 <TrueBrain> in combination with GitHub pages too? 12:03:19 <andythenorth> they are different affordances to bundles 12:03:31 <andythenorth> they could be made to work, but it would be a lot of square peg -> round hole 12:03:51 <TrueBrain> a bundle to me is a zip file, but I guess I am missing something :D 12:04:02 <andythenorth> it involves quite a lot of weird to make GH pages + releases replace bundles 12:06:05 <TrueBrain> like said, I dont know what bundles are; but it sounds like their are weird to start with :D 12:06:19 <andythenorth> they're artefact publishing http://bundles.openttdcoop.org/iron-horse/ 12:07:00 <TrueBrain> so what is the issue using GitHub releases for that? 12:08:17 <TrueBrain> makes me wonder if OpenTTD should also publish the files on GitHub releases 12:08:18 <TrueBrain> hmm 12:08:26 <andythenorth> hard to quantify 12:08:38 <andythenorth> I never use GH releases, so I don't know what's possible 12:08:46 <andythenorth> requirements include 12:08:55 *** blelch has left #openttd 12:08:57 <andythenorth> - publishing artefacts from push builds (untagged) 12:09:07 <andythenorth> - publishing navigable html artefacts 12:09:44 <andythenorth> I don't understand how GH has made these releases https://github.com/andythenorth/firs/releases 12:09:51 <andythenorth> there is no CI, so it's some kind of magic 12:10:13 <andythenorth> the release bundles are not commited in the repo, for obvs. reasons 12:10:22 <TrueBrain> not really .. GH creates a release for every tag :P 12:10:30 <andythenorth> but that's not the release? 12:10:34 <andythenorth> it's just source? 12:10:41 <andythenorth> no bundle, no binary, no docs, no hash 12:10:44 <andythenorth> etc 12:10:45 <TrueBrain> yeah ... 12:10:48 <TrueBrain> if you dont give GH files 12:10:52 <TrueBrain> the releases are just the source files 12:10:59 <TrueBrain> you need to give it binaries 12:11:03 <andythenorth> so can we educate it? 12:11:09 <TrueBrain> no, you need to upload it 12:11:13 <TrueBrain> the educating part is still WIP 12:11:15 <andythenorth> I am not -1 to GH releases, I just don't understand it 12:11:26 <TrueBrain> just because you don't understand it, doesn't mean you need to be -1 about it :) 12:11:26 <andythenorth> how do we teach it to serve up html? 12:11:36 <TrueBrain> you are jumping :) 12:11:52 <TrueBrain> What a normal flow is for GitHub: 12:12:36 <TrueBrain> you tag a commit, this creates a release (this happens automatically; I believe you can remove a release afterwards) 12:12:46 <TrueBrain> a release, in GitHub terms, always contains the source in a zip and targz 12:12:52 <TrueBrain> you can upload any binary to a release you like 12:12:57 <TrueBrain> as long as they are binaries 12:13:15 <TrueBrain> (well, I believe a file has to be < 2GB. The only real restriction here) 12:13:28 <TrueBrain> so normally you have a CI/CD attached to your repo, that triggers on a tag 12:13:30 <TrueBrain> builds the binaries 12:13:35 <TrueBrain> and attaches that to the GitHub release 12:13:44 <TrueBrain> that makes that part of GitHub go round and round 12:13:55 <TrueBrain> HTML files, have a slight detour, that you have to publish them via GitHub Pages 12:14:03 <andythenorth> well 12:14:09 <TrueBrain> is easy to fully automate, as it is like attaching a binary to a release 12:14:12 <andythenorth> I tested this last week 12:14:15 <TrueBrain> but has a slightly different workflow 12:14:27 <TrueBrain> that is how GitHub defines "releases" 12:14:38 <andythenorth> so the constraints have changed somewhatt 12:14:46 <TrueBrain> the only thing it is absolutely not build for, is to do this for every commit 12:14:58 <andythenorth> well we can probably make it do that anyway 12:15:06 <andythenorth> what harm can it do? 12:15:08 <TrueBrain> you have to tag every commit ;) 12:15:15 <andythenorth> that's fine, just do that? 12:15:34 <TrueBrain> Don't ask me; I am just telling you how GitHub defines "releases" 12:15:40 <TrueBrain> there is nothing specific about what I said :D 12:15:44 <TrueBrain> choices are yours 12:16:00 <andythenorth> commit hook to do a tag? 12:16:01 *** Wolf01 has joined #openttd 12:16:05 <Wolf01> o/ 12:16:10 <TrueBrain> no need; Azure Pipelines can tag for you too 12:16:12 <TrueBrain> no problem there 12:16:32 <andythenorth> one constraint is removed 12:16:44 <TrueBrain> you remove constraints? :) 12:16:44 <andythenorth> there are no active coop devzone users except me or george 12:16:48 <Wolf01> I must say that the new lego mustang is EPIC 12:16:55 <andythenorth> so there is no need to build a generic user-friendly solution 12:17:03 <andythenorth> that was looking seriously hard 12:17:17 <andythenorth> I doubt most of our content authors can successfully use GH, never mind AP and the rest 12:17:24 <TrueBrain> I don't know enough about how other people do stuff, so I take your word for it :D 12:17:56 <andythenorth> devzone was very user friendly, because of work done behind the scenes 12:18:12 <TrueBrain> I am completely lost why you think that cannot be done on GH, but okay :) 12:18:36 <andythenorth> it won't be user friendly 12:18:51 <andythenorth> GH is very complex 12:18:54 <TrueBrain> just .. because you cannot see how, does't mean it won't :P 12:18:56 <TrueBrain> no, it is not 12:19:05 <TrueBrain> there is a huge difference between setting stuff up, and using it 12:19:16 <TrueBrain> is GH + AP very complex in usage for OpenTTD, to create new releases? 12:19:22 <TrueBrain> all you have to do, it tag .. 12:19:28 <TrueBrain> that behind the scenes a lot of shit kicks in 12:19:32 <TrueBrain> doesn't mean the user needs to know 12:19:37 <Wolf01> GH is not complex, it depends on which level you want to use it... it's just different 12:19:42 <andythenorth> if we wanted a content author solution, we'd be better building on Dropbox 12:19:57 <andythenorth> or Sharepoint 12:20:14 <TrueBrain> and there was a jump again, which I failed to follow :D 12:21:24 <andythenorth> I am separating two goals 12:21:35 <andythenorth> my goal is quite different to what coop devzone goal was 12:22:25 <andythenorth> I just want these docs back online, for push and release http://bundles.openttdcoop.org/firs/ 12:22:37 <andythenorth> keeping history of n recent builds 12:23:09 <andythenorth> GH pages could do that, if a weird version listing is put in front of it 12:23:26 <andythenorth> and if nobody looks too closely at the utterly weird implementation for GH Pages 12:23:36 <TrueBrain> you keep seeing things I fail to see 12:23:47 <TrueBrain> either you are going for a 10 out of 10 solution 12:23:51 <TrueBrain> which is .. impracticle 12:23:58 <TrueBrain> or you are seeing problems you fail to mention 12:24:03 <TrueBrain> but .. something does not compute :D 12:24:11 <andythenorth> I just want those docs back online 12:24:25 <andythenorth> they are currently built from the hg repo which is dead 12:24:35 <andythenorth> so all I need is a documentation publisher 12:24:39 <TrueBrain> so where are things not working out? 12:25:35 <andythenorth> there isn't a single place not working out, I have experimented with multiple approaches 12:25:42 <andythenorth> all have upsides / downsides so far 12:26:12 <andythenorth> we can just publish to existing bundles, which is planetmaker's preferred solution, but needs auth management 12:26:18 <andythenorth> nobody knows how to do that yet 12:26:32 <TrueBrain> I also hear nobody wants to maintain devzone 12:26:35 <andythenorth> I tried the GH pages route, but the AP plug in for it is MS specific 12:26:37 <TrueBrain> so that sounds like a contradiction? 12:27:01 <TrueBrain> you are going to make me clone your repo, are you? :D 12:27:19 <andythenorth> o/c 12:27:23 <andythenorth> there's even an AP branch 12:27:38 <andythenorth> look you https://github.com/andythenorth/firs/tree/azure-pipelines-setup 12:27:53 *** keoz has quit IRC 12:29:04 <TrueBrain> I hate you :( (no, not really) 12:31:48 <TrueBrain> andythenorth: why isn't the name of your repo FIRS, but firs? 12:31:55 <andythenorth> dunno 12:31:58 <andythenorth> I change it? 12:32:04 <TrueBrain> dunno 12:32:05 <TrueBrain> do you? 12:32:12 <andythenorth> I am not very bothered by the case sensitivity 12:32:16 <andythenorth> it's firs on my filesystem 12:32:50 <andythenorth> eh have you actually seen the docs? :P http://bundles.openttdcoop.org/firs/push/LATEST/docs/html/economies.html 12:32:59 * andythenorth wonders if it's offscreen actor :P 12:33:08 <TrueBrain> see, capitals! 12:33:20 <andythenorth> but NOT IN THE URL 12:33:25 <andythenorth> omg, where's the quality :( 12:33:33 <andythenorth> downfall of society 12:34:59 <TrueBrain> unpinned dependencies .. bad andythenorth 12:36:46 <andythenorth> there's no deps management at all 12:36:54 <andythenorth> your on your own with getting those :P 12:37:05 <TrueBrain> in the azure file are some :P 12:37:07 <TrueBrain> just not pinned 12:37:09 <TrueBrain> which is HORRIBLE 12:37:19 <andythenorth> sounds like my day job 12:37:29 <TrueBrain> I agree :P 12:37:45 <andythenorth> well pin pillow to 5.4 then :P 12:37:59 <andythenorth> eh it really is just like work 12:38:05 <andythenorth> 'the build broke again' 12:38:12 <andythenorth> "is it pinned?' 12:38:16 <andythenorth> 'no' 12:38:19 <andythenorth> 'well pin it' 12:38:39 <andythenorth> 'is it pinned' -> 'yes' -> 'well just update to latest, probably fine' 12:40:45 <TrueBrain> 6014 commits in FIRS azure-pipelines-setup branch 12:40:48 <TrueBrain> does that sound correct ... 12:41:35 <TrueBrain> so andythenorth .. how do you want to do versions? 12:41:40 <TrueBrain> a single number always going up? 12:41:44 <TrueBrain> based on your latest tag? 12:41:54 <TrueBrain> combination of the two? 12:41:56 <andythenorth> maybe, 2 secs 12:42:07 <andythenorth> alberth thought about this quite a lot and made something 12:42:47 <andythenorth> there's a PR :o https://github.com/andythenorth/firs/pull/1/commits 12:42:54 <andythenorth> alberth will be back later 12:42:58 *** supermop_Home has joined #openttd 12:43:12 <andythenorth> also TrueBrain I must -> shops etc 12:43:20 <andythenorth> child management and things 12:43:21 <andythenorth> BIAB 12:43:29 <TrueBrain> o/ 12:43:41 <TrueBrain> in git, you basically have 2 choices: git describe --tags, or git rev-list HEAD --count 12:43:58 <TrueBrain> one is based on your latest tag, the other is just an ever increasing number (assuming you stay on the same branch) 12:44:07 <TrueBrain> I will pick the more common one for now (git describe) 12:44:25 *** andythenorth has quit IRC 12:48:16 *** Thedarkb-T60 has quit IRC 12:48:30 *** andythenorth_ has joined #openttd 12:48:41 <andythenorth_> oof phone irc 12:49:16 <andythenorth_> TB there is already btw a gh-pages branch, orphaned as per GH instructions 12:49:32 <TrueBrain> I saw 12:49:53 <andythenorth_> it publishes fine, but only single rev, would need extra magic to list multiple revs 12:50:17 <andythenorth_> anyway gfg 12:50:31 <TrueBrain> o/ 12:51:25 *** andythen_ has joined #openttd 12:53:16 *** andythen_ has quit IRC 12:56:10 *** blelch has joined #openttd 12:56:15 <blelch> hi! 12:56:27 <blelch> Does it matter what direction a two-way path signal is pointed? 12:58:21 *** andythenorth_ has quit IRC 12:58:40 <LordAro> blelch: yes, it's (essentially) ignored in the opposite direction 12:59:00 *** Gustavo6046 has joined #openttd 12:59:46 *** Gustavo6046 has quit IRC 12:59:52 <blelch> LordAro: oh! what direction do I point them, at stations entrances? 13:00:13 <blelch> because both, trains goin in, as well as out should look at them, no? 13:00:42 <LordAro> stations act as if they've got a built in signal 13:01:10 <LordAro> but i believe they're usually facing out of the station, when they're used 13:01:15 <blelch> ah 13:01:16 *** Gustavo6046 has joined #openttd 13:01:17 <blelch> okay! 13:03:12 *** Gustavo6046 has quit IRC 13:03:57 *** Gustavo6046 has joined #openttd 13:05:49 *** Flygon has quit IRC 13:12:01 *** andythenorth_ has joined #openttd 13:15:07 *** andythenorth_ has quit IRC 13:15:34 *** andythenorth has joined #openttd 13:16:22 <andythenorth> so is it done? o_O 13:16:46 <TrueBrain> the advise Azure Pipelines gives to be able to push things to GitHub back is .. .something I cannot suggest anyone to do 13:17:17 <michi_cc> LordAro: No, no, and no again. Stations do not have a built-in signal, no matter how often people say that, and then wonder why their trains only ever use one track. 13:18:16 <michi_cc> TRAINS have a don't-crash-when-reversing protection, which on terminus stations might seem as if the station would do it. 13:18:37 <LordAro> michi_cc: oh no, i did the thing, didn't i? 13:20:01 <andythenorth> TrueBrain: what's the advice? Should I do it? 13:20:06 <michi_cc> blelch: Stations do not have built-in signals, which becomes apparent on through stations. Path signals should generally be placed with the lights facing the platform to make sure trains do not reserve a path beyond the platforms into the juntion area. 13:20:24 <andythenorth> I thought I was doing that wrong? 13:20:36 <andythenorth> I've been told multiple times I don't need those signals? 13:20:44 <TrueBrain> andythenorth: nobody should ever .. they advise to put your GitHub PAT in an env var 13:20:44 <andythenorth> I always build them anyway, 13:20:58 <TrueBrain> so anyone creating a PR which prints that var, has your PAT, and control over your repo :P 13:21:06 <andythenorth> awesome 13:21:17 <andythenorth> not-secret 13:21:29 <TrueBrain> hmm .. I can use GitHub Actions 13:21:34 <TrueBrain> not sure how they work :P 13:22:08 <andythenorth> is this to push to GH releases, or to commit back? 13:22:28 <andythenorth> I found multiple instructions, Azure is huge and has 10 ways to do everything 13:22:38 <michi_cc> andythenorth: You don't necessarily need signals on terminus stations, but even then they improve things. The difference is easy to see if you manually reverse a train with 'show reserved paths' on. 13:22:40 <TrueBrain> GH Releases is build in, that was the easy part 13:22:48 <TrueBrain> the difficult part is the GitHub Pages, or at least, the pushing part :P 13:22:57 <andythenorth> yeah that's where I got stuck last week 13:23:09 <TrueBrain> that is to say, I do not like the way they want me to do it 13:23:16 <andythenorth> I found a plugin which wrapped Powershell 13:23:22 <TrueBrain> yeah, but that plugin is silly 13:23:24 <andythenorth> so it doesn't work on a linux pipeline 13:23:27 <TrueBrain> I was looking at it, laughed 13:23:40 <andythenorth> I found some other instructions somewhere, but powershell again 13:24:13 <TrueBrain> I was expecting the Service Connection to be alive 13:24:13 <andythenorth> I got a bit scared about accidentally opening my repo to push from unknown 3rd parties 13:24:14 <TrueBrain> but it is not 13:29:27 *** Thedarkb-T60 has joined #openttd 13:35:58 <TrueBrain> right .. they do have an additional layer of protection to avoid people sniffing these kinds of things via PRs .. good :) 13:36:08 <TrueBrain> PRs do not have access to secrets 13:36:39 <TrueBrain> FIRS is huge andythenorth! :P 13:38:02 <TrueBrain> ~200 MiB .. lol 13:39:15 <TrueBrain> https://github.com/TrueBrain/firs/tree/gh-pages <- lol .. that user :D 13:40:16 <blelch> michi_cc: okay, got it 13:40:26 *** blelch has left #openttd 13:40:46 *** Samu has joined #openttd 13:40:56 <Samu> hi 13:42:07 <andythenorth> oof dorpsgek gets everywhere TrueBrain 13:42:15 <andythenorth> you should put an end to it 13:42:17 <TrueBrain> git config user.email 'info@openttd.org' 13:42:19 <TrueBrain> fully in your control :P 13:42:33 <andythenorth> let's see what GH pages does with that 13:42:55 <andythenorth> have you configure publishing? 13:42:59 <andythenorth> configured * 13:43:10 <TrueBrain> publishing failed 13:43:16 <TrueBrain> I think it is because there is no index.html 13:43:21 <andythenorth> oic 13:46:25 <andythenorth> so if the index.html is a list of available artefacts, all prizes are won 13:52:03 <TrueBrain> another route is to make it a Jekyll project, and put the docs per version in a 'collection' :P 13:52:04 <TrueBrain> haha 13:52:06 <TrueBrain> bit overkill :D 13:53:49 <TrueBrain> "Your site is having problems building: Page build failed." 13:53:51 <TrueBrain> that is NOT HELPFUL 13:55:37 <andythenorth> but look how easy it is for me :P https://andythenorth.github.io/firs/html/get_started.html 13:55:43 <andythenorth> not helpful andythenorth 13:55:45 <andythenorth> ok BIAB 13:55:47 *** andythenorth has quit IRC 13:56:49 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7184: Feature: Distribute cargo to multiple stations or industries https://git.io/fhhzy 13:57:07 <peter1138> Hi 13:57:14 <Samu> hi 13:58:52 <Xaroth> ho 14:02:55 <peter1138> Time to test neutral stations again 14:11:53 *** gelignite has joined #openttd 14:11:58 *** andythenorth has joined #openttd 14:12:24 <TrueBrain> andythenorth: GitHub Pages are very .. euh .. touchy 14:12:40 <andythenorth> what are they whining about 14:12:41 <andythenorth> ? 14:12:52 <TrueBrain> well, no .. it is now that it is not picking up my index.html 14:13:02 <andythenorth> rude 14:13:03 <TrueBrain> and it seems that when I push from Azure Pipelines, it breaks 14:13:06 <TrueBrain> its .. weird 14:13:39 <andythenorth> does it think that you have invalid html? 14:13:42 <andythenorth> maybe it has a linter 14:14:09 <TrueBrain> they documentation suggests that if you put .nojekyll in your folder, everything is published as-is 14:14:55 <andythenorth> this was just published as-is for me https://github.com/andythenorth/firs/tree/gh-pages 14:14:56 <TrueBrain> yup, as soon as I push via Azure Pipelines, I get "Your site is having problems building: Page build failed." 14:14:58 <TrueBrain> with no reason 14:15:13 <andythenorth> all this cloud stuff is great 14:15:20 <andythenorth> but debugging it fricking sucks 14:15:32 <TrueBrain> I am a bit disappointing, honestly 14:15:38 <TrueBrain> normally GitHub is a lot better in this 14:15:58 <andythenorth> I spent a day last weekend on it, and has some small wins, and much rage 14:16:04 <andythenorth> and the cycle times are so slow 14:16:24 <TrueBrain> cycle times I have no issues with 14:16:30 <TrueBrain> but this is just .. not what they promise :P 14:16:50 <TrueBrain> funny, I cannot disable GitHub pages :D 14:16:55 <andythenorth> ok so what happens if you just push the contents of docs? 14:16:59 <andythenorth> instead of nesting it? 14:17:03 * andythenorth takes one thing at a time 14:17:15 <andythenorth> we know that works if manually commited https://andythenorth.github.io/firs/html/get_started.html 14:17:27 <andythenorth> I doubt AP is rewiting any contents on push 14:17:35 <TrueBrain> its not AP 14:17:39 <TrueBrain> I think it is the user I push it via 14:17:40 <andythenorth> it's GH, right? 14:17:42 <andythenorth> oh 14:17:45 <TrueBrain> I think it is because that is not me 14:17:47 <TrueBrain> or something 14:18:54 <TrueBrain> right .. so yeah, I am with you on: GitHub Pages is not working 14:19:06 <TrueBrain> and not because of the other reasons I read today, but simply because it is broken inthe way we want touse it 14:19:40 <TrueBrain> so .. I see 4+ options .. hmm .. 14:19:53 <TrueBrain> you want that every push is recorded, and even downloadable via OpenTTD 14:20:01 <TrueBrain> do all NewGRF authors want this behaviour? 14:20:10 <andythenorth> nobody knows 14:20:16 <andythenorth> there is onlyy me and george left 14:20:24 <TrueBrain> fair 14:20:45 <TrueBrain> so .. I can let you publish on the OpenTTD CDN 14:20:53 <andythenorth> is an option 14:20:54 <TrueBrain> that is possibly the easiest for now 14:21:02 <TrueBrain> but I cannot manage that for everyone that wants that 14:21:19 <andythenorth> bananana ramas 14:21:26 <TrueBrain> we can just patch up BaNaNaS indeed 14:21:31 <TrueBrain> not rewrite, just patching up enough 14:21:33 <andythenorth> the newgrf community is mostly back in forums, doing projects with no vcs 14:21:44 <andythenorth> the attempt to bring them in only worked with a lot of effort 14:21:53 <andythenorth> and honestly, I could give so many urls to drama relating to it 14:22:19 <TrueBrain> okay, let me think about this for a bit .. I see some options and possibilities .. but .. hmm .. 14:22:21 <andythenorth> the whole coop thing created a really unfortunate them / us situation by total accident 14:22:35 <andythenorth> anyway, yes 14:22:39 <andythenorth> it's only file publishing 14:22:46 <andythenorth> but thought is needed 14:22:50 <andythenorth> to see how to make it simple 14:24:03 <TrueBrain> meh. If GitHub Pages just worked, it meant that the effort was on the developer's side .. 14:24:11 <TrueBrain> all other solutions means we have to make something available :P 14:25:07 <TrueBrain> right, off playing some games 14:25:09 <TrueBrain> ciao later 14:27:38 <andythenorth> k thx bai 14:33:29 *** gelignite has quit IRC 14:36:43 <peter1138> Hmm. 14:38:27 <andythenorth> it is? 14:45:42 *** Alberth has joined #openttd 14:45:42 *** ChanServ sets mode: +o Alberth 14:45:45 <Alberth> moin 14:47:49 <andythenorth> hi :) 14:48:08 <LordAro> o/ 14:54:33 <Alberth> something git version numbers I guess 15:02:51 *** Thedarkb-T60 has quit IRC 15:16:28 * andythenorth needs to make this generic https://github.com/andythenorth/firs/blob/v4-development-track/src/templates/produce_secondary.pynml 15:16:34 <andythenorth> to 16 cargos, or 8 would be enough 15:16:40 <andythenorth> smells like a loop 15:17:54 <andythenorth> there is actually quite a lot of trivial repetition there currently 15:18:26 <andythenorth> there is only one problem 15:18:34 <andythenorth> I don't know what that code is supposed to do :) 15:19:00 <Alberth> :) 15:19:09 *** supermop_Home has quit IRC 15:19:31 <peter1138> o 15:22:01 *** frosch123 has joined #openttd 15:25:01 *** Thedarkb-T60 has joined #openttd 15:27:52 <Alberth> quak 15:28:07 <frosch123> moo 15:31:12 <peter1138> yio 15:33:48 <andythenorth> so how does FIRS production work? 15:33:53 <andythenorth> does anyone know? 15:35:23 <peter1138> Didn't you write it? 15:37:56 <andythenorth> not really no 15:38:07 <andythenorth> FIRS was much more collaborative, before I drove everyone away 15:38:58 <andythenorth> I should write out the production rules in english, then code that 15:39:14 <andythenorth> there's some faff with keeping leftover cargo around 15:39:23 <andythenorth> maybe to do with integer maths 15:51:44 *** keoz has joined #openttd 15:59:34 <peter1138> Yeah, funny. 16:07:28 <planetmaker> <TrueBrain> [14:20:45] so .. I can let you publish on the OpenTTD CDN <-- right on.... :| Before you do that, make the base sets build on azure, please. 16:07:46 <planetmaker> hi also 16:08:25 *** Progman_ has joined #openttd 16:08:34 *** Thedarkb-T60 has quit IRC 16:09:42 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1 16:10:24 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fhh27 16:10:40 *** Wormnest has joined #openttd 16:11:33 <peter1138> :/ 16:13:30 *** Progman has quit IRC 16:13:43 *** Progman_ is now known as Progman 16:14:06 <Samu> lalala 16:14:25 <peter1138> This guy 16:15:00 <planetmaker> hm, interesting, so your non-rect stations actually speed-up large maps? :) 16:15:38 <peter1138> Yes. 16:16:05 <planetmaker> <3 16:16:06 <peter1138> It speeds up small maps too of course, but the effect is smaller. 16:16:22 <planetmaker> of course. Speed on small maps usually is a non-issue 16:16:45 <peter1138> I think the large map is a non-issue compared to vehicle performance. 16:17:11 <planetmaker> that depends a lot on the use-case / play style 16:17:21 <peter1138> Perhaps. Planes :-) 16:17:27 <planetmaker> playing alone or with very few people on a large map for looong time: of course 16:17:33 <Alberth> o/ 16:17:49 <planetmaker> playing on a server with many people and many companies... they might have in sum much fewer vehicles. Then the map sizes actually is important 16:18:34 <planetmaker> generally I agree though: vehicles can cause more issues 16:18:43 <planetmaker> solution: remove vehicles. introduce pipes :P 16:18:50 <peter1138> Hmm, actually VERY VERY large cities are probably slower, as it may end up iterating a larger number of stations than tiles. 16:20:26 <planetmaker> http://wiki.openttdcoop.org/PublicServer:Archive_-_Hall_of_Fame#World_Population <-- if you care, you could test with one of those games 16:20:44 <peter1138> I'll check with Wentbourne. 16:21:00 <peter1138> I think it was a bullshit test :p 16:21:11 <andythenorth> pipemania 16:22:32 <peter1138> Gotta leave it running for quite a while for the averages to settle down. 16:22:35 <andythenorth> ok so there's a new prod cb format somewhere, let's find that 16:22:49 <peter1138> 1.29ms vs 1.64ms 16:22:53 <peter1138> So... an improvement. 16:23:05 <peter1138> Not worse, which is nice. 16:23:16 <peter1138> It wasn't meant to be a performance improvement anyway, but yeah. 16:26:04 <andythenorth> so the produce syntax is what now? :) produce(test_produce1, [COAL: STORE_TEMP(5, 0); IORE: STORE_TEMP(7, 1);], [STEL: 5;], 1) 16:28:36 <andythenorth> seems to be switch name, 2 lists, and a number? 16:30:28 <DorpsGek_II> [OpenTTD/OpenTTD] michicc approved pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fhhas 16:30:47 <peter1138> Mmm, pork crackling 16:30:57 <peter1138> Because everyone needs a load of fat & salt in their life. 16:31:10 <andythenorth> just one is fine 16:31:12 <andythenorth> maybe two 16:31:16 <peter1138> Wouldn't be so bad if I hadn't overslept. 16:31:23 <andythenorth> maybe I should read the parser rules 16:31:33 <andythenorth> I really like projects where the docs are in the repo 16:31:38 <andythenorth> seriously, fuck this wiki stuff 16:31:52 <andythenorth> testing new features is like pulling teeth 16:31:54 <peter1138> So yeah, turns out OpenTTD is easier than TTD... when you play with some low-price train set. 16:32:14 <andythenorth> I remember when I didn't know what newgrf was 16:32:26 <andythenorth> and the only one I saw screenshots of was george's porn buses 16:32:37 <andythenorth> didn't exactly inspire me that it wasn't some kind of hax 16:32:54 <peter1138> Do you mean that NewGRF specs should be included within OpenTTD's source? 16:33:50 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1 16:34:08 <andythenorth> specifically, nml specs should be included in nml repo 16:34:13 <andythenorth> but generally yes 16:34:18 <peter1138> Hmm, ok, that makes sense. 16:34:27 <peter1138> For NewGRF it wasn't because NewGRF wasn't ours. 16:34:32 <andythenorth> it's a solved problem in multiple ways 16:34:42 <andythenorth> sphinx, or readthedocs or just write some html 16:34:49 <andythenorth> like we keep landscape_grid.html maintained 16:34:50 <peter1138> It was ttdpatch's, we just reused it. 16:34:57 <andythenorth> yeah understood :) 16:35:10 <peter1138> And then you need to decide what format it should be in. 16:35:11 <andythenorth> imagine if landscape_grid didn't exist, and it was just read the source every time :P 16:35:17 <peter1138> The wiki is nice with hyperlinks and images. 16:35:25 <andythenorth> I just want the spec 16:35:29 <andythenorth> I don't need all the crap 16:35:29 <peter1138> I had fucking about with the html in the repo personally. 16:35:31 <peter1138> *hate 16:35:40 <andythenorth> how are the nogo and noai docs generated? 16:35:47 <andythenorth> they just work 16:35:59 <andythenorth> anyway, reading parser, it looks like 16:35:59 <andythenorth> prod_action = Action2Production(produce.name.value, produce.pos, 2, sub_in, add_out, again) 16:36:05 <andythenorth> dunno what the 2 is doing 16:36:14 <peter1138> They are doxygen. 16:36:24 <peter1138> They are literally generated from the comments in the source code. 16:36:45 <andythenorth> so we'd have to doxygen nml to do that 16:36:50 <peter1138> That works because it is documenting an API. 16:37:00 <peter1138> But NewGRF/nml is probably a bit more abstract. 16:38:28 <andythenorth> +1 16:38:47 <peter1138> So yeah. Station catchment is now symmetric. 16:40:16 <andythenorth> nielsm: can you shed light on the new produce() block? o_O 16:41:01 <peter1138> Hmm, damn, don't have the openttdcoop grf pack 16:41:51 <planetmaker> peter1138, https://wiki.openttdcoop.org/GRF 16:42:19 <planetmaker> yay... only 9 years old :P 16:42:47 <Alberth> oh, a decade in thsi century :) 16:44:03 <Alberth> andy: at work I use restructured text with sphinx, or markdown if it's really simple 16:47:23 *** Guest2828 has joined #openttd 16:48:09 <peter1138> I just realised... "Town cargo generation" 16:48:32 <peter1138> Should perhaps have been "Town passenger/mail generation" 16:50:30 <peter1138> planetmaker, thanks, btw. 16:52:31 <DorpsGek_II> [OpenTTD/OpenTTD] Berbe commented on pull request #7348: Fix: BaseMedia<Tbase_set>::AddFile searches for fullpaths instead of files https://git.io/fhhaz 16:54:30 <frosch123> Alberth: ottd turned 15 last wednesday, noone noticed the pimpled teenager 16:55:38 <peter1138> :) 16:56:18 <Alberth> too subtle, clearly :D 16:56:23 <Guest2828> I am not fond of teenagers... 16:58:40 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7348: Fix: BaseMedia<Tbase_set>::AddFile searches for fullpaths instead of files https://git.io/fhhar 17:00:31 *** Guest2828 has quit IRC 17:00:51 *** Beerbelott1 has joined #openttd 17:03:25 <Beerbelott1> peter1138: SHall a 'Fix' title reflects what is to be fixed or what the fix is w/o mentioning what was wrong? 17:04:05 <frosch123> both, unless that makes it redundant 17:04:09 <TrueBrain> https://chris.beams.io/posts/git-commit/#why-not-how 17:04:28 <peter1138> ^^ 17:05:01 <TrueBrain> basically, worded differently: don't put in the commit message HOW you made the fix, as the diff will show that 17:05:11 <TrueBrain> I think that is where most of the confusion comes from 17:05:28 *** Beerbelott1 is now known as Beerbelott 17:06:12 <Beerbelott> Well, what's wrong with 'Fix: BaseMedia<Tbase_set>::AddFile searches for fullpaths instead of files' then? 17:06:29 <Beerbelott> Msg describes what was wrong 17:06:40 <Beerbelott> seems to confuse peter1138 17:06:58 <TrueBrain> it confused me too :D but I was to chicken to say so :P (sorry) 17:06:58 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7349: Fix: Show industry name in Land Area Information window for oil-rig type stations instead of just 'Oil Rig' https://git.io/fhhaX 17:07:11 <Beerbelott> Why smallest changes always bring the most quibble? :p 17:07:22 <TrueBrain> the smaller the change, the better the commit message should be ;) 17:07:24 <Beerbelott> Suggestions, then? 17:07:24 <peter1138> Beerbelott, what's it fixing? 17:07:35 <Beerbelott> path -> filename 17:07:35 <peter1138> I posted the question already, so I won't repeat it. 17:07:57 <peter1138> I think you've documented what you've changed 17:08:03 <TrueBrain> AddFile searches ... <- so that says that AddFile is doing something? or are you changing it? 17:08:06 <peter1138> It doesn't say what you've fixed. 17:08:17 <TrueBrain> or were you expecting it to do that? 17:08:38 <TrueBrain> especially as you change something in AddFile, it becomes very confusing 17:08:47 <TrueBrain> did you change the interface? Was this a bug? What was the bug? 17:08:56 <Beerbelott> TrueBrain said it could either discribe what has changed or what is to be changed. That title is true for the latter 17:09:23 <TrueBrain> okay, let me try to phrase this differently: clearly, we are not understanding it, so something about it has to change :) 17:09:31 <TrueBrain> now I cannot help, as I don't udnerstand :P 17:09:37 <TrueBrain> so .. Explain to me like I am five 17:09:45 <Beerbelott> and I don't get what you do not understand, thus I'd be glad to change something but I do not know what 17:09:56 <TrueBrain> explain in ANY other way what your PR is doing 17:10:10 <TrueBrain> as we cannot stay stuck in this: you dont understand and I dont udnerstand what you dont understand :D 17:10:11 <Beerbelott> What it is doing then... not what has to be changed? 17:10:26 <TrueBrain> in what ever way you feel like, describe in any other way what the PR is doing 17:10:56 <TrueBrain> doesn't have to be in a commit message style 17:10:58 <TrueBrain> just .. I want to understand 17:11:01 <TrueBrain> so .. yell anything :) 17:11:26 <Beerbelott> Done... I guess? -_-' 17:11:34 <TrueBrain> you didn't say anything 17:11:40 <TrueBrain> not sure what is going on on your end? :) 17:11:53 <Alberth> what didn't work? 17:12:10 <Beerbelott> I edited the PR title 17:12:18 <TrueBrain> okay, try it in IRC 17:12:20 <TrueBrain> explain to me 17:12:22 <TrueBrain> ME, TrueBrain 17:12:24 <TrueBrain> like I am 5 17:12:26 <TrueBrain> what your PR is doing 17:12:27 <TrueBrain> go 17:13:50 <Beerbelott> AddFile uses LoadFromDisk to search for a resource calling it with a fullpath to a file, not merely its filename, resulting in broken paths which won't ever be found 17:14:36 <Beerbelott> I changed this call w/ a fullpath to a call w/ a filename 17:14:44 <Eddi|zuHause> so how do you trigger the broken behaviour? 17:15:26 <Beerbelott> calling the dumb LoadForDisk w/ a wrong resource name (ie a fullpath) 17:15:47 <Eddi|zuHause> no. what would a user have to click on to see it's not working. 17:16:34 <Beerbelott> User does not have to do anything, apart from launching the game 17:17:06 <Beerbelott> it eventually succeeds, after 10 missed calls everytime 17:17:14 <Beerbelott> Look at the output I provided as attachment 17:17:31 <TrueBrain> okay, I see the ELI5 failed there :D (no reddit fan I guess? :D) 17:19:00 <TrueBrain> hmm .. I notice it is vastly more difficult to explain this in English than in my native language :D 17:19:02 <TrueBrain> funny 17:19:32 <TrueBrain> Beerbelott: I think more to the point is not the how (AddFile now calls LoadFromDisk with filename, not fullpath, right?) 17:19:52 <TrueBrain> but more important is: AddFile assumed LoadFromDisk can handle a fullpath, but it cannot? 17:20:31 <TrueBrain> so the "why" people ask about, is not the fact that AddFile now uses A instead of B .. that is the "how" you did it 17:20:32 <Beerbelott> It's the only location I spot in code where this mistake is made, thus the rest of the codebase seems to handle LoadFromDisk properly 17:20:46 <TrueBrain> so, it is more telling to explain this part in the commit message 17:20:53 <TrueBrain> LoadFromDisk expect a filename, not a fullpath 17:21:03 <TrueBrain> with that commit message, you explain much more WHY you made the change 17:21:16 <Eddi|zuHause> Beerbelott: the problem is not that there's anything wrong with your commit message or your commit, but that you assume people know wtf LoadFromDisk is meant to do. 17:21:16 <Alberth> LoadFromDisk has that limitation documented? 17:21:23 <TrueBrain> you see a bit where I am going here Beerbelott? 17:21:34 <Beerbelott> TrueBrain Yes 17:21:57 <TrueBrain> it is not easy, to explain this, especially over text :P 17:22:13 <Beerbelott> However, I do not necessarily have konwledge on LoadFromDisk either, I just noticed something went wrong repeatedly on this specific call 17:22:26 <TrueBrain> so .. do we need to double check your claim? :D 17:22:36 <TrueBrain> as how I understand your PR, you claim that LoadFromDisk wants a filename, not a fullpath? 17:22:51 <Beerbelott> I'm a little wary of explaining how functions/procedures work w/o fully understanding them 17:23:15 <TrueBrain> always important to add that to PRs; not because we will think any less of you or your PR, in fact the oposite 17:23:27 <TrueBrain> as that would mean someone will check real quick if he agrees with your assessment 17:23:38 <Beerbelott> It searches through searchpaths so it *seems* so, yeah 17:23:41 <TrueBrain> (knowing what you don't know is more important than knowing what you know :D) 17:24:00 <Beerbelott> TrueBrain Knowing what I don't know makes me refrain to explain what I do not know :) 17:24:06 <TrueBrain> so by shifting your commit message from how you fixed it to what you wanted to fix, greatly helps :) 17:24:13 <Beerbelott> thus explaining WTH LoadFromDisk does 17:24:30 <Beerbelott> TrueBrain That I get 17:24:43 <Beerbelott> I'll give it another try? ;) 17:24:46 <TrueBrain> go for it! 17:25:00 <Beerbelott> I'll change the title for know, the commit will align afterwards 17:25:11 <TrueBrain> sure 17:27:23 <TrueBrain> * Load the Ini file's data from the disk. 17:27:24 <TrueBrain> * @param filename the file to load. 17:27:24 <TrueBrain> * @param subdir the sub directory to load the file from. 17:27:28 <TrueBrain> (documentation on LoadFromDisk) 17:27:33 <TrueBrain> it expects a FILENAME, so yeah 17:27:45 <Beerbelott> Fix: IniLoadFile::LoadFromDisk expects filename, BaseMedia<Tbase_set>::AddFile provides fullpath 17:27:46 <Beerbelott> ? 17:27:59 <Beerbelott> But again... that's bold about LoadFromDisk :( 17:28:02 <TrueBrain> personally, all those classes and templates are confusing the fuck out of me 17:28:05 <TrueBrain> those details are in the diff 17:28:08 <Beerbelott> It *seems* merely 17:28:18 <TrueBrain> well, there you are in a pickle 17:28:21 <TrueBrain> if you are right, your PR is valid 17:28:24 <TrueBrain> if you are wrong, your PR is not valid 17:28:27 <Beerbelott> yup 17:28:28 <TrueBrain> so .. you first need to be sure :) 17:28:48 <Beerbelott> That's where the reviews kick in? 17:29:04 <TrueBrain> mention that in the PR plz :) 17:30:32 <Beerbelott> Done? 17:31:41 <TrueBrain> in general, just be honest in PRs :) I rather spend 5 minutes checking something, than finding out later the assumption was wrong :P 17:32:00 <Beerbelott> I did try my best 17:32:18 <Beerbelott> You can notice I'm generally (too) verbose about the what and hows 17:32:51 <Beerbelott> It was under my assumption reviews were there to ensure assumptions where right and changes were not wreaking havok 17:33:07 <Beerbelott> -k+c 17:33:29 <Eddi|zuHause> reviews have a dozen different uses 17:33:29 <TrueBrain> and yeah, I am not sure what others would do, but I would have done: "Fix: LoadFromDisk expects a filename, not a fullpath\n\nAddFile has a parameter 'filename' which in fact have a 'basepath' in front of it. LoadFromDisk only wants 'filename' and will search the directories himself again to find the file. This behaviour sounds really really fishy 17:33:30 <TrueBrain> in general, and someone totally fucked up 'filename' versus 'fullpath', but owh well, what can you do" 17:33:36 <TrueBrain> pretty sure that commit message is not a good one either :P 17:34:13 <DorpsGek_II> [OpenTTD/OpenTTD] Berbe dismissed a review for pull request #7348: Fix: IniLoadFile::LoadFromDisk seems to expect filename, BaseMedia<Tbase_set>::AddFile provides fullpath https://git.io/fhh07 17:34:13 <TrueBrain> few things worth mentioning: writing commit message is an art; nobody really is good in it etc :P 17:34:14 <DorpsGek_II> [OpenTTD/OpenTTD] Berbe updated pull request #7348: Fix: IniLoadFile::LoadFromDisk seems to expect filename, BaseMedia<Tbase_set>::AddFile provides fullpath https://git.io/fhh88 17:34:16 <Eddi|zuHause> i would maybe do a pass or two over it to tone down the language :p 17:34:28 <TrueBrain> reviews work best if all information is given to the reviewer 17:34:46 <TrueBrain> and in general, if we trust people, we are less likely to go in detail of the PR 17:35:03 <TrueBrain> we don't have the time/spirit to check every commit in full depth ;) 17:35:43 <Beerbelott> I know that, thus full disclosure on how I proceeded. Seems I left loads of information out this time 17:35:48 <TrueBrain> the more I look in the code around this function, the more I am horified :P 17:35:57 <TrueBrain> happens to all of us Beerbelott :) 17:36:03 <Beerbelott> It was a pain to end up with that single-liner 17:36:25 <Beerbelott> I enven tried to use DEBUG preprocessor call there. Bust. 17:36:40 <TrueBrain> but it is really really weird 17:36:46 <TrueBrain> the function is called with a basepath attached 17:36:51 <TrueBrain> why is that ... 17:36:56 <Beerbelott> It wouldn't surprise me if that was one of the oldest codebase parts 17:37:21 <michi_cc> Oh, there's stuff way, way older :p 17:37:46 <nielsm> andythenorth: sorry was out, still need explanations of the new produce()? 17:37:58 <andythenorth> please nielsm :) 17:37:58 <Beerbelott> I burned LordAro positive review in the process... It was my only PR w/ a review and I broke it :D 17:38:16 <peter1138> 17:35 < TrueBrain> the more I look in the code around this function, the more I am 17:38:17 *** Compu has joined #openttd 17:38:19 <peter1138> horified :P 17:38:20 *** Compu has quit IRC 17:38:24 <peter1138> I suspect that is how Beerbelott got there in the first place :) 17:38:32 <peter1138> "OMG what is this" 17:38:38 <andythenorth> Alberth: yeah .rst or .md is preferred by me, .md seems to have won more 17:38:59 <Beerbelott> peter1138: Looking at debug traces, yes you're on point... 17:39:03 <TrueBrain> but seriously .. this code looks wrong .. 17:39:20 <TrueBrain> (not the PR; the code) 17:39:33 <nielsm> andythenorth: it's sort of the same, except you don't specify what expressions apply to each "slot" at the industry (first/second/third input, first/second output) but instead specify what registers apply to each named cargo the industry handles in respectively input and output 17:39:46 <Alberth> .md is simpler, which is often sufficient, not to mention GH uses it as wiki language 17:40:08 <TrueBrain> that BASESET_DIR looks weird 17:40:08 <Beerbelott> peter1138: You know what? I was tracing all the loading chain to try to have a grasp on how/where searchpaths were used to try to understand a way to document/improve this directory crap found out during PR #7339 17:40:18 <TrueBrain> shouldn't that just be NO_DIRECTORY? 17:40:25 <andythenorth> nielsm: the example confuses me, it's using STORE_TEMP? https://github.com/OpenTTD/nml/pull/15/files#diff-4f9eba8f8f19c28dee32528003cdc1ecR40 17:40:49 <andythenorth> so are the numbers storage numbers, or amounts? 17:41:21 <Beerbelott> TrueBrain That's the kind of knowledge I was referencing. I know sth was fishy there... but global understandind whould probably yield better changes 17:43:21 *** hylshols7qui[m] has joined #openttd 17:43:58 <nielsm> andythenorth: here's a somewhat more complex example which I think might actually be easier to understand? https://0x0.st/zHBc.txt 17:44:51 <nielsm> a chain of callbacks picking what combination of inputs stockpiled to use, setting registers for how much of each input to consume 17:45:11 <nielsm> and then using those registers in the final produce() to consume and produce named cargos 17:46:19 <andythenorth> ok that looks easy to understand, thanks 17:46:24 <nielsm> the result of the expressions in the produce() line are the amounts of cargo to consume/produce, nmlc handles putting them in registers 17:46:33 <TrueBrain> yeah, I am pretty sure that should be NO_DIRECTORY instead 17:46:55 <TrueBrain> it works with BASESET_DIR, but that is only because it is ever used on BASESET_DIR 17:47:02 <Beerbelott> To trace the code behaviour, I use a modified version of functions called through the DEBUG macro including pid, file, line & function name. Would that be of interest to be added to the codebase or would that end-up w/ too long/verbose lines? 17:47:38 <TrueBrain> from what I gather, Scan() scans BASESET_DIR for ini files 17:47:45 <TrueBrain> when found, AddFile is called (that is how it works) 17:47:59 <TrueBrain> with 'filename' as the fullpath, basepath_length the offset of the subdirectory 17:48:16 <TrueBrain> LoadFromDisk either expects a DIR to search in, or NO_DIRECTORY if the file already has everything 17:48:34 <TrueBrain> so your PR now removes the basepath_length again, and again searches the searchpaths 17:48:42 <TrueBrain> basically, if you have 2 identical named files in 2 folders 17:48:47 <TrueBrain> with your PR, it will open the same twice 17:48:49 <TrueBrain> instead of both :D 17:48:59 <TrueBrain> but this really is some fishy code :P 17:50:09 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7348: Fix: IniLoadFile::LoadFromDisk seems to expect filename, BaseMedia<Tbase_set>::AddFile provides fullpath https://git.io/fhhVC 17:51:44 <Beerbelott> I'll give it a shot 17:51:45 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7348: Fix: IniLoadFile::LoadFromDisk seems to expect filename, BaseMedia<Tbase_set>::AddFile provides fullpath https://git.io/fhhVW 17:52:54 <TrueBrain> owh, my suggestion might kill tar support 17:53:05 <TrueBrain> if that exists in the first place for basesets 17:53:53 <peter1138> It does, yes. 17:53:56 <peter1138> It works fine. 17:54:06 <TrueBrain> this code ..... lol 17:54:07 <peter1138> OpenGFX is a tar. 17:54:32 <peter1138> But it also works to put the original files in tars, even the sound and music files. 17:54:36 <TrueBrain> I get why Beerbelott had a headache :) 17:55:00 <peter1138> https://paste.openttdcoop.org/pzjupdlvi 17:55:21 <peter1138> Although actually having dos-sound and win-sound together doesn't work, because the filename inside is still sample.cat. 17:55:59 *** Wormnest has quit IRC 17:55:59 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7349: Fix: Show industry name in Land Area Information window for oil-rig type stations instead of just 'Oil Rig' https://git.io/fhhVB 17:56:23 <Beerbelott> TrueBrain Well I still need to improve on PR/commit message writing (which is an infinite process, implying subjectivity), but thx for taking the necessary time to have dug into the dirt ;) 17:56:37 <Beerbelott> I'll push yet another commit w/ proposed changes 17:56:40 <nielsm> oh.... right 17:56:44 <Beerbelott> suggested* 17:56:53 <nielsm> I'll have to fix kdtree to work with the new station catchment area 17:57:19 <TrueBrain> Beerbelott: now I feel all dirty :P 17:57:37 <TrueBrain> peter1138: seems musicsets don't support tar :P 17:57:42 <TrueBrain> (gfx and sfx do) 17:57:47 <TrueBrain> what is that for a weird thing ... 17:57:59 <peter1138> Oh, whoops, yes, I didn't notice :-) 17:58:07 <TrueBrain> why ... is music different 17:58:09 <TrueBrain> I mean .. why?! 17:58:11 <TrueBrain> TELL ME WHY 17:58:16 <peter1138> Well, it was becuase we used external players. 17:58:22 <TrueBrain> ah, ofc :) 17:58:25 <TrueBrain> makes sense :D 17:58:30 <peter1138> With libfluidsynth it should be possible, I think? 17:58:56 <nielsm> change all music players to use midifile.cpp stuff and feed midi directly into the driver 17:58:58 <TrueBrain> tars are only searched in the old data older and old gm folder 17:59:01 <TrueBrain> not in thei baseset dir 17:59:05 <nielsm> and it can read data from anywhere without temp files! 17:59:06 <TrueBrain> seriously .. all these exceptions on exception 17:59:20 <TrueBrain> nielsm: how does that work for external midi players? :P 17:59:33 <nielsm> it doesn't? :D 17:59:43 <TrueBrain> euhm, what I said above is not true 17:59:45 <TrueBrain> neither is this comment 17:59:46 <TrueBrain> /* Searching in tars is only done in the old "data" directories basesets. */ 17:59:46 <TrueBrain> uint num = fs.Scan(GetExtension(), Tbase_set::SEARCH_IN_TARS ? OLD_DATA_DIR : OLD_GM_DIR, Tbase_set::SEARCH_IN_TARS); 17:59:46 <TrueBrain> return num + fs.Scan(GetExtension(), BASESET_DIR, Tbase_set::SEARCH_IN_TARS); 17:59:54 <TrueBrain> seriously .. that fucking comment is a fucking lie 18:00:05 <nielsm> tar pit 18:00:07 <peter1138> nielsm, midifile stuff doesn't work with tars, either. 18:00:19 <peter1138> I don't know why, it uses FioFOpenFile. Hmm. 18:00:44 <nielsm> peter1138, well at least it could be made to! 18:00:56 *** gelignite has joined #openttd 18:01:04 <peter1138> Ah, I suspect it's passed a filename already. 18:01:31 <peter1138> Hmm, no. 18:01:58 <TrueBrain> there is code to patch up if a file could not be found in ways I dont dare to talk about :P 18:02:18 <peter1138> It's complicated. 18:02:21 <TrueBrain> if you were looking in SUBDIR BASESET, it does something else, in case the file was not found 18:02:25 <peter1138> Like some kind of relationship status. 18:02:29 <TrueBrain> yeah .. 18:02:39 <TrueBrain> well, git blame shows who created this mess 18:02:42 <TrueBrain> sadly, I cannot ask him to fix it :P 18:02:44 <TrueBrain> he won't :D 18:02:46 <peter1138> Probably these are to handle edgecases with old data paths, non-xdg, etc... 18:02:53 <TrueBrain> yeah 18:03:42 <TrueBrain> well, honestly, this whole searchpath stuff could use a revamp anyway 18:03:48 <TrueBrain> as still .. global / shared / personal 18:03:51 <TrueBrain> I don't understand it :D 18:04:14 <peter1138> global is /usr/local/ 18:04:22 <peter1138> shared is ~/.local/share 18:04:30 <peter1138> personal is ./ 18:04:33 <peter1138> or somethign like that 18:04:34 <Alberth> in ~ :p 18:04:40 <peter1138> relative to the config file 18:04:43 <TrueBrain> yeah ... that 'shared' vs 'personal' is a mystery to me :P 18:04:50 <TrueBrain> ah, no, PERSONAL is weirder 18:04:52 <TrueBrain> weirder? 18:04:54 <TrueBrain> yes, weirder 18:05:07 <Beerbelott> I am glad all this discussion reflects what I have been through these past days hetting lost in search path names, finding out exceptions on how directories were scanned, multiple file loading functions.... 18:05:09 <peter1138> ~/.openttd is the old way of course, but many probably still have it. 18:05:25 <TrueBrain> personal dir is ~/.openttd 18:05:31 <Beerbelott> No wonder I dnded up looking at base_media_func -_-' 18:05:33 <TrueBrain> (it still is) 18:05:41 <Beerbelott> TrueBrain Not necessarily :) 18:05:52 <Beerbelott> https://github.com/OpenTTD/OpenTTD/pull/7339 18:06:10 <Beerbelott> in trunk, personal_dir can end up being the dir where the config file is loaded from :D 18:06:16 <Beerbelott> (unless you use XDG) 18:06:22 <TrueBrain> I am going to walk away slowly now :P 18:06:34 <TrueBrain> okay, at least the shared vs personal makes sense there 18:06:37 <TrueBrain> shitty names 18:06:41 <TrueBrain> but that would make sense 18:06:43 <Beerbelott> (but the XDG creates a new searchpath instead of overwriting the PERSONAL_DIR entry... why??? no idea) 18:06:48 <Alberth> one big hole is that newgrf is searched and found on the disk, but when you load it, it uses deduction what it was, which may be wrong if several things have the same name 18:07:00 <TrueBrain> Alberth: yup .. 18:07:16 <peter1138> nielsm, oh... even fluidsynth uses direct access, not MidiFile :/ 18:07:25 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7348: Fix: IniLoadFile::LoadFromDisk seems to expect filename, BaseMedia<Tbase_set>::AddFile provides fullpath https://git.io/fhhVK 18:07:45 <nielsm> peter1138: yeah, it could be made to use MidiFile but it'd be a bunch of work 18:07:48 <peter1138> Well, it uses MidiFIile::GetSMFFile. 18:07:52 <TrueBrain> Alberth: and I was thinking: look, even the 'tarfilename' is given to AddFile .. but only a very few implementations use it :P 18:07:57 <nielsm> everything uses that 18:08:02 <TrueBrain> (I guess AIs, as they have the same names in them :P) 18:08:10 <Beerbelott> TrueBrain shall I follow your advice or not? Your comments on PR are free rolling :D 18:08:16 <nielsm> since that's what decocdes the MPS midi to standard midi 18:08:21 <nielsm> if the user has chosen a dos music set 18:08:25 <Alberth> probably for squirrels, yes 18:08:27 <TrueBrain> Beerbelott: it is not like I know wha tI am talking about :P So no .. this needs more testing :D 18:08:45 <TrueBrain> it is possibly my suggestion works, but someone needs to test it, including tar support 18:08:49 <TrueBrain> it might or might not fix your issue :P 18:09:10 <TrueBrain> (I haven't touched the code in 5+ years .. so yeah .. don't take my word for it, please :D) (I am being serious) 18:09:38 <TrueBrain> I am going to play Path of Exile now :P 18:09:49 <TrueBrain> what a mess ... :D 18:10:11 <Beerbelott> How could I test this tar thing? 18:10:29 <Beerbelott> Would merely putting orig_dos_de.obg in a tar archive work? 18:11:41 <TrueBrain> peter1138? :D 18:11:47 <peter1138> Hmm? 18:11:52 <peter1138> obg? Yes. 18:14:33 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhd4b 18:15:05 <nielsm> anyone want to give that a review soon? :3 18:15:47 *** Thedarkb-T60 has joined #openttd 18:16:36 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7349: Fix: Show industry name in Land Area Information window for oil-rig type stations instead of just 'Oil Rig' https://git.io/fhhaX 18:16:42 <peter1138> I have been ;) 18:17:02 <peter1138> Might be nice to squash it a bit? 18:17:17 <nielsm> yeah I intend to squash it down to 4 commits before merge 18:17:25 <peter1138> Can you merge it before review then? 18:17:35 <nielsm> sure 18:18:13 <peter1138> was there much to change for non-rect? 18:19:19 <peter1138> I think I removed the one place where k-d tree would've been useful. 18:19:38 <nielsm> nope, it was just two lines added at the same spot 18:19:49 <nielsm> that it needed me to tell both should be there 18:20:23 <nielsm> I did a full project search for FOR_ALL_STATIONS and there's none left that search for stations near somewhere 18:21:12 <peter1138> It was mainly about towns, though. 18:23:03 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhd4b 18:23:51 *** Thedarkb-T60 has quit IRC 18:24:49 <peter1138> Ah yeah, I remember ModifyStationRatingAround() 18:24:56 <peter1138> I considered converting it to a tile loop. 18:25:05 <peter1138> But the radius is WAY WAY larger than the catchment stuff. 18:25:13 <peter1138> Would've been scanning tons of tiles. 18:28:56 <peter1138> I have a savegame where some town tiles are WAY WAY out of the town radius. 18:33:09 <nielsm> ForAllStationsNearTown<> could be improved with a fast-ish integer square root upper bound 18:33:42 <DorpsGek_II> [OpenTTD/OpenTTD] Berbe commented on pull request #7348: Fix: IniLoadFile::LoadFromDisk seems to expect filename, BaseMedia<Tbase_set>::AddFile provides fullpath https://git.io/fhhwf 18:33:50 <nielsm> (close to but greater than the true sqrt) 18:34:44 <peter1138> Huh? 18:34:56 <peter1138> It doesn't use square root. 18:35:23 <nielsm> it should, ideally 18:35:26 <peter1138> Hmm 18:35:48 <nielsm> it won't be wrong, but it'll be inefficient for towns with very large radii 18:35:49 <peter1138> You think replacing the squaring with a precalculated square-root would save much? 18:36:48 <nielsm> nah the search radius passed on to ForAllStationsRadius<> is what needs to be taken a proper root of 18:37:07 <nielsm> instead of the really bad approximation that is division by two 18:37:57 <peter1138> Ah. 18:38:43 <peter1138> If it should be a square root, you could comment it with ("this should be a square root but that's too damn slow") 18:38:48 <peter1138> -with 18:39:38 <nielsm> I just want a number that is not less than the true square root, closer to the true value makes the kdtree search have less false positives 18:39:59 <peter1138> Yeah, I mean someone in the future may wonder about iot. 18:40:52 <peter1138> Say some algorithm changes and non-squared radius becomes available. 18:41:03 <peter1138> Who knows 18:43:23 <peter1138> Btw 18:43:38 <peter1138> in station_cmd.cpp:3836 18:43:54 <peter1138> That's the bit that was a FOR_ALL_STATIONS() briefly in the non-rect-catchment PR. 18:44:27 <peter1138> I don't know if a k-d tree look up with be beneficial or not. 18:44:35 <peter1138> s/with/would/ 18:45:32 <nielsm> hmm, not sure if that's possible in a reliable manner 18:45:43 <nielsm> since the tree only stores the station sign locations 18:45:53 <peter1138> I switched it back to a tile loop as it's basically fixed-complexity. 18:46:01 <peter1138> Ah, right. 18:46:14 <nielsm> the distance from sign to a tile within catchment depends on both catchment radius _and_ max station spread 18:46:18 <peter1138> Yeah you'd have to test a very large area. 18:46:19 <nielsm> and the max spread can change during a game 18:46:31 <peter1138> Yup. That was something I found :-) 18:46:46 <peter1138> You basically always have to use the max, regardless of current setting. 18:46:50 <peter1138> Even if it's never been used, heh. 18:47:06 <nielsm> I don't think you can do any better than this without getting wrong results in some corner cases 18:47:36 <peter1138> *nod* 18:47:46 <peter1138> Still, it's better than it used to be. 18:48:01 <peter1138> Used to do that tile scan every time a tile produced cargo. 18:48:13 <nielsm> any more points of attention before I push again? :) 18:49:44 <peter1138> 50k stations save seems better. 18:49:54 <peter1138> Loading is slow, dunno if it's actually worse thoug. 18:50:31 <nielsm> panning the viewport is significantly better with that save 18:50:48 <nielsm> since the viewport sign kdtree limits the number of signs considered a _lot_ 18:51:08 <peter1138> Slowness might be non-rect-catchment 18:51:28 <peter1138> Preloading the catchments can take a while with that many stations. Hmm. 18:51:52 <nielsm> yeah that save has lots of disconnected station parts, spread over a large distance 18:51:52 <peter1138> Nice long pause when toggling neutral stations 18:52:09 <peter1138> Oof 18:52:11 <nielsm> so it'll probably make lots of big bitmap catchments 18:52:14 <peter1138> Yup. 18:52:20 *** glothit7ok[m] has joined #openttd 18:52:28 <peter1138> Mind you, that was a save designed to stress things and not be a realistic save. 18:52:34 <nielsm> yes :P 18:54:18 <peter1138> Is KDTREE_DEBUG stuff necessary to keep? 18:55:44 <nielsm> maybe not really, but otoh I think the dead code might help explain the rest 18:56:11 *** ist5shreawf[m] has joined #openttd 18:56:17 <nielsm> also for potential unit tests in the future 18:56:21 <peter1138> Alright 18:56:30 <peter1138> Nothing stands out. 18:56:59 <peter1138> I think gabdazm picked up quite a few things which you addressed already. 18:57:40 <nielsm> the 50k stations save is funny how all the towns grow at insane rates 18:58:29 <peter1138> Hmm 7pm. Maybe dindins. 18:58:33 <andythenorth> yeah 18:58:35 <andythenorth> I should make 18:58:42 <andythenorth> chicken burger + chips 19:03:44 *** gelignite has quit IRC 19:06:08 <peter1138> Hmm, GM.CAT does not work, only gm.cat :/ 19:07:04 <nielsm> I had a lot of annoying issues with that 19:07:14 <nielsm> clearly not all solved 19:07:53 <peter1138> Does not work in a tarfile either. 19:08:14 <peter1138> Oh well, not worth wasting time on :) 19:08:28 <nielsm> well, I don't expect anyone will actually create their own mps midi data 19:08:47 <nielsm> (they'd have to make the tooling first, and it doesn't really have any advantages over standard midi) 19:10:22 <peter1138> Sounds slightly different. Maybe just quieter. 19:10:47 <nielsm> the original driver does have some curious attenuation rules 19:10:55 <nielsm> so yes it will be less loud 19:14:00 *** Thedarkb-T60 has joined #openttd 19:17:41 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhd4b 19:17:58 <DorpsGek_II> [OpenTTD/OpenTTD] Berbe opened pull request #7350: Change: Add pid, file, line number & function/procedure name to debug messages https://git.io/fhhwo 19:21:16 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhhwi 19:24:40 *** octernion has joined #openttd 19:27:14 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhd4b 19:27:37 <nielsm> my only open PRs now are backports :o 19:29:04 *** Thedarkb-T60 has quit IRC 19:29:43 <peter1138> Make some more ;) 19:30:25 <andythenorth> port FIRS? 19:30:27 <andythenorth> PR that 19:30:33 * andythenorth should do it, but eh 19:30:55 <andythenorth> about one billion things keep beeping and telling me to do stuff 19:34:23 <nielsm> but maybe I should try to do this thing: https://user-images.githubusercontent.com/1062071/53649832-66ff6600-3c43-11e9-9313-15b5f249294b.png 19:36:13 *** snail_UES_ has joined #openttd 19:38:23 <andythenorth> interesting nielsm 19:41:07 <nielsm> that picture? 19:41:18 <DorpsGek_II> [OpenTTD/OpenTTD] Berbe commented on pull request #7350: Change: Add pid, file, line number & function/procedure name to debug messages https://git.io/fhhwb 19:41:42 <andythenorth> nielsm: what's the last entry in produce() now? 19:41:52 <nielsm> same as before :) "repeat" 19:41:53 <andythenorth> how many times to repeat? 19:41:54 <andythenorth> ok 19:42:16 <nielsm> just bool whether to give the cb chain another go after that produce is executed 19:42:31 <snail_UES_> amdythenorth: I’m reading the chat log from earlier today… seriously it takes more than a minute for you to compile IH? :O 19:43:11 <nielsm> parked branches I haven't made PRs of yet: adlib-music, sampled-music, cargotiles, gs-industry-control, password-warning 19:43:24 <andythenorth> snail_UES_: yes 19:43:33 <andythenorth> it's horrible 19:43:34 <nielsm> password-warning should be low hanging, it's pretty much just stuck on getting some ugly layout 19:43:36 <andythenorth> nml is horrible 19:43:50 <andythenorth> snail_UES_: how do you like m4fnfo? 19:45:18 <peter1138> nml is way better than the alternatives. 19:46:14 <nielsm> the real magic in nml is translating expressions to varaction2 chains 19:46:52 <nielsm> I'm not sure if m4 is powerful enough to be able to do that 19:47:11 <snail_UES_> andythenorth: m4nfo is great… it’s very quick and the code is simple and easy to read 19:47:16 <snail_UES_> very expandable as well 19:47:35 <snail_UES_> my set is pretty complex, but it compiles in a matter of a few seconds 19:47:49 <snail_UES_> and if I do a change in one of the files, it compiles in literally less than 3-4 seconds 19:48:03 <snail_UES_> peter1138: how can you say nml is better? 19:48:14 <andythenorth> I wonder if I can template m4nfo 19:48:25 <snail_UES_> yeah, I use templates all the time 19:48:37 <andythenorth> no, I mean, write out m4nfo with python 19:48:41 <andythenorth> ;) 19:48:43 <nielsm> PR this? https://0x0.st/zHMR.png 19:49:02 <snail_UES_> use python to write m4nfo code, then use m4nfo to write nfo code out of that? 19:49:08 <andythenorth> yes 19:49:13 <snail_UES_> sounds pretty convoluted, doesn’t it? :p 19:49:23 <nielsm> the thing is, m4 _is_ a templating language 19:49:26 <nielsm> :) 19:49:33 <nielsm> (well, macro expansion language) 19:49:37 <snail_UES_> ok, but m4nfo itself is not difficult to learn 19:50:05 <andythenorth> I haven't tried m4, but my experience of macro expansion languages is that they require very specific way of thinking 19:50:38 <andythenorth> maybe I'm just burnt by CPP 19:50:54 <snail_UES_> andythenorth: well, a little bit. Like an F…THEN…ELSE…END IF block would be written in a slightly different way 19:50:59 <snail_UES_> it’s just a matter of getting the hand of it 19:51:02 <snail_UES_> *hang of it 19:51:10 <nielsm> right, this is why I haven't PR'd that yet: https://0x0.st/zHM7.png 19:51:15 <peter1138> LOL 19:51:23 <peter1138> m4nfo documents some non-standard flags for railtypes. Oh dear. 19:51:34 <andythenorth> who's used m4? 19:51:51 <peter1138> Something about 90 deg curves. 19:52:04 <nielsm> I've written a bit of autoconf, does that count? :( 19:52:19 <andythenorth> I am just curious about getting out of nml 19:52:25 <nielsm> (I'd rather not touch autoconf) 19:52:26 <andythenorth> it has to die, so what's the destination? 19:52:33 <peter1138> RT_ALLOW90 Always allow 90° curves [*] 19:52:34 <peter1138> RT_DISALLOW90 Always disallow 90° curves [*] 19:52:36 <peter1138> Mmmhmm. 19:52:47 <peter1138> Well, we just screwed any GRF using them :p 19:54:09 <snail_UES_> peter1138: I think this was when we discussed about adding a flag that would allow 90-degree curves on certain railtypes 19:54:17 <snail_UES_> it probably didn’t make it to trunk (yet) 19:54:22 <peter1138> Yeah but it's a very stange place to document it. 19:54:37 <peter1138> https://newgrf-specs.tt-wiki.net/wiki/Action0/Railtypes#Rail_type_flags_.2810.29 19:54:40 <peter1138> ^^ correct place 19:54:46 <peter1138> And those bits are used officially now. 19:56:56 <snail_UES_> right… 19:57:11 <snail_UES_> but in what else is nml superior to m4nfo? 19:57:38 <snail_UES_> I’m genuinely curious, because so far I’ve had totally no issues with m4nfo (at least none so serious that makes me want to switch out of it altogether) 19:58:28 <peter1138> Erm, well, it's not m4 :p 19:58:53 <peter1138> I guess m4nfo is more advanced than I'd assumed. 19:59:24 * andythenorth considers trying it 19:59:47 <andythenorth> wonder if I can use both at once 20:00:01 <andythenorth> probably 20:00:03 <nielsm> does m4nfo have any system for automatically assigning sprite ids? it looks to me like it requires you to define every sprite id manually 20:00:03 *** Progman has quit IRC 20:00:03 <nielsm> from the examples in the manual 20:00:21 <andythenorth> interesting idea: m4nfo + nml > nfo > grfcodec 20:00:23 <snail_UES_> nielsm: you mean graphic sprites, or IDs for vehicles? 20:00:24 *** Progman has joined #openttd 20:01:00 <nielsm> snail_UES_, it's the def(1) def(2) etc. things I'm thinking of 20:01:05 <peter1138> So... If I was to add more company colours... 20:01:38 <andythenorth> add a 3CC option 20:01:38 <nielsm> what are those numbers and why are they not textual identifiers? 20:01:38 <andythenorth> I would use it 20:01:43 <peter1138> No. 20:01:59 <peter1138> def() and ref()? 20:02:08 <snail_UES_> you can use textual identifiers, if you assign them to a number. I do it all the time 20:02:32 <peter1138> You have to manually assign the number? 20:02:34 <snail_UES_> I can define a macro and assign it to a number between 0 and 255 20:02:59 <peter1138> nielsm, basically it looks like a macro wrapper on top of nfo, rather than a language like nml. 20:03:12 <snail_UES_> define(my_id,123) 20:03:15 <andythenorth> it is what it says on the tin 20:03:17 <peter1138> Which it is, because it's m4. 20:03:23 *** Samu_ has joined #openttd 20:03:35 <nielsm> yeah it looks like it specifically does not have the expression magic nml has 20:03:35 <snail_UES_> then you can use def(my_id) and ref(my_id) 20:03:36 <nielsm> that converts arbitrary expressions to a varaction2 chain 20:03:56 <peter1138> nielsm, and that's why it's more efficient ;) 20:03:58 <snail_UES_> but once you use numbers, it’s very easy to keep track of what’s going on in the code 20:04:00 <nielsm> you need to write every calculation step out with all temporaries 20:06:23 <nielsm> so yeah, m4nfo is like a macro assembler, while nml is more like a pure functional language? :D 20:06:23 <andythenorth> yes 20:06:23 <snail_UES_> but the point is, even for a complex set as mine (which is full of features), you rarely “calculation” steps at all 20:06:24 <snail_UES_> *you rarely need “calculation” steps at all 20:06:24 <andythenorth> trains don't 20:06:24 <andythenorth> it's industries where that applies 20:06:24 <snail_UES_> most of the code is plain and simple 20:06:24 <nielsm> industries are different, I think 20:06:24 <nielsm> with production cbs 20:06:24 <andythenorth> industries aren't finished in m4nfo 20:06:24 <andythenorth> according to docs 20:07:59 <Eddi|zuHause> i think the route to take with an nml2 is to keep as much of the syntax as possible, but rewrite it internally (maybe not even in python), and add an intermediate language (object file) that allows linking 20:10:06 *** Samu has quit IRC 20:10:21 *** Hazzard has quit IRC 20:10:28 *** ad5twoknebor[m] has joined #openttd 20:10:33 <andythenorth> can we lose the syntax too? :P 20:10:38 <andythenorth> it's faffy 20:10:41 *** Terkhen has quit IRC 20:10:46 *** FLHerne has quit IRC 20:10:59 *** FLHerne has joined #openttd 20:11:10 <Alberth> add better syntax as well :) 20:11:32 <Alberth> ie backwards compatible as much as you can 20:12:03 *** Hazzard has joined #openttd 20:12:06 <Alberth> perhaps with some form of deprecated eventually 20:12:21 <Eddi|zuHause> you can add new syntax, but existing GRFs should need as little change as possible 20:12:44 <peter1138> Someone was saying that backwards compatibility cruft is not desired. 20:13:06 *** Xaroth has quit IRC 20:13:11 <Eddi|zuHause> maybe, but there's different levels of that :p 20:13:11 <nielsm> planetmaker 20:13:29 <andythenorth> rewriting isn't hard 20:13:30 *** guru3 has quit IRC 20:13:32 <Alberth> you can overdo backwards compatibility 20:13:34 <andythenorth> just change a few templates 20:13:52 <Alberth> think of poor garryg :) 20:13:58 <andythenorth> it's all an intermediate format anyway 20:13:59 *** guru3 has joined #openttd 20:14:08 *** Terkhen has joined #openttd 20:14:14 *** ChanServ sets mode: +o Terkhen 20:14:45 <Alberth> new syntax should be so much better that everybody just shifts to it 20:15:06 <Alberth> that leaves tohe existing no-longer-maintained sources 20:15:11 <Alberth> *the 20:17:07 <Eddi|zuHause> my compiler construction professor was very adamant in the rule that you don't change the specs to fit your compiler, you write the compiler to implement the specs. 20:17:39 <Alberth> I agree 20:17:51 <andythenorth> hmm 20:18:37 <andythenorth> I like the idea of doing something naive though, and forcing scopes 20:18:37 <Alberth> and specs should be user-oriented, ie make it simple to use the language to express what is needed 20:18:43 <Alberth> you can always have one very very very long scope, can't you? 20:19:02 <snail_UES_> in general, deprecating “old” stuff could be dangerous 20:19:09 <andythenorth> so all symbols are currently global 20:19:16 <andythenorth> there's no encapsulation of any kind 20:19:18 <Alberth> not advisable, but yeah can be done 20:19:35 <andythenorth> but global symbols leads to a bloated syntax 20:19:40 <snail_UES_> look what they’ve done with skype… they rewrote it from the ground up from the perspective of a millennial obsessed with social media… lots of old features were left out 20:19:51 <snail_UES_> result: lots of users are migrating away from skype... 20:20:25 <Alberth> andy: you provide scope support, but don't force it 20:20:38 <Alberth> if you really don't want it, ok, it's your problem 20:21:09 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7351: Add: Warn players that company passwords are not truly secure https://git.io/fhhrD 20:21:12 <andythenorth> I will defer to people who know how to design compilers :) 20:21:12 <andythenorth> I don't 20:21:17 <andythenorth> but I would rather have syntax where the compiler can infer scope from context 20:21:23 <peter1138> nielsm, so i guess the 16-in-16-out stuff needs a rethink? 20:21:28 <andythenorth> rather than the current global namespace 20:21:42 <Alberth> yeah global scope is horrible 20:21:45 <nielsm> peter1138: in nml? maybe 20:22:01 <peter1138> nielsm, at least the dropping-the-old-syntax part 20:22:11 <Alberth> do you have syntax in mind, andy? 20:22:18 <andythenorth> I did make one years ago, I am looking 20:22:29 <nielsm> I had zero experience with nml whatsoever when I did the initial patch 20:22:34 <nielsm> now I know a bit more about it 20:23:08 <andythenorth> oh here it is Alberth compares current nml, and a (not very good) scope proposal https://paste.openttdcoop.org/pgzr2xfsv 20:23:14 <andythenorth> two sections 20:23:26 <Alberth> I still totally fail with understanding grf, niels :) 20:23:30 <andythenorth> L79 onwards is the proposal 20:24:02 <andythenorth> I am sure it is bad, but it offers 3 things 20:24:09 <andythenorth> - reduces the tedious ID management 20:24:31 <andythenorth> - is one route to partial compiles and linkers 20:24:46 <andythenorth> - might speed up the implementation because it doesn't have to resolve IDs across the whole tree 20:24:55 <andythenorth> and it's just easier to write 20:25:07 <Alberth> the latter is the important bit 20:25:13 <andythenorth> I have found very limited cases for 'global' action 2 chains 20:25:36 <Alberth> compiler is likely better at finding such cases 20:25:39 <peter1138> You can share them across vehicles, but yes. 20:25:42 <andythenorth> and very few, where the performance benefit of a global chain wouldn't be outweighed by a much faster compile 20:25:43 <Eddi|zuHause> nml is missing the most obvious: procedure calls 20:26:10 <andythenorth> also the nml idea of simplifying authoring by allowing string IDs 20:26:10 <Alberth> yeah, I wondered if the switch could be changed 20:26:11 <andythenorth> doesn't work 20:26:12 <peter1138> Really? Hmm. 20:26:29 <andythenorth> the string IDs are completely unstable and unusable, so I also have to provide numeric IDs for action 0 entities 20:26:38 <andythenorth> in retrospect, they are obviously flawed :) 20:26:47 <peter1138> andythenorth, uhm. 20:27:00 <Eddi|zuHause> nfo has procedure calls, i looked into patching them into nml, but didn't get far 20:27:07 <Alberth> stringIDs are the NAME part in NAME:text ? 20:27:09 *** glx has joined #openttd 20:27:09 *** ChanServ sets mode: +v glx 20:27:11 <peter1138> so about 20 minutes ago we said that numeric IDs were bad. 20:27:13 <andythenorth> no 20:27:21 <andythenorth> numeric IDs are fine 20:27:21 <andythenorth> https://paste.openttdcoop.org/pgzr2xfsv#line-31 is an example 20:27:36 <andythenorth> numeric IDs are fine, because we like savegames not to break all the time 20:27:37 <andythenorth> thanks 20:27:37 <peter1138> numeric IDs for every varact2? 20:27:46 <andythenorth> no just action 0 20:27:49 <peter1138> hmm 20:28:02 <andythenorth> you recompiled, and your train ID changed? 20:28:04 <andythenorth> boom 20:28:07 <andythenorth> nice savegame you had 20:28:08 <peter1138> well you can provide them with nml, no? 20:28:22 <andythenorth> yes, and I also have to provide the stupid string IDs 20:28:23 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7351: Add: Warn players that company passwords are not truly secure https://git.io/fhhrD 20:28:38 <andythenorth> I use a table of global constants 20:28:53 <andythenorth> well, strictly, I hide it all away in python 20:29:50 <Eddi|zuHause> which part of string IDs will crash savegames? 20:30:00 <andythenorth> not string IDs as in action 4 20:30:06 <andythenorth> the nml identifier for the action 0 20:30:11 *** Progman has quit IRC 20:30:24 <andythenorth> they give unstable numeric IDs to the action 0 entity 20:30:36 <andythenorth> there is simply no way they can be stable as designed 20:30:54 <Eddi|zuHause> i don't follow 20:30:55 <andythenorth> unless they're being hashed in a way I don't know about? 20:31:11 <Alberth> so you want to assign them, and get warned when they change? or assigned automgaically, and saved for re-assigning the next time? 20:31:28 <andythenorth> I don't care, I solved it by writing a proper newgrf compile :) 20:31:43 <andythenorth> I just find it tedious having to manage both when creating new action 0 entities 20:32:03 <Alberth> fair 20:32:13 <andythenorth> e.g. https://github.com/andythenorth/firs/blob/master/src/global_constants.py#L2 20:32:14 <peter1138> In that example, isn't 600 the ID? 20:32:19 <Eddi|zuHause> you mean, in the nml file you want a mapping table of vehicle IDs? 20:32:24 <andythenorth> 600 is the ID that my compile inserts 20:32:31 <andythenorth> the nml ID is action 20:32:34 <andythenorth> acton * 20:32:35 <Alberth> but the compiler could assign numbers, they just have to stick to the same action 0 ? 20:32:42 <andythenorth> it can't without a table 20:32:51 <Eddi|zuHause> so you can write once "TruckXYZ is id 600"? 20:32:53 <Alberth> sure, but who manages that table? 20:33:00 <andythenorth> I manage that table 20:33:18 <Alberth> that is also wanted? or out of necessity? 20:33:30 <andythenorth> I think my case is unusual 20:33:41 <andythenorth> probably distorts the goals 20:33:46 <peter1138> It's probably useful for backwards compatibility. 20:33:46 <Eddi|zuHause> well, i solve that by making those a #define 20:33:55 *** Progman has joined #openttd 20:33:57 <Eddi|zuHause> i think 20:34:02 <Eddi|zuHause> maybe 20:34:05 <Eddi|zuHause> i don't remember 20:34:13 <andythenorth> I would expect you wrote a global constants cpp file or similar 20:34:14 <Eddi|zuHause> and i don't want to look it up :p 20:34:30 <andythenorth> it's not an unsolved problem for me, it's just silly 20:34:32 <Alberth> sounds like a logical solution to me 20:34:37 <Eddi|zuHause> well, i have a giant table, it has an ID# entry 20:34:57 <Eddi|zuHause> to make sure the IDs stay constant over reshufflings and stuff 20:35:00 <Alberth> I'd like to know hoe to make it unsilly 20:35:04 *** gelignite has joined #openttd 20:35:09 <Alberth> *how 20:35:34 <peter1138> Alberth, this is one of those examples of people developing workarounds instead of solutions, I think :( 20:35:37 <Alberth> ie what's the proper solution 20:35:47 <andythenorth> I don't know :) 20:36:11 *** Terkhen has quit IRC 20:36:11 <Alberth> peter1138: that's fair enough, unless you know how to write a compiler 20:36:36 <Alberth> ok, it'll pop up again 20:36:40 <peter1138> Sure, but sometimes it pays just to tell other people you have this issue ;p 20:36:43 <andythenorth> if we want tokens that map stably to numbers, what else is there except a table? 20:36:58 <Alberth> yes, you need a table 20:37:02 <andythenorth> nml tries to remove the need for authors to manage IDs 20:37:05 <Alberth> I agree with that 20:37:17 <andythenorth> but anyone making anything more than 'my first newgrf' is going to end up writing numeric IDs 20:37:20 <peter1138> Yup. It should be possible to supply a fixed ID, though. 20:37:28 <peter1138> How do yhou do it currently? 20:37:31 <andythenorth> and they probably won't have a table or templater, so they'll do it manually 20:37:35 <andythenorth> seems like an own goal 20:37:55 <Eddi|zuHause> it is possible to provide fixed IDs, but maybe it's not in the best possible locations 20:38:08 <Alberth> you or the compiler could make a file that defines that table 20:38:14 <peter1138> make the ID a from a hash of the string ID :D 20:38:24 <andythenorth> I was going to say that :( 20:38:27 <andythenorth> almost word for word 20:38:31 <andythenorth> but I had to argue with my kids 20:38:38 *** Terkhen has joined #openttd 20:38:38 *** ChanServ sets mode: +o Terkhen 20:38:39 <andythenorth> can OpenTTD read that though? 20:38:49 <peter1138> Can OpenTTD read what? 20:38:55 <peter1138> Why would it need to read anything? 20:39:03 <andythenorth> what would the hashed ID look like? 20:39:09 <peter1138> That would be internal to nml 20:39:13 <Eddi|zuHause> a hash is just a number 20:39:14 <Alberth> a number 20:39:29 <peter1138> It just means that you get the same number every time for the same string ID. 20:39:44 <Eddi|zuHause> although GRFs have pretty strict limits on those numbers 20:39:48 <andythenorth> use the grfid as a seed :P 20:39:50 <andythenorth> oof 20:39:52 <peter1138> It's pobably not a good idea, because, yeah, only 65535 numbers. 20:40:05 <peter1138> andythenorth, no need, IDs are unique per NewGRF. 20:40:22 <peter1138> Unless dynamic engines is off... Is that even tweakable? 20:40:25 <Eddi|zuHause> peter1138: about 1/4 of that, if you want to use it in articulated callback 20:40:26 <andythenorth> I was somewhat trolling :) 20:40:35 <peter1138> Eddi|zuHause, yup. 20:40:37 <andythenorth> didn't peter1138 fix that already? 20:40:39 <andythenorth> he should :P 20:40:49 <andythenorth> sprite limit disturbs 20:40:50 <peter1138> Eddi|zuHause, don't we have longer callbacks now? 20:41:05 <peter1138> limitation disturbs me very much. goes it throw out limitation? 20:41:11 *** avdg has quit IRC 20:41:15 <peter1138> Or Something. 20:41:31 <Eddi|zuHause> peter1138: there's workarounds... 20:41:44 <peter1138> Limitation disturbs me very sprites. Goes it throw out limitation? 20:41:46 <peter1138> That was it. 20:42:19 <peter1138> Anyway, a unique hash for only 16 bit numbers is kinda ... meh. 20:42:20 <Eddi|zuHause> there's a variable that reads the result of the last varaction2, that can be 32bit 20:42:29 <Eddi|zuHause> but the callbacks never use that 20:42:34 <DorpsGek_II> [OpenTTD/OpenTTD] michicc opened pull request #7352: Feature: Railtype flags to allow/disallow 90 degree curves. https://git.io/fhhrp 20:42:38 *** avdg has joined #openttd 20:42:43 <peter1138> ! 20:42:47 <Eddi|zuHause> you can use that with function calls, but nml doesn't provide those 20:42:55 <Eddi|zuHause> so effectively i think nobody uses that :p 20:43:28 <peter1138> michi_cc, who did that? o_O 20:43:41 *** michi_cc has quit IRC 20:43:45 *** michi_cc has joined #openttd 20:43:46 *** ChanServ sets mode: +v michi_cc 20:43:51 <peter1138> That was a coincidence... 20:44:03 <michi_cc> The patch I mean, not the m4nfo wiki entry 20:44:18 <peter1138> Yeah, who declared it official and... where did it come from? :p 20:44:19 <michi_cc> I have no clue who did that. 20:45:02 <Eddi|zuHause> it kinda makes sense for things like narrow gauge rails to have tighter curves 20:45:18 <Eddi|zuHause> we probably discussed that a few years ago 20:46:12 <michi_cc> https://gist.github.com/michicc/8d16426de023d015ce4f16d85d77a606 says 7 months ago. 20:47:14 <andythenorth> so when I constantly rename vehicles, the hash would change :D 20:47:18 <andythenorth> nvm. not everyone is me 20:48:56 <andythenorth> do we know that nml doesn't hash already? :P 20:48:56 <peter1138> Why would you change the text ID? o_O 20:48:57 <andythenorth> because the vehicle got renamed? 20:48:57 <peter1138> But the text ID is... just an internal name. 20:48:57 <glx> nielsm: don't forget squirrel_export after generate_widget 20:48:57 <andythenorth> yes, and if it's wrong, it makes no sense 20:48:57 <andythenorth> but again, not everyone is me 20:48:57 <andythenorth> I reused the text ID all over the place 20:48:57 <nielsm> glx bah 20:48:57 <andythenorth> reuse * 20:48:58 *** Samu__ has joined #openttd 20:48:58 <andythenorth> I am the worst person to ask about nml :P 20:48:58 <andythenorth> I have circumvented it, I can't even write it without the docs open 20:49:09 <andythenorth> I am considering buying a tablet just to have the docs on 20:50:07 <Eddi|zuHause> nml docs as an ebook? :p 20:50:14 <andythenorth> maybe I print it? 20:50:15 <peter1138> michi_cc, so where was it declared official? Hmm. It's not in JGRPP. 20:50:21 * andythenorth looks for some nml 20:51:18 <andythenorth> found some 20:51:21 <peter1138> glx, I stalled on making it always generate because I thought we were close to switching to CMake. 20:52:53 <andythenorth> this one is quite simple, just a wagon with lots of cargo sprites https://paste.openttdcoop.org/peq6rjqa0/kwmiee/raw 20:52:54 <andythenorth> nothing fancy 20:53:14 <peter1138> Hmm. Property 1A might be messed up since 64 railtypes :p 20:54:14 <andythenorth> this one is more interesting https://paste.openttdcoop.org/pafuuppxq/l3tunq/raw 20:54:32 <michi_cc> I think I only ever posted that gist here. 20:54:32 <Eddi|zuHause> we might very well be "close to switching to cmake" for another year :p 20:54:32 <glx> yes it would be useless to do it now and then switch to CMake 20:54:46 *** Samu_ has quit IRC 20:56:12 <andythenorth> if we had scopes in the syntax, all the ${vehicle.id} stuff could go https://dev.openttdcoop.org/projects/iron-horse/repository/entry/src/templates/vehicle_with_consist_specific_liveries.pynml 20:56:23 *** Samu_ has joined #openttd 20:56:27 <andythenorth> that's me, not nml, but it has to be handled 20:56:46 <andythenorth> 145 instances of ${vehicle.id} in one template 20:56:57 <Eddi|zuHause> yes 20:57:02 <andythenorth> seems like something a compiler could just infer 20:57:08 <andythenorth> computer could do the work 20:57:35 <Alberth> I think everybody agrees :) 20:57:44 <andythenorth> ok, it's evidence then :) 20:57:47 *** Speedy` has quit IRC 20:57:51 *** Speedy` has joined #openttd 20:58:39 <andythenorth> so actual action 4 strings 20:58:42 <andythenorth> how do they work? 21:00:58 <andythenorth> vague recollection of DC and D0 texts 21:01:04 <andythenorth> and some work in some places and not others 21:01:21 <Eddi|zuHause> what's your problem? 21:01:26 <snail_UES_> andythenorth: :O 21:01:41 <snail_UES_> that’s some very… complex code 21:03:36 *** Samu__ has quit IRC 21:05:56 *** octernion has quit IRC 21:06:08 <snail_UES_> andythenorth: all the code you pasted defines one vehicle in your set? 21:08:16 <andythenorth> the first paste is one wagon 21:08:19 <andythenorth> the other is one EMU 21:08:33 <andythenorth> I didn't write all that 21:08:41 <andythenorth> it's generated 21:08:45 <andythenorth> I don't write nml 21:09:28 <andythenorth> it's not doing very much 21:10:18 <andythenorth> the open wagon has cargo sprites, and two liveries 21:10:28 <andythenorth> not much else 21:10:28 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7353: Feature: Measure vehicle capacity utilisation efficiency https://git.io/fhho4 21:10:39 <nielsm> I'm not sure if that one is actually a good idea at all :) 21:11:12 <nielsm> also, it's the first patch I wrote for ottd so the code probably requires more clean up 21:12:32 *** grorg[m] has joined #openttd 21:14:07 <nielsm> hmm, how about changing the delivery distance calculation (for everything) to use the front vehicle stopping point for pickup and delivery instead of the station sign location for source and destination... 21:14:43 <peter1138> What does that solve? 21:14:56 <Alberth> multi industry serving 21:15:10 <Alberth> night 21:15:19 <nielsm> delivery distance "faking" exploit by moving the station signs further apart 21:15:33 <nielsm> making the delivery distance count as longer despite maybe not traveling very far 21:15:35 <andythenorth> bye Alberth 21:15:38 *** Alberth has left #openttd 21:16:39 <peter1138> Ah, so you could still make it a longer distance... but it would actually be a longer distance. 21:18:46 <nielsm> https://0x0.st/zHSq.jpg 21:20:57 <peter1138> But yes, definitely split that up. 21:21:25 <peter1138> Erm, 7353 that is :p 21:23:43 *** Thedarkb-T60 has joined #openttd 21:24:03 <Eddi|zuHause> ... or you could determine the closest distance between the station tiles 21:24:42 *** Thedarkb-T60 has quit IRC 21:24:47 <peter1138> Hmm 21:24:52 <peter1138> That would be more predictable. 21:25:03 *** Thedarkb-T60 has joined #openttd 21:25:58 <peter1138> But probably more work to calculate as it depends on the station pair combination. 21:26:20 <Eddi|zuHause> could be cached? 21:26:23 <nielsm> look at station extents rectangles and find shortest distance between their outlines? 21:26:50 <nielsm> using actual station tiles and caching you'd have n^2 cache items (n = stations) 21:26:55 <Eddi|zuHause> i mean, statistically, only very few station combinations will ever be used 21:27:42 <Eddi|zuHause> i'm fairly sure that works out to something linear in most cases 21:28:12 *** Thedarkb-T60 has quit IRC 21:28:35 <Eddi|zuHause> you don't usually send out vehicles to visit random stations 21:28:59 *** Thedarkb-T60 has joined #openttd 21:30:12 *** Thedarkb-T60 has quit IRC 21:30:19 <Eddi|zuHause> every station gets a sparse mapping from station ID to distance 21:30:36 <Eddi|zuHause> if on delivery, the mapping doesn't exist, it gets calculated 21:31:01 <Eddi|zuHause> if a station gets modified, loop through all stations and invalidate that station's map entry 21:33:16 *** Thedarkb-T60 has joined #openttd 21:33:39 <Eddi|zuHause> and the algorithm to calculate the distance between actual station tiles (not rectangles) should be able to build on top of the non-rect catchment data structures 21:34:12 *** Thedarkb-T60 has quit IRC 21:34:28 *** Thedarkb-T60 has joined #openttd 21:35:44 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhhoX 21:43:41 *** Thedarkb-T60 has quit IRC 21:47:35 *** sla_ro|master has quit IRC 22:01:04 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhhoX 22:03:31 *** Progman_ has joined #openttd 22:07:07 <peter1138> Eddi|zuHause, catchment covers a larger area than actual station tiles. 22:07:36 *** Progman has quit IRC 22:07:41 <peter1138> Stations already have a tilearea which can be searched. 22:07:51 *** Progman_ is now known as Progman 22:08:02 <Eddi|zuHause> yes, but mathematically, station tiles is effectively the same data structure, with radius 0 :) 22:08:14 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhhoX 22:08:30 <Eddi|zuHause> (maybe that is overkill) 22:09:20 <peter1138> Loop through all station tiles on both sides to find the shortest distance? 22:12:12 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhhnO 22:12:13 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 dismissed a review for pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhhn3 22:12:26 * glx is doing some tests 22:12:31 <glx> sorry for the spam ;) 22:20:03 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhhKR 22:21:41 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhhKE 22:22:09 <glx> done :) 22:28:21 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhhKg 22:28:57 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhhK2 22:30:22 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhhoX 22:31:55 <LordAro> glx: commit checker still failing for #7346? or is that expected 22:32:19 <glx> it is, CI needs modification 22:33:25 <glx> I'm looking at how to do it, but never touched docker stuff :) 22:33:30 <peter1138> Basically we can't backport anything to 1.9 ;) 22:33:58 <glx> indeed, and the first thing to backport will be #7354 22:35:33 <glx> at least it was easy to check the change in different branches because I already had an open PR 22:36:21 *** gelignite has quit IRC 22:39:36 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhhKD 22:40:12 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7352: Feature: Railtype flags to allow/disallow 90 degree curves. https://git.io/fhhKy 22:45:30 <LordAro> Eddi|zuHause: Wolf01: astroneer crashed 4 times in the last hour :( 22:45:38 <LordAro> i think it's having trouble with my rover and the terrain 22:52:36 *** octernion has joined #openttd 22:59:09 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhh6Z 23:00:12 <peter1138> See... 23:00:34 <DorpsGek_II> [OpenTTD/CompileFarm] glx22 commented on issue #29: Commit checker always expect origin/master, even for non master PRs https://git.io/fhh6n 23:00:41 *** octernion has quit IRC 23:02:50 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7354: Fix: [AzurePipelines] don't assume master as target branch when rebas… https://git.io/fhh6C 23:02:51 <DorpsGek_II> [OpenTTD/CompileFarm] TrueBrain commented on issue #29: Commit checker always expect origin/master, even for non master PRs https://git.io/fhh6W 23:02:59 <Wolf01> LordAro: I read they are tweeaking the terrain because of many bugs, so maybe they broke it more 23:03:24 <TrueBrain> glx: I think in fact that rebase should be skipped if that variable is not set 23:03:27 <TrueBrain> now I think about it some more 23:03:38 <TrueBrain> as that means it is checking a branch itself .. rebasing that is kinda weird :P 23:03:42 <TrueBrain> only PRs should be rebased, I think 23:04:13 <glx> indeed, if we build a branch we usually build head 23:04:28 <glx> and rebase is useless 23:04:31 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain dismissed a review for pull request #7346: Fix: rebase to 1.9 branch for backport PRs https://git.io/fhh0N 23:04:44 <TrueBrain> so yeah, that at least is an easy fix :) 23:05:05 <TrueBrain> while at it glx, please change: git rebase origin/$SYSTEM_PULLREQUEST_TARGETBRANCH 23:05:08 <TrueBrain> into: git rebase origin/${SYSTEM_PULLREQUEST_TARGETBRANCH} 23:05:12 <TrueBrain> always pretty please escape variables :) 23:05:17 <TrueBrain> or inclose 23:05:21 <TrueBrain> or how ever you want to call that :P 23:05:24 <glx> will do 23:05:37 <TrueBrain> ty :) 23:08:28 *** andythenorth has left #openttd 23:08:32 <TrueBrain> glx: if you need help with the Docker stuff, also in understanding etc, let me know! 23:08:43 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh requested changes for pull request #7352: Feature: Railtype flags to allow/disallow 90 degree curves. https://git.io/fhh6a 23:09:44 <TrueBrain> lol; so we went from a debate about 90 degress yes/no for ships, to allow NewGRFs to set it for trains :D I like this :) 23:10:14 <glx> well if it's an env var I think it should be as simple as using ${SYSTEM_PULLREQUEST_TARGETBRANCH} in docker shell scripts 23:10:33 <glx> we the existence checks of course 23:10:37 <glx> *with 23:10:37 <TrueBrain> glx: yeah; just please name it differentl in Docker, and you will be fine indeed :) 23:10:50 <TrueBrain> just TARGET_BRANCH or something :P 23:11:31 <glx> I think I should do it for bash task, as I used an undocumented variable that may not exist in future 23:11:45 <TrueBrain> what do you mean, sorry? 23:12:59 <glx> in #7354 I assumed SYSTEM_PULLREQUEST_TARGETBRANCH was present (well I checked with 'env' first), but it's probably better to explicitely set a var 23:13:35 <TrueBrain> for 7354 etc it is fine 23:13:40 <TrueBrain> as it is Azure Pipelines specific 23:13:46 <TrueBrain> and they defined it exists for a PR 23:13:57 <TrueBrain> so in my opinion, no need to map it again, or something 23:13:58 <LordAro> Wolf01: also, this cube/pyramid/obelisk thing is almost entirely encased in rock 23:14:07 <TrueBrain> (as the bash is already executed in the context of Azure Pipelines) 23:14:16 <Wolf01> Dig it out 23:14:20 <TrueBrain> for the Dockers how-ever it is different, as they are not always executed in the context of Azure Pipelines :) 23:14:38 <LordAro> Wolf01: am doing so, but slow 23:14:57 <Wolf01> I'm still trying to activate the nearest one... it requires a LOT of power 23:15:28 <LordAro> not too much... 1 medium + 2 small does well enough for me 23:15:32 <LordAro> i just connect my rover up 23:17:01 <peter1138> https://wiki.openttd.org/Catchment_area 23:17:06 <peter1138> Anyone fancy touching that? :/ 23:20:35 <DorpsGek_II> [OpenTTD/OpenTTD] michicc commented on pull request #7352: Feature: Railtype flags to allow/disallow 90 degree curves. https://git.io/fhh6S 23:20:51 <DorpsGek_II> [OpenTTD/OpenTTD] michicc updated pull request #7352: Feature: Railtype flags to allow/disallow 90 degree curves. https://git.io/fhhrp 23:20:52 <DorpsGek_II> [OpenTTD/OpenTTD] michicc dismissed a review for pull request #7352: Feature: Railtype flags to allow/disallow 90 degree curves. https://git.io/fhhKy 23:22:59 *** nielsm has quit IRC 23:23:44 <peter1138> Hmm, wonder if we can do per-character font-fallback rather than all-or-nothing. 23:31:51 <peter1138> Hmm, updating that Catchment_area thing is awkward, as it'll be 1.10 changes, and 1.9 isn't released yet :p 23:38:27 *** Flygon has joined #openttd 23:43:51 *** Wolf01 has quit IRC 23:44:56 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7355: Fix e4cc06f67: [AzurePipelines] rebase only for PRs https://git.io/fhhiU 23:46:27 <TrueBrain> that works as well I guess :D 23:46:43 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain approved pull request #7355: Fix e4cc06f67: [AzurePipelines] rebase only for PRs https://git.io/fhhiT 23:46:45 <TrueBrain> nice glx :) 23:47:06 <peter1138> Not what you were thinking of? 23:47:13 <TrueBrain> nope :) 23:47:18 <TrueBrain> my solution was worse :P 23:47:27 <glx> I first tried with if [ -n ..] 23:47:42 <glx> but why run the task at all ? ;) 23:48:06 <TrueBrain> indeed :D 23:48:57 <glx> hmm I should include the env stuff for the docker while at it 23:50:06 <glx> or not, because it's a fix, not an addition