IRC logs for #openttd on OFTC at 2025-02-04
โด go to previous day
00:26:07 *** Wormnest has quit IRC (Read error: Network is unreachable)
00:26:42 *** Wormnest has joined #openttd
01:45:21 <peter1138> Hmm, AirportTileSpec::animation_special_flags seems to be read-only.
03:45:43 *** Wormnest has quit IRC (Quit: Leaving)
04:02:41 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:42:47 <DorpsGek> - Update: Translations from eints (by translators)
05:25:08 *** D-HUND is now known as debdog
06:11:19 *** keikoz has quit IRC (Ping timeout: 480 seconds)
08:21:41 *** wensimehrp has joined #openttd
08:24:05 <debdog> password not recognised. try again
08:27:32 <johnfranklin> Password is `lunch`
08:28:39 <andythenorth> hmm, still didn't find a token name I can use in my compile for "buyable train"
08:28:56 <andythenorth> `vehicle` is overloaded in OpenTTD / grf terms
08:29:16 <andythenorth> I've been using `consist` for years, but it conflicts with OpenTTD / nml's definition of `consist`
08:30:36 *** HerzogDeXtEr has joined #openttd
08:30:39 <LordAro> debdog: i think that's the only scene of rick & morty i've ever seen
08:31:52 <debdog> oh my, you must have felt so lost with all the pickle rick memes back then :D
08:35:17 <truebrain> LordAro: maybe spend a few more words on an opinion, so you can convince people one way or the other ๐ ๐
08:35:35 <LordAro> convincing people wasn't my intent :p
08:40:00 <debdog> SigHunter leaving right now must be pure coincidence
08:41:06 *** SigHunter has joined #openttd
08:41:36 <andythenorth> ok, in my compile, what can I call a train vehicle that is buyable in the buy menu?
08:41:39 <LordAro> peter1138: that is a fun thread
08:45:08 <peter1138> andythenorth, vehicle.
08:46:23 <peter1138> template <typename T> concept ConvertibleThroughBaseOrWhatever = std::is_convertible_v<T, int64_t> || ConvertibleThroughBase<T>;
08:46:30 <peter1138> I need a better name for this concept please :D
08:48:31 <andythenorth> peter1138[d]: that leads to vehicle.vehicle in the templating
08:49:05 <andythenorth> fundamentally I'm trying to hide and never think about that nml composes vehicles from vehicles
08:50:55 <andythenorth> oof I think I copied 'consist' into Horse from Road Hog
08:51:06 <andythenorth> because for RVs, I can use 'consist'
08:51:23 <andythenorth> because the 'vehicle' is also the consist
08:53:22 <truebrain> LordAro: isn't that traceback only showed when an installation doesn't have all the required scripts in place? Isn't that a highly unusual situation to be in? (I might be missing your point ๐ )
08:53:40 <ahyangyi> andythenorth: "train"?
08:53:50 <ahyangyi> which is wrong, but does it matter?
08:54:16 <andythenorth> what does varact 2 parameter 81 mean for articulated vehicles?
08:54:28 <andythenorth> I abstracted around all that stuff years ago
08:54:36 <ahyangyi> The whole, composed thing does not exist in a newgrf anyways.
08:54:50 <ahyangyi> Just like we call "a part of a station" a station
08:54:56 <LordAro> truebrain: you may have a point - i was thinking of a script error that occurs inside the compatibility scripts (failed precondition or whatever), but that should just return an error code
08:55:15 <peter1138> truebrain, I was a bit confused why that script error was so prominent in the PR, as it's not that relevant.
08:56:02 <truebrain> peter1138: That is a question for Rubidium; not for me ๐
08:56:08 <peter1138> It does look like the compatibility messages are removed though (Because if not then it would show them all.)
08:56:35 <andythenorth> yeah ok, so 'articulated vehicle' doesn't exist
08:56:46 <andythenorth> I think that's part of the naming difficulty
08:57:39 <andythenorth> so the semantics of grf and the game diverge
08:57:49 <andythenorth> 'vehicles' in game are buyable, sellable, combinable in depot
08:57:53 <truebrain> LordAro: I like your idea more ๐
08:57:59 <andythenorth> grf has no concept that 1:1 matches 'vehicle' in game
08:58:35 <truebrain> so we ship a `compat_15.nut` with OpenTTD 15
08:58:41 <truebrain> I am sure we have been doing that for years already
09:00:42 <ahyangyi> andythenorth: Well, you can also sell "pre-composed parts of a train that's made of more than one wagons", right?
09:01:03 <andythenorth> that's a UI detail ๐
09:04:10 <truebrain> it is funny, how Rb pulled a single thread, and a lot of "this is just weird" is being pulled out because of it ๐
09:21:19 <andythenorth> - ships: vehicle = vehicle = vehicle. self, parent are the same
09:21:19 <andythenorth> - road vehicle: vehicle = vehicle, vehicle = consist, self is an articulated part, parent is the lead engine, which is also the lead vehicle of the articulated vehicle
09:22:19 <andythenorth> - unit = sequence of units
09:22:48 <andythenorth> - train = sequence of units, or a unit
09:23:42 <andythenorth> a unit train is a single train travelling between two points with no remarshalling of the consist
09:23:52 <andythenorth> or it's a train made up divisible units
09:24:04 <andythenorth> or it's a train that is formed into a unit train
09:24:57 <andythenorth> how is GPT *supposed* to tell me what to call my python classes in this mad world? ๐
09:28:31 <andythenorth> hmm can I blame TTDP? ๐
09:30:05 <andythenorth> `Articulated engine (16)`
09:30:05 <andythenorth> `This allows building articulated engines or wagons, i.e. vehicles made from several individual vehicles.`
09:30:59 *** ChanServ sets mode: +o orudge
09:32:59 <andythenorth> most things seem like good ideas...at the time ๐
09:35:12 *** orudge has quit IRC (Quit: leaving)
09:36:38 <andythenorth> my preference would have been: all 'vehicles' run cb 16, at least once, and attach a minimum of 1 trailing part. The first trailing part is the vehicle that triggers the running of cb 16 (this is weird, but practical).
09:42:16 <peter1138> You want a callback that chooses a different vehicle to build?
09:53:02 <andythenorth> if history was different, I'd have had a clear distinction between 'vehicle' and 'parts'
09:54:01 <andythenorth> it's not a problem, apart from the #1 problem in Computer Science, namng things ๐
09:55:41 <ahyangyi> andythenorth: `s/ in Computer Science//`
09:56:31 <andythenorth> naming children is easy
10:02:49 <peter1138> Back in the mists of time, the randomness of PlantRandomFarmField was changed from `& 31` to `% 31`. I wonder if this was intentional.
10:04:44 <peter1138> Glad that TrueBrain person is no longer around.
10:11:31 <andythenorth> so is a vehicle a "unit"?
10:11:37 <andythenorth> it's not divisible in game
10:12:00 <andythenorth> and the most semantically stable meaning of unit is "can't be divided any further at this level"
10:12:24 <andythenorth> consist -> unit -> articulated parts
10:12:36 <peter1138> 0.5 units disagrees.
10:13:19 <peter1138> Just to let you procrastinate further.
10:15:56 <andythenorth> GPT says 'set' for buyable vehicles
10:16:06 <andythenorth> but the robot has no clue, it's just rolling dice
10:16:21 <andythenorth> and 'set' is reserved in python, and conflates with get/set
10:16:32 <andythenorth> "set_set_id()" is not a world I wish to live in
10:16:48 <andythenorth> nor set([set for set in sets])
10:24:39 <Rubidium> peter1138: it's just funny how a tiny mistake in one of the compat scripts yields such a massive recursive error
10:36:27 <Rubidium> it seems O(n!) in number of lines, where n is the number of releases after the targetted release the issue occurs.
11:05:58 <LordAro> andythenorth: better represented as `set(sets)` i believe
13:41:40 <xarick> have you received my message earlier today
13:42:14 <xarick> I'm worried about airport orders
13:58:12 <andythenorth> hmm how about I just have `class foo` and `class bar`
13:58:27 <andythenorth> and foo is for "train vehicles that can be bought"
13:58:54 <andythenorth> and `bar` is for "the train vehicles that the game pretends are the vehicles that can be bought"
13:58:59 <andythenorth> but are actually sub-units
13:59:15 <andythenorth> so foo1 = steam engine
13:59:28 <andythenorth> made up of bar1 (engine) and bar2 (tender)
14:01:27 <LordAro> well yes, but also no
14:02:47 <andythenorth> hmm is there any concept of an anti-mixin?
14:03:01 <andythenorth> so I could subclass a mixin, but it nerfs some of the parent class?
14:03:10 <andythenorth> that's what trailing parts are
14:08:38 <andythenorth> Hmm Vehicle and mixin RealVehicle
14:13:00 *** ChanServ sets mode: +o orudge
14:51:13 <talltyler> Heh, I should read and comprehend the PR text better
15:18:32 *** grilled_cheese0933 has quit IRC (Quit: User went offline on Discord a while ago)
15:19:56 *** Flygon has quit IRC (Read error: Connection reset by peer)
15:28:04 <andythenorth> hmm maybe I need to forget about hierarchy and containment
15:28:12 <andythenorth> and focus on articulation / attachment
15:28:22 <andythenorth> wonder if there's a pythonic pattern for that
15:29:02 <andythenorth> I'm trying to do
15:29:02 <andythenorth> `buyable train [props and methods] -> parts of the train [props and methods]`
15:29:11 <andythenorth> but maybe I should do
15:30:01 <andythenorth> `vehicle [props and methods] -> other vehicles attached to the first vehicle [some props and methods nullified]`
15:30:58 <andythenorth> currently I do things like
15:31:23 <andythenorth> `capacity = sum([unit.capacity for unit in self.units])`
15:33:39 <andythenorth> maybe I should do `vehicle.capacity = (vehicle.lead_vehicle.capacity / vehicle.lead_vehicle.num_trailing_parts + 1) if vehicle.__class__.__name__ is not RealVehicle else vehicle.capacity`
15:34:01 <andythenorth> no I'd need a multiplier, because some parts are longer than others, or don't have capacity
15:34:06 <andythenorth> so I'd need a precise multiplier
15:40:44 <andythenorth> But it would be conformant to the grf spec
15:42:23 <andythenorth> Pff silly andythenorth trying to overlay a class hierarchy onto an unclassed system ๐
16:03:11 * andythenorth reading about class polymorphism
16:04:49 <andythenorth> So I need a single class that modifies multiple attrs based on a single attr
16:05:16 <andythenorth> So flag based conditional imitation of an alternative class
16:05:23 <ahyangyi> I feel that you generally want flatter class hierarchy, if A and B are "similar things", they could probably just use the same class.
16:05:46 <andythenorth> But if a flag is set then quack is removed
16:06:11 <andythenorth> So basically not OO
16:06:14 <ahyangyi> The good old "not very OOP" style
16:07:03 <ahyangyi> Does help somewhat. I used to have these classes:
16:07:26 <ahyangyi> Whcih are built with things like GroundSpriteMixin, DefaultGraphicsMixin, CustomGraphicsMixin, etc
16:07:31 <ahyangyi> Then it was a hell of mess
16:07:48 <ahyangyi> until I can't bear with it anymore and merged these into one class
16:08:19 <ahyangyi> and reduced code length by 200 lines
16:09:11 <ahyangyi> And no more "I need to add a function in 5 different classes just because"
16:11:51 *** benjaminv has quit IRC (Ping timeout: 480 seconds)
16:12:12 <ahyangyi> The trick is that you can still apply OOP to the smaller moving parts
16:12:31 <ahyangyi> like the polymorphism of a certain attribute
16:12:48 <ahyangyi> But don't use that as an excuse to split the big class
16:22:51 <andythenorth> the current Horse classes make sense
16:22:59 <andythenorth> but are impossible to name conformant to the grf implementation
16:24:33 <andythenorth> so it seems I should just flatten the hierarchy into `class Vehicle`
16:24:43 <andythenorth> then wrap all properties into conditionals
16:25:15 <andythenorth> so each property has a getter
16:25:44 <andythenorth> `if self.is_real_vehicle: return x else return y`
16:26:17 <andythenorth> and for methods, I fork conditionally at the beginning of each method
16:26:52 <andythenorth> `if not self.is_real_vehicle: raise Exception("don't call this method on this vehicle") else return foobar`
16:27:19 <andythenorth> then I wrap all the template method calls in templating conditionals for `vehicle.is_real_vehicle`
16:27:42 <ahyangyi> What is a real vehicle though
16:28:03 <andythenorth> it's actually the opposite of a trailing_part
16:28:11 <andythenorth> so maybe I should do vehicle.is_trailing_part instead
16:28:29 <andythenorth> but it's hard to define a trailing part
16:28:41 <andythenorth> a trailing part is implicitly defined by being added to a lead_vehicle
16:28:48 <andythenorth> but it's not inherent to the instance
16:29:00 <andythenorth> so it requires knowledge of all the other vehicles
16:29:09 <andythenorth> and a vehicle can be both a trailing part and a real vehicle
16:29:15 <andythenorth> so that requires context
16:29:43 <ahyangyi> Then... just `foo.capacity()` and `foo.whole_train_capacity()`?
16:29:50 <andythenorth> this is so fragmented, that it looks not worth bothering with
16:30:02 <andythenorth> so maybe complex train grfs aren't actually possible
16:34:20 <andythenorth> ahyangyi: that's nice, but it would have to be foo.articulated_vehicle_total_capacity()
16:34:29 <andythenorth> and return "None" if it's a single unit vehicle
16:34:36 <andythenorth> then have conditional handling for single unit
16:35:02 <andythenorth> hmm what's the definition of articulated vehicle?
16:35:14 <andythenorth> is it 'handles callback 16'?
16:35:19 <andythenorth> or is it 'has more than one unit'?
16:35:52 <ahyangyi> Depends on how do you plan to use it.
16:36:51 <ahyangyi> I think when I attempted to make my RV set, I needed whole-vehicle-capacity for docs and in-game purchase text, and per-vehicle-capacity for switches.
16:37:07 <andythenorth> ahyangyi: I mean, "by definition"
16:37:14 <andythenorth> like what **is **it?
16:37:22 <ahyangyi> I mean, I can't think of a third definition
16:37:27 <ahyangyi> Either the whole, or the parts
16:37:49 <ahyangyi> Everything else should use a different name
16:38:21 <ahyangyi> such as "average capacity per vehicle", which is very different from "capacity"
16:38:41 <andythenorth> this is why I think I might just name the classes "ham" and "eggs"
16:38:53 <andythenorth> or delete the grf, as it's impossible to have a lexicon for it
16:39:20 <andythenorth> if the game was more German, it would not have this problem
16:39:39 <andythenorth> "Available Trains"
16:39:45 <andythenorth> "New Rail Vehicles"
16:40:11 <andythenorth> `class train_or_rail_vehicle()` ?
16:40:20 <ahyangyi> Might need a localisation PR? ๐
16:40:51 <ahyangyi> I think not long ago it was just one window named "Available Trains" with all the stuff in it?
16:42:15 <andythenorth> GPT thinks I should use `VehicleBlueprint` or `VehiclePlan` or something
16:42:18 <ahyangyi> Anyways, what's wrong with using a different internal terminology
16:42:27 <andythenorth> to stand in for the non-existent container
16:42:39 <andythenorth> the internal terminology conflicts with the grf spec
16:43:06 <ahyangyi> I use `Demo` for the hypothetical "a station made of many different station tiles"
16:43:20 <ahyangyi> Because its only purpose is to make demo images in the docs
16:43:55 *** Wormnest has joined #openttd
16:44:47 <andythenorth> maybe it's `class Vehicle` and a mixin `class BuyableMixin`
16:45:20 <ahyangyi> What's a non-buyable vehicle?
16:45:35 <andythenorth> or any vehicle not in current climate
16:45:41 <andythenorth> so again, contextual
16:45:53 <andythenorth> a vehicle can be both buyable and a trailing part though
16:46:05 <andythenorth> but it then needs to use cb36 to 0 some props
16:46:47 <ahyangyi> Anyways, I don't think your code should be organized to how openttd grf works
16:47:06 <ahyangyi> You should organize things in the way you find most natural to think about
16:47:14 <ahyangyi> then worry about how to translate those to openttd
16:47:25 <ahyangyi> the latter part is usually either easy or impossible
16:47:31 <ahyangyi> so nothing to worry about ๐
16:48:02 <andythenorth> that is too sensible
16:48:08 <andythenorth> my OCPD traits reject it ๐
16:50:03 <andythenorth> composed of foo.bar_parts = [<bar instance>, <bar instance>, <bar instance>]
16:50:29 <andythenorth> maybe for ease of search I can use `foobar` and `barfoo`
16:50:38 <andythenorth> or `foofoo` and `barbar`
16:50:55 <andythenorth> unique names generate fewer spurious search matches due to stem matching
16:51:16 <andythenorth> the I have FooFooFactory and BarBarFactory
16:53:21 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
16:54:46 <ahyangyi> Chocolate bar factory
16:56:48 <andythenorth> is this a vehicle?
16:57:53 <ahyangyi> Is toyland a climate?
17:02:03 <andythenorth> is this a photo of a vehicle, or 3 vehicles?
17:05:18 *** gelignite has joined #openttd
17:16:45 <merni> andythenorth: How about a PR to change english.txt for better consistency :p?
17:24:34 <Rubidium> andythenorth: in real world context, or OpenTTD context?
17:29:41 <xarick> `for (i = 0; i <= this->ticks && ! _exit_game; this->ticks && i++) {`
17:31:26 <Rubidium> as in the real world I would consider a whole Talgo 230 a single vehicle (you can buy variants from 9 to 21 cars long), but in the OpenTTD context I'd see that as a dual-head with wagons in between
17:31:51 <andythenorth> Rubidium: _mostly_ OpenTTD. IRL language varies too much by country, terminology, language, operational habits
17:32:11 <andythenorth> A 'unit' in the UK has n parts, in the US it has 1 and only 1
17:43:34 <xarick> can I add a very high preset for water level?
17:44:04 <xarick> I learned about water percent being actually low
17:44:31 <LordAro> xarick: it's a method of skipping the i++ if ticks is 0
17:45:49 <xarick> _water_percent[4] = {70, 170, 270, 420} // Desired water percentage (100% == 1024)
17:46:44 <LordAro> i'd much rather have `this->ticks == 0 || i < this->ticks` in the end condition of the for loop
17:47:28 <_glx_> anyway with current way to change _exit_game, it will be too easy to end up with "infinite" loop and no window
17:47:50 <LordAro> "don't add redundant code"
17:48:02 <_glx_> _exit_game is set to true in GUI or via console command
17:48:15 <_glx_> none will happen with null driver
17:48:35 <LordAro> maybe they're setting it via admin console or similar?
17:49:06 <_glx_> or via something else relevant to their automated test
17:49:25 <_glx_> but in current source it's just dangerous
17:49:36 <LordAro> someone should write that on the PR ;)
17:50:28 <LordAro> yeah, but they retorted :p
17:50:36 <_glx_> yeah "Whether or not anything can set it right now is somewhat immaterial"
17:50:43 <LordAro> and also there's still the ticks == 0 to deal with
17:50:50 <LordAro> (which i'm not opposed to)
17:51:16 <LordAro> though perhaps -1 might be better
17:52:07 <ahyangyi> Are there any platform, where the allegro driver is the default?
17:52:31 * Rubidium wonders when 4 billion ticks isn't enough. That's 49 days at 1 ms/tick
17:53:36 <ahyangyi> peter1138[d]: Is it the generator or a heightmap?
17:53:41 <_glx_> I kinda understand the possible usage of run for as many ticks as needed, but currently there's no way to detect the "as needed"
17:53:44 <ahyangyi> And... that river is not a river, right?
17:54:42 <xarick> is that river tiles or sea tiles?
17:55:02 <andythenorth> oh do we use `Composition` anywhere in game or grf API?
17:55:21 <ahyangyi> ahyangyi: Hence this ๐
17:55:47 <_glx_> the distinction is mostly for humans ๐
17:55:56 <peter1138> It's "let's see what happens if we load 16 bit heightmap as 16 bit"
17:56:31 <ahyangyi> Boats can't navigate rivers, but they can travel in not-river rivers.
17:56:51 <_glx_> they can travel on river, just not on slope
17:56:58 <peter1138> When handled as 8 bpp, everything below 256 becomes 0, but when handled as 16 bpp everything between 1 and 255 is now land, because it's not zero.
17:57:32 <xarick> hmm making a Very Hight Sea level preset is more work than anticipated ๐ฆ
17:57:51 <peter1138> I even added a scan for min/max range, but of course the min is still 1.
17:58:26 <peter1138> Sea-level -> Custom -> 90% doesn't really need a preset.
17:59:15 <peter1138> So the issue I have is that if you save a map as a heightmap, and then load it into the game again, due to scaling it won't be exactly the same.
17:59:29 <ahyangyi> Time to make 16 bit heightmaps.
17:59:43 <ahyangyi> Oh, I still need to figure out how to place my rivers.
18:00:05 <andythenorth> how would you interpret `class Buyable` ?
18:00:50 <peter1138> 16 bit heightmaps have been working for years.
18:01:03 <peter1138> (But they're stripped and treated as 8 bit)
18:01:18 <ahyangyi> Yeah that's the difference.
18:01:46 <ahyangyi> (will we get deeper water that increases terraforming and bridge costs ๐ )
18:02:30 <peter1138> It's been 20 years, probably not.
18:03:23 *** michi_cc has joined #openttd
18:03:23 <michi_cc> andythenorth: No, but don't look at OTTD if you want consistency with the NewGRF specs. We call vehicles engines over in OTTD land, even if their actually waggons ๐คฃ
18:03:39 <andythenorth> a wagon is an engine with no power
18:03:48 <ahyangyi> peter1138: Sure, sounds like deep water already ๐
18:03:52 <andythenorth> I explained articulated vehicles to GPT
18:04:28 <ahyangyi> Inconsisent consists?
18:07:29 <xarick> convert tile height to int8_t
18:07:43 <xarick> 127 max height, -127 max depth
18:07:43 <andythenorth> GPT suggests `class Struct` or `class CatalogEntry`
18:07:49 <andythenorth> it doesn't like `class Buyable`
18:09:06 <andythenorth> `class BuyMenuEntry` might be the most technically accurate name
18:09:38 <andythenorth> or `BuyMenuItem`
18:10:16 <xarick> or a different proposal
18:10:30 <xarick> keep tile height uint8_t
18:10:45 <xarick> reuse it for sea tiles to mean depth
18:12:47 *** Wolf01 is now known as Guest8054
18:14:32 <xarick> oh, instead of affecting the cost of clearing, just deny clearing at all if it's too deep
18:14:57 <andythenorth> ok genuinely confused (OCPD says hi)
18:15:05 <andythenorth> how do trains exist IRL, semantically?
18:15:10 <andythenorth> it shouldn't be possible
18:15:33 <andythenorth> in English a train is both a consist or formation, and an invidual train vehicle
18:15:41 <xarick> train is a british invention?
18:16:28 <andythenorth> rail vehicles can be made up of one part or several parts
18:16:54 <andythenorth> some vehicles can be divided, and their parts would still be vehicles
18:16:58 <andythenorth> but some would just be parts
18:17:16 <michi_cc> Make german horse, I think we have specific names for everything train that you can imagine ๐คฃ
18:17:46 <andythenorth> given that (outwith coupling restrictions) all rail vehicles in a system are arbitrarily combinable to trains
18:17:52 <andythenorth> this should not be possible
18:18:17 <andythenorth> the information content of the system is too conceptually contested
18:18:38 <andythenorth> philosophically, it's just a mess
18:18:56 *** Guest8054 has quit IRC (Ping timeout: 480 seconds)
18:19:55 <michi_cc> LOL, dictionary for "Zugverband" == " vehicles attached together"
18:20:33 <LordAro> andythenorth: cows are divided into bulls and cows
18:20:35 <andythenorth> where the meaning of a referent varies
18:21:06 <andythenorth> "cows are bulls and cows" was a feature of philosophy of language in my degree
18:21:19 <andythenorth> it's simpler to explain than grue paradox
18:21:42 <andythenorth> this isn't like "buffalo buffalo buffalo buffalo" though
18:21:47 <andythenorth> that can be referentially unpacked
18:22:01 <andythenorth> the problem here is semantic collapse
18:22:17 <andythenorth> but trains still run ๐
18:22:59 <andythenorth> I might just change 'consist' to 'cabbage' in Iron Horse
18:23:14 <andythenorth> adding to the list of unrelated things labelled 'cabbage' in the compile
18:23:16 <andythenorth> there are about 20
18:24:22 <michi_cc> Bulls and cows are actually cattle, but I guess nobody is actually using that word
18:24:47 <andythenorth> depends on context
18:24:55 <andythenorth> but cattle are also cows
18:25:06 <andythenorth> is epistemologically true
18:25:22 <andythenorth> but cows aren't cows if they're bulls
18:26:32 <andythenorth> shall I solve this by only doing non-articulated rail vehicles?
18:26:47 <andythenorth> then the problem neatly collapses into `class Vehicle`
18:34:06 <andythenorth> compile would be a lot faster ๐
18:34:46 <talltyler> andythenorth: Itโs only a train when it has a marker, IRL ๐
18:35:01 <talltyler> Until then, itโs a random collection of equipment
18:36:08 <andythenorth> 'equipment' is not a bad term
18:36:24 <andythenorth> `class BuyableEquipment`
18:36:38 <andythenorth> `Equipment.units`
18:37:23 <andythenorth> or `RollingStockItem` which is a sort of GPT suggestion
18:37:53 <talltyler> At one of my previous jobs, my brakeman forgot to hang the markers before departure. He came to me in a panic a few minutes later and I told him to stick a red flag in the knuckle before we passed the yard limit sign and entered the main line. Problem solved. ๐
18:38:04 <andythenorth> that's like grue
18:38:08 <andythenorth> it wasn't a train, then it was
18:38:31 <talltyler> Sort of like a legal fiction, but sort of the opposite?
18:40:24 <Rubidium> talltyler: is that marker only at the rear? Then conceivably a bunch of wagons can be considered a train as well
18:41:52 <Rubidium> primarily thinking of flying switches/slip coaches and all that mess... if talking about IRL
18:44:06 <talltyler> I skipped part of the definition. The full text is โone or more locomotives, with or without cars, displaying markersโ
18:46:10 <talltyler> It all relates to main track authority, in the end. A very long topic and fascinating to my autism, which happily I was required to understand thoroughly in said previous job ๐
18:46:11 <andythenorth> what about a powered MoW crane with gondolas?
18:47:23 <talltyler> Thatโs track equipment, which probably has a track authority/warrant/whatever paperwork an extra train gets in your favorite system of operation
18:48:06 <talltyler> Or could also occupy the track if itโs out of service or under control of a MoW supervisor (Form B, etc)
18:48:44 *** tokai|noir has joined #openttd
18:48:44 *** ChanServ sets mode: +v tokai|noir
18:48:45 <andythenorth> TBH, I'm hoping someone with autism can bail me out of my semantic rabbit hole
18:48:54 <andythenorth> that's quite a common pattern
18:50:51 <talltyler> My favorite type of track authority is that under flag protection (literally a guy waking ahead of the train with a red flag) you can legally go anywhere, no paperwork or permission required. Not a situation you want to be in today, but back in the day communications were less available to ask for paperwork. ๐
18:53:19 <talltyler> Are you looking for a word for the larger โmultiple articulated bits attached to each otherโ or the smaller โbits that get attached into an articulated thingโ?
18:53:55 <andythenorth> it's the thing you buy in the buy menu
18:53:58 <andythenorth> or drag around in depot
18:54:03 <andythenorth> or put in the bin
18:55:10 <talltyler> Ah, and it needs to exist and be named because you need to make a buy menu sprite out of several smaller sprites?
18:55:36 *** tokai has quit IRC (Ping timeout: 480 seconds)
18:57:54 <andythenorth> because the alternative is either
18:57:58 <andythenorth> vehicles.vehicles = []
18:58:15 <andythenorth> or a mapping in global namespace of vehicle trailing parts to a vehicle
18:58:42 <andythenorth> or each trailing part has to know it's parent, and then we make a list at run time
18:59:08 <andythenorth> and then it's weird
18:59:30 <andythenorth> because to get the total length of a vehicle in vehicles, I have to `len(trailing_parts) + 1`
18:59:57 <talltyler> I am confused by Python, NML, and your build structure, so take all this with a grain of salt, but maybe explicitly saying โdepot viewโ as part of the name would be helpful to differentiate from other uses of the vehicle
18:59:59 <andythenorth> actually that's a pretty pointed case
19:00:16 <andythenorth> what would `len(vehicle.vehicles)` return, semantically?
19:00:36 <talltyler> Whatever you put in it ๐
19:00:51 <talltyler> Joking, I donโt really follow
19:00:53 <andythenorth> `len(consist.vehicles)` is not ambiguous
19:01:13 <andythenorth> `len(vehicle.vehicles)`....what is that?
19:01:17 <talltyler> Are you trying to figure out names or the actual data structure?
19:01:37 <andythenorth> the names are impossible, so I have to use a weird data structure
19:01:50 <andythenorth> unless I just call them `cabbage.vehicles`
19:01:55 <andythenorth> or `simon.vehicles`
19:03:11 <talltyler> (Although Iโd use Engine over vehicle to match Openttd and avoid having to remember two naming conventions)
19:07:04 <talltyler> You could have child parts be `EnginePart` and the parent be `Engine` or maybe just have Engines be composed of other Engines. Donโt know how GRF spec feels about that.
19:07:41 <talltyler> I seem to recall doing articulated units as a bunch of the same engine, with a switch to choose the sprite based on its position
19:07:44 <andythenorth> vehicle.parts is problematic because the parts are vehicles ๐
19:08:04 <talltyler> Sure, but theyโre parts of the whole
19:08:47 <talltyler> โPartโ is a generic term for a member of a larger item, in this case
19:10:01 <talltyler> I donโt see the semantic harm in vehicles being somewhat recursive, ie composed of other vehicles
19:10:23 <peter1138> Just call it Cabbage and get on with it.
19:12:39 <talltyler> I canโt wait for Iron Moose to get an Amtrak cabbage, itโll be like an Easter egg
19:14:40 <andythenorth> maybe consists are units
19:14:43 <andythenorth> and units are vehicles
19:14:54 <andythenorth> and in game, vehicles are units
19:16:36 <talltyler> You could always number the tiers
19:19:19 <andythenorth> vs TrailingVehicle
19:22:44 *** Wormnest has joined #openttd
19:29:15 *** kuka_lie has joined #openttd
19:43:41 <andythenorth> I think FIRS tries to limit those industries to 'west' or 'east' of the map ๐
19:43:51 <talltyler> โWorks in vanilla, breaks in JGRPPโ is 100% not your problem ๐
19:44:07 <_jgr_> That issue is fixed already anyway
19:44:14 <andythenorth> is it not the FIRS thing?
19:56:58 <xarick> ! _exit_game -> !_exit_game
19:57:48 <xarick> oh, i need to do something about my AI, I haven't touched it for a year
19:59:38 <xarick> must fix time handling calendar vs wallclock
20:01:35 <andythenorth> so I've over-used cabbage
20:02:00 <andythenorth> so `steak.units`
20:02:08 <andythenorth> and the rosters are horse, ibex, moose
20:02:15 <andythenorth> so `horse.steaks`
20:02:33 <andythenorth> I am open to other dad joke suggestions
20:02:57 <xarick> oh, it's not GetDate, it's some other name
20:04:56 <xarick> what can I use instead of GetCurrentDate that works for both calendar and wallclock? something Tick?
20:05:55 <xarick> and it must be continuous through save and load
20:11:58 <peter1138> Hmm, I wonder if this serialisation can be better.
20:12:39 <peter1138> It's a bit... C-style.
20:15:47 <andythenorth> GPT says horse.steak is funny but I shouldn't use, it reports I'm favouring a bad joke over readability
20:17:39 <andythenorth> it wants me to consider terms used to manage e.g. herds of animals
20:40:11 <xarick> the counter starts again from 0 after load
20:40:41 <xarick> competitor speed also influences the counting
20:42:34 <xarick> or maybe it's not, how do I tell?
20:48:32 <peter1138> Alright, how do I test this news message thing :S
20:50:31 *** gelignite has quit IRC (Quit: Stay safe!)
20:51:37 <Rubidium> make a vehicle, put too few orders in it, let it run for a while. Once news shows about missing orders, autoreplace it to a new one
20:53:38 <xarick> TimerGameCalendar, TimerGameEconomy, TimerGameTick... there's more than 2
21:02:52 <peter1138> Hmm, seems to work, after ensuring it's using base 16, heh.
21:03:11 <peter1138> I am fully decoding the string, changing the parameter, then re-encoding it.
21:05:15 <peter1138> Found a vanilla bug :o
21:05:41 <peter1138> In my branch the blank line is replaces with `(undefined string)`
21:09:18 <xarick> can scripts have access to
21:11:07 <peter1138> Sounds like a bad idea.
21:13:57 <peter1138> script_date.hpp mentions Calendar-Time and Economy-Time, but, uh... no idea what that's useful for.
21:23:34 <xarick> I don't know how to fix the ai
21:33:10 *** kuka_lie has quit IRC (Quit: Lost terminal)
21:42:07 <xarick> found a bug, i can't time units for timetables in-game
21:44:46 <xarick> actually, changing it in the main menu and starting a new game, reverts back to seconds...
21:44:56 <xarick> nobody tested this at all
21:52:16 <andythenorth> ok so I was using `consist` as the structure for buyable vehicles (articulated or not)
21:52:54 <andythenorth> seems the strictly correct term for an ordered linear connection of vehicles is `Path DAG`
21:53:07 <andythenorth> so this is probably `class BuyablePathDAG`
21:53:26 <peter1138> (Not sure it's strictly necessary to copy the old code pattern, but I did anyway...)
21:54:36 <andythenorth> I could try other things like `class BuyableVehicleSequence`
21:56:14 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:09:19 <andythenorth> `class ArticulatedComposite`
22:10:12 <xarick> strange, GetCurrentDate should work, so why is my AI doing bad
22:12:42 <andythenorth> maybe there just is no name that can be applied to a string of vehicles
22:12:58 <andythenorth> I have not found one in reference material or the word soup robot
22:13:49 <andythenorth> maybe everything just has to reference back to VehicleFactory
22:14:04 <andythenorth> so `<vehicle instance>.VehicleFactory.foo`
22:14:11 <andythenorth> for all the shared common props and methods
22:16:41 <_glx_> xarick: are you comparing calendar and ecnomy dates at some point ?
22:18:11 <_glx_> oh GetCurrentDate() is wrong
22:19:06 <_glx_> but description implies it should be calendar
22:19:25 <xarick> I checked how TimerGameEconomy is running, and it seems to run its own internal clock, doesn't match the date at the bottom left
22:19:45 <xarick> so, it's tick based i assume
22:21:04 <_glx_> yes economy and calendar are totally different (unless calendar-based timekeeping)
22:21:21 <_glx_> anyway GetCurrentDate() is wrong
22:23:13 <_glx_> hmm but GetYear() and friends would be wrong when used on a calendar date
22:23:40 <xarick> wallclock of 60 minutes per year
22:24:38 <_glx_> yeah right is wallclock, left is calendar
22:25:14 <_glx_> (easy to spot, economy date starts at 1 in wallclock
22:26:13 <_glx_> and economy date uses 30days month
22:27:20 <xarick> see when it starts to slow down
22:28:16 <andythenorth> `class RollingCapitalAsset`
22:28:21 <_glx_> yes calendar goes slower, it's expected
22:28:23 <andythenorth> `class WheeledAsset`
22:28:33 <andythenorth> `class BuyableCapitalItem`
22:28:51 <_glx_> but GetCurrentDate() returns economy date
22:29:15 <andythenorth> what would Xarick call 'vehicle'?
22:29:21 <_glx_> and this one is stable and unslowable
22:29:36 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:31:01 <andythenorth> ah GPT has solved it for me. Real rail vehicles (and road vehicles) come in 'classes'
22:31:14 <andythenorth> 'PTA class freight wagon'
22:31:16 <_glx_> I'll really need to rework ScriptDate so we'll have ScriptCalendarDate and ScriptEconomyDate as real objects, and not just SQInteger
22:31:40 <andythenorth> so I should replace `class Consist` with `class Class`
22:31:45 <andythenorth> this has gone well
22:32:17 <_zephyris> That'll never get confusing
22:36:18 <peter1138> _glx_, seems like we reverted stuff and then didn't do much else :S
22:36:38 <andythenorth> I will just keep running in the hamster wheel until I solve it
22:37:05 <_glx_> yeah we updated doc to mention which date is returned, but it's still need work
22:41:37 *** gwyd4016 has joined #openttd
22:41:37 <gwyd4016> "You can't define what a vehicle is!" - the Sun in an alternative universe
22:42:01 <gwyd4016> I think consist is easy
22:42:25 <gwyd4016> Unit has multiple definitions depending on context that doesn't really make it useful to be used in this way
22:42:46 <gwyd4016> But every idea of what a vehicle might be has some kind of counter example
22:42:55 <gwyd4016> At least in a rail context
22:43:32 <andythenorth> Unit could be โpartโ
22:44:39 <gwyd4016> Unit can mean anything from carriage, to series of semi-permanently coupled carriages potentially with an on board traction source, to just a train
22:45:51 <gwyd4016> I feel like sets weren't hugely widespread
22:46:02 <gwyd4016> Semi-permanently coupled coach rakes
22:46:05 <gwyd4016> There's another word
22:47:04 <gwyd4016> gwyd4016: Semi-permanently in a purely operational sense rather than in a physical way. It was an easier way to account for the movements and operations of several coaches assigned to a set than each coach indiviudally that might get shuffled around
22:47:26 <gwyd4016> Southern region saw loco hauled stock and asked how they could make it more like multiple untis
22:48:28 <andythenorth> I considered rake
22:48:36 <andythenorth> unit is a unit made of units
22:49:20 <gwyd4016> What is the motivation for all this again?
22:50:20 <andythenorth> can't call it consist
22:50:26 <andythenorth> can't call it vehicle
22:50:44 <andythenorth> am refactoring Horse internals so I need to rename it
22:52:06 <gwyd4016> Is this the coach thing? Where a series of coaches recognise themselves as being a series of coaches even with different IDs?
22:52:34 <andythenorth> it's the thing you buy
22:52:40 <andythenorth> made of one or more parts
22:52:56 <andythenorth> that appears in the buy menu, can be dragged around, and can be deleted
22:54:47 <andythenorth> ideally it works for road vehicles too, to simplify my life
22:54:57 <andythenorth> MobilitySolution
22:55:19 <andythenorth> if it's made of parts, then the parts sum to a whole
22:56:31 <andythenorth> if it was command and conquer, `class GameUnit`
22:59:13 <peter1138> gwyd4016, "it" is procrasting about internal naming conversions that have no impact on any gameplay.
23:00:30 <andythenorth> my mum knits and does crossword puzzles
23:00:46 <andythenorth> I play stupid meta-games
23:03:02 *** benjaminv has joined #openttd
23:06:59 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:08:50 <andythenorth> `Gestalt` would be good to replace `Consist`, but I already have `GestaltGraphics` to configure the sprite generator, it will clash when searching
23:09:01 <andythenorth> `Monad` is a good suggestion
23:13:09 <andythenorth> finally, an answer ๐
23:16:10 <peter1138> So what model are you using for your model?
23:19:53 <andythenorth> anyway, we have model life
23:20:02 <andythenorth> precedent, consistent, fits
23:20:33 <andythenorth> `model` is not a python keyword
23:20:47 <andythenorth> "game over, play again y | n"
23:35:52 <peter1138> play again, yes, no, file not found.
23:50:45 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
continue to next day โต