IRC logs for #openttd on OFTC at 2024-06-14
β΄ go to previous day
01:46:05 *** Wormnest has quit IRC (Quit: Leaving)
02:16:14 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:03:48 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:26:18 *** Leopold_ has quit IRC (Remote host closed the connection)
05:22:07 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:42:01 *** Leopold_ has joined #openttd
05:43:17 *** Leopold_ has quit IRC (Remote host closed the connection)
06:28:03 <johnfranklin> Never known a bribe can avoid other's exclusive transportation rights
06:29:23 <silent_tempest> I mean what can't a *real* bribe accomplish? π
07:49:20 <pickpacket> johnfranklin: it's new since 14.0. It used to be that someone else could just go in and buy exclusive rights even when someone else had it. I don't think that makes sense.
07:49:51 <pickpacket> silent_tempest: reduce corruption? ;)
08:09:16 <silent_tempest> Unless the bribe is to not take any more bribes? Have to be one helluva bribe though lol
08:32:11 *** _rei4122 has quit IRC (Quit: User went offline on Discord a while ago)
08:38:56 <pickpacket> silent_tempest: wouldn't you have to bribe everyone who is or will ever be in a position to receive a bribe in that case?
08:44:35 *** SigHunter has joined #openttd
09:03:49 *** SigHunter has joined #openttd
09:03:52 <peter1139> It's bis-cuit time...
09:04:02 <peter1139> * I have no biscuits :(
09:05:40 *** mindlesstux has joined #openttd
09:06:20 <peter1139> Doubling down on being wrong?
09:06:31 *** SigHunter has joined #openttd
09:07:17 *** SigHunter has joined #openttd
09:10:48 *** SigHunter has joined #openttd
09:11:01 *** SigHunter has joined #openttd
09:11:50 <johnfranklin> is cookie a type of biscuit?
09:11:50 <johnfranklin> what about something like kitkat?
09:17:45 *** SigHunter has joined #openttd
09:18:43 *** SigHunter has joined #openttd
09:19:04 <peter1138> A kitkat is not a biscuit.
09:28:05 <pickpacket> We have banana cake at the office. A colleague brought it
09:36:00 <LordAro> peter1139: i kinda want to close it with "this is getting out of hand, try again in another PR"
09:41:33 <Eddi|zuHause> does "is a waffle a biscuit" constitute the same kind of discussion as "is a hotdog a sandwich"?
09:46:35 <Eddi|zuHause> google says waffles are pancakes, but that's probably referring to the floppy waffles
09:53:22 <Eddi|zuHause> so, what was that originally about? does the old method not work anymore, or is it just a "there's this builtin method now, why not use that"?
09:53:31 <LordAro> deprecation warning, i think
09:54:40 <LordAro> or possibly deprecated thing has been removed
09:55:32 <LordAro> i care about potential contributors
09:56:08 <LordAro> more than some others here, imo ;)
09:56:37 <Eddi|zuHause> no good thing can come out of that discussion.
09:56:49 <LordAro> that's why i wrote it here rather than on the PR :p
09:57:23 <reldred> fuck me, that guys got an ego
10:03:12 *** Smedles has quit IRC (Quit: No Ping reply in 180 seconds.)
10:04:09 <andriydohniak> How difficult would it be to add an new button with new text?
10:04:23 *** Smedles has joined #openttd
10:06:26 <Eddi|zuHause> add where? for what purpose?
10:07:47 <Eddi|zuHause> about 10LOC, i'd say. but GUI code is one of my weak points
10:08:09 <andriydohniak> I am building a new UI, and I need a button that toggles (shows/hides) an item
10:08:25 <andriydohniak> I already have buttons for "show all" and "hide all"
10:08:38 <Eddi|zuHause> the text is just a new line in english.txt, the button needs an entry in some widget table, and a function that is called when you click it
10:08:41 <ahyangyi> ahyangyiviaGitHub: ^ Perhaps it should go into a new PR?
10:08:45 <andriydohniak> I am asking not from the code standpoint, but from the translation standpoint
10:09:10 <andriydohniak> How big of a deal is it to translate it to all other langs
10:09:42 <andriydohniak> Eddi|zuHause: I know how the gui code works, just asking about how difficult is it to translate to every other supported language
10:09:57 <Eddi|zuHause> no big deal, the new entry in english.txt gets picked up by the translation system, and presents it to the translators, which then can add their translation
10:10:10 <andriydohniak> Eddi|zuHause: ty
10:11:13 <Eddi|zuHause> the translations shouldn't be part of the PR.
10:11:21 <talltyler> Oh, we add new strings all the time. Donβt worry about it. π
10:11:41 <Eddi|zuHause> well, they can be, but there's no need.
10:12:20 <ahyangyi> Speaking of translations, let me ask about this
10:13:24 <ahyangyi> None of us want to manually input this 470-line systematic change to the web translator -- please consider merge this PR instead.
10:13:36 <Eddi|zuHause> we've done that kind of exceptional translation PRs before
10:15:03 <talltyler> I have no issue personally with that approach, but I donβt know the quirks of web translator well enough to say if it would even work properly or just get overridden.
10:15:33 <Eddi|zuHause> the translator should pick that up correctly... at least it used to
10:16:43 <peter1139> ahyangyi, needs to not be a Draft at least.
10:17:06 <peter1139> (And ensure it's up to date.)
10:27:49 *** mindlesstux has quit IRC (Ping timeout: 480 seconds)
10:28:12 <Eddi|zuHause> anyway, back to topic: a bit further down google thinks the term "biscuit waffle" exists
10:31:19 <peter1139> Is constexpr not doing what I expect there...?
10:31:48 *** mindlesstux has joined #openttd
10:49:13 <andriydohniak> Can I chain iterators in c++?
11:01:20 <peter1139> What does that mean?
11:01:42 <peter1139> C++ views/ranges are the closest I can think of without knowing what you mean. And we don't use them.
11:11:15 <andriydohniak> peter1139: Can I have an iterator, like `(for i : iterable)`, and can I make a custom iterable that takes another iterable and adds an element to the end
11:11:38 <andriydohniak> in rust it's `list.iter().join(another_list.iter())`
11:12:40 <andriydohniak> like this, but without boost
11:12:40 <andriydohniak> #include <boost/range/join.hpp>
11:12:40 <andriydohniak> #include <iostream>
11:12:40 <andriydohniak> #include <vector>
11:12:42 <andriydohniak> #include <deque>
11:12:44 <andriydohniak> std::deque<int> deq = {0,1,2,3,4};
11:12:46 <andriydohniak> std::vector<int> vec = {5,6,7,8,9};
11:12:46 <andriydohniak> for(auto i : boost::join(deq,vec))
11:12:48 <andriydohniak> std::cout << "i is: " << i << std::endl;
11:14:50 <peter1139> Might be something ranges can do, but probably better off with two loops.
11:15:15 <_jgr_> You can write an iterator adaptor to do this, but it's more hassle than it's worth for the most part
11:15:18 <andriydohniak> Very true, but what if the thing inside the loop is 100 lines of heavily interlinked code?
11:16:29 <andriydohniak> Does c++ support capturing closures (lambdas), so I can put that inner code in one, and call it from 2 loops
11:17:36 <peter1139> Then put it in a function.
11:17:49 <andriydohniak> but it will have a lot of mutable parameters
11:17:54 <andriydohniak> I guess it's fine
11:18:09 <peter1139> If it's 100 lines it's probably too complex :p
11:18:18 <andriydohniak> It is, and it's not my code
11:18:29 <andriydohniak> it's the code drawing lines in the graph
11:19:47 <andriydohniak> well I can't count, it's not 100, it's 65
11:19:55 <andriydohniak> but It can probably be less
11:20:58 <peter1139> The graph lines should come from a single dataset, no?
11:21:18 <andriydohniak> but I need to draw the selected line at the end
11:21:24 <andriydohniak> and I need to do multiple passes
11:21:47 <andriydohniak> there are no layers, so the only option is do it multiple times
11:23:40 <andriydohniak> Previously I used this piece of logic to make it work, but I want to make it better
11:23:40 <andriydohniak> int rendered_selected = 0;
11:23:42 <andriydohniak> // All this is to make sure the selected item gets drawn on top
11:23:42 <andriydohniak> if (rendered_selected < 2 && rendered_selected != 0) {
11:23:44 <andriydohniak> rendered_selected++;
11:23:44 <andriydohniak> } else if (rendered_selected == 0) {
11:23:46 <andriydohniak> if (i == comp_selector.selected.value_or(INVALID_OWNER)) {
11:23:50 <andriydohniak> if (comp_selector.selected.has_value()) {
11:23:50 <andriydohniak> if (i == this -> num_dataset){
11:23:52 <andriydohniak> rendered_selected++;
11:23:52 <andriydohniak> i = comp_selector.selected.value();
11:23:55 <andriydohniak> if (i == this -> num_dataset){
11:24:15 <andriydohniak> all this does, is skips the selected one during normal iteration, then at the end runs with the selected one 2 times
11:24:31 <andriydohniak> and I don't like the logic over here :)
11:25:11 <peter1139> Yes, that's horrible.
11:25:46 <andriydohniak> peter1139: That's why I am searching for a magic solution, but I will probably try to make the inners a function, and call it from 2 small loops
11:26:29 <peter1139> Don't let the scope of your changes creep.
11:29:30 <andriydohniak> peter1139: I need to fix this, the current scope is: "Make the graphs use the new universal selector"
11:29:45 <andriydohniak> or just "Fix the graphs"
11:30:22 <peter1139> Step 1) Add your universal filter (1 PR)
11:30:38 <peter1139> Step 2) Add extras like highlighting a selected line (Second separate PR)
11:30:39 <andriydohniak> But then it will not be used
11:31:10 <andriydohniak> I will think about how to split this
11:31:47 <andriydohniak> but currently I need to change the graph heavily, because they are no longer independent, they can use the same functions and data structures of the widget
11:33:51 <andriydohniak> void DrawLine(int i, Rect r, int &x, int &y, int x_sep, int x_axis_offset, int interval_size, int pointoffs1, int pointoffs2, int linewidth) {
11:34:00 <andriydohniak> It's fine, right? right?
11:34:53 <andriydohniak> I will simplify / move some of the stuff inside, but very much not many of the arguements
11:37:07 <peter1139> With that many parameters you might consider turning it into a struct.
11:37:28 <peter1139> And also "DrawLine" is a bit vague.
11:38:13 <andriydohniak> peter1139: Still testing
11:38:30 <andriydohniak> currently ` void DrawLine(int i, Rect r, int x_sep, int x_axis_offset, int interval_size, int linewidth) `
11:38:52 <andriydohniak> I reduced the number of args signifficantly, because they are very easy / cheap to calculate
11:39:08 <andriydohniak> but it's less bad then I thought
11:40:00 <andriydohniak> It's like looking at a cake without being able to eat it, pointless
11:40:15 <andriydohniak> but damm, looks a lot like rust! And I love it
11:40:23 <andriydohniak> rust is still better btw
11:41:39 *** Heiki is now known as Heili
11:42:09 *** pikaHeiki is now known as Heiki
11:43:47 <LordAro> all languages have their pros and cons
11:44:47 <LordAro> for some of them a significant "pro" is "x has already been written" (not that C++ is one of these imo)
11:46:08 <peter1139> Just rewrite it all, eh?
11:46:12 <andriydohniak> They all do, for example if openTTD was somehow ported to rust, I am sure it won't be able to compile on my laptop in 5 sec
11:46:43 <andriydohniak> but on the positive side, no dumb 25 min linking for a windows build
11:47:40 <andriydohniak> This looks dowright resonable, ey?
11:47:40 <andriydohniak> /* draw lines and dots */
11:47:40 <andriydohniak> DrawLineAndDots(i, r, x_sep, x_axis_offset, interval_size);
11:48:02 <LordAro> rust compile time is one of the main negatives
11:48:31 <andriydohniak> LordAro: but if you know how to use it well, its pretty much fine
11:48:54 <LordAro> you realise you can say that about almost anything?
11:49:02 <andriydohniak> I recently had to write a project that uses an TUI framework, and libvte, and the compile times were ~10 seconds
11:49:27 *** Heiki has quit IRC (Quit: Reconnecting)
11:49:45 <andriydohniak> LordAro: Well no, do it for an os written in JSfuck brainfuck
11:50:00 <andriydohniak> not brainfuck, jsfuck
11:51:06 <andriydohniak> I am just saying, when people talk about slow compile times in rust, and you see their cargo.toml with 600 deps, and a huge main crate, it's a little unfair
11:51:32 <andriydohniak> 600 recursive deps*
11:51:36 <andriydohniak> including deps of deps
11:55:16 <andythenorth> leftover risotto?
11:59:25 *** virtualrandomnumber has joined #openttd
12:00:22 *** virtualrandomnumber has quit IRC ()
12:04:18 *** Flygon has quit IRC (Read error: Connection reset by peer)
12:07:32 <andriydohniak> Does anybody mind this spacing ( space only on the bottom and left )?
12:07:52 <andriydohniak> The fonts and button names will change
12:10:17 <andriydohniak> Another option is like this:
12:19:35 <peter1139> If you want no space then it show go down to the bottom, and the resize box should be part of it, under the scrollbar.
12:20:22 <peter1139> And then the panel that graph is it should stop before your widgets, unstead of going underneath.
12:24:18 <peter1139> I had some mini cheddars.
12:24:22 <peter1139> Which are kinda biscuits.
12:24:52 <LordAro> sure they're not hotdogs?
12:25:39 *** notluke2578 has joined #openttd
12:25:39 <notluke2578> nah mini cheddars are their own thing
12:25:54 <notluke2578> too good to be mixed in with anything else
12:25:56 <andriydohniak> LordAro: That is inflammatory behavior
12:26:41 <andriydohniak> It is like saying Arch is bad! THere are TENS of us who will come after you
12:27:26 *** virtualrandomnumber has joined #openttd
12:27:49 *** virtualrandomnumber has quit IRC ()
12:31:07 <peter1139> They're savoury biscuits, not much else to it.
12:31:20 <peter1139> But they're packaged like crisps.
12:31:31 <notluke2578> yea, so not biscuits
12:33:01 <notluke2578> well they arent mini cheddars
12:37:51 <LordAro> hmm, this server is hard resetting approximately every 10 minutes
12:39:51 *** stewardcollin has joined #openttd
12:39:51 <stewardcollin> # Best Free NSFW :hot_face: server (NSFW:underage:, Snapchat:peach:, TikTok:fire:, OnlyFans:sweat_drops: and Sex cam :lips:) https://discord.gg/tTyBgSNfrp all all
13:11:01 <andriydohniak> OOM might do something like that
13:11:35 <LordAro> andriydohniak: not when it happens within memtest & bios :p
13:11:49 <LordAro> but it seems i may have inadvertently enabled BMC watchdog timer
13:11:56 <LordAro> which, guess what, was configured to reset after 10 minutes
13:17:04 *** Leopold_ has joined #openttd
13:39:17 <pickpacket> aaawww... so disappointed now. I started reading stewardcollin's message as "# Best Free NewGRF..." but then noticed that's not what it said. Very sad
14:34:15 *** xarick has quit IRC (Quit: User went offline on Discord a while ago)
14:51:08 <andythenorth> anybody used S3 Guard Duty yet?
15:40:22 *** HerzogDeXtEr has joined #openttd
16:27:47 <andythenorth> hmm AWS GuardDuty needs me to enable EventBridge and some IAM roles
16:31:02 *** wallaby2 has joined #openttd
16:33:15 *** Leopold_ has quit IRC (Ping timeout: 480 seconds)
16:34:11 *** wallabra has quit IRC (Ping timeout: 480 seconds)
17:03:50 *** mindlesstux has quit IRC (Remote host closed the connection)
17:03:59 *** mindlesstux has joined #openttd
17:05:33 <peter1139> CodeQL is going to roast me :p
17:05:45 <andythenorth> waiting to see if eicar.txt is now found in my S3 bucket π
17:28:29 <andriydohniak> How do I get the button height to match the resizebox height?
17:41:53 <peter1139> I'm not sure what comments would help that function.
17:42:09 <_glx_> andriydohniak: haha welcome to GUI annoyance π
17:42:43 <andriydohniak> I saw WidgetDimentions::scaled.resizebox
17:42:45 <andriydohniak> but it's just wrong
17:42:58 <peter1139> Easy, put them in the same row.
17:43:09 <_glx_> often putting both in the same container solves the problem
17:43:25 <andriydohniak> peter1139: not that easy, because I have other buttons on top, and I can't put them in the same widget
17:43:50 <andriydohniak> I want not just the bottom button to be the same, but the 2 top ones too
17:44:05 <peter1139> Two "enable all" buttons seems like a bad idea. As does using the small font there.
17:44:14 <andriydohniak> The text is wrong
17:44:21 <andriydohniak> The bottom one is toggle
17:44:32 <peter1139> Put them in a vertical container with NC_EQUALSIZE set.
17:44:36 <_glx_> yeah buttons should use medium font
17:44:49 <andriydohniak> I will fix the text + fonts later, I know how to
17:45:05 <andriydohniak> peter1139: but they won't be equal with the resizebox then
17:45:30 <andriydohniak> It's not a rectangle shape with all the buttons, it is a rectangle, and a square to the bottom right
17:45:40 <andriydohniak> and all the heights should be equal
17:46:10 <_glx_> it's usually impossible to match resizebox size if layout doesn't cooperate
17:46:25 <peter1139> 18:42 < peter1139> Easy, put them in the same row.
17:46:25 <peter1139> 18:43 < _glx_> often putting both in the same container solves the problem
17:46:31 <andriydohniak> _glx_: but why does WidgetDimentions::scaled.resizebox exist then?
17:46:41 <peter1139> Something like that.
17:46:50 <andriydohniak> peter1139: but it looks bad
17:47:07 <peter1139> RectPadding resizebox; ///< Padding around image in resizebox widget.
17:47:13 <peter1139> It is exactly what it says it is.
17:47:20 <_glx_> the buttons don't have to be inside the scrolling area
17:47:21 <andriydohniak> I cant read lol!
17:47:43 <andriydohniak> Ok fine, I will do like in the image
17:47:52 <_glx_> you can have your scrolling matrix, then the 2 rows under it
17:47:55 <andriydohniak> I thought I was clever, and my idea was amazing
17:48:14 <andriydohniak> _glx_: I thought I can do better then that, I was wrong :)
17:48:58 <peter1139> You know it all goes to shit when someone decides to change the size of the fonts independently of interface scale...
17:49:15 <andriydohniak> It sure as hell does!
17:59:33 <_glx_> now use `font small 12` in the console π
18:00:22 <andriydohniak> It still works!
18:01:18 <andriydohniak> It will just start going out of the buttons, but there is no real way to solve this
18:01:43 <andriydohniak> If I do the 1 row thing with equalized dimentions, would it be better?
18:02:11 <_glx_> buttons are supposed to size based on the content
18:02:34 <_glx_> if layout is correct they do
18:02:43 <andriydohniak> peter1138: So this example would not brake like this?
18:09:43 <andriydohniak> Ok, it's true, if I don't set no fill on the resizebox, it fills the space and it works correctly
18:10:52 <andriydohniak> buut, my solution does it to, it is just no longer as nice
18:13:24 <andriydohniak> btw, what is the default for the small font size?
18:18:14 <andriydohniak> I think I will do the 1 row anyway, I just like it a little more
18:18:43 <peter1139> Remember that you are scrolling only the items in the list, not scrolling the buttons.
18:19:23 <andriydohniak> Yea, but then technically the scrollbar would have had more resolution, because it would have been a little longer
18:20:10 <andriydohniak> As a non native english speaker, I am proud of the sentence above! π
18:20:45 <andriydohniak> am >>very<< proud
18:26:08 <talltyler> The most useful review, I know π
18:49:45 <peter1139> But it is important.
18:49:56 <peter1139> Any ideas on the lack of comments?
18:50:41 <peter1139> I'm can't really think what would help as it is pretty self-descriptive now (Yes, I know that's bad thinking...)
18:51:29 <peter1139> Also I'm currently annoying that StructLists don't have indices.
19:27:16 <andythenorth> we should rank in 2 dimensions "active" and "annoying"
19:27:21 <andythenorth> with a scatter plot
19:28:45 <andythenorth> should I "enable cost optimisation hub" do we think?
20:03:57 *** gelignite has joined #openttd
20:20:26 <wensimehrp> It says... the whole file is changed??
20:26:45 <LordAro> line endings, probably
20:29:07 <wensimehrp> Strange. If I only change the line endings git will report "no additions and no deletions"
20:29:31 <wensimehrp> And I did not touched it
20:31:36 <andriydohniak> wensimehrp: mb /n /r/n?
20:31:45 <andriydohniak> WIndows endings?
20:32:28 <pickpacket> I have the time in my multiplayer game set to 12 min/year, but it seems a year takes a lot longer than that. I'm not experiencing any lag; could it still be that my computer is slowing down the time because of lots of vehicles?
20:33:02 <pickpacket> I'm timing it now to see how long a year really takes
20:33:24 <wensimehrp> andriydohniak: I'm on Windows
20:33:32 <pickpacket> from 1st Feb to 1 Apr took 3:35
20:33:34 <andriydohniak> Yea probably then
20:34:03 <wensimehrp> Maybe doing it on linux fixes the problem?
20:34:33 <andriydohniak> wensimehrp: You can just replace /r/n with /n
20:34:40 <andriydohniak> Do you use VSCode?
20:35:18 <wensimehrp> andriydohniak: I switched from CRLF to LF and fixed the problem
20:35:40 <andriydohniak> wensimehrp: Yep
20:36:06 <wensimehrp> andriydohniak: lol font problem
20:36:51 <andriydohniak> I don't have chinese fonts installed
20:37:00 <andriydohniak> I can't read it, so why bother
20:38:26 <andriydohniak> Here is how I would have solved this on linux btw :)
20:38:26 <andriydohniak> tr -d '\015' < simplified_chinese2.txt > simplified_chinese2.txt
20:39:02 <_glx_> but if your git clone is on windows everything should have CRLF
20:39:30 <andriydohniak> _glx_: I don't think git manages that
20:39:38 <_glx_> git totally manages that
20:39:49 <peter1138> There's are options for it and it's entirely possible to get it wrong.
20:40:37 <andriydohniak> _glx_: I don't think it does, because the commits have the same hashes, and hashes are just checksums
20:40:55 <andriydohniak> and git object storage does not care about individual files
20:41:00 <andriydohniak> the diffs are separate
20:41:11 <andriydohniak> individual file formats*
20:41:17 <_glx_> internally it's LF, but when the file is accessed it's CRLF
20:42:38 <andriydohniak> So there is an option, but probably not always the default
20:53:02 <pickpacket> Jeez... A year is 22 minutes and 30 seconds O.o
20:53:42 <peter1139> That explains why I feel so old.
20:58:51 <peter1139> Okay, something terrible is going to happen. And it's not just the colour scheme.
21:07:07 <pickpacket> peter1138: you have 200% health. I'm sure you can deal with it
21:07:21 <pickpacket> why is there a peter1138 and a peter1139 ?
21:10:00 <michi_cc> There's a peter and peter's aimbot π
21:22:03 <pickpacket> I have a theory about why the calendar time runs so slowly for me: because of the hundreds of vehicles.
21:22:17 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:22:28 <pickpacket> but then again shouldn't that make the entire game slow? None of us experiences any lag
21:22:44 <_jgr_> Take a look in the FPS window, it'll say if that's the case
21:23:15 <_jgr_> Otherwise see if you're using wallclock mode and have changed the minutes per year setting
21:24:26 <pickpacket> I'm using the default: calendar, 12 min year
21:25:01 <pickpacket> but uuhh... yeah... the simulation rate drops to 10 frames per second when I zoom out fully
21:25:18 <pickpacket> This problem probably wouldn't exist on a dedicated server...
21:39:24 <andriydohniak> Keyboard shortcuts. Are they global or per window, or with some state? Should I do them for the list, (j, down, k, up to move, Space to toggle selection and move 1 down)
21:39:49 <andriydohniak> Space and Enter probably
21:40:41 <_glx_> some are global, some are per window
21:40:58 <andriydohniak> do the per window ones require any special focus?
21:41:04 <andriydohniak> like an input field?
21:41:24 <andriydohniak> or just where the mouse is? or some hidden selected window variable
21:42:54 *** tokai|noir has joined #openttd
21:42:55 *** ChanServ sets mode: +v tokai|noir
21:43:22 <peter1139> No, the window just has to be open.
21:43:42 <andriydohniak> So all open windows get the same keys at the same time?
21:44:26 <andriydohniak> Ok, I give up :)
21:44:37 <andriydohniak> No shortcuts it is
21:45:21 <peter1139> That does remind me... I was thinkign about changing the filter search to from `F` to `Ctrl-F`.
21:45:47 <andriydohniak> Do you need the F for something else?
21:45:51 <andriydohniak> if no, just add both
21:46:02 <andriydohniak> I hate pressing ctrl when not needed
21:47:03 <peter1139> The problem with just F is that you are then focused in a filter search box, and any further plain key is text entry.
21:49:42 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:50:08 <andriydohniak> Ok, that's a good enough argument for changing that
21:51:31 <andriydohniak> I added the ability to click on the individual data points on the graph to select the line. But not the ability to click on the line itself. How important do yall think that is
21:57:36 <_glx_> well, clicking on the line is another story
21:58:44 <andriydohniak> It was easy to implement for the data points, becauset its just a bounding box, but the formulas for the distance between a 2 point line and a point is this:
21:59:03 <andriydohniak> And it's not that big or complex, but it would also require some logic to "trim" the line
21:59:21 <andriydohniak> and make sure to not extend it infinitely
21:59:47 <_glx_> with x you can filter the 2 datapoints for the segment
22:00:22 <_glx_> but you then need to determine the exact segment using both x and y
22:00:52 <andriydohniak> hmm, that is clever, but also very hard, because we don't know the coordinates of all the data untill we layed out everything on the screen, then we can compare the click coordinate
22:01:25 <andriydohniak> _glx_: and not just it's bounds, I need to check the distance of the click and that segment
22:01:35 <andriydohniak> and thats the formula above
22:02:20 *** Leopold_ has joined #openttd
22:03:07 <andriydohniak> Actually it might be fine!
22:03:34 <andriydohniak> we don't care about distances, we care if the click is inside the rotated rectangle that we call "a line segment"
22:03:52 <andriydohniak> but still, not fucking easy
22:04:13 <andriydohniak> I will mb add it later, in another PR, because it would be a simple and separate addition
22:07:50 <andriydohniak> How do I make an attribute be forsed to be used
22:08:14 <andriydohniak> I see [[maybe_unused]] for the function parameter, but how do I force the use of the function
22:11:44 <peter1139> Urgh, that's just too many enemies all at once :(
22:13:05 <peter1139> 200 health, 200 armour, what could go wrong?
22:28:50 <peter1139> [[maybe_unused]] just means that the function itself doesn't (mightn't) use a parameter, and stops the compiler warning about it.
22:29:02 *** nielsm has quit IRC (Remote host closed the connection)
22:30:28 <andriydohniak> I was hoping there was a thing that forced the use of a method of an object once constructed
22:30:40 <andriydohniak> but I see how unrealistic that expectation is now
22:32:34 <andriydohniak> It would be very difficult to implement, and very intrusive because of the whole oop's inheritence thing
22:32:41 <andriydohniak> and overwriting methods
22:47:54 *** felix_ has quit IRC (Ping timeout: 480 seconds)
23:02:02 *** gelignite has quit IRC (Quit: Stay safe!)
23:04:47 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:12:37 *** Smedles has quit IRC (Read error: No route to host)
23:13:05 *** Smedles has joined #openttd
23:22:05 <andriydohniak> I have just OOMed myself on my 32 gig machine by using make -j without an
23:22:11 <silent_tempest> truebrain: I'm about to add some questions on^^^ there that I think you'll have to answer
23:22:33 <silent_tempest> You building on windows?
23:24:36 <silent_tempest> Never seen that happen TBH
23:24:44 <silent_tempest> Except on VM's
23:26:00 <andriydohniak> wensimehrp: YOU DON'T KNOW WHAT ARCH IS?
23:26:41 <wensimehrp> andriydohniak: No, it's just everyone I know that uses Arch intentionally emphasizes that they are using Arch
23:26:46 <silent_tempest> andriydohniak: Why would that be a big deal? All caps makes that seem like a big deal?
23:27:13 <andriydohniak> wensimehrp: It's a meme, and I am not powerfull enough to stop it
23:27:40 <andriydohniak> silent_tempest: It's not, but I would have guessed somebody would say I use arch btw 100 times to every dev by now
23:27:54 <andriydohniak> I fixed the buttons, and every graph works now
23:28:28 <wensimehrp> andriydohniak: Additional cargo icons maybe?
23:28:42 <andriydohniak> wensimehrp: I tried it, but honestly it looks kinda bad
23:29:00 <andriydohniak> And the more important thing is connecting the color of the line to the name of the cargo
23:29:31 <wensimehrp> You can have both at once I think
23:29:49 <andriydohniak> yea, but it will look bad, but I will try, just for you :)
23:31:32 <wensimehrp> π "sorting alphabetically" also makes no sense to me and I personally really need that little icon to help me determine the cargo type.
23:31:52 <silent_tempest> The icons are completely new though right?
23:32:04 <silent_tempest> Like they just got added in the last release right?
23:32:04 <wensimehrp> wensimehrp: *when using Chinese
23:32:54 <_glx_> icons were always present, but only in station details IIRC
23:33:38 <_glx_> now they are used in many more places
23:33:52 <andriydohniak> wensimehrp: but does the search field help?
23:33:56 <andriydohniak> You can filter items?
23:34:42 <wensimehrp> andriydohniak: Helps but not much
23:34:42 <wensimehrp> It's slow as I have to switch between IMEs
23:34:58 <andriydohniak> Ok, how do you propose we make this look good?
23:35:22 <wensimehrp> Hmm, maybe to make the icon larger?
23:35:32 <andriydohniak> wensimehrp: I don't think I can
23:35:51 <wensimehrp> Then do the opposite, make the text smaller
23:36:13 <andriydohniak> No, the next smaller text is very small
23:36:33 <andriydohniak> but I can move the icons around, mb add a backround rectangle to it, that sort of thing
23:37:35 <wensimehrp> π€ maybe to display the icon in the colour box?
23:37:48 <wensimehrp> I'm not sure if that helps, though
23:39:34 <andriydohniak> Still have to center it
23:39:51 <andriydohniak> But I think it's already obvious that it will be bad
23:40:13 <silent_tempest> Yeah that looks pretty bad IMO
23:40:27 <andriydohniak> yea, look at the grain icon
23:40:50 <andriydohniak> mb after the text?
23:41:08 <silent_tempest> I haven't been following your work but, what are you trying to do here?
23:41:32 <andriydohniak> This on is just an experiment, but I am making graphs easy to work with
23:42:21 <andriydohniak> Here is what I added:
23:42:21 <andriydohniak> - You can click on a data point in the graph, and it will select that line
23:42:21 <andriydohniak> - It will automatically scroll to that line in the list
23:42:21 <andriydohniak> - The list has filters
23:42:21 <andriydohniak> - The list has scrollbar
23:42:44 <andriydohniak> And there is no longer a separate window for the key
23:43:10 <silent_tempest> For which graphs?
23:44:12 <silent_tempest> Didn't they already have filters or was that just the payment rate graphs?
23:44:27 <andriydohniak> silent_tempest: Nope, and for that one also no
23:44:46 <andriydohniak> This is stock Payment rates:
23:45:00 <andriydohniak> They had an ugly scrollbar
23:46:11 <andriydohniak> I think in 1-2 days I will fix everything there is in my commit, and will be ready to submit a pr
23:46:13 <silent_tempest> Huh okay my last PR has a commit in it I didn't write...
23:46:39 <andriydohniak> Did you merge with upstream or something?
23:46:53 <andriydohniak> If you want to revert, its `git reset --hard ~HEAD`
23:46:57 <andriydohniak> and then `git push`
23:47:10 <andriydohniak> this will set back your history 1 commit
23:47:26 <andriydohniak> if `git push` doesn't work, its `git push --force`
23:47:59 <andriydohniak> This will delete ALL uncommited work
23:48:10 <andriydohniak> so do `git stash` before
23:48:15 <andriydohniak> if you want to save your work
23:51:19 <andriydohniak> wensimehrp: If you want to, you can experiment with some designs in Photoshop or paint or any tool, I just need 1 line with clear position of the color rectangle, text and the icon, so if this is important to you and you have some free time, go for it! and ping me when you are done
23:52:17 <andriydohniak> I can also create more colored rectangles, but no blury ones
23:52:57 <wensimehrp> andriydohniak: I used to use `HEAD^`, are there any difference?
23:53:26 <andriydohniak> I don't think there is any
23:54:23 <andriydohniak> No, there is π€£ HEAD^ exists, and I imagined ~HEAD
23:54:42 <silent_tempest> I thought I had figured out what happened but nope I'm just confused
23:54:55 <silent_tempest> I've got it pointed at the OpenTTD-hooks repo
23:55:10 <silent_tempest> But it just doesn't see True's last commit on there
23:55:17 <andriydohniak> you can look at the commit author
23:56:14 <silent_tempest> The log is just wrong some how
23:56:20 <silent_tempest> It's missing a commit
23:56:35 <andriydohniak> Did you merge / squash something?
23:56:55 <silent_tempest> commit 7e826a9dffd3013739bd7fe54cf1d6977fb609f4 (HEAD -> master, upstream/master)
23:56:55 <silent_tempest> Author: Patric Stout <truebrain@openttd.org>
23:56:55 <silent_tempest> Date: Thu May 20 18:12:15 2021 +0200
23:56:55 <silent_tempest> Add: [Action] allow this repository also to be used as GitHub Action (#16)
23:56:55 <andriydohniak> Is the code at the correct state? If so, you can do git blame, to check what is the commit
23:57:00 <silent_tempest> Shows at the last commit
23:57:24 <andriydohniak> Is the missing commit yours?
23:58:01 <andriydohniak> check `git remote -v`
23:58:03 <silent_tempest> Okay I just figured it out
23:58:12 <silent_tempest> main vs master on the upstream server
continue to next day β΅