IRC logs for #openttd on OFTC at 2023-02-14
            
02:45:42 <DorpsGek> [OpenTTD/OpenTTD] krysclarke commented on pull request #10476: Copy wagon configuration to all trains in shared orders/group. https://github.com/OpenTTD/OpenTTD/pull/10476#issuecomment-1429029473
02:52:16 *** Wormnest has quit IRC (Quit: Leaving)
02:55:57 <DorpsGek> [OpenTTD/OpenTTD] serg-bloim updated pull request #10476: Copy wagon configuration to all trains in shared orders/group. https://github.com/OpenTTD/OpenTTD/pull/10476
03:00:14 <DorpsGek> [OpenTTD/OpenTTD] innocenat commented on issue #10474: [Crash]: Change setting caused assert failure https://github.com/OpenTTD/OpenTTD/issues/10474
03:06:32 *** tokai|noir has joined #openttd
03:06:32 *** ChanServ sets mode: +v tokai|noir
03:13:17 *** tokai has quit IRC (Ping timeout: 480 seconds)
03:27:44 <DorpsGek> [OpenTTD/OpenTTD] github-code-scanning[bot] commented on pull request #10476: Copy wagon configuration to all trains in shared orders/group. https://github.com/OpenTTD/OpenTTD/pull/10476#pullrequestreview-1296775702
03:48:29 *** D-HUND has joined #openttd
03:51:50 *** debdog has quit IRC (Ping timeout: 481 seconds)
04:18:13 *** TROILUS7 has joined #openttd
04:20:47 *** TROILUS has quit IRC (Ping timeout: 480 seconds)
04:21:28 *** TROILUS7 is now known as TROILUS
04:50:17 *** keikoz has joined #openttd
04:58:50 *** Flygon has joined #openttd
05:38:32 <DorpsGek> [OpenTTD/OpenTTD] serg-bloim commented on pull request #10476: Copy wagon configuration to all trains in shared orders/group. https://github.com/OpenTTD/OpenTTD/pull/10476#issuecomment-1429150205
06:00:19 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:05:15 <DorpsGek> [OpenTTD/OpenTTD] fmang opened issue #10477: [Bug]: Build bridge window truncates speed and cost https://github.com/OpenTTD/OpenTTD/issues/10477
06:05:54 *** sergbloim has joined #openttd
06:05:54 <sergbloim> Hi there!
06:05:54 <sergbloim> I have a newbie question. I see that github pipelines deploy a browser version of OpenTTD for PR. Which is awesome! I didn't even expect that is possible. My question is the following:
06:05:54 <sergbloim> Where in sources can I place a savefile, so when ppl run browser OpenTTD, they already have a savefile with setup for testing/verification?
06:21:18 <LordAro> i'm not sure, but afaik the usual saveload dialogs should work
06:36:54 <sergbloim> They do work. And I wanted to include a save file into my PR, so ppl can actually play it altogether with my code change.
07:03:33 <pickpacket> I've compiled 13.0 with the reldebiansomething flag so that it's not in debug mode. It's at 100% CPU when I'm in the main menu. What's up with that?
07:04:27 <pickpacket> generating a map takes almost twice as long as in 12.2
07:15:22 <pickpacket> I’ll have to double check that compile tonight
08:18:44 *** sla_ro|master has joined #openttd
08:27:23 <LordAro> pickpacket: 13.0 was accidentally released with asserts still turned on, but it shouldn't be making thst much difference
08:27:46 <LordAro> sergbloim: probably just link it in the PR
08:28:12 <LordAro> we can add the preview label so the web build is right there
08:35:10 <pickpacket> LordAro: How do I turn them off?
08:35:42 <LordAro> there's a setting somewhere in the cmake files
09:03:12 <andythenorth> Is cat?
09:03:43 <andythenorth> 13.1, with some backports also?
09:03:49 <andythenorth> πŸ™ƒ
09:06:44 <LordAro> probably
09:13:37 *** urdh_ has quit IRC (Ping timeout: 480 seconds)
09:16:34 *** D-HUND is now known as debdog
09:22:39 <petern> It's RelWithDebInfo, nothing to do with Debian πŸ™‚
09:24:27 <pickpacket> petern: my morning brain couldn't remember XD
09:48:21 <petern> Hmm, I need to trim some of these vinyl recordings... they don't automatically stop and sometimes I forgot πŸ™‚
10:07:42 <kamnet> Because they can't, they don't, and they won't stop, you say?
10:25:13 *** Samu has joined #openttd
10:29:16 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #10475: Codechange: Decouple INDUSTRY_CTRL into separate commands https://github.com/OpenTTD/OpenTTD/pull/10475
11:44:52 <DorpsGek> [OpenTTD/OpenTTD] fmang commented on issue #10477: [Bug]: Build bridge window truncates speed and cost https://github.com/OpenTTD/OpenTTD/issues/10477
11:58:23 <Samu> hi
11:58:40 <Samu> how do I detect a station was serviced recently with a gs?
12:10:32 <DorpsGek> [OpenTTD/OpenTTD] PikkaBird commented on issue #10477: [Bug]: Build bridge window truncates speed and cost https://github.com/OpenTTD/OpenTTD/issues/10477
12:20:02 *** keikoz has joined #openttd
12:27:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #10477: [Bug]: Build bridge window truncates speed and cost https://github.com/OpenTTD/OpenTTD/issues/10477
12:59:23 <DorpsGek> [OpenTTD/OpenTTD] fmang commented on issue #10477: [Bug]: Build bridge window truncates speed and cost https://github.com/OpenTTD/OpenTTD/issues/10477
13:18:29 *** urdh has joined #openttd
13:31:24 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #10477: [Bug]: Build bridge window truncates speed and cost https://github.com/OpenTTD/OpenTTD/issues/10477
13:33:41 <Rubidium> LordAro & pickpacket: a release with asserts is about 50% slower than one without using the Wentbourne "benchmark" on my computer (with -v null)
13:37:44 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #10396: Change: More icon space size by interface scaling. https://github.com/OpenTTD/OpenTTD/pull/10396
13:51:04 <pickpacket> Rubidium: that sounds about on par with my experience with this build
14:02:00 <glx[d]> But the asserts catch a weird thing in #10474
14:25:19 <sergbloim> LordAro: I can link a file, but how ppl load it into a browser game? Is it possible? As I can see, browser version uses some virtual isolated file system.
14:25:19 <sergbloim> I assumed that in pretty much every project build tool there are sources that are compiled and resources are simply copied into the output directory. Are there any static files in OpenTTD project that build tool simply copy into the build?
14:34:19 <Xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1075062441056153700/Unnamed_1950-06-14.png
14:34:19 <Xarick> overdose of information?
14:40:21 <Samu> i'm not sure how to compute percentages when negative number are involved
14:52:13 <Samu> @calc 5756/9057
14:52:13 <DorpsGek> Samu: 0.6355305288726951
14:52:23 <Samu> 63% but i have it displaying 48%
14:52:45 <Samu> my magic calculations are off
14:59:40 *** nielsm has joined #openttd
15:11:39 <Samu> i could also display the min profit
15:11:42 <Samu> the worst
15:11:48 <Samu> more information overdose
15:22:04 <LordAro> sergbloim: i'm pretty sure there's a way, but i'm not sure
15:22:09 <LordAro> might need a TrueBrain as input
15:24:03 *** HerzogDeXtEr has joined #openttd
15:25:08 <Xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1075075228943781950/Unnamed_1955-06-17.png
15:25:32 <Samu> how informative is that table?
15:25:47 <Samu> btw the title is bugged because it uses footer as name
15:44:21 <Samu> glx[d], were you doing the fix for the title being equal to footer?
15:45:22 <TrueBrain> LordAro: os/emscripten should give enough snippets how to add extra files. I think :d
15:58:34 *** sla_ro|master has quit IRC ()
16:14:43 *** TROILUS has quit IRC (Remote host closed the connection)
16:14:54 *** TROILUS has joined #openttd
16:19:16 *** TROILUS3 has joined #openttd
16:21:31 *** TROILUS2 has joined #openttd
16:21:36 *** TROILUS3 has quit IRC ()
16:21:53 *** TROILUS has quit IRC (Read error: Connection reset by peer)
16:21:54 *** TROILUS2 is now known as TROILUS
16:55:33 *** virtualrandomnumber has joined #openttd
16:55:34 *** TROILUS has quit IRC (Read error: Connection reset by peer)
16:55:46 *** TROILUS has joined #openttd
16:56:00 *** virtualrandomnumber has quit IRC ()
17:15:52 <DorpsGek> [OpenTTD/OpenTTD] EratoNysiad opened issue #10478: [Bug]: Noise control setting not disabling airport restrictons https://github.com/OpenTTD/OpenTTD/issues/10478
17:19:36 <Xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1075104036384145458/Unnamed_1950-01-0119.png
17:19:36 <Xarick> how do i make the text not split?
17:21:55 <DorpsGek> [OpenTTD/OpenTTD] James103 commented on issue #10478: [Bug]: Noise control setting not disabling airport restrictons https://github.com/OpenTTD/OpenTTD/issues/10478
17:22:33 <Xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1075104778599809115/Unnamed_1950-01-0120.png
17:22:33 <Xarick> slightly better, but still... I'd like to have some part of the text in one line
17:23:00 <DorpsGek> [OpenTTD/OpenTTD] PikkaBird commented on issue #10478: [Bug]: Noise control setting not disabling airport restrictons https://github.com/OpenTTD/OpenTTD/issues/10478
17:26:44 *** Wolf01 has joined #openttd
17:29:35 <DorpsGek> [OpenTTD/OpenTTD] EratoNysiad commented on issue #10478: [Bug]: Noise control setting not disabling airport restrictons https://github.com/OpenTTD/OpenTTD/issues/10478
17:29:36 *** TROILUS has quit IRC (Read error: Connection reset by peer)
17:29:58 *** TROILUS has joined #openttd
17:32:13 *** TROILUS1 has joined #openttd
17:32:20 <LordAro> that setting is terribly named
17:32:23 *** TROILUS has quit IRC (Read error: Connection reset by peer)
17:32:23 *** TROILUS1 is now known as TROILUS
17:35:30 <Pruple> the noise thing was always a terrible feature, should have just been unlimited airports from the start.
17:37:02 <andythenorth> Ogfx+ airports
17:37:05 <andythenorth> Solved in content
17:41:05 <dP> Xarick: Did you try using `{NBSP}`?
17:42:27 <dP> though looks like it just doesn't resize by header/footer
17:42:44 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #10479: Fix 5e14a20: [GS] Save league table title into string https://github.com/OpenTTD/OpenTTD/pull/10479
17:44:30 <Samu> yes, I tried {NBSP}
17:44:45 <Samu> on the first screenshot
17:45:20 <dP> SamuXarickviaGitHub: another way would be to just move title handling two lines lower
17:45:40 <dP> as header and footer are stored in strings anyway
17:51:09 <DorpsGek> [OpenTTD/OpenTTD] PikkaBird commented on issue #10478: [Bug]: Noise control setting not disabling airport restrictons https://github.com/OpenTTD/OpenTTD/issues/10478
17:51:43 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:52:37 *** WormnestAndroid has joined #openttd
17:53:24 <Samu> gonna fix it that way
17:56:30 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10479: Fix 5e14a20: [GS] Save league table title into string https://github.com/OpenTTD/OpenTTD/pull/10479
18:09:33 *** sla_ro|master has joined #openttd
18:18:08 <pickpacket> humdidum. Building 13.0 without asserts now
18:18:17 <pickpacket> gonna take some time
18:22:54 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:32:01 <andythenorth> Ok so can we give GS it’s own town permanent registers, accessed from grf by a specific var, or by putting a value in register 0x101 or so
18:33:15 <andythenorth> I want to provide a cue to grfs like ITL about what type of town it is, and what buildings it might prefer
18:33:52 <andythenorth> Alternate, if we really hate using registers, a var that GS can set with a word value, and grf can read
18:39:07 <glx[d]> Samu: I have something, just need to PR
18:39:07 <TrueBrain> frosch: odd ... the manylinux build today works fine for me?
18:39:37 <TrueBrain> I am somewhat confused ..
18:39:44 <frosch> i just set up a proper container to build and debug it
18:40:25 <frosch> then i wanted to instrument all the curl_ calls with some macro, that asserts on the return value
18:40:42 <frosch> you know... c being old trash has no exceptions, so you have to do them manually :p
18:40:45 <andythenorth> Hmm or region properties, not town
18:40:48 <TrueBrain> okay, now it no longer works ... but it worked at least once!
18:40:49 <andythenorth> Oof dunno
18:41:00 <TrueBrain> how most unusual
18:41:10 <andythenorth> WASM embeds for regions?
18:41:18 <TrueBrain> and yeah, I am doing the same thing .. and strongly considering using a std::thread after all
18:41:34 <andythenorth> Then an industry is just a region of n tiles with production WASM
18:41:47 <andythenorth> β€œArchitecture Astronauts”
18:42:04 <andythenorth> Any air to breathe when you’re that high?
18:42:15 <TrueBrain> but so it worked at least once .. so there is more to this than just "it doesn't work"..
18:42:20 <TrueBrain> mildly interesting
18:42:34 <TrueBrain> it smells like a timing issue πŸ˜›
18:42:36 <andythenorth> Ok lunchtime now
18:42:43 *** tokai|noir has quit IRC (Quit: c('~' )o)
18:46:40 <TrueBrain> disabling the `curl_multi_wait` solves the issue
18:46:42 <TrueBrain> right ...
18:46:45 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/228b34c2bfd7cc7753bffc4df573e5ffd952a62c
18:46:46 <DorpsGek> - Update: Translations from eints (by translators)
18:47:32 <TrueBrain> the idea of `curl_multi_wait` was to keep the UI responsive .. but honestly .. this is the nudge I need to make it into a http-thread .. this will be a never ending story of weirdness πŸ˜›
18:49:40 <frosch> curl_multi_wait worked fine with the regular debian build
18:49:54 <TrueBrain> yup, it does
18:50:05 <TrueBrain> but it fails even if I build a new libcurl on the manylinux
18:50:17 <TrueBrain> but the compilers are different
18:50:20 <TrueBrain> and it feels like a timing issue
18:50:38 <TrueBrain> I think the first `curl_multi_perform` is called "too quickly" or something
18:56:58 <frosch> ok, instrumented all curl_ return values, no error πŸ™‚
18:57:21 <TrueBrain> meh; this is stupid πŸ˜› But happily we find it now
18:57:25 <TrueBrain> and not when 14.0 lands πŸ˜„
18:59:07 <TrueBrain> hmm ... I want to use `std::condition_variable`
18:59:13 <TrueBrain> but ... when the clock jumps, it hangs
18:59:17 <TrueBrain> do we care? Do we already use it?
18:59:26 <TrueBrain> we already use it! \o/
19:03:25 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
19:05:55 <frosch> std::condition_variable is pretty low level, isn't there a higher-level thing to use?
19:06:10 <TrueBrain> no clue; I just know it is buggy in most compilers ..
19:06:15 <TrueBrain> and I just wanted a thread-safe queue
19:06:28 <TrueBrain> so std::queue + std::mutex + std::condition_variable, and we are good to go!
19:06:55 <nielsm> I think the version of C++ used has promises/futures
19:13:41 *** WormnestAndroid has joined #openttd
19:13:57 <TrueBrain> `malloc(): unaligned tcache chunk detected` .. what did I do .. oh-oh πŸ˜›
19:15:18 <TrueBrain> in `ViewportSortParentSpritesSSE41`... eeuuuhhhh
19:15:42 *** urdh has quit IRC (Quit: Boom!)
19:16:15 <LordAro> smashed stack?
19:17:04 *** urdh has joined #openttd
19:17:30 <frosch> TrueBrain: it works now
19:18:02 <frosch> https://curl.se/libcurl/c/curl_multi_wait.html <- the example always calls both multi_perform and multi_wait, while ottd only calls multi_wait
19:18:24 <frosch> moving the early return after multi_perform makes it work
19:18:28 <dP> hm, does that count as a bug if game crashes when newgrf id changes? xD
19:18:34 <TrueBrain> yeah, that I mentioned earlier, or try to πŸ˜‰
19:18:45 <TrueBrain> but my hope was that wait would trivially notify when there was no action
19:18:49 <TrueBrain> so the count-loop can be aborted
19:18:53 <TrueBrain> and a GUI redrawn can be done
19:18:59 <TrueBrain> otherwise we might as well just remove the wait
19:19:04 <TrueBrain> call perform once, and leave
19:19:15 <TrueBrain> but that slows down overall download speed
19:19:32 <frosch> no, i now call both perform and wait regulary
19:19:47 <frosch> before perform was only called one on start, and then only when wait returned something
19:19:50 *** Wormnest has joined #openttd
19:19:51 <TrueBrain> but the wait doesn't add anything, if you don't do the early return πŸ™‚
19:20:03 <TrueBrain> so you might as well throw it out πŸ˜›
19:20:11 <TrueBrain> perform mentions it does nothing if there is nothing to do
19:20:44 <TrueBrain> my idea was this: if `wait` says there is nothing to do, redraw GUI. If `wait` says there is something to do, `perform` and repeat that up to 100 times before redrawing GUI
19:20:53 <TrueBrain> to balance GUI responsiveness vs download-speed
19:21:09 <TrueBrain> but given that `wait` doesn't work that way, there is no point in calling it, I would think
19:21:16 <TrueBrain> and just call `perform`, and be done with it πŸ™‚
19:21:25 <TrueBrain> `wait` is meant to have a timeout value, in their example
19:24:54 <frosch> my assumption is, that we need to call perform multiple times to complete the request
19:25:06 <frosch> as long as the request is not complete, wait will not get a response
19:25:20 <TrueBrain> it does on Ubuntu
19:25:25 <TrueBrain> that is why it works for us
19:26:17 <TrueBrain> and it worked at least once for the manylinux variant too for me; so to me it feels like wait doesn't always detect activity correctly or something ..
19:26:30 <TrueBrain> maybe when the socket hasn't been setup or something
19:26:45 <TrueBrain> I find it weird πŸ˜›
19:27:14 <frosch> download is definitely slower without the loop
19:27:22 <TrueBrain> yup
19:27:29 <TrueBrain> so my thinking now is .. what if we just do this sync
19:27:31 <TrueBrain> in a thread
19:27:39 <TrueBrain> that way we don't care about any of this πŸ˜„
19:28:08 <TrueBrain> that seems to work, except that I seem to be getting callbacks during GUI redraws, and that seems to cause some malloc issues ... not sure yet why 😦
19:30:00 <frosch> ok, even with the loop it is slow with _wait
19:30:05 <frosch> so _poll did something else
19:31:21 <TrueBrain> hmm, we have no code to wait for the draw-thread to finish .. πŸ˜„
19:31:23 <frosch> haha, did you ever cancel a download, and then restart it?
19:31:28 <frosch> it's completely broken
19:31:34 <TrueBrain> you are not the first to mention
19:31:39 <TrueBrain> petern: has a ticket for it πŸ™‚
19:31:55 <frosch> ok, so peter did πŸ™‚
19:32:04 <TrueBrain> a very old bug btw πŸ™‚
19:35:21 <frosch> hmm, i thought i had understood how this works, but i didn't...
19:35:35 <frosch> i assumed Receive was called regulary
19:35:38 <frosch> but it isn't...
19:35:45 <TrueBrain> it should? Every tick or so?
19:36:34 <frosch> oh, lol
19:36:43 <frosch> dbg: [net] HTTP request failed: Problem with the SSL CA cert (path? access rights?)
19:36:47 <frosch> it fell back to non-curl
19:36:54 <frosch> that's why it's no longer called πŸ™‚
19:36:57 <TrueBrain> πŸ˜„
19:37:17 *** urdh has quit IRC (Quit: Boom!)
19:37:22 <TrueBrain> I think I know why the current code fails ..
19:37:27 <TrueBrain> I never check the first perform
19:37:30 <TrueBrain> if the counter is zero
19:37:51 <TrueBrain> so I think the transfer is already terminated there and then
19:37:51 <frosch> ok, so my earlier reports of "it works" is not quite right
19:37:58 <frosch> it no longer freezes, but succesfully fails πŸ™‚
19:38:21 <frosch> oh, i check the first perform
19:38:37 <frosch> it returns no errorcode and 1 running
19:39:14 <TrueBrain> meh
19:39:25 <frosch> in fact i just called perform + wait 4 times in the loop until it reported the cert failure
19:41:35 <TrueBrain> but so it is cert problems after all
19:41:35 <TrueBrain> lol
19:41:50 <TrueBrain> well, let's collapse this in a non-async method first .. if I can get my stupid queue to work πŸ˜›
19:42:07 <TrueBrain> I fail to do so without copying the object .. wauw
19:42:40 <frosch> ok, i'll look into the cert stuff then
19:42:57 <TrueBrain> how hard is it to use a std::queue without copying the object ....... you would think I can do that by now ...
19:43:20 *** urdh has joined #openttd
19:43:54 <TrueBrain> owh, I remember
19:43:56 <TrueBrain> queue was annoying
19:44:03 <TrueBrain> `front()` doesn't release the object
19:46:43 <frosch> and pop() does not return it πŸ™‚
19:46:48 <TrueBrain> it is so stupid
19:47:02 <TrueBrain> `* Initializing NSS with certpath: none`
19:47:07 <TrueBrain> now at least it shows problems properly
19:47:09 <TrueBrain> w00p!
19:47:38 <TrueBrain> so yeah, this really seems to be a problem between CentOS and Debian layouts ..
19:48:43 <frosch> https://curl.se/libcurl/c/CURLOPT_CAPATH.html <- default is detected at build time
19:48:57 <TrueBrain> ... I am not surprised for some reason πŸ˜›
19:49:15 *** urdh has quit IRC (Quit: Boom!)
19:50:05 <TrueBrain> so we just drop Linux now, right?
19:50:07 <TrueBrain> too hard
19:51:47 *** urdh has joined #openttd
19:56:52 <frosch> hmm, how compatible are the cert files themself?
19:57:12 <frosch> in both debian and manylinux there is /etc/ssl/certs
19:57:18 <frosch> and even if i set that path, it still fails
19:57:24 <TrueBrain> but in manylinux it is not storted in that folder πŸ˜›
19:57:35 <TrueBrain> I think it is in `/etc/pki/tls/certs/`, as bundle
19:57:37 <TrueBrain> not 100% sure
19:57:49 <TrueBrain> on Debian, you can easily find them, as they are separate files
19:58:27 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #10480: Codechange: move curl into a thread so simplify code https://github.com/OpenTTD/OpenTTD/pull/10480
19:58:27 <frosch> ok, manylinux has symlinks in /etc/ssl/certs to /etc/pki/...
19:59:00 <frosch> so, what is that curlopt then... a path or a file
19:59:53 <frosch> ah, there is also CURLOPT_CAINFO
20:00:51 <pickpacket> oh yeah. Turning off asserts made a big difference.
20:02:12 <TrueBrain> hmm, downloaded almost all the AIs πŸ˜›
20:02:13 <TrueBrain> annoying πŸ˜„
20:02:56 <frosch> i just rm the content_download stuff again
20:03:15 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #10480: Codechange: move curl into a thread so simplify code https://github.com/OpenTTD/OpenTTD/pull/10480#pullrequestreview-1298323415
20:03:43 <DorpsGek> [OpenTTD/OpenTTD] serg-bloim updated pull request #10476: Copy wagon configuration to all trains in shared orders/group. https://github.com/OpenTTD/OpenTTD/pull/10476
20:04:07 <frosch> setting CAINFO is still not enough, no idea whether it would work even if i set it correctly, or whether the cert versions are specific to the linked ssl version, and incompatible otherwise
20:04:22 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #10480: Codechange: move curl into a thread so simplify code https://github.com/OpenTTD/OpenTTD/pull/10480#pullrequestreview-1298325193
20:06:21 <TrueBrain> frosch: I don't understand these settings πŸ˜›
20:06:40 <TrueBrain> it seems to have no influence what you put in them, unless you make them both nullptr
20:06:42 <TrueBrain> then nothing works
20:08:08 <TrueBrain> maybe the curl is a bit old on the manylinux .. let's try a newer version
20:08:55 <dP> looking at this wagon callback, do I understand correctly that it's bugged? https://github.com/OpenTTD/nml/blob/master/examples/train/example_train.nml#L183
20:09:06 <dP> because vehicles in other grfs can have same `vehicle_type_id`
20:10:04 <dP> and is there a better fix than adding another switch to check grfid?
20:11:19 <frosch> great... i tried reading the default values via curl_easy_getinfo, but they added that option only recently, so even debian stable is too old for that :p
20:11:27 <frosch> stupid write-only configs
20:11:43 <TrueBrain> lol
20:11:45 <TrueBrain> that is just stupid
20:14:10 <frosch> ah, at least when i build it on debian, it gives a proper error message: error reading ca cert file /etc/sssdsdl/certs/ca-certificates.crt (Error while reading file.)
20:14:17 <dP> `vehicle_type_id` looks like a footgun tbh, I don't see any case where it can be used without a grfid check
20:14:42 <Brickblock1> dP: You are right in that it is flawed
20:15:02 *** urdh has quit IRC (Quit: Boom!)
20:15:07 <Brickblock1> dP: When you are lazy
20:16:27 <TrueBrain> frosch: if I use a newer libcurl, I can use the manylinux binary on Debian with `curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/ssl/certs");`
20:16:34 <TrueBrain> just no clue if it would run on CentOS now πŸ˜„
20:17:09 <TrueBrain> can I trigger a download via console .. hmm
20:17:37 <frosch> yes, dedicated server console should work
20:18:04 <TrueBrain> wait, no, I was wrong .. I was using my system libs .. grr .. let's try if I wasn't lying ...
20:18:13 <frosch> the folder /etc/ssl/certs seems to be the same, but the bundle filename is different
20:18:36 <TrueBrain> pfew, still works
20:19:00 <TrueBrain> ` libcurl.so.4 => ./_CPack_Packages/amd64/TXZ/openttd---g-linux-generic-amd64/lib/libcurl.so.4 (0x00007fe87c3fa000)`
20:19:02 <TrueBrain> check
20:19:15 <frosch> ok, so on debian i can successfully break it by setting a wrong CA path, and fix it by setting the right one. with the manylinux build it gives the same non-descriptive error in both cases
20:19:41 <TrueBrain> yeah, too old of a libcurl
20:19:43 <TrueBrain> like, really old
20:20:02 <frosch> so who knows, maybe the manylinux libcurl uses tls 0.9, and the server blocks that :p
20:20:22 <frosch> isn't that like a thing? only allow tls 1.3 ?
20:20:43 <TrueBrain> most likely
20:20:52 <TrueBrain> how do I know what id to select in the console
20:20:52 <TrueBrain> hmm
20:21:19 <frosch> content update
20:21:21 <frosch> content list
20:21:22 <frosch> or so
20:21:36 <TrueBrain> * CApath: /etc/ssl/certs
20:21:36 <TrueBrain> * SSL certificate problem: unable to get local issuer certificate
20:21:40 <TrueBrain> no, doesn't work on CentOS
20:22:40 <frosch> i mean, the installed certs could be outdated
20:22:51 <TrueBrain> true
20:23:11 <TrueBrain> it is the Amazon cert
20:23:14 <TrueBrain> so that is relatively new
20:23:31 <TrueBrain> so let's try a bit older cert ..
20:23:49 <frosch> can you print "curl_easy_getinfo(curl, CURLINFO_CAINFO, &path)" and "curl_easy_getinfo(curl, CURLINFO_CAPATH, &path)"
20:24:10 <frosch> and/or set CAINFO to /etc/ssl/certs/ca-bundle.crt
20:25:55 <TrueBrain> the latter works
20:26:19 <TrueBrain> but that breaks Debian ofc
20:26:28 <frosch> ok, so we do a file-exists check? :p
20:26:54 <frosch> "/etc/ssl/certs/ca-certificates.crt" and "/etc/ssl/certs/ca-bundle.crt"? :p
20:27:10 <frosch> how many variants could there be :p
20:28:12 <frosch> on debian there is only one *crt
20:28:25 <frosch> on manylinux there is also a "trusted" variant
20:28:37 <frosch> who knows what's the difference
20:28:56 *** urdh has joined #openttd
20:30:40 <frosch> the "trusted" file seems to contain more certs, and most certs have 80 chars more, while the start is the same, wtf
20:32:42 <TrueBrain> okay, so some systems use a bundle
20:32:46 <TrueBrain> others use a folder with certs
20:32:56 <TrueBrain> sorry, bit slow, but I finally understand why those 2 settings exist
20:33:47 <frosch> https://go.dev/src/crypto/x509/root_linux.go <- ha, should we copy that?
20:34:18 <TrueBrain> yup
20:34:23 *** urdh has quit IRC (Quit: Boom!)
20:34:23 <TrueBrain> but how do you detect certdirectories?
20:34:45 <TrueBrain> `X509_get_default_cert_dir` seems to do the heavy lifting, but I fail to link the right symbol
20:34:49 <frosch> first check the files, firt existing one wins
20:34:55 <frosch> then check the dirs, first existing one wins
20:35:07 <petern> Don't their libcurls do the right thing for their own flavour?
20:35:40 <frosch> probably, but our generic linux build bundles its own libcurl
20:35:50 <frosch> while it does not bundle certs πŸ™‚
20:35:58 <petern> Oh. Hmmm.
20:36:49 <glx[d]> the idea of generic build is to not rely on system libs
20:36:50 <petern> Linking with the system libcurl not possible?
20:37:06 <glx[d]> that way it works everywhere
20:40:31 <frosch> libcurl links many other so itself
20:40:42 <pickpacket> I started an AI opponent for the first time. Is it possible to get a decent company name for it instead of "Unnamed"?
20:40:57 <frosch> so you cannot include them either, so, in the end you cannot include anything
20:41:01 <nielsm> the AI is supposed to give itself a name
20:41:43 <TrueBrain> right, seems the folder detection is the most compatible way to do this ..
20:44:12 <glx[d]> if the AI doesn't set the name it will get one on first built infrastructure, like player
20:44:46 <TrueBrain> or, we can link against libcrypto and use `X509_get_default_cert_dir`
20:44:52 <TrueBrain> but this means we assume people compile libcurl against openssl
20:44:55 <TrueBrain> instead of leaving that open
20:45:44 <frosch> https://serverfault.com/questions/62496/ssl-certificate-location-on-unix-linux <- that's where i got the go.dev link from, the answer is from 2015 and contains a copy of the paths, which are different to what is used today :p
20:46:07 <TrueBrain> PRs are welcome
20:46:19 <TrueBrain> okay, `X509_get_default_cert_file` returns a path that is not valid on Debian
20:46:25 <TrueBrain> so that is also not really a good way to go about this πŸ˜„
20:46:26 <frosch> :p
20:47:09 <TrueBrain> so .. how do we detect if a file/path exists in OpenTTD ..
20:48:00 <TrueBrain> safe to use std::filesystem? πŸ˜„
20:48:39 <TrueBrain> `FioCheckFileExists` at least exists for files if I have to
20:49:02 <frosch> we have FileExists(), it does some OTTD2FS magic
20:49:14 <TrueBrain> but how to check for a folder πŸ˜„
20:49:21 <frosch> FioCheckFileExists does too much, it does our search path magic
20:50:56 <frosch> i think FileExists also works for directories :p
20:51:20 <frosch> i don't think it checks file vs dir
20:52:52 *** urdh has joined #openttd
20:53:33 *** urdh has quit IRC ()
20:54:48 <TrueBrain> CoPilot did find the listing of files and folders too πŸ˜›
20:55:05 *** urdh has joined #openttd
20:55:46 *** urdh has quit IRC ()
20:56:11 <Samu> DrawWidget is complex :(
20:59:03 <TrueBrain> lol, for Debian it finds both a file and a folder to use
20:59:04 <TrueBrain> how cute
20:59:46 <TrueBrain> okay, that works
21:00:12 <TrueBrain> let's try with -very old- libcurl
21:01:42 <frosch> that failed for me
21:01:54 <frosch> i did set the correct paths for debian, yet the old curl failed
21:02:30 <TrueBrain> meh; means I need to look into the build infra too πŸ˜› One problem at the time .. one problem at the time ..
21:02:35 <TrueBrain> first I need a review of the current PR πŸ˜„
21:03:48 <frosch> every line moved :p
21:04:15 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #10481: Change: try to detect the CA file/path for CURL https://github.com/OpenTTD/OpenTTD/pull/10481
21:04:30 <TrueBrain> first commit is #10480, but the second commit should do the trick
21:05:16 <frosch> copilot does not know comment alignment :p
21:05:26 <TrueBrain> indeed, so I pressed tab
21:05:29 <TrueBrain> human error 😦
21:06:01 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10481: Change: try to detect the CA file/path for CURL https://github.com/OpenTTD/OpenTTD/pull/10481
21:06:49 <DorpsGek> [OpenTTD/OpenTTD] JimmyNaidoo opened issue #10482: [Bug]: No display https://github.com/OpenTTD/OpenTTD/issues/10482
21:07:39 <DorpsGek> [OpenTTD/OpenTTD] michicc commented on pull request #10481: Change: try to detect the CA file/path for CURL https://github.com/OpenTTD/OpenTTD/pull/10481#issuecomment-1430379546
21:07:51 <frosch> oh, i assumed you would only set the directory, if the file does not exist
21:07:54 <frosch> you always set both
21:08:07 <TrueBrain> no; I unset one and set the other
21:08:13 <TrueBrain> I don't know what the default of the build-system is
21:08:57 <TrueBrain> hmm .. what is the `ifdef` for OSX ...
21:09:13 <frosch> huh what? what do you unset?
21:09:13 <TrueBrain> reverse uno, let's check for linux
21:09:26 <TrueBrain> curl_easy_setopt(curl, CURLOPT_CAPATH, _http_ca_path.empty() ? nullptr : _http_ca_path.c_str());
21:09:26 <TrueBrain> curl_easy_setopt(curl, CURLOPT_CAINFO, _http_ca_file.empty() ? nullptr : _http_ca_file.c_str());
21:09:33 <TrueBrain> owh, it can set both, you mean
21:09:34 <TrueBrain> fair
21:09:37 <TrueBrain> I didn't care
21:09:56 <TrueBrain> I will add an if
21:09:57 <frosch> well, you always set both :p
21:10:17 <frosch> no idea what it does if you set both, and both exist, does it try both?
21:11:01 <TrueBrain> it worked πŸ˜›
21:11:05 <TrueBrain> but I am fine setting either one
21:11:31 <TrueBrain> seems it picks CAPATH over CAINFO πŸ˜›
21:11:49 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10481: Change: try to detect the CA file/path for CURL https://github.com/OpenTTD/OpenTTD/pull/10481
21:20:36 *** urdh has joined #openttd
21:21:42 *** urdh has quit IRC ()
21:23:18 *** urdh has joined #openttd
21:27:14 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #10483: Codechange: [Script] Don't expose static buffers outside of ScriptText https://github.com/OpenTTD/OpenTTD/pull/10483
21:31:57 <TrueBrain> okay, so the new linux generic ... static or dynamic .. hmm
21:32:05 <TrueBrain> dynamic has an advantage that updating on Steam is faster
21:32:09 <TrueBrain> but ... we are so small anyway ..
21:32:13 <TrueBrain> static is what vcpkg prefers
21:32:17 <Samu> i'm bax with geometry string boxes, indents and rect stuff
21:32:21 <Samu> bad*
21:33:46 <Samu> i want to align to the right a block of text
21:37:04 <Samu> i have the total width of the widget
21:37:37 <dP> string drawing functions do the alignment
21:37:45 <dP> you don't need to calculate it manually
21:38:21 <dP> just pass it `SA_RIGHT`
21:39:30 <Samu> but the rightmost position is not the one i like, how do i explain
21:39:37 <Samu> let me try a screenshot
21:40:33 <Xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1075169703372263484/Unnamed_1950-01-0121.png
21:40:33 <Xarick> i want the Score part aligned to the right
21:41:23 <dP> you pass the rightmost position to string drawing functions as well
21:41:27 <TrueBrain> okay, `icu` from vcpkg fails to build, but I can pick that from `yum`. The rest I can use vcpkg for, which gives us a lot newer versions for most things πŸ™‚
21:46:59 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484
21:47:32 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484
21:48:04 <TrueBrain> time to actually test it on GitHub πŸ˜„
21:56:32 <frosch> hmm, when exiting ottd, it blocks until the canceled download is finished? was that also the case before?
21:56:46 <TrueBrain> no, the thread doesn't terminate earlier
21:56:48 <TrueBrain> nice catch πŸ˜„
21:57:08 <TrueBrain> I have to fix that cancel actually cancels πŸ˜›
21:59:07 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:03:27 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:05:27 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:15:12 <LordAro> TrueBrain: cancel the cancel that cancels?
22:15:30 <TrueBrain> such cancel culture
22:16:31 <TrueBrain> hmm .. you can only cancel libcurl transfer from the thread that created it
22:16:33 <TrueBrain> somewhat tricky
22:19:14 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484
22:21:21 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484#pullrequestreview-1298516332
22:21:55 <Samu> how is {NBSP} supposed to work
22:22:23 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484#pullrequestreview-1298517933
22:22:32 <Samu> GetStringMultiLineBoundingBox doesn't work
22:23:08 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484#pullrequestreview-1298518671
22:23:30 <TrueBrain> I don't want to comment on it 😒 It is so silly
22:27:46 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10480: Codechange: move curl into a thread so simplify code https://github.com/OpenTTD/OpenTTD/pull/10480
22:28:02 <TrueBrain> frosch: fixed! also a hook for the fix of the "cancel doesn't cancel", but that is for another PR
22:28:26 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10481: Change: try to detect the CA file/path for CURL https://github.com/OpenTTD/OpenTTD/pull/10481
22:29:29 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484
22:29:55 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484#pullrequestreview-1298525204
22:30:57 <Samu> size->width = std::max(size->width, GetStringMultiLineBoundingBox(STR_JUST_RAW_STRING, *size).width);
22:31:13 <Samu> i have {NBSP} in the string
22:31:42 <Samu> no normal spaces in it, and it still splits into lines
22:33:12 <Samu> ir.top = DrawStringMultiLine(ir.left, ir.right, ir.top, UINT16_MAX, STR_JUST_RAW_STRING, TC_BLACK) + WidgetDimensions::scaled.vsep_wide;
22:33:45 <Samu> ir.right is equal to size->width
22:37:28 <Xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1075184027054641220/Unnamed_1950-01-0122.png
22:37:28 <Xarick> it splits words
22:37:37 <Xarick> when i use {NBSP}
22:38:22 <Xarick> instead of increasing the bounding box width to the size of the first non breaking space
22:38:38 <Xarick> up to*
22:39:05 <frosch> i always forget the difference between unique_lock and lock_guard
22:39:27 <frosch> it's almost as messy as constexpr/eval/init
22:39:38 <TrueBrain> copilot did this for me .. didn't even think abou tit πŸ˜›
22:40:02 <dwfreed> how do you know copilot was right :P
22:40:10 <TrueBrain> it compiled
22:40:17 <glx[d]> copilot knows
22:40:19 <frosch> dwfreed: my requesting a PR review?
22:40:41 <frosch> responsibility of the reviewer, right? :p
22:40:56 <glx[d]> copilot wrote truegrf πŸ˜‰
22:41:36 <frosch> anyway, reading the diff is hopeless :p
22:41:45 <TrueBrain> read the resulting file instead!
22:41:52 <frosch> yes, doing that now
22:43:51 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #10482: [Bug]: No display https://github.com/OpenTTD/OpenTTD/issues/10482
22:43:59 <frosch> oh no, someone taught tb the unary-plus trick
22:44:11 <frosch> it was copilot, right? :p
22:44:18 <TrueBrain> I hav eno clue what you mean, so yes
22:44:39 <dP> "the value here is a pointer into TTD's memory where the actual amount is stored"
22:44:39 <dP> NewGRF spec never seizes to amaze me...
22:45:15 <frosch> dP: it is wrong now, it was also partly wrong in ttdp 2.5+
22:46:04 <TrueBrain> frosch: btw, it is actually true; I did notice it wrote it, and I was like: sure, fine, what-ever πŸ˜›
22:46:28 <frosch> so, do you now know what it does? :p
22:46:41 <TrueBrain> I vaguely remember something about it
22:47:20 *** sla_ro|master has quit IRC ()
22:47:38 <dP> frosch: what is it now though? just one of the five `RUNNING_COST_*` constants?
22:48:29 <frosch> yes, ottd checks for the known TTD addresses, and converts it into an enum
22:48:41 <frosch> similar to original string ids
22:49:01 <frosch> ottd knows a few
22:49:18 <dP> frosch: that sounds like there are more than 5 values available
22:49:47 <frosch> check the source yourself, i am already reading copilots work
22:50:56 <TrueBrain> frosch: without joking, it makes it work with these C-style APIs πŸ˜›
22:51:19 <TrueBrain> CoPilot showed me it was possible, I was already making a wrapper function
22:51:25 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484#pullrequestreview-1298545016
22:52:12 <frosch> TrueBrain: i can't tell, is it okay to call OnReceiveData and OnFailure from the curl thread?
22:52:12 <dwfreed> frosch: hope this answers your question re unique_lock vs lock_guard: https://stackoverflow.com/a/20516876
22:52:34 <TrueBrain> frosch: it should; the WinHttp is also doing it. And if isn't, it should be fixed in the callbacks
22:52:47 <TrueBrain> this interface now kinda makes mandatory that they are thread-safe πŸ˜›
22:54:05 <TrueBrain> initially I wanted to hand them over to the main thread, but .. buffers ... copies .. expensive .. πŸ˜„
22:55:19 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484#pullrequestreview-1298548344
22:55:29 <DorpsGek> [OpenTTD/OpenTTD] frosch123 approved pull request #10480: Codechange: move curl into a thread so simplify code https://github.com/OpenTTD/OpenTTD/pull/10480#pullrequestreview-1298548484
22:55:43 <TrueBrain> after all these questions, I expected comments πŸ˜›
22:55:49 <frosch> rest is for tomorrow, or for someone in a more western timezone πŸ™‚
22:56:18 <TrueBrain> tnx frosch , and sleep well πŸ™‚
22:57:31 <frosch> fine, you could use a unique_ptr for the request πŸ™‚
22:57:51 <TrueBrain> yes, that would be better yes
22:58:45 <TrueBrain> except
22:58:47 <TrueBrain> I can't
22:58:49 <TrueBrain> has to be a shared-ptr
22:58:58 <TrueBrain> fucking annoying stupid idiotic queue spec
23:00:08 <TrueBrain> still better than what I do
23:00:11 <TrueBrain> but yeah ... πŸ˜›
23:00:41 <frosch> you can use the unique_ptr after the front
23:00:54 <frosch> i was mostly scared because the "delete" was at the end of the loop
23:01:06 <TrueBrain> huh? after the front?
23:01:10 <frosch> with lots of code inbetween, including two "return", though they were inside lambdas πŸ™‚
23:01:11 <TrueBrain> recast the shared-ptr to an unique-ptr? πŸ˜›
23:01:31 <frosch> ah, shared_ptr is also fine
23:01:38 <TrueBrain> I guess unique-ptr could work
23:01:44 <TrueBrain> the front() would be a nullptr till the pop()
23:01:49 <TrueBrain> but I doubt the compiler agrees πŸ˜›
23:01:59 <frosch> i assumed you kept the raw ptr in the queue, and only used the unique_ptr after pop
23:02:08 <TrueBrain> ah, no, let's do it proper
23:02:16 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain dismissed a review for pull request #10480: Codechange: move curl into a thread so simplify code https://github.com/OpenTTD/OpenTTD/pull/10480#pullrequestreview-1298548484
23:02:19 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10480: Codechange: move curl into a thread so simplify code https://github.com/OpenTTD/OpenTTD/pull/10480
23:02:21 <frosch> well, night πŸ™‚
23:04:34 <TrueBrain> ugh, caching, brain, hurts, something to tackle tomorrow πŸ˜›
23:05:42 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:13:13 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484
23:14:30 <Samu> WOW... 1.34 GB visual studio update
23:18:39 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #10484: Change: release with (much) newer versions of dependencies for Generic Linux https://github.com/OpenTTD/OpenTTD/pull/10484
23:19:20 <Samu> i wanted to go to bed, but this gibabyte update caught me by surprise
23:22:44 <TrueBrain> ah, yes, final attempt of the evening does work πŸ˜„ W00p! Caching now does its job πŸ™‚
23:25:39 *** Samu has quit IRC (Quit: Leaving)