IRC logs for #openttd on OFTC at 2024-10-14
            
02:08:14 *** D-HUND has joined #openttd
02:08:36 *** godbed has joined #openttd
02:11:39 *** godbed_ has quit IRC (Ping timeout: 480 seconds)
02:11:54 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:54:44 *** gnu_jj_ has joined #openttd
02:57:41 *** Flygon has joined #openttd
02:57:54 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:47:13 <DorpsGek> [OpenTTD/wiki-data] iangiorgetta opened pull request #38: Fix: remove duplicate main menu image https://github.com/OpenTTD/wiki-data/pull/38
03:50:21 <ian01223> you know, the commit message key words don't apply very well to wiki based pull requests
03:51:17 <ian01223> I thought about it for about 30 seconds and then gave up and decided it was truebrain's problem when he returned
04:46:55 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/c2d58bb88fd19002f82a7c9d5ea01d91e59cdbb3
04:46:56 <DorpsGek> - Update: Translations from eints (by translators)
05:55:40 <DorpsGek> [OpenTTD/OpenTTD] Da-W1nn3r commented on issue #12973: [Bug]: Score excluded from highscore when using sandbox https://github.com/OpenTTD/OpenTTD/issues/12973
07:17:14 <DorpsGek> [OpenTTD/survey-web] survey-summary[bot] pushed 1 commits to main https://github.com/OpenTTD/survey-web/commit/0d390fc24388412b3d2d488ebe1e4cbc9ed4ac28
07:17:15 <DorpsGek> - Add: summary for week 41 of 2024 (by OpenTTD Survey)
07:35:13 <DorpsGek> [OpenTTD/OpenTTD] aquagnawt commented on pull request #12989: Fix OpenTTD#12968, d20df82: Added back ability to create unremovable houses https://github.com/OpenTTD/OpenTTD/pull/12989#pullrequestreview-2365628676
07:37:01 <DorpsGek> [OpenTTD/OpenTTD] aquagnawt commented on pull request #12989: Fix OpenTTD#12968, d20df82: Added back ability to create unremovable houses https://github.com/OpenTTD/OpenTTD/pull/12989#issuecomment-2410293015
07:47:31 *** Heiki has quit IRC (Quit: Bridge terminating on SIGTERM)
07:47:31 *** soylent_cow[m] has quit IRC (Quit: Bridge terminating on SIGTERM)
07:51:10 <kuhnovic> With the risk of pitchforks: why do we require references to member functions using `this->` ? Don't get me wrong, I think it's a good thing to somehow show that we're dealing with a member variable. It generally makes code easier to understand. Using `this->` however seems like it can easily be forgotten (I do it all the time), and the code will still compile and run just as well without it. A
07:51:10 <kuhnovic> naming conventient such as `m_my_member_var` is a lot easier to maintain since you only need to get the name right, instead of having to check each case where it is referenced.
07:58:52 <DorpsGek> [OpenTTD/OpenTTD] aquagnawt updated pull request #12989: Fix OpenTTD#12968, d20df82: Added back ability to create unremovable houses https://github.com/OpenTTD/OpenTTD/pull/12989
08:11:51 <LordAro> kuhnovic: m_ is ugly
08:12:17 <LordAro> but yeah, this-> does get forgotten, it'd be nice if there was something that made it not implicit
08:12:34 <peter1138> Rewrite in python?
08:12:41 * kuhnovic really working hard to hold back a yo mama joke
08:13:12 <kuhnovic> I agree, m_ is ugly, but this-> ain't no prize winner either
08:49:07 *** soylent_cow[m] has joined #openttd
09:28:05 <peter1138> If we removed all `this->` would it make the code clearer?
09:28:57 <ahyangyi> peter1138: and instead of `this->foo`, get lots of `self.foo`
09:30:27 <peter1138> ahyangyi: The point of my silly quip is that Python _requires_ you to use `self.`, which matches what we want with `this->` but isn't possible to enforce.
09:32:58 <ahyangyi> I somehow both got and missed your point 😛
09:35:15 <xarick> I like this->
09:35:37 <xarick> didn't know m_ was the substitute for this->
09:37:33 <peter1138> `m_` was KUDr's naming convention for a member variable. We don't use it anywhere else.
09:38:53 <peter1138> Except `OverflowSafeInt` because exceptions...
09:39:41 <peter1138> It's not the worst convention to be fair.
09:49:41 <truebrain> kuhnovic: I never mind projects using either this-> or m_. At least doing both is annoying and silly.
09:49:41 <truebrain> It is just too bad you can't a compiler (as far as I know) to error when this-> isn't used; but neither that m_ is (although easier validated as human).
09:49:41 <truebrain> I think both solutions are ugly btw; just the best we have 😄
09:51:32 <peter1138> Well, for functions we never use m_ 🙂
09:51:59 <truebrain> peter1138: Haha, true.
09:51:59 <peter1138> `this->` is missed quite often for member functions too.
09:52:12 <kuhnovic> m_ is also used in YAPF and some related classes like NodeList and HashMap. And probably in some other places. I'm not trying to justify it's use, just merely mentioning it 🙂
09:52:14 <truebrain> We need a SAST to validate for this
09:52:29 <peter1138> Those related classes were of course added by KUDr as part of YAPF.
09:52:43 <peter1138> -wuse-this
09:52:52 <truebrain> kuhnovic: In OpenTTD these are widely regarded as "the wrong coding style" 😛
09:53:01 <kuhnovic> Haha and I agree 😛
09:53:05 <peter1138> Not because of `m_` to be fair.
09:53:16 <truebrain> ^^
09:53:21 <peter1138> What's the "C" prefix for?
09:53:27 <kuhnovic> Class, most likely
09:53:31 <peter1138> Why does the template parameter end with _
09:53:35 <peter1138> Oh God.
09:53:37 <kuhnovic> Reasons
09:53:47 <peter1138> Also, camelCase.
09:53:58 <peter1138> `m_pFirst`. Make your mind up 🙂
09:54:02 <kuhnovic> There's also m_pBestIntermediateNode where p means pointer
09:54:26 <kuhnovic> Kinda redundant in a statically typed language if you ask me
09:54:39 <peter1138> Of course, most of the world believes in `int* a` instead of `int *a` so what do we know?
09:55:21 <kuhnovic> We pick `int * a` so we can piss off people in both camps
09:55:42 <peter1138> That just looks like a multiplication.
09:56:54 <kuhnovic> You are so hard to please Peter 😛
09:57:12 <ahyangyi> `#define int 42`
09:57:23 <peter1138> I wouldn't bother.
09:59:26 <peter1138> Hmm, so a factory provider is when you have a factory to create an instance of something (e.g. driver or blitter)
10:00:00 <peter1138> What's the naming for when the "factory" already holds all the instances?
10:01:56 <peter1138> For sound loading I have separate instances to load sounds in raw, wav or opus format, but there is always one instance of the loaders, they are not created on demand every time we try loading a sound.
10:02:09 <peter1138> So there's no `CreateInstance()` method.
10:08:02 <peter1138> Hmm, `Provider`
10:10:37 <kuhnovic> `Manager` 😆
10:11:08 <peter1138> That might imply it does more than hold a list of instances.
10:19:49 <peter1138> Or I change it to be a factory which is slightly wasteful but at least then it's a proper factory-pattern 😄
10:35:53 <kuhnovic> Design patterns for the sake of design patterns!
10:38:05 <peter1138> Although you are right, TimerManager is a similar idea, although that does a bit more than this.
10:39:09 <kuhnovic> Manager is a bit of a vague and ambiguous term, but that does make it an annoyingly good fit in many situations
10:40:18 <kuhnovic> It sound a bit like a factory-of-singletons, where you get a reference to the one and only instance of each factory "product"
10:40:58 <peter1138> Except the instances are created statically.
10:41:29 <kuhnovic> Still feels kinda singleton-y
10:42:01 <kuhnovic> There's probably somebody who came up with a name for this pattern. And then some other people started calling it an anti-pattern.
10:42:28 <peter1138> 🙂
10:44:07 <peter1138> Hmm, my design a bit different from Timers. With Timers the manager is completely separate, instead I used inheritance.
10:44:17 <peter1138> So many ways to do the same thing...
10:45:26 <peter1138> And `_screenshot_formats` is the completely manual way of doing it...
10:46:06 <peter1138> `_saveload_formats` too.
10:56:59 *** D-HUND has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
11:03:51 <DorpsGek> [OpenTTD/team] Hatya-mouse opened issue #594: [ja_JP] Translator access request https://github.com/OpenTTD/team/issues/594
11:05:43 <kuhnovic> A lot of that code probably stems from the C-era. You're probably taking a more (modern) C++ approach.
11:08:14 <xarick> I'm testing dumb stuff
11:08:18 <xarick> 64x64 regions
11:08:31 *** godbed is now known as debdog
11:08:32 <kuhnovic> Dumb indeed
11:08:46 <xarick> traversability bits can't be bigger than this 😦
11:09:43 <kuhnovic> Think about it. The bigger you make the regions, the more you go back to the old situation where there was only the LL PF. You've already achieved that for 64x64 maps.
11:09:43 *** throwawayaccount[m] has joined #openttd
11:09:47 <peter1138> Well, there's std::bitset...
11:10:15 <peter1138> std::bitset<4096> 😄
11:11:09 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295343132711321610/image.png?ex=670e4dcd&is=670cfc4d&hm=58941a72996ee97a4be66b8009d67ff8f260b07c54d4453e353048364429de7e&
11:11:09 <xarick> it's no longer effective
11:11:21 <peter1138> Funnily enough.
11:12:13 <xarick> that's using exitdir
11:14:28 <xarick> printdebug info is asserting 😦
11:15:00 <xarick> TileAddXY requires a valid tileindex
11:17:54 <peter1138> Funny that.
11:18:59 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295345103321300992/image.png?ex=670e4fa2&is=670cfe22&hm=9265d697e895edcdd6d122df91796cc9b306a6bde5132d3ca9ed442885ff9c16&
11:22:30 <xarick> CurrentWaterRegionEdgeLength() is 64
11:26:07 <xarick> Map::SizeX() is 64
11:27:31 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295347251920764998/image.png?ex=670e51a3&is=670d0023&hm=6ec6c6d6a57c1366263b841adac6799d1689a15b56d536630314015269e7660b&
11:27:31 <xarick> weird calculations... why make it so complicated?
11:32:35 <xarick> so we have tile 0 and offset 32
11:33:05 <xarick> dx = 32 & 63 = 32
11:34:26 <xarick> if 32 >= 64/2 -> dx = 32-64 = dx = -32
11:35:29 <kuhnovic> You did notice the `#ifdef _DEBUG` right? This complicated stuff is only there to save your butt in debug 😛
11:36:07 <kuhnovic> It's quite easy to mess up tile indices and run off the map, and consequently out of array bounds.
11:46:57 <DorpsGek> [OpenTTD/team] glx22 commented on issue #593: [pl_PL] Translator access request https://github.com/OpenTTD/team/issues/593
11:47:48 <DorpsGek> [OpenTTD/team] glx22 commented on issue #594: [ja_JP] Translator access request https://github.com/OpenTTD/team/issues/594
12:09:50 <xarick> dy = (32 - -32) / 64 = 1
12:11:01 <xarick> `uint32_t x = TileX(tile) + dx;`
12:11:01 <xarick> x = 0 + -32, converted to uint makes it what?
12:11:46 <xarick> 4294967264
12:12:12 <xarick> y = 0 + 1 = 1
12:12:29 <xarick> assert(4294967264 < 64) ... fails
12:14:11 <xarick> something here is incorrect... `if (dx >= (int)Map::SizeX() / 2) dx -= Map::SizeX();`
12:16:42 <xarick> or maybe the first line... `int dx = offset & Map::MaxX();`
12:24:11 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12989: Fix #12968, d20df82: Added back ability to create unremovable houses https://github.com/OpenTTD/OpenTTD/pull/12989#issuecomment-2411081691
12:30:31 <DorpsGek> [OpenTTD/wiki-data] iangiorgetta opened pull request #39: Fix #33: Rename Cheats to Sandbox options https://github.com/OpenTTD/wiki-data/pull/39
12:35:25 <peter1138> I know the backend storage is git, but...
12:36:06 <ian01223> you try doing that by hand :p
12:36:24 <ian01223> and breaking the page for an hour while you're in the middle of it
12:37:43 <xarick> this code hasnt been touched in 20 years
12:37:54 <xarick> why does it fail now?
12:38:05 <xarick> or what am I misunderstanding?
12:39:14 <_glx_> if TileAdd() asserts check the callers because the function is fine
12:39:33 <ian01223> but true said it was alright for something like this, so it's a bit of an experiment
12:39:41 <xarick> the caller passed tile = 0, offset = 32
12:39:43 <ian01223> with the proper amount of caution
12:40:02 <_glx_> isn't tile 0 outside of the map ?
12:40:04 <xarick> map size is 64x64
12:40:33 <xarick> it's inside in this situation
12:42:04 <xarick> tilexy(32, 0)
12:42:15 <xarick> essentially what it should return
12:42:51 <xarick> it's trying to return tileXY(4294967264, 1)
12:48:58 <truebrain> peter1138: Open for better ideas. But in the balance of making someone click hunders of times vs a PR once in a while, I thought this would be the best approach. At least someone who cares enough about the wiki to fix these things 😄
12:49:15 <truebrain> Or I could improve the wiki software..... 😛
12:49:33 <peter1138> I wasn't saying no. Just that I know our usual reaction to directly changing in git is to "nope" it.
12:49:52 <peter1138> I was actually saying no it would be in the PR, closing it :p
12:51:11 <truebrain> Ghehe. Well, for once someone asked how to approach it before making a PR 😄 \o/
12:51:24 <peter1138> Urgh.
12:51:49 <peter1138> "Can we have 2 different interfaces, one for desktop, one for tablets?"
12:51:49 <ian01223> people who ask kindly are always the worst
12:52:07 <ian01223> because you might have to actually listen to them
12:52:24 <ian01223> :p
12:53:27 <xarick> if I'm not supposed to use TileAddXY, what is the alternative?
12:53:41 <ian01223> honestly though this isn't so bad, so long as you know what you're doing
12:54:05 <peter1138> My urgh and comment is not about the wiki 🙂
12:54:12 <peter1138> $workstuff
12:54:29 <ian01223> ah right, that makes more sense
12:54:45 <ian01223> it all gets a little mixed together in this channel
12:56:06 <ian01223> what was it that andy was saying the other day? that this channel is just two people monologuing
13:02:35 <peter1138> "This page looks bad"
13:03:08 <peter1138> Uh uh... that's what the designer came up with and it fits in seamlessly with the rest of the styling....
13:11:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12994: Fix #12993: Replace known-bugs text with markdown version. https://github.com/OpenTTD/OpenTTD/pull/12994
13:11:58 <peter1138> Maybe CI works now...
13:20:23 <peter1138> johnfranklin: Not quite that old.
13:21:33 <peter1138> Yeah, clang going a bit further now
13:22:10 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295376103808172103/image.png?ex=670e6c82&is=670d1b02&hm=d657b0c3f535418139e933126cf6c45ed18e2066caf68be57ffc25efcb7a8888&
13:22:10 <xarick> it works in release
13:22:15 <xarick> doesn't work in debug
13:24:58 <xarick> RelWithDebInfo
13:34:09 <kuhnovic> Soon we''ll be able to play ASCII-OpenTTD
13:34:25 *** merni has joined #openttd
13:34:25 <merni> openttd in the terminal is a great idea
13:34:38 <merni> (probably not)
13:34:53 <xarick> the TileAdd Debug function is bugged
13:34:59 <xarick> the release version is fine
13:35:58 <xarick> `constexpr TileIndex TileAdd(TileIndex tile, TileIndexDiff offset) { return tile + offset; }` straight to the point
13:37:21 <peter1138> Yes, if you don't do bounds checking it doesn't fail when you exceed the bounds.
13:38:50 <xarick> gonna try something stupid
13:38:58 <kuhnovic> Looks like you are already doing that
13:38:59 <peter1138> You already are.
13:41:22 <xarick> tile can't be 0?
13:41:48 <xarick> but tile 0 is in the map
13:42:38 <xarick> I don't understand what it's doing
13:42:47 <_glx_> peter1138: well, I fixed it I think
13:43:04 <peter1138> Looks like it.
13:43:43 <peter1138> Now I'm just waiting for someone to introduce something that needs higher than clang-15... and I'll be stuck :S
13:44:09 <_glx_> CI now uses clang-18
13:44:21 <peter1138> Trixie is not yet released...
13:44:47 <_glx_> it's the default clang in image
13:44:54 <peter1138> On Debian, clang-16 + libstdc++-12 don't get along with OpenTTD.
14:09:30 <peter1138> Newer clang/libstdc++ would allow views to work.
14:11:53 <peter1138> Maybe i should just use Trixie any way...
14:12:23 <DorpsGek> [OpenTTD/nml] glx22 opened pull request #342: Codechange: Vendor in latest ply version https://github.com/OpenTTD/nml/pull/342
14:12:30 <peter1138> Not in freeze yet though.
14:12:55 <peter1138> Commit checker ehj
14:14:52 <DorpsGek> [OpenTTD/nml] glx22 updated pull request #342: Codechange: Vendor in latest ply version https://github.com/OpenTTD/nml/pull/342
14:16:25 <_glx_> nice, the worflow is "broken"
14:17:30 <LordAro> as is tradition
14:17:59 <DorpsGek> [OpenTTD/nml] github-advanced-security[bot] commented on pull request #342: Codechange: Vendor in latest ply version https://github.com/OpenTTD/nml/pull/342#pullrequestreview-2366793889
14:18:30 <LordAro> look at all those things flake8 would've complained about though :p
14:19:36 <_glx_> no it's in flake8 ignore list 😉
14:19:52 <peter1138> Only a few.
14:19:52 <LordAro> ha
14:31:53 *** nielsm has joined #openttd
14:31:59 <truebrain> _glx_: Yeah, I see it on other workflows too. Will check how the action is broken later today (if you haven't already)
14:38:51 <LordAro> just switch to ruff ;)
14:39:19 <DorpsGek> [OpenTTD/nml] glx22 updated pull request #342: Codechange: Vendor in latest ply version https://github.com/OpenTTD/nml/pull/342
14:41:16 <DorpsGek> [OpenTTD/nml] glx22 updated pull request #342: Codechange: Vendor in latest ply version https://github.com/OpenTTD/nml/pull/342
14:42:16 <_glx_> ok black is fixed
14:43:30 <DorpsGek> [OpenTTD/nml] LordAro commented on pull request #342: Codechange: Vendor in latest ply version https://github.com/OpenTTD/nml/pull/342#issuecomment-2411468765
14:49:52 <peter1138> Ew, my changes broke a unit test.
14:49:57 <peter1138> Whoever decided to add unit tests... :S
14:50:24 <peter1138> And whoever decided to make the CI run unit tests?
14:56:21 <xarick> `if (dx >= (int)Map::SizeX() / 2) dx -= Map::SizeX();` There's a bug here, I can feel it it's here, but I still don't quite follow what it attempting to do
15:14:37 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295404402873466980/image.png?ex=670e86dd&is=670d355d&hm=f32110d9fdc54de00b2ae648ad1ec34704a6e3c17eead95790187d81f5f7cd91&
15:14:37 <xarick> theoretically position of a (-32, 1) tile
15:15:01 <xarick> it's wrong
15:15:15 <xarick> unless it wraps to the other side
15:15:24 <xarick> and wound end exactly at 32, 0
15:15:44 <xarick> given a 64x64 map
15:16:05 <_glx_> (-32, 1) is equivalent to (32, 0)
15:16:47 <_glx_> it's `1 * 64 - 32` vs `0 * 64 + 32`
15:18:22 <xarick> tought puzzle to solve
15:19:19 *** Wormnest has joined #openttd
15:22:17 <xarick> dx >= (int)Map::SizeX() / 2 something here is off by 1
15:23:31 <xarick> but it can't be
15:32:01 <_glx_> I think the idea is to get -32>=dx>=31
15:45:52 <peter1138> What are your parameters to TileAdd() when it "fails"?
15:53:56 <xarick> tile = 0
15:53:59 <xarick> offset = 32
15:54:36 <xarick> map size 64x64
16:04:22 <xarick> oh, all values from 32 to 63 seem to also assert
16:07:42 <michi_cc[d]> peter1138: Some people might call that a `Service`, I guess.
16:08:21 <peter1138> Ooh that sounds like dependency injection.
16:08:21 <michi_cc[d]> SoundLoadingService
16:09:00 <michi_cc[d]> Oh, sorry, ISoundLoadingService of course. Always need an interface, too 😛
16:11:58 <peter1138> Although my design is a bit wrong. `Factory<T>` (or maybe `Service<T>`, heh) has a `std::vector<T *>`, but because it adds `this` it needs to be cast from `Service<T> *` to `T *`. Clearly a smell.
16:28:25 *** HerzogDeXtEr has joined #openttd
16:28:31 <andythenorth[d]> maybe you need a FactoryFactory
16:30:34 <Rubidium> _glx_: it used to be int x = GET_TILE_X(tile) + (signed char)(add & 0xFF); but that was (likely) back when maps were forced 256x256
17:17:19 *** gelignite has joined #openttd
17:29:46 <xarick> I'm doing some brute force tests
17:31:21 <xarick> gonna count how often it is wrong
17:32:02 <truebrain> _glx_: flake8 issue is resolved; retriggering any flow that broke on it will make it work again
17:41:21 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295441331685949492/image.png?ex=670ea941&is=670d57c1&hm=8416957e04053da1eb7bf659be0f10eb9f3438ff54982f6d7538f1a94b21e483&
17:41:21 <xarick> TileAdd (debug) using params x and y. The alternative TileAdd (release), using xx and yy. x/y_less_than_map size_x_y is the counting of the number of times it failed this assert in either method.
17:41:28 <xarick> counter is the number of tests
17:41:47 <DorpsGek> [OpenTTD/wiki-data] iangiorgetta updated pull request #39: Fix #33: Rename Cheats to Sandbox options https://github.com/OpenTTD/wiki-data/pull/39
17:42:16 <xarick> x_equals_xx is the number of times it didn't match
17:43:20 <xarick> it's wrong 25% of the time
17:45:42 <xarick> map size in this test is 256x256
17:49:20 <xarick> https://gist.github.com/SamuXarick/7aff7d3244433f71978667549eafca5b brute force test
18:01:00 <peter1138> `n.m_parent->m_cost` That `m_` prefix 'really helping' here 🙂
18:01:47 <peter1138> Well, /s in case it wasn't obvious.
18:02:37 <peter1138> I'm going to smash all this up hehe
18:03:08 <peter1138> It will then look like I'm the YAPF expert because I touched loads of linces.
18:06:00 <peter1138> `return (obj.*func)(cur, cur_td);`
18:06:08 <peter1138> I mean, what is that? Looks like a regex...
18:19:39 *** Alkel_U3 has quit IRC (Ping timeout: 480 seconds)
18:26:53 <ahyangyi> `.*`
18:26:56 <ahyangyi> very regex
18:27:55 *** Alkel_U3 has joined #openttd
18:32:01 *** Wolf01 has joined #openttd
18:34:03 <wensimehrp> Ducujskwpqqpsjndncie892572uwbdjodiwowodeo2jenddoownwor82p10w9si
18:34:50 <johnfranklin> ?
18:35:02 <Wolf01> Yes
18:36:01 <andythenorth[d]> pasted a password eh
18:36:05 <andythenorth[d]> rotation time
18:36:18 <johnfranklin> https://cdn.discordapp.com/attachments/1008473233844097104/1295455156774764554/image.png?ex=670eb621&is=670d64a1&hm=60f9ea253e25c6bd7cf53540e467b865f0ca72115e68def190fb7cd59f772a56&
18:36:53 <wensimehrp> All your word are match by `.*`
18:53:34 <ahyangyi> https://cdn.discordapp.com/attachments/1008473233844097104/1295459505186017362/latest.png?ex=670eba2e&is=670d68ae&hm=d9dc81a39b9221f3924a13d20a5e865760777a16c712cfbc09ba3273620d16fb&
19:03:51 *** Flygon has quit IRC (Read error: Connection reset by peer)
19:06:52 <xarick> i fail
19:08:49 <xarick> I dont know how to math anyore
19:24:57 <xarick> nevermind, I fail at param naming
19:33:55 <NGC3982> that time thing in v14 seems fantastic
19:34:02 <NGC3982> make me wanna start dedicated servers again
19:37:04 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #12984: Cleanup: remove some unused #defines https://github.com/OpenTTD/OpenTTD/pull/12984
19:38:25 <xarick> bad test !
19:38:39 <xarick> I'm taking another
19:39:00 <xarick> I was confusing tile index differences with tile index
19:40:04 <NGC3982> omg i can stop time
19:40:07 <NGC3982> heureka!
19:42:25 <johnfranklin> and you dashed out from bathtub naked?
19:42:26 <truebrain> about 6 months late to the party, but happy you like it 🙂
19:46:07 <truebrain> so who has the phonenumber of V? I want to buy Factorio Space Age two times, as I want to play it with my buddy too! So annoying to see YouTubers play it already, and I need to wait another week 😢 😢
19:46:09 <truebrain> 😛
19:49:35 <NGC3982> haha
19:49:48 <NGC3982> i have always wanted no-time dedicated servers
19:50:48 <NGC3982> the opposite made me abandon hosting back in the day
19:58:49 <johnfranklin> I haven't bought factorio nor have any interest on that; it is said to be openttdcoop-style which I am bad at
19:59:50 <truebrain> You do you; but it is awesome, and I can't wait till next week 🙂
20:01:19 <LordAro> truebrain: oh my is it next week
20:02:02 <NGC3982> factorio is so relaxing
20:03:07 <LordAro> i haven't played factorio in years but i'm looking forward to digging into space age
20:03:38 <truebrain> now it is a week of avoiding YouTube, to not see allllll those other people who are playing 😛
20:03:56 <johnfranklin> Some people can play earlier than others?
20:04:13 <truebrain> At least one YouTuber can
20:07:53 <johnfranklin> I often find big games "giving me a sense of hollowness and anxiety", but openttd doesn't
20:08:39 <truebrain> Today I applied for an OSS license for JetBrains. It got automatically declined by their system as OpenTTD doesn't have enough commits in the last 6 months, so it claims. In short: OpenTTD isn't big. At least, so JetBrains seems to tell me 😛
20:09:18 <truebrain> (to be clear, I assume it is some error in me filling in the form, rather than anything else 😛 )
20:10:06 <johnfranklin> Yes, SimRail is good and in-depth, Euro Truck Simulator 2 is beautiful, but I will get tired on them much sooner than openttd
20:18:32 *** gelignite has quit IRC (Quit: Stay safe!)
20:35:02 <xarick> alright glx, I think I'm getting somewhere
20:36:16 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/map.cpp#L73-L74>
20:36:16 <xarick> this seems to be the problem, the uint32_t
20:36:40 <xarick> with uint8_t and a map of 256x256, the calculations become correct
20:37:19 <xarick> it was depending on overflowing
20:38:58 *** keikoz has quit IRC ()
20:44:54 *** keikoz has joined #openttd
21:01:28 *** keikoz has quit IRC ()
21:03:07 <xarick> nevermind
21:03:12 <xarick> I fail again
21:03:16 <xarick> i think
21:03:27 <xarick> let's see what's the result at the end of this new brute force test
21:06:56 <xarick> there's sign vs unsign, there's overflow/underflow, there's tilemask, there's tilewrap, tileindex and tilediff... too many variables for a mistake to happen
21:10:49 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295494044969074818/image.png?ex=670eda59&is=670d88d9&hm=17d638d76d3a6be65e57b7fe7db284433edcca7c6fa0b51a941cc140066bfbe5&
21:10:49 <xarick> number of tests I'm doing
21:11:18 <xarick> gonna take a while
21:13:54 *** squirejames has joined #openttd
21:13:54 <squirejames> johnfranklin: OpenTTD feels snuggly
21:18:34 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295495993189728337/image.png?ex=670edc29&is=670d8aa9&hm=0c490d003efb30ab9b9f31e7fe7f1e87eac68174ff51f6c8b33609901b3a1ca7&
21:18:34 <xarick> I still get a 25% fail
21:19:38 <xarick> but no fail on release build
21:19:44 <xarick> only the debug
21:21:42 <xarick> gonna test uint8_t
21:21:44 <_glx_> yes in release this code is not used
21:22:48 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:23:30 <xarick> i'm testing it too, it's the xx/yy , it's a simple { return tile + offset; }
21:24:32 <xarick> waiting about 10 minutes for results
21:25:40 <xarick> the offset is TileDiffXY(x, y)
21:26:07 <xarick> TileDiffXY(x, y) is (y * Map::SizeX()) + x
21:28:43 <xarick> i now expect all those variables in the screenshot to return 0, except the counter
21:31:53 *** keikoz has joined #openttd
21:37:09 <xarick> well... almost
21:37:11 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1295500681523888209/image.png?ex=670ee087&is=670d8f07&hm=498c7120035b073603691d36af4820030c3afff727f42b8a506577b236192ff7&
21:37:30 <xarick> a mismatch with the y's
21:38:07 <xarick> I wonder why
21:40:08 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:44:22 <xarick> so uint8_t only solved it for x...
21:48:46 <xarick> This is the test, do you see any flaw? <https://gist.github.com/SamuXarick/7aff7d3244433f71978667549eafca5b>
21:51:22 *** tokai has joined #openttd
21:51:22 *** ChanServ sets mode: +v tokai
21:55:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12988: Codechange: Use std::unique_ptr for link graph schedule handlers. https://github.com/OpenTTD/OpenTTD/pull/12988
21:58:04 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:04:55 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:33:57 *** nielsm has quit IRC (Remote host closed the connection)
23:48:49 *** moll has quit IRC (Ping timeout: 480 seconds)