Luanti logo

IRC log for #luanti-docs, 2026-01-13

| Channels | #luanti-docs index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
03:15 user333_ joined #luanti-docs
03:22 user333_ joined #luanti-docs
03:25 user333_ joined #luanti-docs
03:27 user333_ joined #luanti-docs
05:00 MTDiscord joined #luanti-docs
05:50 rubenwardy joined #luanti-docs
12:19 mrcheese joined #luanti-docs
13:05 mrcheese joined #luanti-docs
15:52 Desour joined #luanti-docs
19:57 MTDiscord <exe_virus> Okay that was exhausting, but I have a stab at a formal proposal for a format for the GitHub issue. Biggest things jumping out at me, is how to specify types well/good. I did try, but even what I made just now isn't consistent, probably should only allow a type to ever have one set of nested things, i.e. a table can define it's types, but only that first level, and the rest has to be define in a different type.     Otherwise I think
19:57 MTDiscord the rest is straightforward.
23:22 MTDiscord <a.corp.serot> some quick comments: - i suggest Table=List(...) e.g. for recipe matrix Table=List(List(ItemString)) or just create a Matrix(A) parameterized type if you wish to reduce nesting. - if i'm understanding the syntax right, the = acts more like a type narrower, right? also, any "small" amount of type expressions will become "deep". a small thing like (number|string)[] is a lua table narrowed as a list with element type variants number
23:22 MTDiscord or string. -> as a lua table machine output: { type = {lua = 'table', narrow = { list = { variants = {'number', 'string'} } } } } (this example is flawed; unable to distinguish types and value constants like "shaped") - You did not define List and Pair in your Types section. They are parameterized types meaning that you should specify its parameters. this need to be visible in the machine output. well, that is if you really want to define basic
23:22 MTDiscord types like Integer, Function, Matrix etc. - structs should not have "parameters", they are fields. i also think that the Crafting Recipe type should clearly indicate that it is a struct that the developer defines its contents, unlike classes where such thing is unusual/unexpected. - you skipped over how core.register_globalstep(func(dtime)) would look like in the machine output.
23:25 MTDiscord <a.corp.serot> (number|string)[] into your less sugary syntax would be List(Variant(Number, String)), so it's not really super different
23:49 mrcheese joined #luanti-docs

| Channels | #luanti-docs index | Today | | Google Search | Plaintext