IRC logs for #openttd on OFTC at 2024-06-24
β΄ go to previous day
01:48:14 <ahym> andriydohniak: spam no but if it's like any other git repo you probably shouldn't be making *one* pr for two different things
01:48:14 <ahym> *two* prs that are both well documented would be easier to review
02:20:05 *** Wormnest has quit IRC (Quit: Leaving)
02:52:24 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:03:36 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:42:20 <DorpsGek> - Update: Translations from eints (by translators)
05:16:52 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:30:57 <pickpacket> peter1139: I'm really grateful that you added a count to the town listing. I've wanted that for a long time
07:14:31 <DorpsGek> - Add: summary for week 25 of 2024 (by OpenTTD Survey)
07:40:59 <andythenorth> we should ask GPT what it all means
07:41:14 <andythenorth> it's moderately good, if slow, at statistical analysis now
07:41:25 <andythenorth> it tends to write numpy or similar jobs and run them
07:44:02 <peter1139> Urgh this drawing code is nasty :(
07:47:19 <peter1139> Why does that first line 1) not get scrolled 2) exist?
07:48:30 <LordAro> "sticky header" is presumably the answer to 1)
07:48:51 <LordAro> i agree it's probably redundant though
07:56:19 <andythenorth> according to GPT
07:57:20 <pickpacket> the survey summary page isn't very user friendly. Functional, but not easily understood
07:57:34 <andythenorth> I gave GPT the raw json results
07:57:41 <andythenorth> and Truebrain's blog post about 'why'
07:57:45 <andythenorth> then let it loose
07:59:14 <ahyangyi> pickpacket: Or, perhaps, "20 or more"?
07:59:39 <ahyangyi> ^ probably not (and deleted in discord XD)
08:06:00 <_glx_> andriydohniak: on your fork not against upstream
08:06:23 <andriydohniak> _glx_: what do you mean?
08:06:52 <_glx_> You open the same PR against openttd upstream
08:07:23 <andriydohniak> _glx_: Yes, I did it for the CI to run, without confirmation
08:07:38 <andriydohniak> Like you told me
08:07:52 <_glx_> But it needs confirmation because it's again against upstream
08:08:31 <andriydohniak> I don't get it, is there a branch called upstream?
08:09:55 <_glx_> Upstream is the openttd repo, but you can target your own fork when opening the pr
08:10:37 <andriydohniak> _glx_: So a PR to the branch with a PR?
08:11:58 <andriydohniak> I think I get it now! Because the runners are free, I can run it against my own repo without the need of confirmation!
08:14:19 <_glx_> Target is openttd master by default but it's editable before PR submission
08:17:21 <peter1139> Make sure master in your fork is up to date as well.
08:17:50 <andriydohniak> Yea, just updated it
08:35:54 <_glx_> Oh and CodeQL might warn you for some things that are actually already discarded on upstream
08:39:58 <andriydohniak> Something is wrong with CodeQL configuration, CI - Build / Linux (Clang) is finished in 6 min, and CodeQL has been building for 14 min already
08:41:12 <_glx_> It does more than compiling
08:41:26 <andriydohniak> Not codeQL itself, but the build step is way longer then other configs
08:42:52 <andriydohniak> And this is not the first time, I always notice that it's build takes ~24 min, just the build
08:48:09 <andriydohniak> The only difference is that linux config uses `-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ inputs.extra-cmake-parameters }}` as a cmake param, and codeQL does not
08:48:58 <LordAro> but i don't think "build" is just building either
08:49:06 <LordAro> it'll be analysing/processing at the same time
08:50:47 <LordAro> you've gotta stop with the absolute statements
08:51:00 <LordAro> codeql (like most others) works by overriding the compiler
08:51:36 <andriydohniak> I don't think so
08:52:09 <merni> andythenorth: What's the first one
08:52:16 <andriydohniak> It uses the same .cmake file, just no `${{ inputs.extra-cmake-parameters }}`
08:52:43 <merni> And, uh, frequency ranging from 1 to 5? π
08:54:39 <merni> pickpacket: You could always PR improvements :)
08:56:06 <LordAro> i'll be honest i don't know the exact specifics of how codeql works, but judging by the documentation above and the output from "Initialize CodeQL" step, it's probably injecting itself into the cmake config
08:58:19 <andriydohniak> Honestly Idk either, but I will try to add the missing flag and see if anything changes, it probably won't, but if it will we will save a bunch of time for free
09:01:12 <andriydohniak> Does anybody know, from what branch is the workflow taken when doing a PR? from the branch that you are doing the PR against, correct?
09:05:03 <pickpacket> merni: I have other things I want to do PRs of that have a higher priority for me
09:13:54 <andriydohniak> LordAro: You are probably correct, even with that change it is as slow, so it probably adds something to the compiler options to link against
09:14:37 <andriydohniak> I updated the description of my PR, and It does pass the CI, its time for humans to tell my what is wrong with it :)
09:26:00 <andythenorth> merni: I asked GPT to guess what info we'd want about hardware, it settled on GPU vendor I think
09:26:10 <andythenorth> it wasn't what I wanted, so I didn't spend long on it
09:36:07 <peter1139> It's amazing how you need vast amounts of energy-expensive large-language-model trained computer software to produce a graph of data that is already formatted in a suitable way...
09:37:24 <peter1139> We're worried about climate change and fossil fuels, and then wasting energy on that bullshit.
09:39:07 <LordAro> it is at least marginally more useful that bitcoin
09:39:31 <LordAro> i'm not sure if it's got close to bitcoin/crypto in power usage yet
09:39:35 <LordAro> i imagine it probably has
09:44:25 <peter1139> nVidia's "AI" compute racks use upto around 120kW each.
09:47:02 <LordAro> "The CBECI estimates that global electricity usage associated with Bitcoin mining ranged from 67 TWh to 240 TWh in 2023, with a point estimate of 120 TWh."
09:57:13 <peter1139> Anyway, the "info.os.vendor" output doesn't need a chart :)
09:57:45 <peter1139> Of course, using previous data to build a chart over time might be more useful.
09:57:55 <andriydohniak> LordAro: Honestly that is not that much, a falkon 9 rocket has ~26GW in potential energy stored in the fuel (the efficiency is probably ~60%)
09:59:35 <_jgr_> Power and energy are not the same
10:00:50 <andriydohniak> that is true, converting 1 into the other is no easy or efficient task
10:03:05 <andriydohniak> 1 wind turbine generates ~6 gWh per year
10:03:41 <andriydohniak> And yes, storage does complicate things, I am just saying a couple gigawatts is not that much for AI
10:04:10 <andriydohniak> Bitcoin consumes so much because of relatively cheap ASICs
10:04:25 <andythenorth> nobody's really sure how much generative AI consumes yet
10:04:34 <andythenorth> the numbers have been guessed, but it's a broad range
10:04:42 <andythenorth> 'relatively a lot' is the main consensus
10:04:53 <andythenorth> (according to Google, not GPT)
10:05:08 <LordAro> "a few GWh" does come from very early chatgpt usage though, the theregister article suggests an upper bound of ~100TWh
10:05:13 <LordAro> which is more equivalent
10:07:41 <andriydohniak> Ok, that is waaaay worse! This article from the verge has this estimate:
10:08:28 <andriydohniak> `The agency says current data center energy usage stands at around 460 terawatt hours in 2022 and could increase to between 620 and 1,050 TWh in 2026 β equivalent to the energy demands of Sweden or Germany, respectively`
10:08:35 <andriydohniak> peter1139: You missed it
10:08:38 <andythenorth> I found another article estimating "twice as much as the whole of France"
10:09:01 <peter1139> These sound like guestimates.
10:09:06 <andriydohniak> andythenorth: they run on wine and cheese though
10:09:17 <andythenorth> peter1139: "who'd a thunk?"
10:09:32 <andythenorth> can we measure it in London Buses? Or Blue Whales?
10:09:36 <peter1139> Can't you just "ask" ChatGPT to tell you?
10:10:00 <peter1139> (Everyone knows how large a football pitch is, of course.)
10:10:14 <andriydohniak> bold eagle / gun / US presidents having criminal charges?
10:12:20 <andriydohniak> I hate imperial units, especially ones that have the same name and have different meaning that depends on context
10:13:25 <andythenorth> I asked GPT about the ethics of GPT
10:13:29 <andythenorth> which is probably unethical
10:13:35 <andythenorth> TL;DR 'wavey hands'
10:16:30 <andriydohniak> for example ounces, and fluid ounces
10:36:40 <peter1139> I think "I hate imperial units" covers all that.
10:37:23 <andriydohniak> I like feet though :)
10:52:02 <_glx_> Bushel is a nice one too
10:55:13 <andriydohniak> It just occured to me that OpenTTD ui was ment to be modern, I am doing some crap on a windows 2003 server VM, and It looks a lot like OpenTTD!
10:56:27 <reldred> tt UI was modern in what, 1995?
10:56:59 <LordAro> good grief why are you touching Win2003
10:57:12 <andriydohniak> Yea, but for some reason I though of the UI as ment to be retro, and It now it just accured to me that I am too young
10:57:49 <andriydohniak> LordAro: I am doing a networking class, and my teacher likes old windows VMs. Domain controllers, active directory, all that crap
10:57:55 <andriydohniak> and I am not happy to be here
10:59:16 <andriydohniak> It's not, but at least now I know the difference between a router and a switch, so it's not all bad
11:00:06 <LordAro> well that's something
11:01:20 <andriydohniak> I will try to get a programming job to escape this +- hell before I finish this course
11:04:16 <LordAro> eh, for the basic networking stuff Windows server hasn't changed very much
11:04:29 <LordAro> and not enough programmers understand basic networking :)
11:05:02 <andriydohniak> That is true, just to test I downloaded windows server 2019 and it works in almost the exact same way where I tested it
11:06:51 <johnfranklin[d]> I think the base of Generative AI is somehow unethical. At least lots of webcrawlers.
11:14:57 <reldred> andriydohniak: heh, wait til you get out into the real world and you learn the distinction is a lot fuzzier
11:15:38 <reldred> in my DC I've got a rack full of networking equipment where the only tangible difference between the two 'routers' and the 'switches' is the routers have better CPU's, more RAM, and bigger hard drives.
11:15:56 <reldred> they otherwise have the same Marvel switch chip π€£
11:17:26 <reldred> though I gotta say, made it a lot easier to set it all up knowing I was dealing with the same Marvel Prestera chip on every single device
11:19:20 <andriydohniak> But can a switch create a subnetwork with NAT?
11:19:42 <reldred> you wouldn't want to, it's dumb as hell, but yeah
11:20:15 <andriydohniak> I am broken now, thanks :)
11:20:51 <reldred> it IS still important however to understand the OSI models and the *functions* but understand that a device itself is not constrained to a particular layer in the OSI model
11:21:07 <reldred> the OSI model isn't a standard that everyone has to follow, it's a model to understand more complex systems
11:21:36 <andriydohniak> reldred: my teacher thinks that when you compile even a hello world app in C, it automatically gets all the OSI layers complied in
11:22:04 <andriydohniak> and that an app can not directly use TCP or UDP
11:22:09 <reldred> basically, the OSI model is just made up. It's a mental framework to look at things and understand them.
11:22:45 <andriydohniak> That does make a tonn of sence, but I was searching so hard, and have not found where it is usefull for layers > transport
11:22:56 <andriydohniak> TCP/IP for the win
11:24:41 <andriydohniak> reldred: Just out of curiosity, can you give me the name of your switches / routers, I want to search a little more about a little switch that could :)
11:25:09 <LordAro> reldred's routers probably take up most of a rack
11:25:12 <reldred> Mikrotik, CRS518something something
11:25:21 <pickpacket> 3.6% of played time uses exactly 47 NewGRFs. Although that's 1377.072 hours π€ Does this make sense?
11:25:22 <LordAro> ah, not quite *that* fancy
11:25:38 <pickpacket> A big game with lots of players?
11:25:47 <reldred> still does l3hw acceleration, MLAG, etc. etc.
11:25:50 <LordAro> pickpacket: 3.6% of surveys use 47 NewGRFs
11:26:02 <peter1139> I had Summit 48 switches back in the 2000s, they were switches with L3 routing...
11:26:45 <andriydohniak> ITS A 100GIG SWITCH π€―
11:26:54 <pickpacket> LordAro: yeah. 3.6% of surveilled played hours. That's 1377 hours in total over a single week. And a very specific number of NewGRFs.
11:27:00 <andriydohniak> CRS518-16XS-2XQ-RM this one?
11:27:15 <LordAro> pickpacket: 3.6% of surveys != 3.6% of play hours
11:28:24 <pickpacket> LordAro: I know. I'm talking about surveilled hours. It's the number of hours played with what I can only assume is one specific set of 47 NewGRFs that stumps me. Not the percentage, but the number of hours
11:28:57 <LordAro> i'm pretty sure you're misunderstanding what the data is showing you, what are you looking at?
11:29:01 <pickpacket> Even if we're talking about a multiplayer game with 15 companies that would be 91 hours of gaming in one week.
11:29:45 <pickpacket> "The following statistics are based on "seconds played". That is to say, if a setting was "true" for 100 seconds of play-time and "false" for 200 seconds of play-time, it would be 33% true and 66% false. This is to avoid biasing the results towards shorter games. Worded differently, the following statistics are not counting how often something was
11:29:45 <pickpacket> used, but how long it was used for."
11:31:01 <pickpacket> I mean, how many different combinations of NewGRFs would amount to collections of exactly 47 ones?
11:31:21 <LordAro> could be a single widely shared save, perhaps
11:31:36 <LordAro> would need TB to dig into the raw data to know more
11:33:54 <pickpacket> And that just shows the same thing π
11:34:01 <LordAro> that's the raw summarised data
11:34:20 <LordAro> funnily enough we don't publish every single submitted survey ;)
11:35:02 <andriydohniak> That would be bad for privacy reasons, but tbh I don't see what can be so private in them except the IP
11:35:21 <pickpacket> andriydohniak: IP is PII according to GDPR
11:35:27 <ahyangyi> Seems jgrpp players are much more newgrf-heavy
11:35:40 <pickpacket> LordAro: I didn't even think you *saved* every submitted survey
11:35:49 <pickpacket> ahyangyi: that doesn't surprise me
11:36:06 <ahyangyi> Yeah, sounds about right
11:36:09 <peter1139> "Add all the things, no matter what it does."
11:36:11 <LordAro> andriydohniak: you'd be surprised.
11:36:22 <andriydohniak> pickpacket: Just redact the IPs, and share everything else
11:36:24 <pickpacket> I wonder what "(other)" is. The collection of numbers where each has less than 0.1% play-time?
11:36:25 <LordAro> pickpacket: well the summary has to come from somewhere
11:36:31 <peter1139> "Why does everything conflict?" <blames FIRS>
11:36:38 <LordAro> pickpacket: the page does tell you
11:39:34 <LordAro> and no, there's no point discussing it further
11:41:58 <pickpacket> haha, alright this one has me very confused. 0.2% of time is played with a maximum loan of 0. π
11:42:10 <pickpacket> These numbers are very interesting
11:44:21 <truebrain> LordAro: all your assumptions about CodeQL are correct π
11:46:36 <truebrain> pickpacket: our current HTML layout leaves for little room for a "nice" UX for the survey. If you are up for it, we would love to have a more .. modern approach, to this data π
11:46:53 <truebrain> I also really would like to show correlation, so you can delve a bit deeper what those "47 NewGRFs" games look like
11:46:59 <truebrain> but .. something about time, and it being an issue π
11:49:15 <pickpacket> "What do we want? Time travel! When do we want it? Doesn't matter!"
11:49:55 <pickpacket> truebrain: I thought that data was simply discarded after the summaries were aggregated. How much more do we save?
11:50:19 <truebrain> no, we do not disregard survey results; not sure what gave that impression tbh
11:50:29 <pickpacket> (I say "we" because I don't really know who would be included in "you" anyway)
11:50:29 <truebrain> next step is to create quartily results, and after that yearly
11:50:47 <pickpacket> I gave myself that impression, obviously ;)
11:50:49 <truebrain> you can say "we"; I feel you are part of our community too π
11:52:15 <pickpacket> I *do* get 4% of the profit from game sales, after all
11:52:16 <talltyler> Maximum loan of 0 probably means a Game Script is doling out money, or at least that was the suggestion when dP made the loan configurable from 0 to 2 million, if I recall correctly
11:52:29 <truebrain> basically, the survey results are designed to make it hard to trace back to an individual. We only publish aggregated results, as that would make it nearly impossible to find back a single person (not impossible, just really uncommon π )
11:52:31 <pickpacket> talltyler: that's a pretty cool idea
11:53:19 <truebrain> as for the 47 NewGRF games, there were a few just really long running games
11:53:27 <truebrain> which so happen to be exited in this week
11:53:37 <pickpacket> oh, that makes sense
11:53:38 <_glx_> Unless they use very specific settings or hardware
11:53:47 <truebrain> that is why a week is too short, tbh
11:53:54 <truebrain> and why I want quartily results π
11:54:02 <pickpacket> games that have been running for longer than the week of the report
11:54:07 <LordAro> truebrain: so demanding
11:54:14 <truebrain> one game ran for 2187617s, and the other for 2612655s
11:54:29 <reldred> andriydohniak: yeah, there's 800gbps qsfp28 modules out there though. That switch doesn't support them though.
11:54:44 <pickpacket> truebrain: very sense. Much make
11:55:01 <truebrain> now to find a way to put that in the survey results π
11:55:13 <truebrain> maybe one day when I have a bit more time again π
11:57:15 <truebrain> although quartly reports should be easy
11:57:26 <reldred> time to feed it all into grafana
11:57:42 <truebrain> I tried; it didn't help π
11:57:50 <truebrain> feel free to try it yourself π JSON summaries are available π
12:00:24 *** Flygon_ has joined #openttd
12:02:54 <andriydohniak> reldred: Are you capturing the whole internet? why do you need such beasts?!
12:06:26 <reldred> what do you think the internet is made of? lmao
12:06:38 <reldred> someone has to shovel all the bits back and forth between entire countries
12:06:52 *** Flygon has quit IRC (Ping timeout: 480 seconds)
12:07:25 <andriydohniak> reldred: but YOU? a person who also likes OpenTTD?
12:07:42 <reldred> pffft, nah, I don't do shit at that scale
12:07:46 <andriydohniak> You expect ppl like that to exist, but you never expect to see them
12:07:49 <reldred> I just have my one widdle rack
12:07:57 <reldred> with my six widdle servers
12:08:23 <andriydohniak> reldred: I wana have that π Gimme 1
12:09:44 <andriydohniak> truebrain: I will try, I think the JSON just needs some python pre processing, that's why I will do it in rust :)
12:11:12 <andythenorth> pickpacket: it is but with caveats
12:11:22 * andythenorth back to my armchair
12:13:08 <pickpacket> andythenorth: sorry, but I have totally lost the context here. What is? π
12:32:39 <truebrain> What the actual fuck. Is it 1st of April or something?
12:34:09 <andriydohniak> I am watching the video about llama.ttf, and I am fucking scared! Now the fonts can also have viruses?
12:34:28 <andriydohniak> Everything runs JS / Wasm now, I am actually sad
12:34:40 <andriydohniak> not that it's not neccesary, but I still don't like it
12:35:39 <_glx_> everything can have viruses
12:35:50 <_glx_> that's why you should always sandbox
12:35:52 <andriydohniak> I am also shocked that libharfbuzz does not crash with fonts this size
12:36:21 <andriydohniak> _glx_: but the font renderer in a sandbox? Cmon that does seem like a bit of an overkill
12:36:48 <andythenorth> no LLM in grf yet?
12:37:41 <andriydohniak> Was there doom in ttf yet? Did we move on from doom into llms as the thing to run on everything?
12:38:02 <andythenorth> we passed through WASM-but-with-a-compiler-installed on the way
12:38:14 <andythenorth> self-WASMing WASM
12:38:57 <andriydohniak> Imagine a self hosted wasm interpreter
12:39:13 <andriydohniak> just slow for no good reason :)
12:39:39 <andriydohniak> "To bring to parity with JS"
12:39:57 <merni> talltyler: Could be infinite money too
12:40:04 <merni> I run with infinite money and max loan 0
12:44:27 <andriydohniak> What talking about bringing the stats to Graphana, you mean making graphs about how stats change in between surveys? Or just charts of the individual ones
13:02:07 <talltyler> Oh, good point. I also use infinite money but never thought of changing the max loan.
13:37:34 <talltyler> andriydohniak: Review incoming. You copy and pasted a lot of typos. π
13:45:29 <andriydohniak> talltyler: I need to run a spell check, and not just any spell check, a british one :)
14:00:56 <andriydohniak> Ok, I am going through with a spell checker and fixing all my comments, but If you see an issue in a variable name or something, pls let me know
14:16:18 <andriydohniak> For now this is a separate commit (I didn't want to mess up whatever review process talltyler Tyler has)
14:33:43 *** Smedles_ has joined #openttd
14:38:34 *** Smedles__ has joined #openttd
14:39:27 *** Smedles has quit IRC (Ping timeout: 480 seconds)
14:42:15 <talltyler> Uh oh, it kept all my typo suggestions and just marked them outdated π€¦
14:43:09 <LordAro> hopefully because they've all already been fixed
14:43:25 <LordAro> but probably best check them all anyway
14:44:30 <talltyler> All 52 of them π¬
14:44:40 <LordAro> eh, let andriydohniak do it :p
14:46:22 *** Smedles_ has quit IRC (Ping timeout: 480 seconds)
14:54:09 <andriydohniak> I like your idea about hover, you probably didn't notice double click functionality, but I still think hover + single click is very good
15:04:27 <talltyler> I didnβt notice double click, we donβt really use that in OpenTTD
15:05:12 <ahym> 42069 is the magic number i use for writing up cars when i don't have the odometer reading handy
15:07:03 <andriydohniak> A quick english lesson if you will, why is the possessive pronoun normaly indicated with 's, but not in this case?
15:07:17 <andriydohniak> (english lesson for me*)
15:11:16 <truebrain> It is not Dutch π
15:12:00 <andriydohniak> ahym: Yea, about that, I actually have no idea how to handle the widget IDs better. A different option would be to start a file, something like widget_id_ranges.h and have a big enum, where we can "reserve" the id space (1000 for each widget for example)
15:13:06 <andriydohniak> but untill more pluggable "components" are created like this, I don't see why would we go that route
15:13:59 <ahym> generate id randomly based on a portion of the data it's identifying
15:14:35 <andriydohniak> The problem is that the IDs are specified as constants at compile time, so the only thing they identify is themselves
15:14:52 <andriydohniak> and I really don't want to touch the code that deals with widget IDs
15:15:44 <andriydohniak> currently each window has an enum where all the widgets are listed, and those enums are used to define the UI, and are passed as IDs
15:16:27 <ahym> So reference of the widgets is not stored by actual reference but rather by a separate identifier
15:16:44 <andriydohniak> Here is an example:
15:17:54 <ahym> I have zero clue then, that implementation seems good but not how i would approach it i don't think
15:17:58 <andriydohniak> so the only easy way I see to add a pluggable widget without adding all it's components to the window's enum is to create a big offset
15:20:44 <ahym> I'm trying to wrap my head around that and i keep bringing myself to the exact same question
15:20:44 <ahym> why is the widget id list loaded in ascending numerical order
15:21:12 <andriydohniak> It's not loaded in numerical order, it is just how constants are specified
15:21:24 <andriydohniak> you can imagine this enum to be just a list of ascending consts
15:21:25 <ahym> oh then the number doesn't matter
15:21:37 <andriydohniak> no, the only thing that matters is uniqueness
15:23:03 <ahym> | Each enumerator is associated with a value of the underlying type. When = are provided in an enumerator-list, the values of enumerators are defined by those associated constant-expressions. If the first enumerator does not have =, the associated value is zero. For any other enumerator whose definition does not have an =, the associated value is the value of the previous enumerator plus one.
15:23:33 <andriydohniak> yep, but what happens if we have 1 enum for a window, say "Graph legend window", with all it's widgets listed over there, how do I put a different component to that window that knows nothing about "Graph legend" layout, and how do I make sure that it stays unique when the constants are not in the same place
15:24:09 <andriydohniak> you add a big offset
15:24:30 <andriydohniak> I just got an π‘Idea, thanks
15:24:44 <ahym> Good cause i didn't understand a single bit of that
15:25:19 <andriydohniak> I have been looking at this code on and off for ~2 weeks now
15:27:18 <ahym> ok i think i see what you mean and in my genuinely honest opinion
15:27:18 <ahym> assigning enumerator values based on the indices of a separate enumerator seems like it may not be a very good idea
15:27:18 <ahym> That could be prone to breaking if someone else has the same issue as you and they need to make a large offset index
15:28:10 <ahym> But still wrapping my head around that is nearly impossible so I'm just gonna step away from it cause what you're doing is just not something i would do
15:30:11 <andriydohniak> and my new idea is: add a 2 new values per reusable component into the main enum, kinda like that:
15:30:59 <andriydohniak> and then pass the `WID_SELECTOR_START` and `WID_SELECTOR_END` to the constructor of the replacable widget, and assert that the range is big enough
15:31:10 <andriydohniak> has correct size*
15:31:18 <andriydohniak> has the correct size*
15:31:45 <truebrain> `WID_GRAPH_` .. `WID_` ... `WID_PHG_` ... you make my OCD go BZZZZZZ
15:31:49 <andriydohniak> and then we can use normal enums inside, and just add this new offset when needed
15:32:21 <andriydohniak> truebrain: WID_PHG is not mine, and I don't even need a selector in this window, just an example
15:33:18 <ahym> Why aren't you just writing the widget into the enum twice?
15:33:50 <andriydohniak> It would not, because I would still need to pass the start and end value of those constants to the constructor
15:34:02 <andriydohniak> my widget is universal, not specific to a particular window
15:34:55 <andriydohniak> and for what we cannot directly assign, I'll use static asserts to make sure everything is correct
15:53:53 <peter1139> WidgetIDs are not unique across windows. But for a widget 'component' they do need to be. That's also why the picker_gui widgets start at 1 << 16.
16:03:19 <andriydohniak> peter1139: yea, so just a constant, but I think "allocating" the widetID space is a better approach, so gona try that
16:03:40 <andriydohniak> tbh 1 << 16 is a better constant then 42069 but still
16:10:09 <LordAro> `its` is the singular version of `their`
16:12:56 <andriydohniak> Actually thanks, that does make some sense, its still a bit weird that its inverted, but at least I get why
16:13:12 <andriydohniak> it's inverted* :)
16:14:26 <andriydohniak> it is inverted, that you put 's to indicate it is, but normall 's means possession, e.g `Bob's coffe`
16:14:57 <LordAro> ah yeah, i suppose so
16:15:18 <andriydohniak> Anyway, do I put brake on the last branch of switch - case?
16:15:39 <andriydohniak> soo many typos...
16:26:13 <andriydohniak> where should I put magic values?
16:27:23 <andriydohniak> just local scope consts?
16:30:45 <talltyler> As local as they can be. If theyβre used elsewhere, youβll need to elevate them to be used there as well.
16:31:04 <andriydohniak> nope, not used anywhere else
16:34:44 <andriydohniak> something like this?
16:36:31 <talltyler> Yes, after the early return
16:51:13 *** HerzogDeXtEr has joined #openttd
17:05:14 *** nielsm has quit IRC (Ping timeout: 480 seconds)
17:18:13 *** toktik is now known as Guest10669
17:23:06 <andriydohniak> How does hower work on mobile? How can a phone tell a difference between a click and a hover
17:23:28 *** Guest10669 has quit IRC (Remote host closed the connection)
17:25:26 <peter1139> We don't have a mobile version so not something we need to care about.
17:33:48 <andythenorth> also it can't do hover
17:33:55 <andythenorth> not currently, maybe in future π
17:37:27 <andriydohniak> Does this spacing between icons and text look ok? also the size of the rectangle, bigger ? smaller? different ratio?
17:39:22 <andriydohniak> Same thing at 2x scale:
17:40:59 <andriydohniak> speak now or forever hold your piece!
17:41:31 <andriydohniak> I tried to be funny :(
17:42:11 <peter1139> Use hsep_normal for the spacing.
17:43:07 <peter1139> Box is too large imho.
17:43:08 <andriydohniak> but it looks a little weird to me, just checking if this looks ok to everybody else
17:43:24 <andriydohniak> peter1139: I used 1 scaled::inset
17:43:26 <peter1139> There's hsep_wide if you want more space.
17:43:50 <andriydohniak> peter1139: I do
17:44:28 <andriydohniak> I used 1 scaled::insed to get the size of the height of the box, I wanted to get rid of my magic 0.85 number
17:44:49 <andriydohniak> Would it be ok to just use multiple insets?
17:45:47 <andriydohniak> I am dying! It is 33C outside with no wind, and I just drank hot tea, and compiling OpenTTD over and over again
17:48:16 <andriydohniak> Here is hsep_wide on 2x scale
17:48:27 *** Smedles has joined #openttd
17:49:04 <andriydohniak> I think I will stick with hsep normal, especially on the company logo
17:49:14 *** Smedles__ has quit IRC (Read error: Connection reset by peer)
17:49:17 <andriydohniak> but I think I like hsep_wide on the rectangles
17:51:58 <andriydohniak> Smaller rect, hsep_normal, 2x
17:53:12 <andriydohniak> I made the rectangles a bit smaller by insetting the height by 2x scaled::inset.Vertical()
17:54:31 <peter1139> WidgetDimensions stuff are there to create consistency.
17:57:05 <peter1139> Saying the Fund Industry window does its own thing.
17:57:52 <andriydohniak> Ok, how would you recommend sizing the rectangle?
17:58:12 <andriydohniak> I can do insets or absolute sizes or whatever
18:00:23 <andriydohniak> I can also ditch the 6:9 ratio, and just use company icon size, would that be ok?
18:00:44 <andriydohniak> so no fancy rounding or highlights, but just a rectangle of the same size as the icon
18:07:00 <andriydohniak> How does that look?
18:08:38 <andriydohniak> I need feedback! pls :)
18:09:24 <andriydohniak> which option do you like the most? which one should I try?
18:09:55 <andriydohniak> youπ«΅! gimme feedback!
18:11:14 <andriydohniak> Here is how it looked originally (same scale lol)
18:17:58 <peter1139> Fund Industry sticks to the ratio and keeps it a reasonable size.
18:18:05 <peter1139> Also use matrix padding for text in the matrix entries.
18:18:38 <peter1139> Old company key doesn't do that because it's separate buttons, old cargo key doesn't do that because it's tiny text.
18:20:15 *** Wormnest has joined #openttd
18:23:42 <andriydohniak> Mb its just so small it's not noticeable
18:24:12 <andriydohniak> Or mb it is meant to account only for the borders in between the cells
18:24:14 <peter1139> I mean when drawing it.
18:24:57 <andriydohniak> I am centering the text vertically, and the text size is fixed, so it won't change anything
18:25:26 <peter1139> Yes, centre the text vertically after applying matrix padding :)
18:26:24 <andriydohniak> But padding is not passed when drawing the widget, do I have to store it myself?
18:28:06 <peter1139> "Store", no. WidgetDimensions::scaled.matrix exists.
18:29:55 <andriydohniak> Tbh I don't see any difference
18:30:27 <andriydohniak> actually, I do, thanks!
18:31:13 <peter1139> And yeah, sometimes it's a bit "huh?"
18:33:21 <andriydohniak> I think the top line belongs to the corresponding rectangle, so tha'ts why it all looks wrong
18:33:34 <andriydohniak> ` .matrix = { .left = 2, .top = 3, .right = 2, .bottom = 1},`
18:33:43 <peter1139> It's a design decision that TTD made.
18:34:16 <peter1139> Partly due to the font's 'interesting' ascender/descender dimensions.
18:34:41 <andriydohniak> It is weird, but does make total sence, because you are not exposed the rectangles to each thing directly, so you have to put the separator lines somewhere
18:37:31 <andriydohniak> I think the loading screen does not apply the button offsets to the text either:
18:37:33 <andriydohniak> This is funny :)
18:38:07 <peter1139> Regular buttons don't have this offset.
18:38:38 <andriydohniak> mb inset offset?
18:40:17 <peter1139> The padding for text buttons is framerect, {2, 1, 2, 1}, so the code simply centres the text as that does the same thing.
18:41:02 <peter1139> Technically it could apply framerect padding, but it wouldn't look any different.
18:41:57 <andriydohniak> Yea, but it does look kinda wrong, idk
18:42:07 <andriydohniak> The text looks too heigh
18:42:29 <andriydohniak> How does this look?
18:43:07 <andriydohniak> Do you prefer big 9:6 rectangles or thin company icon sized ones
18:43:15 <peter1139> It is canonically not-wrong :-)
18:43:17 <andriydohniak> peter1138: This does look better
18:43:43 <peter1139> If you force your small font to 6 and your medium font to 10, it will look better for you too.
18:43:49 <peter1139> Or force use of the sprite font.
18:44:26 <peter1139> (There's currently a bug I haven't yet fixed that increases the size of the default truetype font a little, making it blurry and not quite fit right.)
18:45:12 <andriydohniak> Idk if this is related, but when launching openttd in wasm, it does look a bit blurry for me, but I think all wasm fonts look bad for me
18:45:21 <peter1139> Original TTD (and early OpenTTD) didn't use the window layout system we have now, everything used hard-coded non-scaling pixel offsets.
18:45:41 <peter1139> If it's master it's the same thing.
18:45:47 <peter1139> 14.1 has the correct sizes.
18:46:30 <andriydohniak> That is cool that fonts and scaling over here are pretty well supported
18:46:40 <andriydohniak> Do you prefer big 9:6 rectangles or thin company icon sized ones
18:48:04 <peter1139> I don't like those company icons, they're an OpenGFX-thing.
18:49:02 <peter1139> These are the proper icons.
18:49:27 <peter1139> And for the cargo colour, a big flat rectangle that size would look ugly.
18:49:43 <andriydohniak> What should I do then?
18:50:23 <andriydohniak> Hmm, this does look promising
18:50:38 <andriydohniak> the offsets are a bit ugly, but its fine
19:07:18 *** gelignite has joined #openttd
19:31:27 <Wolf01> Ooook, back again, from the new pc :P
19:32:29 <Wolf01> I wonder how fast I can run OpenTTD here
19:33:15 <peter1139> It's not about how fast you can run it. It's how fast you can compile it...
19:33:42 <Wolf01> That's the first thing my boss asked me "how fast can you compile on that beast?"
19:34:56 <Wolf01> I replied with an i9 14900k probably faster than the i5 10xxx of the office
19:46:07 <peter1139> Hmm, should I ride?
19:46:25 <peter1139> Probably should've thought of it earlier.
20:04:14 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
20:15:53 <peter1139> Hmm, seems that disabling above 4G decoding fixed my GPU drivers crashing... not sure what affect that has on performance, but not locking up is good...
20:21:19 <andythenorth> /me tries playing the game
20:21:32 <andythenorth> "sort by" eh π
20:21:41 <andythenorth> could we have custom sorters in grf?
20:22:09 <andythenorth> "just a property lookup"?
20:22:50 <peter1139> What would you like to sort on?
20:24:43 <andythenorth> and 'group' or 'shared orders'
20:24:55 <andythenorth> but if we do it in grf, there's no debate π
20:27:42 *** gelignite has quit IRC (Quit: Stay safe!)
20:29:08 *** Wormnest has joined #openttd
21:07:08 <peter1139> I don't think it needs debate, it just needs adding?
21:09:28 <andythenorth> we should vote on it
21:09:33 <andythenorth> and then have bets on the voting
21:09:40 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:42:54 *** tokai|noir has joined #openttd
21:42:54 *** ChanServ sets mode: +v tokai|noir
21:49:37 *** tokai has quit IRC (Ping timeout: 480 seconds)
22:06:10 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:27:51 <andriydohniak> A little gambling never hurt nobody :)
22:32:45 <audigex> hp/ton and similar would also be nice in the vanilla game
22:32:54 <audigex> But yeah a GRF provided sort would be cool too
22:33:10 <audigex> Hell, let me define an arbitrary number
23:54:15 *** Flygon_ has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
continue to next day β΅