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