IRC logs for #openttd on OFTC at 2024-12-08
            
02:00:17 *** gelignite has quit IRC (Quit: Stay safe!)
03:13:47 *** Wormnest has quit IRC (Quit: Leaving)
03:14:34 *** gnu_jj has joined #openttd
03:17:56 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:47:42 *** Flygon has joined #openttd
03:50:04 *** debdog has joined #openttd
03:53:29 *** godbed has quit IRC (Ping timeout: 480 seconds)
04:22:16 <DorpsGek> [OpenTTD/actions] glx22 updated pull request #86: Codechange: improve output of annotations check https://github.com/OpenTTD/actions/pull/86
04:44:46 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/d0d5a18120d900a99f3a4ae3f26f1bee33209a38
04:44:47 <DorpsGek> - Update: Translations from eints (by translators)
05:13:19 *** keikoz has joined #openttd
07:10:56 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154#pullrequestreview-2486745222
07:36:00 *** Wolf01 has joined #openttd
08:05:34 <andythenorth> lunch?
08:17:08 <LordAro> andythenorth: you still on the ground down there?
08:21:03 <andythenorth> apparently
08:40:59 <merni> i had baked potatoes
08:41:12 *** nielsm has joined #openttd
08:41:14 <merni> and hot chocolate made by melting swiss chocolate ๐Ÿ˜‹
08:49:42 <kuhnovic> I had coffee
08:49:48 <kuhnovic> Now I want more coffee
08:52:12 <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#issuecomment-2525545250
08:54:27 <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#pullrequestreview-2486832283
08:56:07 <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#pullrequestreview-2486832497
08:59:05 <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#issuecomment-2525547008
09:00:25 <DorpsGek> [OpenTTD/dibridge] TrueBrain updated pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252
09:00:49 <truebrain> LordAro: by validating what you did, and as I had to test `six`, I already had the fix for your PR ready. So I pushed that ๐Ÿ™‚
09:01:10 <truebrain> will still leave the questions open, as you might have had good reasons to add them
09:01:48 <truebrain> owh, funny, locally I don't need a dependency which remotely is needed. Another interesting case of: wtf? ๐Ÿ˜„
09:02:01 <truebrain> ah, yes, I run a newer Python versions
09:02:32 <DorpsGek> [OpenTTD/dibridge] TrueBrain updated pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252
09:03:41 <DorpsGek> [OpenTTD/dibridge] LordAro commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#issuecomment-2525548734
09:04:40 <truebrain> ah, okay, so you didn't do anything with the dependabot PR ๐Ÿ˜„
09:05:01 <truebrain> I can understand that. But it is a bit tricky. In this case, aiohttp is being tricky
09:05:01 <LordAro> not a thing :)
09:05:34 <LordAro> looks like aiohttp min python is 3.9
09:05:52 <LordAro> i imagine python could probably by upgraded... but i considered that out of scope ;)
09:05:53 <truebrain> yeah ... but we are 3.10 already with this repo ..
09:06:07 <truebrain> `FROM python:3.10-slim`
09:06:20 <truebrain> "out of scope" for this PR maybe, but not for the work to get the dependabot PR closed ๐Ÿ˜„
09:06:25 <LordAro> :p
09:06:27 <truebrain> as who else is going to address it ๐Ÿ˜„
09:07:47 <DorpsGek> [OpenTTD/dibridge] TrueBrain opened pull request #253: fix: although this project already was 3.10, testing was done on 3.8 https://github.com/OpenTTD/dibridge/pull/253
09:07:57 <truebrain> I have no clue why it was like that
09:08:00 <truebrain> that is just silly
09:08:12 <truebrain> since first commit it was like that ๐Ÿ˜›
09:08:58 <DorpsGek> [OpenTTD/dibridge] TrueBrain updated pull request #253: fix: although this project already was 3.10, testing was done on 3.8 https://github.com/OpenTTD/dibridge/pull/253
09:09:10 <truebrain> the new "merge experience" on GitHub is very nice ๐Ÿ™‚
09:10:59 <truebrain> LordAro: owh, and the manual closing of dependabot PRs have as consequence that it will skip that version. Which can hide stuff if you update like you did. That is why I keep them open, and after I merged my update PR, I tell dependabot to rebase those PRs. It either closes them, or it still tells: you should update!
09:11:12 <truebrain> a bit annoying, I know, but that way at least it remains visible when our Python is too old
09:11:26 <truebrain> and lately this really is a thing in the Python community, that you need to update your Python a lot more often than you used to
09:11:43 <truebrain> not sure what exactly changed in the attitude, but it is annoying ๐Ÿ˜›
09:12:53 <DorpsGek> [OpenTTD/dibridge] TrueBrain merged pull request #253: fix: although this project already was 3.10, testing was done on 3.8 https://github.com/OpenTTD/dibridge/pull/253
09:13:19 <DorpsGek> [OpenTTD/dibridge] TrueBrain updated pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252
09:14:13 <truebrain> and it is funny you started with the one repo that doesn't have a preview version ๐Ÿ˜„ ๐Ÿ˜„ ๐Ÿ˜„
09:14:20 <truebrain> so we are going to YOLO the shit out of this ๐Ÿ˜›
09:15:01 <DorpsGek> [OpenTTD/dibridge] TrueBrain updated pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252
09:15:30 <andythenorth> coffee has happened
09:15:36 <andythenorth> so...I did a silly thing
09:15:53 *** xarick has quit IRC (Remote host closed the connection)
09:15:53 *** brickblock19280 has quit IRC (Remote host closed the connection)
09:15:53 *** kurzov has quit IRC (Remote host closed the connection)
09:15:53 *** andythenorth has quit IRC (Remote host closed the connection)
09:15:53 *** DorpsGek_vi has quit IRC (Remote host closed the connection)
09:15:53 *** _glx_ has quit IRC (Remote host closed the connection)
09:15:53 *** talltyler has quit IRC (Remote host closed the connection)
09:15:53 *** michi_cc[d] has quit IRC (Remote host closed the connection)
09:15:53 *** joehtosis has quit IRC (Remote host closed the connection)
09:15:53 *** johnfranklin has quit IRC (Remote host closed the connection)
09:15:53 *** reldred has quit IRC (Remote host closed the connection)
09:15:53 *** _jgr_ has quit IRC (Remote host closed the connection)
09:15:53 *** squirejames has quit IRC (Remote host closed the connection)
09:15:53 *** peter1138 has quit IRC (Remote host closed the connection)
09:15:53 *** wensimehrp has quit IRC (Remote host closed the connection)
09:15:53 *** merni has quit IRC (Remote host closed the connection)
09:15:53 *** emperorjake has quit IRC (Remote host closed the connection)
09:15:53 *** spy0016158 has quit IRC (Remote host closed the connection)
09:15:53 *** clark_l has quit IRC (Remote host closed the connection)
09:15:53 *** exceptik has quit IRC (Remote host closed the connection)
09:15:53 *** mnhebi has quit IRC (Remote host closed the connection)
09:15:53 *** bohaska has quit IRC (Remote host closed the connection)
09:15:53 *** yozora3 has quit IRC (Remote host closed the connection)
09:15:53 *** belajalilija has quit IRC (Remote host closed the connection)
09:15:53 *** truebrain has quit IRC (Remote host closed the connection)
09:15:53 *** kuhnovic has quit IRC (Remote host closed the connection)
09:16:02 *** DorpsGek_vi has joined #openttd
09:16:12 *** truebrain has joined #openttd
09:16:12 <truebrain> and ugh, `importlib_resources` is the new `six`. That will be "fun"
09:16:25 <LordAro> how so?
09:16:52 *** andythenorth has joined #openttd
09:16:52 <andythenorth> `six` gives me memories of `five`
09:16:56 <DorpsGek> [OpenTTD/dibridge] TrueBrain updated pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252
09:16:56 <andythenorth> wonder if it's the same people ๐Ÿ˜›
09:17:31 <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#pullrequestreview-2486836661
09:17:56 <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#pullrequestreview-2486836750
09:18:13 <truebrain> What a mess, what a mess ๐Ÿ˜› (not your mess; it is just a mess ๐Ÿ˜„ )
09:18:40 <truebrain> `zipp` is also a polyfill
09:19:02 <truebrain> we used to have only one polyfill dep .. `six`. Now there are many of them
09:19:19 <truebrain> seems Python is going to npm way ๐Ÿ˜›
09:20:26 <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252#pullrequestreview-2486837269
09:23:34 <andythenorth> so...I've made a bunch of grfs depend on an nmlc feature that I didn't know is unreleased ๐Ÿ˜›
09:23:37 <truebrain> grr, and now what is wrong with this annotation check ....
09:23:47 <truebrain> seems the name changed slightly or something
09:24:00 <truebrain> so it wasn't seen as "run", and was waiting for it
09:24:05 <truebrain> slapped it enough for it to continue now ...
09:24:20 <truebrain> LordAro: does this PR now seems right to you? If you run your lines of code again, does it still shows a diff?
09:26:08 <truebrain> and lol @ bug of `uv` .. "I consider that intentional" , to not be pip compatible? Nice ๐Ÿ˜„
09:31:46 <andythenorth> oh, I can just template in my compile to recreate the missing nmlc feature ๐Ÿ™‚
09:32:46 <LordAro> truebrain: no further diff :)
09:33:08 <truebrain> good!
09:33:23 <truebrain> `uv` is nice btw; at least helps with getting the right Python version, and testing compatibility ๐Ÿ™‚
09:33:47 <truebrain> I just can't find how to run `uv pip` in a venv, without going into the venv. That is sad ๐Ÿ˜›
09:34:32 <LordAro> yeah, i haven't really figured out all its usages yet
09:34:47 <truebrain> right, time to deploy dibridge .. it might be that we can't talk to each other in a moment, but that is all on you then ๐Ÿ˜› ๐Ÿ˜› ๐Ÿ˜›
09:35:01 <DorpsGek> [OpenTTD/dibridge] TrueBrain merged pull request #252: chore(deps): Bump all dependencies https://github.com/OpenTTD/dibridge/pull/252
09:36:08 <LordAro> :<
09:36:53 <andythenorth> `A single tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more.` is a bold claim ๐Ÿ˜ฎ
09:37:06 <truebrain> it is really tricky to see what versions dependabot is ignoring
09:37:25 <truebrain> I can only find how to unignore stuff per dependency, meaning you need to know what you ignored in the first place
09:37:35 <truebrain> annoying
09:37:52 <truebrain> anyway, deploy-time
09:37:58 *** DorpsGek_vi has quit IRC (Remote host closed the connection)
09:37:58 *** truebrain has quit IRC (Remote host closed the connection)
09:37:58 *** andythenorth has quit IRC (Remote host closed the connection)
09:38:06 *** DorpsGek_vi has joined #openttd
09:38:19 *** truebrain has joined #openttd
09:38:20 <truebrain> seems to work ๐Ÿ˜›
09:38:36 <LordAro> \o/
09:38:40 <truebrain> nice! Nice work LordAro ๐Ÿ˜„ And tnx a lot for helping out!
09:39:03 <LordAro> ah, but does it fix the original issue of the andy sending certain unicode characters?
09:39:07 <truebrain> And yes, I actually do check all these things I mentioned in the last hour or so, when looking at those PRs. Making sure things are sane, and nothing weird gets in, and our Python is actually new enoguh to get the latest, etc ๐Ÿ™‚
09:39:17 <truebrain> You had an original issue ? ๐Ÿ˜„
09:39:21 <LordAro> ikr
09:39:29 <LordAro> impressive level of dilligence
09:39:53 <truebrain> I reimplemented dibridge in go, but I haven't found the guts to replace the Python version with the Go version
09:40:01 <truebrain> it does add some functionalities that were requested ๐Ÿ˜›
09:40:37 <LordAro> :o
09:41:29 <truebrain> haha, it seems I didn't even push the code to GitHub yet .. why not? I don't know! Work as taken too much resource cycles .... I should fix that ๐Ÿ˜›
09:49:52 *** peter1138 has joined #openttd
09:49:52 <peter1138> Urgh, VehicleViewWindow has a 'fun' way to pick different strings.
09:52:14 <DorpsGek> [OpenTTD/bananas-api] TrueBrain opened pull request #485: Fix: document how to compile the C-library https://github.com/OpenTTD/bananas-api/pull/485
09:55:57 <DorpsGek> [OpenTTD/bananas-api] TrueBrain opened pull request #486: Fix: missing library during CI regression https://github.com/OpenTTD/bananas-api/pull/486
09:56:46 <DorpsGek> [OpenTTD/bananas-api] TrueBrain updated pull request #486: Fix: missing library during CI regression https://github.com/OpenTTD/bananas-api/pull/486
09:57:08 <truebrain> meh; too many changes to update everything smoothly ๐Ÿ˜›
09:57:13 <truebrain> (external changes, that is)
10:01:02 <DorpsGek> [OpenTTD/bananas-api] TrueBrain merged pull request #486: Fix: missing library during CI regression https://github.com/OpenTTD/bananas-api/pull/486
10:01:58 <DorpsGek> [OpenTTD/bananas-api] TrueBrain opened pull request #487: Fix: warning in Dockerfile https://github.com/OpenTTD/bananas-api/pull/487
10:02:19 <DorpsGek> [OpenTTD/bananas-api] TrueBrain updated pull request #487: Fix: warning in Dockerfile https://github.com/OpenTTD/bananas-api/pull/487
10:02:24 <DorpsGek> [OpenTTD/bananas-api] TrueBrain updated pull request #485: Fix: document how to compile the C-library https://github.com/OpenTTD/bananas-api/pull/485
10:02:32 <peter1138> andythenorth: what about now?
10:06:12 <DorpsGek> [OpenTTD/bananas-api] TrueBrain merged pull request #487: Fix: warning in Dockerfile https://github.com/OpenTTD/bananas-api/pull/487
10:06:18 <DorpsGek> [OpenTTD/bananas-api] TrueBrain merged pull request #485: Fix: document how to compile the C-library https://github.com/OpenTTD/bananas-api/pull/485
10:07:14 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1315258378464792586/image.png?ex=6756c151&is=67556fd1&hm=2260075b61aaffb9e0984a22f1094bd32e550635b0e19856597df69249bafd49&
10:07:14 <peter1138> Getting there...
10:07:33 <truebrain> LordAro: which Python version shall we bump the other repos to? What you think would be a safe version? 3.10? 3.11? Maybe 3.12?
10:07:54 <peter1138> (Global string parameters disabled)
10:08:19 <truebrain> peter1138: I once started on that work; I got mental before I finished the first pass ๐Ÿ˜›
10:08:42 <peter1138> I'm on my second pass.
10:08:48 <truebrain> it is so much work
10:09:02 <peter1138> Trying to find sections to break it up into is... difficult.
10:09:16 <truebrain> at least your approach doesn't crash the game if you do it wrong ๐Ÿ˜›
10:09:35 <LordAro> truebrain: https://devguide.python.org/versions/ ยฏ\_(ใƒ„)_/ยฏ
10:10:29 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1315259198698950707/image.png?ex=6756c215&is=67557095&hm=1c0ee0529ecf02fe87defec35447c6d24b227fc7ffd28fbf29e43fa5bd05f8a3&
10:10:29 <peter1138> Exceptions are useful ๐Ÿ˜‰
10:10:39 <truebrain> 3.13 really is "too new". 3.10 is good for another 2 years ..
10:11:09 <LordAro> i'd be tempted to say stay on 3.9 unless there's something particularly desirable in newer versions
10:11:24 <truebrain> we are on 3.8, so there is no staying on 3.9 ๐Ÿ˜›
10:11:45 <peter1138> My Debian Stable system is 3.11
10:11:53 <peter1138> If it's old enough for Debian stable...
10:12:16 <truebrain> there is nothing really in any of the 3.10+ that we "need"
10:12:37 <truebrain> 3.13 is interesting in terms of performance, but it is a long way from being useful
10:16:14 <truebrain> lol, I just received spam on an email I use only for commits .. it starts with: "I am sorry if my mail intruded your privacy."
10:19:20 <truebrain> lol, `uv` does make installing deps scary fast ๐Ÿ˜›
10:20:29 <LordAro> :D
10:20:35 <DorpsGek> [OpenTTD/bananas-api] TrueBrain opened pull request #488: Upgrade: Bump Python to 3.11 https://github.com/OpenTTD/bananas-api/pull/488
10:20:37 <truebrain> okay, let's try this ...
10:20:50 <LordAro> i'm only aware of it because it's the same company that makes `ruff`
10:21:08 <LordAro> which is also much faster than flake8
10:21:16 <truebrain> I haven't tried `ruff`. Might be worth trying some day ๐Ÿ™‚
10:21:26 <truebrain> I have to admit, I am slowly migrating most of my work to Go
10:21:45 <truebrain> as Python is nice, but ... especially for webservers, performance is meh
10:21:57 <peter1138> Hmm, maybe I should start PRing some of this.
10:22:25 <LordAro> truebrain: for webservery stuff, yeah, Go's a good shout
10:22:29 <truebrain> peter1138: sounds like a good idea, yes ๐Ÿ˜„ If that is possible, ofc ๐Ÿ˜‰
10:22:38 <LordAro> i think it's support in other areas is disappearing
10:22:55 <truebrain> LordAro: yeah, mostly, I was looking into some performance issues with OpenTTD services, and not unexpected, it turns out that if it is handling 1 request which stalls a bit, no other requests are processed
10:23:21 <truebrain> Python ofc tries to fix that, years late, with 3.13
10:23:30 <truebrain> but it will take years for that to settle, I imagine ๐Ÿ™‚
10:23:46 <truebrain> and although Go is quirky, it is a rather nice language to also quickly build stuff
10:23:55 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154
10:24:06 <truebrain> it just has weird quirks ๐Ÿ˜„
10:24:28 <truebrain> for example, when using it to produce WASM binaries, the WASM binaries are GIGANTIC, and you need `tinygo` to have them somewhat sane (size-wise) ๐Ÿ˜›
10:24:57 <truebrain> okay, let's deploy bananas-api to staging, and let's see if it still actually works ๐Ÿ™‚
10:25:38 <LordAro> heh, yeah, good ol GIL
10:26:03 <truebrain> the GIL is, for most services on openttd.org, much more an issue than I initially expected
10:26:12 <LordAro> how GIGANTIC are we talking?
10:26:17 <truebrain> it adds a lot of latency to services like the TURN service
10:26:27 <truebrain> owh, WASM binaries are 2+ MiB when building with Go
10:26:32 <truebrain> where the same is ~20 KiB with Rust
10:26:41 <LordAro> i was about to say, 2MB not all that much
10:26:51 <LordAro> you should try packaging python as an exe...
10:26:51 <truebrain> it is if you get it every time you visit a webpage ๐Ÿ™‚
10:26:55 <truebrain> No
10:26:57 <LordAro> :D
10:27:13 <peter1138> LordAro: Smaller than a temporary buffer for generating deserts...
10:27:16 <truebrain> by now I came to peace with the fact Python will never be able to efficiently target WASM ๐Ÿ™‚
10:27:21 <LordAro> peter1138: ๐Ÿ”ฅ
10:27:38 <truebrain> only a very small subset of Python might, but yeah ... ๐Ÿ˜›
10:28:01 <LordAro> our "main product" at work is distributed via an installer that is currently 1.2G
10:28:06 <LordAro> i think it expands to around 3/4G
10:29:16 <truebrain> lolz
10:29:34 <truebrain> I was porting a WASM library of mine from Rust to Go, to see how it went
10:29:40 <truebrain> it went from 600 KiB to at least 5 MiB
10:29:43 <peter1138> At least it's not 5G, that'll give you brainworms...
10:29:54 <truebrain> I know, just ~10 times bigger, but still, I don't find that acceptable ๐Ÿ˜›
10:30:10 <truebrain> maybe in modern web day and age it is; but meh
10:30:43 <LordAro> tbf, 25% of that is a copy of the GNAT compiler
10:32:05 <truebrain> okay, new bananas-api seems to run fine on staging
10:32:16 <truebrain> so I guess Ican just merge it? YOLO? ๐Ÿ˜„
10:32:50 <LordAro> when's our peak time? :p
10:33:01 <truebrain> in a few hours ๐Ÿ˜›
10:33:14 <peter1138> Perhaps give out a notice first? Then when users complain we can say there was a notice...
10:33:21 <truebrain> sure!
10:33:53 <peter1138> Like last time there was that outage and 'some' (probably one) users were getting quite weird about it.
10:34:19 <truebrain> notice given in the channels that would care abou tit
10:37:06 *** gelignite has joined #openttd
10:37:10 <DorpsGek> [OpenTTD/bananas-api] TrueBrain merged pull request #488: Upgrade: Bump Python to 3.11 https://github.com/OpenTTD/bananas-api/pull/488
10:37:34 <truebrain> I do remember someone was working on bananas-api, to add some authentication handler. Just don't remember the username. Might be important for them to know this too ๐Ÿ˜„
10:37:56 *** andythenorth has joined #openttd
10:37:56 <andythenorth> peter1138: for lunch?
10:39:22 <truebrain> right ... if after a while this repo hasn't shown any signs of issues, I am pretty sure we can safely bump all other repos too ๐Ÿ™‚
10:43:34 *** xarick has joined #openttd
10:43:34 <xarick> hi
10:50:58 <xarick> I'm unable to iterate over a DiagonalTileArea
10:51:03 <xarick> directly
10:55:35 <peter1138> Me too. I let the code do it.
10:58:59 <peter1138> Something like `DiagonalTileIterator it{tile1, tile2}; for (TileIndex tile = it; tile != INVALID_TILE; tile = ++it) { ... }`
11:00:01 <peter1138> (Or pass an existing DiagonalTileArea instead of `tile1, tile2`)
11:06:34 <xarick> oh, interesting
11:09:26 <peter1138> That Create() method is used in some places because the code can use either type, and the unique_ptr is used for type erasure.
11:13:46 <andythenorth> naptime?
11:17:37 <andythenorth> I can't be arsed to fix the grfs ๐Ÿ™‚
11:18:00 <andythenorth> classes were a misadventure ๐Ÿ™‚
11:20:25 <peter1138> station classes?
11:22:12 <andythenorth> badge classes?
11:25:42 <andythenorth> maybe I should start something else in a new branch
11:26:04 <andythenorth> currently all my grfs are stuck, can't get any further ๐Ÿ˜›
11:28:48 <andythenorth> 'sounds like excuses'
11:38:11 <xarick> thx, i did some changes around, I expect this to be faster
11:39:19 <xarick> unless the erase method is too slow
11:39:35 <xarick> let's see
11:41:03 <xarick> got a NOT_REACHED ๐Ÿ˜ฆ
11:43:43 <xarick> can't dereference vector bla
11:43:51 <xarick> i always manage to trigger this thing
11:45:55 <xarick> ah, the vector is empty
11:46:02 <xarick> okay, fixed
11:47:31 <xarick> holy moly
11:47:32 <xarick> [2024-12-08 11:47:15] dbg: [misc:0] num_tree_tiles = 15246472
11:47:32 <xarick> [2024-12-08 11:47:15] dbg: [misc:0] [GenerateTrees] 3108664 us [avg: 3108664.0 us]
11:47:43 <xarick> 3 seconds
11:47:58 <xarick> down from 900 something seconds
11:49:08 <xarick> my goodness!
11:50:05 <peter1138> Hmm, maybe I should do encoded strings differently.
11:50:32 <peter1138> They are a bit inefficient if there's no parameters, as the initial StringID still needs to be converted to text.
11:51:09 <peter1138> Gah, why is std::string so large.
11:51:35 <peter1138> Tempted to use char *, 8 bytes instead of 32 bytes. (Yes, I know, SSO).
12:08:06 <xarick> hmm i have a problem, maybe
12:08:16 <xarick> my fix is too good
12:08:18 <xarick> lol
12:08:48 <xarick> need to test this with lower heights
12:09:17 <xarick> i think this results in tons of trees compared to previous
12:11:23 <xarick> previously, it was doing something akin to 50% chance to place a tree in the area, and then another unknown chance that some tiles in the area remain untree'ed
12:11:58 <xarick> and that's already by bruteforcing
12:13:31 <xarick> but now... hmm it always places a tree in any available spot for a tree each time it's called
12:15:29 <xarick> I need a much lower value for j
12:21:29 <peter1138> You need to reduce j by a factor related to the number of suitable tiles.
12:21:41 <peter1138> Number of unsuitable...
12:22:31 <peter1138> Something simple like `j = initial_value_of_j * suitable_area / full area` perhaps.
12:23:12 <peter1138> Will probably still result in more trees though.
12:27:44 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13159: Codechange: Add EncodedStrings and use for tooltips and texteffects. https://github.com/OpenTTD/OpenTTD/pull/13159
12:38:01 <peter1138> Hmm, probably the first commit shouldn't be there.
12:48:03 <andythenorth> so...is it ok to commit things to main branch of a grf, that can't be compiled?
12:48:15 <andythenorth> used to be absolute **no** for coop grfs
12:48:40 <peter1138> If it's because it's broken, no.
12:48:49 <peter1138> If it's because it needs a pre-release version of a tool, maybe.
12:49:09 *** talltyler has joined #openttd
12:49:09 <talltyler> Are you referring to FRAX constants?
12:49:49 <talltyler> I am not opposed to adding them to NML, but I have no permissions to do anything in that repo ๐Ÿ™‚
12:49:49 <talltyler> (maybe this is why)
12:50:49 *** johnfranklin has joined #openttd
12:50:49 <johnfranklin> How to deal with 1 and 2 pence?
12:50:58 <johnfranklin> To charity?
12:52:44 <andythenorth> pretty much
12:53:35 <talltyler> Anything needed in OpenTTD? The potable/non-potable PR got merged already.
12:53:49 <LordAro> i'd probably have not taken them to begin with
12:55:26 <peter1138> talltyler: If "FRAX" is incompatible with the original cargo classes, then merging anything into vanilla is trying.
12:55:41 <peter1138> Er... tricky.
13:02:58 <andythenorth> it is incompatible, which is expected ๐Ÿ™‚
13:03:19 <andythenorth> I wasn't expecting vanilla to change/add constants
13:08:49 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #13159: Codechange: Add EncodedStrings and use for tooltips and texteffects. https://github.com/OpenTTD/OpenTTD/pull/13159#pullrequestreview-2486964293
13:11:07 <peter1138> That... seems unlikely.
13:11:56 <andythenorth> I guess I'm a bit stuck on what's best
13:12:13 <andythenorth> I can build locally using [whatever]
13:12:30 <peter1138> Which part is broken?
13:12:42 <andythenorth> not sure, trying to figure out the options
13:13:01 <peter1138> Without native support in OpenTTD, I don't think additional constants should really be added to NML itself.
13:13:29 <peter1138> e.g. we don't add all the various railtype schemes people have come up with.
13:14:17 <andythenorth> there are 3 possible ways to insert the classes
13:14:17 <andythenorth> - set the bit numbers directly, using compile-time python constants and templating
13:14:17 <andythenorth> - set the classes, using nml `const` which will be in the next version of nml, with a file of constants resolving to bitnumbers
13:14:17 <andythenorth> - rely on the classnames getting added to nmlc as constants
13:14:35 <andythenorth> all 3 work
13:14:51 <peter1138> Isn't 2 the most appropriate way?
13:14:59 <peter1138> Const is already in NML...
13:15:13 <andythenorth> well the next nml release is a bit of a grey area, but yes
13:15:46 <andythenorth> ok, so if the constants file is included in the concatenated firs.nml, that will work with forsk
13:15:56 <peter1138> A grey area? If you mean "when", sure. Nothing is going to be ripped out.
13:16:40 <andythenorth> I just mean 'when', as the majority of nml authors likely can't build nml
13:17:41 <andythenorth> ok, so constants, and they'll be included in firs.nml, as many FIRS forks appear to just copy all 275k lines of firs.nml and edit it
13:18:26 <peter1138> Includes would be nice, though I think that was very much a draft.
13:18:39 <andythenorth> yes ๐Ÿ˜›
13:18:47 <andythenorth> I'm not depending on even more unreleased stuff ๐Ÿ™‚
13:19:25 <andythenorth> ok so I'll resurrect my constants file and close https://github.com/OpenTTD/nml/pull/345
13:20:11 <peter1138> No, that one is not merged so no.
13:20:31 <andythenorth> do we also need to delete `CC_NEO_BULK` from nml?
13:20:41 <andythenorth> it redefines `CC_NON_POURABLE`
13:20:59 <peter1138> Don't close anything yet.
13:21:07 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315307173512872017/image.png?ex=6756eec3&is=67559d43&hm=2a629d80458e21e97efa87b30257303f8a5548c81c403c3874dcf2efeca641cd&
13:21:07 <xarick> my diagonal math skills are failing me
13:21:08 <peter1138> I am just one guy with an opinion.
13:21:16 <xarick> 17 * 17 is not 545 ๐Ÿ˜ฆ
13:21:24 <andythenorth> mostly I just need to outsource having an opinion ๐Ÿ˜›
13:21:47 <peter1138> `17*17 + 16*16` is 545.
13:21:49 <andythenorth> ok shops time, brocolli required
13:22:04 <xarick> oh, nice maths!
13:51:13 *** _glx_ has joined #openttd
13:51:13 <_glx_> ah codeQL and templates, not fully working it seems
13:53:13 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315315251289391165/image.png?ex=6756f649&is=6755a4c9&hm=ebbca6fb89ed8160517997d15c600cf0822b4ad4b21faa75e42ba7d05c4887b4&
13:53:13 <xarick> oh, a regression
13:53:23 <xarick> faster trees was slower
13:55:59 <peter1138> Hmm, this is not working.
13:59:41 <peter1138> Oh. Why did I do that?
14:00:08 <peter1138> Copied and pasted `EncodedString &&caption` to the member variable.
14:00:18 <peter1138> It should, of course, be `EncodedString caption`
14:01:24 <_glx_> not the first false positive for "unused variable" in pack expansion
14:07:16 <peter1138> Before: ๎€F0B:5AF:72C
14:07:16 <peter1138> After: ๎ˆTransfer: ยฃ1,455๎Œ / ๎‡Income: ยฃ1,836
14:07:17 <peter1138> Nice ๐Ÿ˜„
14:08:08 <peter1138> How short is short string optimisation? Hopefully that before fits...
14:08:41 <Rubidium> was that like 15 bytes?
14:09:06 <peter1138> Could be just under.
14:12:52 <peter1138> It's all _glx_ 's fault, with the suggestion to use string encoding. It's definitely feasible.
14:13:21 <peter1138> Do not trust, this comes from an old Stack Overflow answer...
14:13:21 <peter1138> > On a 32 bit machine, 10 chars will fit in the short string. sizeof(string) is 12.
14:13:21 <peter1138> > On a 64 bit machine, 22 chars will fit in the short string. sizeof(string) is 24.
14:13:54 <peter1138> But *we're* not allowed to type-pun ๐Ÿ™‚
14:14:39 <Rubidium> peter1138: for which compiler/libstdc++? As it differs. Given the order of the numbers I guess clang
14:14:58 <_glx_> silly me, suggesting an existing way to get rid of global param copies
14:15:18 <peter1138> That's why I said "Do not trust". the answer was vague enough as it is ๐Ÿ™‚
14:16:46 <_glx_> but the first step looks so clean without the SetDParam
14:16:50 <andythenorth> did I need to fix FIRS tile animation?
14:16:51 <andythenorth> hmm
14:17:15 <peter1138> Well, one idea was to have vectors of stringparameterdata everywhere.
14:17:22 <peter1138> But that was... yeah, definitely not clean.
14:18:27 <peter1138> Doing it with pack expansion allows us to closely tie everything together.
14:19:31 <peter1138> Actually, GetEncodedString() could probably be rewritten to avoid the MakeParameters call.
14:20:00 <peter1138> Although then it would be inlined everywhere.
14:20:05 <peter1138> So also not ideal.
14:20:16 <peter1138> We build an array, then pass that to GetEncodedString().
14:23:34 <andythenorth> this is weird https://github.com/andythenorth/polar-fox/blob/main/src/cargo_classes/cargo_class_constants.nml
14:23:59 <andythenorth> means that FRAX will map onto the old/wrong class constants
14:24:06 <andythenorth> why did I do that? ๐Ÿ˜›
14:24:46 <peter1138> WIP that didn't get updated?
14:24:54 <andythenorth> probably made sense at the time
14:28:18 <peter1138> Hmm, although a constexpr ShowErrorMessage() might be nice.
14:28:23 <xarick> which container is ideal for inserting and removing items? still vector?
14:28:57 <peter1138> Er...
14:28:59 <peter1138> Wrong call.
14:29:06 <peter1138> A constexpr GetEncodedString() might be nice.
14:29:22 <peter1138> xarick: How many items, and to and from where?
14:30:01 <peter1138> Hmm, I can probably special-case a constexpr GetEncodedString() with no parameters, actually.
14:30:02 <xarick> 545 items to 0 items or to when j reaches 0, whichever comes first
14:30:28 <xarick> 545 theoretical maximum
14:30:28 <peter1138> Probably vector is fine then.
14:30:47 <peter1138> Why does it need to change?
14:30:59 <peter1138> Can't you add only candidate tiles to the list?
14:31:58 <xarick> yes, start by doing that
14:32:12 <xarick> but then it enters the j loop
14:32:23 <xarick> and removes from the candidate tiles
14:34:24 <peter1138> Oh, std::string can't be constexpr I think. Never mind.
14:34:28 <_glx_> it mostly depends where you insert and from where you removed
14:34:43 <_glx_> vector is not the best when everything happens in middle
14:36:45 <_glx_> and depending on how you iterate you can have "surprises" with invalidated iterators
14:39:25 <xarick> ``` while (j-- != 0 && !available_tiles.empty()) {
14:39:25 <xarick> std::vector<TileIndex>::iterator it = std::next(available_tiles.begin(), RandomRange(static_cast<uint32_t>(available_tiles.size())));
14:39:25 <xarick> PlaceTree(*it, Random());
14:39:25 <xarick> _num_trees_placed_at_same_height++;
14:39:25 <xarick> available_tiles.erase(it);
14:39:26 <xarick> }```
14:43:51 <xarick> gonna try some other containers
14:48:07 <peter1138> 545 elements is probably small enough to win.
14:48:32 <peter1138> std::deque will be zero difference.
14:49:05 <peter1138> std::unordered_map will be quicker at removing.
14:49:15 <peter1138> Er, std::unordered_set.
14:49:24 <peter1138> std::set will be slower to iterate.
14:49:40 <peter1138> std::list will require jumping around fro element to element, even for removing.
14:49:45 <andythenorth> hmm possibly mapping to the nml class constants was intended, not sure ๐Ÿ˜›
15:17:51 <xarick> unordered set was slow, or I did it wrong
15:18:12 <andythenorth> could these be merged? They'd simplify my local nml patch queue? ๐Ÿ™‚
15:18:13 <andythenorth> https://github.com/OpenTTD/nml/pull/344
15:18:21 <andythenorth> https://github.com/OpenTTD/nml/pull/343
15:20:44 <xarick> list was also slow
15:20:47 <xarick> guess vector it is
15:22:29 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1315337716488994846/image.png?ex=67570b35&is=6755b9b5&hm=f19db9251a3e425fcb8e49111e8afba52cd3953f607bdac1376b78c625495cb1&
15:22:29 <peter1138> ๐Ÿ™‚
15:23:08 <DorpsGek> [OpenTTD/nml] PeterN merged pull request #343: Change: cargo class bits 13 and 14 now define potable and non-potableโ€ฆ https://github.com/OpenTTD/nml/pull/343
15:24:47 <DorpsGek> [OpenTTD/nml] PeterN commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2487111353
15:25:01 <andythenorth> thanks
15:25:40 <peter1138> Okay, I need to faff around with the company error message now.
15:26:18 <peter1138> I may need to extra the code that decodes an encoded string...
15:26:22 <peter1138> *extract
15:33:49 <xarick> copilot suggested me to use std vector with unordered map
15:33:52 <xarick> let's see
15:34:28 <xarick> nop, still slow
15:34:55 <xarick> solo vector still better
15:36:51 <_glx_> container in container is often not the best solution
15:37:32 <_glx_> but all depends on the goal
15:38:39 <DorpsGek> [OpenTTD/nml] andythenorth commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2487117833
15:38:49 <peter1138> I guess you are not prefiltering your vector for invalid tiles, that may be expensive.
15:39:24 <xarick> let me upload my current code
15:40:18 <DorpsGek> [OpenTTD/nml] PeterN commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2487118410
15:41:37 <peter1138> Hmm, 1000 goes, and j is related to tile height.
15:43:32 <peter1138> Okay, I do have a constexpr GetEncodedString() now, but it's not being constexpr ๐Ÿ˜ฆ
15:43:57 <DorpsGek> [OpenTTD/nml] andythenorth commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2487119939
15:44:29 <xarick> https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:faster-trees-generation
15:44:52 <andythenorth> what am I missing? The number is wrong?
15:44:59 <andythenorth> can't see for looking ๐Ÿ˜›
15:47:00 <_glx_> could be my mistake
15:47:11 <_glx_> I did not very test
15:47:36 <DorpsGek> [OpenTTD/nml] PeterN commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2487120886
15:49:32 <DorpsGek> [OpenTTD/nml] glx22 commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2487121730
15:52:04 <peter1138> Am I going mad?
15:52:20 <DorpsGek> [OpenTTD/nml] glx22 commented on pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2487122806
15:52:54 <_glx_> no you're right, I touched the wrong line ๐Ÿ™‚
15:52:57 <andythenorth> I only tested for trains ๐Ÿ™‚
15:54:32 <peter1138> I didn't think my original question was unclear, so I'm wondering what I could have done to make it clearer.
15:54:50 <_glx_> it was clear to me ๐Ÿ™‚
15:58:59 <andythenorth> quite often my brain doesn't do the thing ๐Ÿ˜›
16:01:44 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1315347594528165898/image.png?ex=67571468&is=6755c2e8&hm=230185287106aa21c586e88114a1d2dedbc4d816f15ad587609b2f966d3bd86c&
16:01:44 <peter1138> clangd is going a bit mad.
16:02:19 <_glx_> updated commit in my branch
16:05:02 <andythenorth> how do I update the PR now? ๐Ÿ™‚
16:05:10 <andythenorth> I have a glx remote
16:05:31 <andythenorth> cp the commit?
16:07:06 <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344
16:07:07 <andythenorth> maybe
16:09:59 <peter1138> Nope
16:10:19 <peter1138> Is there a constexpr way to convert a constant to a utf8-representation of it?
16:12:53 <peter1138> If CCC = 0x1234, I can use "\u1234" for its utf8 representation I think. But not directly with the constant.
16:14:24 <_glx_> oups nml repo need an update
16:14:37 <DorpsGek> [OpenTTD/nml] andythenorth dismissed a review for pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344#pullrequestreview-2471428653
16:14:40 <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344
16:14:45 <DorpsGek> [OpenTTD/nml] andythenorth updated pull request #344: Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) https://github.com/OpenTTD/nml/pull/344
16:15:00 <_glx_> Error: The version '3.7' with architecture 'x64' was not found for Ubuntu 24.04
16:15:33 <LordAro> that'll be that ubuntu-latest thing it was warning about ;)
16:17:18 <_glx_> regression checks 3.9, 3.10, 3.11 and 3.12, release uses 3.x, but testing is still on 3.7
16:17:46 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13159: Codechange: Add EncodedStrings and use for tooltips and texteffects. https://github.com/OpenTTD/OpenTTD/pull/13159
16:17:56 <_glx_> I'll go with 3.x, should be fine for black
16:21:41 <DorpsGek> [OpenTTD/nml] glx22 opened pull request #347: Update: Python version for testing https://github.com/OpenTTD/nml/pull/347
16:23:20 <_glx_> hmm maybe I should do it for codeql too (it's 3.8 right now)
16:24:02 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315353203461849248/image.png?ex=675719a1&is=6755c821&hm=d5ce50e2d2294f3c23e2478a3e7c2fd30831b7376b883cb0cc937e74d7d54cd7&
16:24:02 <xarick> at low heights (aka low values of j) I get worse times ๐Ÿ˜ฆ
16:25:26 <DorpsGek> [OpenTTD/nml] glx22 updated pull request #347: Update: Python version for testing https://github.com/OpenTTD/nml/pull/347
16:29:36 <peter1138> Hm
16:31:45 <xarick> okay i see where this shines most
16:32:41 <xarick> the difference in heights around the original tree
16:33:00 <xarick> the lesser the number of tiles, which means the rougher the terrain, the best this gets
16:33:06 <peter1138> But if it's flag...
16:33:09 <peter1138> But if it's flat...
16:33:31 <_glx_> it's always a balance, you may improve for some cases but getting worse results in other
16:33:51 <_glx_> the question is which case is more common
16:33:55 <xarick> if the terrain around the original tree is too flat, too smooth, this vector approach turns out slower
16:47:34 <peter1138> Trying to figure out the best way to get rid of SetDParamsForOwnedBy.
16:49:03 <peter1138> Especially OWNED_BY_OWNER_IN_PARAMETERS_OFFSET
16:49:04 <_glx_> oh this function is not hacky at all
16:49:12 <peter1138> Quite.
16:50:06 <peter1138> CommandCost could use EncodedString instead of StringID, but I'm wary of that as there are a lot of error behind the scenes that you never see.
16:50:17 <_glx_> nice abuse of the global param array
16:51:00 <peter1138> e.g. water flooding industries every tile loop (because it's not in the non-floodable list) causes an error to be generated, which is ignored because it's user-generated error.
16:51:22 <peter1138> If it starts formatting strings at that point it will definitely cause slow downs.
16:52:07 <peter1138> Probably the path of least resistance is to use a static parameter array, but dedicated to errors, not shared with global parameters.
16:52:21 <peter1138> And also store the owner separately.
16:56:29 <_glx_> yeah SetDParamsForOwnedBy() seems to do 2 things, set OWNED_BY_OWNER_IN_PARAMETERS_OFFSET for errors, and set strings and params for normal cases
16:57:23 <_glx_> I guess it could return an EncodedString for the second part
16:58:18 <peter1138> I have an idea.
17:01:53 <_glx_> errors are actually the most complex to move away from global array, as in many cases the args are context dependant and the error is fired (and sometimes not) way after parameters
17:02:06 <peter1138> Yup.
17:16:04 <johnfranklin> someone said it is over when a tram enters into an โ€œtramway-end road stopโ€ with an irremovable object (industries) ahead.
17:17:11 <_glx_> it's supposed to be a special case in handling, allowing reversing of the tram
17:17:30 <_glx_> but maybe not for stations
17:18:36 <peter1138> Hmm, seems if I do things too quickly for VS Code it can trash loads of files ๐Ÿ˜„
17:20:13 <peter1138> `rereturn CommandCostTR_ERROR_SITE_UNSUITABLE);`
17:20:18 <peter1138> How did search and replace do that...
17:22:50 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13160: Codechange: Remove unnecessary 'return_cmd_error` macro. https://github.com/OpenTTD/OpenTTD/pull/13160
17:25:00 <xarick> I found a solution
17:25:20 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13160: Codechange: Remove unnecessary 'return_cmd_error` macro. https://github.com/OpenTTD/OpenTTD/pull/13160#pullrequestreview-2487206987
17:25:22 <xarick> use both methods, depending on height differences
17:25:52 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13159: Codechange: Add EncodedStrings and use for tooltips and texteffects. https://github.com/OpenTTD/OpenTTD/pull/13159
17:25:53 <xarick> too little differences in height? use original method.
17:26:11 <xarick> too many differences in height? use area method.
17:26:51 <xarick> it has 3 tiles to check heights, for the decision
17:28:16 <xarick> it's not an exact method, but works okayish
17:28:19 *** D-HUND has joined #openttd
17:28:55 <xarick> let me check the worst case scenario
17:29:54 <xarick> 14731410 us
17:30:08 <xarick> acceptable
17:32:30 *** Wormnest has joined #openttd
17:43:04 <johnfranklin> How to pronounce โ€œshouldโ€™veโ€?
17:43:31 <johnfranklin> Like, some easy questions hard to describe answers
17:44:40 <peter1138> It's pronounced "should've"
17:44:58 <peter1138> Rhymes with "could've"
17:45:16 <andythenorth> would've
17:45:41 <johnfranklin> https://cdn.discordapp.com/attachments/1008473233844097104/1315373752543875152/voice-message.ogg?ex=67572cc5&is=6755db45&hm=e784090cb5bed907d4f70f88228e87122317e17de4198c262453d12b6f76473b&
17:45:57 <johnfranklin> dโ€™ve part like this?
17:46:42 *** belajalilija has joined #openttd
17:46:42 <belajalilija> https://cdn.discordapp.com/attachments/1008473233844097104/1315374007624667298/voice-message.ogg?ex=67572d01&is=6755db81&hm=a8b7e6b75264167cc0806e0f03eacec83b41f55f489cfeaa2107cffdc2e75aca&
17:46:52 <belajalilija> Like that
17:47:20 <johnfranklin> So it is a very loud โ€œdโ€
17:47:30 <peter1138> Loud?
17:47:32 <johnfranklin> Thanks
17:47:38 <belajalilija> johnfranklin: Yes
17:47:47 <belajalilija> The D is strong
17:48:27 <peter1138> I'm going to have to start saying coulDVE, woulDVE, shoulDVE, shouting on the last morning...
17:48:38 <belajalilija> Xd
17:48:48 <peter1138> Couldn't've.
17:49:37 <belajalilija> I love double contractions
17:50:29 <belajalilija> https://cdn.discordapp.com/attachments/1008473233844097104/1315374963036913704/IMG_0137.png?ex=67572de5&is=6755dc65&hm=2872194349878405af6f434abb35338d6193049d6e58f98a8f5c2e918b579620&
17:50:29 <belajalilija> Knew Iโ€™d find myself
17:53:38 <peter1138> fo'c'sle is short for forecastle
17:54:08 <peter1138> But forecastle is not pronounced forecastle, so...
17:54:20 <peter1138> (It's also not a hugely common word)
17:54:29 <andythenorth> could of
17:54:30 <andythenorth> would of
17:54:37 <peter1138> No.
17:54:38 <peter1138> GET OUT.
17:54:51 <andythenorth> hmm new FIRS 4 is now on bananas
17:54:58 <andythenorth> changed classes ๐Ÿ˜›
18:00:48 <talltyler> In the American South, you can suggest an alternative course of action in hindsight by saying โ€œmightโ€™ve couldโ€ ๐Ÿคจ
18:02:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13160: Codechange: Remove unnecessary 'return_cmd_error` macro. https://github.com/OpenTTD/OpenTTD/pull/13160
18:08:10 <peter1138> Ooof
18:11:54 <andythenorth> oui
18:16:50 *** merni has joined #openttd
18:16:50 <merni> ouagadougou
18:18:03 <peter1138> Made something const and it broke everything.
18:22:44 <peter1138> Ah, got it. Too much function overloading and templates.
18:26:27 <DorpsGek> [OpenTTD/BaNaNaS] TrueBrain opened pull request #151: Update: bump Python to 3.11 https://github.com/OpenTTD/BaNaNaS/pull/151
18:27:24 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154#pullrequestreview-2487229609
18:27:45 <DorpsGek> [OpenTTD/BaNaNaS] TrueBrain merged pull request #151: Update: bump Python to 3.11 https://github.com/OpenTTD/BaNaNaS/pull/151
18:27:56 <truebrain> found a side-effect of the bump earlier ๐Ÿ˜„
18:36:16 <andythenorth> so what do I need to do make FIRS faster?
18:36:18 <andythenorth> peter1138: ๐Ÿ˜›
18:36:24 <andythenorth> not animate all the tiles?
18:38:34 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154#pullrequestreview-2487234070
18:40:00 <_glx_> oh indeed I misread the code
18:41:03 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154#pullrequestreview-2487234943
18:41:37 <xarick> unordered_set not as fast as I thought for some things
18:46:02 <peter1138> There is a reason I've been liberally using vector and lower_bound recently ๐Ÿ™‚
18:48:13 <peter1138> Oops.
18:52:03 <xarick> i must evaluate the original method by the number of failed attempts
18:52:16 <xarick> i suspect it's failing 99% of the time
18:52:28 <xarick> meaning that j is absurdly high
18:52:40 <xarick> will check this out after dinner
19:12:25 <andythenorth> hmm
19:13:02 <andythenorth> currently Iron Horse populates the text stack (for every vehicle) differently depending on context, e.g. purchase, autoreplace, etc
19:13:12 <andythenorth> this creates a lot of advanced varact2
19:13:55 <andythenorth> wonder if I could just put all the substrings on the stack, then have just have contextual strings
19:41:35 *** Flygon has quit IRC (Read error: Connection reset by peer)
19:57:49 <peter1138> Eh
19:58:34 <andythenorth> is there a string code for discarding a stack value?
19:58:36 <andythenorth> hmm
19:59:15 <andythenorth> `85 Discard next word from stack`
19:59:46 <peter1138> Well.
20:00:04 <peter1138> This might not be workable after all.
20:01:16 <andythenorth> `POP_WORD`
20:03:50 <peter1138> /me tries something.
20:13:02 <peter1138> Ah, phew. Just need a different way to flag excised text effects.
20:18:27 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13159: Codechange: Add EncodedStrings and use for tooltips and texteffects. https://github.com/OpenTTD/OpenTTD/pull/13159
20:28:36 <peter1138> Now back to errors.
20:32:24 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1315415709605560380/image.png?ex=675753d8&is=67560258&hm=36c9b46b1de2ff89decf2ff3eeee5a89c97cb1e0e7d2ef4127831e258131b21a&
20:32:24 <peter1138> They did it ๐Ÿ˜„
20:43:23 <xarick> [2024-12-08 19:57:30] dbg: [misc:0] _num_trees_placed_at_same_height = 12724385
20:43:23 <xarick> [2024-12-08 19:57:30] dbg: [misc:0] _num_trees_failed_at_same_height = 94881366655
20:43:32 <xarick> is that 99% fail rate?
20:46:21 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315419217771761786/image.png?ex=6757571c&is=6756059c&hm=90af9cb1ffed59004fb0a45bcc2a8e234d0ef666b2918859aee3a1035c41f8f4&
20:51:18 <andythenorth> hmm, should I refactor all of Horse name string handling?
20:51:33 <andythenorth> reduces grf size from about 39 MB to about 38 MB
20:51:45 <andythenorth> might cut compile time from 60s to 57s
20:51:52 <andythenorth> will take me a couple of hours
20:53:04 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1315420911268134972/image.png?ex=675758b0&is=67560730&hm=08337e8895b35d0d4956854eaab516fbf5e1dd1993877cac04b254eca968fd5b&
20:53:04 <andythenorth> the (small) (medium) (large) suffixes eh, so useful? ๐Ÿ˜›
20:54:17 <talltyler> I usually just look at the sprite to tell the size ๐Ÿ™‚
20:58:00 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1315422152773865472/image.png?ex=675759d8&is=67560858&hm=2c5d1834aa780b3d3936789058fb12d366a268120d0f29f8a628a02562800eea&
20:58:00 <andythenorth> I find it a bit weird without the visual cue
20:59:16 <andythenorth> it is simpler though
20:59:29 <andythenorth> will there be badges?
21:07:01 <peter1138> Well there?
21:09:20 *** reldred has joined #openttd
21:09:20 <reldred> ๐Ÿฆก
21:11:08 <peter1138> I'll update the PR at some point, and maybe attach a working GRF.
21:11:31 <peter1138> Oof, okay, have to modify strings to make this error message thing work.
21:12:51 <peter1138> I guess it's better but there's all the language files to fix.
21:16:13 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1315426735860351170/image.png?ex=67575e1d&is=67560c9d&hm=8d18c91a6ae62beace7f35e1edc9f08fb56256f9393379d4c11efdc34444ef9a&
21:16:13 <peter1138> \o/
21:18:00 <peter1138> > 54 files changed, 392 insertions(+), 367 deletions(-)
21:18:05 <peter1138> That one change :S
21:18:59 *** gelignite has quit IRC (Quit: Stay safe!)
21:19:15 <belajalilija> https://tenor.com/view/badger-gif-25490247
21:24:09 <andythenorth> should I dump the Horse wagon size strings or not?
21:24:47 <andythenorth> maybe all the sizes should be nested
21:25:26 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1315429055100747866/image.png?ex=67576046&is=67560ec6&hm=7e6d5810d124bb521fc0569d6b03f03ffdcd4afe3f5b9f3afb58ade5a0177996&
21:25:53 <peter1138> What are the sizes for? Are they limited by intro dates and lifetime?
21:26:19 <peter1138> Like ukrs has small wagons to start with.
21:33:38 <peter1138> Hm, how long will it take to get to Oxford...
21:37:49 <andythenorth> peter1138: integer length trains mostly
21:37:53 <peter1138> Hmm, 2hr15 by public transport, or 45m by private car, damnit.
21:37:58 <andythenorth> also probably realism
21:38:17 <andythenorth> that's mad, you are literally next to Oxford ๐Ÿ˜›
21:38:18 <_glx_> peter1138: classic
21:38:46 <andythenorth> is it naptime yet?
21:39:02 <_glx_> and transport is with a change I guess
21:39:16 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:39:18 <_glx_> and a huge detour
21:39:47 <peter1138> Or 2,700,000,000us in xarick measurements.
21:43:14 <peter1138> 2 trains and a bus, or 2 buses.
21:43:41 <peter1138> Oh and some walking.
21:48:40 <xarick> ๐Ÿ™‚ i'm trying to find a reasonable cap value for j
21:49:36 <xarick> trying a cap of 545 for now
21:50:26 <xarick> 545 * 1000 = 545000, eh...
21:51:04 <xarick> 1000 tries per tree
21:55:35 <xarick> those random values for x and y result in 32*32 = 1024 combinations, only 545 will bypass the abs(x) + abs(y) > 16 check
22:01:06 <xarick> j = 100 and it's still generating 12,6 million trees
22:02:00 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
22:02:51 <xarick> j = 50 -> 12,1 million trees
22:04:30 <xarick> j = 25 -> 10,4 million trees...
22:05:56 <xarick> j = 1 -> 0,8 million trees
22:06:05 <xarick> heh i was just curious
22:08:10 <xarick> 1024 perhaps ?
22:09:32 <xarick> I'm not good at probability statistics
22:09:55 <xarick> what shall be the ideal max value of j
22:14:58 *** wensimehrp has joined #openttd
22:14:58 <wensimehrp> peter1138: Gehehe
22:29:11 <xarick> j = 1024 -> 12,7 million trees
22:30:00 <xarick> 840 seconds
22:33:07 <xarick> from master results, the value to match is _num_trees_placed_at_same_height = 12707273
22:38:03 <xarick> i need to test flat terrains too
22:43:39 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:44:04 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:03:23 *** tokai has joined #openttd
23:03:23 *** ChanServ sets mode: +v tokai
23:04:36 *** ufo-piloot has quit IRC (Remote host closed the connection)
23:04:54 *** ufo-piloot has joined #openttd
23:10:16 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
23:13:25 <xarick> anyone knows a formula for diminishing returns?
23:14:27 <xarick> 1 to 1 ratio up until j reaches let's say... 10
23:14:40 <dwfreed> https://en.wikipedia.org/wiki/Logarithmic_growth
23:15:04 <xarick> if j is over 100, like 125, treat it as 120 or so
23:15:40 <xarick> i see, thanks, i'll take a look at it tomorrow
23:15:44 <xarick> cyas good night