IRC logs for #openttd on OFTC at 2023-09-10
โด go to previous day
00:19:18 <locosage> couldn't make TileIndexDiff work at all
01:39:10 *** Extrems has quit IRC (Ping timeout: 480 seconds)
02:10:10 *** Wormnest has quit IRC (Quit: Leaving)
02:24:02 *** Extrems has joined #openttd
02:35:22 *** Extrems has quit IRC (Ping timeout: 480 seconds)
02:36:05 *** Extrems has joined #openttd
02:56:34 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:38:47 *** bryjen has quit IRC (Quit: Leaving)
03:55:52 *** D-HUND is now known as debdog
04:19:02 *** ChanServ sets mode: +v tokai
04:26:08 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
05:48:29 *** HerzogDeXtEr has joined #openttd
06:43:11 <andythenorth> talltyler: since I added it in my local build ๐
06:55:26 * andythenorth eats some greens
07:26:24 *** gelignite has joined #openttd
07:41:55 *** wallabra has joined #openttd
07:57:52 *** wallaby2 has joined #openttd
07:58:39 *** wallabra has quit IRC (Remote host closed the connection)
08:00:22 *** _zephyris has quit IRC (Remote host closed the connection)
08:00:22 *** _jgr_ has quit IRC (Remote host closed the connection)
08:00:22 *** DorpsGek_vi has quit IRC (Remote host closed the connection)
08:00:22 *** _pruple has quit IRC (Remote host closed the connection)
08:00:22 *** ketsuban[d] has quit IRC (Remote host closed the connection)
08:00:22 *** alfagamma7 has quit IRC (Remote host closed the connection)
08:00:22 *** _glx_ has quit IRC (Remote host closed the connection)
08:00:22 *** kamnet has quit IRC (Remote host closed the connection)
08:00:22 *** talltyler has quit IRC (Remote host closed the connection)
08:00:22 *** andythenorth has quit IRC (Remote host closed the connection)
08:00:22 *** locosage has quit IRC (Remote host closed the connection)
08:00:22 *** johnfranklin has quit IRC (Remote host closed the connection)
08:00:22 *** emperorjake has quit IRC (Remote host closed the connection)
08:00:22 *** michi_cc[d] has quit IRC (Remote host closed the connection)
08:00:22 *** belajalilija has quit IRC (Remote host closed the connection)
08:00:22 *** truebrain has quit IRC (Remote host closed the connection)
08:00:50 *** DorpsGek_vi has joined #openttd
08:04:19 *** andythenorth has joined #openttd
08:07:02 <andythenorth> 1 of which I can't do
08:07:12 <andythenorth> the others pff...I will do ๐
08:08:43 *** truebrain has joined #openttd
08:08:43 <truebrain> I found an exploit with 11274 ๐
08:08:57 <truebrain> that moment you just know something will go amiss, but you can't put your finger on it
08:09:04 <truebrain> let me make a better example ...
08:10:07 <truebrain> hmm, I want to blueprints between maps!
08:14:58 <truebrain> making lots of money by moving cargo between those two stations ๐
08:15:26 <truebrain> better than a coal train!
08:16:34 <truebrain> it is funny to see how inconsistent it is ๐
08:18:19 <truebrain> mostly, Transfers are just .. seemingly random numbers ๐
08:18:25 <truebrain> I noticed that in my other test-game too
08:18:32 <truebrain> they are not really deterministic
08:19:45 <andythenorth> they're not? ๐ฎ
08:24:30 <andythenorth> think it's 18, but not 100% clear
08:25:14 <andythenorth> yeah, must be 18 I think, 6 sprites * 3 slope angles
08:28:30 <truebrain> weirdly, after reloading a game it mostly stabilizes
08:28:40 <truebrain> but okay, that is some other issue, as it happens with master too ๐
08:30:58 <andythenorth> you might have shone a light on how I spent a weekend trying to make sense of LC's big savegame about Horse income
08:31:27 <andythenorth> big cdist transfer networks
08:31:39 <andythenorth> /me back to eating greens
08:45:06 <andythenorth> ok only 2 items with missing nml spec / implementation ๐
08:45:18 <andythenorth> not ones I can do ๐
08:45:33 <truebrain> well, at least that was a lot of cleanup already ๐
08:47:06 * andythenorth was avoiding rewriting a makefile
08:47:18 <andythenorth> pretty much the best way to get grf docs updated ๐
08:49:34 <truebrain> okay, either 11274 exposes all kinds of wrong with CargoPacket, or it introduces it, but darn, this is a lot less ... sensible then I expected ๐
08:49:44 <truebrain> transfers are weird ... right, let's get to master, and see what is happening
08:53:35 *** locosage has joined #openttd
08:53:35 <locosage> master server seems to have some issues again
08:53:58 <locosage> though servers didn't seem go local this time so they are starting to get back it
08:55:06 <truebrain> that happens sometimes. In this case, a node went down. Things autoheal. So business as usual, honestly
08:56:13 <locosage> [2023-09-10 08:00:27] dbg: [net] Your server is now registered with the Game Coordinator:
08:56:13 <locosage> [2023-09-10 08:00:27] dbg: [net] Game type: Public
08:56:13 <locosage> [2023-09-10 08:00:27] dbg: [net] Connection type: Behind NAT
08:56:13 <locosage> [2023-09-10 08:00:27] dbg: [net] Invite code: +M6uHtyH
08:56:15 <truebrain> lol, the whole node just frooze; that is unusual for nodes to do on AWS ๐ Fun ๐
08:56:53 <truebrain> I wonder if AWS is going to reboot this instance ... that will be interesting to see
08:57:19 <truebrain> well, it is spinning up a new node, but tomato tomato
08:58:03 <truebrain> Nomad adds the node to the cluster, puts it in the right role, and services restart on it. That is how I like to see it; autohealing ftw!
08:58:22 <truebrain> possible this happens more often, I just never witnessed it doing the right thing ๐
08:58:48 <locosage> locosage: wonder how this happened, it failed direct connection because of the node freeze but then succeeded in stun/turn?
08:59:37 <truebrain> owh, it does happen more often; also a week ago, on the other node. But ironically, it only happens on the public nodes. The private nodes are running fine.
09:00:17 <truebrain> so I guess one of the services on the public node sometimes ruins everything ... maybe some memoryleak I can't see .
09:01:56 <truebrain> hmm, maybe out-of-memory .. hmm
09:02:11 <truebrain> yeah, seems to happen on the node that has slightly more memory usage
09:02:45 <truebrain> and if I overcommitted the node, it might kill the wrong service ..
09:03:01 <truebrain> the nodes run 1GB, so that is already a bit meh
09:03:26 <truebrain> add to that the problem the Discord <-> IRC bridge leaks memory for what-ever reason
09:04:17 <truebrain> it needs some tuning, that's for sure
09:05:06 <truebrain> given multiplayer is already disrupted, let me disrupt it again by deploying a new version of the coordinator; also fixes your NAT issue locosage
09:10:16 <truebrain> multiplayer updates quicker than the average joe
09:11:31 <locosage> truebrain: what does it count, connections?
09:11:45 <truebrain> it says so in the topic: the amount of listings done
09:12:38 <locosage> it also says listing on bananas ๐คทโโ๏ธ
09:12:59 <truebrain> always so happy to see people can read! \o/
09:13:36 <truebrain> it is like both functionalities have their own place where you can get a .. listing! ๐
09:14:00 <locosage> I somewhat understand listing for servers
09:14:08 <locosage> but no idea what it's supposed to mean for bananas
09:14:20 <truebrain> wait wait .. now I can say: do you actually play the game?!
09:14:28 <truebrain> normally I get that remark when I say something silly
09:14:35 <truebrain> now I can finally say it to someone else \o/ ๐
09:14:41 <truebrain> "Today was the day ... " ๐
09:14:43 <locosage> or do you mean getting server/newgrf listing?
09:14:58 <locosage> I thought it server listing itself at first
09:15:00 <truebrain> dude ... think about this for like 2 minutes .. what is BaNaNaS?
09:15:08 <truebrain> and is there a button in the interface that gives you a list of all content?
09:16:05 <locosage> I understood listing as "registering", not as "getting the list"
09:16:21 <truebrain> I cannot help your mind made that jump; bit unusual, if you ask me, but okay ๐
09:16:39 <truebrain> both multiplayer and bananas have two very distinct places where you get a listing
09:24:48 <locosage> well, I'm used to them just being called "list"
09:24:53 <locosage> `(computing) A printout of a program or data set. ` a bit jargon
09:27:15 <truebrain> okay ... transfers are more weird than I expected ...
09:27:46 <truebrain> I se "Transfer and take cargo"
09:27:58 <truebrain> basically, it drops off passengers, to load them up immediately after
09:28:48 <truebrain> I somewhat assumed that was what all those next_station checks were for .. but clearly it is not
09:30:17 <locosage> Isn't next station just a cargodist thing?
09:32:53 <truebrain> okay, so that is why things were acting up ... depending on how much cargo is at your transfer station, and by a bit of luck when busses arrive and leave .. it might be that passengers are being moved between transfer and loading station, never reaching any place they want to be unloaded at
09:33:09 <truebrain> when, during unloading, there is a bus waiting to be loaded
09:33:45 <truebrain> clearly I never did bidirectional transfers ... plenty of one-way, but I did not know bidi was .. not ... working as you would expect
09:33:54 <andythenorth> it is, you just turn on cdist
09:34:03 <andythenorth> unless I miss something here ๐
09:34:36 <andythenorth> I mean you can unpick 'as you would expect' a bit, if you want ๐
09:35:27 <truebrain> ironically, that also doesn't work as you might expect
09:35:32 <truebrain> as it is never seen as a connection
09:35:36 <truebrain> so all cargo is "to any station"
09:35:55 <truebrain> at least one passenger needs to get to "the other side" first
09:36:06 <truebrain> which never happens, as they are loaded back in the same bus they came with
09:36:44 <truebrain> owh, by some luck both busses entered at the same time, and now there is a link
09:36:52 <truebrain> so now it should recover?
09:36:58 <truebrain> still lot of CargoPackets with "to any station" ofc
09:38:07 <truebrain> guess I should murder those people now, to get them gone ๐
09:38:35 <truebrain> or just replace the busses, I guess
09:38:37 <locosage> two-way transfers are probably #1 reason cargodist gets recommended
09:38:39 <truebrain> as that kinda murders people ๐
09:39:02 <truebrain> btw, this problem only exists with passengers (and mail) ofc ๐
09:41:44 <truebrain> hmm .. but as there are still "to any station" cargo in the stations
09:41:50 <truebrain> the busses do keep getting stuck with weird cargo
09:41:53 <truebrain> how do you recover from that?
09:42:24 <truebrain> owh, and you need to wait for a linkgraph update I guess, before it "starts working"
09:43:26 <truebrain> and as soon as you delete the bus that created the connection, it falls back to those annoying "any station" passengers
09:44:14 <truebrain> this really feels buggy and weird
09:44:35 <truebrain> at least it does explain the weird payments I got ๐
09:45:06 <truebrain> just for the record, all I am doing is: move pax from townA to transfer with 1 bus, and move pax from townB to transfer with another bus
09:47:22 <truebrain> haha, what ever I try, I can't get it to work ๐
09:47:42 <truebrain> (with cargodist, andythenorth ๐ )
09:48:42 <andythenorth> sorry I have nothing ๐
09:48:45 <truebrain> there constantly are "any station" passengers in my bus ๐
09:51:22 <andythenorth> other people understand cdist more
09:51:39 <andythenorth> I turned it off for everything except pax and mail, and just trust what it does
09:52:10 <truebrain> from a technical perspective I get it; but from a user perspective it is confusing as ...
09:52:26 <truebrain> don't use transfer stations, would be the better advise, I guess ๐
09:52:41 <truebrain> but okay, just wanted to understand what went wrong with my test-map, in terms of payment etc ๐
09:53:22 *** _pruple has joined #openttd
09:54:15 <truebrain> not intuitive, I would use
09:54:40 <truebrain> ugh, after all these years, what still annoy me, that I can't say: I know there are houses in range, but please, DO NOT GENERATE PASSENGERS here, despite me loading/unloading them
09:54:45 <truebrain> I just want you to be a transfer station
09:57:28 <truebrain> okay, also odd .. I load in 15 passengers that want to go to town B
09:57:35 <truebrain> I do a transfer of them
09:57:37 <truebrain> 5 still want to go to B
09:57:40 <truebrain> the other 10 ... don't care
09:57:43 <truebrain> just take me anywhere!
09:58:07 <truebrain> why did they change their mind?
09:59:02 <truebrain> Split() doesn't retain `next_station` .. that might actually be my doing ๐
09:59:07 <truebrain> I might have introduced a regression ๐
10:01:43 <truebrain> yeah, that is totally my fault .. well, the fault of bad code that I tried to fix ๐
10:09:39 <truebrain> okay .. that also kinda solves my bidirectional transfer station .. sort-of
10:09:42 <truebrain> at least good enough
10:14:45 <truebrain> right ... "oops" ... stupid union
10:17:15 <andythenorth> goes it cargo has destinations? ๐
10:17:26 <andythenorth> the flow solution is very clever
10:20:02 <truebrain> okay, that PR doesn't fix non-cargodist transfers, but at least I am happy I looked into this .. as that is a nasty bug to have ๐
10:20:14 <truebrain> so yeah andythenorth , with cargodist things work "mostly" as expected
10:22:56 <truebrain> you can see the settings that are not default, you can reset all settings, but you can't see or reset a single setting
10:26:38 *** snoopdogg has joined #openttd
10:26:59 <snoopdogg> hey uh does openttd have touchscreen controks
10:52:59 <andythenorth> as a reward for doing the newgrf docs....
10:53:18 <andythenorth> ...can we see if multi-part ships can be ported from JGRPP? ๐
10:53:45 <truebrain> if with "we" you mean "you", yes
10:54:04 <andythenorth> I already looked ๐
10:54:27 <andythenorth> everyone *can* learn C++, but eh, I wonder what else will fall out of my small brain
10:54:33 <_jgr_> I can look into it, but I have a fair backlog of other things to look at as well
10:55:37 <andythenorth> everything is ready when it's ready ๐
11:10:29 <andythenorth> should I replace repetitive `from vehicles import` ?
11:10:42 <andythenorth> `from vehicles import (foo, bar)` etc
11:13:45 <andythenorth> nah, I don't like it
11:28:06 *** talltyler has joined #openttd
11:28:06 <talltyler> truebrain: That sounds suspiciously like a role playing usecase ๐
11:28:33 <truebrain> it is also like, we have tons of buttons to tell the behaviour of how vehicles react in stations
11:28:41 <truebrain> but not the one button I want!
11:28:47 <andythenorth> scriptable UI ๐
11:29:27 <_jgr_> That sort of functionality can be useful for freight when you've got multiple industries/cargoes in close proximity
11:29:50 <_jgr_> For passengers/mail it doesn't really make any difference if you pick up some extra cargo though
11:30:10 <truebrain> roleplaying says it does matter ๐
11:47:11 <truebrain> I ... don't actually care. But I guess a rebase, as you put in the effort to make them different commits
11:49:40 <talltyler> Thanks. Now back to the calendar/economy time split ๐
11:50:05 <talltyler> Maybe after breakfast
12:05:53 <truebrain> so much recompiling ... such header dependencies ...
12:36:48 *** gelignite has quit IRC (Read error: Connection reset by peer)
12:40:26 <truebrain> lol, trying to run Wentbourne in a debug build is a big NOOOOOO ๐
12:43:34 <truebrain> hmm .. master crashes on an old openttdcoop game
12:43:43 <truebrain> `DebugCheckSanity` asserts
12:43:59 <truebrain> `assert(v->orders == this);` to be really exact
12:44:04 <truebrain> what did we break? ๐
12:45:46 <truebrain> will bisect later to find the commit that caused harm ..
13:05:49 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
13:10:59 <truebrain> right, hopefully that helps reviewing a bit
13:11:11 <truebrain> smaller, more text and description .. hopefully a lot more clear what is actually happening ๐
13:11:27 <truebrain> at least, my understanding of CargoPacket is a lot higher ๐
13:11:41 <truebrain> now for the teleportation part .. storing that efficiently is a lot more tricky than it looks
13:36:32 <locosage> truebrain: What's wrong with storing vector? Other than relying on integer overflow because of unsigned TileIndex
13:41:12 <truebrain> std::min and std::max .. I always hate those ... eeeuuuuhhhh
13:41:19 <andythenorth> unrelated to anything sensible...cargo payment calculated via anonymous function stored in each tile? ๐
13:41:19 <truebrain> I want the smallest of the two .. so std::min?
14:01:42 <truebrain> so much testing, SO MUCH TESTING ๐
14:06:47 *** snoopdogg has joined #openttd
14:08:24 <truebrain> the details of our cargo system are interesting .. lot of edge cases .. fun to work on tbh ๐ I discover all kinds of new stuff ๐
14:28:31 <truebrain> right .. this is working .. just consumes 9 extra bytes (as I keep a lot of debugging information to proof it works) .. let's see what I can do with that ..
14:40:20 <truebrain> and all of a sudden my train exploiting an issue in 11274 makes no more profit ... poor train ...
14:41:18 <talltyler> What a game-ruining thing to do
14:44:28 <talltyler> Rebase maybe finished, let's find out ๐
14:45:06 <talltyler> Sometimes things build locally but fail CI on MacOS or MinGW, it seems
14:45:27 <truebrain> that is what the CI is for ๐
14:45:37 <talltyler> But look how small the timer classes are, now that they inherit from TimerGameCommon and CommonTime! ๐
14:46:34 <truebrain> and type-checked and everything! ๐
14:46:38 <truebrain> so curious how many bugs come from this ๐
14:46:47 <truebrain> we will have overlooked things ๐
14:47:04 <talltyler> #11270 is evidence for that
14:48:46 <truebrain> and I am going to recompile once again \o/
14:49:52 <truebrain> I guess the question is: do I keep this trivially correct and spend 8 more bytes on CargoPacket, or do I want to be clever and introduce possible mistakes .. CargoPacket, even in very large games, only have like 1000 of them
14:49:58 <truebrain> so we talk about 8 KiB of RAM, basically
14:59:53 <snoopdogg> Guys is there touchscreen controls on openttd
15:04:31 <locosage> I vaguely remember seeing smth like 60k cargo packets...
15:05:15 <locosage> they do split a lot because of ageing
15:07:25 <truebrain> lol, cargopacket from TTO-games are pretty broken ๐
15:07:25 <locosage> I mean, you can easily have 1000 trains in a game, 14 wagons each, multiple packets each wagon
15:08:46 <andythenorth> does anyone actually know about touchscreen? ๐
15:08:52 <andythenorth> snoop has asked twice to crickets
15:08:59 <andythenorth> we have an Android port
15:09:08 <andythenorth> dunno if we have touchscreen support, what does it mean?
15:09:20 <truebrain> snoopdogg: we, vanilla OpenTTD, do not support tablets of any kind. So we really cannot answer that question.
15:09:32 <andythenorth> works on Steam Deck, is that a tablet?
15:11:18 <truebrain> OpenTTD also "works" on Windows XP. We do not support that. At all ๐
15:11:22 <truebrain> to give an example ๐
15:11:42 <andythenorth> I am not aware of any touchscreen controls in the vanilla client
15:23:49 <truebrain> so when you load in an TTO game, cargo is put on (0,0)
15:23:54 <truebrain> and profit is calculated from there
15:24:04 <truebrain> so for a very short moment of time, you have the possibility to make a lot of profit ๐
15:24:30 <truebrain> fixing it should be relative simple, but without a game to test on, I am not going to bother
15:24:53 <truebrain> has been broken for decades
15:24:58 <andythenorth> can I use that to win a speed run?
15:25:25 <locosage> discord_user_4bd1af4: do
15:26:05 <locosage> truebrain: do I understand it right that rebasing 11274 is just a waste of time and you're going to rewrite it anyway rather than review?
15:28:25 <truebrain> hmm ... why does it take FOR EVER to run large games in debug mode .. so annoying ... (hihi)
15:28:59 <truebrain> locosage: I take offense to the "than review", so I will refrain from further comments
15:29:23 <_jgr_> Debug builds are not particularly useful in general
15:29:32 <truebrain> they link quicker ๐
15:29:56 <truebrain> (I know I know, I can disable LTO ๐ )
15:29:58 <_jgr_> There is a useful middle ground between no optimisation at all and extra-slow LTO
15:30:06 <peter1139> Hmm, I have a lot of scrollback to read
15:30:21 <truebrain> peter1139: it is only my wining about one thing or the other ๐
15:31:06 <truebrain> I did find bugs! And solved some .. left others alone ๐
15:31:32 <talltyler> Ha, 10700 failed CI, so I guess I have more work to do when I get home this afternoon ๐
15:31:54 <locosage> truebrain: I take offence to you wasting my time. If you want to rewrite just say so. I hate having to figure out what I need to do by some cryptic comments in the chat, especially when I'm traveling and can't easily code or follow chat.
15:32:37 <truebrain> something about a kettle and black
15:34:11 <truebrain> very cryptic .. *shrug*
15:34:21 <truebrain> anyway, I opt'd to be productive instead!
15:37:58 <truebrain> code for: dinner time!
15:50:00 *** michi_cc[d] has joined #openttd
15:50:00 <michi_cc[d]> _jgr_: I might have been reading tt-forums threads...
15:51:46 <locosage> truebrain: and I replied to you why it's a pointless change, sign thing is just something that 11274 fixes in a passing. now that I see #11280 I understand that you just wanted to learn how the code works. but as a separate change it's meaningless (especially in how slit load and unload commits). You just add logic that 11274 doesn't need. Even if you got away but having minimal amount of said
15:51:46 <locosage> logic by using INVALID_TILE special value.
15:54:29 <locosage> 11280 is still an entirely separate payment mode that need to be tested and carefully examined for exploits
15:54:43 <locosage> which is a total waste of time if you intend to change it again next commit
16:02:49 <locosage> and now you seem to be writing your own teleport fix without even saying anything or explaining why 11274 can't be used
16:03:36 <andythenorth> hmm let's see if the Horse makefile will do Hog ๐
16:05:06 <andythenorth> worked surprisingly far into the compile
16:07:19 <peter1139> Hmm, it is a bit cooler now.
16:12:23 <andythenorth> wow the Makefile ported with just copy-paste of names
16:13:24 <andythenorth> I will be enjoying timing Road Hog compile times ๐
16:39:18 <truebrain> locosage: listen locosage , let's be real here. You create a Pull Request that severely lacks in information. The motivation is a few screenshots, from which we have to deduce what is going on. The description gives a conceptually idea, but doesn't actually explain anything. The code isn't much better, and no comments or indication what is actually going on.
16:39:18 <truebrain> So, people indicate, nearly instantly, to you that the PR is hard to review. I take an interest, do an analysis what is actually happening, and explain how we can make it easier to review and understand to people.
16:39:18 <truebrain> You in return say: NAH, my PR is FINE! And especially this comment now on Discord confirms that. And you have been around here long enough for me to know that you won't change your mind anyway, and will die on this hill of "this PR is fine". And so I have two choices: put the PR at the rest of the stack of "we are never going to touch this PR" or pick it up and say: okay, how can we make this
16:39:18 <truebrain> I went for the latter. I think 11280 (and the PRs before that) show perfectly fine we can make this a lot more understandable for the reviewer, showing what is going on, giving example, etc. Making it as easy as possible to actually get the review done.
16:39:19 <truebrain> So now you have two choices. Either bitch and wine about "wasting your time" (and be mindful, that knife really cuts both ways), or take it as a moment to grow, and try to understand what we actually needed to get the review done.
16:39:25 <truebrain> (sorry for the wall of text ๐ )
16:40:50 <truebrain> meh; I wish GitHub indicated when code was moved, like you can via the CLI. Now 11282 looks bigger than it actually is ๐
16:42:48 <truebrain> michi_cc[d]: if you can fix the warnings, I actually dare to approve this ๐
16:52:07 <truebrain> You update the specs etc?
16:52:38 <peter1139> Woo, pass 7,000km :D
16:57:18 <michi_cc[d]> truebrain: The NFO wiki part, sure. NML, well... ๐
16:57:25 <truebrain> Just make a ticket ๐
16:57:53 <michi_cc[d]> I filled out the GRF API tracker ๐
16:59:24 <truebrain> now I need help fitting 9 bytes in 5 bytes ... compression? ๐
17:00:27 <michi_cc[d]> _jgr_: No idea if the variables you added for airport tiles would still be needed with #11282, but they could be proposed for vanilla if necessary.
17:00:45 <truebrain> LordAro: yeah, kinda .. sort-of .. my head hurts
17:00:55 <michi_cc[d]> Bitstuffed union?
17:01:05 <michi_cc[d]> For maximal confusion.
17:01:24 <truebrain> I will show some code in a bit, and ask for input; as I think we can do better, but I am not actually sure how .... but without code it is hard to indicate ๐
17:02:05 <peter1139> LordAro, needed more liquids tho, leg cramp started after ~170 km
17:03:21 <peter1139> (I got through about 6 bottles, not including the coffee)
17:03:52 *** squirejames has joined #openttd
17:03:52 <squirejames> Coffee is bad for leg cramps
17:04:02 <squirejames> Caffeine lowers potassium levels. Causes leg cramps
17:04:22 <truebrain> how do people do that ... do you always read this channel just don't say anything?
17:04:27 <truebrain> or do you have a highlight on "coffee"
17:04:33 <truebrain> or on "someone is wrong on the internet"? ๐
17:04:40 <truebrain> I am honestly impressed, don't take this the wrong way ๐
17:04:44 <peter1139> Sure but we live for coffee stops
17:05:45 <squirejames> I was reading through the shall we say, terse moments, on pull request 11274 ๐
17:06:52 <squirejames> and as someone who suffers with leg cramps thanks to diabetes and having an embolism (thank you spanish flu) some years ago, I figured i'd share something that people might not be aware of, and might be making their cramps worse rather than better ๐
17:07:13 <truebrain> I like it ๐ (the comment, not the cramps or the spansih flu)
17:08:58 <peter1139> Definitely nothing to do with riding 200km in 30ยฐC temps :D
17:09:28 <peter1139> Can we ban cars yet? They suck.
17:09:34 <squirejames> I mean dehydration be a thing yes ๐
17:09:55 <truebrain> you are insane peter1139 .. I am happy I didn't go out today ๐
17:11:05 <LordAro> peter1139: i've done some small amount of london cycling. never pleaasant
17:11:33 <peter1139> Even the last 30km with rain only dropped it down to 22ยฐC.
17:12:12 <andythenorth> michi_cc[d]: fortunately I made room this morning by clearing out the backlog there ๐
17:12:25 <peter1139> LordAro, yeah, the stop-start of traffic and lights is quite punishing, I found.
17:15:14 <peter1139> I've got another fairly long ride in 2 weeks, I wonder what to drink instead of coffee...
17:15:25 <truebrain> okay, the puzzle of the day. Can this be done in 4 bytes instead of 8?
17:15:39 <truebrain> my attempts so far have failed, but I might have missed something ๐
17:19:27 <peter1139> Why is TileIndexDiffC 8 bytes? It's 2 int16_ts.
17:19:37 <truebrain> wait, have I been being silly?!
17:19:50 <michi_cc[d]> Unless I'm misunderstanding something, two int16 should work for vanilla at least.
17:19:56 <michi_cc[d]> Too slow I guess...
17:19:56 <truebrain> you are my hero peter1139 ๐
17:20:06 <truebrain> I totally and completely missed that
17:20:11 <truebrain> I was like: 2x TileIndex size
17:20:18 <truebrain> right, this will work ๐
17:20:22 <michi_cc[d]> Max possible vanilla value is 2*4096, isn't it?
17:20:40 <truebrain> bit more in JGRPP, but yeah, fits in 2**15 ๐
17:20:51 <truebrain> okay, great, lol .. I was really hurting my head over that for absolutely no reason
17:20:51 <peter1139> That limits map size to 2^15, 32768.
17:21:53 <peter1139> You could potentially bit-stuff 2 variably sizes signed ints into a 32 bit uint if you want to make the max combined size 2^30
17:22:24 <peter1139> (Allowing e.g. 2^8 x 2^22)
17:22:35 <peter1139> (But that's a silly map size :))
17:22:55 <peter1139> What's JGRPP's max again? :D
17:23:08 <peter1139> (Not that it's relevant here, just interested)
17:25:51 <Eddi|zuHause> since when has "silly" kept anyone from doing it?
17:35:34 <truebrain> okay; that should do it. It is basically the same as 11274, only (at least I think) a lot more readable and understandable. Added a bunch of comments in the code explaining what the vector actually is. Hopefully that helps ๐
17:35:54 <truebrain> 30 minutes of writing a PR description .. lol ๐
17:38:31 <truebrain> commit before push? NAH!
17:41:53 <andythenorth> maybe my test game will help with payment calcs? ๐
17:42:07 <truebrain> see if anything actually changes ๐
17:42:33 <peter1139> Rule: if it makes less money, that's clearly a bug and we need to reject all efforts to change anything ;)
17:42:42 <peter1139> (see payment aging changes)
17:42:46 <andythenorth> look at those red signals though
17:43:09 * andythenorth back to porting grf compiles
17:43:39 <truebrain> peter1139: good thing there are plenty of cases where this will result in more money! ๐
17:46:51 <truebrain> oaky, I also didn't break cargodist (again), so that is another win ๐
17:47:58 <andythenorth> what about grf cargo aging? ๐
17:48:06 <truebrain> nobody cares about GRF ๐
17:48:36 <andythenorth> CB39 contains a distance var
17:48:42 <andythenorth> "probably fine"?
17:49:05 <truebrain> that is unchanged, as in, it uses the new value, but that should be unnoticable
17:49:37 <truebrain> for most maps, the distance is unaffected or slightly increased/decreased .. even for transfer games, it isn't actually all that noticeable
17:50:10 <truebrain> in most games I tried, it had a positive effect on income btw, as things actually loaded closes to the destination (so less tiles traveled for the same amount of time)
17:50:29 <truebrain> well, #11281 does that
17:51:04 <truebrain> right, all that while waiting for someone to look into my crashlog-json PR ๐
17:53:18 <talltyler> If youโre bored and thinking about JSON, at some point Iโll need some help switching JSON libraries in #10409 ๐
17:54:03 <talltyler> I couldnโt find any code examples for the new library like I did the old one
17:54:14 <truebrain> I did all the work for you, including example code!
17:54:24 <truebrain> See the scriptadmin PR
17:54:52 <talltyler> Ah, does that include loading from a file? I looked at the survey code and it only wrote to file
17:54:55 <truebrain> And not being able to find example code for this library means you didn't actually look ๐ it is one of the most used libraries ๐ ๐
17:55:12 <truebrain> You should load via our Fios
17:55:22 <truebrain> And send the data into this library
17:55:38 <talltyler> Well yes, I looked but failed to find, not saying nothing exists ๐
17:55:59 <truebrain> ๐ I meant more, there is a lot written about this lib
17:56:05 <talltyler> Yeah, the current PR uses the existing FIOS
17:56:20 <truebrain> So check out my commit for scriptadmin, and you should be good
17:56:34 <truebrain> If not, you know where to find me ๐
17:57:58 <truebrain> there is a lot of documentation there
18:00:05 <truebrain> so far I hadn't had a question that either of the two answered; I like libraries with decent docs ๐
18:01:06 <talltyler> Thanks! I will check out those resources later. ๐
18:01:20 <truebrain> no worries; and again, if you need help, just yell
18:06:25 <truebrain> I can be a dick about people saying "can't find examples"; but I am still willing to help ๐
18:06:33 <truebrain> also, some food for thought on your PR
18:12:06 <truebrain> jfs: sorry for the random ping. I really like https://github.com/OpenTTD/OpenTTD/pull/7786, but currently it is a bit blocked on some request towards you. How would you like to continue .. do you have time to pick those up? I ask, as I have no problem helping you out here, and make the separate PRs for the requested commits, and clean some things up / rebase the work
18:12:24 <truebrain> it seems we are really close in finishing it, and I have no problem putting in that effort. But if you want to / have the time, that would also be lovely
18:15:18 *** Wormnest has joined #openttd
18:20:25 <truebrain> _jgr_: do I dare to ask why you added robin hood hash? ๐
18:26:54 <peter1139> Oops, I've got stashes building up again :o
18:27:24 <truebrain> next to your draft PRs? ๐
18:27:46 <truebrain> I only have 6 stashes ... no clue what is in them
18:28:59 <peter1139> Well those do need more work, some of them I have worked on but still not completed.
18:29:32 <_jgr_> truebrain: I originally added it so that I could use it in the "public roads" road generator and in A*/NPF
18:29:46 <truebrain> does it perform (much) better?
18:30:21 <_jgr_> Yes, though just about any of the 3rd party hash tables will perform better than the ones in std::
18:30:49 <truebrain> still, might be interesting things to backport (not saying you should; just that those things might be worth it)
18:31:08 <truebrain> it caught my eye, the name made me laugh ๐
18:31:29 <_jgr_> I've been on a bit of a crusade to get rid of chunky node-based containers for small PODs
18:31:45 <truebrain> owh, and just so you know, my CargoPacket PR uses TileIndexDiffC for the vector, which might overflow in jgrpp (as you allow 1M on one axis .. and you only get 16 bits ๐ )
18:32:14 <truebrain> although unlikely someone makes a route of more than 2**15, it still allows for overflow ๐
18:32:26 <truebrain> _jgr_: I like your crusade ๐
18:32:57 <truebrain> hmm, when was the last release I build from that PR ..
18:33:48 <truebrain> hmm .. bit old, not sure it builds .. might need a bit more preparing andythenorth ๐
18:34:25 <truebrain> did feed it to the CI monster to create binaries. But takes an hour. So in an hour, maybe ๐
18:36:56 <andythenorth> I am here for a bit ๐
18:37:02 <andythenorth> or some evenings this week
18:38:24 <truebrain> I would say, already think about some settings etc .. it has to be a ship-only game ofc
18:38:39 <truebrain> so something with a lot of water, I guess?
18:38:49 <truebrain> and you ofc have to host it on your MBP; but that is only sensible
18:42:20 <andythenorth> do we need a large map?
18:43:09 <truebrain> seems like a good idea
18:47:34 <andythenorth> do we have telemetry or are we just going to eyeball FPS? ๐
18:47:53 <truebrain> and finding bugs, mostly
18:49:13 <andythenorth> we'll need rivers and crap also then
18:49:30 <andythenorth> and a really irregular map
18:49:46 <andythenorth> things that trip up ship pathfinder include peninsulas and isthmuses
18:51:17 <andythenorth> or we can cheat money and just terraform
19:09:49 <_jgr_> WITH loaded_at_xy being removed (no longer a union with next_station) it seems that next_station isn't saved/loaded anywhere?
19:10:00 <truebrain> check a commit or two later ๐
19:10:04 <truebrain> I noticed that too ๐
19:10:14 <truebrain> cargodist broke ๐
19:12:12 <truebrain> did I still fix it insufficiently? The gift that keeps on giving?
19:13:48 <_jgr_> I haven't combed through it all but it seems like it's missing
19:14:01 <truebrain> it is possible; I totally forgot it was a union
19:14:13 <truebrain> it was such bad code, so hard to decypher .. I thought I did everything, but .. I will check in a sec ๐
19:20:02 <truebrain> I just shouldn't program anymore I think ๐
19:21:30 <peter1139> I'm "amused" because I even asked about saveload, but not the right question :)
19:25:36 <peter1139> Goes to show how evil the union is.
19:28:21 <peter1139> I wish it was a bit easier to get an index from an iterator.
19:31:59 <peter1139> s/easier/less verbose/
19:35:43 <talltyler> truebrain: I donโt have a weekend afternoon (my time; evening in Europe) free until October 1, but I could give andythenorth the Event Host role if desired; I donโt necessarily have to run the event. ๐
19:36:00 <truebrain> hmm .. the build of that PR failed, as it is too old ๐ฆ
19:36:06 <truebrain> so we need him to rebase first anyway ๐
19:36:11 <talltyler> (You already have the role ๐ )
19:36:57 <truebrain> but first, fixing bugs ... or at least, checking if it is a bug, as I did look at this .. but I am getting old ๐ฆ
19:40:51 <andythenorth> Oof broadband down
19:41:02 <andythenorth> Keeps happening since August
19:41:34 <truebrain> _jgr_: tnx for spotting this; no clue how I missed it, but PR incoming ๐
19:44:48 <truebrain> I need a better archive of different types of savegames
19:44:57 <truebrain> most I have now are all kinds of test savegames that either crash or not ๐
19:49:56 <truebrain> hmm ... loading the next_station is more annoying than I would like ๐
19:50:23 <truebrain> as sometimes it is valid
19:50:24 <truebrain> sometimes it is not
19:50:32 <truebrain> (as it was a union, it was 50/50 ๐ )
19:50:58 <truebrain> and nothing actually indicates which is what, sadly
19:51:46 <_jgr_> Even if the value isn't currently meaningful, you can save and load the bit pattern as is
19:51:59 <truebrain> yeah, I did that now
19:52:04 <truebrain> but feels a bit icky, honestly
19:52:13 <peter1139> Well, under what circumstances is the value valid?
19:52:23 <truebrain> so once again I was wondering: what the fuck does the value actually do?
19:53:04 <_jgr_> It's for cargo packets in stations, I believe
19:53:12 <truebrain> it is only used in CargoTransfer
19:53:19 <truebrain> so when the cargo goes from vehicle to station, it seems
19:54:29 <truebrain> the thing is .. there is also another `next_station`, of the type `StationIDStack`, which is unrelated ๐
19:55:58 <truebrain> more weirdness .. `Reassign` takes next_station as parameter, but it is always `INVALID_STATION` in all uses
19:57:55 <peter1139> Does your savegame use cargodist? ;)
20:03:17 <truebrain> okay, StationCargoList is the only reader of this variable
20:03:27 <truebrain> called `next` .. took a bit to find it ๐
20:06:23 <truebrain> and only via `CargoTransfer` .. all other routes have their own `next_station` handling ..
20:06:50 <truebrain> it really feels like it is a temporary NOSAVE variable .. but I can't put my finger on it
20:07:57 *** geli has quit IRC (Quit: Stay safe!)
20:10:12 <truebrain> no, it is fetched more often than it is written to, so that isn't true
20:12:46 <truebrain> if only someone documented this slightly better ๐ Ghehe
20:21:47 <truebrain> still not completely sure what the value actually means, but reading garbage seems to be fine, as it is always written before read when there is garbage in them (so an old loaded_at_xy)
20:28:48 <truebrain> okay, for most part it indeed is just a way during transfer to tell what the next hop is, so it can be stored properly in the station struct
20:29:02 <truebrain> but there is also a short flow that does something with reroute, that also acts on it .. let's see ..
20:31:16 <truebrain> ah, that is just for when links change .. so during transfer, it might change when the links change, indicating stations to avoid
20:31:31 <truebrain> okay, fine, so it is a short-lived variable by all means, but should be saved for when you save/load during a transfer
20:43:28 <truebrain> so actually 1 commit out of those 5 are actually needed; but slowly I am also cleaning up the code to become a bit more understandable ๐ I can split it, if wanted
20:44:33 <peter1139> _linkstat_colours_in_legenda < Hmm, what's a legenda? :D
20:47:56 <truebrain> so in the old code, when cargo was in a train, loaded_at_xy was used. When it landed in a station, and started to unload, it changed into next_station. But only when transfer was done. And then it was unused, till a train was loaded again
20:48:04 <truebrain> this is just ... I get it, don't get me wrong, but I also get why my head hurts ๐
20:48:38 <truebrain> this was fine btw, as it was only used to calculate transfer payment, just before the value started to be used as next_station
21:01:49 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:02:50 <peter1139> JGRPP needs more road/tram types apparently.
21:04:46 <andythenorth> probably should get over myself ๐
21:10:32 <andythenorth> it's because trams are the officially recommended way to add decor I think
21:18:26 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:23:51 *** frosch123 has joined #openttd
21:24:13 <frosch123> apparently they run a podcast, and are asking whether someone from openttd wants to join a session
21:29:24 <frosch123> ok, found the podcast on yt
21:34:36 <truebrain> in demand, podcast visitors ๐
21:36:06 <frosch123> looks like it's just a bunch of nerds ๐ at first it looked like some weird video game marketing thingie
21:43:03 * talltyler crosses fingers that CI works this time
21:45:39 <talltyler> Hmm, still need to add GRF and GS methods to access economy date... :/
21:45:54 <talltyler> A project for tomorrow, maybe ๐
21:51:42 <frosch123> this thing feels so incredible american
21:53:57 <truebrain> talltyler: maybe we can delay that till the timers actually run at a different speed
21:54:02 <truebrain> till then, not actually useful as such
21:54:25 <jfs> truebrain: I don't have the time/setup to do any work on it right now, since I'm away on vacation. The major blocker as I see it is that I still do not understand exactly where the Unix builds install the documentation files and how the running program can find and open them in the cleanest way.
21:54:25 <jfs> If you want to, I would greatly appreciate help finishing it up.
21:54:59 <truebrain> I will see what I can do! Maybe XDG can assist .. Tnx for the reply, and enjoy your vacation ๐
21:56:30 <jfs> Maybe I'll post a few pictures in Discord channel #Real Trains later...
21:57:00 <truebrain> lol; trains trains, trains everywhere!
21:57:12 <talltyler> truebrain: Works for me ๐
21:58:16 <jfs> I'm in Japan and visited a railway museum in Nagoya two days ago, the one where they also present the maglev they're building, including full size mockup of a front car
21:58:37 <truebrain> I have always wanted to see a maglev up close ... maybe some day ๐
21:58:57 <jfs> It'd supposed to enter operation in 2027
21:59:41 <jfs> Isn't that actually pretty close to the time line proposed by TTD?
22:00:11 <truebrain> I honestly wouldnt know the introduction date, but sounds like close enough ๐
22:01:43 <truebrain> PR looks good; guess the main question becomes: are we actually going to do this? ๐
22:05:00 <truebrain> surprising btw, how clean a PR like 10700 gets when you do a lot of groundwork first ๐ Lot easier to review than the first few versions ๐ I am happy with the effort that has been put in getting to this stage ๐
22:05:23 <talltyler> Yes, it gets cleaner with every bit of tech debt that gets worked on ๐
22:05:37 <squirejames> jfs: So when do we get the airliners with multiple fuselages? ๐
22:06:40 <talltyler> Next steps will be:
22:06:40 <talltyler> 1. Add GRF and GS API for economy time
22:06:40 <talltyler> 3. Setting to change calendar time tick speed
22:06:40 <talltyler> Of those, 2 is by far the most work, but I've already written it so it's just a case of getting it cleaned up and merged
22:07:00 <truebrain> you forgot network stuffz
22:07:18 <truebrain> but yeah, I think getting 2 done is the most important part, as then we can see how it looks & feels
22:07:23 <peter1139> Hmm, maybe sleep time.
22:07:32 <truebrain> and you need 2 to do 3 I guess?
22:07:43 <truebrain> peter1139: you deserve it
22:16:40 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:17:40 <talltyler> Yes, I guess network stuff happens concurrently with step 1, then the other steps are in order
22:19:42 <truebrain> Lol, that are a lot of zeros in that PR .. being removed ๐
22:21:39 <truebrain> Owh, forgot to bisect the crash I found .. tomorrow!
22:23:38 <talltyler> I don't know why regression is failing. My build environment got screwed up when I upgraded from VS2019 to VS2022 and doesn't output regression results anywhere. ๐ฆ
22:24:42 <talltyler> I need to look into that ๐
22:25:18 <talltyler> Yes, you are correct ๐
22:27:35 <truebrain> I am a bit worried that it didn't pick up you were assigning one Year to another .. they are strongly typed
22:27:49 <truebrain> So we should check that out
22:27:58 <truebrain> But their point, to tell us about these mistakes
22:27:58 <talltyler> Yeah I donโt like that either
22:29:08 <truebrain> Ah, you moved them into common
22:29:11 <michi_cc[d]> talltyler: No regression output usually means the cached CMake path to editbin is invalid. Unfortunately, Cmake doesn't seem to notice this, so you either have to manually delete the cached value or just nuke the cache/build dir completely.
22:29:38 <truebrain> I will help tomorrow how to do that properly ๐ will need to test it before I bore you with template magic ๐
22:29:58 <michi_cc[d]> And also unfortunately, editbin is in the compiler dir, which changes on almost any VS version update, even minor ones ๐ฆ
22:30:48 *** _aD has quit IRC (Ping timeout: 480 seconds)
22:31:30 <jfs> Solution: write our own tool that does nothing other than change that one flag in an exe!
22:32:43 <talltyler> michi_cc[d]: Ah, that was incorrect. I've fixed the path, let's see if it works ๐
22:33:15 <truebrain> jfs: Haha, and that is how these tools come to existence ๐
22:39:43 <talltyler> It work! Thanks michi_cc[d] โค๏ธ
22:40:21 <talltyler> Unfortunately, it should not fail, so clearly I've made a boo-boo somewhere ๐ฌ
22:46:48 <talltyler> Here's the diff, if anyone is curious ๐
22:47:01 <talltyler> I'm not trying to figure it out tonight
continue to next day โต