IRC logs for #openttd on OFTC at 2024-06-15
β΄ go to previous day
00:01:13 <silent_tempest> Okay it's fixed now
00:01:29 <silent_tempest> Well at least for me
00:01:36 <silent_tempest> Feels like there's an issue in that repo though
00:01:47 <silent_tempest> Like one of those branchs should probably die.
00:03:16 <andriydohniak> I think master is dead
00:03:27 <silent_tempest> It's 1 commit behind...
00:03:32 <andriydohniak> the last commit there was 3y ago
00:03:49 <silent_tempest> Yeah this repo doesn't see alot of activity
00:04:21 <silent_tempest> Only pendantic fussy assholes like me open PR's for it... Lol XD
00:06:33 <silent_tempest> At some point I'll get some actual code merged in a PR instead of the small things I have been getting merged
00:08:34 <silent_tempest> Github is very confused here...
00:09:05 <silent_tempest> Since I don't have write access approval is literally required as some one with write access has to apporve the request by merging it...
02:15:05 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
02:27:37 *** Leopold_ has quit IRC (Ping timeout: 480 seconds)
02:59:02 *** gnu_jj_ has joined #openttd
03:02:31 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:47:19 <ahym> silent_tempest: This is telling you that it needs to be merged by someone with repository write access and does not require approval from a reviewer
03:48:26 <silent_tempest> Oh I understand... But merging is approval...
03:48:39 <silent_tempest> I understand what github is saying.
03:48:51 <silent_tempest> I just disagree that it's statements make any sense
03:49:30 <ahym> it doesn't require approval so anyone with write access can merge it without consulting anyone else
03:50:35 <ahym> idk maybe that is confusing
03:50:35 <ahym> some repositories though have very many linters and tests and code reviewers and things
03:57:22 <reldred> just means the person who has write access can merge it without putting it before the Council of Elders
03:57:33 <reldred> merging and approval are two different things in github
03:58:17 <reldred> showing it to you as someone without write access is telling you that you only need to bribe one person, not bribe the entire council of elders
04:02:52 <ahym> much better way of putting it
04:35:07 <peter1138> With normal scaling and font sizes the cargo icons are the same height as normal text
04:38:32 <andythenorth> no but why are we awake?
04:49:24 *** salut3585 has joined #openttd
05:29:20 <wensimehrp> This PR should be ready now
06:01:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:42:20 *** pickpacket5 has joined #openttd
06:45:47 *** pickpacket has quit IRC (Ping timeout: 480 seconds)
06:45:47 *** pickpacket5 is now known as pickpacket
06:55:27 <andythenorth> what shall we do today?
07:09:40 <johnfranklin> daily dilemma: tea or coffee
07:13:51 <Eddi|zuHause> the same thing we do every day
07:15:07 <johnfranklin> oops, month since riding a bike...
07:18:50 <johnfranklin> Higher coffee amount is needed to read mathematics books in english...
07:21:17 <johnfranklin> Is electronic devices stimulating? It is true reading real books makes me more sleepy than reading on tablet/laptop/whatever...
07:28:40 <Eddi|zuHause> they say blue light is stimulating
07:29:40 <Eddi|zuHause> how much of that is based on actual research, idk
07:31:54 <peter1139> Uh... why is it raining?
07:34:32 <Eddi|zuHause> so, when the sun shines over the ocean, water is evaporating, in higher altitudes with lower temperature the water can condense into clouds, if the wind pushes the clouds over land, the clouds can form heavier droplets that fall onto the ground
07:41:18 <Eddi|zuHause> is it actually known what "90% chance" means? does it mean 90% of the area? or 90% of the time?
07:49:11 <truebrain> The best quote for that is this: `βWe donβt want anyone to overthink this," Cornish said. "Your probability of precipitation is the likelihood that you will receive measurable precipitation during the forecast timeframe." `
07:52:33 <andythenorth> it's truebrain π
07:53:51 <truebrain> no, Cornish said that, but tnx for reading
07:54:03 <andythenorth> been missing you
07:54:13 <andythenorth> have you been working for money or something?
07:54:33 <truebrain> not more or less than usual π
08:00:29 <peter1139> Oh, it's 9am and I have not gone out.
08:02:27 <peter1139> No longer in cycling gear. It'll get sunny now I bet.
08:03:14 <peter1139> Eddi|zuHause, neither, it means there's a 90% chance there will be some rain in the area.
08:03:55 <peter1139> I sped up Iron Horse loading time from 11 seconds to 5 seconds.
08:04:46 <andythenorth> did you delete most of the trains?
08:05:55 <peter1139> I did not change Iron Horse.
08:10:07 <peter1139> It's going to be dryer later, but 50km/h+ gusts
08:21:41 * andythenorth training a GPT to make grf
08:25:10 <andythenorth> it's going badly
08:25:21 <andythenorth> not training it to make the actual grf
08:25:27 <andythenorth> training it to be a design assistant
08:25:36 <andythenorth> equivalent of tails to sonic
08:25:44 <andythenorth> I am sonic, just in case anyone is unsure π
08:28:05 <Eddi|zuHause> i have some doubts :p
09:17:20 <andriydohniak> A question about where to put my code:
09:17:20 <andriydohniak> Normaly the gui code lives in <thing>_gui.cpp. But what I made is a universal selector widget, without any attachment to the particular window. As far as I know, there is no president about making a file for a "widget". 1 more problem is how it works, it has a concept of "profiles", wher on the setup you pass in 2 function pointers, 1 for the function that draws 1 line of the list, 2nd for the
09:17:20 <andriydohniak> function that populates the list. Where should I put that? with the widget code? or with the caller code?
09:18:05 <andriydohniak> I would also like to reuse my functions for different cases, e.g company selection functions are pretty much universally usefull
09:20:10 <peter1139> Hmm, non-debug build is 1.9s to 1.5s. An improvement but nothing like the slowness of a Debug build.
09:20:50 <andriydohniak> peter1139: a build from scratch?
09:20:54 <peter1139> andriydohniak, that's basically what picker_gui does.
09:20:57 <andriydohniak> That is soooo fast!
09:21:13 <peter1139> No, execution time.
09:21:17 <andriydohniak> peter1139: Ok, I will take a look
09:21:48 <peter1139> Although I used a virtual class as an interface, not standalone fucntion pointers.
09:22:46 <peter1139> Hmm, so is 1.9s to 1.5s worth it? It's only NewGRF loading time...
09:23:10 <peter1139> 11s to 5s is significant but debug builds don't matter.
09:23:51 <andriydohniak> peter1139: I am now thinking, and this does land itself nicely to virtual classes, I just don't think in OOP :)
09:27:58 <andriydohniak> Ok, I still think function pointers are better, because it's easier to create combinations of different ones, and I plan to add more configurability for it to be usable outisde of the graph context
09:29:27 <peter1139> Classes with virtual methods are better, they automatically have potentially useful things like state.
09:30:44 <andriydohniak> but all the state I need is already saved in the base class
09:30:45 <LordAro> peter1139: what have you sped up?
09:30:50 <LordAro> can't be ^ PR, surely
09:31:29 <peter1139> GetNewEngine() is quite slow, but it's really slow in a debug build.
09:32:43 <peter1139> But it's only used when loading NewGRFs, so not really very important either.
09:32:52 <andriydohniak> peter1139: If you are just testing, you can mix&match debug / release builds on different files
09:33:07 <andriydohniak> So you can release with debug info build only that file
09:34:41 <_jgr_> Is this the linear search in EngineOverrideManager?
09:41:24 <peter1139> Same principal but different implementation. I just added an std::array (vehicle type) of std::unordered_map to the NewGRF class. Therefore the only key is internal index.
09:58:36 <andythenorth> Just make smaller grfs π
10:52:28 <andriydohniak> What is the benefit of using a class vs a struct in cpp?
10:53:40 <LordAro> default private vs default public
10:58:08 *** tokai|noir has quit IRC (Quit: c('~' )o)
11:10:36 <peter1139> Hmm, when is StationCargoReroute processed...
11:11:29 <peter1139> My partition table isn't going to help.
11:12:17 <andythenorth> "In OpenTTD, the processing of StationCargoReroute occurs during the periodic update cycle for stations. This involves the reassignment or rerouting of cargo within a station based on certain conditions or criteria. Specifically, it is processed as part of the station update mechanism that is executed periodically."
11:12:25 <andythenorth> thanks GPT, good detail
11:12:33 <andythenorth> it suggested looking in the src
11:14:19 <_jgr_> It's for when links are removed
11:15:00 <peter1139> Is in called in the main game loop or in the linkgraph threads?
11:15:40 <_jgr_> In the main thread, there are no operations on cargo lists from link graph threads
11:23:29 <andythenorth> this GPT is lolz
11:24:43 <pickpacket> I finished my every-other-Friday multiplayer game last night π 100 years in game. A couple of returning players, some that just played a session or two. Was great fun. Will definitely do again!
11:28:23 <LordAro> andythenorth: i mean, it at least added the bit about the station update mechanism. everything else could probably just be inferred from the function name
11:29:54 <andythenorth> I have been using custom GPTs a lot this week, and when well trained and well-tuned they're really good, for appropriate tasks
11:30:16 <andythenorth> however training them via ChatGPT is a shitshow
11:30:29 <andythenorth> I suspect there's a better way via the OpenAI API tools
11:39:22 *** gelignite has joined #openttd
11:40:24 <andythenorth> anyone know what customGPT actions do yet? π
11:44:19 <andythenorth> hmm my attention span for statistical guessing bots has run out π
11:47:16 <andriydohniak> Hey, is it intentionall that widget_type.h does not have all the necessary includes, and it only works because when other files include it, they include the correct includes before including widget_type.h
11:47:43 <andriydohniak> For example here:
11:48:00 <andriydohniak> Without tile_type.h and vehicle_type.h it will not work
11:48:55 <andriydohniak> I found similar issues in other include files
11:49:03 <andriydohniak> so is that intentionall or no?
11:50:31 <_jgr_> It likely isn't, but it's somewhat difficult to detect, so is easily overlooked
11:50:56 <andriydohniak> It's really not, you just go to the header file with the LSP enabled, and it shows you an error
11:51:13 <andriydohniak> Language Server Protocol
11:51:27 <andriydohniak> Autocomplete + compiler error thingie
11:51:43 <andriydohniak> clangd in my case
11:52:19 <andriydohniak> Those red errors, autocomplete and code actions is what lsp is responsible for
11:55:08 <andriydohniak> You can install LSPs in practically every code editor, I use neovim, but you can do it in Emacs, vscode...
11:55:43 <andriydohniak> _jgr_: Is this the first time you hear about LSPs?
11:55:59 <andriydohniak> I thought everybody was using them, especially the vscode kids
11:56:06 <_jgr_> I know of them, I can't remember every acronym though
11:56:29 <andriydohniak> What's your setup? OS, Editor, PC specs
11:57:57 <_jgr_> I'm not really one for fancy IDEs, I use geany mostly
11:58:30 <johnfranklin> What is customGPT? Custom fork of GPT database?
12:00:17 <andriydohniak> _jgr_: linux or windows?
12:03:05 <andriydohniak> _jgr_: So this is not ideal, but you can run the comman manually from the command line
12:03:05 <andriydohniak> clangd --compile-commands-dir=build --clang-tidy --check=src/graph_gui.cpp 2> /dev/stdout | grep "^E"
12:03:21 <andriydohniak> just change the src/graph_gui.cpp to any other file
12:03:24 <pickpacket> _jgr_: same re fancy IDEs. Keep having so many issues with workspaces/projects getting screwed up, vcs integration failing, run setups being opaque and hard to configure, etc. Not to mention spending hours -- at one previous job two days -- just setting up with plugins and config
12:04:19 <pickpacket> I've never heard of LSP π then again I'm not a dev
12:04:38 <andriydohniak> Neovim is not a fancy IDE, but I can still enjoy it working and helping me
12:05:25 <pickpacket> Will be again soon enough though. Will probably have to use vscode a lot...
12:06:59 <pickpacket> andriydohniak: how many plugins did you need to make it helpful? π I prefer vim with no plugins and a one line .vimrc file. Though I do acknowledge that I'm making things harder for myself in many ways
12:07:54 <andriydohniak> pickpacket: Neovim, and it's helpfull without any plugins, but to make the LSP work, I did not need to install a plugin, because neovim supports LSPs by default
12:08:17 <andriydohniak> that said I love plugins, and I have a bunch of them installed, and they very much make my life better
12:09:20 <andriydohniak> _jgr_: So my first command is kinda bad, because after the first error, it just finds a bunch of fantom ones, so what you actually want is this:
12:09:20 <andriydohniak> clangd --compile-commands-dir=build --clang-tidy --check=src/widget_type.h 2> /dev/stdout | grep -e "^E" | head -n 2
12:09:48 <andriydohniak> for some reason in this project it always shows 1 fantom error that looks like this:
12:10:02 <andriydohniak> you can see the first line is an error that is always present
12:10:17 <andriydohniak> but the second one actually shows a usefull error
12:11:07 <andriydohniak> this runs in my editor automatically, so I don't need to do it manually, but if you want to check a .h file, you can do it manually too
12:11:46 <pickpacket> I should really try that. Might badger you for pointers at a later date
12:13:07 <andriydohniak> I really like my editor integration though, and If I didn't have it, I would be way too lazy to actually run it manually, but then again, I am not the most patient person
12:15:41 <andriydohniak> There are only 598 headers, and it takes ~4 seconds to check a complicated header, so I might make a script that checks all of them, and mb somebody who cares enough can take a look at the problematic ones
12:27:43 <andriydohniak> Already found 2
12:28:11 <andriydohniak> I will not check headers in 3rdparty folder, they take too long to check
12:29:51 <andriydohniak> Ok, it's finding stuff, and it's going faster then I though, probably will be done in 15 min
12:31:25 * pickpacket is so patient he might as well be called Patience
12:31:53 <andriydohniak> I just like bash scripts a little too much
12:32:23 <andriydohniak> This is the whole thing btw:
12:32:27 <andriydohniak> Not that hard, is it
12:33:18 <andriydohniak> the headers file is just `find -name "*.h" | grep -v 3rdparty > headers`
12:42:01 <_glx_> does it also check .hpp ?
12:42:14 <andriydohniak> _glx_: nope, I forgot to include .hpp files
12:42:21 <andriydohniak> but I will check them afterwards
12:43:02 <andriydohniak> there are 174 hpp files
12:43:22 <andriydohniak> 172 excluding 3rdparty
12:49:39 <andriydohniak> Here are all the .h files that have missing includes:
12:49:39 <andriydohniak> ./src/widget_type.h
12:49:39 <andriydohniak> ./src/bitmap_type.h
12:49:39 <andriydohniak> ./src/date_gui.h
12:49:39 <andriydohniak> ./src/dropdown_common_type.h
12:49:40 <andriydohniak> ./src/dropdown_func.h
12:49:40 <andriydohniak> ./src/engine_cmd.h
12:49:42 <andriydohniak> ./src/goal_cmd.h
12:49:42 <andriydohniak> ./src/group_gui.h
12:49:44 <andriydohniak> ./src/misc_cmd.h
12:49:44 <andriydohniak> ./src/network/core/tcp_listen.h
12:49:46 <andriydohniak> ./src/os/macosx/font_osx.h
12:49:46 <andriydohniak> ./src/road_cmd.h
12:49:48 <andriydohniak> ./src/saveload/newgrf_sl.h
12:49:48 <andriydohniak> ./src/station_cmd.h
12:49:50 <andriydohniak> ./src/story_cmd.h
12:49:50 <andriydohniak> ./src/string_func.h
12:49:52 <andriydohniak> ./src/strings_func.h
12:49:52 <andriydohniak> ./src/table/airport_defaults.h
12:49:54 <andriydohniak> ./src/table/airport_movement.h
12:49:54 <andriydohniak> ./src/table/airporttiles.h
12:49:56 <andriydohniak> ./src/table/animcursors.h
12:49:56 <andriydohniak> ./src/table/autorail.h
12:49:58 <andriydohniak> ./src/table/bridge_land.h
12:49:58 <andriydohniak> ./src/table/build_industry.h
12:50:00 <andriydohniak> ./src/table/cargo_const.h
12:50:00 <andriydohniak> ./src/table/clear_land.h
12:50:02 <andriydohniak> ./src/table/elrail_data.h
12:50:02 <andriydohniak> ./src/table/engines.h
12:50:04 <andriydohniak> ./src/table/heightmap_colours.h
12:50:04 <andriydohniak> ./src/table/industry_land.h
12:50:06 <andriydohniak> ./src/table/newgrf_debug_data.h
12:50:06 <andriydohniak> ./src/table/object_land.h
12:50:08 <andriydohniak> ./src/table/palettes.h
12:50:08 <andriydohniak> ./src/table/pricebase.h
12:50:10 <andriydohniak> ./src/table/railtypes.h
12:50:10 <andriydohniak> ./src/table/road_land.h
12:50:12 <andriydohniak> ./src/table/roadtypes.h
12:50:12 <andriydohniak> ./src/table/roadveh_movement.h
12:50:14 <andriydohniak> ./src/table/station_land.h
12:50:14 <andriydohniak> ./src/table/strgen_tables.h
12:50:16 <andriydohniak> ./src/table/town_land.h
12:50:16 <andriydohniak> ./src/table/track_land.h
12:50:18 <andriydohniak> ./src/table/tree_land.h
12:50:18 <andriydohniak> ./src/table/water_land.h
12:50:20 <andriydohniak> ./src/timetable_cmd.h
12:50:20 <andriydohniak> ./src/video/cocoa/cocoa_keys.h
12:50:22 <andriydohniak> ./src/widgets/link_graph_legend_widget.h
12:50:22 <andriydohniak> ./src/widgets/newgrf_debug_widget.h
12:50:24 <andriydohniak> ./src/widgets/settings_widget.h
12:50:24 <andriydohniak> and the full log:
12:50:54 <andriydohniak> It ***DOES NOT*** include all the errors, but it indicates the existance of some errors
12:54:19 <LordAro> did you need to paste all of that in?
12:55:12 <andriydohniak> Did it paste it fully? Not just a link?
12:55:19 <andriydohniak> I pressed attach file
12:56:29 <andriydohniak> And I suppose deleting the message is not supported by the IRC bridge
13:08:15 <andriydohniak> Here is .hpp file log:
13:08:29 <Rubidium> the majority aren't even true header files. They are just files with massive data tables that get included in one location to keep the .cpp files succinct
13:08:34 <andriydohniak> I made my command use gnu paralell, so now it takes < 1m for the whole thing
13:08:53 <andriydohniak> Rubidium: mb, they still should probably include everything they need
13:09:34 <andriydohniak> there are 12 problematic .hpp files
13:10:05 <Rubidium> I was talking about the ones src/table folder though
13:10:40 <andriydohniak> mb, I am not going to do anything with my findings, but if anybody wants to do something, go ahead
13:12:19 <Rubidium> to be honest I like those issues to be fixed, and then also do somewhat the reverse... try to remove as many headers from the headers as possible and eventually from the .cpp files
13:13:33 <andriydohniak> that will also help, because there are a lot of .h files included in .cpp files presicely because other .h files don't include them already
13:16:14 <_glx_> `./src/blitter/32bpp_sse_func.hpp` is a partial header actually, it's included by other headers to complete it
13:16:15 <Rubidium> practically I would not add includes to src/table/*.h, but rather rename them to make clear they are not to be considered normal header files. As including most of those files in a second location in the code will lead to duplicate definitions. Yes, I know C++ compilers with ODR will be more forgiving but it's a slippery slope
13:16:25 <_glx_> you never use it directly
13:21:00 <andriydohniak> If anybody wants to try searching again later, Here is a complete script that includes .hpp and .h files, but excludes src/table. It also supports paralell execution:
13:21:30 <andriydohniak> And the command to run this file:
13:21:30 <andriydohniak> `find -name "*.h" -or -name "*.hpp" | grep -v 3rd | grep -v src/table | parallel --jobs 24 bash check_headers_arg.sh`
13:22:01 <andriydohniak> you need gnu parallel and clangd installed for this to work
14:22:39 <andriydohniak> How does the OpenTTD's build system work? How do I add a new .cpp and .h files?
14:24:14 <andriydohniak> Btw, LOOK AT THIS! Those are LINKER errors! Look how good they are!
14:24:15 <Rubidium> I think it's fairly standard CMake. Check CMakeLists.txt in the folder where you want to add the files
14:24:44 <andriydohniak> Those are the best linker errors I have ever seen!
14:25:18 <andriydohniak> Compare with gnu ld:
14:34:38 <pickpacket> I tried to take a screenshot of the whole map last night. It caused the game to freeze up for a moment and produce a 500 MB(!) png file that was broken and couldn't be opened. Is... Is this expected? How can the image be half a GB? That's *insane*
14:34:55 <andriydohniak> I found the CODINGSTYLE.md document, now I have to rewrite a bunch of stuff
14:34:58 <pickpacket> Another player tried the same rhing on their computer, with the same result
14:35:18 <andriydohniak> pickpacket: Can you share that PNG?
14:35:33 <andriydohniak> Mb it can be opened in some viewers
14:35:54 <Rubidium> pickpacket: how big was your map?
14:36:13 <michi_cc> pickpacket: Whole map means whole map, at normal zoom. If you play on a 4096 x 4096 tiles map, you probably get a multi-GB image.
14:36:23 <pickpacket> andriydohniak: I honestly don't know if I can. Not sure where I would share it. I tried a couple of different programs and they all said the file was kaput
14:36:33 <pickpacket> The map was 1024x1024
14:36:43 <andriydohniak> I am also trying on the map of the same size
14:37:27 <pickpacket> I don't know how the png format works but I was expecting it to compress it somewhat at least
14:37:46 <pickpacket> Not sure if png does that at all
14:38:19 <Rubidium> pickpacket: it will compress
14:38:35 <pickpacket> What's "normal zoom" in this case?
14:39:26 <andriydohniak> For me its 642m, gona try opening now
14:39:54 <pickpacket> Rubidium: that's good to hear. I figure that a map with lots and lots of repeating patterns should compress nicely, but I'm usually wrong when it comes to these things
14:40:33 <andriydohniak> after some time
14:41:10 <Rubidium> pickpacket: it would be 65473 x 32887 pixels => 2.15 billion pixels -> 4.6 billion bytes (~4.6 GB uncompressed)
14:41:32 <pickpacket> Did you take it via the screenshot option in the βmenu?
14:41:42 <andriydohniak> It is slowly opening
14:41:47 <andriydohniak> pickpacket: yes
14:41:52 <andriydohniak> It is slowly zooming in
14:42:19 <pickpacket> Wewy pwetty!!! π€©
14:42:46 <andriydohniak> But it is opening VERY slowly
14:42:58 <pickpacket> Rubidium: haha, oh shit... I guess it's very well compressed then π
14:43:19 <andriydohniak> it does not open the whole image, it first loaded a low res version, and then a little bigger res version, an on every iteration it takes a while
14:44:19 <pickpacket> andriydohniak: it does sound reasonable that my image is broken, since it's so much smaller than yours.
14:44:43 <_glx_> maybe you ran out of memory while generating it
14:44:47 <Rubidium> pickpacket: the reason it won't be opened by many tools is because people put limits on the allowed resolution
14:45:09 <andriydohniak> Rubidium: firefox-developer-edition for the win!
14:45:22 <_glx_> gimp should be able to open it too
14:45:40 <pickpacket> _glx_: could be. Very likely. Not sure why the other player failed, though
14:45:46 <michi_cc> Rubidium: I think you are low-balling the size actually. OTTD will almost always have a 32bpp blitter and we do 24bpp PNG in this case. So actually even more like 6.4 million bytes.
14:46:06 <pickpacket> One program I tried said that it was too big. The pthers said that it was broken
14:46:22 <Rubidium> michi_cc: yeah, bad math in head... the 4 should've been an 8
14:48:23 <Rubidium> pickpacket: for example, OpenTTD will refuse to load that PNG as heightmap because it's resolution is simply too big (not more than twice the maximum map size is allowed)
14:49:18 <andriydohniak> Gimp taking up 18 GIGS of RAM, but IT OPENED IT!!!!
14:52:13 <_jgr_> The main practical use for those giant whole-map screenshots is to turn it into a zoomable/tiled display like in google photos
14:52:30 <_jgr_> They're not much use directly
14:52:42 <andriydohniak> Unless you have GIMP
14:53:37 <andriydohniak> But how much easier is it just just share the savefile, and pause the game though
15:04:43 <pickpacket> andriydohniak: roughly 6,472 times easier. Give or take. The save file for the game is 2.2 MB
15:05:10 <andriydohniak> Yea, that is kinda funny
15:05:20 <andriydohniak> And easyer to use
15:06:00 <andriydohniak> but It's very cool that that's even possible, and that there exist software that can create and read such big pngs
15:37:33 <andriydohniak> I just can't add a file to be compiled! How can I add a file to be compiled?
15:38:30 <andriydohniak> I don't know how to use the cmake, but I haven't found where it stores all the files to be compiled
15:38:49 <andriydohniak> I tried deleting the build directory, and regenerating the makefile, still nothing
15:39:26 <exceptik> check them cmakelists.txt files
16:01:10 <peter1138> _jgr_: Might make more sense to directly create those tiles instead.
16:01:31 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
16:28:26 *** Wormnest has joined #openttd
16:48:17 <pickpacket> _jgr_: another use for them could be to custom print wallpapers to have a screenshot covering a whole wall in your living room *nods solemnly*
17:12:49 <peter1139> 300W to do 15mph :S
17:22:08 <pickpacket> peter1139: that must mean it's 15W to do 300mph. Trust me, I'm an engineer
17:31:47 <andriydohniak> When making a comment before the function, do I need to copy it to the declaration AND the definition?
17:41:51 <peter1139> We tend to put it only on the definition, unless it's the definition of an abstract virtual function.
17:42:17 <peter1139> pickpacket, maybe for LordAro :D
17:53:51 <Rubidium> peter1139: is the part of the endian PR that you removed something that's going to reappear soon, or will that rather be something when C++23 gets enough support?
18:35:16 <peter1139> Hmm, the mysteries of vectors... emplace_back causes objects to be destructed due to the reallocation...?
18:37:46 <_jgr_> If the allocated array is too small it'll need to allocate a new one
18:38:06 <peter1139> Yes, but I didn't expect destructors to be called. Hmm.
18:38:34 <_jgr_> It'll do a move from the old objects if possible
18:38:51 <_jgr_> But the destructor still has to be called
18:46:50 <andriydohniak> I need help testing my changes, any UI issues or usability problems I should fix.
18:48:59 <peter1139> Many layers of std::move now implemented...
18:49:44 <andriydohniak> peter1139: what does that mean?
18:50:11 <peter1139> Oh true. Many layers of move constructors/operators now implemented...
18:50:47 <andriydohniak> I am not a cpp dev, what does the word "layer" mean in this context?
18:53:09 <peter1139> Implemented move on one object and then needing to implement move on objects that that object uses...
18:55:55 <_jgr_> If you've implemented it on the inner object, doing ` = default` on the outer object is often good enough
19:36:55 <peter1139> Hmm, 5,257,216 bytes down to 135,048 bytes (+ a bit)
19:44:21 <LordAro> is it slower as well?
19:47:19 <peter1139> My focus so far is on making it start instead of crash, not performance :)
19:49:56 <peter1139> Heh, loaded one of Xarick's saves, 133,971,968 bytes down to 1,932,560 bytes.
19:50:32 <_jgr_> What sort of change is this?
19:51:17 <peter1139> Essentially replacing a fixed size array with a vector.
19:52:06 <_glx_> looks like a weird corner case
19:52:19 <peter1139> Nice, assuming the main viewport exists.
19:52:35 <peter1139> Should be an easy fix.
19:53:50 <_glx_> `if (_game_mode != GM_MENU)`
19:53:59 <_glx_> yeah a little too optimistic π
19:54:50 <_glx_> I can fix that (if you're not already on it)
19:55:00 <peter1139> I'm not already on it.
19:56:41 <silent_tempest> So I built a debug version of the fontconfig library so I can debug with it
19:57:02 <silent_tempest> And I can force gdb to use it with openttd with LD_PRELOAD
19:57:13 <peter1139> Why do you need a debug build of it?
19:57:43 <silent_tempest> Wasn't able to figure out to get the cmake build to pick up my library. I haven't tried installing it but presumably that would work but overried the system release version
19:57:55 <silent_tempest> Because the documentation is not good enough
19:58:19 <silent_tempest> I've been toying with it for a while
19:58:27 <peter1139> If you want to use it to list fonts... I have a patch for that.
19:58:35 <silent_tempest> I've seen your patch
19:58:38 <peter1139> (Including Windows and OSX variants)
19:58:47 <silent_tempest> It didn't make sense to me when I looked at it
19:58:48 <peter1139> You haven't seen the patch that's actually complete and working.
19:59:08 <silent_tempest> The one on your gitbhub branch?
20:00:15 <peter1139> No, I've not pushed it yet. That's how I know you've not seen it.
20:00:39 <silent_tempest> Well congrats you're right
20:00:44 <_glx_> usual "I have a patch for that"
20:01:15 <silent_tempest> Is there an easy way to hack the "find_library" command in cmake?
20:01:20 <silent_tempest> That anyone here is aware of?
20:01:30 <peter1139> The main thing with such an API is do we want to list all families and styles in one go, or separately list all families, then list all styles of each family?
20:01:35 <silent_tempest> I'm sure I can hack the cmake source file and make it do what I want
20:06:10 <peter1139> I'll rebase and push this code.
20:06:22 <andythenorth> enough tanks game for today?
20:06:37 <peter1139> It is from 9th May.
20:06:41 <_glx_> oh it's triggered because win+up or win+down is seen as up or down
20:06:46 <LordAro> silent_tempest: there's *usually* some sort of define you can set, but you'll need to dig into the relevant cmake file to work out what
20:06:54 <LordAro> define at cmake configure time*
20:07:23 <_glx_> any arrow key can crash bootstrap
20:07:37 <LordAro> _glx_: win+up/down gets passed to the window at all? that's odd
20:08:37 <ahym> Windows passes most input to the currently active window so the program can override system keyboard chords
20:09:23 <LordAro> actually, yeah, it's only ctrl+alt+del that's un-overridable, iirc
20:09:32 <_glx_> input loop checks `GetAsyncKeyState(VK_XXX)` so not really capturing win+up, but just the remanent up
20:11:05 <ahym> That seems like a pretty solvable oversight at least
20:12:10 <silent_tempest> LordAro: I don't see anything I can overried easily in the FindFontConfig.cmake file
20:12:22 <silent_tempest> Other than the library-path flag?
20:12:46 <silent_tempest> Maybe I'm overthinking it and I should just override the path
20:13:00 <silent_tempest> Or just change the damn cmake file...
20:13:15 <silent_tempest> Has anyone ever tried running OpenTTD on the ReactOS?
20:13:20 <silent_tempest> The Open source windows clone?
20:16:03 <LordAro> how about all the other keys? got a cat to test with? :p
20:18:00 <_glx_> only `_dirkeys` matter here
20:24:37 <andriydohniak> Currently my selector widget is a struct, and it's not a small one either, should I change it to a class just because?
20:25:29 <LordAro> a common convention is to use structs for POD, and classes for anything with methods attached
20:26:55 <silent_tempest> ^^ This matches my expectations
20:27:24 <LordAro> but it's not something you need to waste time thinking about
20:30:10 <andriydohniak> LordAro: Well it has ~10 methods already, so I would say a class it is
20:30:27 <andriydohniak> and classes are more documented in the CODESTYLES.md
20:31:58 <_glx_> main difference is really default visibility, else they are exactly the same for c++
20:33:07 <andriydohniak> The CODESTYLES.md tells me I need to have a protected section, but I don't use inharitence
20:33:23 <peter1139> 270 enemies in this final fight. I don't think it's possible.
20:33:38 <andriydohniak> peter1139: Are you playing some doom mod?
20:34:48 <peter1139> Yeah that should be written to mean those sections should be in order: public, protected, private, if they exist.
20:35:26 <peter1139> But we often ignore the order anyway, either due to laziness or due to trying to organise members to reduce wasted padding for alignment.
20:35:34 <andriydohniak> What about this, it says the types go first, but does a struct type definition count as a type?
20:35:57 <andriydohniak> I am still working on all the documentation btw
20:36:22 <_glx_> SelectorWidget::Profile is a type here
20:36:37 <andriydohniak> makes total sence, just double checking
20:37:04 <ahym> peter1139: Can't you specify the padding offsets out of the order of declaration? I know it looks way messier but it should be possible
20:37:15 <andriydohniak> yea, I am about to deal with public / private / protected nonsence
20:39:16 <peter1138> Ahh that damage in just two BFG shots
20:39:33 <peter1138> And I started the fight with 200/200
20:39:41 <ahym> peter1139: I'm probably thinking of a more direct memory manipulation tactic then
20:39:41 <andriydohniak> _glx_: This is like every movie, the protagonist barely survives
20:40:10 <peter1138> Spoiler, I didn't survive.
20:40:20 <andriydohniak> Well some movies are tragedies
20:40:38 <andriydohniak> does BFG stand for Big Fucking Gun?
20:41:49 <andriydohniak> Yea, it does! That's funny
20:42:43 <ahym> DOOM is very silly in that regard
20:42:55 <andriydohniak> I should play it more
20:43:04 *** gelignite has quit IRC (Quit: Stay safe!)
20:43:25 <LordAro> 25 backport requested PRs
20:44:40 <peter1139> These buggers just don't want to infight.
20:44:57 <LordAro> #12692 still needs looking at, don't feel confident enough to approve it
20:45:25 <peter1139> There's no where to hide, they keep teleporting in, there's 16 arachnotrons firing deadly accurate plasma at me.
20:46:18 <peter1139> That was a rabbit hole that lead to me fixing RTL editboxes.
20:46:27 <peter1139> But not actually resolving the original RTL console issue.
20:47:01 <peter1139> The fixes for RTL editboxes are quite intrusive, not sure if they are backportable.
20:47:29 <peter1139> (Of course they are, but how much effort...)
20:48:17 <peter1139> Now that we know left & right glyph positions we could also possibly fix cursor movement.
20:48:38 <andriydohniak> Do you think this would interfere with normal editbox usage? Do I need to worry it will make my gui patch need a rewrite?
20:49:00 <peter1139> No, it's already in master.
20:49:11 <_glx_> it's the internal handling of editbox anyway
20:49:20 <andriydohniak> that makes sence
20:49:53 <andriydohniak> Why do you support older versions of the game, if newer ones are almost a strict superset of the older ones?
20:50:38 <_glx_> master (15) is the next one
20:50:52 <andriydohniak> That makes sence!
20:50:52 <LordAro> arguably we could do away with bugfix releases entirely
20:51:04 <andriydohniak> and when is the release dates?
20:51:05 <LordAro> but that's how we do things
20:51:33 <ahym> But that's multiplayer only. Slightly different. We update the server version every reset in that case
20:52:30 <ahym> Spaceship support new 15 feature :BCatLaugh:
20:52:32 <peter1139> Hmm, needs that fix for FIRS :)
20:52:39 <ahym> I'm not sure what a major release even constitutes
20:52:48 <_glx_> anyway nobody reports bugs outside of stable releases π
20:53:02 <andriydohniak> ahym: Starship 100 tiles delivery π€£ Sucks up all your budget with 15% reliability
20:54:28 <ahym> andriydohniak: lol and still is the most overpowered because all the cargo you ship has millions of dollars of profit
20:54:48 <peter1139> _glx_, we've had a steady stream of master bug reports actually, this time.
20:55:28 <andriydohniak> I should play on master
20:55:34 <ahym> i encountered a bug with trains the other day but i can't remember what i did anymore
20:55:38 <ahym> I should've wrote it down fuck
20:56:15 <ahym> for some reason one of my trains didn't turn around at the back of a one way and crashed
20:57:52 <_jgr_> I haven't made that many issues, definitely not most
20:58:47 <ahym> Is it possible to bubble up bugs from jgrpp onto master or do you just have to tell people every time they make a bug report "upstream issue"
21:00:12 <_jgr_> If it's relevant to master I'll generally create the issue in the main repo, or just send a PR directly if it's easy
21:05:44 <andriydohniak> Is this how you do multiline comments that can be interpreted by doxygen?
21:07:50 <andriydohniak> Do you know the proper way?
21:07:55 <peter1139> Do a multiline /** xxx */ comment before the member instead.
21:08:08 <LordAro> #12699 needs an actual mac user to test ... andythenorth ? :)
21:11:13 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:16:04 <talltyler> Anyone for #10409? π
21:18:17 <LordAro> I'm not brave enough for such things
21:26:57 <talltyler> Hmm, it matches the intenting on the other two load diaglogs (game/scenario and heightmap), but those are wrong too π
21:35:33 <andriydohniak> Yall are having all the fun with all the PRs! Wait for me!
21:38:13 <talltyler> Comments un-aligned π
21:39:38 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:40:08 <silent_tempest> This makes my eyes hurt:
21:40:34 <LordAro> it's certainly some code
21:40:57 <andriydohniak> silent_tempest: Hey, why do they not have to follow the CODESTYLES.md, and I have to?
21:41:09 <andriydohniak> That's not fair!
21:41:17 <silent_tempest> That's from the fontconfig source...
21:41:38 <andriydohniak> silent_tempest: Ouuuuuuuuu
21:41:40 <silent_tempest> And yeah it's standard is fucking awful
21:42:02 <andriydohniak> well awful is a strong word, I can read it fine
21:43:12 <silent_tempest> Have fun with that one
21:43:41 <andriydohniak> Ok that is funny, but there are plugins that color code the {}s, so mb they expect you to use that?
21:43:58 <LordAro> i can promise they don't
21:44:03 <LordAro> fontconfig is very old
21:44:29 <silent_tempest> Yeah I think they just listed eye-bleed in the side effects and moved on...
21:44:31 <LordAro> far older than any such fanciness
21:44:33 <andriydohniak> That's probably why! In the old days the screenspace was really limited
21:45:06 <andriydohniak> so they made their coding style to make deep nesting possible without wrapping the lines, which would be even worse
21:45:09 <LordAro> nah, i think it's just broken
21:45:30 <LordAro> the ifs have differing amounts of indent
21:46:14 <silent_tempest> Yeah it's highly inconsistent
21:46:30 <LordAro> mm, "broken" is a bit strong
21:46:44 <silent_tempest> I mean it compiles....
21:47:05 <LordAro> there's certainly an argument for "if it works, don't touch it"
21:47:09 <andriydohniak> what file was it?
21:47:51 <andriydohniak> and it was backwards compatibility code for very old OSs, nobody wants to touch that
21:49:17 <silent_tempest> I don't remember which exactly I have several open.
21:50:00 <_glx_> one liner ifs on 2 lines is the best way to easily introduce bugs
21:51:06 <LordAro> it was heartbleed, right?
21:52:06 <LordAro> goto fail in Apple SSL/TLS
21:54:10 <silent_tempest> Google sucks now
21:54:21 <silent_tempest> I can't find a link to the source for the heartbleed bug
21:54:28 <silent_tempest> But that apple bug was a different bug
21:54:43 <silent_tempest> The Heartbleed bug was a failure to validate inputs
21:55:09 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:56:39 <silent_tempest> Lol that's same result I found I just didn't like it enough to post
21:57:28 <peter1138> Although of course I did fully implement a GUI font chooser already.
21:58:08 <andriydohniak> yea memcpy without checking if the object is valid first
21:58:48 <peter1138> Just include unifont and be done with it.
21:59:20 <andriydohniak> I need an NewGRF that has a tonn of cargo types, to test my graph
21:59:29 *** alex2000ita has quit IRC (Quit: User went offline on Discord a while ago)
22:00:04 <talltyler> or FIRS in the Steeltown economy (selected in NewGRF parameters)
22:02:45 <andriydohniak> Wow! this is A LOT!
22:03:06 <andriydohniak> I imagine still better then the default, but this is kinda hard to manage tbh
22:03:10 <LordAro> text looks high in the boxes
22:03:36 <andriydohniak> LordAro: It's not, some letters just go down, look at the first line
22:03:42 <andriydohniak> the g in passengers
22:04:29 <andriydohniak> Ah, you are right! The Hide All / Show all boxes are too small
22:04:53 <peter1139> A very argumentative one, this one.
22:05:48 <peter1139> It does not appear to match the current standard for text line spacing that is established in many places.
22:05:57 <peter1139> That is what "text looks high in the boxes" means.
22:07:06 <peter1139> When designing a UI it's best practice to stick to 1x or 2x interface scale, and either use the sprite font, or ensure the OpenTTD fonts are set to 6 for small and 10 for medium.
22:07:59 <peter1139> Use original TTD base graphics may help too, as OpenGFX can be a bit wonky. OpenGFX2 is better bust still a few misses.
22:08:59 <andriydohniak> I am not using any graphics, at least I don't think I am
22:09:09 <peter1139> I can see graphics right there.
22:09:14 <_glx_> so you use opengfx π
22:09:23 <wensimehrp> andriydohniak: andriydohniak I think this one is good enough; may look bad, but it is the best solution (at least in my opinion) for now
22:10:13 <andriydohniak> _glx_: Ahh, got it now
22:11:37 <wensimehrp> wensimehrp: Maybe it looks quite wonky because you used a different font size?
22:12:03 <_jgr_> With #12735, text is an odd size and a bit blurry by default
22:12:22 <andriydohniak> It does look better with the classical graphics:
22:14:13 <andriydohniak> Dos this image look correct to all of you?
22:14:44 <andriydohniak> you can look at the bottom buttons, as their text is being drawn for me, I just SetDataTip for it
22:18:37 <andriydohniak> I found some bugs I need to fix
22:22:28 <andriydohniak> peter1138: Wow, look at your face!
22:22:52 <andriydohniak> I love the doom health face
22:22:58 <andriydohniak> health bars are boring
22:23:10 <silent_tempest> I mean you have a health %...
22:23:20 <peter1139> Two hundred and seventy enemies.
22:23:39 <andriydohniak> I can't even imagine that number of enemies in Doom
22:23:56 <andriydohniak> I only played through the normal campeighn on medium difficulty
22:24:22 <silent_tempest> Wow. I wrote some code and like holy shit it worked on the first try...
22:24:43 <silent_tempest> Something must actually be wrong except like I can literally see that it's doing exactly what I wanted it to do... Lol
22:26:47 <peter1139> Next map has 1240 enemies. I'm not sure I can be bothered.
22:26:57 <andriydohniak> That is weird, rare, and suspicious π! But congrats! ...for now
22:27:14 <silent_tempest> I have fonts that don't have language codes...
22:27:19 <silent_tempest> That seems weird
22:28:19 <andriydohniak> peter1139: You've become death, the destroyer of worlds, virtual worlds, but still
22:35:19 <peter1139> Oh, didn't notice he already did it :S
22:48:53 <andriydohniak> Dammit, I probably won't have a PR today, found a weird bug
23:02:23 <andriydohniak> I am getting SIGILL over here, and 1h ago I though I was done π€£
23:24:28 <andriydohniak> Ok, I found the source of the bug :)
23:25:20 <andriydohniak> Turns out, I made a function bool, and put it's result in an if statement, but forgot to return in the end, and that generates an illegal instruction
continue to next day β΅