IRC logs for #openttd on OFTC at 2024-06-10
⏴ go to previous day
02:06:33 *** Wormnest has quit IRC (Quit: Leaving)
02:07:29 *** gnu_jj_ has joined #openttd
02:10:51 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
02:20:41 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:43:49 <DorpsGek> - Update: Translations from eints (by translators)
04:50:07 <Tirili> Is the player "bebeto" known for joining companies and then hijacking them?
04:50:28 <Tirili> He just joined my company, removed all the signals from my railways and made most of my trains crash. Thus, he successfully ruined the game.
04:50:42 <Tirili> I had set up a very easy (non-dictionary-attack-proved) password for my company. So he either attacked it or he is an admin of the server "*OpenTTD.pro*".
05:05:40 <wensimehrp> Tirili: better report to the admin. At least I know nothing about them.
05:17:46 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:46:38 <pickpacket> talltyler: thanks for fixing the title on my PR. I wasn'tsure if I should classify it as a change or a fix 🙂
07:13:12 <DorpsGek> - Add: summary for week 23 of 2024 (by OpenTTD Survey)
07:23:43 *** wormnest[m] has quit IRC (Quit: Client limit exceeded: 20000)
07:36:01 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
08:20:40 *** SigHunter_ has joined #openttd
08:22:36 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
08:25:10 <andriydohniak> How do I set the window to be resizable?
08:33:37 <peter1139> Add a resize button, and make sure appropriate widgets are resizable, either with SetResize() in the widget layout, or in the UpdateWidgetSize() call.
08:36:12 <andriydohniak> peter1139: are you the sam guy as peter 1138?
08:36:42 <andriydohniak> and why are all people here cats?
08:36:47 *** mindlesstux has joined #openttd
08:39:04 <dwfreed> the cats are the default avatars for the Discord-IRC bridge
08:39:17 <peter1139> LordAro, my legs ache and I've done nothing :(
08:45:53 <LordAro> my knees have not gotten better
08:49:56 <andriydohniak> what is the IIRC server for this channel?
09:01:11 <andriy> Now I don't have to waste half my RAM on the Discord client
09:02:04 *** reldred has joined #openttd
09:02:04 <reldred> pffft, discord uses hardly any ram. Now MS teams... sigh...
09:02:54 <andriy> It doesn't, but I have only 4 gb of ram in total, and I need to compile, run, test OpenTTD and use a web browser, so any droplet of free ram is amazing
09:24:24 <peter1139> Hmm, now to decide which bike gets these stupidly expensive pedals :o
09:27:04 <peter1139> It would be the road bike but that needs repairs.
09:27:42 <peter1139> Could go on the MTB, but then they'll get muddy, urgh!
09:30:44 <LordAro> peter1139: you bought them? :o
09:31:11 <peter1139> Yeah, I had a funny moment.
09:32:51 <andriy> > 2010 called? Yea, I have a good PC at home, and a thinkpad t510 on the go, and I use the same ssd on both of them, so I can easily continue where I left of. Arch btw
09:33:33 <LordAro> i mean you literally said "I use Arch btw"
09:35:29 <reldred> How do you know if a Linux user is using Arch? Don't worry, they'll tell you.
09:36:33 <LordAro> (i do too... or i did until i rebuilt my computer and haven't got around to restoring dual boot)
09:37:33 <andriy> > they'll tell you :rofl:! Even if they used in the past, or their friend's friend used it once! Arch is very vocal!
09:38:59 <andriy> ok, idk how to write a newline in weechat
09:40:16 <andriy> or are they separate messages in Discord?
09:40:56 <LordAro> given IRC is separated by newlines... yes
09:41:21 <andriydohniak> andriy: you are amazing!
09:41:54 <andriy> andriydohniak: I know, you are amazing too!
10:00:50 <pickpacket> peter1139: what do you mean? The keys are values and the values are values? 🤔
10:11:04 <peter1139> The keys are the value in in the config, and the value is the number of times they appeared.
10:21:16 <johnfranklin> In 2012 my family bought a Lenovo all-in-one PC in CNY ~4500 (USD 700 at that moment)
10:21:56 <johnfranklin> 4GB RAM, but x86 Processor, x86 system, there was only 2.74 GB available
10:22:26 <johnfranklin> But back then I was playing Minecraft happily, using it until 2018
10:26:14 <andriy> How would I go about changing the number of rows in a Matrix widget dinamically?
10:26:56 <andriy> I know about SetSize(cols, rows) function, but how do I change it afterwards? e.g when the window is resized
10:33:05 *** mindlesstux has quit IRC (Ping timeout: 480 seconds)
10:37:44 *** mindlesstux has joined #openttd
10:52:04 <andriydohniak> Ok, I got it, I just set the size to (1 col, 0 rows) and it does it automagically on resize
10:53:00 <andriydohniak> but now I have a different issue, How do I reliabely check how many do I currently have?
10:53:19 <andriydohniak> Or how from OnResize method do I get the future / or current size of the widget
10:57:55 <peter1139> The count and capacity are stored in the scrollbar widget. To get the clicked row you want GetScrolledRowFromWidget() (or GetScrolledItemFromWidget() if your items are in a stl container)
10:58:21 <peter1139> And you can use vscroll->GetPosition(), GetCount(), GetCapacity().
10:59:02 <peter1139> If it is in an stl container then you can use GetVisibleRangeIterators() to assist with drawing.
10:59:28 <andriydohniak> but when I have a matrix, how do I check how many items are visible TO SET the scroolbar capacity
10:59:51 <andriydohniak> The scrollbar does not change capacity by itself, it neeeds some help
11:00:15 <peter1139> vscroll->SetCapacityFromWidget(this, WID_xxx);
11:00:36 <andriydohniak> peter1139: Thanks!
11:00:49 <peter1139> That knows how many rows are visible based on the resize step and the height of the widget.
11:01:06 <pickpacket> 543 games in a given week. And that's only those surveyed
11:01:41 <peter1139> You're looking at the wrong version.
11:01:46 <peter1139> 15912 games in 14.1
11:05:43 <andriydohniak> When is UpdateWidgetSize called?
11:06:51 <peter1139> On initial window setup.
11:07:44 <peter1139> (And if the interface scale, or fonts, are changed)
11:07:51 <andriydohniak> Ok, I needed OnResize
11:08:01 <andriydohniak> peter1139: and when the window is rolled up
11:11:53 <peter1139> "Chimney Bank. Dangerous hill. Engage low gear now. Cyclists please dismount." I'm sure you did... sure...
11:13:34 <LordAro> peter1139: not so much
11:13:56 <LordAro> but descending 33% does require some caution
11:21:37 <peter1139> Hmm, could do with a new rack-top bag, the zip is busted on my current bag and likes to fly open.
11:22:07 <peter1139> I like the idea of a quick-release one but they're always heavier and more expensive.
11:34:32 <andriydohniak> I don't like how black fonts also have shadows, makes it hard to read. Can I change the shadow color, or disable it with DrawString function?
11:39:54 <peter1139> Black should not have a shadow.
11:41:06 <andriydohniak> mb it's has shadow, because it was white before, and I forgot to SetDirty()
11:43:32 <andriydohniak> yea, that was it, I was drawing a white string, then a black one on top, just did't catch that immediatelly
11:44:56 <andriydohniak> When are WidgetLower and SetLower are called? I am having segfaults with them for some reason
11:54:18 <peter1139> Yeah, some of those calls don't check if the WidgetID exists.
11:58:18 <andriydohniak> peter1139: I am refactoring old code, and I can't delete the old constants, because the compile time will 10x, so I will do it later, so the compiler currently does not help me that much
11:58:45 <andriydohniak> Ok, fine, I will eat that 1 time 5min compile time
12:18:15 <andriydohniak> btw, for any linux users out there, INSTALL MOLD, it speeds up the linking by 5-10x depending on how many threads do you have, Very nice!
12:18:48 <andriydohniak> and also don't just do `make`, do `make openttd`, that way it won't link openttd_test
12:39:46 <andriydohniak> Progress report:
12:39:46 <andriydohniak> - I can click on the little squares on the graph, and it selects that graph
12:39:46 <andriydohniak> - The selected graph is always drawn on top (and a bit THICCer)
12:39:46 <andriydohniak> - The list item automagically scrolls to the selected item, and highlights it in black
12:41:16 <andriydohniak> What still has to be done:
12:41:16 <andriydohniak> - Selecting by clicking on the line, not only on the square
12:41:16 <andriydohniak> - Selecting after clicking on the list
12:41:16 <andriydohniak> - Adding buttons to hide the selected item
12:41:16 <andriydohniak> - Adding a filter field
12:41:18 <andriydohniak> - Making the list better sized
12:42:29 <andriydohniak> There is a scroll bar on the right, and a resize button too, it just got cut off
12:55:36 *** andriy has quit IRC (Ping timeout: 480 seconds)
13:25:09 <andriydohniak> If anyone has any ideas on how to make this UI more usable/pretty, throw them my way
13:27:31 <kuhnovic> This is part of your 255 companies effort right? Or am I mixing things up in my head?
13:28:32 <kuhnovic> If so then the window can probably benefit from a filter editbox, since scrolling through 255 companies will be a pain :p
13:28:42 <andriydohniak> kuhnovic: Kinda, I am doing separate PRs, to prepare the code base for the 255 company stuff
13:29:16 <andriydohniak> kuhnovic: I also thought of that and I am working on it
13:29:23 <andriydohniak> andriydohniak: .
13:30:18 <andriydohniak> So even if my 255 company thing won't get merged, everybody gets a QOL improvement anyway
13:34:41 *** Tirili has quit IRC (Ping timeout: 480 seconds)
13:35:19 <peter1138> Is your list of companies stored in a vector, or is it done by iterating the CompanyPool?
13:36:20 <peter1138> If you do the former, than it is very easy to add the company filter later.
13:36:45 <peter1138> If it's the latter, then it will most likely need rewriting to do the former anyway.
13:39:51 <andriydohniak> So vector good, pool bad?
13:49:48 <peter1138> If you want to filter/sort it, vector good.
13:53:08 <andriydohniak> Do you think I should add sorting?
13:53:36 <andriydohniak> Sort by name or sort by latest graph value
13:54:15 <andriydohniak> But the problem rn is 1 window of that selection is responsible for all graphs at the same time
13:54:25 <andriydohniak> It uses a bunch of statics
13:56:07 <kuhnovic> Personally I think sorting would be overkill. But like Peter1138 says, a vector would be nice if you (or anyone) ever wants to add it.
13:56:39 <kuhnovic> And in general I'd prefer stl containers over anything else if performance is not an issue
13:57:09 <kuhnovic> standard library, "stuff in std::"
13:57:26 <kuhnovic> std::vector, std::map, std::unordered_map, etc
13:58:22 <andriydohniak> Performance is not an issue at this scale, and I was thinking of making a universal company selector/filter/... Widget, because there are a bunch of different ones in every menu
13:59:12 <andriydohniak> That way it would be easier to fix all of them at once, and it will be nice and predictable to use
14:00:38 <andriydohniak> Rn this widget does not use anything to store companies, I think it just iterates from 0 .. MAX_COMPNIES
14:00:50 <andriydohniak> So that would need to get fixed too
14:02:41 <peter1138> Most of the UI lists like this do indeed use vectors.
14:02:52 <peter1138> It "wastes" memory but makes things much more convenient.
14:03:08 <peter1138> But also, it's UI, so it's only around while the window is open.
14:07:37 <peter1138> And the vscroll helpers for them is nicer to use 🙂
14:14:34 <andriydohniak> peter1138: and are you for or against creating a Universal Company Selector widget with a bunch of settings on creation, and a possiblity to be a window or a widget?
14:14:55 <andriydohniak> :peter1139 you too :)
14:15:17 <peter1138> Not sure what you mean.
14:17:57 <andriydohniak> All of these are company selectors, and all of them will break as soon as I introduce the "SLV_MORE_COMPANIES" patch, so if I have to replace all of them with better alternatives, why not create 1 good alternative to replace them with
14:18:37 <peter1138> There's also the AI debug window 🙂
14:18:44 <andriydohniak> I swear there were more of them, but I probably forgot some
14:19:24 <peter1138> Are you SURE you don't want 250+ buttons...? 😄
14:19:26 <andriydohniak> This one shouldn't break, so replacing it is optional tbh
14:19:44 <andriydohniak> peter1138: Yea, let's make 2 versions, and alpha / beta test them 🤣
14:20:31 <andriydohniak> peter1138: LIterally ALL of them are different 🤣
14:21:09 <andriydohniak> peter1138: How did you open it?
14:24:58 <andriydohniak> And probably the top menu drop downs will also have to be replaced, but that's later
14:31:51 <peter1138> They should automatically scroll anyway.
14:35:29 <andriydohniak> peter1138: Ok, this one at least needs basically the same things as the graph one, enable disable, add search and we are golden
14:50:47 *** gelignite has joined #openttd
14:53:33 *** pickpacket8 has joined #openttd
15:00:08 *** pickpacket has quit IRC (Ping timeout: 480 seconds)
15:00:08 *** pickpacket8 is now known as pickpacket
16:02:19 *** HerzogDeXtEr has joined #openttd
16:10:45 *** Tirili has quit IRC (Quit: Leaving)
16:13:07 <andriydohniak> In all that gui code, are there portions where stuff has to be thread safe?
16:19:18 <_glx_> all drawing should happen in video thread (main thread)
16:23:17 <andriydohniak> Having a company index, what is the best way to obtain a company name as a c++ string
16:23:35 <andriydohniak> Or is there a reusable implementation for sorting + filtering?
16:27:37 <andriydohniak> Ok, I got the Company::Iterate()
16:27:43 <andriydohniak> that is usefull
16:28:21 <_glx_> using the string system to get the name
16:28:39 <_glx_> all pools have Iterate() 🙂
16:28:56 <_glx_> and some also have it filterable
16:29:33 <andriydohniak> What is all the SetDParam nonsence?
16:29:41 <andriydohniak> How does it know what string to give you?
16:30:00 <andriydohniak> Also, I found `Company::Get(idx)->name`, why is that worse?
16:31:41 <_glx_> this one is only valid is set by user
16:32:02 <_glx_> ``` uint32_t name_2; ///< Parameter of #name_1.
16:32:02 <_glx_> StringID name_1; ///< Name of the company if the user did not change it.
16:32:02 <_glx_> std::string name; ///< Name of the company if the user changed it.
16:32:36 <_glx_> so using GetString and {COMPANY} is the only safe way
16:33:01 <_glx_> `STR_COMPANY_NAME :{COMPANY}`
16:33:23 <andriydohniak> And that SetDParam just sets some static far away?
16:33:36 <_glx_> SetDParam() is used to set the param for {COMPANY}
16:34:39 <andriydohniak> And I see there are already types StringFilter and QuerryFilter
16:34:46 <andriydohniak> so most of the work is done there
18:10:19 *** Wormnest has joined #openttd
18:10:50 <exceptik> Btw andriydohniak have you already tried the actual network game with people outside of your home network?
18:11:17 <andriydohniak> and it works :)
18:11:38 <andriydohniak> but because of the vote, I will need to rewrite a bunch of stuff
18:11:56 <andriydohniak> exceptik: 2 real players, and a bunch of AIs, and spamming a bunch of companies
18:12:10 <andriydohniak> + I tried joining with multiple clients
18:12:34 <andriydohniak> I stopped testing, because there is no point, I have to rewrite a lot anyway
18:13:19 <exceptik> Welp, at least something
18:13:19 <exceptik> All in all you might cooperate with current spiffingTTD maintainer, they could need some help
18:14:07 <andriydohniak> exceptik: there is no point, I already figured out everything I need, now I just need to rewrite to use less memory where possible
18:14:21 <exceptik> > they could need some help
18:14:55 <andriydohniak> exceptik: Yea, but I don't want to work on a fork, I want my work to be avilable upstream
18:15:04 <andriydohniak> and his patch is WAAAY bigger then mine
18:15:38 <andriydohniak> exceptik: They did much more things, not just the more companies patch
18:15:47 <andriydohniak> they added a lot of other stuff too
18:16:00 <andriydohniak> and my patch is compatible with old savegames
18:16:04 <exceptik> Well, yeah, the battle royale mode
18:16:04 <exceptik> The rest is just pure 500 companies patch
18:16:23 <exceptik> Both are compatible with old save games as of the last patch
18:16:39 <peter1138> LordAro, well, now I get more meaningless stats to look at, at least.
18:17:20 <exceptik> Anyways good luck on y'all's journeys
18:17:20 <exceptik> Keep up the good work
18:17:21 <andriydohniak> exceptik: I did read their patch, (at least the commit claiming to add support for more companies), and it did help me, but now I am just implementing GUI changes to make the upstream menus better prepared for more companies
18:31:13 <pickpacket> andriydohniak: exceptik wrote the original spiffBR version 🙂 the current maintainers are in theory me and gerrard (that's his name on spiff's discord), but in practice it's just gerrard
18:31:44 <exceptik> Where did ya find out that it was me
18:32:11 *** Wolf01 has quit IRC (Ping timeout: 480 seconds)
18:32:13 <pickpacket> exceptik: I'm BW 😄
18:32:35 <pickpacket> Just that I have a thousand different nicks all over the place...
18:33:04 <pickpacket> Sorry, I thought it was common knowledge. Didn't mean to leak something
18:33:37 <exceptik> Nah, it wasn't secret
18:34:11 <pickpacket> Ah! I thought I'd seen it talked about openly on spiff's discord
18:36:15 <pickpacket> Connor asked me to have a look at a small fix he wanted a few weeks ago. I had the kids that week, but I saw that gerrard was talking about looking at it in another channel. We roped him in and it seems he fixed it before I had a chance to check it out 😂
18:36:33 <pickpacket> Hence theoretically me and him but in practice just him
18:38:01 <peter1139> I did look throug the "spiff" patch and, er, well, some of thing changes were questionable.
18:39:34 <exceptik> peter1139: Yeah, especially still not cut out attempts to add more company color variations
18:39:48 <andriydohniak> pickpacket: Wow, you just put them into the open like that
18:40:03 <andriydohniak> Good thing I haven't critisized their code yet
18:40:29 <exceptik> andriydohniak: Nah, it's horrid
18:40:29 <exceptik> Lack of time, long compile times and war
18:40:58 <andriydohniak> exceptik: How long your compile times were, and what's your CPU?
18:42:04 <andriydohniak> exceptik: Well that explains A LOT :)
18:42:18 <andriydohniak> for me a full compile is ~5m, but a small change is ~1
18:42:41 <andriydohniak> For the future, download mold (linux only)
18:42:57 <andriydohniak> when running make, you HAVE to put -j<number of CPU> flag
18:42:59 * pickpacket pats his Old Faithful
18:43:27 <andriydohniak> and you can speed up the compile times by not linking openttd_test
18:43:27 <pickpacket> You speak as if processors have more than one core 😉
18:43:32 <exceptik> andriydohniak: Unless your laptop ramps up to 105°C with a. -j1
18:44:02 <andriydohniak> exceptik: I compile OpenTTD regularly on my old ThinkPad, and it takes ~15 min on -j4
18:44:15 *** toktik has quit IRC (Remote host closed the connection)
18:44:16 <andriydohniak> exceptik: You have to change your thermal paste, and remove all the dust
18:44:21 <andriydohniak> that is NOT HEALTHY
18:44:26 <pickpacket> Speaking of boiling point of water I'm going to put the kettle on for another pot of tea
18:44:27 <andriydohniak> just get a free speedup
18:44:32 <peter1139> 3210m, is that a mobile CPU/
18:44:54 <exceptik> Ye olde Thinkpad t430 or 420
18:45:22 <andriydohniak> peter1139: yea, but 105C on 1 thread, even on the worst cooling, is an indicator of crappy thermal paste
18:45:29 <andriydohniak> exceptik: mine is T510
18:45:42 <exceptik> andriydohniak: Already did
18:45:42 <exceptik> Didn't change *a lot* but helped a bit
18:46:14 <andriydohniak> exceptik: This is a temp solution, but go register on AWS, and use ssh and free credits to compile in 1 mint
18:46:36 <andriydohniak> after that run out, use Gclound, then Azure, Linode, and probably some other ones too
18:46:40 <exceptik> I also assume the thermal tubes gone worse after days and days of 105-115 with -j4 in my main job
18:46:50 * pickpacket added a 2GB swap file because the linking ran into OOM orherwise
18:46:51 <andriydohniak> All of that 1 by 1 will probably give you ~2y of fast compiles
18:47:07 <exceptik> andriydohniak: Welp, not anymore
18:47:07 <exceptik> I don't even have time to look at the code :(
18:47:40 <andriydohniak> pickpacket: I have zram configured, it's swap INSIDE the ram
18:47:47 <andriydohniak> it compresses the ramdisk 🤣
18:48:14 <pickpacket> I've thought about setting that up but never got around to it
18:48:19 <andriydohniak> but on my good machine, I have 12cores 24 threads and 32 gigs of ram
18:48:40 <andriydohniak> pickpacket: If you will, start with Linode, really easy to configure
18:48:47 <andriydohniak> I forgot Digital Ocean
18:49:09 <pickpacket> I have a VM at linode for a forum I'm admin for
18:49:42 <andriydohniak> pickpacket: If you have more phone numbers + credit cards, create a new account for free credits
18:49:53 <andriydohniak> or use Digital Ocean, also easy to setup
18:50:04 <andriydohniak> ppl say Azure is not bad, but I haven't tried
18:50:15 <andriydohniak> AWS is awesome but a pain to set up
18:50:43 <pickpacket> Nah, I get enough of cloud work at my dayjob. In my spare time I like to tinker with what I have at home
18:51:12 <pickpacket> Doing more with less is a hobby in itself for me
18:51:25 <andriydohniak> pickpacket: If you have a dayjob, you can probably afford an old used PC and compile there
18:51:35 <andriydohniak> pickpacket: that is true
18:51:45 <andriydohniak> but I still hate long compile times
18:51:53 <andriydohniak> especially when I do any rust :D
18:52:03 <pickpacket> Of course I can 🙂 and when I want fast compiles I use my work laptop
18:52:55 <andriydohniak> Just saying, check the prices on the used market, you can probably find something that is old enough to be a hobby, but modern enough not to be too liminitng
18:53:10 <pickpacket> But if I get a better computer I know that Old Faithful will be collecting dust instead of living out its days as it should
18:53:49 <pickpacket> I can get a three yo laptop from work for €100 if I want to 🙂
18:54:06 <andriydohniak> pickpacket: I have a good pc, and my thinkpad still gets a lot of use, because it's portable. I take out the SSD from my big pc, and put it in my thinkpad anytime I go on a train for example
18:54:28 <pickpacket> I only have my laptop
18:54:29 <andriydohniak> Arch + btrfs + hyprland + pipewire btw 🤣
18:54:38 <pickpacket> And three RPi servers
18:54:56 <andriydohniak> pickpacket: I have 1 rpi4 1g of ram that I never use :(
18:55:14 <andriydohniak> But I don't have a public IP, so basically all the normal uses are out
18:55:41 <andriydohniak> and it's not a dynamic IP, it's fully behind a NAT, so only IPv6 is accesible
18:55:52 <andriydohniak> but ipv6 is basically useless
18:56:26 <Rubidium> all those complaints about slow compiles. Try a PowerPC G3 or so for compiling OpenTTD. That's slow
18:56:31 <andriydohniak> pickpacket: set up a compile cluster, that's a project that will take a WHILE to do
18:57:18 <andriydohniak> Rubidium: I can do worse: My old (only) xiomi phone, the CPU is way faster, but it's always almost fully used without any compiles
18:58:04 <andriydohniak> Or that Scratch x86 alphine linux emulator
18:58:08 <andriydohniak> that is TRULY slow
19:00:44 <exceptik> Problem with slow compiles is not that they are slow, but in some cases that we also need to do other stuff on that very computer
19:00:44 <exceptik> My case was just "go smoke for half an hour, it ain't gonna work"
19:01:45 <andriydohniak> And they are not always equally slow, for example for me on my old Thinkpad changing graph_gui.cpp is a <1m compile
19:01:55 <andriydohniak> and graph_gui.h is an 8 min compile
19:02:28 <exceptik> Most of those 30 mins was linking :( an always single-threaded process
19:03:05 <andriydohniak> exceptik: That is INSANE, for me even with default linker (probably gnu ld) on my old PC the linking is ~2 min
19:03:05 <Rubidium> the last powerpc build I did (debug, by the way) took "only" five hours
19:03:48 <andriydohniak> Rubidium: Imagine compiling firefox on that beast!
19:03:51 <bootmii> Why is the Discord plugin part of the EXE?
19:04:16 <Rubidium> bootmii: why do you say that?
19:04:43 <bootmii> Because when I press shift-tilde on 14.1 the Discord overlay comes up even though I didn't install any plugins
19:05:57 <pickpacket> andriydohniak: I have enough projects that take forever 😂
19:06:15 <exceptik> bootmii: Are you sure you meant "part of" and not "supplied with"
19:06:21 <LordAro> the overlay is unconnected to anything the plugin does
19:06:34 <bootmii> yes. I don't see any DLLs anywhere and `social_integration` is empty
19:06:37 <LordAro> i'm pretty sure it works via injection or something
19:07:19 <peter1139> Solution, remove Discord.
19:10:36 <Rubidium> well, try OpenTTD 1.0 and if that also shows the overlay I would be willing to argue that it's not because OpenTTD added support for discord
19:11:01 <peter1139> Though OpenGL support could also affect that.
19:11:19 <peter1139> So try 13.4 I guess :)
19:11:30 <bootmii> 134C and JGR don't have the overlay
19:12:06 <peter1139> Did you look at Game Options -> Social too?
19:12:23 <bootmii> it says no plugins installed
19:12:33 <peter1139> Then it's absolutely nothing to do with OpenTTD.
19:14:43 <bootmii> Might be it. That one was installed into Program Files with the official installer.
19:15:59 <bootmii> Sorry for bothering you
19:26:27 <pickpacket> bootmii: I learned something from that :) Don't be afraid to bother people
19:27:04 <LordAro> i might suggest a less accusatory tone though
19:27:11 <peter1139> Just be slightly less accusatory :p
19:27:34 <LordAro> "why am i getting the discord overlay even though i don't have the plugin installed?"
19:28:18 <bootmii> Ah. I should work on that!
19:29:20 <pickpacket> And I should play the game for a bit before bedtime :)
19:32:27 <exceptik> Are you trying to get shares back?
19:33:42 <pickpacket> exceptik: the discussion about the shares system will never end
19:33:56 <bootmii> But I saw it come up because bjornwarmedal cast aspersions on it, so I _had_ to defend it _in its original context_.
19:34:43 <bootmii> I don't miss it. It's there because TT was sold as a sequel to RR Tycoon.
19:34:46 <exceptik> I don't mind it to get a decent improvement tho
19:34:58 <exceptik> It's just gonna be a heck load of work
19:35:06 <pickpacket> basically everyone hated it when it was there because it was a) exploitable and b) mean. But if you remove something like that people start yelling "don't remove it! *Fix it* instead!"
19:35:34 <pickpacket> though nobody so far has been able to suggest a solution that isn't wildly exploitable. At least not that I've seen
19:35:42 <bootmii> How many people hated it in the 90s?
19:36:30 <pickpacket> I have no idea. But when it was removed it was discussed a lot in the forums and it sounded like nobody had it enabled in multiplayer anyway because it was so exploitable
19:36:51 <exceptik> How many people have you seen using them in multiplayer game, except that one game in 2023
19:37:57 <andriydohniak> bootmii: I was born in 2004
19:38:07 <bootmii> I blame the executives at MicroProse for its inclusion, and the shift from playing against the AI to playing against other people for revealing its flaws
19:38:10 <pickpacket> bootmii: that bjornwarmedal dude is a proper idiot. Don't listen to him. If you do he'll soon start talking about tea, and being annoyingly diplomatic as if he has some inherent need to help everyone get along
19:38:40 <pickpacket> I would know. I see him every damn day
19:39:02 <peter1139> I don't think people hated it. It was just mostly pointless, with a few tasty exploits...
19:40:12 <bootmii> Later Railroad Tycoon games would add short selling and buying on margin, while Loco got rid of it entirely, just so we're clear who envisioned what
19:42:30 <andriydohniak> How do editboxes work? I can't figure it out :(
19:43:07 <andriydohniak> How do I connect a QuerrySrtring to the widget?
19:44:59 <andriydohniak> mold -run make -j12 openttd 3.45s user 0.48s system 97% cpu 4.011 total
19:45:20 <andriydohniak> It takes 4 sec to compile and link a 1 file change 😅
19:45:28 <andriydohniak> I think I love mold
19:46:27 <andriydohniak> the linking is <1s
19:48:47 *** ufo-piloot_ is now known as ufo-piloot
19:49:22 <pickpacket> andriydohniak: sssshhh. Not so loud. You're making my computer feel bad
19:49:51 <pickpacket> There there, Old Faithful. Don't mind the busy youngster...
19:52:48 <andriydohniak> pickpacket: Intel Xeon E5-2678 v3 was a server/workstation processor with 12 cores, launched in June 2015
19:56:40 <pickpacket> andriydohniak: my laptop is from 2015. It was a budget netbook.
20:06:02 <andriydohniak> pickpacket: that is funny
20:06:11 <andriydohniak> andriydohniak: need some help over here, pls
20:06:50 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
20:51:08 <_glx_> hmm just check any window with querystring 🙂
20:51:58 <andriydohniak> _glx_: I did, but it uses some weird inheritence thing, and I don't get how it works
20:54:42 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:03:31 <peter1139> Just initialisation.
21:04:35 <andriydohniak> peter1139: I just don't get how that works like that, but mb tommorow I will get it
21:04:59 <andriydohniak> What is even that field?
21:05:10 <andriydohniak> I though `:` was fore inheritance
21:05:33 <andriydohniak> you inherit from a function that is a member in the same struct? What?
21:05:42 <peter1139> It's not inheritance.
21:05:53 <_glx_> for class declaration, but here it's a constructor
21:06:06 <andriydohniak> And what does it do here?
21:06:14 <_glx_> with member initializer list
21:06:35 <peter1139> Member initializer list
21:07:19 <andriydohniak> peter1139: Ok finally got it! thanks
21:07:30 <andriydohniak> I was soo confused, I need to learn a bit more C++
21:07:30 <_glx_> `struct BuildVehicleWindow : Window {` <-- that's inheritance 🙂
21:07:39 <andriydohniak> _glx_: Yea, I got it now
21:08:04 <_glx_> and you can have templates on top 🙂
21:08:06 <andriydohniak> I don't get half of it, especially the new pipe operators stuff
21:09:48 <andriydohniak> And some new syntax with views
21:10:04 <andriydohniak> and a bunch of crap with const and constexpr and consteval
21:10:22 <_glx_> oh we don't use many of the new stuff
21:10:22 <andriydohniak> and every fucking thing being overloadable
21:10:46 <andriydohniak> _glx_: good, I would have a small chance of understanding then
21:10:57 <andriydohniak> also I still don't get how lambdas work in C++
21:11:01 <peter1139> They look nice but clang 15 doesn't support them.
21:11:04 <Rubidium> those pipe operators and anything C++23 is going to take a while before that can get into OpenTTD
21:12:06 <andriydohniak> Rubidium: I like languages that do progress, and are in with the times, I hate C++, and it's ability to screw up coders like me that don't want to learn it
21:12:18 <andriydohniak> I love rust, it's complex, but I love it
21:14:06 <peter1139> We use that, it's beautiful.
21:14:28 <Rubidium> andriydohniak: true, but for something to be useable (compiler wise), it should be in the four major compilers and new enough compilers need to be available in the github runners
21:14:45 <andriydohniak> peter1139: it probably is, and I will probably have to watch a 20h "modern c++" tutorial to stay in touch
21:14:58 <_glx_> we had to wait for apple for c++20
21:15:11 <andriydohniak> _glx_: do thay have a compiler?
21:16:38 <peter1139> Hmm, that does touch a lot :o
21:19:08 <andriydohniak> ty all, going to sleep now
21:19:09 *** andriy has quit IRC (Quit: WeeChat 4.3.1)
21:19:23 <_glx_> but we only use features available in gcc, clang, apple clang and msvc
21:21:47 <peter1139> And MinGW still manages to compile too.
21:27:24 <LordAro> peter1139: const WindowDesc?
21:28:25 <peter1139> window.cpp:684-5 modifies it.
21:29:35 <peter1139> Maybe they could be mutable.
21:29:49 <peter1139> "Pretend" const, but does protect the other members.
21:29:55 <LordAro> or just not part of the desc?
21:32:12 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:33:25 *** toktik is now known as Guest9180
21:34:51 <peter1139> That's tied into ini-file settings for storing the default window sizes.
21:34:56 <peter1139> So "just not" is not really "just".
21:36:58 <_glx_> ah yes it's almost const, unless you used CTRL somewhere
21:42:36 *** tokai|noir has joined #openttd
21:42:37 *** ChanServ sets mode: +v tokai|noir
21:43:30 *** Alkel_U3 has quit IRC (Quit: maintenance)
21:44:40 *** Alkel_U3 has joined #openttd
21:49:21 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:53:18 <andriydohniak> Can anybody tell without looking up anything what this does?
22:00:23 <_glx_> I'll need to look up, it's not something we use
22:01:39 <andriydohniak> Just saying, that's +- how I feel when seing any complex C++ code
22:01:59 <peter1139> iota gives you a sequence of numbers, and the filter returns only the even numbers.
22:02:00 <_glx_> but I guess it adds even values
22:02:25 <peter1139> So it adds up all the even numbers between bottom and top (inclusive)
22:03:06 <andriydohniak> Actually when I understand it, it looks nice
22:03:42 <andriydohniak> but 1y ago, before I learned rust, I looked at this exact image, and got INSANELLY confused and just mad for no reason 🤣
22:03:44 <_glx_> coding style doesn't help in this example
22:04:09 <andriydohniak> _glx_: to each their own
22:05:08 <andriydohniak> I don't like turnaries, but other than the formating, this is pretty good once you get it
22:05:29 <andriydohniak> I get what the pipe is supposed to do here, but no idea how it does that
22:05:31 <_glx_> ternaries can be super hard to read
22:05:47 <peter1139> Hmm, coding style looks fine to me. The example is just contrived.
22:06:01 <andriydohniak> _glx_: yea, but when ifs are not expressions, ppl overuse them
22:06:14 <peter1139> pipe is just an overloaded operator. Silly C++ things.
22:06:50 <andriydohniak> I cannot say I like that 1 bit
22:07:20 <andriydohniak> at least now I know how all that works
22:07:23 <_glx_> (we don't use that in openttd)
22:07:25 <andriydohniak> but I am not happy about it
22:08:10 <andriydohniak> _glx_: but what about the pipes? Looks usefull
22:08:13 <peter1139> We have some stringstreams which do use <<.
22:08:58 <andriydohniak> I know about stringstreams, cin, cout, because it's the first thing any c++ tutorial talks about
22:09:10 <andriydohniak> but I thought that was the exception, not the rule
22:09:21 <andriydohniak> (to overload operators left and right)
22:11:06 <_glx_> hehe we also overload operators, but only if it's really needed
22:11:52 <andriydohniak> I need to know, it's already hard to know what is happening over here, I need to know
22:12:29 <andriydohniak> I am ok with overloading [] to create accessors to collections, but anything else? Idk
22:14:25 <_glx_> `MD5Hash &operator^=(const MD5Hash &other)` but it's just a wrapper 😉
22:15:34 <andriydohniak> Ok, I was never gona use the xor operator, now I won't touch it in any context 🤣
22:15:45 <_glx_> some overloads of `new` and `delete` too 🙂
22:16:21 <andriydohniak> Idk how all types of constructor work anyway, but knowing that new and delete are operators just blow my brain a little
22:16:27 <andriydohniak> I think that is enough
22:17:37 <andriydohniak> Why is rust so beautifull, and c++ just keeps overloading crap?
22:17:59 <andriydohniak> for example, iterators, rust: Its just another trait you implement
22:18:17 <andriydohniak> c++ it's a weird thing that overwrites increment, and dereference
22:18:39 <andriydohniak> The type of which is unwritable without auto
22:19:41 <_glx_> templated stuff is often hard to write without auto
22:20:25 <andriydohniak> I haven't thought about that! Are templates just like macros, they just copy paste types around/
22:20:46 <andriydohniak> I thought they were smarter then that
22:32:04 *** gelignite has quit IRC (Quit: Stay safe!)
23:09:05 *** ufo-piloot_ has joined #openttd
23:13:53 *** ufo-piloot has quit IRC (Ping timeout: 480 seconds)
continue to next day ⏵