Time  Nick           Message
11:46 mtvisitor      !up wunderwelt.one:30000
11:46 MinetestBot    wunderwelt.one:30000 is up (12ms) (IPv4)
11:46 mtvisitor      !up joesworld.zapto.org:30001
11:46 MinetestBot    joesworld.zapto.org:30001 seems to be down (IPv6)
12:31 lissobone      Thank goodness, I can now join...
12:36 dumpster_lord  Hi, I'm writing a city generator for my game using sfan5's new `minetest.register_mapgen_script` thing and I'd like to know if there's a way to pass data into that mapgen environment
12:37 dumpster_lord  the problem is I want my city mapgen to be moddable (users could define their own buildings, etc.) and the environment's isolation makes it quite hard because I can't access globals or read files
12:38 dumpster_lord  one solution I considered was passing data in VoxelManip data but sounds like a hack
12:38 lissobone      I am now, too, interested in this new procedure
12:38 lissobone      I want to know what does it accept as arguments
12:39 dumpster_lord  minetest.register_mapgen_script(path)
12:40 dumpster_lord  example: minetest.register_mapgen_script(mod_path.."/mapgen.lua")
12:40 lissobone      And "path" refers to a file containing some script?
12:41 lissobone      Something is sparking in my head, but cables do not connect, I need to know more in order to devise a solution
12:41 lissobone      I will test it
12:41 dumpster_lord  here's the original example: https://gist.github.com/sfan5/1a124eb496a39734f53fb4daffc47bee
12:42 dumpster_lord  I have a kind of working example in my game:
12:42 dumpster_lord  the init.lua file (mapgen script registered at the bottom): https://codeberg.org/lord_of_the_dumpster/perfect_city/src/branch/wip-roadgen/mods/pcity_mapgen/init.lua
12:42 dumpster_lord  and here actual mapgen: https://codeberg.org/lord_of_the_dumpster/perfect_city/src/branch/wip-roadgen/mods/pcity_mapgen/mapgen.lua
12:43 dumpster_lord  Steps to follow are: 1. register a mapgen script with minetest.register_mapgen_script(mod_path.."/foo.lua")
12:44 dumpster_lord  2. in the foo.lua make a mapgen function that accepts args: local function mapgen(vm, pos_min, pos_max, blockseed)
12:44 lissobone      I am reading, don't worry, I did not vanish'
12:44 lissobone      Without the trailing apostrophie!
12:45 dumpster_lord  3. at the bottom of foo.lua start the function minetest.register_on_generated(mapgen)
12:45 dumpster_lord  And that's it
12:45 dumpster_lord  you can use the vm object now
12:46 sfan5          dumpster_lord: the current best way to do one-way data transfer is to serialize data, write it a file in the world folder and do the reverse in the mapgen script
12:47 sfan5          (https://github.com/minetest/minetest/issues/14451)
12:47 dumpster_lord  sounds illegal but solves my problem, thanks :)
13:51 shaft          Can someone quickly review and merge my ts_furniture pull request? https://github.com/minetest-mods/ts_furniture/pull/20 Really trivil. Just fixes the camera and stops people from sitting on air.
13:52 shaft          It's been annoying me for a looong time now.
15:02 sfan5          just did
15:55 shaft          Okay I applied the suggestions
15:55 shaft          pls merge
18:02 BuckarooBanzai regarding #14451: would something like the mod-storage as common ground for async- and sync environment be "easy" to implement?
18:02 ShadowBot      https://github.com/minetest/minetest/issues/14451 -- Allow passing arbitrary data to mapgen Lua env (also at runtime)
18:07 sfan5          the mod storage is 1. not thread safe currently 2. forces all writes and reads to go to disk/database
18:52 MTDiscord      <mistere_123> how hard would it be to implement a mod sql interface, where each mod gets its own database file, and the interface is asynchronous (so you can submit requests and get responses later without blocking the main thread?  Would it be enough to include luasqlite on the async environment and restrict its access to the world and moddata folders?  It would help mods like sban not need to be  unsandboxed
18:54 MTDiscord      <mistere_123> Should I make an issue?
18:54 sfan5          it's just lua bindings for sqlite, not very hard
18:55 sfan5          however aside from permanently marrying the engine to sqlite this request sounds like "we use this external library in a mod and it's convenient, can you please copy it into the engine?"
18:55 MTDiscord      <wsor4035> dont make an issue
18:55 MTDiscord      <wsor4035> there is on already iirc
18:56 MTDiscord      <wsor4035> (assuming i recall correctly anyways)
18:56 sfan5          the hard part might be sandboxing sqlite, in case it has support for e.g. 'INTO OUTFILE'
18:56 sfan5          also I don't think sqlite is written to be secure against an attacker who can execute arbitrary SQL(?)
18:57 MTDiscord      <wsor4035> see https://github.com/minetest/minetest/issues/3374
18:57 MTDiscord      <wsor4035> also https://github.com/minetest/minetest/issues/10371 which is duplicate but has a few other thoughts
18:59 MTDiscord      <wsor4035> the tldr from the is the main two issues are security and if it should be db agnostic
19:00 MTDiscord      <wsor4035> *....tldr of blockers from....
19:04 MTDiscord      <wsor4035> personally commenting on the db agnostic thing, we already do have an issue with mods hard depending on luajit over stock lua in some cases, most notably relating to goto. there is common sql that you can write that would work across different backends, but it seems much easier that lua<>luajit to get yourself into a situation of hard depending on one sql backend
19:06 MTDiscord      <wsor4035> as for the security thing, could make it similar to the http api, where a mod has to be given permission to it? however in general that permission could probably be made much more ui/ux friendly
19:14 MTDiscord      <mistere_123> Well, I dont care about whether it is sqlite, sfan5. Its not just a request to copy a library into the engine. It's that I have a usecase that I am developing where I need to use a full database solution. Currently the only option I am aware of is using luasqlite as a secure.trusted_mods mod.  Aside from my present usecase, having full access to a full database seems like a generally useful feature. An imaginary usecase would be a lua
19:14 MTDiscord      mapgen mod that uses the async environment and the dummy backend to implement its own map storage system, so it could run water simulations in the background on the entire map, for example.
19:16 MTDiscord      <mistere_123> I guess I could use HTTP
19:22 Mantar         no so imaginary: our mapchunk shepherd basically runs water simulation on the entire map, but unfortunately it's not in the background
22:07 MinetestBot    02[git] 04OgelGames -> 03minetest/minetest: Hide internal detached inventory functions (#14594) 13a7bde8e https://github.com/minetest/minetest/commit/a7bde8e5237b28ff478e5585090620c670a8268e (152024-04-27T22:07:45Z)
22:12 MinetestBot    02[git] 04appgurueu -> 03minetest/minetest: Fix set_fov-induced grayscreen 130837d67 https://github.com/minetest/minetest/commit/0837d674ebb098cb28e2573f36fd991e14bf2b3c (152024-04-27T22:12:15Z)
22:14 MinetestBot    02[git] 04srifqi -> 03minetest/minetest: Translation updater: Add comment propagation (#14416) 13815b5cb https://github.com/minetest/minetest/commit/815b5cb0867c2011be7031b74331b99de94326e4 (152024-04-27T22:12:30Z)
22:14 MinetestBot    02[git] 04OgelGames -> 03minetest/minetest: Fix `InvRef` bugs and add unit tests (#14591) 1305d5dc4 https://github.com/minetest/minetest/commit/05d5dc4cec37a64d01f1535c8e494a2a4a7e7036 (152024-04-27T22:13:44Z)
22:14 MinetestBot    02[git] 04grorp -> 03minetest/minetest: Smooth scrolling (#14562) 1373dbd2f https://github.com/minetest/minetest/commit/73dbd2f0abcc6528073af2790373878cfbaad756 (152024-04-27T22:14:31Z)
22:25 MinetestBot    02[git] 04sfan5 -> 03minetest/minetest: Revert "Clean up some getServer() unsafety" 13df4c9e2 https://github.com/minetest/minetest/commit/df4c9e29034ed77c991d25af1891cd63e7518365 (152024-04-27T22:24:22Z)