IRC logs for #openttd on OFTC at 2023-02-15
β΄ go to previous day
01:53:51 *** Wormnest has quit IRC (Quit: Leaving)
02:01:42 *** herms has quit IRC (Quit: bye)
03:50:29 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:52:41 *** D-HUND is now known as debdog
04:16:35 *** TROILUS7 has joined #openttd
04:17:24 *** TROILUS has quit IRC (Read error: Connection reset by peer)
04:17:25 *** TROILUS7 is now known as TROILUS
05:07:24 *** techmagus has joined #openttd
05:11:02 *** nebulabc has joined #openttd
05:13:15 <nebulabc> Hello there! I didn't know OpenTTD had an IRC channel, but I'm real exited to talk to some other people who like this game.
05:13:15 <nebulabc> About a year ago I got interested in OpenTTD, and played through the game a couple times. I was curious if anyone can give me ideas for ways to spice it up. I know that there's a standing playerbase, so I'm kind of interested in what y'all do to keep the game interesting
05:13:54 <nebulabc> I've been thinking of setting up a server and playing with some family for one.
05:16:58 <bigyihsuan> nebulabc: newgrfs and gamescripts can change the mechanics and industries and etc quite a bit
05:16:58 <bigyihsuan> you can also take a look at one of the patch packs out there (i've played the most on jgrpp)
05:18:09 <nebulabc> Cool! I'll take a look at those. Also, do you know how well multiplayer works out? I know I set up a server a while back, and it seemed alright but I haven't worked much on it since. Anything I should look out for?
05:29:39 <kamnet> Multiplayer works just the same as a single game. And since last year it's a snap to set up. Instead of trying to figure out networking stuff, all you do is copy an invite code and send it to others. They enter it into the game and it takes them right into your server.
05:58:02 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:58:49 *** techmagus has quit IRC (Ping timeout: 480 seconds)
05:59:15 *** techmagus has joined #openttd
06:04:29 *** sla_ro|master has joined #openttd
06:05:17 *** Yuki has quit IRC (Ping timeout: 480 seconds)
06:35:32 <nebulabc> Last time I tried it, it needed more than just an invite code. Thatβs sweet, Iβll be sure to take advantage of that.
07:05:23 *** HerzogDeXtEr has joined #openttd
07:07:28 *** KiriDore has joined #openttd
07:13:58 *** KiriDore1 has quit IRC (Ping timeout: 480 seconds)
07:15:52 *** NGC3982 has quit IRC (Ping timeout: 480 seconds)
07:19:05 *** NGC3982 has joined #openttd
07:35:30 *** techmagus has quit IRC (Quit: Leaving)
08:10:12 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
10:10:04 <TrueBrain> Rubidium: front() returns the object, but doesn't release it from its pool. Pop() does that. So using a unique_ptr is a bit sketchy, I would think?
10:10:54 <TrueBrain> I ranted about this last night, but the queue specs are just shit and make things more complicated than they have to be :p
10:11:38 <TrueBrain> Your suggestion most likely works, but leaves a weird item on the queue
10:11:45 <TrueBrain> Hence the sharedptr :p
10:14:54 <TrueBrain> Yeah, and they confirm my point.. the front on the queue becomes a nullptr, which I find rather sketchy
10:15:11 <TrueBrain> So isn't using a sharedptr not just more sensible?
10:15:35 <TrueBrain> (Honest question, to be clear :p)
10:15:38 <petern> It becomes a nullptr rather than staying a pointer to something you don't own.
10:15:57 <petern> Or the comment is wrong π
10:16:33 <TrueBrain> I hope most compilers make it a nullptr yes π
10:17:15 <TrueBrain> All this because they couldn't return the entry with pop() ...
10:17:21 <TrueBrain> Would make such cleaner code
10:18:00 <LordAro> i've been annoyed by that plenty of times
10:19:09 <TrueBrain> How I see it, an uniqueptr needs a clear comments saying the pop needs to be there, and a sharedptr is just safe. I don't think there is a right or wrong here, just a choice.
10:24:43 <LordAro> shared_ptr is a lot more heavyweight than unique_ptr
10:24:51 <LordAro> conceptually, the memory isn't shared
10:25:31 <Rubidium> I was about to write what LordAro wrote ;)
10:26:13 <Rubidium> practically the std::move already conveys the meaning that the unique_ptr in the queue does not have its value anymore
10:26:50 <Rubidium> if there's a string in the queue, you should also use std::move so it doesn't copy the string allocation but just swaps pointers around
10:27:21 <LordAro> i wonder if a compiler might be able to optimise the "invalidness" away and just combine the two functions
10:27:33 <LordAro> though i suppose they're not inline, so probably not
10:27:46 <Rubidium> though I agree move semantics aren't the easiest to understand
10:29:12 <dP> hm, I wonder what is the exception safety of that move
10:29:24 <dP> guess if pop follows immediately there is nothing to trhow
10:29:41 <dP> but if anything is put in between it can go bd
10:34:21 <dP> oh, there is `std::move_if_noexcept`
10:35:15 <LordAro> ...this is not the right channel
10:35:23 *** Webster has joined #openttd
10:35:25 <Rubidium> shared_ptr adds a mutex
10:58:26 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
10:58:39 <dwfreed> TrueBrain: my understanding is that the reason pop can't return the value is that the copy constructor could throw an exception, which depending on the underlying container implementation would then make the state of the queue undefined
10:59:55 <TrueBrain> For this usecase, any memory usage or performance penalty ofc is not a worry, as these are very rare events
11:00:06 <TrueBrain> dwfreed: Still sucks :p
11:03:31 <TrueBrain> The std::move doesn't worry me. The nullptr on the queue I find annoying, so I picked the solution that doesn't do it :p but I think this is a tomato tomato case π
11:05:18 <dwfreed> you do need to make sure your receive callbacks are threadsafe now
11:48:52 <TrueBrain> Yup. They already had to be π but some locking is missing
11:49:27 *** TheSGRhasbeenjeffeds has joined #openttd
11:49:27 <TheSGRhasbeenjeffeds> i forgor how to make a newgrf for openttd
11:50:36 <TrueBrain> So, what is our vote? Shared or unique? π
12:18:20 <Xarick> why aren't the entries iterated in the correct order they were created?
12:21:24 <dP> that's quite expected for an associative container
12:24:37 <Samu> then give up on the name
12:50:17 *** pickpacket has quit IRC (Ping timeout: 480 seconds)
13:00:34 *** pickpacket has joined #openttd
13:28:33 <Samu> how do I assign an index to each name?
13:28:45 <Samu> so that i can iterate them in order?
13:32:25 <Samu> i dont understand anything of this documentation
13:32:40 <Samu> the syntax exemples make no sense to me
13:53:25 <andythenorth> You can use arrays of arrays
13:53:31 <andythenorth> Or an array of slots
14:05:26 <Samu> when the slot is integer, they are ordered
14:05:55 <Samu> when the slot is a string, a name, they're randomly ordered
14:13:51 <andythenorth> Store an index when you write to the slot?
14:14:02 <andythenorth> Then lambda sort on retrieval?
14:15:28 <Samu> can you show me an example?
14:24:37 <andythenorth> It used to be really common in python where dicts werenβt order stable
14:25:02 <andythenorth> Dicts approximately same as squirrel tables
15:02:57 <Samu> string manipulation sucks
15:11:12 <Samu> i don't understand strings
15:16:40 <dP> Samu: you're probably initializing both elements with the same table
15:16:52 <dP> at least idk squirrel but that's how it would work in python
15:19:55 <Samu> okay let's try a different way
15:21:08 *** HerzogDeXtEr has joined #openttd
15:24:55 *** sla_ro|master has quit IRC ()
15:26:38 <Samu> now it's also on a foreach
15:44:20 <Samu> nice, fantastic! it builds again
15:44:52 <Samu> changing a table to an array requires so much work, lol
16:14:51 *** TROILUS has quit IRC (Remote host closed the connection)
16:14:52 *** TROILUS9 has joined #openttd
16:14:54 *** TROILUS9 is now known as TROILUS
16:20:49 *** TROILUS1 has joined #openttd
16:22:14 *** TROILUS has quit IRC (Read error: Connection reset by peer)
16:22:14 *** TROILUS1 is now known as TROILUS
17:14:46 *** sla_ro|master has joined #openttd
17:20:28 *** Wormnest has joined #openttd
17:48:47 *** sla_ro|master has quit IRC ()
17:54:40 <Samu> I need ideas for new score tables
18:16:49 *** gelignite has joined #openttd
18:31:53 *** sla_ro|master has joined #openttd
18:46:08 <glx[d]> Ok #10474 is interesting
18:50:18 <Samu> there's some random huge stalls during river generation, unpredictable...
19:05:48 *** jellyknight has joined #openttd
19:09:19 *** gelignite has quit IRC (Ping timeout: 480 seconds)
19:12:19 *** geli has quit IRC (Ping timeout: 480 seconds)
19:14:45 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
19:23:54 <Ernst> Some help pls running openttd no iPad
19:24:33 *** Ernst has quit IRC (Remote host closed the connection)
19:28:20 <andythenorth> There is no native ios version
19:28:36 <andythenorth> Thereβs a scam version on the App Store though
19:33:52 <TrueBrain> wauw, that whole content window can really use a rewrite .. so many odd things π
19:41:09 <Samu> trying to debug this thing
19:41:22 <Samu> FlowRiver calls FlowRiver
19:41:49 <Samu> probably an insane number of times
19:43:56 <TrueBrain> okay, the weirdest bug: if you have a partial file on disk (Because you cancelled), the HTTP fails and it falls back to TCP, the download progress starts at `UINT32_MAX - filesize`
19:44:24 <Samu> std::tie(found, main_river) what is std::tie?
19:53:59 <frosch> 58.1% of packages, 35.9% of users migrated
19:54:06 <frosch> even the sum is not yet 100 :p
20:01:47 <Samu> hmm, the river generation is stuck in AyStar
20:12:05 <TrueBrain> right .. that should be it π Seems to work .. curious how long it takes for someone to break it another way π
20:13:37 *** TROILUS4 has joined #openttd
20:14:16 *** TROILUS has quit IRC (Quit: Ping timeout (120 seconds))
20:14:17 *** TROILUS4 is now known as TROILUS
20:30:18 <Samu> tiles 1007572, 1007573, 1007574
20:35:50 <TrueBrain> Curious if I got the `atomic` right frosch π
20:40:08 <frosch> you are right, settings thread_exist does not need to be inside the mutex
20:40:23 <frosch> it's enough if the reading of thread_exit is inside the mutex
20:41:57 <TrueBrain> yippie, means I am starting to understand this part of C++ π Tnx π
20:42:17 <frosch> not much of c++ there, that's just pthreads
20:42:47 <TrueBrain> with Python I don't have this problem π
20:43:23 <frosch> some day cpython will get rid of it π
20:43:31 <TrueBrain> yeah .. then it will be a nightmare π
20:46:12 <frosch> i got a nightmare after reading your bananas-gs/ai-parser π
20:46:24 <frosch> i did not know that you could "send" to a "yield"
20:46:40 <frosch> i only knew generators
20:47:22 <TrueBrain> can't even remember what I did there π
20:53:44 <frosch> well, now i know, if i do not like the value a generator gave me, i can pass it an exception as revenge
20:54:31 <TrueBrain> you can do so much evil in Python π
20:59:29 <frosch> c++ is so wtf... glx used std::optional<const std::string> in #10483... what does const inside an optional even mean? doesn't that make the whole optional const as well?
21:00:01 <frosch> is there a difference between "const optional<string>" and "optional<const string>"?
21:02:21 <TrueBrain> and what did string_view do? π
21:03:10 <frosch> string_view is a pair<char*, size_t>
21:03:15 <frosch> it does not own the memory
21:04:11 <frosch> the rhetoric escaped me π
21:04:21 <TrueBrain> yeah, sorry .. long day, so the humor is a bit dry π
21:08:12 <Samu> can someone explain me what std::tie do?
21:14:14 *** jellyknight has quit IRC (Quit: Stay safe!)
21:17:02 <frosch> can't think of anything to test there, except maybe the nightly tomorrow
21:17:27 <TrueBrain> I tested it on my fork; seemed to work
21:19:07 <frosch> i can't believe "auto foo = {"a", "b"};" compiles π
21:19:17 <TrueBrain> I was mostly shocked it even compiled on MSVC
21:19:36 <frosch> in my mind "auto" checks the rhs for the type, and "{ ... }" checks the lhs for the type
21:19:58 <TrueBrain> it is a list of const chars btw
21:20:09 <TrueBrain> to be expected, but still
21:20:22 <frosch> i think the variable is a std::initializer_list in the end, no array
21:20:34 <TrueBrain> I didn't check that, but yes, it should
21:20:53 <frosch> yet another weird c++ magic thing π
21:21:18 <TrueBrain> but yeah .. `auto` surprised me here too π Was afraid I had to look up how to write that initializer list bla π
21:22:19 <frosch> i guess initializer_list is implicit const
21:24:09 <frosch> that PR reminds me of dalestan skipping all whitespace, which is not strictly needed :p
21:24:24 <frosch> it skips all "const" which are not strictly needed π
21:27:15 <Samu> I think i detected the cause
21:27:55 <TrueBrain> consts are for the weak
21:39:49 <frosch> i tried really hard to comment on every "const" π
21:46:52 <Samu> terrible screenshots ...
21:50:09 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:57:10 <Samu> can someone confirm you also get the stall during river generation?
21:57:22 <Samu> i added some steps to recreate
21:57:47 <TrueBrain> frosch: a const member for a virtual function .. is that wanted?
21:58:05 <TrueBrain> should an interface define an implementation has to be done read-only?
22:00:35 <frosch> interesting question, i always see it from the other side: i have a const pointer, what can i do with it
22:01:07 <TrueBrain> in this case, that is rather unknown
22:01:35 <frosch> also, wtf. win32... I assumed DWORD_PTR was a "DWORD*", not an "intptr_t"
22:01:49 <TrueBrain> yeah, don't get me started on that shit
22:07:17 <TrueBrain> let's hope that fixes mingw/MSVC .. not sure π¦
22:07:25 <TrueBrain> and enjoy the consts!
22:08:27 <TrueBrain> wow, downloading Brix seems a lot faster now .. π
22:17:16 <TrueBrain> right amount of consts? π
22:29:31 <frosch> did i already made fun of "constinit" variables being mutable at runtime?
22:29:51 <TrueBrain> every chance you get! π
22:30:13 <TrueBrain> why do all those things feel so messy?
22:31:22 <frosch> because the C parser is so messy
22:31:31 <frosch> C is the root of all evil π
22:32:27 <TrueBrain> (Artifacts, openttd-linux-generic)
22:32:39 <frosch> C and C++ both have a long tradition of reusing reserved words for a different meaning instead of defining a new reserved word, if the meaning can somehow twisted into it
22:32:41 <TrueBrain> frosch: ah, yes, C ... the best language in the world! π
22:33:48 <frosch> i mean, can you explain the meaning of "static" :p
22:34:28 <TrueBrain> ` (28, 'Connection timed out after 30001 milliseconds')` .. wow ... that is a shitty timeout value for `yum install` ...
22:34:48 <TrueBrain> frosch: Sure! /me searches for the page explaining ... π
22:35:15 <frosch> did they copy old youtube's "301 views"?
22:35:41 <TrueBrain> I was wondering why the linux build took longer than last time .. but it spend 5 minutes on ... waiting for a yum mirror to not work
22:35:46 <TrueBrain> I so hate how yum did their mirror network
22:35:50 <TrueBrain> it never actually works
22:37:29 <TrueBrain> lol, reading #10474 .. always cute that people think our website has a different binary than Steam .. so happy they are 100% absolutely identical π
22:38:59 <TrueBrain> I am impressed the user managed to dig up so much detail
22:39:09 <TrueBrain> we could use more of those people π
22:42:11 <glx[d]> yeah but it would be nice to manage to reproduce it (I can't see a simple way to do that)
22:42:33 <TrueBrain> install DropBox? π
22:47:55 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:57:02 <Samu> i wish i had a decent video recording program
22:57:16 <Samu> i have obs, but it's overkill, i dont need to stream
23:05:37 <nielsm> OBS is a good and flexible screen recorder for most use cases, I don't think there are cases where I would ever consider it "overkill"
23:05:58 <nielsm> however there are some specific situations where it might be insufficient
23:06:20 <Samu> something that is suitable for openttd
23:06:37 <Samu> even gifs get better quality
23:06:40 <nielsm> but if you're after something to make quick, short recordings, take a look at ShareX
23:06:55 <nielsm> it's also "overkill", in the same way that it can be configured in a ton of ways
23:07:22 *** sla_ro|master has quit IRC ()
23:07:40 <nielsm> but also much more direct in its ability to selct a part of the screen and start recording instantly, and then give you a ready MP4 or GIF file a few seconds later
23:09:16 <Samu> I'll check it out, I like the idea of GIF "videos" of openttd
23:10:36 <Samu> but now it's bed time, cyas
23:10:43 *** Samu has quit IRC (Quit: Leaving)
23:15:42 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:16:27 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
continue to next day β΅