Minetest logo

IRC log for #minetest, 2023-10-19

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:33 Trifton joined #minetest
00:36 Trifton joined #minetest
00:40 Trifton joined #minetest
00:46 Trifton joined #minetest
01:16 smk joined #minetest
02:28 Trifton joined #minetest
03:11 Lunatrius joined #minetest
04:00 MTDiscord joined #minetest
04:11 liceDibrarian joined #minetest
04:45 lissobone hi im back from the refrigerator
04:47 muurkha how was it?
05:48 lissobone forgot my traffic card at home and was 10 minutes late, but everyone was yet jubilant to see me again
05:50 s20 joined #minetest
05:50 lissobone On the way to the fridge it was very hot in the bus: I had to open 2 windows on both sides for wind to go through.  However, a caveat awaited me: upon accelerating after resting for a little while, the water from the rooftop rushed down, even flowing into open windows in great volumes.
05:51 lissobone I wrote it as if the water was accelerating.
05:51 lissobone It was, though, with the bus.
05:51 lissobone It was but resisting the accelerating force (like everything else in the world).
05:53 vampirefrog joined #minetest
06:15 YuGiOhJCJ joined #minetest
06:17 calcul0n_ joined #minetest
07:02 vampirefrog joined #minetest
07:10 calcul0n joined #minetest
07:36 mrkubax10 joined #minetest
07:55 TomTom joined #minetest
07:58 xBarkDog joined #minetest
10:47 Sobinec joined #minetest
11:14 s20_ joined #minetest
11:30 definitelya joined #minetest
12:17 Sobinec joined #minetest
12:21 Oblomov joined #minetest
12:41 Zambyte joined #minetest
13:01 jaca122 joined #minetest
13:29 Izaya joined #minetest
16:04 imi joined #minetest
16:15 Yonle joined #minetest
16:51 jaca122 joined #minetest
16:55 srifqi joined #minetest
16:56 appguru joined #minetest
16:59 sparky4 joined #minetest
17:04 cow321 joined #minetest
17:05 Talkless joined #minetest
17:07 srifqi1 joined #minetest
17:18 fluxionary joined #minetest
17:24 ___nick___ joined #minetest
17:26 ___nick___ joined #minetest
17:34 copygirl So hey, NodeCore is made of a couple different mods. Its API defines a function I would like to override, that itself returns a function. Overriding it late doesn'
17:35 copygirl doesn't help since they already have been called.
17:35 mrkubax10 joined #minetest
17:35 copygirl Is there any way to replace this function before the other mods get to call it? Sort of like the opposite of defining a "depends" in the mod.conf, perhaps?
17:36 jonadab If what they've got is effectively a lexical closure, you may not have an easy time overriding it.
17:37 jonadab Better to override the function that returns the closure, _before_ they call it and get the closure.
17:37 jonadab But the only way I can easily think of to guarantee that in MT, is to make the mods in question (optionally) depend on yours.
17:38 jonadab (The mods that call the function and get the closure and later call it; not the one that supplies it.)
17:38 copygirl Yeah that's what I'm trying to do, the question is how.
17:39 jonadab How to make another mod optionally depend on yours?  You edit said other mod's dependency list.
17:39 copygirl That can't be done programmatically though, right?
17:39 jonadab I don't know of any way to do it from within YOUR mjod.
17:39 jonadab *mod
17:39 MTDiscord <warr1024> When I run into situations like this (e.g. trying to override LGPL builtin stuff) I basically end up cleanrooming shit.
17:40 jonadab Another option would be to fork NodeCore.
17:40 erle or nicely ask Warr1024 for a nodecore dependency injection framework
17:40 erle (okay i am joking, but only a bit)
17:40 MTDiscord <warr1024> forking the game doesn't make your mod able to run on that game
17:40 copygirl The functionality to override is not particularly big, but it is annoying as hell to just copy-paste code, rather than to do the simple thing that would be ... more ideal.
17:41 MTDiscord <warr1024> A generalized DI framework, I'm probably not gonna do, but I could probably think of a way to make this thing modifiable from the outside.
17:41 erle one thing that i did was *steal* code from other mods, if they defined it somewhere as a node dig thing or so
17:41 erle then maybe copygirl should spell out what it is exactly
17:41 erle so that Warr1024 can get to figuring it out
17:42 MTDiscord <warr1024> Stealing should be pretty easy here.  The code in question is MIT, so licensing obstacles are less of an issue...
17:42 copygirl Like, hooking into that specific function would solve my problem, and even give me the parameters passed to it, allowing me to build my lookup table of valid orientations without providing them or a way to calculate them myself. (This is replacing the rotation functionality in NodeCore.)
17:42 jonadab A reverse-optional-dependency (if our mod and mod X are both being loaded, load our mod first) would theoretically solve this, but.
17:42 MTDiscord <warr1024> I could try breaking apart the "determine the rotation cycle" part from the "wrap it in an on_rightclick handler" part, probably.
17:43 MTDiscord <warr1024> Heh, reverse dependencies and such would be a really cool feature for MT to support.
17:43 jonadab Maybe, but I'd worry that it would break some people's brains.
17:44 jonadab People aren't used to thinking in that direction.  Though it's not as bad as COME FROM
17:44 erle or maybe
17:44 erle Warr1024 what if the rotation tables are specified in node definitions
17:44 erle or in some other easy to access place
17:44 erle separation of concerns
17:44 erle no DI necessary
17:45 MTDiscord <warr1024> oh, that's not a bad notion
17:45 copygirl erle: It's arguably code so short it can't even be copyrightable, I'm not worried about that, but it's "not right", if you understand. There's a way to get what I want, (except there isn't,) but I have to just re-create the on-rightclick handlers for these nodes on my end for each of the nodes I wanna support? Hurts my programmer brain.
17:45 erle which is why i just made a suggestion
17:45 erle and now it's up to you two to figure out if it is appropriate
17:45 erle because i am only rotating stuff with screwdrivers anyway
17:45 copygirl Rotation table itself is not the problem. There's a node in NodeCore that can be rotated but then also turn into another code.
17:46 copygirl I only need to override the rotation functionality.
17:46 erle so is there a way to statically represent what you want at all?
17:46 copygirl I'm not super happy with a patch to NodeCore (if warr wants to consider that) because if my mod were to be used with an older version it wouldn't work.
17:46 copygirl erle: Sorry, please explain?
17:50 copygirl For context, here is the function I want to override: https://gitlab.com/sztest/nodecore/-/blob/master/mods/nc_api/util_misc.lua#L318
17:50 copygirl And this is an example of it being used: https://gitlab.com/sztest/nodecore/-/blob/master/mods/nc_doors/register.lua?ref_type=heads#L38
17:51 erle copygirl is there a data structure that contains all the information you need for your use case that Warr1024 could put in a node definition and then both of your functions use that structure?
17:51 erle and don't come at me with ”all data structures in lua are tables” lol
17:51 copygirl I still need to override the rotation logic, ideally without touching the rest of the rightclick function, which I could only do if I could override the node_spin_filtered function.
17:52 copygirl But since it returns a closure, the only way to do it would be to run after NC's API mod, but before the other mods call it.
17:55 copygirl I already re-create the information without too much trouble, but now I realize I need to recreate the rest of the on-rightclick functionality, which I accidentally got rid of.
17:55 copygirl https://git.mcft.net/copygirl/nc_extended_rotating/src/commit/b0fc98b841bebceaaee3d8cbfbcad38333ea1a6f/registry.lua#L58-L63
18:02 erle maybe that function should just be stored separately in the node def?
18:02 erle so that you could separately override it?
18:02 erle Warr1024 what do you think of that
18:08 copygirl There's a function that's called *after* a node is spun.
18:09 copygirl So if I wanted to I could hook into that and do another `swap_node` call.
18:09 muurkha all data structures in lua are tables
18:10 MTDiscord <luatic> for the most part yes, though userdata, closures and coroutines are def. also worth mentioning
18:12 erle muurkha i have a question and you are a smart person. my RLE encoded TGA images differ by a few bytes if encoded bottom-top or top-bottom. could there be a good reason why an RLE encoder would not have the same length of output for a reversed string? i see none so far
18:12 erle i have three slightly-different RLE functions anyway, so i should *probably* refactor this
18:13 muurkha luatic: I wasn't being serious
18:13 erle for example, at least the A1R5G5B5 function is suboptimal because it makes the choice regarding run-length *before* it actually reduces the bit depth (which is not optimal)
18:13 muurkha erle: you're not reversing the pixels but the lines
18:14 muurkha so if the end of one line is the same as the start of another, it will be more RLE-compressible
18:14 muurkha am not smart person tho, am muurkha
18:14 erle if i have three lines AAA ABB BCC then the reversal of the lines is BCC ABB AAA and i see now
18:14 erle thank you
18:14 muurkha hhappy to hhelo
18:15 muurkha helop
18:15 muurkha ugh
18:15 copygirl The important thing is you tried.
18:16 muurkha effort is proportional to the derivative of skill?
18:35 muurkha more important question to me is why use RLE at all; how about whitening the input with Paeth or differencing and entropy-coding the, uh, residuals?
18:36 erle muurkha i am still only trying to improve a TGA encoder, not anything else.
18:37 erle when i am done with that i may start figuring out what other (more complex) image format parsers explode if you look at them funny
18:45 muurkha does TGA support RLE?
18:45 muurkha I thought the appeal of TGA was that it didn't support compression
18:46 muurkha but did support TrueColor
18:48 mazes_83 joined #minetest
18:48 erle muurkha TGA has different types: type 1 (palette), type 2 (raw), type 3 (grayscale), type 10 (RLE)
18:49 erle i mean there is more
18:49 erle but that's what minetest can do
18:49 erle or irrlicht for that matter.
18:49 erle most game engines support only type 2 24bpp (RGB) or type 2 32bpp (RGBA)
18:49 erle consuming *that* is super easy obv
19:40 Thelie joined #minetest
20:01 MTDiscord <mistere_123> New Minetest Blog post: https://blog.minetest.net/2023/10/17/AugustSeptember/  Thanks to GreenXenith for this month's post!
20:02 MTDiscord <mistere_123> has the matterbridge relay been banned here again? Messages are relayed from dev-irc, but not here
20:03 MTDiscord <mistere_123> *to matrix, I mean
20:22 witsie joined #minetest
20:39 dibesfer joined #minetest
20:43 dibesfer joined #minetest
20:44 dibesfer joined #minetest
21:01 witsie joined #minetest
21:25 liceDibrarian joined #minetest
21:26 kamdard_ joined #minetest
22:33 panwolfram joined #minetest
22:55 witsie joined #minetest
23:28 sparky4 joined #minetest
23:32 Dacmot joined #minetest
23:34 Dacmot Hi. I'm trying to hunt down a bug I'm having with a mod, and I'd like to try it with minetest 5.6.1 instead of 5.7. Is there an archive of old versions?
23:35 MTDiscord <wsor4035> grab builds from github ci?
23:35 Dacmot The only place I found older versions was on the Ubuntu PPA, but it only has 5.5.1 and 5.4.1.
23:37 Dacmot Good point. I'll try to build it (no linux builds)
23:37 Dacmot thanks
23:43 Dacmot Is there a reason why Irrlicht isn't a submodule in the main minetest repository?
23:43 MTDiscord <wsor4035> because that makes to much sense
23:44 Dacmot :S
23:44 MTDiscord <wsor4035> there is the submodules at home ™️ solution where you can grab the version from
23:45 Dacmot I can make my own. Just annoying.
23:47 MTDiscord <wsor4035> the file is at https://github.com/minetest/minetest/blob/master/misc/irrlichtmt_tag.txt
23:50 Dacmot Ok good to know. Though cmake complained with the right version needed.

| Channels | #minetest index | Today | | Google Search | Plaintext