IRC logs for #openttd on OFTC at 2024-06-12
            
00:48:29 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12781: Add: Compiler check for _fios_colours/DetailFileType https://github.com/OpenTTD/OpenTTD/pull/12781#pullrequestreview-2111691320
00:49:21 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12781: Add: Compiler check for _fios_colours/DetailFileType https://github.com/OpenTTD/OpenTTD/pull/12781#issuecomment-2161858087
00:58:48 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12780: Doc: Address veritcal comment alignment style. https://github.com/OpenTTD/OpenTTD/pull/12780#pullrequestreview-2111695588
01:01:16 <talltyler> silent_tempest: It’s possible, but we usually wait for someone to come along to take a look on their own
01:01:55 <talltyler> Thanks for your recent contributions, it’s nice to have some fresh ideas around here πŸ™‚
02:01:57 *** Wormnest has quit IRC (Quit: Leaving)
02:03:13 *** herms6 has quit IRC (Quit: bye)
02:04:10 *** herms6 has joined #openttd
02:15:05 *** D-HUND has joined #openttd
02:18:39 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:02:59 *** gnu_jj has joined #openttd
03:06:06 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:23:04 <ahym> I asked Google for the c++ equivalent of a blitter and google's AI threw the most insane description at me
03:26:13 <ahym> https://cdn.discordapp.com/attachments/1008473233844097104/1250290032707768370/IMG_2357.png?ex=666a66d5&is=66691555&hm=8878db7953049cc8f042fcfa0518fad4389bdc8a545cd24701b66d0d862037c9&
03:26:13 <ahym> I can't even validate if this is correct
03:27:17 <ahym> I was almost certain modern cpus did not handle data this way anymore because of parallel processing, does x64 still have a blitter subcircuit
03:33:46 <ahym> No, It does not. However the OTTD blitter is incredibly optimized holy cow
03:50:05 <yeah_its_gloria> mfw unterminated C string
03:50:22 <yeah_its_gloria> why is it using the source size
04:01:21 *** salut3585 has quit IRC (Quit: User went offline on Discord a while ago)
04:05:03 *** keikoz has joined #openttd
04:42:07 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/81b5a7c7c6a7db9a90dbcc762023f6d5accbba19
04:42:08 <DorpsGek> - Update: Translations from eints (by translators)
05:26:04 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:47:04 *** jinks has quit IRC (Quit: ZNC - http://znc.in)
05:47:25 *** jinks has joined #openttd
06:17:41 <truebrain> silent_tempest: Pff, why did I write things in the PR template for it to be ignored! πŸ˜› (referring to: `Please use Feature / Add / Change / Fix for player-facing changes. E.g.: "Feature: My cool new feature".`). If you have suggestions how we can make this stand out more to people so it is easier to understand what is an Add and what is a Codechange, please do let us know πŸ™‚
06:22:33 <truebrain> ahym: Old systems like the NES do πŸ˜› and the name got in to OpenTTD somehow and stuck πŸ™‚ a software blitter πŸ˜„
06:29:20 <DorpsGek> [OpenTTD/OpenTTD] michalc updated pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761
07:00:05 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
07:12:33 <silent_tempest> truebrain: Bleh. I know I read the template months ago. And now I'm operating on my vague memory of it.
07:13:13 <silent_tempest> Whether or not i should i look at the commit hooks for valid commit prefix tags
07:18:21 <silent_tempest> And okay. All of the valid commit prefixes are there but they're not documented or explained
07:19:00 <silent_tempest> Honest question are there too many valid prefixes?
07:20:38 <silent_tempest> Like does there need to be a "Fix" and a "Codefix"?
07:20:50 <silent_tempest> Update and Upgrade?
07:21:31 <silent_tempest> There's too many
07:26:52 <ahyangyi> Downgrade
07:26:56 <ahyangyi> Sidegrade
07:27:32 <silent_tempest> In regards to the PR template specifically. It's hard to read on my screen TBH. I think I'll have to explain that with a screenshot later when i actually have solid Internet access for laptop instead of spotty phone access
07:43:26 <DorpsGek> [OpenTTD/OpenTTD] nielsmh commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#issuecomment-2162328218
08:07:09 <peter1139> Windows' GDI has the BitBlt function (we don't use)
08:08:06 <truebrain> silent_tempest: Explained in the PR template πŸ™‚ and it is okay, it just made me giggle a bit πŸ˜› just let us know if you know a way to improve stuff πŸ˜„
08:08:59 <peter1139> Looks like Microsoft largely ignore the term 'blit' in their documentation for all the *Blt functions though.
08:09:02 <DorpsGek> [OpenTTD/OpenTTD] nielsmh commented on pull request #12767: An RFC / POC for adding more companies https://github.com/OpenTTD/OpenTTD/pull/12767#issuecomment-2162376512
08:31:33 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #12767: An RFC / POC for adding more companies https://github.com/OpenTTD/OpenTTD/pull/12767#issuecomment-2162420119
08:36:07 <peter1139> Oh.
08:41:27 <peter1139> I guess I still need to pass begin/end to some of those functions.
08:49:55 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #12767: An RFC / POC for adding more companies https://github.com/OpenTTD/OpenTTD/pull/12767#pullrequestreview-2112374452
08:50:23 <peter1139> fa82dd6096e6797ebd83024f05cdbd8cf2869255 has a me-style commit message.
08:52:11 <truebrain> those we "hate" when creating the changelog, you mean? πŸ˜›
08:52:39 <peter1139> Fix #12030: Water infrastructure totals when using DC_FORCE_CLEAR_TILE
08:52:40 <peter1139> To remove objects on water
08:52:56 <peter1139> Is it unfinished?
08:53:16 <peter1139> "To remove objects on water" :D
08:56:13 <peter1139> I guess we will hate that for the changelog, yes.
08:58:17 <peter1139> Weird, my VS Code sessions are in the wrong CWD.
08:58:48 <peter1139> Oh no it's not.
09:02:17 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1250374608855765094/Screencast_from_2024-06-12_10-01-00.webm?ex=666ab599&is=66696419&hm=925366417115e4cfb28bbfe1298fbf25daba05242f1a1e82968974576959b98b&
09:03:06 <truebrain> wtf am I looking at πŸ˜›
09:03:22 <peter1139> Same!
09:03:34 <peter1139> Two VS Codes, different project directories...
09:03:41 <peter1139> Sharing a terminal...
09:03:51 <truebrain> joy!
09:04:31 <LordAro> nice
09:06:37 <silent_tempest> https://cdn.discordapp.com/attachments/1008473233844097104/1250375697730633810/image.png?ex=666ab69d&is=6669651d&hm=458bf60e52707b6dc137c6e0ed803cbd732e98de615f8a0890934a35c26a27a9&
09:06:37 <silent_tempest> truebrain
09:07:02 <silent_tempest> The window is teeny.
09:07:13 <truebrain> still, it starts with just the information you are suppose to read πŸ™‚
09:07:18 <peter1139> 150% font size.
09:07:25 <silent_tempest> Lol. True?
09:08:12 <peter1139> Get a plugin called "Zoom Page WE"
09:08:18 <peter1139> It scales EVERYTHING up, not just text.
09:08:41 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1250376218130513932/image.png?ex=666ab719&is=66696599&hm=def3a671ff54d1f1d9f2c8bf9a27e1b91db2327a9a1fa300ecf5daed28d2a976&
09:09:39 <silent_tempest> Okay there is a much better explanation in the codingstyle doc
09:09:51 <silent_tempest> ```For player-facing changes, we have these keywords:
09:09:51 <silent_tempest> * Feature: Adding a significant new functionality to the game. This can be small in code-size, but is meant for the bigger things from a player perspective.
09:09:51 <silent_tempest> * Add: Similar to Feature, but for small functionalities.
09:09:51 <silent_tempest> * Change: Changing existing behaviour to an extent the player needs to know about it.
09:09:51 <silent_tempest> * Fix: Fixing an issue with the game (as seen by the player).
09:09:53 <silent_tempest> * Remove: Completely removing a functionality.
09:09:53 <silent_tempest> * Revert: Reverting an earlier Feature / Add / Change / Fix / Remove.
09:09:55 <silent_tempest> * Doc: Update to (player-facing) documentation, like in the `docs/` folder etc.
09:09:55 <silent_tempest> * Update: Translator commits.
09:10:25 <LordAro> documentation exists? :o
09:10:42 <silent_tempest> Also Doc is only for player facing changes?
09:10:43 <silent_tempest> Wut?
09:11:08 <silent_tempest> Feel like Update: Translator commits should actually just be "Translations: "
09:11:24 <LordAro> things like AI/GS documentation is "player-facing"
09:12:51 <silent_tempest> I mean updates to the OpenTTD developer docs could easily be Doc changes
09:13:06 <LordAro> they could, but they're not
09:13:28 <silent_tempest> What are they then?
09:13:59 <silent_tempest> Codefix?
09:14:31 <LordAro> probably, yeah
09:14:42 <LordAro> maybe Codechange, if it's not actually fixing anything
09:15:09 <silent_tempest> Markdown isn't really code but okay
09:17:26 <LordAro> if it's in a cpp/h/hpp file, it's probably code
09:17:36 <LordAro> you seem to be under the impression this is up for debate
09:20:05 <silent_tempest> Lol
09:20:36 <silent_tempest> .md isn't cpp/h.
09:21:05 <LordAro> it is possible i'm lacking context for what you're actually doing
09:21:07 <LordAro> you've not said
09:22:44 <silent_tempest> https://github.com/OpenTTD/OpenTTD/pull/12780
09:24:04 <LordAro> ah, right
09:24:09 <LordAro> yeah, that's fine as Doc
09:24:31 <LordAro> TB used it in #12046 :)
09:27:24 <silent_tempest> I'll fix my things tomorrow. Sleep now 😴
09:35:31 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
09:43:32 <peter1138> "Veritcal", though
09:54:45 *** andriy has joined #openttd
09:55:11 <andriy> This is a long shot, but does anybody know how to print a local in a different stack frame in gdb?
09:55:38 <LordAro> `frame <n>` ?
09:56:50 <andriy> Thanks!
10:14:08 <peter1139> Hmm, it's probably my turn for the Haribo.
10:25:59 <andriy> Why does it feel like I am always missing important context in this chat? :)
10:30:40 *** reldred has joined #openttd
10:30:40 <reldred> lurkmore
10:30:59 <reldred> many of the folks here have been here many, many years
10:31:20 <audigex> andriy: That’s the one downside I find of Discord over the forums, less persistence of information
10:32:03 <andriy> Yea, andwen using IRC it's even worse, only 20 lines of backlog
10:32:18 <andriy> and when*
10:32:19 <peter1139> There's no persistence for my random lines of thought.
10:32:53 <peter1139> If your IRC client only keeps 20 lines of backlog that's your client issue.
10:33:11 <andriy> I should get a raspbery pi to sit here and record all the conversations here :)
10:33:34 <peter1139> https://weblogs.openttd.org/openttd/2024/06/11.html
10:33:37 <peter1139> Sure :-)
10:33:55 <andriy> Wow! Nice!
10:34:01 <peter1139> Oops, wrong day.
10:34:19 <andriy> Now just <Ctrl-F> for Haribo, and read every hit for the past 10 years :)
10:34:57 <peter1139> Now now, that goes back 17 years. Include it all.
10:35:51 <andriy> Cmon I would have to go day by day if I don't scrape it
10:36:09 <andriy> Fine, recursive wget it is :)
10:36:14 <andriy> I WILL find it
10:37:00 <peter1139> You might not find anything.
10:37:22 <andriy> I will try
10:42:33 <andriy> This will take some time, it is doint ~5 days / s
10:42:40 <andriy> doing*
10:43:52 <peter1139> I mean, don't actually do it. There genuinely is no relevance to it.
10:44:06 <andriy> yea, but it's funny :)
10:44:23 <peter1139> And scraping someone elses web service is very rude.
10:44:34 <andriy> now I can search the whole log with grep -rn and get the result in seconds
10:44:57 <andriy> it is rude, but I am only doing it once, and it's ~50 MB total, so not that big of an issue for the service
10:49:21 <andriy> Ok, I stopped at 2014, It takes much more space then I estimated, already at 378M, which is not too little for a static site
10:49:32 <andriy> I won't stress their server anymore
10:50:57 <andriy> But just to check that it works, there are 693 mentions of coffe in that data :)
10:51:24 <peter1139> Good point. Time for another.
10:53:03 <peter1139> Although this will be a dastardly cappuccino so won't mention the word.
10:53:04 <andriy> and only 414 mentions of tea
10:54:00 <andriy> 1 mention of cappuccino in the old data
10:54:02 <andriy> weblogs.openttd.org/openttd/2012/07/28.html
10:55:13 <andriy> 197 dogs and 1000+ cats
10:55:42 <andriy> but I think some of them might have been mentioning the command cat, so the data is probably not fully correct
10:56:34 <andriy> 729 mentions of "fuck"
10:56:55 <andriy> I don't like a person I am becomming by scraping that data
10:56:59 <andriy> I will just delete it
10:57:03 <andriy> :)
11:11:34 <andythenorth> lunch?
11:12:39 <LordAro> yes
11:13:11 *** andriy2 has joined #openttd
11:14:49 *** andriy has quit IRC (Ping timeout: 480 seconds)
11:15:46 <LordAro> https://www.lordaro.co.uk/~lordaro/ircstats/openttd.html oh good lord, this is still running
11:17:06 <peter1139> Those are the best stats :D
11:17:17 <andythenorth> who has logorrhoea?
11:17:42 <LordAro> oh wait, no
11:18:00 <LordAro> it's still running, but there haven't been any new logs for it to process in several years
11:18:21 <andythenorth> most of my lines are just "hmm"
11:18:49 <peter1139> Oh, so the "today" is a lie?
11:18:53 <LordAro> yeah
11:18:55 <LordAro> June 2021
11:19:12 <peter1139> Latest Topics, 1.11.2, 41 days ago. Yeah.
11:19:18 <LordAro> andythenorth: hmm.
11:19:21 <dwfreed> lol
11:19:45 * LordAro turns that off
11:20:04 <LordAro> as you might be able to tell from the expired cert, i haven't exactly been looking after this server
11:20:27 <dwfreed> the cert's not expired
11:20:38 <dwfreed> issued on may 25, 2024
11:21:03 <dwfreed> expires on august 23, 2024
11:21:18 <peter1139> LetsEncrypt, allowing abandoned servers to pretend to be secure forever... ;D
11:21:50 <dwfreed> lol, for real
11:22:45 <peter1139> Oops, my bread rolls have extra unwanted culture :(
11:24:00 <andriy2> LetsEncrypt is amazing, and https is always better then http, even if the server is outdated and can be hacked with metasploit in seconds
11:24:13 <LordAro> wait, what
11:24:23 <LordAro> i definitely got an expired cert message from it a moment ago
11:25:36 <dwfreed> LordAro: the non www cert is expired
11:25:45 <dwfreed> ie, lordaro.co.uk
11:25:50 <dwfreed> but that redirects to www
11:25:53 <andriy2> testing request
11:27:16 <LordAro> dwfreed: that'll be it
11:27:21 <dwfreed> v:NotBefore: Dec 4 14:52:25 2021 GMT; NotAfter: Mar 4 14:52:24 2022 GMT
11:27:34 <dwfreed> so only 2 years old
11:29:48 <andriy2> how do I set a breakpoint that stops when a region of memory is changed?
11:29:53 <andriy2> gdb*
11:30:19 <dwfreed> what you're looking for is "conditional breakpoint"
11:30:44 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12779: Codechange: Pass NWidgetParts as span instead of begin/end pointers. https://github.com/OpenTTD/OpenTTD/pull/12779
11:31:06 <andriy2> ty
11:31:50 <LordAro> possibly watchpoint
11:32:17 <andriy2> Yea, I found rwatch, seams what I need
11:32:56 <dwfreed> oh, yeah, watchpoint is probably more accurate
11:33:07 <dwfreed> conditional breakpoint is a different thing
11:37:44 <peter1139> Shall I spend several weeks catching up on webcomics instead of working?
11:38:52 <LordAro> weeks?
11:38:59 <peter1139> At least.
11:41:39 <andriy2> I say go for it :)
11:41:48 <dwfreed> I have so much media I wish to consume, I could probably do that every waking moment until the day I die and not get through the backlog
11:42:00 <dwfreed> let alone the new stuff that comes out between now and then
11:46:14 <peter1139> Phew, no more incompatible span iterators.
11:52:46 <andriy2> peter1139: mb I don't represent your best interest, but I don't see anybody else suggesting that you don't procrastinate over here :). Listen to my evil voice!
11:54:40 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
12:05:25 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #12779: Codechange: Pass NWidgetParts as span instead of begin/end pointers. https://github.com/OpenTTD/OpenTTD/pull/12779#pullrequestreview-2112823464
12:06:36 <peter1139> Uh oh.
12:07:06 <peter1139> "Poorly documented". Harsh.
12:11:48 <truebrain> CodeQL dares to say the things we don't πŸ˜›
12:15:57 *** keikoz has joined #openttd
12:43:04 *** andriy2 has quit IRC (Quit: WeeChat 4.3.1)
13:37:38 <andriydohniak> I am having the weirdest issues in existance! The memory of my widget is being overwritten, and I have no idea why
13:39:22 <andriydohniak> https://github.com/JustLinuxUser/OpenTTD/blob/master/src/graph_gui.cpp
13:40:09 <andriydohniak> if somebody could tell me why does the size of the scrollbar is getting set to random values from random places when I open the company profit graph?
13:41:00 <andriydohniak> wrong link
13:41:02 <andriydohniak> 1 moment
13:41:14 <andriydohniak> https://github.com/JustLinuxUser/OpenTTD/blob/better_ui/src/graph_gui.cpp
13:41:15 <andriydohniak> this
13:44:55 <_jgr_> You seem to be on Linux, so I'd suggest doing a build with AddressSanitizer enabled, this should make it clearer where the problem is
13:45:28 <andriydohniak> Ok, will try
13:46:12 <andriydohniak> does asan check malloc and free?
13:46:20 <andriydohniak> or do I need valgrind for that
13:46:34 <andriydohniak> because for such a big game valgrind is just really slow
13:53:43 <_jgr_> Yes, it checks heap allocations, it should make it obvious if and where you have a use after free
13:58:45 <andriydohniak> I was thinking, I didn't do a make clean in ages, mb there is just some compilation issue, but we will see in ~5 min
14:00:00 *** nielsm has joined #openttd
14:00:04 <andriydohniak> It didn't do crap
14:00:51 <kuhnovic> Then it's consistently broken πŸ˜›
14:01:11 <andriydohniak> the adress sanitizer was also quiet
14:01:21 <andriydohniak> doing valgrind now
14:01:31 <andriydohniak> just to launch a window it takes ~2 min
14:02:10 <peter1139> Your NWidgetPart widget_ui array is not static.
14:02:46 <peter1139> They should be `static constexpr`
14:05:53 <andriydohniak> The code is crap, I am just experimenting, and because of my "clever" debugging it's even worse, but if you notice something I should change, please point it out, because I might just forget about it when cleaning up
14:13:03 <peter1139> I did point it out...
14:14:08 <andriydohniak> I just thought there were 100 things like that, and you saw how many there were and stopped pointing it out
14:14:10 <andriydohniak> :)
14:21:41 <andriydohniak> Here is where the memory of the scrollbar->count is being overwritten:
14:21:52 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250455035490472007/message.txt?ex=666b0080&is=6669af00&hm=cbe22171c2b9b59d3f5f6c7e936d6f1c5c889ac62f73f61b62a15411a15d1811&
14:24:38 <andriydohniak> the watched adress is *0x555559250188
14:25:40 <andriydohniak> because it is getting allocated by libc, I thing it somehow got free'd
14:25:59 <andriydohniak> and I don't know how to check that
14:42:27 <andriydohniak> I think I will try printing the address of that variable to the console, and using valgrind, and check if it pops up anywhere
14:46:25 <andriydohniak> How do I use fmt::println to print a pointer?
14:49:18 <andriydohniak> Where can I look up all the possible types that fmt::println accepts?
14:50:45 <_glx_> <https://fmt.dev/latest/syntax.html>
14:51:55 <andriydohniak> Are we using the latest version?
14:52:18 <_glx_> but usually we just use `{}`
14:52:46 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250462809637126224/image.png?ex=666b07be&is=6669b63e&hm=fde8e596834078d4a60aa32adad71613834dbdde757d454d1625074c711eed2d&
14:53:05 <_glx_> and let fmt autodetect the type
14:53:31 <peter1139> Pointers must be cast to void *.
14:53:41 <andriydohniak> Ok, it works now
14:53:51 <_glx_> else it's `{:p}`
14:54:10 <andriydohniak> Ahh! ok
14:54:21 <andriydohniak> I was trying to use `{:x}`
14:54:29 <andriydohniak> and getting the weirdest templating errors
14:54:32 <_glx_> that's for numbers
14:54:43 <andriydohniak> makes sense tbh
14:56:15 <_jgr_> `CompanySelectorWidget::RebuildList` appears to be being called much too early
14:56:30 *** jinks_ has joined #openttd
14:57:29 <_jgr_> Calling CreateNestedTree on the parent window from a widget also looks wrong
15:00:34 <andriydohniak> _jgr_: it is wrong, but CompanySelectorWidget is constructed before, in the initializer list, so I don't know how to avoid it
15:01:13 <andriydohniak> And I need to initialize the list and the scrollbar somewhere
15:02:29 *** jinks has quit IRC (Ping timeout: 480 seconds)
15:02:29 *** jinks_ is now known as jinks
15:04:32 <_glx_> maybe check NetworkClientListWindow
15:04:43 <_glx_> it uses dynamic widgets
15:07:03 <_jgr_> andriydohniak: You're effectively calling it twice, with one set of widgets being orphaned
15:07:23 <andriydohniak> _jgr_: Where?
15:08:18 <_jgr_> In the CompanySelectorWidget constructor and the BaseGraphWindow constructor
15:09:08 <andriydohniak> The CreateNestedTree?
15:09:19 <andriydohniak> Ahhh! That makes a TONN of sence
15:09:47 <andriydohniak> but how can I construct CompanySelectorWidget after CreateNestedTree?
15:12:32 <andriydohniak> Ok, I have an idea
15:25:53 <andriydohniak> Ok, what's wrong now?
15:25:57 <andriydohniak> I thought I fixed it
15:26:17 <andriydohniak> I made the constructor do nothing, and created an init function
15:26:23 <andriydohniak> and called it after everything
15:33:40 <andriydohniak> If anybody wants to take a look, its on gh again: <https://github.com/JustLinuxUser/OpenTTD/blob/better_ui/src/graph_gui.cpp>
15:36:51 <andriydohniak> Ok, I think that particular issue is fixed
15:38:01 <_jgr_> You seem to have removed both calls to CreateNestedTree?
15:40:12 <andriydohniak> _jgr_: Yes, because the OperatingProfitGraphWindow calls InitWindow, which calles CreateNestedTree
15:40:21 <andriydohniak> I put my init right after that
15:40:31 <andriydohniak> probably not in commited
15:40:55 <andriydohniak> Ok, commited
15:41:51 <_jgr_> Ah OK, you added both of them in the prior commit
15:41:57 <andriydohniak> probably
15:41:59 <andriydohniak> :)
15:42:10 <andriydohniak> Idk what happened, look at the commit message :)
15:52:04 <andriydohniak> When I have a Company *, how can I turn it into a CompanyID
15:53:44 *** HerzogDeXtEr has joined #openttd
15:54:02 <_jgr_> ->index
15:54:18 <andriydohniak> but I think it also shows all the companies that don't exist
15:54:33 <andriydohniak> Ok, Company::IsValidID()
15:55:47 <andriydohniak> _jgr_: I don't think that is correct, there is a company with index 0
15:56:06 <andriydohniak> and that's an invalid CompanyID, because it's an invalid Owner
15:56:23 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250478819807330404/image.png?ex=666b16a7&is=6669c527&hm=3efc39a9b31b0072d5776f26f4ea7354572f3aa391902202d7458f6581977b09&
15:56:26 <andriydohniak> Yea
15:56:38 <_jgr_> 0 is a perfectly valid CompanyID
15:56:38 <andriydohniak> It's not specific to the company
15:58:06 <andriydohniak> Then why does Company::IsValidID fails?
16:00:00 <_jgr_> Have you changed this in your patch?
16:00:20 <andriydohniak> I am not working on my patch
16:00:28 <andriydohniak> it's a normal base
16:00:33 <andriydohniak> rebased on top of master
16:01:39 <andriydohniak> why is this so fricking hard?
16:01:42 <_jgr_> As for the graph UI, OnResize is called from FinishInitNested, which is now before CompanySelectorWidget::init
16:02:23 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250480329081360394/image.png?ex=666b180f&is=6669c68f&hm=c26f67a483286f5edd3cff1397fe5c2589f6c411a0087e95b435f15ca7a7a3a5&
16:04:13 <andriydohniak> Are you looking at the latest commit?
16:04:28 <_jgr_> I've just done a pull
16:04:34 <andriydohniak> ah, ok
16:05:38 <andriydohniak> _jgr_: wow you are actually sacrafising your time and space and git pulling, I thought you would just look at it for a sec in github! Thanks for the help
16:07:52 <_jgr_> It's quicker to run it and look at the crash log than to step through it by eye
16:08:01 <andriydohniak> that is true :)
16:08:24 <andriydohniak> but cloning any openttd repo with full story takes at least 2 min, and 5 min to compile
16:08:51 <_jgr_> I just added your fork as another remote to my existing clone
16:09:08 <andriydohniak> _jgr_: smart!!
16:09:21 <andriydohniak> I FIXED IT!
16:09:37 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250482148821962835/image.png?ex=666b19c1&is=6669c841&hm=a4aa948c235e7fca19e383f5ae939cc895901865e37082c8fcd57f0046174fb5&
16:09:39 <andriydohniak> 🀣
16:09:44 <andriydohniak> look at the assert
16:09:46 <andriydohniak> 🀣
16:09:57 <andriydohniak> I am so sorry
16:12:25 <_jgr_> Not to worry πŸ™‚
16:56:00 *** Wormnest has joined #openttd
16:57:08 *** virtualrandomnumber has joined #openttd
17:34:41 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250503557761728584/image.png?ex=666b2db1&is=6669dc31&hm=b514df739ee65faa61350599bb1160a03c4eba4c6baa187f7a29ba3d19361b6b&
17:34:41 <andriydohniak> Finally this crap works!!!
17:35:13 <andriydohniak> The layout will get changed, this is just for testing
17:35:18 <andriydohniak> filtering also works
17:39:59 <alfagamma7> Interesting
17:41:56 <andriydohniak> alfagamma7: still need to program in a lot of functionality
17:41:59 <andriydohniak> this is just a test
17:47:08 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250506691955527793/image.png?ex=666b309c&is=6669df1c&hm=4a51ed705d093de9ebdcd5085ae6019a02e7206ee4324b3036ac85e2b5e1737c&
17:47:08 <andriydohniak> This is closer
17:48:34 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #12779: Codechange: Pass NWidgetParts as span instead of begin/end pointers. https://github.com/OpenTTD/OpenTTD/pull/12779#pullrequestreview-2113704954
17:50:15 <peter1139> our resize height (height of each WWT_MATRIX row) should be something like `GetCharacterHeight(FS_NORMAL) + padding.height`
17:50:28 <peter1139> *Your
17:51:59 <andriydohniak> what is padding?
17:52:12 <andriydohniak> I know it's a parameter
17:52:21 <andriydohniak> but how is it determined?
17:52:47 <peter1139> It's provided to UpdateWidgetSize based on the widget type.
17:53:24 <peter1139> The value is just a suggestion, but using the suggestion keeps things consistesnt.
17:53:28 <peter1139> And consistent.
17:56:05 *** virtualrandomnumber has quit IRC (Quit: virtualrandomnumber)
17:57:45 <andythenorth> "hmmm"
17:58:08 * andythenorth have found the OpenAI API tools
17:58:10 <peter1139> You have a patch for that?
17:59:13 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250509731127230464/image.png?ex=666b3371&is=6669e1f1&hm=2b0395babf8855b35d465b43fe032f15cd0f71ac330c8e473ddb1a188e3f050c&
17:59:13 <andriydohniak> Almost :)
18:12:48 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
18:13:49 <andriydohniak> I can't figure it out :(
18:21:53 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250515432935391272/image.png?ex=666b38c0&is=6669e740&hm=74287278eb5e2cc724179bfefba45a9e2c0827ccf52e2be39ed65bdfc77a7b8f&
18:21:53 <andriydohniak> Almost...
18:26:50 <andriydohniak> I set the minimal / starting size to be 1 line height, how do I make sure it doesn't have "slack"
18:33:38 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250518394143375511/image.png?ex=666b3b82&is=6669ea02&hm=8b1bc85950e0211a26b2496b2705bbda466391dd42ff7f026865a82e257176a0&
18:33:38 <andriydohniak> I disabled fill, now it works, but when it spawns, it looks like this:
18:33:55 <andriydohniak> and as soon as I move the window, it snaps to being big again
18:35:25 <andriydohniak> Fixed it!
18:35:38 <andriydohniak> I forgot that fill is not a binary, I can set it to row_height
18:35:54 <andriydohniak> sorry for spamming, but when I spam here, new ideas come to me
18:38:34 <andriydohniak> From segfaults to working! I am so happy, now I think I +- understand how the widget system works
18:42:52 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #12779: Codechange: Pass NWidgetParts as span instead of begin/end pointers. https://github.com/OpenTTD/OpenTTD/pull/12779#pullrequestreview-2113870801
18:45:30 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #12781: Add: Compiler check for _fios_colours/DetailFileType https://github.com/OpenTTD/OpenTTD/pull/12781#pullrequestreview-2113878630
19:13:03 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#issuecomment-2163730202
19:18:20 <DorpsGek> [OpenTTD/OpenTTD] James103 commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#pullrequestreview-2113975718
19:22:13 <DorpsGek> [OpenTTD/OpenTTD] flowprint updated pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683
19:23:22 <DorpsGek> [OpenTTD/OpenTTD] michalc updated pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761
19:25:16 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#pullrequestreview-2113995747
19:25:31 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#issuecomment-2163749040
19:26:21 <DorpsGek> [OpenTTD/OpenTTD] michalc updated pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761
19:26:44 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#pullrequestreview-2113999976
19:35:40 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#pullrequestreview-2114026465
19:36:18 <DorpsGek> [OpenTTD/OpenTTD] michalc updated pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761
19:36:29 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
19:36:31 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761#pullrequestreview-2114028909
19:37:06 <DorpsGek> [OpenTTD/OpenTTD] michalc updated pull request #12761: Add: [Console] schedule command to execute a script file later https://github.com/OpenTTD/OpenTTD/pull/12761
19:57:13 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250539424769511505/image.png?ex=666b4f18&is=6669fd98&hm=8c670c0bd20b1da0121491acc7321e20abbc2791b77655a906b7c7f31db5179e&
19:57:13 <andriydohniak> I made a different selection, which one is better?
19:58:00 <andriydohniak> andriydohniak: Or this one?
20:20:31 <andriydohniak> https://cdn.discordapp.com/attachments/1008473233844097104/1250545289530577058/image.png?ex=666b548f&is=666a030f&hm=81188328aa415e471ee274e98e8ee56b1814593ba156057637d953478e831055&
20:20:31 <andriydohniak> I think this one is perfect:
20:21:20 <talltyler> Very nice πŸ™‚
20:21:34 <talltyler> Graphs have needed some love for a while
20:22:29 <talltyler> I know you are just doing companies, but that highlighting would be a nice improvement to the cargo value graph, especially when the industry set has a lot of cargos πŸ˜„
20:26:33 <andriydohniak> talltyler: I will add it there too
20:28:10 <andriydohniak> talltyler: Now I got excited, and want to implement a better selector for cargo too
20:28:12 <andriydohniak> :)
20:28:24 <andriydohniak> now I have to make my company selector, a universal selector
20:33:52 <andriydohniak> And the funny thing it will probably work well, just needs a bunch of work
20:37:41 <talltyler> Pretty soon you’ll be like the rest of us, spending more time writing code than playing the game πŸ˜›
20:37:50 <andriydohniak> talltyler: Already there
20:38:01 <andriydohniak> I plated < 15h of openttd
20:38:33 <andriydohniak> and was "coding" (mostly trying to understand) ~80h
20:40:12 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:41:02 <andriydohniak> and I am horrible at estimating time spent, so I am probably undercounting both of those values
20:47:40 <talltyler> Oh, you’re one of those hardcore β€œdiscovered OpenTTD as a coding exercise” people πŸ˜› (respect!)
20:48:53 <andriydohniak> talltyler: No, I started playing, I joined an online server, and people were talking trough some replay bot with other servers. I asked why not just make 1 giant one, and they told me that there was a 15 company limit.
20:49:05 <andriydohniak> I thought "How hard could it be to change that?"
20:49:12 <andriydohniak> The game IS open source
20:49:16 <andriydohniak> so now we are here
20:49:18 <andriydohniak> :)
20:49:31 <andriydohniak> No regrets
20:49:46 <_glx_> and the usual finding is "harder than I first though"
20:50:02 <andriydohniak> _glx_: I thought I fully solved it at least 8 times
20:50:10 <andriydohniak> and 8 of them so far I was wrong
20:50:20 <andriydohniak> but it's mostly solved, with some UI bugs
20:50:32 <andriydohniak> (my patch)
20:50:59 <andriydohniak> so now I am working on the UI to make it better, with a possiblity to add my patch in the future
20:51:05 <andriydohniak> (fixed up of course)
20:51:45 <andriydohniak> I want to have a c++ function pointer that also takes `this`, how is that possible
20:52:16 <andriydohniak> Or a lambda is also fine
20:52:46 <andriydohniak> but I need to be able to assign it
20:55:11 <andriydohniak> I think I will just pass in the struct ptr as an argument for now
20:56:38 <_glx_> `this` is just a pointer πŸ™‚
20:58:14 <andriydohniak> but will it be passed in automatically?
20:58:40 <andriydohniak> How does c++ keep track of which "this" goes where?
20:58:54 <andriydohniak> and does it break when taking a function ptr?
20:59:07 <_glx_> you can pass it as function parameter
20:59:56 <andriydohniak> so just create `void (*fun) (StructName \*this)`
21:00:11 <_glx_> don't name it this πŸ™‚
21:00:21 <_jgr_> this is only for member functions, not free-standing ones
21:01:00 <andriydohniak> yea, I know I can do it as a separate name, I was asking if it's possible to have a function that is passed by a function ptr, that retains it's `this`
21:01:06 <_jgr_> It may be worth considering std::functions if you want functions ptrs with state
21:01:16 <andriydohniak> _jgr_: nope
21:01:27 <andriydohniak> just call with args, no state
21:02:28 <_jgr_> A retained value of the this pointer is state
21:03:25 <andriydohniak> but if it's just a pointer to a static function, why that would be statefull?
21:04:11 <andriydohniak> I decided to make the function static, I can just pass in the object myself, to avoid problems
21:04:27 <andriydohniak> but in the future I might take a look at std::function
21:05:32 <_glx_> yeah just pass `this` as parameter for the function
21:17:23 *** HerzogDeXtEr has joined #openttd
21:23:59 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:27:09 <andriydohniak> Tomorrow is gona be a big day (for my GUI project)! I can feel it
21:27:12 <andriydohniak> gn
21:31:52 *** Wormnest has joined #openttd
21:42:20 *** tokai|noir has joined #openttd
21:42:20 *** ChanServ sets mode: +v tokai|noir
21:45:51 <peter1138> Hmm
21:45:58 <peter1138> No Haribo.
21:49:16 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:59:34 <andriydohniak> peter1138: The Haribo is a lie!
22:05:56 <peter1139> :(
22:08:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #12779: Codechange: Pass NWidgetParts as span instead of begin/end pointers. https://github.com/OpenTTD/OpenTTD/pull/12779
22:11:54 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:39:52 *** Leopold_ has joined #openttd