IRC logs for #openttd on OFTC at 2023-04-28
โด go to previous day
00:13:32 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:13:44 *** WormnestAndroid has joined #openttd
00:20:13 *** Smedles has quit IRC (Read error: Connection reset by peer)
00:20:49 *** Smedles has joined #openttd
01:22:01 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
01:22:41 *** WormnestAndroid has joined #openttd
01:22:42 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
02:18:55 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:00:04 *** herms has quit IRC (Quit: bye)
03:59:05 *** D-HUND is now known as debdog
04:06:08 *** azubieta6082266 has quit IRC ()
04:07:07 *** azubieta6082266 has joined #openttd
05:41:39 *** debdog has quit IRC (Quit: Initiating getting-the-hell-out-of-here maneuver!)
05:45:05 *** twpol has quit IRC (Read error: Connection reset by peer)
05:53:38 *** debdog has quit IRC (Quit: Initiating getting-the-hell-out-of-here maneuver!)
07:37:10 <Rubidium_> ... mostly because std::string_views are not '\0' terminated and strcasecmp expects that. Now I could roll my own strcasecmp variant that works with std::string_view, but then I'll probably get a complaint that it doesn't work for ร vs รก, so I'd have to convert to wide characters and all the fun in there... and then we might be better off to just change std::string to std::wstring (almost) everywhere
07:48:56 <TrueBrain> maybe be fancy and use `std::equal` instead?
07:49:59 <TrueBrain> (and `std::tolower`)
07:50:09 <TrueBrain> no clue if that makes it any better ๐
07:50:12 <petern> What's the advantage of converting lots of strcasecmp/strncasecmp to a function that just calls those anyway, but has to do more because of the lack of nul termination?
07:51:37 <petern> TrueBrain: I think that won't handle utf8.
07:52:43 <petern> (Not without std::wstring (almost) everywhere)
08:00:45 <Rubidium_> petern: not having to .c_str() everywhere, and implement case insensitive StartsWith/EndsWith while using the same function. And if someone fancies rewriting the case insensitive compare (for that PR), have a go at it
08:07:56 <Rubidium_> it was LordAro that got triggered by me adding .c_str() to calls to strcasecmp, so that's what got this started
08:11:29 <glx[d]> petern: seems it handles utf8 locale
08:19:40 <glx[d]> oh but it's with wchar_t (I wrongly read the example)
08:58:02 <LordAro> Rubidium_: you were quite welcome to say "no that's not feasible" :p
09:06:55 <Rubidium_> well, this saves a lot of hassle later down the line. As now working with string views becomes, for these comparisons at least, a lot easier. So we can remove more stredup-because-we-need-to-'\0'-terminate some part of the string stuff. Still a long way to go though... looking at you gamelog!
09:08:10 <Rubidium_> that'll likely be the last char[]/char* in the savegame, after which the SLE_STR() macro can be removed
09:08:36 <Rubidium_> story/goal/newgrf configuration are relatively simple, but alas... rabbit holes
12:05:10 <petern> LordAro, ahhh, about 4-5 pages of "person joined a challenge" message in my Strava feed.
12:15:00 <Eddi|zuHause> so, i got that ticket now...
12:15:14 <Eddi|zuHause> let's see how much i actually use it
12:34:56 <LordAro> petern: it is that time of the month again
12:43:19 <petern> Well the bottom bracket arrived, glad I didn't pay extra for next-day delivery.
12:46:23 <glx[d]> there are some crazyness with {TINY_FONT} and {BLACK} in DrawVehicleListItems(), all strings start with {TINY_FONT}{BLACK} and may include each other, that's silly
12:59:08 <petern> Of course there's the bonus that two letter abbreviations aren't enforced, but that's not the end of the world, nor necessary anyway.
12:59:29 <petern> This particular NewGRF however likes to prefix all cargo strings with a space, so it looks pretty silly.
12:59:48 <petern> That's why they are not centre-aligned here.
13:05:27 <glx[d]> main issue when removing strings is the build time ๐
13:08:38 <petern> Yeah, I need to fix my concurrency settings, it grinds my whole computer to a halt.
13:34:47 <petern> I must add the NWidgetPart for font size as well, or more likely change SetTextColour to include it.
14:19:40 <andythenorth> did we discuss lunch?
14:20:30 <Eddi|zuHause> dunno, i was out getting this 49โฌ ticket thing over with
14:20:44 <Rubidium_> andythenorth: no, I ate it
14:21:25 <Eddi|zuHause> and i faced the first problem: on sundays and holidays, there's no bus into the city before 11AM
14:26:48 <glx[d]> petern: Yeah I think it's better to modify SetTextColour
15:18:50 *** Eddi|zuHause has quit IRC (Read error: Connection reset by peer)
15:20:51 *** Eddi|zuHause has joined #openttd
15:32:45 <glx[d]> STR_TINY_BLACK_HEIGHT is a deep rabbit hole
15:34:33 *** HerzogDeXtEr has joined #openttd
16:00:32 <petern> "a precision of 5 thousandths of a millimetre, which in inches is... another number" Best conversion ๐
16:03:16 <Eddi|zuHause> there is a range where converting to non-metric is just nonsense...
16:03:55 <Eddi|zuHause> when the purpose of non-metric is to emphasise "human scale"
16:04:16 <Eddi|zuHause> anything microscopic or macroscopic should just exist in metric space
16:04:46 <Rubidium_> astronomers are pretty non-metric
16:05:02 <Rubidium_> parsec, light year, N times mass of sun, etc.
16:05:56 <Eddi|zuHause> last i checked metric units are based on light speed
16:06:29 <petern> They don't measure in micrometres though ๐
16:07:40 <Rubidium_> Eddi|zuHause: imperial too
16:08:07 <Eddi|zuHause> let's not go there :p
16:32:05 *** virtualrandomnumber has joined #openttd
16:32:35 *** virtualrandomnumber has quit IRC ()
17:04:53 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:06:35 *** WormnestAndroid has joined #openttd
17:09:11 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:10:01 *** WormnestAndroid has joined #openttd
17:14:04 *** WormnestAndroid has quit IRC (Remote host closed the connection)
17:14:37 *** WormnestAndroid has joined #openttd
17:22:43 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:22:57 *** WormnestAndroid has joined #openttd
17:23:29 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:23:59 *** WormnestAndroid has joined #openttd
17:51:00 <glx[d]> I can't remember the rule about modifying other languages
17:51:26 <glx[d]> eints will revert the changes ?
17:58:17 <Rubidium_> might be something for just before branching 14, right?
18:10:28 <Rubidium_> too bad 28 and 30 include 27, so 27 needs to go first and then a rebase :(
18:11:09 <Rubidium_> though I appreciate the review effort!
18:12:03 <TrueBrain> Reading the yolo, was there some actual effort taking place? :p
18:14:14 <LordAro> it's nice to be able to trust that RB knows what he's doing though
18:14:28 <LordAro> i've spent the last week with the opposite for my colleagues...
18:16:57 <petern> Heh, I have stashes that switch to stdint types, but figured it would be too much :p
18:17:18 <TrueBrain> LordAro: In RB we trust! ๐
18:17:58 <Rubidium_> LordAro: I know that feeling with colleagues
18:18:00 <petern> Attempting #10733 is what keep crashing my VS Code ๐
18:18:06 <TrueBrain> I wouldn't mind the uint8 -> uint8_t .. but it breaks all patches, and patchpacks might have a hard time dealing with it .. but it is nice to follow standards. Making things easier for new people joining.
18:18:50 <Rubidium_> luckily the vast majority can be done by my friend sed
18:18:57 <LordAro> idk, i think i'd just leave it at this point
18:19:01 <petern> Why did you do the manual one first?
18:19:02 <LordAro> the decision was made
18:20:23 <Rubidium_> petern: because changing those with sed were a bit cumbersome, though it could probably be done. Main problem is out Send_uintX, Recv_uintX functions in packets
18:21:13 <petern> Hmm, with VS Code I can just search and replace for whole words with the right case. Simples. Except my code analysis plugins get upset while it's doing it ๐
18:39:44 <andythenorth> shall I just do a wagon variant for each company colour?
18:39:59 <andythenorth> currently I'm pissing around trying to pick 'top 4 nice company colours' for wagons
18:40:31 <andythenorth> this is for the groups case where the wagon colour can't be set ๐
18:42:17 <DorpsGek> - Update: Translations from eints (by translators)
18:42:26 *** bigyihsuan has joined #openttd
18:42:26 <bigyihsuan> andythenorth: would it be possible to get the company colors of all companies in the save, and use those when there's >1 company? (otherwise (maybe as a config option?) use all random colors)
18:43:01 <andythenorth> is that a desirable thing? ๐
18:43:17 <petern> Not sure how using other companies' colours is useful.
18:43:24 <andythenorth> how many random bits do vehicles have now?
18:43:37 <andythenorth> I need at least 4 bits to choose 16 random CC variants?
18:45:59 <petern> Use 2 random bits to give 4 varieties, mixed with the company colour.
18:49:04 <glx[d]> The branch name doesn't lie
18:50:47 *** gelignite has joined #openttd
18:54:23 <glx[d]> Lol mingw fails for the same reason as VS but it does it way faster
19:01:12 <andythenorth> wonder if I can pick random bits across the whole consist?
19:01:28 <andythenorth> vehicles choose whether to use neighbour's random bits, or their own
19:01:36 <andythenorth> creating short runs of similar wagons
19:01:38 <bigyihsuan> andythenorth: i like my variety in my manifests, even in unit trains you don't really see all the same cars from the same railroads do you? ๐
19:01:38 <bigyihsuan> like you can have the same kind of car made by the same manufacturer but they'll be painted differently because they're owned by different railroads kind of thing
19:02:27 <andythenorth> current randomisation works like this
19:02:57 <andythenorth> hmm what if I only wanted to randomise green + blue
19:03:05 <andythenorth> that would be 256 variants
19:03:05 <petern> Hmm, next-level infrastructure sharing, consist mixing...
19:03:13 <andythenorth> oh, but if 3 company colours
19:03:38 <andythenorth> can I have 65536 variants per wagon?
19:04:04 <bigyihsuan> petern: oh how i want that shunting patch, exchange cars not cargo transfers hehe
19:04:13 <petern> You'd hit the engine limit, and the vehicle limit ๐
19:04:21 * andythenorth gatekeeping mode enabled: shunting patch will never work
19:04:34 <andythenorth> not in any sensible way without horrible limits or edge cases
19:04:45 <andythenorth> or, alternatively, throwing out grf
19:07:08 <bigyihsuan> hmm an ottd-like game but instead of working on the train level you work on the car level instead
19:08:56 <bigyihsuan> i think i just like the pipe-dream whimsy of just happening to see a car owned by a rival company on the other side of the map pop into your network
19:09:22 <petern> Easy, cars are road vehicles. Done.
19:09:58 <bigyihsuan> petern: but road vehicles are no fun ๐
19:14:07 <andythenorth> petern: you had a patch for vehicles-in-vehicles ๐
19:16:56 *** Kuhnovic has joined #openttd
19:16:56 <Kuhnovic> Are PRs merged automatically when they are approved, or do I need to do anything?
19:20:06 <andythenorth> someone has to merge ๐
19:26:38 <TallTyler> Kuhnovic: Some of the CI checks were reorganized, so #10695 needs to be rebased and force-pushed to start those checks, and then re-approved
19:26:47 <TallTyler> Assuming that's what you're talking about ๐
19:27:03 <TallTyler> That's why I just rebased and pushed mine above
19:31:38 *** GeorgeVB has joined #openttd
19:31:38 <GeorgeVB> Strings containing {PUSH_COLOUR} and {POP_COLOUR} in name callback crash OTTD 20230413 nighty
19:31:38 <GeorgeVB> STR_LONGNAME_ED9E_C :ED9E ({PUSH_COLOUR}{LTBLUE}Car{POP_COLOUR}) (EMU)
19:31:38 <GeorgeVB> STR_LONGNAME_ED9E_H :ED9E ({PUSH_COLOUR}{GOLD}Head car{POP_COLOUR}) (EMU)
19:31:38 <GeorgeVB> STR_LONGNAME_ED9E_M :ED9E ({PUSH_COLOUR}{DKGREEN}Motorized car{POP_COLOUR}) (EMU)
19:33:00 <Eddi|zuHause> ok, that may be counter productive, as red is also a colour :p
19:33:50 <andythenorth> null termination ๐
19:36:43 <petern> Rebased, not reopened ๐
19:36:46 <Kuhnovic> TallTyler: Yes that's the one I'm talking about ๐ I'll update it
19:37:03 <Kuhnovic> petern: Different feature ๐
19:38:15 <Kuhnovic> That's the one that needed a rebase ๐
19:49:40 <petern> TC_NO_SHADE to prevent the shadow is triggering the assert.
20:08:35 <petern> Urgh, removing the parallel build flag has made it run away, I'm sure.
20:10:02 <petern> Dropped Doom down to 3 fps :p
20:10:22 <petern> Maybe it's time to switch to WSL/Linux.
20:21:19 <petern> That doesn't crash 13.1 only because asserts are disabled on release.
20:22:03 <petern> Tempted to TC_FORCED when drawn in white (highlighted) too.
20:30:10 <andythenorth> what if we could multiple select vehicles in buy menu
20:30:19 <andythenorth> then have 'buy random from selected'?
20:38:47 *** Wormnest has joined #openttd
21:07:48 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
21:07:57 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:08:45 *** WormnestAndroid has joined #openttd
22:10:18 <glx[d]> oh so the TC_FORCED check couldn't work with the assert
22:21:56 <glx[d]> the things I always fail to check ๐
22:33:56 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:50:31 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
continue to next day โต