IRC logs for #openttd on OFTC at 2022-10-24
β΄ go to previous day
00:00:32 *** wallabra has quit IRC (Ping timeout: 480 seconds)
00:00:32 *** wallabra_ is now known as wallabra
00:06:08 *** supermop_Home has quit IRC (Ping timeout: 480 seconds)
00:11:57 <Arastais> sorry about that, I went through and fixed all the incorrect else-block formatting in gs_gui. like I said vs auto-formatted all of those and i didnt notice
00:13:29 *** Soni has quit IRC (Ping timeout: 480 seconds)
00:16:17 <TallTyler> Yesterday I autoformatted an entire file with the hotkeys and Ctrl-Z didnβt work. I had to go through the entire file in `gut gui` and revert all the things it broke
00:19:03 *** WormnestAndroid has joined #openttd
00:30:18 <petern> Fix your autoformat setting and autoformat again, profit?
00:37:33 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
00:39:23 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
00:44:22 <TallTyler> I thought I had fixed them but π€·
00:45:36 <LordAro> petern: there is no autoformatter that can cope with OTTD
01:03:33 *** Kitrana1 has joined #openttd
01:08:27 *** Kitrana has quit IRC (Ping timeout: 480 seconds)
01:15:00 *** Wormnest has joined #openttd
01:29:28 <Arastais> would it be possible to improve `.editorconfig` to align more with OpenTTD's coding style? there currently aren't too many settings
01:48:42 <glx[d]> `.editorconfig` is quite limited yes
01:51:16 <Arastais> glx[d]: could I make some improvements to it and make a PR? or is it limited for an explicit reason?
02:02:13 <TallTyler> Scary first approval! π (good thing it's only 3 lines and is a no-brainer change for consistency)
02:07:43 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
02:18:57 *** Wormnest has joined #openttd
02:57:37 *** WormnestAndroid has joined #openttd
03:03:41 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:06:45 *** Novalex has joined #openttd
03:06:45 <Novalex> What is going to be new in openttd13?
03:21:39 *** bryjen has quit IRC (Quit: Leaving)
03:36:22 *** D-HUND is now known as debdog
03:53:34 <Arastais> Arastais: Made #10104 for this
04:17:02 <dwfreed> you missed the final newline
04:17:19 <dwfreed> which is ironic, because the editorconfig says it should be there
04:45:03 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
04:45:37 *** WormnestAndroid has joined #openttd
04:47:11 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:47:14 *** WormnestAndroid has joined #openttd
04:55:18 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
04:55:36 *** WormnestAndroid has joined #openttd
06:16:07 <Arastais> dwfreed: Lol i noticed it but didnt think it wqs part of the commit checker. Ig thats what i get for doing it in a basic text editor and not VS
06:28:21 *** sla_ro|master has joined #openttd
07:39:11 *** HerzogDeXtEr has joined #openttd
08:01:37 <petern> I was on a roll yesterday and then it all just flopped π¦
08:08:11 <petern> Maybe chat settings aren't silly...
09:10:55 <petern> Gamescript mixing when?
09:12:01 <petern> We often push things off to GS, but as you can only have 1 at a time, that's a bit meh to me.
09:12:05 <LordAro> when someone figures out how to do it without immediately completely breaking the game
09:13:41 <petern> 1) Why does YouTube keep suggesting Rufford Ford flood videos.
09:13:48 <petern> 2) Why are there SO MANY STUPID PEOPLE...
09:15:58 <petern> Has multiple GS been tried? I wonder how broken it was π
09:20:41 <LordAro> I can definitely see things interacting poorly
09:20:53 <LordAro> perhaps no worse than newgrfs?
09:21:14 <LordAro> at minimum definitely needs an opt-in "can be run alongside other GS" flag
09:21:26 <LordAro> and functions for detecting other GS
09:22:02 <petern> Opt-in means all GS need to know about all future GS, so not great.
09:22:28 <LordAro> no different to newgrfs?
09:22:29 <petern> Being able to detect what other GS are doing would seem a better approach?
09:23:20 <petern> I dunno, I don't seem to hit any NewGRFs conflicting with other NewGRFs, but then again I don't try to combine industry or cargo sets.
09:26:53 <petern> I guess GS are not re-entrant π
09:27:29 <JGR> petern: Not really, each GS should declare what it does/needs instead
09:28:51 <petern> A list of features, yeah, rather than is "Renewed Village Growth" active.
09:48:11 <LordAro> good luck deciding what those features should be :p
09:48:18 <LordAro> arguably newgrfs should have the same
09:52:59 <JGR> Existing GSs are already in a relatively small number of categories
09:53:15 <reldred> aaaaaaaaaaaaaaa trying to test pr8480 and I'm missing all my jgrisms, where's my town roads aaaaa
09:54:19 <JGR> Even having one town growth GS with one non town growth GS would a useful start
09:58:08 *** Montana has joined #openttd
10:04:40 <andythenorth> petern: Yes but my parents live 3 miles from Rufford
10:05:00 <andythenorth> So I spent a lot of time watching the ford
10:05:27 <andythenorth> Rufford Ford is somewhat tautology but eh
10:06:12 <andythenorth> At least itβs harmless content π
10:06:37 <andythenorth> I might try combining arbitrary GS
10:06:37 <petern> reldred: That's why you need that town-road GS and also the challenge GS and also...
10:06:48 <petern> Do GS get to query what NewGRFs are active?
10:06:57 <andythenorth> I got stuck on pylons
10:07:05 <andythenorth> Yes they can check for grfs somewhat now
10:07:22 <andythenorth> FIRS gs knows which FIRS is active
10:07:38 <andythenorth> Thatβs about all it does π€ͺ
10:07:48 <andythenorth> Then pylons happened
10:08:24 <petern> Like, maybe you want graphics for NewDisasters but because we don't want to add more content it needs to be controlled by GS...
10:08:58 <petern> I should get back to my LINQ queries.
10:09:57 <andythenorth> I should make a GS
10:10:22 <andythenorth> But it takes 30 years to connect up FIRS Steeltown
10:10:39 <andythenorth> Then βboomβ restart from scratch because GS
10:11:09 <andythenorth> There might be a restart button somewhere for GS
10:14:48 <reldred> you could be out riding your bicycle, when suddenly you are hit by car. Boom. Gamescript.
10:15:48 <reldred> that should motivate peter to just delete them from the game entirely
10:16:12 <reldred> bad feature, disturbs me very sprites, and so forth
10:18:06 <reldred> playing pr8480 in the web browser, I miss all my secret .grf's π’
10:18:21 <reldred> and my grfs im too lazy to upload to bananas
10:20:00 <petern> Extended depots? Good gameplay or bad feature?
10:20:19 <reldred> I absolutely adore them
10:20:37 <petern> I would love for pathfinders to understand shunting yards ;D
10:20:59 <petern> So I can build a depot alongside tracks instead of perpendicular.
10:21:19 <reldred> well that's what I do with extended depots
10:21:19 <petern> You want that depot? Yeah, simple, just go past it then reverse...
10:24:38 <andythenorth> Pathfinder doesnβt build a graph that includes reversals?
10:29:17 <JGR> That isn't something that you want enabled indiscriminately
10:30:52 <petern> pathfinder_reverse_at_bufferstops
10:34:19 <petern> Biggest issue with previews is you get OpenGFX π
10:34:47 <reldred> who do I have to bribe for merge
10:34:51 <petern> Imma just click the approve button without reviewing...
10:35:19 <LordAro> petern: maybe you can get a new crankset out of it
10:35:35 <petern> Ooh I fancy a power meter!
10:36:23 <reldred> I mean it would certainly be a big shiny feature for 13.0 π
10:37:18 <reldred> for 14.0 just ship jgrpp, set the purchase price to $40 and bugger off to the islands of greece
10:40:28 <reldred> hmm, there's a bug with pathfinding on trains that's new since i last tested it
10:40:42 <reldred> if there's any obstructions the trains just go full red stop
10:40:49 <reldred> rather than hurry up and wait
10:46:59 <reldred> good thing you didnt smack that mf commit button
10:47:09 <reldred> (it's okay just fix it in prod wcgw)
10:48:51 <reldred> welp, throw it all in the bin then
11:00:45 <reldred> how do I get the save games out of the web cache thingie?
11:01:44 <LordAro> not actually sure you can...
11:04:01 <petern> I guess the standard file download / file upload features are way out of reach underneath the layers...
11:07:30 <FLHerne> petern: I love the extended depots
11:07:45 <FLHerne> an entire train vanishing into a single tile looks ridiculous
11:08:18 <reldred> Far out, found where Firefox keeps them, but the file is wrapped in a header and footer I'll probably need to clean out with a hex editor and at that point... I can't send that in good faith. J0anJosep I'll get back to ya on a save game, been using preview.openttd.org. Gonna hafta compile.
11:08:26 <FLHerne> so I build the old 'engine sheds' NewGRF stations around the depots, but they're not real
11:09:14 <reldred> Yeah I normally use the jgrpp drive through stations but there's no gameplay reason behind it, nothing forcing me to make parallel depots in a complex, etc.
11:09:22 <reldred> no actual length requirements
11:11:27 <FLHerne> not obvious what it's waiting on, spec was revised to frosch's advice and it seems to work
11:12:10 <FLHerne> someone who's a newgrf internals expert to review it, I guess
11:12:29 <reldred> do we have any of those?
11:12:48 *** gelignite has joined #openttd
11:12:55 <petern> Can I take BornAcorn's bridge graphics and make it work?
11:13:04 <petern> (Do I even still have them?)
11:16:44 <FLHerne> do we have any of those [who aren't totally fed up of grf features after NRT] might be the question
11:17:44 <FLHerne> petern: reminds me I owe you an apology for complaining about some NRT implementation detail for no good reason
11:18:00 <FLHerne> sorry about that, no sense of perspective :-/
11:19:22 <petern> Bad decisions eh? Goes it throw out NRT?
11:19:56 <LordAro> FLHerne: we should start adding milestones to these
11:20:26 <petern> I was on track with chunky bevels and then got distracted by the network chat window... Blah.
11:20:45 <petern> (Which does need scaling, but...)
12:14:00 <andythenorth> I should make an NRT grf
12:21:09 <petern> revert back to initial git commit.
12:27:24 <pickpacket> New road type: protected pogo stick lane
12:27:49 <pickpacket> Actually Freeway wouldnβt be a bad idea
12:33:43 <petern> Bah, making a td be d-flex means I can't align it, so... yet another child element needed π¦
12:43:10 <andythenorth> EmperorJake: HEQS 2 forthcoming
12:55:29 <EmperorJake> I look forward to foundry transporters that actually work with Steeltown
13:29:41 *** tokai|noir has joined #openttd
13:29:41 *** ChanServ sets mode: +v tokai|noir
13:36:24 *** tokai has quit IRC (Ping timeout: 480 seconds)
14:08:31 *** Flygon_ has joined #openttd
14:12:29 *** Flygon has quit IRC (Ping timeout: 480 seconds)
14:25:38 <pickpacket> I seem to be perpetually tired these days
14:28:39 <petern> It is tea (mug of) time.
14:28:46 <pickpacket> Whatβs a βfoundry transporterβ?
14:35:17 <EmperorJake> Big heavy vehicles used in steel mills to carry hot metal/ingots/slag
14:35:58 <EmperorJake> There's two in HEQS but they're useless because they don't work for any of the new Steeltown cargos
14:37:25 <andythenorth> βHEQS is finishedβ
14:37:58 <EmperorJake> HEQS is broken, the logging trucks don't even carry wood
14:38:33 <petern> Urgh, my second monitor just started spazzing out π¦
14:39:22 <petern> My other one of the same brand died not that long ago, just wouldn't turn on.
14:44:40 <petern> I have another 32" I need to set up but not quite enough room at the moment :/
15:04:58 <glx[d]> Usually power supply capacitors
15:06:23 <petern> They do make them difficult to get into.
15:19:32 <andythenorth> Split town trams and industrial trams?
15:31:55 <TallTyler> Town trams are in Road Hog?
15:33:23 *** Montana has quit IRC (Quit: Leaving)
15:33:48 <pickpacket> EmperorJake: are they used to transport anything from the steel mill to somewhere else?
15:34:43 *** Flygon_ has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
15:34:49 <EmperorJake> No they don't go on public roads generally
15:35:19 <EmperorJake> hence why they would be limited to an industrial NRT
15:48:20 <andythenorth> TallTyler: Yes. The town trams tend to be good for industry also though
15:48:30 <andythenorth> Some puzzles here
15:52:39 <petern> Argh, colour temperature mismatch π¦
16:16:10 <petern> 2 x 32" feels weird compared to 2 x 21" + 1 x 32", somehow.
16:21:15 <petern> Should I make my x1, x2, x3 scale labels be translatable? Probably rude not to. I'm just using std::string right now.
16:26:07 <andythenorth> TallTyler: Tramtype compatibility, more like π
16:28:50 <LordAro> this isn't my terminal
16:35:37 <andythenorth> I had a monitor once
16:37:58 <LordAro> i feel like i should be concerned with perl apparently exiting with error code 256
16:39:10 <petern> make -j 14 should be faster than this π¦
16:42:55 <LordAro> oh wait, it's system()
16:43:03 <LordAro> so the actual status is in the upper byte
16:43:10 <LordAro> all good, status 1 is expected
16:46:58 <andythenorth> petern: Compile in the cloud π€
17:04:35 <petern> Hmm, have I done something wrong? Timberwolf's 2x trains draw as scaled-up 1x in the new vehicles window.
17:04:48 <petern> Hmm, thinking about it that much be by design of the NewGRF.
18:01:34 <Timberwolf> Yes, they have unique purchase sprites, which aren't replicated in 2x.
18:01:55 <Timberwolf> Maybe I should fix that one day, this is classic "author doesn't use it personally so author couldn't be bothered" :D
18:07:43 <supermop_toil> ugh i need to drawn 2x RVs
18:08:10 <petern> Do you even need purchase-specific sprites?
18:08:46 <supermop_toil> i had to for RVs with trailers
18:08:57 <supermop_toil> and to show fuel type icon
18:10:53 *** debdog has quit IRC (Quit: Initiating getting-the-hell-out-of-here maneuver!)
18:21:09 <pickpacket> but payment rates there are "Initial cargo payment values are for delivering 100 pieces of cargo 1 tile. Payment goes up with inflation as the game progresses."
18:22:16 <pickpacket> how do I translate between those?
18:23:55 <frosch> there is a window in-game to plot that stuff as chart
18:24:04 <frosch> compare with other cargos, and experiment
18:26:33 <michi_cc[d]> frosch: Did you do anything on #9953 or is that blocked by something (including a general lack of time π )?
18:27:35 <frosch> the PR is "up-to-date"
18:27:50 <frosch> the PBS stuff turned out very confusing π
18:29:53 <michi_cc[d]> There might be some wrong stuff in there, who knows. I'm not very clear on the difference between `v->compatible_railtypes` and `GetRailTypeInfo(v->railtype)->compatible_railtypes`, so I'm not sure what the proper thing for PBS actually is.
18:31:41 <TallTyler> pickpacket: I started out just stealing values from FIRS
18:37:53 <pickpacket> I'm experimenting a bit now and adjusting based on the graph. I haven't set a penalty_lowerbound yet, but the graph shows a steep decrease in value after time anyway. How do I set it to no limit?
18:46:18 *** Wormnest has joined #openttd
18:48:22 <frosch> looks like a ms specific extension
18:49:22 <Bouke> JetBrains does similar things. It's quite convenient to share code style on a per-project basis.
18:49:58 <frosch> if only we would use a less exotic style, and we could use clang-format π
18:50:00 <Bouke> So yeah if this gets merged, expect CLion extensions at some point π
18:50:38 <Bouke> Well... maybe we should use a less exotic style?
18:51:16 <frosch> none of the formatters really support tabs, since noone uses that
18:51:26 <frosch> but replacing tabs with spaces really changes every single line π
18:51:55 <LordAro> i don't think tabs has ever been the issue
18:52:21 <LordAro> largely the fairly significant sections of manually formatted stuff, like all the window descs
18:53:22 <frosch> i recall i had problems with the indentation of comments
18:53:32 <frosch> which we do N*tab+1 space
18:53:53 <LordAro> i don't recall any issues
18:53:53 <frosch> but who knows, maybe false memories
18:54:08 <LordAro> /*\n * foo\n */ is fairly common
19:04:18 <TallTyler> pickpacket: By no limit do you mean you want the the value to start decreasing immediately (set to 0) or or decrease ever? (Not possible with the property, youβd have to use the profit callback and do the math yourself, but you could set it to 255 days and it wouldnβt decline for that period).
19:08:52 <DorpsGek> - Update: Translations from eints (by translators)
19:10:14 <petern> What bit is an MS-specific extension?
19:15:26 <Arastais> frosch: visual studio desktop/code do support clang-format actually
19:15:30 <Arastais> but idk about other ides
19:15:38 <petern> > Inserting an unescaped # or ; after non-whitespace characters in a line (i.e. inline) is not parsed as a comment
19:16:13 <frosch> petern: all the cpp-* stuff
19:16:45 <Arastais> Bouke: true, AFAIK most IDEs support the cpp stuff
19:17:27 <frosch> i never saw the cpp-* stuff in editorconfig π i only saw lots of .clang-format
19:17:52 <frosch> but i guess most editors will ignore unknown stuff
19:18:34 <frosch> funnily we do not set trim_trailing_whitespace or insert_final_newline
19:18:55 <frosch> even though they are in the spec
19:20:02 <pickpacket> now back to trying to draw black tile roofs for my teahouse sprite
19:20:54 <Arastais> unless you're referring to clang format
19:21:51 <frosch> oh, lol, i only looked at the diff in the PR, which starts at line 7 π
19:22:55 *** debdog has quit IRC (Quit: Initiating getting-the-hell-out-of-here maneuver!)
19:24:16 <Arastais> Like I said in the PR, I avoided putting comments on separate lines because it makes the whole file much harder to read in my opinion.
19:33:19 <frosch> did you or anyone else try an IDE other than msvc?
19:34:24 <petern> Hmm, weird, I have the VS Code editorconfig plugin, but it's not enabled. So how did it work? o_O
19:36:22 <petern> Just don't build them in the first place
19:36:48 <TrueBrain> frosch: JetBrains also support it; not sure they actually use the same syntax honestly
19:36:59 <Bouke> I don't have them, but I have the problem that they try to solve. Trains stop before merge, then merge and every train behind them then stops
19:37:35 <bigyihsuan> Bouke: i never understood these, how do they even work
19:37:35 <bigyihsuan> and can you recreate it using programable signals and realistic braking
19:38:09 <petern> From what I can tell they just move the stopping elsewhere
19:38:40 <Bouke> Well what I want is (I think) a parallel line, with a speed limit, that allow merging a few times, but the merge can only happen if the main line is clear.
19:39:37 <frosch> TrueBrain: i checked a few, they were all different :p
19:39:46 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
19:40:14 <TrueBrain> I think JetBrains and VSCode variants are mostly compatible
19:40:22 <TrueBrain> and those two combined make up most of the IDE market these days π
19:41:09 <petern> I don't miss vim much π
19:41:24 <frosch> so does vscode support it actually?
19:41:29 <frosch> that's what i asked π
19:41:58 <frosch> it looked to me like only legacy msvc support it
19:42:07 <TrueBrain> by accident I noticed yesterday that VSCode supports it; not sure to what extend
19:42:09 <TrueBrain> without extensions even
19:42:10 <petern> I use VS Code and it seemed to work.
19:42:28 <frosch> the vscode plugin does not, but the plugin may as well be deprecated and replaced with something built-in
19:43:10 <TrueBrain> it might be the C++ extensions btw
19:44:01 <frosch> ok, so the plugin is probably something old and deprecated then, last release 2021-04-08-22
19:44:29 <TrueBrain> yeah, the C++ extension seems to open .editorconfig too
19:44:43 <Bouke> Any ideas why my release build is failing locally?
19:44:45 <Bouke> Undefined symbol: GetSmallMapOwnerPixels(TileIndex, TileType, IncludeHeightmap)
19:44:56 <TrueBrain> I triggered that this weekend π
19:45:04 <frosch> TrueBrain: ah, that makes sense. a generic plugin, and a c++ specific one
19:45:46 <petern> That'll be why it worked for me without the editorconfig plugin then π
19:46:34 <petern> Sadly the Details for the plugin don't mention editorconfig, although the changelog does.
19:46:38 <TrueBrain> in other news: `docker` + `dockerd` binaries are HUGE, damn ....
19:48:18 <frosch> do they bundle a complete windows kernel?
19:48:41 <frosch> how large are windows containers these days? still full vm size?
19:48:53 <TrueBrain> no clue, haven't even touched that in more than a year π
19:49:24 <frosch> i guess everyone left that for azure to figure out :p
19:55:24 <Arastais> petern: vs code supports it nateively now, according to microsoft docs
20:00:13 <Arastais> TrueBrain: it seems jetbrains has some extra properties, but not to sure about this. Is there anyone who uses jetbrains who can test it? If hey are different I can just make a new section for it.
20:12:47 <petern> I'm building RelWithDebInfo, no issue here.
20:13:49 <petern> Hmm, but declaring the function inline when it's in a header seems wrong.
20:14:26 <petern> Or rather, implementation isn't in a header, but declaration is.
20:14:33 <Bouke> I'm building with Xcode, is that using a different compiler?
20:15:07 <Arastais> Bouke: whats the error? I didn't add/remove functionality just moved it
20:15:19 <petern> Remove the `inline` from line src/smallmap_gui.cpp:565
20:17:46 <Bouke> Arastais: Undefined symbol: GetSmallMapOwnerPixels(TileIndex, TileType, IncludeHeightmap)
20:18:55 <Arastais> petern: it was static inline before, i just removed the static to change the linkage, sine static imposes internal linkage. Ig I forgot to move the inline from the definition to the decleration
20:19:48 <Arastais> though IIRC in terms of the compliler it doesn't matter if its in the definition or decleration, it only matters for continuity
20:20:04 <Bouke> petern: now my build finishes, thanks!
20:20:16 <petern> You can't have inline declarations.
20:21:05 <michi_cc[d]> So why did the CI pass happily?
20:21:53 <JGR> The compiler may choose not to actually inline it if it's too big
20:25:47 <Arastais> petern: Are you sure? I know for a fact you can for member declerations, and I don't think the standard explicitly states it for non-members.
20:27:21 <Arastais> Bouke: Im fairly certain that the fact it's failing in release mode means that the compiler you're using is doing some improper optimizations. It shouldn't matter specifically to the compilier if the decleration or definition is inlined.
20:35:49 <Arastais> That would explain why the CI passes, becuase gcc, clang, and msvc optimize on their own
20:39:35 <michi_cc[d]> The header is non-inline and seen first, so this would apply.
20:50:03 <petern> It can only be inlined with LTO, and the compiler may inline any function it wants, so I wouldn't mark either as inline.
20:51:39 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:16:30 <LordAro> TrueBrain: statically linked go binaries gonna do that
21:17:05 <LordAro> frosch: yes, they are
21:17:46 <LordAro> well, nanoserver can get close to linux container size, but most windows applications don't work
21:19:31 <TrueBrain> LordAro: Never knew they were this big ...
21:21:08 <TrueBrain> Bit annoying, as it is ruining my plans, but okay .. there is always podman π
21:21:21 <TrueBrain> Also big, just not THAT big π
21:31:53 <glx[d]> michi_cc[d]: CI only use debug builds
21:34:41 <glx[d]> and nightly built fine too, but we are using macos-11 image, maybe it would fail with macos-12
21:54:19 <petern> Hmm, is there a nice simple way to remove non-English strings that I've removed...
21:55:59 <TrueBrain> Let eints do it π
21:56:54 <glx[d]> but yeah eints will remove them, and compilation will warn a lot until eints commit
22:03:29 *** felipedobri has joined #openttd
22:12:52 *** sla_ro|master has quit IRC ()
22:35:13 *** felipedobri has quit IRC (Remote host closed the connection)
22:36:14 *** gelignite has quit IRC (Quit: Stay safe!)
22:52:29 <glx[d]> when it's used by another function usually
22:54:59 <TallTyler> "Used by" in a different sense than simply being called within another function? This is the first time I've happened upon it in OpenTTD
22:56:08 <JGR> The typedef for FilterFunction is CDECL, so all instances must be as well
22:56:20 <JGR> It could be removed and all instances update just fine
22:56:32 <glx[d]> the main issue is for x86, as x86-64 uses an unique calling convention
22:57:24 <JGR> Even then, it's not an issue for functions of a fixed number of arguments
22:58:39 <JGR> Unless you're mixing calls across compiler/shared object boundaries
22:59:06 <glx[d]> I think it's from before GUIList introduction
23:06:26 <glx[d]> I remember sorters were also CDECL but that was in qsort era
23:20:25 <glx[d]> and we dropped CDECL from sorters with the switch to std::sort (CDECL was a requirement of qsort)
23:38:15 <petern> It's a left over, originally we used qsort() which is cdecl.
23:38:33 <petern> Oh right, Discord wasn't scrolled down :/
23:39:55 <glx[d]> filters never needed CDECL it seems
23:40:28 <petern> Probably not but someone C&P'd the style.
23:44:01 <glx[d]> ok let's cancel some actions run π
23:56:52 <Arastais> michi_cc[d]: `The inline specifier cannot`**`re-declare`**`a function or variable (since C++17) that was already defined in the translation unit as non-inline.`. It's not being redeclared, it's being defined. If it was actually against the standard to only have inline in the definition, the compilers would reject it. This excerpt is mostly talking about ODR (a good example is the point talking about rules for externally linked funct
23:56:52 <Arastais> cpprefernce page). Putting the inline in the definition and/or declaration (when there's only 1 definition) is allowed by the standard.
23:56:52 <Arastais> My point is that putting inline in the declaration, definition, or both doesn't affect the compiler. `inline` is a hint anyway, and in the end the compiler can do what it wants. It really comes down to coding style, because even when removing the `inline` the compiler may inline the function anyway. Of course, I can still make a fix commit if having inline in the definition only goes against OpenTTD's coding style (but IIRC its done
23:56:52 <Arastais> the function should not be marked/intended as inline.
23:58:44 <petern> It's wrong. We shouldn't hint a function as inline when it's used not-inline.
23:59:20 <petern> We use inline elsewhere, either all usage is contained within the same source file, or the inline definition is within the header file.
continue to next day β΅