IRC logs for #openttd on OFTC at 2025-02-10
⏴ go to previous day
03:55:44 *** Zathras has quit IRC (Ping timeout: 480 seconds)
03:55:49 *** godbed has quit IRC (Ping timeout: 480 seconds)
04:45:11 <DorpsGek> - Update: Translations from eints (by translators)
06:10:39 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:08:31 *** Speedy` has quit IRC (Read error: Connection reset by peer)
07:10:21 *** Speedy` has joined #openttd
07:16:00 <DorpsGek> - Add: summary for week 06 of 2025 (by OpenTTD Survey)
08:19:37 <andythenorth> I have had coffee
08:42:10 <Heiki> “Enabling this setting allows players to place town houses manually” – are there other houses than “town houses”?
08:57:49 <_zephyris> Some industry sets (might?) define house-like industries...
09:20:23 <andythenorth> hmm python has no coalesce operator
09:20:51 <andythenorth> lots of PEP 505 recently though, maybe it will get added
09:21:39 <andythenorth> a = [] if foo is None else foo
09:21:50 <andythenorth> b = 10 if ham is None else ham
09:22:00 <andythenorth> is not as good as
09:22:22 <peter1138> Oh, I added settings to the sandbox window so that placing houses could be put in there. It wnas't...
09:24:10 <andythenorth> wnas't is a good word though
09:36:26 <frosch123> andythenorth: `a = foo or []` `b ? ham or 10` work
09:42:56 <LordAro> frosch123: i got the impression that RB's change effectively did the same thing
09:44:05 <frosch123> i think he removed the usage of numeric_limits with enum. my change ensures it errors in the future
09:44:17 <frosch123> (it does not trigger with current master, so all is fine)
09:48:11 <andythenorth> frosch123: this is warned against by PEP 505, I think, there's some corner case with it
09:48:39 <andythenorth> might be relying on an implementation detail of how None is converted to truthiness, or something
09:49:02 <LordAro> andythenorth: last time i checked that sort was recommended
09:49:09 <LordAro> that sort of `or` usage*
09:50:30 <frosch123> pep 505 only mentions that `or` checks for `False` instead of only `None`
09:51:20 <frosch123> so, yes, `b = ham or 10` may not do what you want, if `ham == 0`
09:52:04 <andythenorth> yeah, ham can validly be 0
09:52:12 <LordAro> that's true, i'm not sure i'd use that sort of construct for non list/dict types
09:52:33 <andythenorth> I've started using @dataclass decorator, and it comes up more
09:52:39 <andythenorth> because defaults tend to None
09:53:23 <andythenorth> whereas `<dict>.get("foo", 10)` tends to cover that the key often just hasn't been set for null values
09:53:46 <andythenorth> python seems to be moving relatively quickly these days
09:54:00 <andythenorth> lots of new constructs, where in older times it seemed very conservative
10:02:06 <peter1138> frosch123, might be helpful, but the actual issue wasn't an enum, it was struct implementing BaseBitSet.
10:02:59 <peter1138> Generally everyone seems to say "don't specialise it", but I think the default is clearly dangerous.
10:04:41 <frosch123> oh, right, CompanyMask is no enum
10:05:24 <frosch123> yeah, then it's not useful
10:07:38 <peter1138> talltyler, was players placing houses in game for a free meant to be a sandbox setting?
10:09:26 <frosch123> PR says `Since this is a "sandbox option"`
10:10:07 <peter1138> IIRC it was waiting on my change too :)
10:23:29 <blathijs> _glx_: WHat's up with nml releases? It seems there is a 0.7.7 tag in github.com/glx22/nml, but it is not in github.com/OpenTTD/nml ? Also, neither seems to have 0.7.6?
10:24:43 <peter1138> If it's in his own repo it'll (probably) be a workflow test.
10:29:19 <xarick> every day I look at Online Content for new AIs and there's never anything
10:30:53 <blathijs> peter1138: Ah, that might make sense. Would be nice to get a release out for nml, since master has a fix for a build failure merged that I would like to get into Debian (and updating upstream version is slightly easier than backporting the fix)
11:08:16 <xarick> is it possible for Scripts to print cargo items
11:09:00 <_zephyris> I realise that this is my fault... But any chance of a better way to provide cursors?
11:09:27 <_zephyris> eg. provide a sprite onto which the icon can be overlaid:
11:10:22 <_zephyris> I also realise that the barely visible OpenGFX1 cursor is my fault...
11:18:56 <peter1138> Empty cursors of a couple different sizes?
11:20:55 <peter1138> The original cursors are all different shapes so that they don't get in the way of construction.
11:21:30 <peter1138> OpenGFX 2 doesn't follow that.
11:25:48 <_zephyris> Yup, I'd thought the same... There are kinda 5 cursor types, general, `|`, ,`/`, `-`, and `\`. Could provide those 5, with a gap for the icon in a consistent spot.
11:26:59 <peter1138> If the system is purely sprite-based then there's no way to changing the position of the subsprite for different basesets.
11:27:38 <_zephyris> Yup, they'd all have to cope
11:28:03 <_zephyris> I have less sympathy for baseset authors than newgrf authors
11:28:15 <peter1138> Is that because it's basically you?
11:28:25 <_zephyris> And I'm masochistic
11:28:39 <_zephyris> But I think it's a reasonable imposition on a base set
11:29:15 <_zephyris> It's not hard. For the OpenGFX1 style cursor, just put the icon at different positions floating in space around it - that'd work fairly OK
11:31:02 <_zephyris> Not sure exactly how it'd fit with the newGRF spec. Rail asks for 16 UI icons, but I think you can just provide a subset of those. So if sprites 1-8 are provided, use the icon overlay on provided cursor, if 9 to 16 are provided, use the NewGRF-provided cursor
11:31:17 <_glx_> blathijs: Yes it's for workflow testing , and it's 0.7.7 because 0.7.6 is the branch for the update changelog PR
11:36:29 <_glx_> _glx_: I have a working improved instance handling using type tags, just need to tidy it
11:56:50 <talltyler> peter1138: Yes, but I opened it before you put those in the cheat window and forgot to update. Will PR today. 🙂
11:57:04 <peter1138> Yeah we all forgot in the subsequent reviews :-)
12:22:32 <blathijs> _glx_: Any expectation for when the next nml release will be?
12:51:04 <talltyler> peter1138: Dropdown settings are broken in the Sandbox Options 😦
12:51:48 <peter1138> Makes sense, wasn't... exactly tested.
12:52:24 <talltyler> When I click on the down arrow it highlights the left button of the first item in the Sandbox Options list, although it does cycle the intended setting as well… 🙂
13:06:53 <peter1138> I guess I only tested boolean toggles.
13:19:14 <xarick> let AIs build houses, for a price, and a cost of town rating
13:19:38 <peter1138> GS should be able to place houses. Not AI>
13:20:10 <xarick> make it cost a bit like building an industry
13:20:16 <talltyler> AIs don’t need sandbox features
13:20:21 <peter1138> Then it will conflict with the careful design of NewGRF sets :)
13:38:36 <_zephyris> It's not a _bad_ idea, but cost of house building and ability to build outside of sandbox should (probably?) be a NewGRF-settable property of houses.
13:38:45 <_zephyris> ie. much bigger than a fun sandbox tool
13:40:48 <xarick> dear... probably _glx_ , can we/I have the version printed next to the AI in the AI Settings window, not just in the Available AIs?
13:43:44 <peter1138> Hmm, this "you probably clicked in the right place, let's fire up some action" system is a bit annoying.
13:44:30 <peter1138> truebrain's network client list approach is a bit better, it at least has some state of what buttons are present.
13:47:18 <xarick> oh, GS's actually don't load the version specified, bug found
14:05:52 <talltyler> _zephyris: Yes, at the very least house spec needs a cost property, like objects. But I’ll let somebody else be motivated to add that themselves. 😉
14:06:27 <talltyler> I turned on Infinite Money the moment it hit nightly and haven’t touched it since 😄
14:17:36 <frosch123> Do houses have badges yet?
14:18:37 <peter1138> In master, no, in the badges branch, yes.
14:19:40 <frosch123> GS could select houses via badges. There is no meaningful identifier otherwise.
14:24:56 <peter1138> Also needs more work in the varact2 department as currently you can only query... your own badges.
15:13:56 <xarick> a quarter is 3 or 4 months?
15:14:22 <dwfreed> how many months are in a year
15:14:39 <dwfreed> so I think you can answer your own question
15:15:11 <LordAro> which is more, a quarterpounder burger or a 1/3 pounder burger?
15:16:27 <xarick> WormAI takes too long to load
15:17:29 <xarick> how many months in 25 quarters
15:19:21 <DorpsGek> LordAro: 8.333333333333334
15:19:49 <talltyler> Is that an economy quarter or a calendar quarter?
15:20:23 <talltyler> Ooh, we should add Fiscal Years to OpenTTD that start in July for some reason
15:21:38 <talltyler> And push-pull trains that get destroyed when they hit vehicles at level crossings, if the locomotive is not leading 😛
15:21:53 <talltyler> Anyhow, this has been your daily dose of Bad Features
15:22:51 <dwfreed> talltyler: s/Bad/Good/
15:29:25 <xarick> are disasters available when wallclock time is running?
15:29:51 <xarick> can't recall seeing a zepeliner crashing
15:43:05 <xarick> I got a new table in the works
15:45:15 <xarick> need to wait 6 years for the worst quarter become different than £0
15:48:43 <talltyler> Disasters shouldn’t be affected by timekeeping
15:51:27 <xarick> we might have used "contos"
15:51:51 <xarick> 4,698 contos, without $00
15:52:37 <xarick> looks like the 00 was a bad idea
15:52:58 <andythenorth> talltyler: Australia
15:53:15 <andythenorth> peter1138: do industries have badges yet?
15:53:32 <andythenorth> hmm if FIRS could badge [the map]
15:53:39 <andythenorth> GS would know which FIRS economy it was
15:54:36 <peter1138> andythenorth, always did have.
15:55:07 <andythenorth> did anyone add them to FIRS?
15:55:26 <peter1138> Without the varact2 department being sorted, there's not much that can be done with it.
15:55:44 <andythenorth> it's not a burning desire 😛
15:55:56 <andythenorth> I am refactoring my refactor of my refactor of Horse
15:56:17 <peter1138> I wonder if the per-feature graphics support is a waste of time.
15:56:36 <peter1138> Probably is, because the last badge definition will replace everything, not add to it.
15:56:41 <andythenorth> just changing all the Horse core python classes, and the pipeline for instantiating them, and the control flow, and the templating
15:56:52 <andythenorth> "change one thing at once"
15:59:52 *** Wormnest has joined #openttd
16:12:14 <xarick> How useful would be a table with company expenses
16:12:32 <peter1138> The inlining destructor breaks std::unique_ptr stuff is, indeed, annoying.
16:13:14 <andythenorth> oh maybe it's cargo slot ID pitchforks
16:14:15 <peter1138> "Does it work in nightly OpenTTD"
16:14:35 <peter1138> If so, slap a "design for OpenTTD 15 label" on it ;p
16:25:31 <xarick> I stopped that Aircraft competition
16:25:39 *** gelignite has joined #openttd
16:26:13 <xarick> I'm also pleased to know my GS can successfully add more tables without ruining the previous ones
16:26:43 *** toktik has quit IRC (Remote host closed the connection)
16:27:19 <xarick> the competition itself, I'm disappointed only some AIs aim for 5k aircraft
16:27:50 <xarick> this was also a time frozen competition
16:51:40 <xarick> something I've been willing to do for some time is a table showing the number of vehicles per type per company
17:08:10 <peter1138> Today is Sweetmorn, the 41st day of Chaos in the YOLD 3191
17:22:08 *** HerzogDeXtEr has joined #openttd
17:25:27 <xarick> hmm GROUP_ALL and friends have disappeared from the documentation
17:28:50 <xarick> oh, only enums get listed in the doxygen?
17:30:15 <LordAro> xarick: that's worth a bug report
17:39:34 <_glx_> I'd assume doxygen does the right thing
17:40:00 <Rubidium> though there are some awkward scripts in between doing things
17:40:34 <_glx_> oh could be the filter indeed
18:39:15 <andythenorth> hmm did anyone decide if @property is wrong in python or not?
18:39:34 <andythenorth> it's pretty much idiomatic in most examples of class hierarchies
18:39:41 <andythenorth> but some dude in 2011 didn't like it
18:42:48 <merni> I think you answered your own question
18:43:33 <xarick> if a vehicle and a station were colours, what would they be
18:50:08 <xarick> I'm not getting the number of vehicles in a group... hmm is it a me problem? let's find out
18:50:48 <xarick> yeah, it's a I'm stupid problem
18:50:57 <xarick> didn't enter company mode
19:11:29 <frosch123> andythenorth: Property is fine for returning derived/computed values. Just don't use it to return attributes as it.
19:12:08 *** kuka_lie has joined #openttd
19:12:49 <frosch123> The bad reputation of properties comes from java/c++: there was some time when all attributes were accompanied with trivial getters and setters
19:21:16 <peter1138> Java loved getX() and setX() methods.
19:23:26 <truebrain> and everyone hates Java because of it 😛
19:30:40 <andythenorth> I use property a lot where there are subclasses which vary an attribute return value from what the base class does
19:31:45 <andythenorth> It’s easier to do MRO on methods than faff around figuring out whch attributes go before or after super()
19:32:21 <peter1138> All these changes recently making lots of conflicts :)
19:33:17 <andythenorth> as I understood it, python craftspeople think all @decorator is bad and unpythonic
19:33:23 <andythenorth> although it's now core and idiomatic
19:50:27 <xarick> Rubidium, don't forget neutral stations
19:51:26 <xarick> the Owner of something isn't necessarily a Company
19:52:19 <peter1138> Hmm, newgrf.h depends on economy_type.h, but I need to use something from newgrf.h in economy_type.h... :S
19:55:07 <xarick> the array here is including oil rigs which have OWNER_NONE, but you seem to be including more owners than necessary in the array
19:57:58 <xarick> it's probably fine anyway
19:59:11 <peter1138> OwnerMask vs CompanyMask or something
20:06:41 *** kuka_lie has quit IRC (Quit: Lost terminal)
20:07:12 <frosch123> andythenorth: Seems like you like contacts with weird people. Also explains why you are here
20:07:28 <andythenorth> I have a diagram 😛
20:08:14 *** Flygon has quit IRC (Read error: Connection reset by peer)
20:16:23 <xarick> I forgot how GSText works again
20:20:33 <xarick> What have I done here?
20:22:36 <xarick> i think I done this for save/load reasons
20:23:07 <peter1138> Hmm, do houses have animation triggers... I suppose they do not.
20:23:28 <_glx_> yeah instance are not saveable
20:24:01 <andythenorth> "pickle problems"
20:24:24 <_glx_> hmm but with #13522 it might be possible to add some kind of support
20:25:38 <xarick> ah, concatenated strings
20:25:54 <xarick> ret.AddParam(GetText(param)); recursive even
20:26:24 <_glx_> the limit is 20 params in total for the whole string
20:27:04 <peter1138> "I have a patch for that" :D
20:27:28 <andythenorth> I worked out GS once, but now I've forgotten it 😛
20:27:48 <peter1138> You were busy bombing the map.
20:27:51 <truebrain> lol, so I am toying with that Google tool to improve includes ... it .. does not like ... `network_command.cpp` .. like, at all. Weird. Nothing to do with the content of that file, I am sure 😄
20:27:52 <andythenorth> oh you just have to assume all state is disposable, except primitive types in a root table
20:27:57 <andythenorth> easiest way to do it
20:28:19 <andythenorth> then book-keep that in any loops
20:28:37 <peter1138> truebrain, it has a lot of includes which aren't needed, you mean?
20:28:44 <andythenorth> it's kind of weird because everything is just a table
20:28:49 <truebrain> no, it has a very very very long include-tree 😄
20:28:51 <andythenorth> but classes can't be serialised/deserialised
20:28:55 <andythenorth> but they're just a table
20:29:09 <truebrain> 5GB RAM in use and counting
20:29:29 <truebrain> 7GB ... do I want to know how deep this tree is 😄
20:30:10 <peter1138> This guy keeps spelling Integrations with two 'r's :S
20:31:11 <truebrain> 3 minutes in, 15GB of RAM in use .. ah, there we go
20:31:37 <truebrain> wow, lot of include files can be removed from that file
20:32:47 <truebrain> just imagine the compile-time difference
20:33:02 <truebrain> okay, it doesn't understand safeguard.h, and I can't make it understand .. hmm
20:34:44 <peter1138> They're all _cmd.h files, hopefully it's not part of the templating magic that they have to be included...
20:35:39 <peter1138> Still needed, despite what clang saying.
20:36:21 <truebrain> my clang language server is still trying to understand the file
20:36:24 <truebrain> it uses 30GB of RAM already
20:36:31 <truebrain> there is a limit to what my machine can carry 😛
20:37:41 <yiffgirl> going on a trip tomorrow and already packed my laptop so can't do any programming tonight. gah
20:40:37 <peter1138> Don't worry, we're not going anywhere.
20:42:37 <truebrain> okay, and it has some real trouble with `../` includes .. as in, it keeps them if they are already correct, but new ones are introduced by their absolute path
20:44:46 <_glx_> with some includes "magically" being for `generate`
20:45:13 <truebrain> things in the include-path it resolves correctly; so there is that 🙂
20:45:50 <truebrain> where do we include fmt? Hmm
20:46:03 <_glx_> no, it's in stdafx.h and precompiles
20:46:08 <peter1138> Damn, and I'm hitting more dependency issues. I don't really want to add newgrf_* all over the place (although much of it already is)
20:46:26 <truebrain> "no" is a rather invalid answer, as something is including it somewhere 😄
20:47:51 <_glx_> that's the main point for precompiled header
20:47:52 <truebrain> sometimes we include `3rdparty/fmt/format.h`
20:48:03 <truebrain> but not often enough that it could cause every file to know `fmt::format`, I think
20:48:44 *** gelignite has quit IRC (Quit: Stay safe!)
20:50:26 <truebrain> okay, `error_func.h` includes fmt .. would that be the reason most files know it?
20:50:38 <_glx_> ah seems we don't include fmt in stdafx.h
20:51:11 <truebrain> It is always nice if someone asks: "where", the answer is "no" 😛
20:51:28 <truebrain> but okay, it seems the actual answer is: "it is complicated"
20:51:50 <truebrain> explains why I get so many requests to add "fmt/core.h" 🙂
20:52:21 <_glx_> would make sense to include it in stdafx.h
20:53:19 <truebrain> I think Rb benchmarked that, and the results were not in favour of doing that
20:53:32 <_glx_> maybe also include debug.h there (I always have to include it when adding Debug() for testing)
20:54:17 <peter1138> The fact you need to include it to add Debug() for testing is a good thing, it means it isn't everywhere :)
20:54:54 <_glx_> fmt::format is everywhere
20:55:49 <_glx_> ha debug.h provides fmt
20:56:12 <truebrain> okay, we mostly debated of fmt.h should be in PCH
20:56:17 <truebrain> not if it should be in stdafx.h, it seems
20:56:33 <truebrain> anyway, I like the google approach: if you use an include, mention it
20:56:37 <truebrain> don't assume someone else does it for you
20:56:37 <_jgr_> With including fmt everywhere/PCH, it might be worth considering whether you still want to define FMT_HEADER_ONLY
20:57:21 <peter1138> truebrain, yes, shame that my tooling assumes it's not needed if it's visible via other headers :(
20:57:26 <peter1138> And that's clangd too.
20:57:32 <peter1138> Maybe it's configurable.
20:58:20 <truebrain> we could run this tool during CI, but there are a few files where it won't work for .. those that make heavy use of ifdef 😛
20:58:34 <truebrain> one can wonder if we shouldn't make that code less depending on ifdefs 😛
20:58:44 <truebrain> _jgr_: why you say so? Faster? Smaller binary? 🙂
20:58:53 <truebrain> peter1138: bootstrap is a nice example
20:58:56 <truebrain> emscripten is another weirdo
20:59:35 <_jgr_> truebrain: Fast compiling, repeatedly instantiating all the internal fmt stuff in every translation unit is not really necessary
21:00:20 <peter1138> Hmm, yeah, that's a big chunk. I'd say the different parts should be in different files.
21:00:40 <truebrain> yeah, it really should
21:00:43 <peter1138> What is it that C++ modules do? Apart from break the world.
21:00:55 <truebrain> I wonder if we actually still need safeguard.h
21:01:41 <peter1138> Oops, accidentally finished the pizza.
21:01:48 <peter1138> No cold pizza for breakfast :(
21:01:57 <peter1138> Unless I... cook another one? hehe
21:02:11 <truebrain> okay, pretty sure CodeQL prevents a lot of those safeguard entries
21:02:27 <truebrain> `errno` will be the only one that won't be caught, I imagine
21:03:10 <xarick> how do I avoid my tables to look ridiculous
21:03:12 <truebrain> the reason I am wondering about this file, is because it will be nearly impossible to learn any tooling about this oddity of ours 🙂
21:04:58 <truebrain> we have two `core.h` files in our repo 🙂
21:05:11 <truebrain> owh, the times that MSVC would bark when you tried that 😛
21:05:54 <frosch123> Most recent estimate from cppcon: modules may be production-ready in 6 years
21:06:18 <frosch123> It's almost as vague as carbon
21:06:54 <peter1138> It's what happens if I leave a pizza in the oven too long.
21:07:15 <frosch123> Google's attempt at an c++ successor language
21:07:39 <peter1138> Ah yes, I keep forgetting that C and C++ are dead.
21:07:39 <truebrain> didn't Zig win by now?
21:08:02 <peter1138> There's no Zig For Linux is there?
21:08:08 <peter1138> Rust won that that. For now.
21:08:44 <frosch123> Yeah, it's weird. I also expected zig in the kernel instead of rust
21:09:01 <truebrain> I doubt Rust will be in the kernel for much longer 😛
21:10:26 <peter1138> The policy was "don't brigade on social media" not "no rust"
21:10:43 <peter1138> The guy deleted his account though.
21:10:55 <frosch123> The last 3 days there were a lot of HN posts about rust catching up to ADA
21:11:18 <truebrain> that feels like a really low bar .. to compete with ADA? 😛
21:12:04 <frosch123> Formal correctness and stuff
21:13:23 <truebrain> we do manage to confuse this tool in some places ... `#include "core.h" // for compile_string_to_view` .. that function is not in that file ...
21:13:52 <peter1138> headers might need restructuring again, tbh.
21:14:12 <frosch123> Currently rust gains pattern types, which allow declaring integers which disallow certain values like zero or negative 0x80... (the value which you can't negate)
21:16:22 <frosch123> Can we make use of more forward declarations? Or do we follow the Google style of no incomplete types?
21:16:44 <truebrain> this Google tool does introduce forward declerations of structs a lot
21:16:56 <truebrain> it doesn't make anything more readable or maintainable 😛
21:17:11 <truebrain> (so there is a setting to disable that)
21:20:27 <truebrain> so there is a contradictory somewhere 😄
21:21:21 <truebrain> (mind you they point to your link as "some coding standards .." 😄 )
21:21:48 <peter1138> Forward declarations are a bit of a pain tbh.
21:22:04 <truebrain> no documentation, hard to find all cases, easy to mess up, doesn't work with templates
21:22:07 <truebrain> yeah, they are bleh 😛
21:22:44 <johnfranklin> I wonder how WenSim could master git system from zero in just one year.
21:23:31 <peter1138> git isn't all that complex.
21:24:01 <johnfranklin> Practice without guide results in wrong knowledge
21:24:09 <peter1138> So don't practice without a guide.
21:24:40 <truebrain> `window.cpp` needs 60 (!) lines of includes, if you don't want transitive 🙂
21:27:46 <truebrain> the link between cpp and header file also isn't always as clear cut
21:28:23 <johnfranklin> Nearly all guides of git are in English, and I usually start falling asleep in front of huge-content non-general English pages 😦
21:28:50 <LordAro> truebrain: i heard ada
21:29:15 <truebrain> like what is the headerfile of `story_gui.cpp` ? base? type? cmd? Neither? 😄
21:29:42 <peter1138> All of the above :)
21:29:47 <_glx_> nobody knows all of git I think
21:29:48 <LordAro> frosch123: ikr, don't normally get more than one article mentioning ada every few months
21:29:52 <johnfranklin> I bought of book in Chinese language named “Master Git”; however it is 9000km apart from me
21:30:19 <LordAro> you don't need to learn the manual before using something
21:31:07 <_glx_> I often look at help files when I need to do "unusual" stuff
21:31:16 <_glx_> then I immediately forget it 🙂
21:31:33 <LordAro> there's a reason i used 'learn' rather than 'read' :p
21:31:34 <frosch123> johnfranklin: Search YT for "git for 4 year old and up"
21:31:51 <johnfranklin> Thanks, it seems programming is not like exams
21:31:54 <peter1138> You should not attempt to "master" it.
21:32:06 <peter1138> You just learn the basic operations and start using it.
21:32:18 <_glx_> the only thing to master is to use the documentation
21:32:21 <LordAro> peter1138: you mean you haven't mastered C++?!
21:32:55 <_glx_> powershell without get-help would be a pain
21:33:01 <peter1138> You don't master things by reading guides. You have to actually do it at some point.
21:33:07 <LordAro> pretty sure Stroustrup doesn't claim to have mastered C++
21:33:22 <LordAro> in fact i'm pretty sure he claims that he hasn't
21:35:46 <johnfranklin> I "did it" today, polluting PR by commits I didn't understand 😦
21:35:46 <johnfranklin> Basically one person had a PR with conflicts to solve
21:35:46 <johnfranklin> And I tried to solve these conflicts, but failed, and polluted the PR
21:36:20 <FLHerne> this helped me to understand git, but I was used to svn, so I don't know if it's helpful if you aren't used to svn
21:36:31 <FLHerne> nor indeed if you aren't me
21:37:00 <LordAro> resolving conflicts without introducing commits is firmly in the "more advanced" category
21:37:45 <peter1138> (Also, using github isn't the same as using git.)
21:38:21 <peter1138> Conflicts are simpler to resolve when you throw away the rule that says never rebase.
21:39:20 <xarick> how to optional strings
21:39:47 <johnfranklin> FLHerne: off topic: why can strawberry pizza be bad, given pineapple pizza popular?
21:39:48 <andythenorth> there are styles of learning
21:39:52 <andythenorth> and styles of education
21:40:27 <andythenorth> which sometimes connects to 'knowledge'
21:40:27 <FLHerne> I don't know, I've never experienced strawberry pizza. Pineapple pizza is a mistake though.
21:40:38 <andythenorth> and sometims connects to 'play stupid games, win stupid prizes'
21:41:40 <LordAro> what's the phrase? knowledge is knowing that tomato is a fruit, wisdom is knowing not to put it in a fruit salad
21:41:48 <xarick> oh, the log is printing stuff
21:42:29 <andythenorth> what is avocado?
21:42:42 <peter1138> johnfranklin, were you trying to fix the conflicts in github?
21:43:11 <johnfranklin> I was also trying in git client, and GitHub Desktop
21:43:21 <johnfranklin> but I caused a mess
21:44:10 <johnfranklin> This was partially due to a long-term mistake 1.5 years ago, when I put a .xlsx spreadsheet into the repo
21:44:20 <andythenorth> You can strip that
21:44:21 <peter1138> Yeah, basically, learn git for normal simpler operations first, get familiar with it...
21:44:46 <andythenorth> GPT is pretty good at giving you pasteable git prompts for common scenarios
21:44:52 <andythenorth> better than stack overflow anyway
21:45:05 <andythenorth> helps if you know git, and when not to trust GPT
21:45:26 <_jgr_> I would be a bit wary of posting git commands I don't understand into my terminal
21:46:08 <andythenorth> it gave me one yesterday that was applied to all refs 😛
21:46:13 <andythenorth> I ctrl-ced that one
21:46:18 <johnfranklin> Oh, and I remember I did the same thing half a year ago in VS Code with git extension, and succeeded, but this time I failed
21:47:55 <andythenorth> if you don't `push -f` and/or you keep a local copy of your checkout, it's hard to really mess up git
21:49:03 <LordAro> occasionally i have to help people sort out conflicts caused by tortoisegit
21:49:07 <andythenorth> but anything interesting pretty much requires push -f 😛
21:50:14 <_glx_> if the included string consumes 2 params
21:50:58 <xarick> if there's 0 vehicles of a type, it uses the NONE
21:52:12 <johnfranklin> it is said "switch/restore" can replace checkout
21:53:12 <peter1138> If you are new, just use switch or restore.
21:53:50 <andythenorth> pff refactoring yak-shaving
21:54:16 <andythenorth> I have about 60 subclasses of a base classes, and between them they handle about 30 optional kwargs passed at __init__ in kwargs
21:54:36 <andythenorth> but I got bored of kwarg unpacking and assignment
21:54:45 <andythenorth> and some sketchy modifying of kwargs before calling super()
21:54:56 <andythenorth> so I've moved them all into a class, which can sort it out
21:55:06 <andythenorth> but now I have to change all the unpacking
21:55:11 <andythenorth> and I don't trust GPT to do it
21:56:45 <andythenorth> I don't have unit tests, I have to just hope the bytes match in grfs when I compare from before / after revs 😛
21:57:15 <xarick> the string system is very confusing
22:01:32 <xarick> where is the documentation about {STRING}
22:04:42 <andythenorth> one more kwarg before sleep? 😛
22:04:49 <andythenorth> that's how I put bugs in
22:07:26 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:17:35 <xarick> do i need a combination of strings for every case?
22:23:10 <_glx_> SetText(GSText.STR_INCOME_TABLE_TRAIN, [ num_trains, num_train_stations ]) <-- don't pass an array, just put the parameters
22:24:04 <_glx_> oh SetText is one of your functions
22:25:03 <_glx_> anyway I think it will warn but the output should be correct
22:32:36 <xarick> maybe STR_INCOME_TABLE_NONE need something
22:34:50 <xarick> what does {RAW_STRING} do
22:40:43 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:48:10 <xarick> it kinda works, but it's not aligned
22:49:13 <xarick> STR_INCOME_TABLE_NONE_STRING : {STRING}{STRING}
22:49:13 <xarick> STR_INCOME_TABLE_NONE :
22:49:33 <peter1138> Whoop, the original step(s) now merged :D
22:50:33 <peter1138> #13527 reduces my binary size by... a lot.
22:51:13 <peter1138> EncodedString makes it go back up though ;-)
22:52:21 <peter1138> (Especially as it's not merged, heh.)
22:52:35 <xarick> oh rats, it fails again
22:53:32 <xarick> nevermind, looking at the wrong openttd
22:55:22 <LordAro> peter1138: that's a lot
22:55:42 <xarick> I had to remove a space between `:` and `{STRING}` here:
22:55:42 <xarick> > STR_INCOME_TABLE_NONE_STRING :{STRING}{STRING}
22:56:39 <peter1138> ~230 before to ~135 after
22:56:58 <peter1138> xarick, yes, everything after the : is part of the string.
23:01:27 <xarick> I will no longer need a 16 core cpu to compile openttd?
23:01:34 <peter1138> Oh, ReferenceThroughContainer is a bit awkward. You'd not meant to inherit from std containers.
23:02:46 <Rubidium> I can leave it out for a few hundred explicit .base() calls
23:04:18 <peter1138> Well, it's already in master.
23:05:36 <Rubidium> can also leave it as is for now and remove it once all the changes have been merged, so I'm keeping these PRs smaller (just like with the constant INVALID/END/FIRST/BEGIN constants)
23:06:09 <peter1138> Well, it'll work, it's just a bit "naughty" :)
23:06:15 <Rubidium> can also make it a real adapter by (re)implementing all needed functions
23:06:17 <peter1138> And yes, lots of .base() everywhere is a fain.
23:06:43 <peter1138> That... was not just the wrong key, it was the wrong hand...
23:07:37 <peter1138> Rubidium, probably best to forget I said anything, and we can clean up inheritance later ;)
23:07:54 <peter1138> (There are already other classes doing such inheritance, so it's nothing new.)
23:08:57 <peter1138> Although one issue with ReferenceThroughBaseContainer is it'll accept anything through base, not just the intended type. Not a huge issue mind you.
23:09:29 <peter1138> xarick, circle the bit left to it instead. That'll be a clue.
23:13:17 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:14:45 <xarick> anyway I have a problem to solve, only a video can tell the problem
23:16:30 <xarick> these windows are crazy resizing all the time
23:18:02 <xarick> not sure who exactly is the problem, may be me
23:18:13 <_glx_> they adapt to the content
23:18:31 <xarick> I don't have much control over it
23:21:42 <_glx_> it looks like you don't use GSAsyncMode() for the updates
23:22:02 <xarick> i'm keeping it compatible with some old api
23:22:41 <xarick> then again i have no way to know how many ppl use it
23:23:20 <_glx_> async is in 14 so it's not an issue
23:24:00 <xarick> function GetAPIVersion() { return "13"; }
23:25:08 <xarick> also, this script is intense!
23:25:27 <xarick> uses Valuate all the time, eats performance
23:25:44 <xarick> but i could try AsyncMode
23:25:44 <peter1138> Don't waste your time deliberately not using current features.
23:41:55 <_glx_> AsyncMode is ideal for bulk GUI updates
23:47:48 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:53:35 <peter1138> Hmm, I guess ShowNewGRFError is not called often enough to worry about using a vector instead of an array.
continue to next day ⏵