IRC logs for #openttd on OFTC at 2024-04-26
โด go to previous day
00:34:48 *** Flygon has quit IRC (Remote host closed the connection)
01:43:51 *** Wormnest has quit IRC (Quit: Leaving)
02:26:48 *** gnu_jj_ has joined #openttd
02:30:22 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
02:36:01 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:41:33 <DorpsGek> - Update: Translations from eints (by translators)
05:20:41 <jenkings> still not enough ๐
05:21:28 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:14:01 <Afdal> All right I've got a question that's been bugging me for ages
06:14:21 <Afdal> Why is there a Maximum speed check in conditional orders options, but not a Current speed check?
06:14:32 <Afdal> The latter would actually be enormously useful
06:14:37 <Afdal> the former is barely at all -.-
06:15:19 <Afdal> And is there a reason we couldn't add a Current speed check to the game?
06:23:09 <peter1138> Current speed would be very unpredictable.
06:25:10 <Afdal> would that impede synchronization in multiplayer games?
06:26:05 <Afdal> Why would it be unpredictable?
06:35:47 <peter1138> Well, that would be the speed at the point it decides to evaluate the order condition.
06:36:32 <peter1138> So in most cases, when it's stopped in a station.
06:37:11 <Afdal> yeah I'm thinking more about waypoints
06:38:08 <Afdal> if there was a currentspeed check I would stick waypoints near track merges all the time and use them to ensure my trains only attempt to merge when they're going full speed
06:38:48 <Afdal> Would be very useful when playing with trains that have poor acceleration
06:38:58 <Afdal> for high speed network optimization
06:41:58 <peter1138> power to weight ratio sounds more useful there.
06:43:00 <peter1138> And that would also be usable when stopped in station.
06:44:33 <Afdal> Not sure how you would achieve what I just described with that...
06:46:34 <Afdal> currentspeed/maxspeed would be handy though
06:46:52 <Afdal> so you don't have to tune the orders to every train engine type
06:50:32 <Afdal> Still not seeing how a currentSpeed check would be unreliable...
06:50:38 <Afdal> I seem you mean non-deterministic
06:53:05 <peter1138> No, I didn't say that.
06:54:02 <Afdal> Oh that's not what you meant?
07:09:15 <locosage> it's unreliable in a way service if needed is, it works reliably, just not how players would expect it to
07:12:44 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
08:27:29 <andythenorth> current speed would lead to confusing orders for players
08:27:39 <andythenorth> (this might be fine, but eh)
08:28:03 <andythenorth> the common case result is most likely '0'
08:28:12 <andythenorth> except for waypoint orders
08:37:16 <peter1138> free(): invalid size
09:03:02 *** mindlesstux has joined #openttd
09:12:28 *** SigHunter has joined #openttd
09:45:43 <peter1138> Nice, memory corruption because my sort function was invalid ๐
10:02:55 <jenkings> so, feel free to use my awesome garbage collector ๐
10:02:55 <jenkings> void garbageCollector(void* ptr, size_t size) {
10:02:55 <jenkings> if (ptr != nullptr && size > 0) {
10:02:55 <jenkings> std::srand(std::time(nullptr)); // Seed the random number generator
10:02:55 <jenkings> // Calculate random start and end points
10:02:56 <jenkings> size_t start = std::rand() % size;
10:02:56 <jenkings> size_t end = start + (std::rand() % (size - start));
10:02:58 <jenkings> // Free the random part of memory
10:02:58 <jenkings> char* p = static_cast<char*>(ptr);
10:03:00 <jenkings> for (size_t i = start; i < end; ++i) {
10:03:32 *** asasnat has joined #openttd
10:03:35 <asasnat> are there any style guidelines for contributing code to OpenTTD?
10:06:56 <peter1138> Yes, it's in CODINGSTYLE.md.
10:07:08 <peter1138> So, er... spot the mistake.
10:08:10 <peter1138> Sadly that actually compiles fine, and results in either `this` or `this - 1`, which is always true.
10:23:42 <asasnat> peter1138: dan, I won't be able to contribute in that case
10:26:21 <FLHerne> You're morally opposed to style guidelines?
10:27:28 <andythenorth> probably tabs vs spaces ๐
10:32:49 <jenkings> WTF ? the opening curly bracket should be on new line, but almost every example in the same document have it on same line as function name ๐ฎ
10:34:21 <jenkings> ohh... sorry, my bad, functions have them on new lines ๐ but every other block does not ๐ฎ
10:34:35 <jenkings> what is than purpose for this rule ? :I
10:35:16 <_jgr_> In the big scheme of things, whitespace and newlines rules are arbitrary and don't really matter. Just deciding something, anything, and then sticking to it is fine.
10:38:39 <andythenorth> there's no C++ equivalent of Python's Black?
10:41:39 <locosage> bracket on new line is a bit better with multiline argument lists
10:41:48 <locosage> but it does look inconsistent with the rest of the code
10:42:37 <LordAro> andythenorth: clang-format is closest, but it has literally hundreds of options
10:43:01 <locosage> and I think openttd always puts parameters in one line so that point is moot
10:44:11 <locosage> there is also astyle
10:44:26 <LordAro> does astyle work with C++?
10:45:44 <locosage> it's advertised to work with "C, C++, C++/CLI, Objective-C, C# and Java programming languages"
10:46:09 <andythenorth> I am going to go and see the outside for a bit
10:48:21 *** asasnat has quit IRC (Remote host closed the connection)
10:48:21 *** rau117 has quit IRC (Remote host closed the connection)
10:48:21 *** audigex has quit IRC (Remote host closed the connection)
10:48:21 *** __karma has quit IRC (Remote host closed the connection)
10:48:21 *** alfagamma7 has quit IRC (Remote host closed the connection)
10:48:21 *** _zephyris has quit IRC (Remote host closed the connection)
10:48:21 *** happpy6024 has quit IRC (Remote host closed the connection)
10:48:21 *** silent_tempest has quit IRC (Remote host closed the connection)
10:48:21 *** frosch123 has quit IRC (Remote host closed the connection)
10:48:21 *** michi_cc has quit IRC (Remote host closed the connection)
10:48:21 *** DorpsGek_vi has quit IRC (Remote host closed the connection)
10:48:21 *** truebrain has quit IRC (Remote host closed the connection)
10:48:21 *** belajalilija has quit IRC (Remote host closed the connection)
10:48:21 *** yiffgirl has quit IRC (Remote host closed the connection)
10:48:21 *** merni has quit IRC (Remote host closed the connection)
10:48:21 *** j0anjosep has quit IRC (Remote host closed the connection)
10:48:21 *** kuhnovic has quit IRC (Remote host closed the connection)
10:48:21 *** kamnet has quit IRC (Remote host closed the connection)
10:48:21 *** andythenorth has quit IRC (Remote host closed the connection)
10:48:21 *** funwithyoyo has quit IRC (Remote host closed the connection)
10:48:21 *** emperorjake has quit IRC (Remote host closed the connection)
10:48:21 *** asyncmeow has quit IRC (Remote host closed the connection)
10:48:21 *** xarick has quit IRC (Remote host closed the connection)
10:48:21 *** klote has quit IRC (Remote host closed the connection)
10:48:21 *** jfs has quit IRC (Remote host closed the connection)
10:48:21 *** jamesrandal1463 has quit IRC (Remote host closed the connection)
10:48:21 *** ahyangyi has quit IRC (Remote host closed the connection)
10:48:21 *** kale91 has quit IRC (Remote host closed the connection)
10:48:21 *** efessel has quit IRC (Remote host closed the connection)
10:48:21 *** isosys has quit IRC (Remote host closed the connection)
10:48:21 *** prhmhn has quit IRC (Remote host closed the connection)
10:48:21 *** wensimehrp has quit IRC (Remote host closed the connection)
10:48:21 *** shloot_ has quit IRC (Remote host closed the connection)
10:48:21 *** _jgr_ has quit IRC (Remote host closed the connection)
10:48:21 *** _glx_ has quit IRC (Remote host closed the connection)
10:48:21 *** peter1138 has quit IRC (Remote host closed the connection)
10:48:21 *** jenkings has quit IRC (Remote host closed the connection)
10:48:21 *** benszasty has quit IRC (Remote host closed the connection)
10:48:21 *** tateisukannanirase has quit IRC (Remote host closed the connection)
10:48:21 *** johnfranklin has quit IRC (Remote host closed the connection)
10:48:21 *** woobilicious has quit IRC (Remote host closed the connection)
10:48:21 *** locosage has quit IRC (Remote host closed the connection)
10:48:21 *** talltyler has quit IRC (Remote host closed the connection)
10:48:21 *** brickblock19280 has quit IRC (Remote host closed the connection)
10:48:21 *** rutoks has quit IRC (Remote host closed the connection)
10:48:21 *** __abigail has quit IRC (Remote host closed the connection)
10:48:21 *** georgevb has quit IRC (Remote host closed the connection)
10:48:21 *** tabytac has quit IRC (Remote host closed the connection)
10:48:42 *** DorpsGek_vi has joined #openttd
10:48:44 *** reldred has joined #openttd
10:49:31 *** locosage has joined #openttd
10:49:31 <locosage> painkillers are sure handy when doing c++...
10:52:14 *** peter1138 has joined #openttd
10:52:14 <peter1138> Hmm, so NewGRF RoadStops don't have the same cargo graphics selection as NewGRF Stations.
10:57:34 <peter1138> I guess that's because it's not compatible with the tilelayout style of result.
10:57:38 <peter1138> Which is unfortunate.
11:00:14 <_jgr_> The legacy little/lots stuff isn't necessary when you can get all the relevant cargo details from varaction2 variables
11:00:51 <peter1138> But that pushes the work onto var action chains.
11:01:02 <peter1138> The "legacy" little/lots is more efficient.
11:08:56 <peter1138> Probably not really, but hey.
11:31:29 *** asasnat has joined #openttd
11:31:29 <asasnat> FLHerne: no I just make bad looking code
11:33:43 <FLHerne> rigid style guidelines are easy, you just do what they say
11:34:40 <FLHerne> the hard thing to solve is when people have totally subjective, case-specific opinions of what style is nice
11:35:19 <FLHerne> eventually someone will have to reopen the English string consistency can'o'worms :-/
11:36:54 <asasnat> andythenorth: I only ever use tabs for indentations
11:36:59 <asasnat> is that what OpenTTD does as well?
11:38:56 <asasnat> well, they use `/* */` for single line comments so I wouldn't be able to contribute anything either way
11:39:25 <merni> asasnat: er, why not? are you unable to type `/* */` ?
11:42:13 *** truebrain has joined #openttd
11:42:13 <truebrain> that is one way to find an excuse to not contribute, ofc ๐
11:42:23 <truebrain> "for personal reasons, I refuse to use /* */ for comments" ๐
11:42:30 *** jenkings has joined #openttd
11:42:31 <jenkings> when i am contributing to some project, the first thing is to set up a script, that transform whole code to my coding style, and second script to transform whole project to wanted coding style to be able to push ๐
11:43:16 <peter1138> That sounds inefficient and totally broken with version control...
11:43:50 <jenkings> it leaves the unchanged files untouched at the end, it is some kind of intelligent addon to netbeans ๐
11:43:51 <merni> I mean not necessarily broken with version control if you always shift to project-code-style before committing
11:44:03 <merni> oh so just a visual change
11:44:05 <jenkings> merni: yup, thats it
11:45:07 <jenkings> thats the only way i can contribute ๐ i can stand example curly braces on different lines than function declaration ๐
11:45:15 <jenkings> i guess it is some kind of OCD ๐
11:45:54 <truebrain> jenkings: "some kind"? ๐
11:46:00 *** xarothbrook has joined #openttd
11:46:01 <xarothbrook> That sounds a lot like this
11:46:29 <xarothbrook> Coding standards are not there for individual developers, it's there to serve the project that's being worked on
11:46:47 <truebrain> but pretty cool Netbeans has plugins for that jenkings ๐
11:46:51 <asasnat> I said something retarded
11:47:36 <_glx_> Just look at grfcodec source to understand why a coding style is important
11:47:42 <peter1138> merni: That assumes the code is consistent in the first place.
11:47:52 <truebrain> _glx_: lol; that is one way to punish people: LOOK AT GRFCODEC! ๐
11:47:54 <xarothbrook> _glx_: You evil evil evil person ๐
11:48:03 <jenkings> Yup, i think it is win-win.. you can use your own coding style and read all the rest of code in you own style, and then commit the code which is form which is wanted for project ๐
11:48:05 <peter1138> Heh, I was going to restyle that, but gave up ๐
11:48:36 <truebrain> just light it on fire, easier ๐
11:49:24 <asasnat> _glx_: easier solution for me
11:49:28 <asasnat> not get involved in the first place
11:49:50 <asasnat> I mean, I know nothing that the head devs don't already
11:51:00 <merni> Thankfully development isn't about what you know but what you do
11:51:20 <_glx_> But most of our coding style is automatically handled by sane code editor
11:51:53 <xarothbrook> I really wouldn't want to read my own coding if my editor wasn't constantly keeping it pretty tbh
11:52:36 <truebrain> I even don't want to read your coding after your editor kept it pretty
11:53:55 <peter1138> I can't reformat in VS Code because our style doesn't quite match up with what it does.
11:59:12 <peter1138> Another backport requested ๐
12:05:55 <truebrain> ```thread 'main' panicked at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/string.rs:1396:13:
12:05:55 <truebrain> assertion failed: self.is_char_boundary(new_len)```
12:07:00 <truebrain> `{DECIMAL}{NBSP}mยณ`
12:07:40 <truebrain> I can just blame it on frosch, so that is easy
12:15:46 <truebrain> ```ERROR: English string STR_NEWS_NEW_TOWN at commit b8866be093 is invalid: [ValidationError { severity: Warning, pos_begin: Some(7), pos_end: Some(17), message: "Command '{BIG_FONT}' must be at the front.", suggestion: None }]
12:15:46 <truebrain> ERROR: English string STR_NEWS_NEW_TOWN_UNSPONSORED at commit eed0da60a2 is invalid: [ValidationError { severity: Warning, pos_begin: Some(7), pos_end: Some(17), message: "Command '{BIG_FONT}' must be at the front.", suggestion: None }]```
12:15:57 <truebrain> always fun, if our own english.txt doesn't pass the new validation frosch wrote ๐
12:19:30 <peter1138> We were thinking about removing most of the colour codes...
12:19:43 <truebrain> is `BIG_FONT` a colour code now? ๐
12:19:53 <peter1138> No, but the {BLACK} just before it is.
12:20:41 <peter1138> It was annoying in the old days having to duplicate a string just because the colour was wrong ๐
12:22:21 <peter1138> Ah, the wrong account excuse.
12:22:36 <peter1138> I only have one Github account, am I unique? ๐
12:22:48 <jenkings> i have one private and one for my job ๐
12:24:01 <peter1138> You should do it on the work account, maybe get paid for it ๐
12:24:50 <jenkings> the reason is, that my employer do not have to know, i am commiting to my private projects, while in work ๐
12:32:28 <peter1138> "waiting for compilation"
12:36:03 *** __karma has joined #openttd
12:36:03 <__karma> Hey guys, as part of my uni project I have to implement a feature, do you have any suggestion of a feature that is nice to have but not needed right away so that I have time to implement it?
12:39:33 *** audigex has joined #openttd
12:39:33 <audigex> There was a discussion here recently about changing how liveries work in NML/NewGRF (not sure which it applies to, maybe both) rather than the current cargo_subtype jankinessโฆ. Implement that and Iโll write you a glowing letter of recommendation to your professors ๐ BRTrains is desperate for that feature
12:40:05 <audigex> And I donโt think thereโs an existing issue/discussion for it outside of Discord so you can take point on the whole thing
12:45:03 <peter1138> I can fix cargo_subtype jankiness.
12:45:15 <__karma> I see, I will take a look at the discussion.
12:45:15 <__karma> Any idea if it will be too complicated? My prof asked us to write/modify at least 300 lines of code, but at the same time I don't want to overdo it, since I other projects as well.
12:45:31 <__karma> peter1138: Oh ok that works lol
12:45:42 <peter1138> My fix is to remove it ๐
12:46:49 <peter1138> But there's a draft PR already for one of the 'challenges' with variants, but of course, nobody looks ๐
12:47:57 *** kuhnovic has joined #openttd
12:49:04 <peter1138> Oh hey, I deduplicated some code...
12:49:08 <__karma> kuhnovic: Sadly it doesn't, I did have to fix a bug in the first part of the project. ๐ซ
12:49:19 <peter1138> > 20 files changed, 1681 insertions(+), 1603 deletions(-)
12:49:24 <peter1138> Well that doesn't seem right :S
12:50:37 <peter1138> > 15 files changed, 1413 insertions(+), 1603 deletions(-)
12:50:47 <peter1138> It wasn't, but that isn't a whole lot better.
12:51:47 <peter1138> Hmm, I wish I could do partial commits of new files. Everything I use will only do the complete file.
13:02:51 <locosage> good feature that's not too hard to implement but haven't been implemented anywhere yet is kinda hard to think of
13:03:08 *** talltyler has joined #openttd
13:03:08 <talltyler> __karma: 11727 looks like a case of โdevelopers donโt crash vehicles very often, so nobody is motivated to fix itโ
13:03:20 <locosage> maybe something in gamescript land
13:05:47 *** andythenorth has joined #openttd
13:05:47 <andythenorth> jenkings: OCPD more likely than OCD, or itโs a maladaptive perfectionism, or an ASD trait
13:06:58 <truebrain> what does `{G 0:2 ...}` mean in translations?
13:08:38 <andythenorth> I did a spec once for actual liveries
13:08:52 <andythenorth> But they would be exposed alongside company colours
13:09:09 <andythenorth> So the whole company could use a livery, or groups could
13:09:18 <locosage> __karma: One feature I can think of is allowing to limit the number of purchaseble vehicles of same type with gamescript. Very niche feature ofc, but would be around 300 lines I guess and doesn't interfere with the rest of the code in some complex way.
13:09:33 <andythenorth> Instead of fucking around cargo refitting individual consists
13:11:12 <andythenorth> It was action 16 or something in my spec
13:12:42 <truebrain> frosch123: the answer to the question: how long does validating all OpenTTD strings take: Validation took 3001ms
13:13:11 <truebrain> it might be worth looking into if we can improve that ๐
13:15:43 <audigex> peter1138: That's definitely not worth how much I'll whine about it for the rest of eternity ๐
13:21:25 <peter1138> My fix for pre-signals is also...
13:24:46 <andythenorth> remove more things
13:24:53 <andythenorth> did we need to remove Variants?
13:25:32 <_jgr_> truebrain: Seems to be to reference sub-arguments of STRINGN fields
13:25:54 <_jgr_> Didn't know that the translation system supported that
13:28:04 <andythenorth> see what happens
13:28:11 <andythenorth> didn't someone have a patch for that?
13:28:22 <__karma> locosage: Interesting, I have not looked into gamescripts yet, but I will do that.
13:28:39 <__karma> talltyler: I see, I will take a further look into it then.
13:28:43 <peter1138> We should probably get 14.1 out before we start with drastic things ๐
13:29:01 <audigex> Removing NPF as a selectable option actually seems kinda sensible, is there any reason to use it now?
13:30:43 <peter1138> No, actually removing NPF.
13:30:49 <_jgr_> talltyler: Part of the problem is that the whole area is bike-shedding catnip
13:31:27 <_jgr_> (On that front, it would be better if level-crossings weren't absurd death-traps...)
13:31:31 <peter1138> If only there was a news message about crashed vehicles... ๐ค
13:34:04 <locosage> I could use a button on that message that would just buy another one and advertise to fix rating xD
13:34:31 <peter1138> "autorenew" for crashed vehicles.
13:34:40 <peter1138> Make it completely pointless...
13:35:11 <locosage> make the ghost move around until it can reach some depot to revive xD
13:36:08 <peter1138> PALETTE_TO_TRANSPARENT
13:45:51 <audigex> peter1138: Wouldn't that cause savegame problems? Or would everything just switch to YAPF when opened in the new version?
14:01:11 <andythenorth> _jgr_: bridges....
14:16:36 <talltyler> OpenTTD crossings are just Brightline IRL
14:24:44 * peter1138 does some templating.
15:08:45 <kale91> Autorenewing Florida man ๐ซฅ
15:12:26 <andythenorth> hmm these FIRS ports are almost impossible to manually place
15:21:35 <andythenorth> figuring out the N tile location for something like this ๐
15:22:10 <andythenorth> it's too big, too spread out, and having 2 coast connection points is too limiting
15:25:36 <peter1138> You probably want: a) a flag that to say it should be built along a shore line, b) some way for the game to say which direction is away from the shore, to allow the NewGRF to select a more suitable/likely layout.
15:25:50 <peter1138> But that's all a bit sky-pie
15:26:26 <andythenorth> or I go back to having a single coast connection point
15:26:37 <andythenorth> still hard to build, but many more possible locations
15:28:45 <andythenorth> unintended island
15:29:57 <andythenorth> I guess I could enforce clear water tiles to prevent this
15:31:36 <andythenorth> this might basically work though
15:51:38 <andythenorth> the point of bigger ports is just to enable fitting more stations in
15:51:54 <andythenorth> maybe I should add some pure land tiles
16:00:50 *** Wormnest has joined #openttd
16:04:51 <andythenorth> or some water structures that don't need to connect to land
16:12:07 <peter1138> Hmm, can't recreate in godbolt.
16:39:10 *** SigHunter has quit IRC (Remote host closed the connection)
16:40:14 *** SigHunter has joined #openttd
16:51:52 <andythenorth> procedural industry layouts?
16:52:20 <andythenorth> so we start at the N tile and then walk nearby tiles, placing blocks according to some rules?
16:53:07 *** frosch123 has joined #openttd
16:53:07 <frosch123> truebrain: that news string uses `{BLACK}{BIG_FONT}`, all other news strings use `{BIG_FONT}{BLACK}`. i guess some east-const person added that
16:53:18 <peter1138> Old as in it goes back to April 2004 if you like.
16:54:00 <frosch123> truebrain: what is the performance goal? factor 2x is easy (since it currently probably revalidates english for every translation), or do you want 100x?
16:55:51 <truebrain> 3s is a long time to wait for things to be loaded
16:56:10 <truebrain> But that can also be achieved by caching which strings are invalid server-side
16:57:26 <frosch123> 3s for all languages? translators only need one?
16:58:22 <frosch123> truebrain: i see that you pushed the normalized base language to nile-date. that won't work. validation needs to know the raw translation with `{RAW_STRING}` and `{STRING5]` preserved
16:59:07 <frosch123> ok, then i agree, that is too slow
16:59:27 <truebrain> frosch123: Then your README is unclear ๐
16:59:55 <frosch123> i'll call my lawyer
17:00:46 <truebrain> The bug in the lib is more annoying; I hope you can spot what is going on there ๐
17:02:42 <frosch123> the new-line thingie?
17:02:55 <frosch123> that is intentioanl
17:03:42 <truebrain> English.txt fails to validate
17:04:28 <frosch123> oh, you did hide a bug in a PR ๐
17:06:13 <frosch123> yes, i have a test already
17:07:42 <peter1138> Is it a bug in the library or a bug in english.txt?
17:09:15 <frosch123> nile has more and stronger checks than eints
17:09:59 <frosch123> ottd does not support strings with mixed fonts (i assume that did not change recently :p), thus the font size is always the first thing to set
17:10:30 <frosch123> except that there are 2 strings which set a color first
17:10:39 <frosch123> but they are inconsistent with all neighbouring strings
17:10:49 <frosch123> so i actually prefer to make english.txt consistent
17:11:18 <peter1138> Well.. they do actually work, so I'm not sure that "does not support" is correct.
17:12:11 <peter1138> Maybe with all the changes to layouters over time it was accidentally improved...
17:12:29 <frosch123> the vertical distance between lines used to be determined by the font height of the last run. so you could not mix fontsizes within a line
17:12:49 <frosch123> maybe i should allow new font sizes after new-line?
17:13:02 <peter1138> Most strings are single-line anyway.
17:31:22 <_glx_> the code definitely supports changing font inside strings, drawing them is another story
17:44:31 <truebrain> frosch123: Btw, what ever we do, nile and strgen should do the same. Otherwise nobody will ever notice ๐
17:46:17 <frosch123> not sure what you mean with that. but i won't add more validations to strgen, that's just a waste of time
17:46:31 <frosch123> strgen validates a minimum set of rules, so it can compile stuff
17:46:41 <frosch123> there are many more validations beyond that
17:48:17 <frosch123> eints already did check more than strgen
17:48:52 <truebrain> Not when it comes to English.txt
17:49:21 <truebrain> If nile would refuse a base string that strgen accepts, it will be unnoticed for a long time
17:49:34 <truebrain> So they at least should dance together
17:50:31 <frosch123> ah, for english only
17:51:04 <frosch123> i guess there are not that many english-only checks
17:51:47 <truebrain> the `{BIG_FONT}` thing is one of them ๐
17:56:05 <frosch123> truebrain: we have to consider the case that someone adds new string commands to ottd again. then the import script/action should fail and send angry mails/post here
17:56:40 <truebrain> I am now imagining angry birds
17:57:13 <frosch123> is "angry" so closely related to "twitter", that you think of "birds"?
17:58:22 <truebrain> is birds so closely related you think about twitter? Lol
17:58:58 <andythenorth> peter1138: or industry terraforming ๐
17:59:25 <frosch123> "angry" and "bird" on their own are fine. but in combination i think of "twitter", yes
17:59:34 <truebrain> that is on you ๐
18:01:00 <truebrain> ugh, lifetime issues .. hmmm
18:03:33 <Afdal> __karma, very simple feature request: allow for an optional in conditional orders to detect a vehicle's current speed :)
18:03:51 <truebrain> yeah, let's not do that
18:03:52 <Afdal> In fact it's so simply I'm tempted to dive into OpenTTD code and try to implement it myself...
18:04:19 <truebrain> frosch123: it is so annoying you can't make a static `String` ๐
18:04:52 <frosch123> yes, rust rejects the static initialisation fiasco
18:04:59 <frosch123> i also need to learn to work around that
18:05:16 <Afdal> Why wouldn't it be simple :'c
18:05:22 <frosch123> funnily c++ tries to go the other direction, by adding more constinit
18:05:51 <Afdal> Just use whatever method is currently being used to report vehicle speed in the GUI and use it to poll speed in conditional orders...
18:10:35 <_jgr_> Afdal: There are contexts in which orders need to be predicted (e.g. when pathfinding reservations past the current order destination), it may be worth considering how such a condition might interact with such cases
18:11:57 <frosch123> truebrain: you wrote the prototypes, i did not dare touch them ๐
18:11:57 <Afdal> Pathfinding calculation is done on orders that aren't the current order???
18:12:15 <truebrain> frosch123: be more daring! ๐
18:18:54 <truebrain> anyway, on average validating a translation takes 1ms
18:18:57 <truebrain> which is rather good ๐
18:19:02 <truebrain> we just have too many strings ๐
18:19:18 <truebrain> so maybe I should leave behind in the nile-data whether a string passed validation or not
18:19:52 <frosch123> i have a suspicion why the validation takes so long
18:20:14 <truebrain> the WASM -> Rust barrier won't be cheap either
18:20:16 <frosch123> i could not define regex as global statics, so currently i recreate them for every string
18:21:44 <frosch123> ah, that's how you do it
18:22:12 <truebrain> that is what rustc suggested me to do
18:23:10 <truebrain> either way, basic infrastructure is in (CI, publishing of packages, etc), so we have that going for us ๐
18:24:43 <frosch123> is your validate-all-strings thingie in the frontend, or in nile-tools?
18:24:54 <truebrain> I wanted to measure wasm time ๐
18:25:22 <truebrain> let me see if I can cook something up in nile-tools
18:27:00 *** HerzogDeXtEr has joined #openttd
18:28:10 <peter1138> truebrain: Is that code or configuration? It looks horrible...
18:28:24 <truebrain> that is a very vague question ๐
18:28:49 <peter1138> I prefer rhetorical.
18:30:33 <frosch123> there was a discussion in the at-work-forum again. several c and c++ fanboys were discussing religiously, why the rust community is so religious
18:31:11 <andythenorth> we don't like sprites overlapping other tiles?
18:31:11 <andythenorth> I want those 2 linking jetty tiles in the middle to be a bridge, but traversable by ships
18:32:00 <frosch123> the bridge won't open, if there is a ship
18:32:19 <frosch123> maybe draw it in opened state?
18:32:30 <frosch123> makes it more obvious that it is capable of opening
18:33:56 <andythenorth> this port has swing bridges
18:34:53 <andythenorth> hmm, is there a varact2 for 'vehicle on nearby tile'?
18:37:24 <truebrain> ghehe, writing something simple to validate all strings is a bit more tricky than I expected ๐
18:37:31 <truebrain> you also need nile-config for that ...
18:43:37 <truebrain> okay, I have something, but I cannot test because of that open bug/PR ๐
18:44:22 <truebrain> I really couldn't tell if it was a mistake in the english.txt or in the nile-library .. unicode still confuses me ๐
18:44:29 <frosch123> i am trying to find a soluton, which does not require "experimental" methods
18:47:18 <truebrain> so WASM has an overhead
18:55:27 <frosch123> pff, functional languages... once you know the solution, it's obvious
18:55:37 <truebrain> `nile-tools validate -c ../nile-config -d ../nile-data openttd-vanilla de_DE`
18:58:35 <truebrain> I like how easy it was to make subcommands ๐
18:58:59 <truebrain> and we need all this information anyway for export, so now we already have it ๐
19:00:45 <truebrain> ghehe, the truncate trick is nice ๐
19:01:08 <truebrain> haha, I cannot approve your solution, as I am the author of the PR ๐ Awesome
19:02:09 <truebrain> releasing 0.2.1 ๐
19:02:13 <frosch123> merge race-condition ๐
19:03:51 <truebrain> awesome, now validate works without a local change ๐ \o/
19:04:28 <truebrain> and no, the validate command doesn't output validation errors in a nice way yet ๐
19:06:13 <andythenorth> pff my FIRS ports project has arrived at the 'despair' phase of development ๐
19:06:23 <andythenorth> maybe I should put it in a branch and leave it there ๐
19:06:53 <frosch123> why do you need PathBuf instead of Path?
19:07:04 <frosch123> it reads like Path is the non-owning version of PathBuf
19:07:05 <truebrain> PathBuf works better in many places; but mostly, it works with Clap ๐
19:07:37 <truebrain> `The difference between Path and PathBuf is roughly the same as the one between &str and String`
19:07:41 <frosch123> hmm, nevermind, we also pass &String instead of &str
19:07:59 <truebrain> so yeah, Path is indeed non-owning ๐
19:08:55 <frosch123> i meant when passing it as parameter: `fn english(path: &PathBuf, commit: &String, validate: bool) -> LanguageJson` could be `fn english(path: &Path, commit: &str, validate: bool) -> LanguageJson`
19:10:27 <frosch123> no worries, i am just so pedantic, so i can learn it
19:10:55 <truebrain> it should all be PathBuf, as a new PathBuf is created is blame.rs .. but that is for another day ๐
19:11:21 <truebrain> I do like that I can do `.join("folder").join("folder2")` ๐
19:12:09 <frosch123> oh, str-join tripped me the other day. it's inverse to python. list.join(str), instead of str.join(list) ๐
19:12:33 <truebrain> the Python variant never made sense to me ๐
19:13:50 <truebrain> oops, forgot to update the README .. owh well, needs a rewrite anyway
19:14:02 <frosch123> i am sure future devs will hate us, for baking the langfile ##pragmas into nile-tools, so ottd cannot add more as it pleases
19:14:35 <truebrain> haha, I am sure they won't care, and push it down to us ๐
19:15:02 <truebrain> either way, happy-performance-increasing ๐
19:15:18 <andythenorth> Hmm so one cause of FIRS port despair is player building them. Placing them on any coast except SE requires guess-clicking sea tiles, until an appropriate one is found for the industry N tile.
19:15:18 <andythenorth> Could we have grf defined the spawn tile, instead of defaulting to (0, 0) in the layout? (or even multiple spawn tiles)
19:15:34 <truebrain> `{ path = "../nile-library" }`, in case you don't know how to do this in Cargo.toml ๐
19:19:10 <frosch123> oh, i just wanted to ask that :p
19:19:30 <frosch123> i guess i am lucky i read backlog before asking
20:00:46 <frosch123> validate takes 30s here, why is your computer 10x faster than mine?
20:01:11 <frosch123> oh, it says debug build
20:01:18 <truebrain> try with `--release` ๐
20:07:20 <frosch123> lol, indeed making the Regex::new into lazy statics reduces the time to 0.07s
20:07:55 <frosch123> i already wanted to make it static when i wrote that code, but did not know how then
20:09:04 <truebrain> well, always good to first have things slow ๐
20:14:38 <truebrain> will check later what this does in WASM world ๐
20:21:53 <peter1138> Hmm, I guess a used_bitmap type thing would be efficient here.
20:24:19 <truebrain> frosch123: works in WASM-land too
20:24:24 <truebrain> nearly no loading time now ๐
20:24:24 <frosch123> ok, apprently my command-duplicate checking is too strict
20:24:35 <frosch123> translators are allowed to repeat stuff
20:24:52 <frosch123> truebrain: magic ๐
20:28:38 <frosch123> hmm, but this breaks my idea of color validation
20:31:07 <frosch123> aw, also found a valid case of adding more line-breaks
20:41:28 <peter1138> How do I get the owner of an Object?
20:50:03 <peter1138> Are objects always full rectangles, or can they have gaps? i.e. is o->location.tile guaranteed to be correct...
20:50:40 <peter1138> Ah, UpdateObjectColorus() does that. One single place ๐
20:51:55 <andythenorth> limitation corners disturbs me greatly
20:52:26 <andythenorth> I know we can't fix it due to disconnecting trains ๐
20:52:35 <andythenorth> I saw the patch ๐
20:58:21 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:59:30 <andythenorth> peter1138: can't have stations with track orthogonal to slope direction
20:59:59 <andythenorth> orthogonal? parallel?
21:00:29 <andythenorth> anyway, if there's rail continuation on the next height level down, trains try to traverse the tiles, then disconnect
21:00:41 <andythenorth> rubidium patched it years ago and showed me the effect
21:03:22 <peter1138> I mean... trains can definitely go up and down slopes.
21:03:45 <peter1138> That just means the patch was broken/incomplete.
21:04:21 <peter1138> Oh I see. You're doing the thing again where you expect a sloping tile to actually not be a sloping tile. Got you.
21:05:54 <andythenorth> stations on these corners slopes
21:07:06 <peter1138> Slopes down into the water, yes.
21:09:15 <kale91> Makes anything stub end that's elevated or on water a bit awkward to build
21:22:26 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:36:35 <andythenorth> is there a way to prevent rear foundations on stations?
21:36:52 <andythenorth> (the stone foundation sprite behind the rail tiles)
21:38:38 <_glx_> but a foundation is required because slope
21:40:07 <andythenorth> oh maybe this will never work actually
21:40:19 <andythenorth> I'm trying to only show custom foundations at sea level
21:40:38 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:40:57 <andythenorth> but the foundations are an action 0 flag
21:55:18 <frosch123> i wonder whether anything of that is useful for dosbox, or whether everything was reverse engineered before
21:56:14 <frosch123> "86-DOS High-performance operating system for the 8086 version 1.25"
21:57:50 <frosch123> i found a typo, but the repo is archived, so i can't PR a fix
23:28:28 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:42:26 *** tokai|noir has joined #openttd
23:42:26 *** ChanServ sets mode: +v tokai|noir
23:49:22 *** tokai has quit IRC (Ping timeout: 480 seconds)
continue to next day โต