IRC logs for #openttd on OFTC at 2025-11-26
ā“ go to previous day
02:02:22 *** herms2 has quit IRC (Quit: bye)
03:01:51 *** Wormnest has quit IRC (Quit: Leaving)
03:46:05 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:17:13 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:17:14 *** WormnestAndroid has joined #openttd
04:17:20 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:17:22 *** WormnestAndroid has joined #openttd
04:17:24 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:17:25 *** WormnestAndroid has joined #openttd
04:41:36 <DorpsGek> - Update: Translations from eints (by translators)
05:26:22 *** Zathras_4 has joined #openttd
05:39:11 <rito12_51026> michi_cc[d]: I have and it is great, I'll submit my comment later
06:41:31 *** tokai|noir has joined #openttd
06:41:31 *** ChanServ sets mode: +v tokai|noir
06:48:25 *** tokai has quit IRC (Ping timeout: 480 seconds)
09:32:14 *** moll has quit IRC (Ping timeout: 480 seconds)
11:20:16 <Borg> how I can build a string from StringID for debugging?
11:20:21 <Borg> GetStringPtr() doesnt work
11:20:28 <Borg> GetString() fails and then crashes..
11:21:21 <peter1138> GetString is correct.
11:22:02 <peter1138> If the string takes parameters you need to provide those and they must be the correct parameter type.
11:22:25 <Borg> Im trying to Grab Station name...
11:23:27 <Borg> im suprised there is no GetStationName() or anything like that
11:24:30 <Borg> if (st->name != NULL && strcmp(st->name, name) == 0) return false;
11:24:31 <peter1138> GetString(STR_STATION_NAME, st->index, st->facilities)
11:24:39 <Borg> that was my first try.. use st->name.. but I got NULL
11:25:01 <peter1138> st->name is set only if the name is customised by the player.
11:26:34 <peter1138> Or `st->GetCachedName()` for debugging would be fine.
11:27:10 <peter1138> GetString(STR_STATION_NAME, st->index)
11:27:25 <peter1138> Adding st->facilities is a bug in existing code somewhere, not used :)
11:27:29 *** Flygon has quit IRC (Remote host closed the connection)
11:30:41 <Borg> great... f**cking great.. Inconsistency in LinkGraph (or rather CargoDist nodes/edges handling in twoway
11:33:10 <Borg> heh. super uncool.. its even inconsistent on paused game between game loads
11:34:10 <Borg> I start to hate C++... [;
11:34:26 <Borg> LinkProperties *lp = &(this->cached_links[from->index][to->index]);
11:34:44 <Borg> ^- what this will do? will it create nonexistant MAP? but if it exists it will get ptr to existing right?
11:35:56 <Borg> hmm I also see where the problem is.. hmm thats odd
11:36:32 <Borg> partially... how it gets EUM_TRANSFER... trains dont have it set at all
11:46:24 <Borg> so C++ doesnt work I tought it works
11:47:08 <Borg> so question is valid.. how that LinkProperties thingie works? I cannot find place in code where that MAP is populated.. except AddStats()
11:53:19 <Borg> typedef std::map<StationID, LinkProperties> StationLinkMap;
11:53:28 <Borg> so? how does std::map works?
11:53:42 <Borg> it magiclly creates items when referenced on indexes?
11:53:55 <Borg> im interested in Constructor part
11:54:07 <Borg> because I noticed when I create dummy reverse link...
11:54:17 <Borg> it never gets overriden.. with is odd..
11:55:06 <Borg> void LinkGraphOverlay::AddStats(uint new_cap, uint new_usg, uint new_plan, bool new_shared, LinkProperties &cargo)
11:55:10 <xarick> maybe std::forward, I dunno
11:55:56 <Borg> ahh! there is yet another thing I didnt noticed
11:57:43 <xarick> my optimizations don't always pay off
12:24:35 <Borg> StationLinkMap::const_iterator it = seen_links.find(to);
12:24:35 <Borg> if (it != seen_links.end() && !(it->second.flags & LGF_EMPTY))
12:24:41 <Borg> okey this fixes one problem :)
12:25:37 <Borg> now second.. where the hell EUM_TRANSFER comes from... where trains doesnt have TRANSFER set..
12:29:36 <Borg> one of the edges seems to be uninitialized
12:31:08 <peter1138> LordAro, how many projects in one solution is too many?
13:01:13 <Borg> now.. wth this one does ;)
13:14:15 <LordAro> peter1138: more than 5?
13:14:26 <LordAro> i have no experience with solution files
13:16:55 <peter1138> I have 13 and am adding more...
13:18:20 <peter1138> Hmm, I need to save/load a std::unordered_map...
13:18:36 <peter1138> Pretty sure it's no the first place.
13:21:21 <LordAro> well, strictly speaking i suppose the 'aggregate project' we have at the top level of our ada monolith counts as a solution
13:21:34 <LordAro> it currently has 65 projects
13:25:27 <Borg> BaseEdge &forward = this->edges[new_node][first + node2];
13:25:27 <Borg> BaseEdge &backward = this->edges[first + node2][new_node];
13:25:27 <Borg> forward = other->edges[node1][node2];
13:25:27 <Borg> backward = other->edges[node2][node1];
13:25:41 <Borg> okey.. first one for sure creates new edge if necessary.. but what does the second assigment?
13:25:55 <Borg> updates the reference? or.. copies data?
13:26:22 <Borg> I doubt it copies data.. because then .mode would be initialized
13:28:22 <Borg> thats not helpful :(.. I see no = operator.. simple answer would be more preffered
13:28:33 <Borg> I have hard time understanding that Merge() at all
13:28:58 <LordAro> what does = have to do with anything?
13:29:34 <Borg> LordAro: huh? look at that 4 lines I pasted
13:29:48 <Borg> forward is first set to the std::map at this->edges
13:29:55 <Borg> but then.. there is forward = again
13:30:00 <peter1138> I guess you need to learn what references are?
13:30:30 <Borg> yeah I forgot about them... its been ages ive done any C++
13:30:49 <LordAro> fun fact: C++ is not simple, there is often not a simple answer
13:31:01 <LordAro> (without just telling you, which isn't fun)
13:31:13 <LordAro> (also, experiment, test, add print statements)
13:31:19 <peter1138> Assuming the inputs are all valid, nothing is uninitialised in that segment.
13:31:22 <LordAro> godbolt.org is quite useful for toy examples
13:31:54 <Borg> LordAro: please.. I dont have time for that experimantation. I hunt bug.. and I already know where the problem is
13:32:07 <Borg> Edge member mode is uninitialized..
13:32:13 <LordAro> why do you assume that any of us have time to tell you?
13:32:24 <Borg> for you.. you are C++ experts
13:32:55 <Borg> I need to know what that assigment do.. updates reference or object..
13:33:14 <Borg> I assume its first.. because if it would be object update.. all struct memeber would be updated
13:33:22 <mmtunligit> they sure seem like experts dont they, shame that isnt nessecarily true
13:35:53 <mmtunligit> you gotta learn how to read c++reference i sort of have though some of the more techincal phrasings go over my head still, but its been insanely useful in figuring out how to do stuff. i started coding like a month or two ago and i would not be able to do a tenth of the stuff i have without that site
13:36:12 <Borg> mmtunligit: im not going to be C++ coder..
13:36:15 <LordAro> oh wait, that's on libera
13:36:35 <Borg> I just fiddle around OpenTTD because I love the game
13:36:38 <mmtunligit> well if you want to do stuff for this game you'll have to be
13:36:59 <Borg> im close to the project completion.. all stuff I wanted to add its done
13:37:11 <mmtunligit> i dont want to be a C++ coder either, i couldnt give less of a shit about coding, but i love this game and want to do stuff for it, so i learn
13:37:20 <Borg> now I want to just play the game...
13:37:26 <Borg> mmtunligit: oh then please help me w/ that then
13:37:50 <mmtunligit> i really dont know anymore than you
13:37:53 <peter1138> In C++ a reference means that variable IS what it is a reference to.
13:38:03 <peter1138> `BaseEdge &forward = this->edges[new_node][first + node2];`
13:38:25 <peter1138> Therefore assigning to `forward` is the same as assigning to `this->edges[new_node][first + node2]`
13:39:23 <peter1138> Effectively, it's `this->edges[new_node]first + node2] = other->edges[node1][node2];`
13:39:27 <peter1138> But without the typo.
13:41:01 <Borg> okey. then it doesnt make a sense :/
13:41:11 <_glx_> and when using `[]` when accessing a map, it creates the item if key doesn't exist
13:41:19 <Borg> in C.. when you do tmp1 = tmp2 and tmp1 and tmp2 are struct, all data is copied
13:41:32 <Borg> _glx_: yeah, that part I already know.. thx
13:41:46 <Borg> I found a bug in my code also... BaseEdge::Init()
13:41:48 <peter1138> It is copying data, yes.
13:41:52 <Borg> I forgot to add .mode = 0
13:41:59 <_glx_> references are a kind of pointer
13:42:22 <Borg> but still it doesnt explain why after Merge() I add up w/ uninitialized .mode
13:42:51 <Borg> I played quite a few games already. and IM sure that its Merge() because its called only on two way cargo movement
13:43:33 <Borg> for sanity.. I add that .mode = 0 to Init()
13:45:31 <peter1138> Are you not trusting constructors?
13:46:30 <Borg> nah. that was pure ommitment on my side.. not criticial. because I initialized .mode properly on AddEdge()
13:47:02 <Borg> but! Merge() gave me a problem.. and actually having it initialized to 0 on Init() is not good either
13:47:27 <Borg> because I need to handle EUM_TRANSFER correctly
13:48:31 <peter1138> Also, pretty sure this is all different in master.
13:48:46 <Borg> okey constructor fixed the issue w/ unitnialized .mode
13:49:02 <peter1138> 3 years ago there was biggish refactor.
13:49:05 <Borg> so far so good.. still.. I wonder wth to do w/ EUM_TRANSFER.. maybe I could leave it as is...
13:49:22 <Borg> because Merge() seems its called only for regular two way cargo movement.. not transfers
13:49:35 <peter1138> It's really weird to see someone working on such an old version.
13:49:37 <Borg> so. it might be enough for my needs
13:49:49 <_glx_> seems master constructors do a useless reapply of default initialisation
13:49:53 <Borg> peter1138: the answer is short.. legacy OS :)
13:51:53 <Borg> I love it.. it works.. its snappy..
13:51:57 <LordAro> that's at least 3 other reasons why we shouldn't waste our time giving you the answers
13:52:17 <peter1138> Just use a more recent version, or switch to another free OS that does receive updates.
13:52:18 <Borg> LordAro: ehh.. okey.. Ill keep that in mind
13:52:29 <Borg> peter1138: yeah.. thats in my TODO... one day..
13:52:35 <Borg> more recent Windows? hell no.. never
13:52:41 <Borg> the only answer is Linux for now..
13:52:52 <LordAro> we've got one xarick, don't need another one
13:52:52 <_glx_> the only windows getting updates now is 11
13:52:55 <Borg> but not that there are no dramas in Linux distros here and there
13:53:05 <Borg> LordAro: whats up w/ xarick? :)
13:53:12 <LordAro> oh i bet you have strong opinions on systemd too
13:53:20 <Borg> LordAro: oh hell yeah :D
13:53:33 <Borg> thats why I use AntiX Linux
13:53:38 <peter1138> That should be your first step, not wasting time with 7 year old code.
13:54:26 <peter1138> Given you have no time...
13:57:48 <Borg> I rather have no motivation.. because all the stuff now moves so fast.. reinventing wheels all the time.. and those wheels aint any better anymore
13:57:52 <Borg> just add more and more bloat
13:58:01 <andythenorth> I admire this stance
13:58:09 <andythenorth> the rest of us learnt to run fast, and not worry š
13:58:29 <Borg> one day.. you will get older.. and will be unable to run that fast.. I wonder how your view change...
13:59:09 <Borg> I like progress.. dont get me wrong.. but.. not this shit that happens pretty much everywhere.. rewrites for sole rewrites.. changing behavior for no good reason.. etc.
13:59:20 <andythenorth> I don't how to compare ages without revealing our ages š
13:59:37 <andythenorth> I can't forsee you being wildly older than me
13:59:37 <LordAro> too late, rust in the kernel now
13:59:46 <mmtunligit> old man andy getting "when youre older"'d
13:59:57 <Borg> LordAro: on only there.. they also put rust to Git!!
14:00:02 <Borg> luicky.. I can use older version :>
14:01:21 <LordAro> i'm not convinced you're not 15 tbh
14:01:50 <_glx_> older git? with security holes?
14:02:08 <LordAro> _glx_: as far as threat model goes, an older git is the least of their concerns
14:03:00 <Borg> anyway. thanks for help anyway
14:03:08 <Borg> I will not bother you any futher...
14:03:10 <LordAro> you're welcome to keep doing you (like andy, i do admire this stance), but you've got to know how to actually use it properly
14:03:16 <LordAro> and figure out the inevitable problems
14:03:41 <LordAro> instead of begging others to solve your own problems for you
14:03:44 <peter1138> We should document it all on the Gopher site.
14:03:55 <Borg> LordAro: yeah. I hate doing so
14:04:17 <peter1138> telnet is good enough for me, look how many security wholes are in SSH...
14:04:32 <Borg> LordAro: also, your explanation doesnt really explain why I have .mode unintialized
14:04:50 <Borg> if stuff is indeed copied.. .mode should be either 0 or 16
14:04:56 <peter1138> Fortunately git is modular, so rust components can be added without having to rewrite it all in one go or come up with mad half C-half rust.
14:04:57 <Borg> apparently.. it does not happen...
14:05:38 <Borg> peter1138: I actually do NOT understand it.. if they want new GIT client in Rust.. just write it
14:05:55 <Borg> I bet there will be a lot of users happinly using it.. because its in Rust
14:06:05 <_glx_> every git command is it's own exe
14:06:37 <LordAro> mm, that's not been the case for a long time
14:06:39 <Borg> its still modular.. and do check if command is external. but if not... the main /usr/libexec/git/git is called
14:06:53 <Borg> so you can override or add new commands at will
14:07:56 <peter1138> As long as I'm not having to write or build it, I'm not bothered.
14:08:10 <peter1138> When that time comes I'll give it a try :)
14:08:59 <Borg> well.. Linus is genious for sure
14:09:27 <Borg> Linux Kernel.. and Git.. Git is awesome.. now I you can just mirror and fork entire projects at will :)
14:09:44 <Borg> I remember when I moved from SVN -> GIT
14:10:00 <Borg> took me whole day to understand some git internals..
14:10:41 <LordAro> rust is great, though i do accept that the majority of my experience of it is in programming challenges like AdventOfCode, so i don't have a lot of experience with actual software architecture
14:10:59 * LordAro spends far too much time in Ada and Perl :(
14:11:09 <Borg> LordAro: I tried rust and it was meh to me...
14:11:18 <Borg> I dont say its bad language...
14:11:27 <Borg> its my problem I cant grasp myself around it..
14:11:33 <Borg> Ill stick myself to C and Ruby
14:11:48 <vondpc> it takes a while to grasp it yeah
14:12:01 <Borg> vondpc: the biggest problem w/ rust is bootstrapping it
14:12:14 <Borg> for me of course.. due to legacy OS..
14:12:45 <Borg> LordAro: haha :) as far as I understand now the chain is broken
14:12:51 <Borg> you cannot bootstrap GCC directly anymore
14:13:23 <Borg> like.. gcc 2.95 -> gcc 3.3 -> gcc 4.9 -> gcc<dunno> [;
14:15:01 <Borg> yeah :> I cant get past Stage 0 [;
14:15:31 <LordAro> a suitably old ocaml compiler must exist somewhere
14:15:52 <LordAro> but like we've already said, at least start with an OS from this decade
14:17:57 <Borg> LordAro: but what are the options?
14:18:09 <Borg> except AntiX Linux w/ I really like.. what else?
14:18:44 <Borg> Haiku would be nice.. unfortunately.. I dont like GUI.. because My first GUI os was Win95..
14:19:04 <Borg> and so.. Im hardwired to certain workflow
14:19:23 <Borg> AntiX w/ IceWM is pretty ok :)
14:19:32 <LordAro> there are a number of desktop managers that style themselves after old windows
14:19:34 <Borg> probably.. could be my main OS
14:19:49 <Borg> its a bit heavier that AntiX
14:20:42 <LordAro> devuan is still going, apparently
14:22:05 <Borg> hm didnt know about that one
14:22:42 <peter1138> Just avoid the weirdness, Debian is all you need.
14:23:02 <Borg> no.. Debian sold his soul to systemd
14:24:02 <Borg> I have no problem w/ weirdness.. as far as it works and its maintanable
14:25:10 <peter1138> 13:53 < LordAro> oh i bet you have strong opinions on systemd too
14:26:07 <alfagamma7> Hmm. So you like init scripts
14:26:25 <alfagamma7> I haven't used them
14:26:43 <alfagamma7> So far, systemd works well for me
14:26:46 <Borg> alfagamma7: I follow KISS philosophy..
14:26:51 <peter1138> Probably never used systemd, just heard from others that it's "bad".
14:27:09 <Borg> peter1138: oh. I used it.. and it was always in my way
14:27:18 <Borg> and the more stuff they added to it.. it was even more in the way
14:27:18 <alfagamma7> I use KISS as well
14:27:40 <alfagamma7> I usually don't poke into system stuff
14:27:55 <alfagamma7> usually leads to disastrous results
14:28:39 <LordAro> hang on, what processor does your computer have?
14:28:48 <alfagamma7> Definitely would like to try out a non systemd system
14:28:51 <Borg> Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
14:29:04 <LordAro> see that's almost modern
14:29:14 <LordAro> i was expecting a pentium
14:29:20 <Borg> alfagamma7: I can recommend AntiX really :) if you are fine w/ lightweight GUI and lean look :)
14:29:37 <Borg> LordAro: and I sport 16GB of RAM :D
14:29:50 <Borg> altough its a challenge to run it on 32bit system tho :D
14:29:55 <alfagamma7> I use vanilla Arch
14:30:01 <Borg> I had to tune quite a bit of settings in my Win2003 :)
14:30:06 <alfagamma7> just good enough for me
14:30:11 <peter1138> AntiX does seem to be Debian-based at least.
14:30:19 <alfagamma7> andythenorth: Bedtime here almost
14:30:34 <peter1138> > Proudly anti-fascist "antiX Magic" in an environment suitable for old and new computers.
14:30:39 <LordAro> i like how Windows *Server* 2003 is fine, but systemd is not
14:31:03 <Borg> LordAro: I can control Win2003... it doesnt get in my way
14:31:17 <Borg> where systemd just tries to do everything behind your back
14:31:34 <alfagamma7> So you don't like RedHat
14:31:37 <Borg> LordAro: whats funny really? what OS are you running?
14:31:58 <Borg> alfagamma7: oh the last RedHat I touched was.. 15 years ago? :) wasnt fan of it
14:32:08 <LordAro> i spend a lot of my time administering Windows and Linux (largely Ubuntu) systems. SystemD is *so* much easier than anything Windows
14:32:31 <Borg> LordAro: what last Windows OS you were touching?
14:32:33 <alfagamma7> Haven't used systemd for bootloader yet
14:32:45 <Borg> because I can agree that if you move past Win2003.. its been downhill
14:32:54 <alfagamma7> Wonder how it is in comparison to the default, grub
14:32:55 <LordAro> the fundamentals haven't changed
14:32:59 <Borg> ALSO... the whole AD is very complicated even in Win2003.. never ever touched it...
14:33:20 <Borg> I use Win2003 as desktop OS.. so a lot of server stuff is just disabled
14:33:44 <Borg> a lot of services are disabled too.. its tuned for minimalism.. enabled only what is necessary
14:33:45 <LordAro> alfagamma7: i definitely did that at some point. pretty sure it just worked(tm)
14:33:59 <LordAro> until Windows boot loader overwrote something and i've never bothered to fix it
14:35:29 <alfagamma7> Nah booting two OSes at the same time in the same system is a headache
14:35:39 <Borg> Win7 was not bad :) if they kept the GUI stuff.. and focused on kernel and drivers.. it would be win win
14:36:15 <LordAro> luckily, i can fuck around with my personal systems all i want :)
14:36:16 <alfagamma7> Win7 was the last good version of Windows, yes
14:36:25 <Borg> yeah.. luicky we have Virtualization today :) so no need for dualboot
14:36:37 <LordAro> there's still an increasingly old Arch install on a drive in this desktop somewhere
14:36:43 <alfagamma7> Win11 is just awful
14:36:44 <mmtunligit> i know nothign about linux internals and hope i never do. my OS works and isnt full of AI bullshit and spyware, thats all that matters to me
14:37:09 <alfagamma7> I just know enough to get by
14:37:10 <Borg> mmtunligit: thats all right :) you focus on other things
14:37:21 <Borg> I like to tinker around here and there..
14:37:35 <Borg> Im not afraid to fire up disassembler.. and then patch some binaries too [;
14:37:59 <alfagamma7> Plus the one thing that I have understood while tinkering with other things I like is, don't do things you don't understand (yet)
14:38:33 <Borg> alfagamma7: but thats how you learn.. you do things you dont understand.. and try it. and learn.. :) just do it safe
14:38:37 <LordAro> don't do things with anything you care about*
14:38:51 <Borg> its much easier today.. that 30 years ago
14:38:58 <Borg> Virtualization helps a lot
14:39:03 <xarick> 298 messages since 13:28 :/
14:39:04 <mmtunligit> wait borg, so you do allllll this messing about wiht your kernel, but cant figure out c++reference?
14:39:17 <Borg> mmtunligit: kernel is assembly.. its easier :P
14:39:29 <alfagamma7> I do like virtualisation
14:39:45 <Borg> I mean... in disaasembly.. because its written in C and a bit of C++
14:40:30 <alfagamma7> Helps me use Adobe for 1 (one) singular usage: get that tick mark thingy on my docs
14:40:54 <alfagamma7> Otherwise there's no actual use for windows for me at least
14:40:57 <LordAro> oh god, Adobe Reader can get in the fucking sea
14:41:04 <LordAro> such a useless piece of crap
14:41:21 <Borg> alfagamma7: I use Win os because I really like it
14:41:34 <Borg> the GUI.. the speed.. the tools I have.. the knowledge..
14:41:44 <Borg> pretty much all the problems are already solved...
14:42:49 <Borg> alfagamma7: my path was like Win95 -> Win98 -> Win2000 -> Win2003
14:43:00 * rito12_51026 needs to learn how to upgrade debian to version 13
14:43:25 <Borg> and if you compare GUIs of those.. they are all very similar.. Win2003 defaults to Windows Classic..
14:43:35 <Borg> in WinXP you could enable Windows Classic in few clicks
14:43:39 <alfagamma7> @Borg so you have never used a windows system with an NT kernel?
14:43:46 <LordAro> rito12_51026: for the most part it's just updating sources.list & running `apt full-upgrade`
14:43:55 <LordAro> but a read of the upgrading notices can't hurt
14:43:57 <alfagamma7> Oh right Winxp was one right
14:44:01 <Borg> alfagamma7: huh? Win2000 onward uses NT kernel...
14:44:40 <alfagamma7> Haven't used debian
14:44:54 <alfagamma7> Might use the sid branch
14:45:45 <rito12_51026> really it is that easy, in mint you had to do full backup and reinstall everything
14:46:20 <LordAro> there's an awful lot in the above that i never bother with (but i can generally fix things when they go wrong)
14:46:39 <peter1138> It's super easy, yes.
14:46:54 <LordAro> alfagamma7: i used debian sid for a few months about 15 years ago. i think i stopped when the wifi was broken for 6 months
14:47:01 <peter1138> I accidentally skipped a release once, it still worked, although needed one thing fixing.
14:50:10 <LordAro> alfagamma7: that was in the dark days of Linux driver compatibility though, it's probably fine nowadays
14:50:27 <LordAro> debian experimental on the other hand... :D
14:50:44 <xarick> i somehow made PlantTreeRectangle stuck ad infinitum
14:51:05 <alfagamma7> I think I will get cocky and try to make Debian work on a SBC
14:56:16 <xarick> ah no, it's some valuate function that is stuc
15:02:28 <xarick> found the problem, kek
15:29:28 *** WormnestAndroid has quit IRC (Remote host closed the connection)
15:29:32 *** WormnestAndroid has joined #openttd
15:49:27 <andythenorth> oof I have crashed
15:49:54 <andythenorth> worked 40 hours already this week, only Weds š
16:08:32 <peter1138> Have you tried a nap?
16:15:02 <LordAro> i thought it was a bit quiet
16:55:45 <xarick> i just made AddList faster
16:58:26 *** Wormnest has joined #openttd
16:58:53 <xarick> the dual iteration approach
17:05:43 <rito12_51026> It took me an hour to write it
17:11:58 <xarick> how do i use lower_bound with a hint?
17:13:20 <xarick> lower_bound, starting from position x, so that it won't scan everything behind x
17:13:47 <peter1138> lower_bound(x, list.end(), ...)
17:17:38 <xarick> nop, im doing something wrong
17:21:03 <peter1138> std::lower_bound(), but no idea if it's appropriate.
17:23:10 <xarick> oh nice, doesn't complain, let's build
17:24:30 <xarick> Failed to specialize function template 'unknown-type std::less<void>::operator ()
17:25:30 <LordAro> there's no comparison operator for whatever that container contains
17:27:00 <LordAro> those are very different types, yes
17:30:15 *** gelignite has joined #openttd
17:30:41 <LordAro> well, probably. _Ty could be std::pair too i suppose
17:30:46 <LordAro> but it probably isn't
17:31:03 <xarick> this became much more verbose
17:31:03 <xarick> `item_iter1 = std::lower_bound(item_iter1, this->items.end(), item_iter2->first, [](const auto &lhs, const auto &rhs) { return lhs.first < rhs; });`
17:32:14 <peter1138> Well, I wasn't suggesting it's a good idea :-)
17:32:40 <peter1138> The point of a std::map is that something like lower_bound is very quick anyway, which is why it has its own function.
17:44:16 <xarick> master, real master not tested
18:07:00 *** Smedles has joined #openttd
18:08:36 *** Borg has quit IRC (Quit: leaving)
18:24:17 <LordAro> boil em, mash em, stick em in a stew
18:29:21 <xarick> what about remove rectangle
19:19:24 *** gelignite has quit IRC (Read error: Connection reset by peer)
19:19:47 *** gelignite has joined #openttd
19:31:16 <mmtunligit> huh, builds just fine for me
19:34:52 <rito12_51026> mmtunligit: It builds corect on github, the ctets fail though
19:35:18 <mmtunligit> dont know what those are besides the things that should be showing up green
19:35:57 <rito12_51026> they are test to check if you have broken anything
19:36:16 <mmtunligit> so apprently i broke something then
19:37:47 <rito12_51026> it throws segfault in the last two regression tests
19:38:43 <rito12_51026> They are just predefined saves with an AI ?
19:39:54 <mmtunligit> its the news thing, in the old implementation it also set the fill to 0 which maybe SZSP_NONE doesnt do
19:41:06 <mmtunligit> running openttd_test passes all checks
19:41:41 <mmtunligit> fall and resize to zero
19:41:57 <rito12_51026> on linux I just call `ctest -j 16` to run those test
19:42:12 <rito12_51026> in the build directory
19:42:46 <mmtunligit> ok yeah then the last two fail
19:44:10 <peter1138> The news window has various different layouts.
19:44:33 <peter1138> The NWID_SELECTION is probably not in all of them.
19:44:50 <peter1138> So you need to check if it exists first before setting the selection.
20:23:08 *** Flygon has quit IRC (Remote host closed the connection)
20:30:28 <rito12_51026> mmtunligit: I don't see how it would work with dragging dropdown
20:32:48 <rito12_51026> Drag onto the text box, then dropdown turns into the click mode?
20:33:48 <mmtunligit> yeah that makes sense
20:34:54 <mmtunligit> (im looking at doing something similar in my picker collection gui refactor so thats actually a really useful thing to have figured out thanks)
20:36:26 <rito12_51026> You are going to have a dropdown with bound search box inside, in the picker window?
20:39:43 <mmtunligit> yeah, thats the only way i feel as though i can actually distinguish the collection search from the class search if im implementing tylers request to have the collections in a dropdown, which i do think makes more sense
20:40:27 <andythenorth> there is a known UI pattern for filtering in a dropdown
20:40:51 <mmtunligit> with the current implemetation with the two tabs the search bar just gets swapped out when you switch from one to the other but if its in a dropdown that wont work
20:41:41 <mmtunligit> if youre talking like the cargo dropdowns that wouldnt work here, since youre never selecting more than one item to view, and if you have a ton is finding it thats the problem
20:42:06 <andythenorth> there are others
20:42:37 <andythenorth> object filter search is probably closest thing in OpenTTD, but not a dropdown
20:42:58 <mmtunligit> yeah thats what im doing
20:43:01 <mmtunligit> jus tin a dropdown
20:43:34 <andythenorth> it's probably way too late now, but OpenTTD UI would be more humane if it was more keyboard navigable
20:44:28 <mmtunligit> ive never understood the "i want to navigate everything with a keyboard" people, mouse just makes so much more sense to me imo
20:44:46 <rito12_51026> mmtunligit: Why you can't/don't want to use one filter for both collections and groups?
20:46:39 <mmtunligit> seems unweildy? idk at least for collections itd be type in the box (which would also hide a bunch of classes) open the dropdown and then navigate to what you want, instead of just open the dropdown with the search bar already focused (or if click-dragging focused on release) typing in and then clicking on the item you want
20:47:15 <rito12_51026> mmtunligit: Shortcuts are fun. Doing repetitive task with keyboard is much easier than with mouse and it also can be faster.
20:47:43 <mmtunligit> itd also be unclear that that bar filters the dropdown, having it built in is more intuitive imo
20:48:12 <mmtunligit> rito12_51026: i mean like a few shortcuts sure, but most thing i prefer mouse, idk i guess im just different
20:48:36 <andythenorth> mmtunligit: once you've got a text cursor in a filter box, it's easier to tab or cursor to the item you want to select
20:49:04 <andythenorth> somewhat it's just mechanical...fingers are already on the keyboard, not trackpad
20:49:15 <mmtunligit> see i dont agree, i think using the mouse is easier, especilly if the item is far down the list
20:49:22 <mmtunligit> well i dont use a trackpad
20:49:23 <andythenorth> unwinnable debate
20:49:32 <andythenorth> there's no correct way
20:49:32 <mmtunligit> yeah its just two different styles
20:50:36 <rito12_51026> mmtunligit: then you have like ctrl+home and ctr+end or shift+down and shift+up to go like 10 items istead of one
20:51:33 <mmtunligit> when is anyone supposed to learn this stuff? and then youd have to count or risk overshooting and thats annoying
20:51:52 <rito12_51026> mmtunligit: Yeah, it would be unclear and adding tooltip won't help
20:53:08 <rito12_51026> mmtunligit: IDK, they semed natural to me
20:57:52 <talltyler> What a silly mistake I made š
21:20:11 <peter1138> Ah the corrupted one.
21:22:10 *** certator has joined #openttd
21:22:10 <certator> > ... consistency of English used in code and comments (here). What do you think, would be beneficial to update pre-commit hook to flag certain terms automatically?
21:35:39 <mmtunligit> holy github spam batman
22:03:17 <rito12_51026> TallTylerviaGitHub: The #10071 seems to be a fix for #10069
22:03:18 <kuhnovic> The PM is going over the backlog š
22:05:44 <talltyler> (as much as any of us "have to" do anything in OpenTTD land)
22:09:45 <kuhnovic> I'm glad you're doing it. Sometimes I wish my mind had a better clean desk policy
22:10:33 <talltyler> There are other parts of my life I can't keep up with š
22:10:44 <talltyler> Gotta take the wins when I can
22:11:24 <kuhnovic> Small victories, they add up!
22:19:16 <mmtunligit> i know ive definently wanted to have a bus go via a truck stop or vice versa, it makes sense they cant stop there but you shoulld be able to tell them to drive through and have it function like a waypoint
22:19:39 <mmtunligit> did TTD even have drive-through roadstops? i feel like i remeber that being an addition
22:20:39 <_zephyris> andythenorth: It is really odd, I don't know of one full stop.
22:37:46 <talltyler> Four-digit issue number, that's an old bug š
22:38:33 <talltyler> Wish there was a nice way to get my reproduction savegame into a preview build...
22:39:35 <talltyler> I can provide a screenshot, at least
22:43:02 <tabytac> Oh btw talltyler has the bug been fixed in vanilla where you can't use the house placer to place houses next to roads which disallow buildings next to them?
22:45:15 <talltyler> I have a PR that fixes it, awaiting review š
22:48:37 <xarick> I'm considering something complex
22:50:57 <xarick> there's a std::map with key, val
22:51:07 <xarick> and there's a std::set with val, key
22:51:17 <xarick> they are in sync right?
22:51:52 <xarick> i thought of std::map to store an iterator to the matching item in std::set
22:52:13 <xarick> and std::set to store an iterator to the matching item in std::map
22:53:33 <xarick> when deleting an item, it won't need to do a double find, just look at the iterators pointing to each other
22:53:54 <xarick> but i expect adding items to be slower
22:54:35 <xarick> i'll be experimenting this
22:55:27 <mmtunligit> this seems like a great way to use up a bunch of extra memory for very little if any practical benefit
22:56:19 <xarick> 95% of the time, list operations are using sort by value, which involves synced work š I think it's worth experimenting
23:12:35 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:24:23 <xarick> implemented an iterator in std::map pointing to std::set
23:25:53 <xarick> left: after, right: before
23:28:01 <xarick> i honestly expected bigger gains
23:28:18 <xarick> i'm also assuming i didn't do any mistake
23:28:37 <_glx_> I think the easiest way to improve time consuming list operations is to make them suspendable
23:29:01 <_glx_> so they only affect AIs and not the game
23:53:35 <squirejames> tabytac: Is that really a bug? I mean, I never found that to be an issue, and quite like that functionality. Perhaps a switch could be added?
continue to next day āµ