IRC logs for #openttd on OFTC at 2024-10-16
            
01:44:39 *** akimoto has joined #openttd
02:05:55 *** D-HUND has joined #openttd
02:09:29 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:10:02 *** akimoto has quit IRC (Remote host closed the connection)
02:28:44 *** Wormnest has quit IRC (Quit: Leaving)
02:52:06 *** gnu_jj_ has joined #openttd
02:55:34 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
02:57:48 <DorpsGek> [OpenTTD/wiki-data] iangiorgetta commented on pull request #39: Fix #33: Rename Cheats to Sandbox options https://github.com/OpenTTD/wiki-data/pull/39#issuecomment-2415622388
03:03:34 *** debdog has joined #openttd
03:04:39 <DorpsGek> [OpenTTD/OpenTTD] Da-W1nn3r opened pull request #12999: Codefix #12973: Highscore when using sandbox https://github.com/OpenTTD/OpenTTD/pull/12999
03:06:59 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:06:13 *** keikoz has joined #openttd
04:42:18 *** Flygon has joined #openttd
05:53:31 <andythenorth[d]> well
05:53:34 <andythenorth[d]> coffee?
05:55:13 *** reldred has joined #openttd
05:55:13 <reldred> it's after midday
05:55:19 <reldred> nearly home time though
05:56:49 <andythenorth[d]> naptime?
05:57:29 <reldred> could do
05:57:42 <reldred> the question is, will i eat take out sushi for dinner for the *third* night in a row
05:58:03 <reldred> autistic eating patterns
05:58:05 <andythenorth[d]> it's a pattern
05:58:07 <andythenorth[d]> keep it up
05:58:13 <andythenorth[d]> streak
05:58:16 <reldred> c-c-c-combo breaker
05:58:28 <andythenorth[d]> hmmm
05:58:40 <andythenorth[d]> so the chances of changing the cargo class names in NML?
05:58:43 <andythenorth[d]> probably very low
05:58:50 <andythenorth[d]> nobody will want to approve that 😛
05:59:03 <andythenorth[d]> I guess I'll just write my own mapping in FIRS compile 😛
05:59:17 <reldred> fork nml
05:59:19 <reldred> anml
05:59:28 <andythenorth[d]> a anml?
05:59:30 <andythenorth[d]> an anml?
05:59:42 <andythenorth[d]> anml, vgtbl, mnrl
05:59:58 <reldred> why isn't my lte module here yet.
06:00:04 <reldred> i only ordered it from china yesterday
06:00:07 <andythenorth[d]> exactly
06:02:11 <kuhnovic> Coffee, yes
06:04:39 <andythenorth[d]> hmm
06:04:55 <andythenorth[d]> setting bit 14 for *every* FIRS non-food cargo eh?
06:05:01 <andythenorth[d]> this page might get noisy? 😛 https://newgrf-specs.tt-wiki.net/wiki/CargoTypes#Cargo_Labels
06:05:22 <andythenorth[d]> that "Notes" column will be so...something
06:58:11 <DorpsGek> [OpenTTD/team] Alaadel opened issue #596: [ar_EG] Translator access request https://github.com/OpenTTD/team/issues/596
07:53:43 <reldred> I broke my tism eating streak, pizza place was doing $15 off if you spend $30
07:54:38 <reldred> so I've now got a half and half pizza I'll eat over the next two days (aspirational), a garlic bread, and a 1.25L coke zero that will sit in the fridge and never get drunk because I generally try and avoid caffeine after midday
08:01:39 *** Smedles has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
08:02:03 <LordAro> office had a power outage at 1am and hasn't come back :(
08:02:54 *** Smedles has joined #openttd
08:16:26 <andythenorth[d]> hmm new vehicle prop, `required_cargo_classes`?
08:16:32 <andythenorth[d]> OR or AND though? 😛
08:18:32 <ahyangyi> XNOR
08:19:52 <andythenorth[d]> if we're adding new bit definitions anyway
08:20:05 <andythenorth[d]> then what historical vehicles / cargos do is [whatever they do]
08:20:19 <andythenorth[d]> callback better than a prop, allows arbitrary predicates
08:20:26 <andythenorth[d]> but caching and stuff 😦
08:21:17 <andythenorth[d]> callback would make looky-likes easy
08:21:44 <andythenorth[d]> cargo is beans: vehicle refits [GRAI, MAIZ, WHEA] -> return refit allowed
08:21:56 <andythenorth[d]> as well as class stuff
08:23:37 <andythenorth[d]> oof, "someone" would abuse labels for "not-quite-classes"
08:24:02 <andythenorth[d]> like "LONG" for all long steel, lumber, logs
08:25:02 <johnfranklin> XORG
08:25:53 <peter1138> `usbhid 1-4.2:1.0: can't add hid device: -22` RIP keyboard 😦
08:28:19 <peter1138> Hmm, what happened to all the supplies of decent keyboards.
08:34:39 *** mindlesstux has quit IRC (Quit: The Lounge - https://thelounge.chat)
08:35:40 *** mindlesstux has joined #openttd
08:39:05 <ahyangyi> Are you sure it's not a problem in your USB port?
09:03:52 <peter1138> No, it's a problem with the absolutely tiny bit of tea that got spilt on the keyboard.
09:44:46 <andythenorth[d]> ETea
10:16:51 <LordAro> ENoTea
10:17:03 <andythenorth[d]> ETeaKey
10:18:12 <dwfreed> ETeaPhoneHome
10:18:14 * dwfreed ducks
10:20:34 <xarick> how do you get Map::LogX() calculated if you only know the Map::SizeX()?
10:46:25 <xarick> i fail at making a lambda function
10:47:50 <ahyangyi> Google tells me `std::bit_width`
10:47:58 <ahyangyi> needs C++20 though
10:48:59 <xarick> oh, it's auto
10:49:28 <LordAro> ahyangyi: luckily that's what we have ;)
10:50:22 <ahyangyi> Nice.
10:57:20 <peter1138> For me the question should be answered with "why?"
10:59:20 <ahyangyi> In general I agree with you, but the need to calculate the integer log2 is so common that I don't bother asking why.
11:13:04 *** herms61 has quit IRC (Ping timeout: 480 seconds)
11:27:59 <kuhnovic> With Xarick "why" is usually a legit question 😉
11:36:36 <peter1138> Like, Map::LogX() exists, why would you need to calculate it.
11:37:36 *** Borg has joined #openttd
11:52:52 <kuhnovic> Why on earth is `myDeque = {}` faster than `myDeque.clear()` ... (at least on windows it is)
11:53:36 <Borg> its not necessary faster. it just might that delay is elsewhere (GC) :)
11:54:04 <Borg> or it is C++ ?
11:55:02 <LordAro> https://godbolt.org/z/aad8Kvj7P seems to compile to the same thing in GCC
11:55:53 <kuhnovic> C++
11:56:00 <_jgr_> The implementations of deque vary quite a lot between the different compilers
11:56:35 <_jgr_> In general it's not something to use for high performance
11:57:21 <LordAro> ooh, clang does something very weird
11:57:27 <kuhnovic> Well, YAPF use it in the node list 😛 ...
11:57:48 <LordAro> it actually seems to get rid of the other function
11:57:59 <LordAro> https://godbolt.org/z/KMYhfErj5 if i'm reading that correctly...
12:04:49 <_jgr_> kuhnovic: YAPF is only using it as an allocator so it doesn't matter that much there
12:06:38 <kuhnovic> Allocator? It's using it to store the nodes in the node list, which is manipulated quite a bit. So it could definitely make a difference.
12:07:38 <kuhnovic> Yesterday I was looking into weather I can let YAPF use static storage instead of using large amounts of stack memory like it does now. I was doing some before-and-after performance comparison and noticed this.
12:08:54 <kuhnovic> https://cdn.discordapp.com/attachments/1008473233844097104/1296082440510767165/image.png?ex=6710fe55&is=670facd5&hm=fde80e380e693a8ac4641e6c1079f4958f01408838ac6408f74fcb8d18bf1ff8&
12:08:54 <kuhnovic> Whipped up a quick google benchmark, seems to confirm what I saw in openttd. But again, Windows / MSVC, could be vastly different with other compilers.
12:10:19 <_jgr_> The deque is used to store nodes, but once they're allocated, lookups are done using the hash table and the deque isn't involved at all
12:12:28 <kuhnovic> Ah that's what you mean, yes that is true
12:14:30 <_jgr_> Is reserving static storage any better than using the stack?
12:16:02 <_jgr_> I don't think it uses so much that there's any risk of running out of stack
12:18:55 <kuhnovic> VS is showing me warmings about high stack usage by yapf
12:19:40 <kuhnovic> It's mainly the open and closed hashmaps in the nodelist IIRC
12:21:30 <_jgr_> Ah, I replaced those already in my branch. Might be a good excuse to use a better hash table implementation.
12:22:28 <kuhnovic> I tried to replace them with std::unordered_map at some point, but the performance difference was quite noticable (and not in a good way)
12:22:41 <kuhnovic> But there are of course many alternatives
12:22:58 <_jgr_> std unordered_map is not very good in general
12:24:18 <kuhnovic> The good thing about it is you get it out of the box, but that's about it:P
12:26:26 *** keikoz has quit IRC ()
12:26:52 <kuhnovic> But I have found a way to let YAPF work with just one map instead of two, I want to explore that first. It's kind of pointless to keep both an open _and_ a closed list, because if a node is closed it will never be reopened. As long as your heuristic function is both admissible and consistent, but that's something we check for already.
12:28:19 *** keikoz has joined #openttd
12:39:40 <peter1138> deque would be nicer if you could specify the block size to be used.
12:42:15 <andythenorth[d]> was it lunch?
12:44:41 <andythenorth[d]> hmm if cargos had AND NOT
12:44:48 <andythenorth[d]> we could just have one bit for food grade
12:45:35 <andythenorth[d]> I suspect that making it even more complicated....would be wise?
12:46:35 <andythenorth[d]> we could have a new column in the wiki cargo page
12:46:38 <andythenorth[d]> and more notes
12:48:47 <peter1138> <https://martin.ankerl.com/2022/08/27/hashmap-bench-01/>
12:49:50 <DorpsGek> [OpenTTD/OpenTTD] telk5093 opened issue #13000: [Crash]: Unhandled exception in ottd:game thread: [json.exception.type_erro.316] invaild UTF-8 byte at index 41: 0xB4 https://github.com/OpenTTD/OpenTTD/issues/13000
13:02:11 <merni> whoo 13000
13:02:19 *** telk5093 has joined #openttd
13:02:19 <telk5093> yeah~
13:14:12 <peter1138> We probably don't validate that the font name in the configuration is UTF-8.
13:18:24 <peter1138> Hmm, or we do. Invalid characters get converted to `?` for me.
13:19:51 <_glx_> ah we forgot something when doing 14.1 <https://github.com/OpenTTD/OpenTTD/blob/release/14/CMakeLists.txt#L8>
13:25:28 <peter1138> Yeah, we knew at the time 🙂 Would've been fixed for 14.2 but we didn't do one.
13:26:03 <_glx_> I think the crash happens when filling survey data
13:26:36 <_glx_> since the same function is used to fill crashlog and "font": "crashed while gathering information"
13:29:30 <peter1138> Yeah, we don't due the TryExecute() stuff when filling the survey.
13:31:18 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #13000: [Crash]: Unhandled exception in ottd:game thread: [json.exception.type_erro.316] invaild UTF-8 byte at index 41: 0xB4 https://github.com/OpenTTD/OpenTTD/issues/13000
13:34:14 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #13000: [Crash]: Unhandled exception in ottd:game thread: [json.exception.type_erro.316] invaild UTF-8 byte at index 41: 0xB4 https://github.com/OpenTTD/OpenTTD/issues/13000
13:35:42 <_glx_> dump says it's during baseset scan
13:37:05 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13001: Codechange: Remove CCountedPtr. https://github.com/OpenTTD/OpenTTD/pull/13001
13:37:11 <LordAro> \o/
13:40:44 <peter1138> That's "one way" to get rid of `m_`-prefixed stuff 😉
13:41:18 <peter1138> (I have some patches that touch YAPF but this one was easily separated and not related any more)
13:43:01 <peter1138> =-09
13:49:13 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13001: Codechange: Remove CCountedPtr. https://github.com/OpenTTD/OpenTTD/pull/13001#pullrequestreview-2372553234
13:49:45 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13001: Codechange: Remove CCountedPtr. https://github.com/OpenTTD/OpenTTD/pull/13001#pullrequestreview-2372555131
13:51:20 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13001: Codechange: Remove CCountedPtr. https://github.com/OpenTTD/OpenTTD/pull/13001
13:56:10 <peter1138> This may be something that unique_ptr or shared_ptr can handle but that requires... deeper changes.
14:07:27 *** nielsm has joined #openttd
14:43:47 *** Wormnest has joined #openttd
15:21:57 <Borg> grrrr
15:22:00 <Borg> either im stupid
15:22:24 <Borg> or Cargo types are absolutly completly broken for GRFver<7
15:22:56 *** herms61 has joined #openttd
15:24:47 <Borg> http://cache.borg.uu3.net/CargoTypes.htm
15:25:19 <peter1138> What problem are you encountering?
15:25:35 <Borg> really I dont get why do I have to use TypeA in Cargo Opt callback
15:25:45 <peter1138> You shouldn't be using GRFver<7.
15:25:51 <Borg> I did RTFS.. and it looks I should NOT
15:26:02 <Borg> peter1138: yeah.. I will rewrite it to newer.. but not yet
15:26:17 <Borg> I did massive cleanup within last 3 days..
15:26:28 <peter1138> Don't waste your time.
15:26:34 <Borg> I had to do it
15:26:37 <peter1138> Use a cargo translation table and be done.
15:26:38 <_glx_> use v8 and cargotable
15:26:49 <Borg> okey.. so its indeed broken?
15:26:52 <peter1138> I mean, don't waste your time making it work the old way. There's reasons new ways were made.
15:27:00 <_glx_> it's not broken, it's old
15:27:01 <peter1138> It's not broken, it's just very inflexible.
15:27:16 <Borg> peter1138: thats not the issue here for now..
15:27:39 <Borg> Pre-version 7 uses the 'climate dependent' ID in callbacks and properties, i.e. cargo is the cargo ID
15:27:42 <Borg> if (grffile->grf_version < 7 && !usebit) return cargo;
15:28:00 <peter1138> Honestly, don't use pre-version 7.
15:28:13 <Borg> usebit is false, called from newgrf.cpp
15:28:25 <Borg> peter1138: if I switch to grfv8 whole thing explode I guess
15:28:37 <Borg> I need to have it kinda working
15:28:41 <Borg> do commit.. and then keep rewritting
15:28:57 *** herms61 has quit IRC (Quit: Ping timeout (120 seconds))
15:29:04 <Borg> if I cant get the answer.. Ill fix it empiricaly.
15:29:14 <Borg> because I did switched to TypeA and it works now.. cargo is accepted
15:29:21 *** herms61 has joined #openttd
15:29:35 <Borg> but.. I dont really understand why..
15:31:17 <Borg> -- Cargos: Livestock + Wheat (or Fruit + Maize)
15:31:17 <Borg> ! * 02 0A 63 gb ci2 vs FF 03
15:31:17 <Borg> 01 00 04 04
15:31:17 <Borg> 02 00 06 06
15:31:17 <Borg> 01 00 0D 0D
15:31:20 <Borg> 00 80
15:31:29 <Borg> it should really work with just 04 and 06
15:31:41 <Borg> where that bloody OD comes from.. no clue
15:33:17 <Borg> accepts_cargo[] array in Industry is CargoID
15:33:29 <Borg> so its very basic ID from cargo_types.h
15:33:32 <Borg> climate depended
15:33:43 <_glx_> fruit is 0D
15:33:44 <Borg> this is passed to callback..
15:33:51 <Borg> yes, in type A
15:33:54 <_glx_> in tropic
15:33:56 <Borg> but in type B its 04
15:34:00 <peter1138> CargoID is translated
15:34:02 <Borg> because its climated depended
15:34:04 <Borg> oh...
15:34:08 <peter1138> accepts_cargo is not climate dependent.
15:34:14 <Borg> DAMMIT.. okey thx
15:34:18 <Borg> thats explains all
15:34:32 <Borg> now I need more RTFS :D for Action0 and Action3 cargo
15:34:35 <Borg> thanks! :)
15:35:03 <peter1138> I don't know what "gb ci2 vs" means though.
15:35:08 <peter1138> So I don't know what your action2 is doing.
15:35:17 <Borg> generic byte
15:35:21 <Borg> callback info 2
15:35:28 <Borg> vs is Variadic Action 2
15:35:37 <Borg> I made wrapper to not work directly on bytes in NFO :)
15:36:02 <Borg> grfix.rb generates .nfo from .src
15:36:16 <peter1138> Oh so you put extra layers on top, no wonder I don't know.
15:36:30 <Borg> yeah.. because w/o that .NFO is baarely managable
15:36:37 <Borg> w/ that layer.. you can read it pretty much directly
15:36:52 <Borg> just looking up variables.. global variables.. etc
15:36:53 <peter1138> Is there such a thing as a variadic action 2?
15:37:11 <Borg> hold on. I probably spelled it wrong
15:37:13 <_glx_> might be varact2
15:37:19 <peter1138> Variational is not Variadic.
15:37:37 <Borg> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2
15:37:40 <Borg> its all that stuff
15:37:43 <Borg> yeah :)
15:37:52 <peter1138> But your layer is hiding what variable you are looking at.
15:37:54 <Borg> vs is varadjust
15:38:00 <Borg> not at all
15:38:19 <Borg> gb is type..
15:38:29 <Borg> general byte = 81
15:38:35 <Borg> easier to remember gb vs 81 :)
15:38:45 <_glx_> variable is ci2 (callback info 2)
15:38:49 <Borg> yep
15:38:57 <_glx_> so 18
15:39:00 <Borg> exacly
15:39:16 <Borg> I dont need to remember its 18... I know there are 2 callback info variables.. ci1 and ci2
15:39:19 <Borg> easier to remember
15:39:24 <_glx_> we know them as var10 and var18 😉
15:39:27 <Borg> that constatly lookup up Global Variables
15:39:37 <Borg> oh :) if you have SO good memory.. cudos for you
15:40:00 <_glx_> and var0C for callback number
15:40:09 <peter1138> So are you implementing CBID_INDUSTRY_PROD_CHANGE_BUILD?
15:40:27 <Borg> its called CID here
15:40:37 <peter1138> Oops, I meant CBID_INDUSTRY_INPUT_CARGO_TYPES
15:41:06 <Borg> peter1138: im implementing Callback 3D (Opt out of accepting cargo)
15:41:17 <Borg> and it works now correctly. when I used oD
15:41:19 <Borg> 0D I mean
15:41:21 <peter1138> In this case the return value is passed for translation and does not have usebit set.
15:41:42 <Borg> peter1138: I still cannot find place in code where CargoID is translated
15:41:51 <Borg> but nevermind.. it probably is because it works
15:41:56 <Borg> so now Im worried about this
15:42:17 <peter1138> Use grfv8 and a translation table and it just works.
15:42:35 <Borg> -- Properties for Cargos (custom rating calc)
15:42:35 <Borg> $cp = 1A 02
15:42:35 <Borg> ! * 00 0B 01 0B 00 $cp*11
15:42:35 <Borg> -- Set callback for Cargos
15:42:36 <Borg> ! * 03 0B 0B 00 01 02 03 04 05 06 07 08 09 0A 00 CC 00
15:42:48 <Borg> peter1138: yeah. once it will work :) Ill move to grfv8
15:43:13 <Borg> but this part I will dig myself :) thanks
15:44:26 <peter1138> in master, the place in code where CargoID is translated is `industry_cmd.cpp:1888`
15:44:52 <peter1138> :1926 for output cargos.
15:44:57 <peter1138> Just for these callbacks that is.
15:45:28 <peter1138> For the static properties they are translated when loading.
15:45:28 <Borg> lets see
15:45:36 <peter1138> But callbacks are more... runtime.
15:46:52 <Borg> yeah.. Ill focus on them first
15:53:46 <peter1138> As this is an industry set, is it defining cargos too?
15:58:57 <Borg> nope
15:59:00 <Borg> im using default cargos
15:59:25 <Borg> its BSPI grf.. Im just extending support for Arctic and Tropic
16:00:09 <Borg> im RTFSing now:
16:00:11 <Borg> static ChangeInfoResult CargoChangeInfo(uint cid, int numinfo, int prop, ByteReader *buf)
16:01:28 <Borg> hmm so cargo_type.h vs cargotype.h
16:06:36 *** gelignite has joined #openttd
16:06:45 <Borg> okey found it
16:06:55 <Borg> table/cargo_const.h
16:07:10 <Borg> so it seems I should use always TypeA ID.. except few places for vehicles
16:07:13 <Borg> lets confirm that
16:08:24 <Borg> yep. Action 0 sorted out.. needs type A
16:08:27 <Borg> now Action 3
16:09:51 <Borg> looks the same
16:10:05 <Borg> okey, lets apply fixes and test :)
16:19:44 <Borg> tada! works
16:19:47 <Borg> thx peter1138 :)
16:56:02 <xarick> I can't reliably create this function, even though I want to force the current assumed behaviour from release TileAdd
16:56:02 <xarick> `inline TileIndexDiffC ToTileIndexDiffC(TileIndexDiff tid)
16:56:02 <xarick> {
16:56:02 <xarick> /* how is TileAdd supposed to differentiate between -42,-80 and 22,-81? Both give you the same TileIndexDiff */
16:56:02 <xarick> }`
16:57:29 <xarick> seems that I'm missing something obvious
17:10:16 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
17:26:20 <xarick> nop, I give up
17:48:39 <pickpacket> A 1024x1024 map is big... My Coleman Count airplanes take 290 days one way diagonally, at 475km/h
17:49:07 <pickpacket> That's a bit more than 3.3 million km
17:53:59 *** Wormnest has joined #openttd
17:59:32 <peter1139> :D
18:00:23 <pickpacket> What's the circumference of the Earth?
18:01:23 <Rubidium> ~40 Mm
18:02:17 <andythenorth[d]> so what am I doing about cargo classes? 😛
18:02:20 <andythenorth[d]> making dinner?
18:06:18 <ahyangyi> express dinner, refrigerated dinner, powderized dinner, oversized dinner or special dinner?
18:07:03 *** banhmarie has joined #openttd
18:07:03 <banhmarie> acid dinner
18:08:17 <andythenorth[d]> food-grade
18:08:26 <peter1138> bulk dinner
18:08:27 <ahyangyi> that'll be vinegar
18:08:31 <ahyangyi> hmm
18:08:42 <andythenorth[d]> leftovers
18:08:44 <andythenorth[d]> hmm
18:10:54 <ahyangyi> armoured food
18:10:55 <ahyangyi> clams
18:11:13 <pickpacket> Rubidium: 40 million melons?
18:11:46 <ahyangyi> circumference of the earth is melons?
18:14:33 <Rubidium> pickpacket: no, 40 megameters
18:15:14 <Rubidium> why wouldn't I use the appropriate SI units and prefixes?
18:15:25 <wensimehrp> 4.0 x 10^1 Mm
18:16:22 <wensimehrp> Dinner is cook child rice
18:17:46 <andythenorth[d]> so...can we automatically set cargo class bit 14 if bit 13 isn't set?
18:18:00 <andythenorth[d]> just really don't fancy the wiki cargo page update
18:18:10 <andythenorth[d]> the notes column is going to get evil
18:18:17 <andythenorth[d]> https://newgrf-specs.tt-wiki.net/wiki/CargoTypes#Cargo_Labels
18:18:38 <andythenorth[d]> TBH....that whole page
18:22:57 <pickpacket> Rubidium: You never know on the internet! Anyone can be an American!
18:24:38 <pickpacket> 40 million metres... So 40,000 km. That's a little less than 3,306,000 km
18:24:55 <LordAro> just a few
18:31:07 <andythenorth[d]> does bananas parse grfs for the metadata about contents?
18:31:22 <andythenorth[d]> I did look in the repo, but maybe not correctly 😛
18:33:04 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13001: Codechange: Remove CCountedPtr. https://github.com/OpenTTD/OpenTTD/pull/13001
18:33:25 <andythenorth[d]> this maybe? https://github.com/OpenTTD/bananas-api/blob/main/bananas_api/new_upload/readers/newgrf.py
18:33:33 <peter1138> LordAro can cycle 3,306,000km in a year.
18:33:54 <LordAro> lol
18:34:15 <andythenorth[d]> curious if we can just read all the known cargos and their classes
18:34:44 <pickpacket> peter1138: That'll get him from Wrindborough to Prudhattan. Or at least would if he was flying! Biking through all that terrain is most assuredly a much longer route
18:35:07 <peter1138> As long as there are bacon buttie stops along the way.
18:36:06 <pickpacket> We'll think and pray for that
18:36:44 <andythenorth[d]> looks like newgrf.py enumerates features and how often used
18:38:01 <peter1138> How does CHashTableT compare to unde
18:38:35 <peter1138> Hmm, "pop" looks a bit non-map-related.
18:43:35 <_jgr_> It's fairly easy to turn CHashTableT into a wrapper around a hash table type without changing its interface much
18:48:49 <peter1138> Personally I'd rather not leave an old wrapper lying around.
19:01:37 <DorpsGek> [OpenTTD/team] glx22 commented on issue #596: [ar_EG] Translator access request https://github.com/OpenTTD/team/issues/596
19:02:22 <DorpsGek> [OpenTTD/team] glx22 commented on issue #595: [nn_NO] Translator access request https://github.com/OpenTTD/team/issues/595
19:03:22 *** Wolf01 has joined #openttd
19:13:35 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
19:18:55 <xarick> https://cp-algorithms.com/algebra/linear-diophantine-equation.html
19:19:07 <xarick> is this what I should be looking at?
19:19:47 <xarick> I'm in the rabbit hole
19:25:51 <andythenorth[d]> so did anyone write a full python newgrf reader? 😛
19:26:09 <andythenorth[d]> does grf-py do that?
19:26:29 <andythenorth[d]> this is silly 🙂 https://newgrf-specs.tt-wiki.net/wiki/CargoTypes#Cargo_Labels
19:26:36 <andythenorth[d]> we have all the relevant grfs on bananas 😛
19:39:56 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1296195950238371870/image.png?ex=6711680c&is=6710168c&hm=6e4030e4ab04a6d8f507a5563f16d28948a008d0d03ac5cfe696e454bcd6c1ac&
19:39:57 <andythenorth[d]> hmm
19:40:33 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1296196104991543376/image.png?ex=67116831&is=671016b1&hm=05a8d84912a91072060761fdd4b82560442bc1442a01c224ff2aded1a869eedc&
19:40:45 <andythenorth[d]> I am kind of just at 'why?'
19:45:13 *** Wormnest has joined #openttd
19:54:16 <xarick> oh snap, add by diag dirs
19:54:21 <xarick> those are -256, 256
19:55:02 *** Borg has quit IRC (Quit: leaving)
19:57:33 <xarick> yeah, I give up, i wasted 3 days on this TileAdd stuff and got nowhere yet
19:57:58 <andythenorth[d]> I spent 7 days on grf cargo classes xarick 🙂
19:58:03 <andythenorth[d]> for zero change so far
19:58:10 <xarick> ^_
19:58:16 <andythenorth[d]> entertainment value: high
20:06:40 <xarick> static_cast<auto> doesn't work
20:10:32 <peter1138> Well.
20:11:44 *** D-HUND has joined #openttd
20:13:45 <LordAro> https://dayssincelastrustmcserver.com/
20:14:44 <truebrain> Haha
20:14:48 <truebrain> Funny and true!
20:15:46 <peter1138> Reimplementing all the game mechanics, sounds fun.
20:16:05 <peter1138> Or is Minecraft more client-side than I imagine...
20:17:10 <truebrain> Both. It is weird how much is done client-side, but the server also needs to replicate it
20:17:46 <truebrain> (I once wrote my own Python MC server, as, why not 😛 )
20:18:20 <peter1138> I wrote a Minecraft server in C, but that was in 2010 when it was the simple fixed world.
20:18:56 <johnfranklin> this server is about lunch, not dinner. as I was told.
20:21:30 <johnfranklin> indev?
20:21:48 <johnfranklin> no, 2010 was already infdev and alpha.
20:24:12 <peter1138> The old classic 0.30.
20:25:37 *** gelignite has quit IRC (Quit: Stay safe!)
20:36:27 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #12998: Fix: CHashTableT's Clear function doesn't set number of items back to zero https://github.com/OpenTTD/OpenTTD/pull/12998#pullrequestreview-2373627906
20:36:30 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic merged pull request #12998: Fix: CHashTableT's Clear function doesn't set number of items back to zero https://github.com/OpenTTD/OpenTTD/pull/12998
20:39:52 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13001: Codechange: Remove CCountedPtr. https://github.com/OpenTTD/OpenTTD/pull/13001#pullrequestreview-2373637642
20:46:54 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
20:51:06 <xarick> binary '*': no global operator found which takes type 'TileIndex' (or there is no acceptable conversion)
20:51:29 <xarick> StrongType.
20:52:03 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13001: Codechange: Remove CCountedPtr. https://github.com/OpenTTD/OpenTTD/pull/13001
20:54:58 <peter1138> "Sorry KUDr"
21:03:12 <_glx_> xarick: yes you're not supposed to multiply TileIndex
21:03:39 <_glx_> that's why it's a StrongType, to prevent stupid stuff
21:14:08 <xarick> ``` TileIndexDiff diff = TileOffsByDiagDir(m_exitdir);
21:14:08 <xarick> diff *= m_tiles_skipped;
21:14:08 <xarick> m_new_tile += diff;```
21:14:16 <xarick> problem solved
21:16:06 <xarick> the TileAdd usage in IsNeighborRoadTile is funny
21:17:48 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/town_cmd.cpp#L1026-L1027> First it uses tile + cur, then it uses TileAdd(tile, cur)
21:19:14 <andythenorth[d]> hmm train prop 0x29 is weird (non-refittable cargo classes)
21:19:36 <andythenorth[d]> 'non_refittable_cargo_classes" in NML
21:19:53 <andythenorth[d]> although maybe I have OCPD
21:20:03 <xarick> anyways, I can't get this part of the code to assert
21:20:17 <andythenorth[d]> I can omit classes from prop 0x29 list, and they'll still be non-refittable anyway
21:20:28 <andythenorth[d]> it's more like `disallowed_classes`
21:21:11 <andythenorth[d]> the prop for excluded labels is `cargo_disallow_refit` in NML
21:21:51 <andythenorth[d]> and 0x2D is `List of never refittable cargo types`
21:21:57 <peter1138> ```c++
21:21:57 <peter1138> case 0x28: // Cargo classes allowed
21:21:57 <peter1138> _gted[e->index].cargo_allowed = buf.ReadWord();
21:22:09 <peter1138> ```c++
21:22:09 <peter1138> case 0x29: // Cargo classes disallowed
21:22:09 <peter1138> _gted[e->index].cargo_disallowed = buf.ReadWord();
21:22:19 <andythenorth[d]> yeah ok, so the spec is misworded
21:22:32 <andythenorth[d]> src = actual spec
21:22:57 <xarick> guys, can I replace all instances of TileAdd(a, b) with a + b? To avoid the assert:)
21:23:14 <xarick> it's an unreliable assert
21:23:36 <xarick> and then remove TileAdd
21:25:02 <xarick> related to 12996
21:28:07 *** Flygon has quit IRC (Read error: Connection reset by peer)
21:30:05 <xarick> shoot myself in the foot?
21:33:21 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:35:53 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:36:53 <xarick> <https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:TileAddXY-and-TileAdd>
21:44:38 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:51:34 *** tokai has joined #openttd
21:51:34 *** ChanServ sets mode: +v tokai
21:58:31 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)