IRC logs for #openttd on OFTC at 2024-06-26
β΄ go to previous day
00:17:16 <talltyler> andriydohniak: Take those comments with a grain of salt, the author is a bit of a character. π Youβve already addressed most of them, and the comments about the smallfont beyond the font size in your PR are non sequitur β you can ignore them altogether.
00:43:19 *** Wormnest has joined #openttd
01:26:02 <reldred> awwwww did andrii get their first Zorg'ing?
01:35:39 *** Flygon has quit IRC (Read error: Connection reset by peer)
02:03:49 *** herms6 has quit IRC (Quit: bye)
02:04:49 *** Wormnest has quit IRC (Quit: Leaving)
02:50:14 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:00:04 *** herms6 has quit IRC (Quit: bye)
03:01:26 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:44:15 <DorpsGek> - Update: Translations from eints (by translators)
04:49:18 <johnfranklin[d]> Zorg had to excel in essay during their academic life.
05:29:34 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:06:42 <pickpacket> talltyler: what would yellow signals do?
06:13:04 <truebrain> peter1138: : it is possible orudge has to sign their new agreement first. Apple likes to make a new agreement every 6 months or so π
06:13:44 <peter1139> I can't press a button to do that though :)
06:14:32 <truebrain> No, so if it fails again, we kindly give orudge a poke by sending him an email π
06:18:32 <goddess_ishtar> pickpacket: they taste like lemon
06:19:23 <truebrain> peter1138: You can reach orudge via email at orudge@"our domain". Just copy/paste the error and ask kindly if he can look into it π he tends to reply/fix things quickly π
06:31:07 <peter1139> Have done so, after mulling over making a button to do so first...
06:57:09 *** nielsm has quit IRC (Ping timeout: 480 seconds)
07:06:21 <andriydohniak> I am getting linker errors after trying to use virtual classes. Any ideas?
07:07:31 <andriydohniak> Actually I think I know what happened
07:08:34 <pickpacket> goddess_ishtar: in that case I really want them in the game. *Nods decidedly*
07:08:36 <andriydohniak> I have to define methonds in the base class even if they are overwritten
07:12:45 <peter1139> Use `= 0;` if they MUST be overridden, or `{}` it's optional.
07:16:03 *** silent_tempest has quit IRC (Quit: User went offline on Discord a while ago)
08:14:05 <peter1139> Oh yes, my 9am alarm went off. Oops.
08:26:09 *** nielsm has quit IRC (Ping timeout: 480 seconds)
08:28:30 <andriydohniak> peter1139: So I got how = 0 and {} works, but if I want to do = 0, I have to put it in the header file, so should I also put a documentation comment there too?
08:29:51 <andriydohniak> Same issue with virtual destructors
08:32:28 <peter1139> As it's an "interface" it's best to document it anyway.
08:32:37 <andriydohniak> Also CODINGSTYLE.md is unclear about documentation with inlines, does it mean documentation of fuction defined inline? or function mareked inline
08:32:45 <peter1139> And as {} is an empty function, it can just go in the header file too.
08:34:06 <peter1139> Basically if the function has a separate declaration (header) and definition (source), document it at the definition.
08:34:37 <andriydohniak> No mater where it is defined. That makes sence! Thanks!
08:34:52 <peter1139> And if it's a combined declaration/definition, well, there's only one place to document it.
08:35:48 <peter1139> Oh, and if it's an implementation of an "interface" then it doesn't need documenting again, unless you want to add extra detail to it.
08:36:01 <andriydohniak> Also where can I read about linking stuff with doxygen? e.g How do I point to a specific class / function with @see ?
08:36:21 <peter1139> Like `void OnPaint() override` isn't documented for each window implementation.
08:36:46 <orudge> peter1138: Apple agreement approved, so should be able to notarize the nightlies now
08:38:02 <peter1139> Yeah, that's an odd one, there's no real need for that to be there on the implementations.
08:38:25 <peter1139> It's not "wrong", but there's no need for it.
08:38:37 <andriydohniak> Thanks! Gona go to lunch now :)
08:39:04 <peter1139> I've not even had this breakfast croissant yet :S
08:39:11 <LordAro> got to get that 3hr lunch break in somewhere
08:39:22 <andriydohniak> Not spanish, I am Ukrainian, just hungry!
08:39:30 <LordAro> wait, who am i thinking of?
08:39:46 <andriydohniak> I live in Madrid, Spain
08:40:04 <andriydohniak> but not long enough to absorb spanish traditions
08:41:40 <andriydohniak> LordAro: I will let you know my lunch break is 30min, (but twice :))
08:57:06 *** mindlesstux has joined #openttd
08:58:49 <andythenorth> definitely lunchtime
08:58:53 <andythenorth> all this GPT is making me hungry
09:02:04 *** mindlesstux has quit IRC ()
09:04:48 *** mindlesstux has joined #openttd
09:06:44 <pickpacket> andythenorth: what are you using GPT for?
09:07:05 <peter1139> It distracts him from FIRS.
09:08:02 <pickpacket> isn't that a bad thing?
09:14:41 <andythenorth> I'm using it extensively as a sidekick
09:15:05 <andythenorth> also, yesterday I read that AI will soon use as much electricity as India and will cripple the global power grid
09:15:10 <andythenorth> which is alarming
09:16:31 <andythenorth> it's bizarre that OpenAI have managed to somehow buy electricity so cheaply that they only need to charge me $20 USD, but can consume vast amounts of electricity, with no economic effect
09:17:03 <andythenorth> and that the imminent failure of the grid has no effect at all on electricity supply prices
09:19:08 <andythenorth> the CEO of ARM has estimated that AI will soon consume around 25% of US electricity production
09:19:28 <andythenorth> the economic benefits of AI must be absolutely huge
09:19:37 <andythenorth> are we all now rich?
09:20:11 <goddess_ishtar> A select few of us are now even richer than they were before
09:20:15 <peter1139> Well, $1b investment from Microsoft helps.
09:20:33 <andythenorth> do you feel the approaching bill shock?
09:21:29 <andythenorth> anyway custom AWS GPT has done a lot of AWS for me
09:21:38 <andythenorth> so I'll keep using that until the price goes up
09:23:14 <ahyangyi> andythenorth: Depending on the industry set.
09:38:08 <peter1139> So there's a forum discussion and a GitHub discussion...
09:46:45 <truebrain> Can't talk about pointless things in enough places! π
09:48:32 <truebrain> Funny that in the end most people just want to be able to buy out AIs .. which you can π
09:58:15 <pickpacket> peter1139: only one forum discussion that's currently active. I can probably find a few more for you if you like
09:58:59 <pickpacket> fo rme it makes sense that not everyone discusses it on github. It's not a very accessible platform for non-developers
10:00:26 <pickpacket> I still maintain that any system that attempts to emulate a stock market is guaranteed to introduce infinite-money exploits
10:01:18 <pickpacket> for something completely different: why is there a cap on the size of gifts? Is there a setting for that?
10:06:20 <peter1139> Call it the "Foreign Investment Returns Script"
10:06:59 <pickpacket> actually, how much of a shares system would be possible to implement in GS?
10:07:44 <andriydohniak> I think the stock system does not work well, because you can't set the price that you are willing to sell your shares for
10:08:22 <peter1139> There is no share system :-)
10:09:46 <andriydohniak> Because IRL you can't buy out a company unless they agree to sell stocks to you
10:10:06 <pickpacket> andriydohniak: I think it couldn't work well because the only thing it did was to enable infinite money making. There was zero incentive to legitimately invest in another company
10:10:43 <pickpacket> I'm not interested in emulating the real stock market, honestly. That way lies madness
10:10:57 <andriydohniak> pickpacket: But the infinite money came from how the prices of companies were automatically caclulated
10:11:17 <andriydohniak> If the generated money is not the money users payed it will always produce more money
10:11:41 <pickpacket> If there is to be a shares or stocks mechanic it should add something interesting to the game.
10:11:54 <ahyangyi> Some thoughts: if we were to bring stocks back, it would be better if tradable companies are a thing that a player has to explicitly create
10:12:22 <andriydohniak> I agree that making a realistic stocks system is very hard, but making a small thing that autocalculates the prices is bound to create money problems, because that's not how stocks work
10:12:56 <pickpacket> The infinite money came from the fact that when one company bought and sold shares it did so with the game rather than with the company whose shares it was trading in
10:13:04 <andriydohniak> ahyangyi: Yea, so you would be able to buy a 50% of more then 1 company, and controll all of them
10:14:05 <pickpacket> If a stocks system is to be introduced there needs to be 1) an incentive to buy stocks, and B) an incentive to sell stocks
10:14:58 <andriydohniak> Yep, you can do that by making that the stock price is the smallest price of somebody selling, and with a proper share system
10:15:03 <ahyangyi> You are a parent company, you can allocate some money to create a tradable child company. You can ask another player to create a joint venture with you.
10:15:15 <pickpacket> peter1139: now there's a gh discussion, a forum thread, and an irc/discord discussion π
10:15:26 <ahyangyi> The point is that a tradable child company always begin with an appropriate value
10:15:29 <andriydohniak> ahyangyi: That would be insane to implement
10:16:05 <ahyangyi> Yeah, let's talk about dreams first π
10:16:27 <ahyangyi> I'm satisfied with the status quo though
10:17:15 <ahyangyi> a joint venture might provide fine-grained infrastructure sharing options, for example
10:17:49 <ahyangyi> e.g., company A and company B set up a joint venture C, and share their infrastructure to C, but not to each other
10:18:52 <ahyangyi> might be useful in cooperative games where each player plays in a different region, but needs to build some lines between the regions as well
10:27:47 <andythenorth> pickpacket: all of it, apart from you can't merge companies
10:27:59 <andythenorth> and there's no charts or anything, nor any good table display
10:37:59 *** mindlesstux has quit IRC (Ping timeout: 480 seconds)
10:42:08 *** mindlesstux has joined #openttd
10:44:26 <andythenorth> how can we get GPT into the game?
10:44:38 <andythenorth> we don't have much for remote API calls?
10:44:45 <andythenorth> we could run an LLM directly in the game?
10:47:25 <ahyangyi> andriydohniak: Thinking about it, it's not only moderately insane in terms of interaction:
10:47:25 <ahyangyi> 1. player A makes a proposal (how much each player invest and the name and colour of the new company), upon sending the proposal, freeze an appropriate amount of money
10:47:25 <ahyangyi> 2. other players can accept or decline (or ignore, just close that window). when they accept, freeze the corresponding amount of money.
10:47:25 <ahyangyi> 3. if all players involved accept, the new company is set up.
10:47:48 <peter1139> Build it into your fonts, apparently.
10:49:35 <ahyangyi> Should I attempt to make a openttd-cjk font?
10:51:49 <peter1139> CJK has too many glyphs :(
10:56:44 <ahyangyi> peter1139: There are some efforts that builds a CJK font as a structural variation of popular open source ones such as NotoSansCJK. Most useful when what you need is just "systematically make some corners round".
10:57:42 <ahyangyi> But probably still needs lots of work to tweak the scripts
11:07:50 <peter1139> Ah yes, Vietnamese goes odd because it's basically "extended Latin".
11:10:33 <pickpacket> andythenorth: in essence you can implement the functionality, but no good UI for using it. Would that be correct?
11:12:58 <andythenorth> there's the StoryBook
11:14:22 <pickpacket> can I make elements in the storybook clickable?
11:18:29 <andythenorth> there are buttons
11:24:19 <peter1139> No buttons in my salad.
11:46:01 <peter1139> I had breakfast and lunch. Is it dinner time?
11:47:44 <pickpacket> I'm learning GS now for another purpose anyway
11:51:44 <andythenorth> Donβt see why not
11:52:03 <andythenorth> I only skimmed it π
12:01:48 <pickpacket> andythenorth: I only meant that specific post :)
12:02:29 <pickpacket> but if I can make that in a GS then I have no horse in the race for what should be included in the base game
12:08:27 <peter1139> Time for a pot of tea.
12:24:07 <pickpacket> was someone here working on increase the amount of companies possible in multiplayer? ahyangyi? andriydohniak?
12:40:04 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
13:06:29 <pickpacket> ah! andriydohniak are you still working on it?
13:10:58 <peter1139> That's what their graph changes are for.
13:13:24 <pickpacket> I'm stoked for that change
13:14:52 <pickpacket> peter1139: where you get fresh water?
13:23:51 <truebrain> I read it 4 times, and I was still confused. Better to ask what I am reading wrong π
13:34:57 <truebrain> okay, the text was just full of red hearings π
13:36:00 <peter1139> Oh, YouTube frozen again. Sad.
13:37:27 <truebrain> I am so weirded out "expenses" is not how much you spend, but how much it costed you π
13:37:37 <truebrain> I would "expenses" to be the amount (a positive value) you spent
13:37:44 <truebrain> but it is a negative number, how much it costs
13:38:16 <truebrain> sometimes OpenTTD makes my head hurt
13:46:19 <LordAro> it's just that the message is wrong, no?
13:46:28 <LordAro> i don't think there's any confusion over where the number is coming from
13:46:29 <truebrain> no, it should be "profit"
13:47:49 <truebrain> at least, defining "profit" as "money you received + money you spend" feels weird π
13:47:57 <truebrain> I rather define it as "money you recieved - money you spend"
13:48:57 <LordAro> profit and income is often (incorrectly) used interchangably, ime
13:49:12 <truebrain> but this definition of "profit" is totally new to me π
13:49:26 <truebrain> not sure there is a word for it π
13:55:55 <truebrain> LordAro: hopefully my description explains a bit better where this went wrong π
13:56:46 <truebrain> `c->old_economy[i].expenses = -c->old_economy[i].expenses;` <- the OldLoader shows older games made more sense (to me)
13:58:33 <peter1139> Your "motivation" is confusing.
13:58:47 <truebrain> I was reading it too, and confused myself π
13:59:39 <peter1139> Can we fix expenses? Just to make this change way more complex than the one character change that it is? ;-)
14:00:06 <truebrain> peter1139: yes please π As this still confuses the fuck out of me π
14:00:11 <peter1139> Could be backported if we ever do 14.2...
14:00:20 <truebrain> I guess this was easier for the GUI
14:00:47 <truebrain> btw, just to mess with you SLIGHTLY more, we also have this:
14:00:48 <truebrain> `c->yearly_expenses[0][cost.GetExpensesType()] += cost.GetCost();`
14:00:56 <truebrain> in other words, `yearly_expenses` is what I would expect
14:00:58 <LordAro> probably wouldn't be able to backport `-expenses` though :p
14:01:04 <truebrain> and is the negative of `economy.expenses`
14:01:10 <LordAro> truebrain: excellent.
14:02:05 <pickpacket> Of course there'll be a 14.2
14:02:23 <truebrain> so I am not completely sure where this problem started, or why it ended up in the way it did. But it is confusing π
14:04:03 <truebrain> okay, let's not look into this issue any further; this hurts my brain even more π
14:09:48 <truebrain> I kindo do want to ask ....
14:11:09 <talltyler> Git blame to figure out who has to answer?
14:11:19 <truebrain> wondering how this ever came to be π
14:11:51 <truebrain> but seems TTD(p) was equally wrong, and income was always a negative value
14:11:55 <talltyler> Oh, while you are hereβ¦ Someday I am curious to see if I resolved your concerns/questions about #10409 π
14:12:13 <truebrain> (no clue what 10409 is about π )
14:12:47 <pickpacket> truebrain: ... is income a *negative* value?
14:13:09 <talltyler> (Importing town data from JSON)
14:13:10 <truebrain> talltyler: any concern of my in particular you are curious about?
14:14:57 <talltyler> Well, I think Iβve resolved every review comment, so itβs just waiting on more comments or an approval.
14:14:57 <talltyler> You had asked about bundling the data with its corresponding heightmap in the future β I think Iβve structured things to allow that in the future, but am not interested in expanding the scope of the PR right now.
14:15:22 <truebrain> just as long as you gave these things a bit of thought
14:15:39 <truebrain> mainly the "500" still feels random and weird π
14:15:59 <talltyler> It is random, but what else would I use?
14:16:01 <truebrain> I still can't find a reasoning for that value
14:16:08 <truebrain> if it didn't grow for N steps?
14:16:18 <truebrain> you can now never create a population over "500 grow actions"
14:16:34 <truebrain> that feels like a random arbitrary upper limit
14:16:59 <talltyler> Oh, I see what you mean now!
14:17:51 <truebrain> did you actually test your last version?
14:18:03 <truebrain> `if (town.x_proportion <= 0 || town.y_proportion <= 0 || town.x_proportion >= 1 || town.y_proportion >= 1)`
14:18:09 <truebrain> this if-statement is ... very odd
14:18:29 <truebrain> seems equal to `if (town.x_proportion <= 0 || town.x_proportion >= 1)`, which is just `if (true)`
14:18:56 <talltyler> Itβs a float between 0 and 1
14:18:57 <truebrain> as then it should read `0.0` and `1.0` π
14:19:32 <talltyler> Ah, will fix that π
14:19:40 <pickpacket> is it possible to do a hostile takeover of an AI company when in multiplayer?
14:21:01 <talltyler> As for town growth tries, the command only fails if the town is not allowed to grow β not if it tries and no houses appear. I guess I could check `t->cache.num_houses` before and after. But in general, my testing was able to generate any reasonably sized city. 500 tries was βplentyβ
14:21:30 <truebrain> At the very least that should be a comment, that this is what you currently think
14:24:47 <talltyler> Agreed. I will try looking at the cache to find if the town has failed to grow. I am hesitant to write such an open-ended while loop though. The upper bound is growing to fill a 4096x4096 map, only failing when thereβs no more space in the world.
14:25:14 <talltyler> (Okay, not open-ended, but much less controlled than a hard limit of 500 tries)
14:25:32 <truebrain> If you comment: 500 grow-ticks would fill a single town on a 4kx4k map, that is argumentation enough
14:25:36 <truebrain> now that is just totally lacking π
14:25:57 <truebrain> here, some other remarks while looking at the code; just for inspiration π
14:26:01 <talltyler> I havenβt tested what the full 500 tries would do, guess Iβll do that now π
14:26:59 <truebrain> But even a comment like: `500 should be enough for anyone` would be fine
14:27:06 <truebrain> it just shows for future-us there was some thinking behind it
14:27:20 <talltyler> Can I write `Donβt ask`?
14:27:29 <truebrain> It won't be approved
14:27:31 <truebrain> but you can write it π
14:27:38 <talltyler> Just to confuse you in ten years π
14:27:55 <truebrain> the fun part about OpenTTD now is, that "in ten years" is not even fiction π
14:28:07 <pickpacket> "You couldn't handle the reason!"
14:28:47 <kuhnovic> "Make it a bit easier for the next guy, as that next guy is most likely going to be you"
14:29:49 <pickpacket> I knew a guy who'd once worked in a project in the Netherlands, where he encountered comments in three or four different languages in the code
14:30:11 <pickpacket> I asked him how he handled it and he replied "I made sure to add Swedish and Finnish as well!"
14:33:47 <LordAro> kuhnovic: oh i like that way of putting it
14:34:38 <truebrain> w00p, my comment was not useless \o/
14:36:07 <kuhnovic> A former colleague of mine was a judge at an international robotics competition. He once had to review code that was written completely in Japanese. That day he learned the importance of good, readable variable names π
14:36:21 <talltyler> My first iteration used actual GPS coordinates for towns, but I needed a way to align the heightmap so I used special towns to mark the corners of the heightmap. It was confusing so I moved to the current 0..1 system where the heightmap is the reference.
14:36:32 <talltyler> Those corner towns were called βextentsβ
14:38:03 <talltyler> truebrain: Heheh, and you missed that I gave a void function an `@return` note π
14:38:20 <kuhnovic> If you space your GPS coordinates too far apart you'll suddenly find that the earth indeed isn't flat, but the openttd map is π
14:38:28 <truebrain> talltyler: I left that as exercise to the reader
14:39:35 <talltyler> kuhnovic: Yes, another reason to switch to the flat heightmap image π
14:40:30 <talltyler> I am hoping somebody writes a tool to create this data in an easier way than my pixel coordinates workflow. It works, but is a bit slow.
14:40:44 <pickpacket> uuhh... aren't gps coordinates a really bad fit for a tile-based topography?
14:41:57 <kuhnovic> I bet talltyler went down that rabbit hole already :p
14:42:36 <pickpacket> a large rabbit hole, because he's so tall
14:43:15 <johnfranklin[d]> Does Tylerβs addon need a special heightmap? Or both towns and heightmaps are created at the same time?
14:43:44 <merni> I guess you still need a heightmap, but a normal one should do
14:44:03 <merni> as long as the coordinates of the towns you're using correspond to the heightmap
14:46:33 <johnfranklin[d]> Hmm, then the way of projection matters
14:48:32 *** einar[m] has quit IRC (Read error: Connection reset by peer)
14:48:32 *** Guest10361 has quit IRC (Write error: connection closed)
14:48:32 *** patricia[m]1 has quit IRC (Write error: connection closed)
14:48:32 *** imlostlmao[m] has quit IRC (Write error: connection closed)
14:48:32 *** fiddeldibu[m] has quit IRC (Write error: connection closed)
14:48:32 *** Gadg8eer[m] has quit IRC (Write error: connection closed)
14:48:32 *** luk3Z[m] has quit IRC (Write error: connection closed)
14:48:32 *** magdalena[m] has quit IRC (Write error: connection closed)
14:48:32 *** Farrokh[m] has quit IRC (Write error: connection closed)
14:48:32 *** gretel[m] has quit IRC (Write error: connection closed)
14:48:32 *** andythenorth[m] has quit IRC (Write error: connection closed)
14:48:32 *** tonyfinn has quit IRC (Write error: connection closed)
14:48:32 *** JamesRoss[m] has quit IRC (Write error: connection closed)
14:48:32 *** jact[m] has quit IRC (Remote host closed the connection)
14:48:32 *** hamstonkid[m] has quit IRC (Write error: connection closed)
14:48:32 *** cjmonagle[m] has quit IRC (Write error: connection closed)
14:48:32 *** citronbleuv[m] has quit IRC (Write error: connection closed)
14:48:32 *** throwawayaccount[m]1 has quit IRC (Remote host closed the connection)
14:48:32 *** thomas[m] has quit IRC (Write error: connection closed)
14:48:32 *** royills[m] has quit IRC (Write error: connection closed)
14:48:32 *** luffy[m] has quit IRC (Write error: connection closed)
14:48:32 *** tuxayo has quit IRC (Write error: connection closed)
14:48:32 *** zzy2357[m] has quit IRC (Write error: connection closed)
14:48:32 *** temeo[m] has quit IRC (Write error: connection closed)
14:48:32 *** osvaldo[m] has quit IRC (Write error: connection closed)
14:48:32 *** menelaos[m] has quit IRC (Write error: connection closed)
14:48:32 *** jeremy[m] has quit IRC (Write error: connection closed)
14:48:32 *** elliot[m] has quit IRC (Write error: connection closed)
14:48:32 *** Elysianthekitsunesheher[m] has quit IRC (Write error: connection closed)
14:48:32 *** VincentKadar[m]12 has quit IRC (Write error: connection closed)
14:48:32 *** soylent_cow[m] has quit IRC (Write error: connection closed)
14:48:32 *** philip[m] has quit IRC (Write error: connection closed)
14:48:32 *** karl[m]1 has quit IRC (Write error: connection closed)
14:48:32 *** Heiki[m] has quit IRC (Write error: connection closed)
14:48:32 *** nolep[m] has quit IRC (Write error: connection closed)
14:48:32 *** paulus[m] has quit IRC (Write error: connection closed)
14:48:32 *** jeeg[m] has quit IRC (Write error: connection closed)
14:48:32 *** shedidthedog[m] has quit IRC (Write error: connection closed)
14:48:32 *** phil[m]123 has quit IRC (Write error: connection closed)
14:48:32 *** playback2396[m] has quit IRC (Write error: connection closed)
14:48:32 *** grag[m] has quit IRC (Write error: connection closed)
14:48:32 *** kstar892[m] has quit IRC (Write error: connection closed)
14:48:32 *** yubvin[m] has quit IRC (Write error: connection closed)
14:48:32 *** Heiki has quit IRC (Write error: connection closed)
14:48:32 *** joey[m] has quit IRC (Write error: connection closed)
14:48:32 *** emilyd[m] has quit IRC (Write error: connection closed)
14:48:32 *** CornsMcGowan[m] has quit IRC (Write error: connection closed)
14:48:32 *** blikjeham[m] has quit IRC (Write error: connection closed)
14:48:32 *** Bilb[m] has quit IRC (Write error: connection closed)
14:48:32 *** audunm[m] has quit IRC (Write error: connection closed)
14:48:32 *** calbasi[m]1 has quit IRC (Write error: connection closed)
14:48:32 *** karoline[m] has quit IRC (Write error: connection closed)
14:48:42 <talltyler> No, as long as your heightmap matches your labeled reference map
14:53:22 *** xyii[m] has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** wormnest[m] has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** thelonelyellipsis[m] has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** Rdolfs[m] has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** patrick[m]1 has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** leward[m] has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** giords[m] has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** gdown has quit IRC (Ping timeout: 480 seconds)
14:53:22 *** FelixActually[m] has quit IRC (Ping timeout: 480 seconds)
14:56:02 <talltyler> Players do not want their companies taken over in multiplayer games
14:57:53 <pickpacket> only AI companies can be taken over
14:58:06 <LordAro> AI companies in multiplayer is generally quite rare?
14:58:42 <pickpacket> LordAro: I believe so, yes. In which case that limitation isn't really important to have
14:59:48 <pickpacket> in the github discussion about shares someone said "the only thing I'm missing is the possibility to do a hostile takeover of AI companies in multiplayer". I figure why not? I don't believe it would have any negative effects
14:59:49 <LordAro> there's no justification about multiplayer listed in #10914 that i can see
15:00:11 <LordAro> you'll have to ask the author :p
15:00:33 <peter1139> Time for some vinyl.
15:01:34 <peter1139> Except the lazy pre-recorded as digital audio on the NAS form, so I don't actually have to get up and set up the record player.
15:01:59 <pickpacket> LordAro: how do you see which PR it's in?
15:03:09 <pickpacket> LordAro: I did blame in my terminal :) That didn't give quite as much info
15:03:23 <pickpacket> except I now know truebrain's real name!
15:03:39 <pickpacket> and boy do I like a good stout
15:04:06 <pickpacket> peter1139: he doxed himself by adding it to the git history!
15:04:07 <peter1139> Okay that was silly, actual Doxing is a real problem.
15:04:34 <pickpacket> I avoid being doxed by publishing all my info on my website myself
15:05:04 <pickpacket> anyways, truebrain did you have a specific reason to limit the hostile takeover of AI companies to single player games?
15:06:48 <talltyler> Wait until you learn that some of us have met in real life: the ultimate doxing. π
15:07:09 <pickpacket> food has arrived! See you all alter
15:07:19 <peter1139> I still haven't managed to. I'm tempted to believe I don't exist.
15:07:23 <LordAro> no human sacrifice please
15:08:19 <LordAro> we should probably try to confirm whether or not andy is just a GPT sometime
15:12:26 <talltyler> Next time Iβm in Europe I will try to arrange another meetup, this time in the UK
15:12:59 <talltyler> I picked Brussels last time as a midpoint but everyone came from east or north π
15:13:18 <LordAro> _glx_: oh yes, i'd forgotten about that
15:14:54 <michi_cc> Damn brits and their island π
15:16:42 *** Eddi|zuHause has quit IRC (Ping timeout: 480 seconds)
15:17:11 <truebrain> Ah, another reason to drop MSYS support π
15:19:59 <LordAro> VERSIONINFO is an MSVC thing, no?
15:29:59 <_glx_> yeah it's not compliant, but any other rc just accept it
15:31:05 <LordAro> i split it into <major>.<minor>.<year>.<month><day> when i handled it at work
15:31:28 <LordAro> wasn't too much of a problem, other than month not being able to have a leading zero (because octal, or something daft)
15:34:40 <johnfranklin[d]> Microsoft Excel βAuthor informationβ is a pretty easy way for doxing, maybe.
15:38:12 <_glx_> <major>.<minor>.<year>.<month><day> is doable
15:48:29 <_glx_> looks fine, even without handling trailing 0
15:48:56 <_glx_> but I should also check with mingw
15:49:24 <LordAro> i definitely had to handle it for some reason
15:49:37 <LordAro> maybe it was octal - so it'll break in 3 days time or something
15:50:05 <LordAro> `# Remove leading zeros (Windows resource files don't like them)` is the comment i left myself...
15:51:10 <_glx_> with ``` FILEVERSION 15,0,2024,0625
15:51:10 <_glx_> PRODUCTVERSION 15,0,2024,0625
15:51:26 <_glx_> but for now I only checked MSVC
15:52:29 <LordAro> try with an 8 or 9 in the code :p
15:53:01 <peter1139> Yes it's just a number, so a leading 0 either means octal, or it's just ignored anyway.
15:53:43 <_glx_> MSVC seems to ignore it (as it shows 625 in properties)
15:54:54 <_glx_> mingw does not ignore the 0 π
16:02:31 <peter1139> Hmm, implementing the fallback layouter 3 times seems like the wrong approach.
16:18:10 <truebrain> I still vote to just remove MSYS support π
16:27:23 <_glx_> in any case 15.0.2024.625 looks better than 15.0.0.55537
16:45:56 *** gelignite has joined #openttd
16:51:53 *** Wormnest has joined #openttd
16:54:39 <_glx_> oh of course emscripten test builds fails because it doesn't really get the version
17:00:56 <_glx_> yeah dubious ownership so `-- Version string: --g` but I ask for substring(4, 4) of ""
17:03:27 <peter1139> Outside thermometer says 35.7Β°C
17:12:10 *** gelignite is now known as Guest10861
17:12:10 *** Guest10861 has quit IRC (Read error: Connection reset by peer)
17:12:14 *** gelignite has joined #openttd
17:44:15 *** HerzogDeXtEr has joined #openttd
18:01:09 <talltyler> What an adventure this update has been
18:02:56 <talltyler> I've set arbitrary limits, because allowing our inefficient town growth algorithm to run wild is a bit of a rice-on-a-chessboard problem. The larger the town, the longer it takes to successfully grow it. I don't know the math but I hung OpenTTD repeatedly today trying to reach the target population π
18:06:13 <andriydohniak> pickpacket: pickpacket:
18:06:13 <andriydohniak> > was someone here working on increase the amount of companies possible in multiplayer? @andriidokhniak?
18:06:13 <andriydohniak> Kinda, It already works, but it uses more memory then everybody is comfortable with, and I am working on the UI to make it accessible to a tonn of companies. Current selectors only have 15 everywhere, but the code works
18:07:12 <andriydohniak> My current solution increases the max number of players to 240
18:07:52 <andriydohniak> But I need to document a bunch of my code, and rewrite it so it uses a separately stored array, which is not used when having a normal sized lobby
18:08:58 <andriydohniak> I ran a vote, and the results were:
18:08:58 <andriydohniak> 2 ppl were ok with making the tile size bigger, and bitfield size
18:08:58 <andriydohniak> 2 ppl were not ok with changing the tile size but ok with changing the company bitfield
18:13:40 <andriydohniak> talltyler: I can think of 1 solution which will be more efficient, but use much much more memory, that would be for every town to store tiles it owns, and detect the edges of it's ownership and try to expand there, but practically this does seem difficult to manage well
18:24:39 *** amal[m] has joined #openttd
18:24:50 <andriydohniak> How does this look to yall?
18:35:03 <peter1139> "lobby" is a weird term for "number of companies"
18:36:10 <andriydohniak> peter1139: where did I say lobby?
18:36:41 <andriydohniak> It very much is!
18:37:00 <andriydohniak> A game with normal company list size limit*
18:45:42 <peter1139> I assume I'm reviewing an old version there.
18:48:21 <andriydohniak> Hey guys, thanks for the reviews, and most of them still are relevant to me, but I would suggest not wasting time rn, because I am doing some big refactors, which are bound to remove some errors and create other
18:50:52 <talltyler> andriydohniak: Dunno, it's probably fine π€·
18:58:42 <andriydohniak> I managed to fix all the uncapitalized and with no . at the end @param and @return comments with a vim macro :)
18:58:53 <peter1139> Oof, I have no idea how the MacOS paragraph layouter works.
18:59:12 <andriydohniak> why would you want to know that?
18:59:35 <peter1139> It does not seem to do the itemisation that the Windows and ICU layouters do.
19:03:40 <peter1139> /* CTRunDelegateCreate is supported since MacOS X 10.5, but was only included in the SDKs starting with the 10.9 SDK. */
19:03:43 <peter1139> #ifndef HAVE_OSX_109_SDK
19:03:47 <peter1139> I guess this is no longer necessary.
19:08:27 <michi_cc> peter1139: It still does itemization, but most is handled internally in the CTTypesetter (which has state). Most of the manual footwork of e.g. Uniscribe where you pass data from function to function to function is encapsulated inside the typesetter.
19:10:32 <peter1139> I maybe be able to modify the delegate part.
19:12:24 <peter1139> But that looks quite heavy. Okay for a few special symbols...
19:12:39 *** Wormnest has quit IRC (Read error: Connection reset by peer)
19:13:31 <peter1139> I want to be able to layout with different fonts, one of those fonts might be the sprite font.
19:13:42 *** Wormnest has joined #openttd
19:14:13 <peter1139> The delegate stuff appears to encode the character into pointer, then replaces the character with 0xFFFC.
19:14:18 <peter1139> This is... interesting :)
19:14:56 <michi_cc> For the sprite font you indeed need the run delegate to get the width right, but for other fonts, you just set `kCTFontAttributeName` on the appropriate string range.
19:15:29 <peter1139> Yeah, I assume my changes for that will work fine, as it's going to be passing the correct font at this point.
19:17:03 <peter1139> Say I have sprite font enabled, but my language uses a non-latin character set. Currently that will use the detected font for all characters.
19:17:32 <michi_cc> The 0xFFFC is according to the docs, and encoding our data into a void * was my stupid trick to avoid allocating some struct somewhere, given that Unicode chars are only 20 bits and thus always < 32/64 bits.
19:17:50 <peter1139> With my changes, the sprite font (or default font) will be used if the glyph exists.
19:18:27 <peter1139> That means for a string that contains a lot of latin characters, it will be creating a lot delegate handlers.
19:19:08 <peter1139> I can "optimise" for this a bit by detecting if it's only using the sprite font, and then use only the fallback layouter in that case.
19:19:52 <peter1139> This is where the "external" itemisation on Windows/ICU helps, because I can do the layouting for the sprite font sections separately in one go.
19:21:33 <peter1139> I think that harfbuzz can be passed a custom font handler too, but I didn't bother with that.
19:23:24 <michi_cc> Yeah, this is a bit of a disavtange of the more integrated nature of CoreText. Normally it is nice that you can just ask it for a line without much hassle, but if you want to "trick" it, it gets more difficult.
19:24:43 <peter1139> Everything just assumes you have a TrueType font these days :D
19:25:03 <peter1139> And we do, but... not always.
19:25:04 <merni> How about writing a script for converting the sprite font into a truetype :p
19:25:15 <peter1139> Zephyris did that ;p
19:25:45 <merni> Just use that on the TTD / OpenGFX sprite fonts then :p
19:25:49 <peter1139> Runtime converting sprites into a TrueType font though...
19:26:13 <merni> Could be done when you install/change a base graphic set
19:26:35 <peter1139> Okay, the OpenTTD TTF fonts are hand made, not with a script.
19:26:49 <peter1139> We don't have a script to convert bitmaps into a TrueType font.
19:27:03 <peter1139> Also, NewGRFs can provide sprite glyphs.
19:27:10 <peter1139> So it will depend what NewGRFs are loaded.
19:28:09 <peter1139> michi_cc, ideally I could say "for this range from character position 5 to character position 10, use this delegate to get the size/position information."
19:28:31 <peter1139> But yeah, with the 0xFFFC requirement that's not feasible.
19:31:26 <peter1139> Hmm, the delegate methods `getWidth` don't have a character as a parameter, so it's not like it could be used that way.
19:31:29 <michi_cc> 0xFFFC or not doesn't matter, the delegate callback does not have access to the char data.
19:32:59 <michi_cc> If if weren't for line breaking, you could "concatenate" the full range down to one char and use the run delegate to return the final width of the whole sprite block.
19:33:09 <michi_cc> But no linebreaking then for you π¦
19:33:13 <peter1139> Maybe pre-itemising the string by spritefont/not-spritefont first, and then havcing separate runs would work.
19:45:56 <peter1139> Hmm, I think I may also need to decouple the SpriteFont's glyph to spriteid map from the SpriteFont instance.
19:46:17 <peter1139> Whoever decided that drawing text was so complicated? :D
19:56:18 <michi_cc> How dare humanity to not just use ASCII for every language everywhere? LUL
19:57:23 <andriydohniak> Ucraine uses Cyrilic alphabet and I approve this message!
19:58:07 <_glx_> cyrilic is rarely an issue
19:58:08 <andriydohniak> Poland for example switched to latin characters, although not pure ascii (12th century)
19:58:36 <_glx_> many latin font include cyrilic and greek
19:59:48 <andriydohniak> That is true, but I am not just talking about font rendering or whantever you were discussing over here, I am talking in general, how good would it be to have 1 universal keyboard for example? Or universal alphabet
20:00:56 <merni> ironically the languages which use a script vastly different from latin are more likely to use a qwerty keyboard :p
20:01:14 <_glx_> "our" main problem is when text has to mix asiatic and non asiatic
20:03:48 <peter1139> Well, I haven't yet tackled the case of encountering a glyph that is not supported when it's not part of a language file.
20:03:51 <andriydohniak> Should I join thouse 2 if statements?
20:04:17 <peter1139> (e.g. in savegames or chat messages)
20:04:37 <peter1139> No need to join them.
20:06:00 <peter1139> You might just want GetScrolledItemFromWidget() instead.
20:06:43 <peter1139> Designed specifically to avoid needing to check array indices, etc.
20:08:39 *** gelignite has quit IRC (Quit: Stay safe!)
20:15:12 <andriydohniak> peter1139: But can I use that method and modify that selected element through the iterator?
20:15:38 <andriydohniak> Or does the iterator make a copy
20:17:12 <andriydohniak> I am ashamed to admit it, but this does look kinda good lol
20:17:41 <andriydohniak> There is something beautifull about just throwing pointers everwhere and the dumb operator overloads
20:19:46 <_glx_> hmm `it->flip()` should work too
20:20:37 <andriydohniak> That's probably because it's not actuall dereferencing, the * operator is just overloaded
20:32:15 <andriydohniak> I need help coming up with an argument name. You see the WID_SELECTOR_START and WID_SELECTOR_END? I need to pass those as arguments to my Init function, and I have no idea on what to call them
20:32:51 <andriydohniak> And this still is not where the widget is actually placed, this is an old screenshot from prototyping
20:33:26 <andriydohniak> Also, mb better names then WID_SELECTOR_START, and SelectorWidget::number_of_widgets
20:37:16 <andriydohniak> my current best idea is `widget_range_start` and `widget_range_end`
20:39:39 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
20:41:01 <peter1139> `it->flip()` should work.
20:41:14 <peter1139> Dereferencing is derefencing.
20:41:23 <peter1139> But spelled correctly both times.
20:44:18 <andriydohniak> peter1139: It doesn't! I don't know what to tell you
20:44:23 <andriydohniak> I get a compiler error
20:44:52 <andriydohniak> /home/andriy/git/openttd_fork/src/selector_widget.cpp:113:27: error: base operand of β->β has non-pointer type βstd::_Bit_iteratorβ
20:44:52 <andriydohniak> 113 | it->flip();
20:46:01 <peter1139> Oh, it's a std::bitset instead of the more usual std::vector.
20:46:39 <peter1139> Surprised (*it).flip() works even.
20:47:16 <andriydohniak> That is kinda interesting, but I guess they did make it work
20:48:06 <andriydohniak> They have a type _Bit_reference, same thing you get if you do a [] on a bitset
20:48:21 <andriydohniak> and it has a bunch of methods on it, including flip
20:50:01 <andriydohniak> Can I have multiple public sections?
20:50:18 <peter1139> Yes but best not to.
20:50:39 <andriydohniak> I need to have a constant that depends on a declaration of a private member
20:51:54 <andriydohniak> I can put the big public section after private, but should I?
20:52:23 <peter1139> I don't see why that needs to be after anything else in that class.
20:52:56 <_glx_> usually we put constants on top
20:54:08 <andriydohniak> Because the enum is private
20:54:47 <andriydohniak> so WID_SELECTOR_END, and WID_SELECTOR_START is private, and as per CODINGSTYLE.md we put public section before private
20:55:10 <peter1139> WID_ shouldn't be private, they should in the the _widget.h file.
20:55:55 <andriydohniak> but this is specific to this widget, and it is in a selector_widget.h file, but in this case the word widget means something different
20:56:30 <peter1139> If it's not a regular WID_*, then call it something else.
20:57:04 <andriydohniak> well it is, but it's only used by my "widget"/component, and it includes an offset
20:57:58 <andriydohniak> so WID_SELECTOR_MATRIX for example will only be used with this->widget_offset
20:58:40 <peter1139> That's the same as all WID_. They are shouldn't be private.
20:59:12 <andriydohniak> _glx_: Well not really, because my widget is not a window, it embeds into regular windows, so should not be any issues
20:59:46 <_glx_> GS needs to access widgets to possibly highlight them
21:00:35 <andriydohniak> so 42069 offset doesn't sound as bad anymore :) ?
21:02:28 <andriydohniak> But on a more serious note, 1 << 16 is taken, what if I just do 1 << 16 + 1000?
21:03:21 <andriydohniak> Or 1 << 15 / 1 << 17 is fine too, but the growth is non linear then
21:04:29 <andriydohniak> the WidgetID is a 32 bit signed integer btw
21:07:43 <peter1139> It is now, it used to sometimes be an int, and sometimes by a byte.
21:09:38 <andriydohniak> I assume you are Peter Nelson :peter1139, why did you WID_PW_START?
21:10:23 <andriydohniak> Why did you create*
21:10:30 <andriydohniak> Missed the most important word lol
21:10:33 <peter1139> Same reason as you.
21:11:46 <andriydohniak> I did it to calculate the offset more easily against a static item, and because the widget IDs of my selector widgets were ment to be different per window
21:11:49 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:12:12 <andriydohniak> Now I know this is a bad idea!
21:12:24 <andriydohniak> I did it not to have to create a static offset
21:12:30 <peter1139> I did it because I needed the widget IDs to start in a defined place so that they don't conflict with other widget IDs.
21:13:38 <peter1139> Unless you want to have multiple selectors in one window, there's no reason to make them use different IDs.
21:16:41 <andriydohniak> Ok, I see how it's a bad idea, what offset should I choose?
21:16:50 <andriydohniak> 1 << 16 + 1000 sounds good?
21:18:08 <andriydohniak> What does your picker do anyway?
21:18:26 <andriydohniak> _glx_: 1 << 16 is taken
21:18:40 <_glx_> not it graph related windows
21:19:08 <andriydohniak> My selector widget is not graph related
21:19:19 <andriydohniak> It is fully indepenedent from graphs
21:20:12 <andriydohniak> and can be overloaded to make a searchable scrollable, selectable with ability to disable or enable anything selector widget
21:20:44 <andriydohniak> selector anyting widget*
21:21:00 <andriydohniak> again missing the most important word! Wtf is going on with me
21:21:11 <andriydohniak> and misspelled too
21:21:17 <andriydohniak> Ok, I am going to sleep
21:24:48 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:31:59 <andriydohniak> Wow! If I had looked at the picker_gui, I would have arrived to this solution much faster, but the number of methods with the word Class just scared me away
21:34:05 <_glx_> yeah Class is common in newgrf world π
21:42:55 *** tokai|noir has joined #openttd
21:42:55 *** ChanServ sets mode: +v tokai|noir
21:49:47 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:52:28 <peter1139> As if I hadn't mentioned it many times already...
continue to next day β΅