IRC logs for #openttd on OFTC at 2025-11-10
            
00:00:19 <xarick> not T
00:00:57 <xarick> why not _vals[i] = nullptr or something like that
00:03:22 <xarick> there's a shrinktofit
00:03:28 <xarick> after the resize call
00:17:03 <peter1138> The destructor is called because it's a reference-counted object. Destructing it reduces the counter. If it was just replaced by nullptr then the counter wouldn't get touched.
00:29:17 <_glx_> xarick: can't work, vargv is not real in squirrel2
00:34:51 <_glx_> but in squirrel3 it's valid
01:36:51 *** Flygon has quit IRC (Remote host closed the connection)
02:01:08 *** tokai has joined #openttd
02:01:08 *** ChanServ sets mode: +v tokai
02:08:04 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
02:18:48 *** Wormnest has quit IRC (Quit: Leaving)
03:22:37 *** Beer has joined #openttd
03:45:11 *** gnu_jj_ has joined #openttd
03:48:29 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
04:13:51 *** Beer has quit IRC (Quit: Leaving)
04:27:01 *** Zathras has joined #openttd
04:27:01 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:27:02 *** WormnestAndroid has joined #openttd
04:28:20 *** Zathras_4 has joined #openttd
04:30:31 *** Zathras_11 has quit IRC (Ping timeout: 480 seconds)
04:41:12 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/744543e46919c9e006c2b7d19918055ca08d4261
04:41:13 <DorpsGek> - Update: Translations from eints (by translators)
05:13:36 *** keikoz has joined #openttd
05:27:48 <DorpsGek> [OpenTTD/OpenTTD] Release workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/19221310786
05:55:17 *** jack_88271 has joined #openttd
05:55:17 <jack_88271> [1.png](https://imgur.com/nbJ24Vl)
05:55:17 <jack_88271> [2.png](https://imgur.com/xN2WLMt)
05:55:17 <jack_88271> [3.png](https://imgur.com/2hX3GPc)
05:55:17 <jack_88271> [4.png](https://imgur.com/EKtz1QA)
07:01:50 *** WormnestAndroid has quit IRC (Remote host closed the connection)
07:01:56 *** WormnestAndroid has joined #openttd
07:06:22 <DorpsGek> [OpenTTD/survey-web] survey-summary[bot] pushed 1 commits to main https://github.com/OpenTTD/survey-web/commit/a038bc0e16bb7d095369a7638e5a341130ca0e5f
07:06:23 <DorpsGek> - Add: summary for week 45 of 2025 (by OpenTTD Survey)
07:35:03 <andythenorth> well
07:35:25 * andythenorth is hide_sprite in the spec
07:35:43 <andythenorth> or is it some nml construct?
07:35:45 * andythenorth looks
07:39:16 <andythenorth> might be bit 0 in flags to advanced spritelayout
07:53:26 <andythenorth> hmm terminology
07:53:33 <andythenorth> if a tile isn't a water tile, what is it?
07:53:48 <andythenorth> 'ground' and 'terrain' are already keywords in use in my compile
07:53:59 <andythenorth> 'land'?
08:00:22 <rito12_51026> andythenorth: dehydrated tile 😛
08:16:46 <andythenorth> hmm we don't have snow at tile height 1?
08:17:00 * andythenorth refactoring a complicated spritelayout with many conditionals
08:18:03 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437355613611884564/image.png?ex=6912f13b&is=69119fbb&hm=ca09e21a6afa942a0680307aee62e890d5271f2d9b6ac972dfa7e7bfefecc17a&
08:20:19 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437356181457731635/Zrzut_ekranu_z_2025-11-10_09-15-59.png?ex=6912f1c2&is=6911a042&hm=c012be4254c5f15012ad76b3567d8f3604da6d909d87c9c1a4a9dc7ce7e4c832&
08:20:19 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437356181810319382/Zrzut_ekranu_z_2025-11-10_09-16-06.png?ex=6912f1c2&is=6911a042&hm=9520a24973b541b14580593b4765f5bacdaa635fba2ca2317625b99bfdbfd71e&
08:20:19 <rito12_51026> peter1138: It is still dropdown-item-as-button but the frame rect is drawn under the base items, as like in the DrawDropDownButton method.
08:20:19 <rito12_51026> Now the DropDownVRule class and aditional DropDownDivider aren't needed
08:24:25 <peter1138> Getting there, although spacing is a bit off.
08:27:52 <andythenorth> badges in advanced spritelayouts? 👀
08:27:59 <andythenorth> I have no idea "why?"
08:28:04 <andythenorth> just seems interesting
08:40:37 <peter1138> What.
08:47:07 * andythenorth not sure, trying to figure it out
08:47:33 <andythenorth> it would be nice to show badge sprites on industry tiles, with some kind of extension of transparency settings
08:47:36 <andythenorth> or filters
08:48:02 <andythenorth> to place them accurately, might need explicit handling in the spritelayout
08:48:03 <andythenorth> or not
08:52:14 <peter1138> You're absurd.
08:52:40 <andythenorth> there's some old grf that has little icons on the tiles
08:52:43 <andythenorth> TTRS?
09:06:19 <andythenorth> well, it might be better to split the spritelayouts for tiles built on land and tiles built on water
09:06:25 <andythenorth> and branch in the varact2 chain
09:07:18 <andythenorth> combining conditionals like 'is on water, and has snow' is too complicated
09:46:19 <LordAro> peter1138: wouldn't have it any other way though
09:48:16 <peter1138> If we were to draw badges on tiles in the viewport for some reason, we would definitely NOT want it to be controlled by the NewGRFs.
09:53:20 <andythenorth> seems it wasn't TTRS that had tile icons
09:53:55 <peter1138> It is.
09:54:25 <peter1138> Has a stickman on parks, for... reasons.
09:54:49 <locosage> ecs has some
09:54:50 <peter1138> For buildings it has 3x5 pixel text, "CATHEDRAL", "FIRE", "HOSPITAL"
09:54:58 <locosage> badges in layouts kinda make sense
09:55:05 <locosage> like any kind of sprite reusal though
09:55:35 <peter1138> Badges are a GUI thing, not meant for the viewport.
09:56:00 <peter1138> If we were to include them in the viewport for a debug mode, or extra data mode, then it would be the game drawing them, and not require input from the NewGRF.
09:56:45 <locosage> logically viewport is part of gui too
09:58:56 <andythenorth> I looked down the rabbit hole of drawing them over ground sprite, but under building sprite
09:59:04 <andythenorth> hmm probably bad rabbits
09:59:25 <andythenorth> this is just idle nonsense, I'm not planning to add badges to FIRS tiles
10:00:02 <peter1138> Probably more useful is to show overlay cargo icons show acceptance/production.
10:00:32 <andythenorth> probably
10:00:59 <peter1138> Or if your industries have badges, display those.
10:01:06 <peter1138> Per tile is a bit much.
10:02:29 <locosage> yeah, acceptance/production icons per tile doesn't seem particularly convenient
10:03:04 <locosage> you know where it is though, on a minimap
10:03:41 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1437382196343214212/Screenshot_from_2025-11-10_15-03-34.png?ex=691309fc&is=6911b87c&hm=e766407e32f5e14fb34c920e52759f6ddee531635268eec5b8e446a771a8666c&
10:04:26 <peter1138> Solid light grey?
10:05:29 <locosage> discord seems to be having trouble with an image for some reason
10:05:37 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1437382684216131634/Screenshot_from_2025-11-10_15-03-34.png?ex=69130a71&is=6911b8f1&hm=a1d55d0aecfbe695f13064d03b2fcae5f9811ed64d9b4b9922d40087360ab8a0&
10:05:48 <locosage> weird
10:08:35 <locosage> https://gcdnb.pbrd.co/images/bT4sy4q08be9.png
10:12:07 <andythenorth> some images missing for me also
10:12:42 <locosage> yeah, the last one should be working
10:13:03 <andythenorth> it is
10:16:15 <xarick> can we port vargv from squirrel 3 to openttd?
10:23:06 <peter1138> Why?
10:23:47 <peter1138> Judging from the comments last time, the example code was absolutely NOT something you should be trying to do.
10:24:00 <peter1138> from last night.
10:26:38 <andythenorth> as far as I could tell, we're now trying to exploit specific Squirrel constructs to manually manage performance and memory in the OpenTTD client?
10:26:40 <andythenorth> from GS?
10:27:22 <xarick> <https://github.com/albertodemichelis/squirrel/blob/85dfe4b676a10313c8e0796bbda1cf9d7ea05cc0/HISTORY#L183-L184>
10:27:50 <andythenorth> will Horse compile faster if I learn how to micro-optimise python loops?
10:27:51 <andythenorth> hmm
10:28:08 <andythenorth> in *some* languages, token length can be significant for performance
10:28:25 <andythenorth> should GS replace all token names with single characters?
10:28:30 <andythenorth> for x in n
10:30:06 *** Flygon has joined #openttd
10:31:46 <peter1138> xarick, the code example given was not given to you as an example to try. Do not bother.
10:35:41 <andythenorth> locosage: this is nice
10:35:46 <andythenorth> do you have a patchpack?
10:38:03 <locosage> that's citymania client ....
10:47:08 <xarick> ok
10:49:15 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437393663457103893/Zrzut_ekranu_z_2025-11-10_11-46-57.png?ex=691314aa&is=6911c32a&hm=f40080a22c2d54fb66ef9cb70e1c1f3459488c050df129676730741675660bce&
10:49:15 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437393663939579914/Zrzut_ekranu_z_2025-11-10_11-47-02.png?ex=691314aa&is=6911c32a&hm=b958931135081558207f744e18a87e135ad62c8998a608d938e15cf5e6b55cf3&
10:49:15 <rito12_51026> peter1138: Spaced out enough?
10:49:56 <peter1138> No.
10:50:25 <peter1138> Rect coordinates are inclusive.
10:51:30 <peter1138> The buttons overlap horizontally, probably you are missing a -1.
10:51:57 <peter1138> E,g, `Rect.right` is Rect.left + width - 1.
10:51:57 <mmtunligit> https://cdn.discordapp.com/attachments/1008473233844097104/1437394344276529203/image.png?ex=6913154d&is=6911c3cd&hm=572ad28397b900c30dd4b2af1e95994e11132b21881a722b553c58c97804baef&
10:51:57 <mmtunligit> ok so im installing the optional libraries that i never got around to the first time, and ive got almost all except for libcurl, would anyone know whic one fo these is the right package? i dont know which -dev is correct
10:52:02 <peter1138> E,g, `Rect.right` is `Rect.left + width - 1.`
10:52:27 <rito12_51026> no, they are included inside each other
10:52:40 <peter1138> rito12_51026, oh. Don't do that :)
10:53:23 <peter1138> Should be sort butto on the left, configure button on the right, and the sort type
10:53:26 <peter1138> Argh
10:53:29 <peter1138> Stupid enter key.
10:53:45 <peter1138> Should be sort order button on the left, configure button on the right, and the sort type button filling in the remaining space.
10:55:54 <rito12_51026> uh, currently it is `DropDownCustomSelectedBGColour<DropDownAdditionalButton<DropDownIndent<DropDownString<DropDownIcon<DropDownAdditionalButton<DropDownSpacer<DropDownIcon<DropDownAdditionalButton<DropDownSpacer<DropDownListStringItem>>, true>, true, false>>>>>>>`
10:55:54 <rito12_51026> where the true is to draw at the end and false to make in narrower
10:59:51 <peter1138> At this point you probably want a single completely custom dropdown element, rather than trying to compose it from multiple parts.
11:00:16 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437396435644452884/image.png?ex=6913173f&is=6911c5bf&hm=f8ccf1424235bbc28365c45b02836c13b98691784a4021022ee6d7cff614db17&
11:00:16 <xarick> `list[item] = valuator_function.acall([this, item].extend(args));`
11:00:39 <xarick> i'm trying smart code, it's not working
11:01:17 <peter1138> xarick, do not even try it. You are not trying something that is going to help anything.
11:03:18 <xarick> extend doesn't return anything apparently
11:03:28 <peter1138> He's in write-only mode again.
11:03:32 <xarick> im not
11:07:36 <xarick> just attempting tricks to reduce opcodes
11:08:22 <peter1138> It was not a trick to reduce opcodes.
11:09:39 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437398799864823808/image.png?ex=69131973&is=6911c7f3&hm=74339f6dd3ae6216f2580bd1e9842ae25cfc52f687f95878fad8c1dbc7b55e16&
11:09:39 <xarick> I can't do better than this
11:10:47 <peter1138> mmtunligit, one of the libcurl4-.*-dev packages.
11:11:10 <mmtunligit> is there a meaningful difference between the flavors?
11:11:58 <peter1138> mmtunligit, it's kind of absurd that we get to choice which implementation...
11:12:32 <mmtunligit> nerds gonna nerd
11:12:35 <peter1138> Use the flavour that's installed already, I guess `dpkg -l | grep libcurl4`
11:13:19 <mmtunligit> ok, SSL it is than, thanks a bunch
11:57:17 <peter1138> rito12_51026, in fact, given the drop down window is only a window with some default logic, it may even be a better idea to implement a new custom dropdown window that has all the functionality as regular handlers, instead of hacking it into dropdown items.
12:00:09 <peter1138> (Not saying you should, but it could be done that way)
12:03:28 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437412341481214013/Zrzut_ekranu_z_2025-11-10_12-56-22.png?ex=69132610&is=6911d490&hm=b421e416113f36541d1f052d1cbae1232a2957d98d5e1914e3fd148ca9687d58&
12:03:28 <rito12_51026> Fixed the buttons overlapping, so maybe not
12:05:58 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744
12:08:41 <talltyler> (Just a rebase to fix the CodeQL action and pass CI)
12:11:44 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437414422745448570/image.png?ex=69132800&is=6911d680&hm=8bec080ec612bdab09d79abc942329bb31ffa5fd52177eea07a720248d28896d&
12:11:44 <xarick> wondering if this will help getting rid of lists quicker
12:14:51 <peter1138> 100% no.
12:15:41 <kaji_kaede> Finally. Vibes-based code optimisation.
12:16:05 <peter1138> Instead of them just be destructed, you're now asking them to be cleared and reset to a usable state. And then destructed.
12:32:28 <xarick> oops :/
12:56:19 <andythenorth> I'm confused
12:56:26 <andythenorth> maybe I should read about reference tracking
12:56:45 <andythenorth> is there not just some table of refs somewhere, and killing an object is just dropping the ref?
12:57:01 <andythenorth> and then if we're security minded, writing random data over that segment of memory?
12:57:03 <andythenorth> or something
12:57:20 * andythenorth imagines how computers works
13:07:56 <xarick> crap, i'm degrading my ssd for absolutely stupid tests
13:44:29 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437437762000261221/image.png?ex=69133dbc&is=6911ec3c&hm=5245c58d63fd23d75bd65f0677b2a0ac9ccbaeb7d7aaaf30791857d82fc9d48a&
13:44:29 <xarick> floats are valid in squirrel
13:44:34 <xarick> what is this test?
13:45:54 <_glx_> they are not valid for admin port
13:51:58 <xarick> i tried to make an optimization
13:52:09 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437439691350737038/image.png?ex=69133f88&is=6911ee08&hm=1aacc5563c56b08632e21136122b9a668282594714485f7f906fe7613830868c&
13:52:09 <xarick> turned sorter_type into 1 byte
13:52:20 <xarick> a bool
13:52:37 <xarick> class ScpirList 72 bytes -> 64 bytes
13:53:24 <xarick> but regression fails
13:56:03 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437440676181839934/image.png?ex=69134073&is=6911eef3&hm=f10a0ab2d6af30f1e700d4e3f2dcd261a7698b6519d9cffc375b3f486923df62&
13:56:03 <xarick> > Your script made an error: parameter 1 has an invalid type 'bool'
13:56:03 <xarick> > expected: 'integer'
13:56:03 <xarick> `list.Sort(AIList.SORT_BY_VALUE, AIList.SORT_ASCENDING);`
13:56:50 <LordAro> `enum SorterType : uint8_t` would be the better change
13:57:34 <xarick> ok lets test that
13:58:52 <xarick> nice it works! regression passes
14:00:55 <xarick> interesting, bool and uint8_t are both 1 byte
14:01:05 <xarick> why?
14:01:18 <_glx_> bool might be 1 byte on your platform
14:02:45 <_glx_> `bool — integer type, capable of holding one of the two values: true or false. The value of sizeof(bool) is implementation defined and might differ from 1. `
14:04:27 <peter1138> I left all script enum types as default in case of special script funkiness.
14:05:16 <peter1138> Or rather, "didn't touch them" when I did touch most other enum types.
14:05:46 <_glx_> yeah squirrel export script can be touchy
14:05:56 <peter1138> Sometimes they are almost the same as the native ones, and then they also have a magic -1, so it needs to be signed.
14:06:14 <xarick> int8_t
14:06:58 <_glx_> inside squirrel every number is SQInteger so int64_t
14:07:51 <xarick> int8_t also passed regression test
14:19:49 <_glx_> oh of course regression was failing with `: bool` ```Your script made an error: parameter 1 has an invalid type 'bool'
14:19:49 <_glx_> expected: 'integer'
14:19:49 <_glx_> *FUNCTION [TestInit()] regression/main.nut line [65]
14:19:49 <_glx_> *FUNCTION [Start()] regression/main.nut line [2077]
14:21:14 <_glx_> all enums are considered integer when exporting
14:25:20 <jfkuayue> english
14:25:20 <jfkuayue> can not != cannot = can't
14:25:20 <jfkuayue> may not (this may not happen) != may not (you may not do this)
14:27:20 <_glx_> but the constants exported from enums are bool in case of `: bool`, while the functions using enum as parameter expect integer
14:28:53 <_jgr_> A bool does not logically make sense, even though there are currently only two values
14:44:08 <xarick> I wanna solve 14762,
14:56:38 *** toktik is now known as Guest30855
14:56:38 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437455920048377960/image.png?ex=69134ea5&is=6911fd25&hm=952bcd826581bb86d20e087b1955a60bc0b22f4ba2d8bc4eb9e2d95655c01d6f&
14:56:45 *** toktik has joined #openttd
14:59:58 *** Guest30855 has quit IRC (Remote host closed the connection)
15:01:49 <peter1138> "Reseted"
15:03:20 <LordAro> peter1138: and how well do you speak Portuguese? :p
15:03:36 <LordAro> wait, there's an extra u in there
15:03:54 <peter1138> I've lost it all since I went there a decade ago.
15:05:28 *** toktik has quit IRC ()
15:05:46 *** toktik has joined #openttd
15:07:10 <xarick> oh!
15:07:15 <xarick> Reset
15:14:12 <peter1138> :)
15:14:32 <peter1138> But actually, is that the call that erases everything in your lists?
15:15:59 <xarick> it erases all lists, and then clones new ones from the master array
15:16:08 <xarick> which have all items with value = 0
15:16:32 <xarick> valuate sets the value to whatever
15:17:58 <xarick> 14762 needs help
15:19:43 <xarick> i'm trying to figure out where Valuate begins
15:20:43 <xarick> but with a hidden embedded squirrel code, it's harder for me to follow
15:26:51 *** kuka_lie has joined #openttd
15:33:42 *** toktik is now known as Guest30858
15:33:49 *** toktik has joined #openttd
15:33:54 *** tokai has quit IRC (Ping timeout: 480 seconds)
15:36:32 *** Guest30858 has quit IRC (Remote host closed the connection)
15:38:48 *** tokai has joined #openttd
15:38:48 *** ChanServ sets mode: +v tokai
15:53:58 <xarick> okay
15:54:47 *** yiffgirl has joined #openttd
15:54:47 <yiffgirl> peter1138: saw this on the developer updates channel and had a minor coughing fit from laughter lmao
15:55:11 <xarick> `SQOpsLimiter limiter(vm, _settings_game.script.script_max_opcode_till_suspend, "valuator function");` this cheat worked
15:55:20 <peter1138> What is "this"?
15:55:59 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437470858326179891/image.png?ex=69135c8f&is=69120b0f&hm=98a8c48c9b3cc853df5d2924215e6d1aa20debab4d6f707ba1f1db068ee20653&
15:56:38 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437471019286663269/image.png?ex=69135cb5&is=69120b35&hm=054863806658bc3adcceffc64f265768038750fe002dc7832de40a9feff6a249&
15:56:38 <xarick> valuating the same number of items as it reset counterpart
15:57:08 <yiffgirl> peter1138: oh whoops sorry, forgot about the irc bridge again. it's "JP+ is pretty bad."
15:57:27 <peter1138> Ah... my lack of sugar-coating...
15:58:35 <xarick> im still wondering if there's a way to ruin it with custom valuator functions
15:58:58 <xarick> ie: valuate more items than reset
16:01:02 <xarick> hmm i see this might pose a problem
16:01:54 <xarick> while (true) list.Valuate(valuator_function); it would lock openttd
16:02:46 <_glx_> no it would not
16:03:34 <_glx_> only the script is stuck, but openttd is not affected
16:04:12 <xarick> hmm nice
16:04:40 <_glx_> and if the while(true) is inside a valuator the script is killed
16:06:10 <xarick> i don't think it would ever suspend, brb
16:08:40 <xarick> well neps, it worked apparently
16:11:33 <xarick> trying to simulate random varied work in the custom valuator
16:11:33 <xarick> ```function CustomValuatorFunction(item, instance)
16:11:33 <xarick> {
16:11:33 <xarick> for (local i = 0; i < GSBase.RandRange(instance.valuate_counter));
16:11:33 <xarick> return instance.valuate_counter++;
16:11:34 <xarick> }```
16:14:13 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437475446097973500/image.png?ex=691360d5&is=69120f55&hm=205f6a75a956547cfefa19816ac6b8c2558f1cdd550239eb04861c26e196c283&
16:14:13 <xarick> oops, this still happens lol
16:14:41 <xarick> forgot to i++
16:15:08 <_glx_> yes infinite loop
16:15:40 <peter1138> Heh
16:16:19 <_glx_> that's the main reason for SQOpLimiter
16:16:23 <peter1138> Loop conditions with side-effects, mmm.
16:16:42 <jfkuayue> je-pi-purasu izu puretthi baddo.
16:17:22 <peter1138> Sure?
16:26:55 *** toktik is now known as Guest30860
16:27:01 *** toktik has joined #openttd
16:29:53 *** Guest30860 has quit IRC (Remote host closed the connection)
16:32:48 *** toktik has quit IRC ()
16:32:58 *** toktik has joined #openttd
16:33:47 *** Wormnest has joined #openttd
16:35:35 *** toktik is now known as Guest30862
16:38:51 <peter1138> Well.
16:38:56 *** toktik has joined #openttd
16:41:43 <jfkuayue> 🕳️
16:42:56 *** Guest30862 has quit IRC (Ping timeout: 480 seconds)
16:47:03 *** toktik is now known as Guest30863
16:47:07 *** toktik has joined #openttd
16:47:41 <andythenorth> hmm
16:47:44 <andythenorth> lunch?
16:48:14 *** toktik is now known as Guest30864
16:48:21 *** toktik has joined #openttd
16:49:39 *** Guest30863 has quit IRC (Remote host closed the connection)
16:50:40 *** Guest30864 has quit IRC (Remote host closed the connection)
16:51:36 <goddess_ishtar> it's always lunch somewhere
17:16:22 <xarick> i overestimated the amount of work
17:17:10 <xarick> valuate_counter can go up to 49 million in the case of 10000 lists
17:20:54 <xarick> `for (local i = 1; i < GSBase.RandRange(instance.valuate_counter); i = i << 1);`
17:21:09 <xarick> faster
17:23:16 <peter1138> Don't forget you are giving it a new random value for every iteration of the loop.
17:31:08 <xarick> now i dont think i'm giving enough amount of work that it can't be complete under 500/250000 ops
17:33:18 *** toktik is now known as Guest30867
17:35:38 *** Guest30867 has quit IRC (Remote host closed the connection)
17:43:04 *** Borg has joined #openttd
17:43:09 <Borg> satan! I mean hi ;)
17:43:14 <rito12_51026> peter1138: I think I'll change my mind, because badge filter dropdowns are already implemented as buttons for other windows and reimplementing them as dropdown items seems a bit pointless
17:44:02 <Borg> http://cache.borg.uu3.net/turner_turbo_paper_haul.png <- Dual head hauling cargo as it should! :)
17:44:12 <andythenorth> such hacks
17:44:53 <Borg> no hack at all :P
17:44:59 <Borg> you can move it to the back if you want :)
17:45:29 <Borg> cloning works properly too.. :) I added check if train being cloned have rear engine directly after front or not..
17:45:37 <DorpsGek> [OpenTTD/OpenTTD] Rito13 updated pull request #14717: Feature: New selection for rail types. https://github.com/OpenTTD/OpenTTD/pull/14717
17:45:48 <Borg> only 2 positions allowed for dualhead trains.. either right behind front loco.. or at end of train
17:47:26 <peter1138> I can't remember what problems were solved by the current restrictions...
17:50:03 *** toktik has joined #openttd
17:51:16 <xarick> excessive cpu with 500 ops, but not with 250000 ops...
17:51:23 <xarick> very strange
17:53:16 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
17:55:54 <xarick> clearly I don't understand how all this works
17:59:01 <_glx_> excessive cpu with 500 ops, means a single valutation needs more than 500 ops
18:00:11 <_glx_> so it tries to valuate first item, fails, goes to sleep, retries first item, fails again, sees it was the same item as previous try, kills the script
18:01:11 <xarick> oh, interesting
18:01:39 <_glx_> that is when using suspendable PR
18:01:50 <xarick> yes
18:02:02 <xarick> I'm testing it
18:03:11 <xarick> https://discord.com/channels/142724111502802944/1008473233844097104/1437470858649014434
18:03:11 <xarick> this seems to work for some reason
18:03:24 <xarick> a little cheat
18:03:41 <xarick> but it seems to iterate all items without repetition
18:05:40 <_glx_> but the tick itself will take between 500 and 1000 ops on first call
18:06:09 <_glx_> (if the max opcode is 500)
18:07:57 <xarick> it's cheating... i know
18:08:31 <_glx_> and it won't prevent repetition if the list is too big to be fully valuated in one call
18:09:07 <xarick> hmm how big must it be?
18:09:35 <_glx_> depends on the limit and the valuator
18:09:37 <xarick> my biggest list has 4472 items
18:10:08 <_glx_> for native valuators it's 5 ops per item
18:10:16 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
18:10:42 *** WormnestAndroid has joined #openttd
18:11:15 <xarick> let me try 100000 items
18:12:38 <xarick> oh... need to do special coding
18:21:28 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437507465427157034/image.png?ex=69137ea7&is=69122d27&hm=84b3bb278a81e1b059e5e509257c9b23315449198c0d9232b49788afdd255d85&
18:21:28 <xarick> still good
18:21:35 <xarick> it's only 1 list now
18:21:46 <xarick> let's try 200k
18:23:50 <xarick> i must be doing something wrong
18:26:36 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437508762142375986/image.png?ex=69137fdc&is=69122e5c&hm=d9821c400670b4eab925a573181c137366b0fa2614b4522261a600ff3a0deae7&
18:26:36 <xarick> well, it just works
18:31:27 *** toktik has quit IRC (Remote host closed the connection)
18:31:52 *** toktik has joined #openttd
18:34:09 *** toktik is now known as Guest30874
18:34:16 *** toktik has joined #openttd
18:36:00 *** Guest30874 has quit IRC (Remote host closed the connection)
18:37:24 <peter1138> yiffgirl, btw, for me it's just an overwhelming and seemingly random list of different types.
18:45:44 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437513577585180752/image.png?ex=69138458&is=691232d8&hm=1133bebe8970d020baaafdaa551b5c8f2190e85aad8cfea695ca0c1c50245290&
18:45:44 <xarick> it works!
18:45:53 <xarick> i pushed the valuator function to the limit
18:46:17 <xarick> 49999 would get excess cpu
18:46:33 <xarick> 49998 still do all the items without repeating
18:48:50 <xarick> the only question I have though... is it fair?
18:49:44 *** toktik is now known as Guest30876
18:49:51 *** toktik has joined #openttd
18:52:13 *** Guest30876 has quit IRC (Remote host closed the connection)
18:59:50 <xarick> let me verify regression
19:01:54 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437517644600447136/image.png?ex=69138822&is=691236a2&hm=fef96afec515c6d7d3467009a287f4783cc43ba3bb871cb2cdb59587f482f317&
19:01:54 <xarick> nice
19:02:13 <xarick> no more mismatching rand values
19:02:27 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #14762: Change: [Script] Spread ScriptList::Valuate load over mutliple ticks https://github.com/OpenTTD/OpenTTD/pull/14762#pullrequestreview-3444718455
19:22:10 *** toktik is now known as Guest30879
19:22:17 *** toktik has joined #openttd
19:28:00 *** toktik has quit IRC ()
19:28:10 *** toktik has joined #openttd
19:29:51 *** Guest30879 has quit IRC (Ping timeout: 480 seconds)
19:30:30 *** toktik is now known as Guest30880
19:30:36 *** toktik has joined #openttd
19:33:27 *** Guest30880 has quit IRC (Remote host closed the connection)
19:40:44 *** toktik has quit IRC (Remote host closed the connection)
19:41:20 *** toktik has joined #openttd
19:53:03 *** Beer has joined #openttd
19:53:59 *** Wolf01 has joined #openttd
20:08:07 <xarick> I just discovered `overdrawn_ops`
20:08:17 <xarick> is it in use at all?
20:13:29 <xarick> ah, it is used
20:17:30 <_glx_> yes it's used, it's mainly for constructors and Valuate exceeding the allowed ops
20:22:38 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14410: Add: Draw station rating mini graphs in vehicle order lists. https://github.com/OpenTTD/OpenTTD/pull/14410
20:23:32 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #14762: Change: [Script] Spread ScriptList::Valuate load over mutliple ticks https://github.com/OpenTTD/OpenTTD/pull/14762#pullrequestreview-3445010777
20:28:06 *** toktik is now known as Guest30884
20:28:13 *** toktik has joined #openttd
20:29:12 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14766: Fix c2d4098afa: Unconfigured badge classes should be visible by default. https://github.com/OpenTTD/OpenTTD/pull/14766
20:30:17 *** toktik is now known as Guest30885
20:30:24 *** toktik has joined #openttd
20:30:50 <peter1138> Though I should look at the alignment thing.
20:31:06 *** Guest30884 has quit IRC (Remote host closed the connection)
20:37:46 *** Guest30885 has quit IRC (Ping timeout: 480 seconds)
20:37:47 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
20:39:18 *** WormnestAndroid has joined #openttd
20:39:47 *** Wormnest has joined #openttd
20:44:27 <peter1138> TIL that the voice behind Leela is 71... although I guess it's been going long enough that she was only 45 at the start.
20:44:53 <andythenorth> oof time flies
20:45:19 <peter1138> Yeah :/
20:48:27 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437544460388143185/Zrzut_ekranu_z_2025-11-10_21-45-33.png?ex=6913a11b&is=69124f9b&hm=89ca6a491bc0c8691187782bc829e4c32fb52c3a622e6cbd4ebe4917a8c67530&
20:48:27 <rito12_51026> peter1138: It even looks better when it's done as regular handlers, instead of hacking it into dropdown items
20:50:31 <andythenorth> at some point...a window 😛
20:50:37 <andythenorth> which closes after selection, like bridges 😛
20:51:36 <_zephyris> ... yeah.
20:55:08 <peter1138> Okay, I see the problem with the existing list.
20:55:21 <peter1138> Probably won't matter than with rito12_51026's stuff, but I'll fix it anyway.
20:59:19 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14766: Fix c2d4098afa: Unconfigured badge classes should be visible by default. https://github.com/OpenTTD/OpenTTD/pull/14766
21:00:02 <peter1138> Oh, that's kinda unrelated :o
21:00:45 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14766: Fix c2d4098afa: Unconfigured badge classes should be visible by default. https://github.com/OpenTTD/OpenTTD/pull/14766
21:03:54 *** toktik has quit IRC (Remote host closed the connection)
21:04:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14768: Fix 394adb654e: Incorrect spacing for badges in dropdown lists. https://github.com/OpenTTD/OpenTTD/pull/14768
21:05:25 *** Borg has quit IRC (Quit: leaving)
21:05:46 *** toktik has joined #openttd
21:10:00 <peter1138> Those 14766 is required for 14768 to not crash, I guess.
21:10:05 <peter1138> -Those+Though
21:16:15 *** Zathras_4 has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
21:18:33 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic updated pull request #14743: Feature: Configurable sign text colors in scenario editor. https://github.com/OpenTTD/OpenTTD/pull/14743
21:19:58 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic commented on pull request #14743: Feature: Configurable sign text colors in scenario editor. https://github.com/OpenTTD/OpenTTD/pull/14743#issuecomment-3513938349
21:20:33 <DorpsGek> [OpenTTD/OpenTTD] michicc approved pull request #14766: Fix c2d4098afa: Unconfigured badge classes should be visible by default. https://github.com/OpenTTD/OpenTTD/pull/14766#pullrequestreview-3445197297
21:20:50 <DorpsGek> [OpenTTD/OpenTTD] michicc approved pull request #14768: Fix 394adb654e: Incorrect spacing for badges in dropdown lists. https://github.com/OpenTTD/OpenTTD/pull/14768#pullrequestreview-3445198151
21:34:27 *** toktik is now known as Guest30893
21:34:33 *** toktik has joined #openttd
21:41:06 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14766: Fix c2d4098afa: Unconfigured badge classes should be visible by default. https://github.com/OpenTTD/OpenTTD/pull/14766
21:42:01 *** Guest30893 has quit IRC (Ping timeout: 480 seconds)
21:43:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14768: Fix 394adb654e: Incorrect spacing for badges in dropdown lists. https://github.com/OpenTTD/OpenTTD/pull/14768
21:44:21 *** toktik is now known as Guest30894
21:44:28 *** toktik has joined #openttd
21:48:03 *** toktik has quit IRC ()
21:48:14 *** toktik has joined #openttd
21:49:54 *** toktik is now known as Guest30895
21:50:01 *** toktik has joined #openttd
21:51:42 *** Guest30894 has quit IRC (Ping timeout: 480 seconds)
21:52:57 *** keoz has joined #openttd
21:55:41 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:57:11 *** Guest30895 has quit IRC (Ping timeout: 480 seconds)
21:59:06 *** kuka_lie has quit IRC (Ping timeout: 480 seconds)
22:24:32 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:39:00 *** keoz has quit IRC (Ping timeout: 480 seconds)
22:40:17 *** toktik has quit IRC ()
22:41:50 *** toktik has joined #openttd
22:43:00 *** toktik is now known as Guest30897
22:43:07 *** toktik has joined #openttd
22:44:11 <xarick> I made a thing, but not sure I did it well
22:44:11 <xarick> <https://github.com/OpenTTD/OpenTTD/commit/49fb389b3ac6bc6bddb8a11b9707890a81460dbd>
22:46:58 *** Guest30897 has quit IRC (Remote host closed the connection)
23:07:38 <_glx_> scripts can already read the setting via `[AI|GS]GameSettings.GetValue("script.script_max_opcode_till_suspend")` and only the player must change it
23:08:32 <_glx_> limit would be useless if scripts are allowed to touch it
23:49:51 *** Beer has quit IRC (Quit: Leaving)