Luanti logo

IRC log for #luanti, 2025-04-12

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

All times shown according to UTC.

Time Nick Message
00:14 Verticen joined #luanti
00:18 v-rob joined #luanti
00:36 * mtvisitor reviewed the debug.txt file of the luanti game engine on his offline version.
00:37 mtvisitor https://content.luanti.org/packages/Calinou/moreblocks/
00:37 FileX joined #luanti
00:37 mtvisitor It breaks stairs and slabs once disabled - and there doesn't seem to be the will to fix it .
00:40 mtvisitor when uninstall some mod(s), there will be some unexpected error after re-login the game.
00:46 SFENCE joined #luanti
00:52 kamdard joined #luanti
01:59 _____ joined #luanti
02:02 lemonzest joined #luanti
02:34 kamdard joined #luanti
02:40 FileX joined #luanti
03:33 cheapie So a question came up elsewhere... someone built a church with some bells made of mese, and now we're wondering what a bell made of mese would sound like anyway
03:33 cheapie My guess is https://www.youtube.com/watch?v=X9qvR2ih8C0&t=6
03:37 FileX joined #luanti
04:00 MTDiscord joined #luanti
04:56 SFENCE joined #luanti
05:07 SFENCE joined #luanti
05:08 FileX joined #luanti
05:14 whosit should core.ipc_cas() work for table references? (currently ipc_get() will just return new table each time, even if stored table is unchanged)
05:18 whosit I do realize that it gets de-serialized each time, and each thread will have different values anyway... but if get() would return same reference per-thread, that would at least somewhat work?
05:22 Glaedr joined #luanti
05:22 whosit at the moment, to use CAS with a table, I have to provide a level of indirection, like: ipc_set(new_table_address, new_table); ipc_cas(table_pointer, old_table_address, new_table_address) ...
05:24 whosit it's a little bit weird, but works, I guess...
05:56 [MatrxMT] <y5nw> IIRC the serialization format in the IPC store is not related to the Lua environment at all; and I don't think IPC CAS is intended to be used with tables
05:57 [MatrxMT] <y5nw> although you could make it work by defining the __eq metamethod
06:02 [MatrxMT] <y5nw> IMO having ipc_get return the same reference for tables can become a footgun; if you (accidentally?) modify the table the values for the IPC store goes out of sync
06:05 whosit true...
06:06 whosit maybe IPC API should provide something like channels for sending messages to/from async threads - that's what I was trying to do when I froze my async by trying to CAS a table :p
06:13 whosit I did implement something like FIFO on top of IPC functions.. but it's horrible in every way, I feel
06:17 shinbeth joined #luanti
06:36 whosit I tried registering metatable and using __eq, and it does work.
06:38 shinbet joined #luanti
06:42 jaca122 joined #luanti
06:54 shinbet joined #luanti
07:21 SwissalpS joined #luanti
07:25 SFENCE joined #luanti
07:37 Verticen joined #luanti
08:12 SliverFlowCipher joined #luanti
08:30 sfan5 whosit: nothing in the ipc api works with references
08:32 sfan5 if you want to implement something like a channel on top of the ipc, having to use some indirection is to be expected
08:34 sfan5 I'm curious to know what your use case for channels looks like tho
08:59 whosit lots of different mods (areas, mail...) like to write complex and large json files to persist some state, as those grow, time for serialization and IO grows...
08:59 whosit ideally, all this stuff should use an sql database, but ... anyway
09:01 whosit I tried writing a mod that will provide a "json" object to a mod, and this json/table would transparently mirror the table on async thread; and async will do the (periodid or on demand) serialization and writes to disk
09:01 sfan5 so basically you needed a queue?
09:02 whosit yes
09:03 FileX joined #luanti
09:04 whosit async thread just waits for ipc_poll(task_count, timeout); then pops all update messages in a loop, and unsets the task count...
09:05 whosit and fifo is built on top of "perfix:task_XXX" keys...
09:05 whosit just having a queue would be much cleaner :p
09:06 sfan5 it sounds like you're blocking an async worker with your task. that's not supported.
09:06 whosit it's working though X)
09:07 sfan5 it will break async tasks for everyone else if the machine has a low enough core count
09:08 whosit whole idea is to keep the copy of the structure in async worker's memory, to avoid repeated serialization
09:08 whosit I know it's horrible, that why I dream of having proper sql one day :3
09:10 whosit creating and destroying async threads each time + not having real shared memory - makes them much less useful
09:14 whosit modern OS would not have problems with many threads that just sleeping and waiting for a message from queue...
09:15 sfan5 here's a secret: the async thread are permanent, it's just random which one your job gets assigned to
09:17 whosit my prototype can only spawn one, I set an IPC key to make sure
09:18 whosit and I call handle_async only once after the mod is loaded
09:19 whosit I can show the horrible monster I've made :p (if that will help preventing more monsters from appearing)
09:33 whosit anyway: https://github.com/yl-whosit/async_json
09:33 whosit I know it's wrong and broken in many ways :p
09:37 mrkubax10 joined #luanti
10:01 YuGiOhJCJ joined #luanti
10:21 mrkubax10 joined #luanti
10:27 SFENCE joined #luanti
10:36 MinetestBot [git] MoNTE48 -> luanti-org/minetest_game: Creative: release memory when player leaves c6fabe4 https://github.com/luanti-org/minetest_game/commit/c6fabe4734e4a39f7a398154161d39a6df7ad45f (2025-04-12T10:35:21Z)
11:05 SFENCE joined #luanti
11:18 Talkless joined #luanti
11:30 ireallyhateirc joined #luanti
11:42 FileX joined #luanti
12:05 silverwolf73828 joined #luanti
12:16 shinbeth joined #luanti
13:11 Talkless joined #luanti
13:25 shinbeth joined #luanti
13:27 shinbet joined #luanti
13:38 TheSilentLink joined #luanti
14:12 Talkless joined #luanti
16:00 Desour joined #luanti
17:20 ___nick___ joined #luanti
17:33 ireallyhateirc joined #luanti
18:18 SFENCE joined #luanti
18:21 Verticen joined #luanti
18:22 jemius joined #luanti
18:29 dabbill joined #luanti
18:50 Leopold joined #luanti
18:55 sinvet joined #luanti
19:24 ___nick___ joined #luanti
19:39 ___nick___ joined #luanti
19:42 ___nick___ joined #luanti
19:54 SFENCE joined #luanti
20:20 SFENCE joined #luanti
21:07 SFENCE joined #luanti
21:50 alpiquero joined #luanti
21:56 ireallyhateirc joined #luanti
22:10 Kimapr joined #luanti
22:34 panwolfram joined #luanti
22:52 ireallyhateirc2 joined #luanti
23:49 sys4_ joined #luanti

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