Minetest logo

IRC log for #minetest-dev, 2018-04-05

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

All times shown according to UTC.

Time Nick Message
00:49 celeron55_ joined #minetest-dev
00:50 ThomasMonroe_ joined #minetest-dev
00:58 lisac joined #minetest-dev
02:44 AndroBuilder_ joined #minetest-dev
02:51 longerstaff13-m joined #minetest-dev
03:10 AntumD joined #minetest-dev
03:13 AntumD joined #minetest-dev
03:14 AntumD joined #minetest-dev
03:16 Antum joined #minetest-dev
03:57 ssieb joined #minetest-dev
07:04 Gael-de-Sailly joined #minetest-dev
07:18 Fritigern joined #minetest-dev
07:27 Fritigern joined #minetest-dev
07:46 MarisaG joined #minetest-dev
08:15 MarisaG_ joined #minetest-dev
08:15 nyuszika7h joined #minetest-dev
08:16 indiana joined #minetest-dev
08:17 exio4 joined #minetest-dev
08:25 behalebabo joined #minetest-dev
08:25 Foz joined #minetest-dev
08:28 indiana joined #minetest-dev
08:28 longerstaff13 joined #minetest-dev
08:28 longerstaff13 joined #minetest-dev
08:34 warr[m] joined #minetest-dev
08:59 Krock joined #minetest-dev
09:35 rubenwardy #7202
09:36 ShadowBot https://github.com/minetest/minetest/issues/7202 -- Add player:get_meta(), deprecate player attributes by rubenwardy
09:36 nerzhul pool ungeneric player attributes :)
09:38 nerzhul rubenwardy, as you removed my backend, are those meta migarted ?
09:38 rubenwardy yes
09:39 rubenwardy it does m_meta.setString instead of setPlayerAttribute
09:39 nerzhul you wrote automagically imported, how ?
09:39 rubenwardy https://github.com/minetest/minetest/pull/7202/files#diff-989a983e9226307c290b9e43a45a9dfeR521
09:40 nerzhul i added some comments, if you can add an integration test in minimal
09:40 rubenwardy as far as testing, I've loaded a world which used player attributes and it retained the data
09:40 rubenwardy I would like to add integration tests however
09:40 nerzhul oh right, you keep the backend storage
09:41 nerzhul if i remember set_player_attribute is somewhere in minimal :)
09:43 rubenwardy what happens if you get a pointer from a reference?
09:44 nerzhul example ?
09:44 rubenwardy cool, nvm
09:44 rubenwardy int a; foo(a);           void foo(int &a) {  int *b = &a; }
09:45 rubenwardy SO says it works as a pointer to the original
09:45 nerzhul it will work until a is removed from stack and it will crash
09:45 proller joined #minetest-dev
09:45 nerzhul (if a was on stack and not heap)
09:46 nerzhul it's very ugly. It's good to keep stack with stack and heap with heap :)
09:47 rubenwardy see my question in the OP
09:47 nerzhul OP ?
09:47 rubenwardy basically, I'm wondering what to do with PlayerMetaRef for future proofing
09:47 rubenwardy opening post
09:47 rubenwardy as in the future we may want to pass in a meta object for an offline player
09:47 rubenwardy so we need to reference count and unload when no PlayerDataRefs point at it any more
09:47 nerzhul i see
09:48 rubenwardy it should probably get the meta from somewhere else than SAO in that case
09:48 nerzhul you should not remove it from lua
09:48 rubenwardy like, one function offline or not
09:48 nerzhul it's PlayerSAO responsibility
09:48 rubenwardy ?
09:48 nerzhul your problem is the meta removal when metaref is gc ?
09:48 nerzhul (core side i mean)
09:48 rubenwardy yeah, to stop memory leaks
09:49 nerzhul remove all lua related stuff on GC, but not the PlayerMeta
09:49 nerzhul which is owned by player sao
09:49 rubenwardy in the future I'd like to add        minetest.get_meta({ type = "player", name = "celeron44" })    is what I'd like to add
09:49 nerzhul it will be reclaimed when SAO will be removed
09:49 rubenwardy no, it won't be in that case ^
09:49 rubenwardy as there won't be a SAO
09:49 rubenwardy this is for a future PR
09:49 rubenwardy celeron44 may not be online
09:50 nerzhul then if not loaded, query the db
09:50 nerzhul and keep offline meta somewhere
09:50 rubenwardy actually
09:50 rubenwardy I guess the PlayerMetaRef should own the meta in that case
09:50 rubenwardy and just notify and changes
09:50 rubenwardy *any
09:50 nerzhul (in the Lua heap + GC it sounds reasonable)
09:51 rubenwardy cool
09:51 nerzhul one of our problem is our core objects are decoupled from lua objects
09:51 rubenwardy there's just the issue that it would do a database update everytime something changes
09:51 nerzhul Lua heap + GC for offline usage, but there is some refactor
09:51 rubenwardy so there should be some buffer somewhere maybe
09:51 rubenwardy or just not worry about that
09:51 rubenwardy yeah
09:51 nerzhul yes, and it can be expensive. Currently it's done by the player SAO save timer
09:51 rubenwardy writes shouldn't be too frequent when the player is offline
09:52 nerzhul it depend on the manipulation of the mod :)
09:52 rubenwardy would be good to have a buffer anyway
09:53 rubenwardy this calls for a shared PTR for me, to remove the need to copy to core every time something changes to put in a buffer ready to be saved next tick
09:53 proller joined #minetest-dev
09:54 nerzhul you can use a shared_ptr then, share if between meta ref and player, but remember you will keep the meta in lua memory without linkback to core save in that case
09:54 nerzhul because save is managed on SAO :)
09:54 rubenwardy yeah
09:55 rubenwardy future PR though
09:56 nerzhul i should ocntinue CSM mod sending PR... i just get time to rebase it yesterday
09:56 nerzhul and i hope during my devel time i will not find more things to fix for this PR :p
10:04 rubenwardy lol, found a bug
10:04 rubenwardy you never unset the modified state of player attributes
10:04 rubenwardy so it would cause players to be saved everytime
10:04 nerzhul arf :)
10:07 rubenwardy could be the cause of #6608
10:07 ShadowBot https://github.com/minetest/minetest/issues/6608 -- Slow players.sqlite due to many players.sqlite-journal creations
10:07 rubenwardy do we still load all players into memory?
10:07 rubenwardy or just online ones
10:07 rubenwardy (please say the latter)
10:09 rubenwardy really wish Minetest uses Sol2
10:09 rubenwardy *used
10:09 rubenwardy it makes the Lua API so much nicer
10:09 rubenwardy static functions suck
10:11 nerzhul just online
10:11 nerzhul (hopefully)
10:12 nerzhul sol2 ?
10:12 Fixer joined #minetest-dev
10:12 nerzhul i think we can refactor our lua stack. On a side project i have more nicer Lua implementations, lighter implemenations :)
10:12 rubenwardy maybe using Sol2 is goind too far
10:13 rubenwardy but it would be nice to add some magic to allow using instance methods
10:13 rubenwardy and automatically getting the object
10:13 rubenwardy not sure how Sol2 does that
10:13 rubenwardy you add clases to Lua at **runtime** in sol2
10:14 rubenwardy so it doesn't use any compiler magic it seems
10:14 nerzhul it's difficult to make minetest better as some things are very monolithic but i hope on each release we can make things move :)
10:14 rubenwardy you do need to list the methods to expose
10:14 rubenwardy yeah
10:17 nerzhul maybe i should backport one class to MT to use C++ templates to read and write structures properly, it should be nicer cod
10:17 nerzhul https://gitlab.com/WinterWind/WinterWind/blob/master/src/lua/luahelper.cpp
10:24 rubenwardy nerzhul: tests added
10:24 rubenwardy nerzhul: which was good, because I forgot this: https://github.com/minetest/minetest/pull/7202/files#diff-f09c82748458a8b3fd8fd9762a8723a8R103
10:24 rubenwardy originally
10:33 rubenwardy new issue: #7203
10:33 ShadowBot https://github.com/minetest/minetest/issues/7203 -- Store weak pointers to things in Lua references and crash gracefully
10:34 longerstaff13-m joined #minetest-dev
10:35 proller joined #minetest-dev
10:35 nerzhul sync issue between lua state and core, yes, our problem of decouples stacks
10:36 longerstaff13-m joined #minetest-dev
10:39 celeron55_ i used luabind's non-boost port in buildat, it was fairly enjoyable
10:39 celeron55_ luabind-deboostified it's called
10:40 rubenwardy is luabind the old one?
10:40 rubenwardy I tried that, but then rewrote the code into Sol2
10:40 rubenwardy I think I tried that
10:40 * rubenwardy chesk
10:40 rubenwardy ah no
10:40 rubenwardy I used LuaBridge
10:41 rubenwardy https://sol2.readthedocs.io/en/latest/benchmarks.html
10:42 rubenwardy sol2 is faster than luabind
10:42 rubenwardy but still slower than pure Lua, ofc
10:42 rubenwardy oddly it's faster than pure Lua at things like multiple returns
10:42 rubenwardy not sure how
10:44 rubenwardy here's my version of ObjectRef in my project: https://gist.github.com/rubenwardy/3ecb406a94980d7a71ff4e07107747a0
10:44 rubenwardy line 10 of the cpp includes the sol registration
10:45 rubenwardy given how important scripting is in Minetest, I don't think it's worth the small performance drop
10:45 celeron55 that's pretty much exactly what the usage of any modern C++ lua wrapper will look like
10:46 rubenwardy yeah
10:47 rubenwardy argh, travis takes so long
10:48 rubenwardy probably better to add a python API instead
10:48 * rubenwardy is joking
10:51 rubenwardy RE: licenses, if I make a new lua file using the standard skeleton, is it right to create celeron55 as the original author at the top?
10:51 rubenwardy I guess it is, as 80% of the file is just copy pasta
10:56 nerzhul rubenwardy python is slower than lua
10:57 rubenwardy It's more useful
10:57 rubenwardy Especially in education
10:58 rubenwardy Better to leave for a mod though, it's possible
11:08 celeron55 joined #minetest-dev
11:20 rubenwardy nerzhul: how do I disable lint for a section
11:20 rubenwardy it's obviously wrong
11:20 rubenwardy https://travis-ci.org/minetest/minetest/jobs/362558845#L611
11:21 celeron55 clang-format really is mind-bogglingly bad
11:21 H4mlet joined #minetest-dev
11:23 rubenwardy can we just remove it?
11:23 rubenwardy it really should be a separate check
11:24 rubenwardy which doesn't effect the state of the commit
11:24 rubenwardy just puts a warning in the thread (maybe with a comment) and a link to things that it suggests changing
11:25 rubenwardy like, warning rather than error
11:25 rubenwardy or alternatively it could be replaced or configured better
11:29 rubenwardy anyway, apart from that the PR is ready
11:35 Wuzzy joined #minetest-dev
11:48 rubenwardy #7204
11:48 ShadowBot https://github.com/minetest/minetest/issues/7204 -- Add more table helpers by rubenwardy
11:51 DI3HARD139 joined #minetest-dev
12:08 nerzhul rubenwardy: // clang-format off => // clang-format on
12:09 rubenwardy thanks
12:10 nerzhul i think having a travis bot which post interesting issues in the github post can be nice yes. clang-format is not as bad as some concurrents, it's just a finite state program and it doesn't have all cases. But at least it permit to do interesting thing on PR like review the feature/fixes instead of commenting all standard coding errors. it permits to earn many review time and let PR owners fix without our advice, except in some rare
12:10 nerzhul we never read warnings, else why do we got some issues for compilation warning whereas they were on some travis builds :)
12:11 nerzhul at least we should update clang-format to v6 (i don't succeed to compile with clang 6 on travis, only more recent ubuntu version and other linux distros)
12:14 rubenwardy should comment on the issue to alert of warnings
12:14 rubenwardy but shouldn't give an X
12:16 nerzhul i'm pretty sure we will loose some time, at least to develop and maintain the bot to read logs instead of just pushing errors, but anyway i tend to prefer to not comment myself on all coding errors or code style issues
12:16 rubenwardy no, automatically comment
12:17 rubenwardy although if a check is separate to a commit status
12:17 rubenwardy then you could just set it so it's a separate check without effecting the status of a commit
12:17 rubenwardy having this crappg linter is more damaging than good
12:29 Krock rubenwardy, by the way. you forgot ".com" in the files itemstackmetadata.*
12:30 rubenwardy Lol
12:39 srifqi joined #minetest-dev
13:05 Beton joined #minetest-dev
13:52 twoelk joined #minetest-dev
13:52 antims joined #minetest-dev
14:41 Gael-de-Sailly joined #minetest-dev
15:30 srifqi rubenwardy: I found the cause of the bug on weird virtual joystick behavior.
15:30 srifqi wrong type data :")
15:30 srifqi data type*
15:32 rubenwardy nice!
15:33 paramat joined #minetest-dev
16:13 paramat will merge #7192 in 5 mins
16:13 ShadowBot https://github.com/minetest/minetest/issues/7192 -- Biome API / cavegen: Add definable cave liquid for a biome by paramat
16:20 paramat merging ..
16:22 paramat done
16:24 SilverLuke joined #minetest-dev
16:25 cx384 joined #minetest-dev
16:28 celeron55 chatzilla... fedora core 21? that's so old it's cute
16:29 celeron55 entertaining quit messages
16:38 * twoelk had played with xul apps and the xulrunner quite a lot - gotta redo a bunch of inhouse intranet apps now
16:39 paramat i'm getting a warning in latest master on entering a world: "WARNING[Server]: Trying to update non-existent object: 0"
16:39 rubenwardy is that Core 2.1?
16:39 rubenwardy paramat: probably related to #7199
16:39 ShadowBot https://github.com/minetest/minetest/issues/7199 -- Bugs regarding objects
16:45 paramat ok will mention it in that
16:47 longerstaff13-m_ joined #minetest-dev
17:18 behalebabo joined #minetest-dev
17:27 paramat #7208 will merge later, trivial
17:27 ShadowBot https://github.com/minetest/minetest/issues/7208 -- Zoom adjustDist(): Improve variable name by paramat
17:39 proller joined #minetest-dev
18:00 ssieb joined #minetest-dev
18:19 Gael-de-Sailly joined #minetest-dev
18:55 paramat #7209 is fairly trivial, agreed with mapgen creator and tested. will merge in a few hours if no objections
18:55 ShadowBot https://github.com/minetest/minetest/issues/7209 -- Mgcarpathian: Remove insignificant 'base' noise variation by paramat
18:58 YuGiOhJCJ joined #minetest-dev
19:02 paramat merging #7208 in 5 mins
19:02 ShadowBot https://github.com/minetest/minetest/issues/7208 -- Zoom adjustDist(): Improve variable name by paramat
19:13 paramat merging
19:16 paramat done
19:19 proller joined #minetest-dev
19:24 proller joined #minetest-dev
19:57 proller joined #minetest-dev
20:30 paramat joined #minetest-dev
20:44 paramat merging #7209 in 5 mins
20:44 ShadowBot https://github.com/minetest/minetest/issues/7209 -- Mgcarpathian: Remove insignificant 'base' noise variation by paramat
20:51 paramat merging ..
20:53 paramat done
21:15 paramat rubenwardy everyone's neutral on this, could you add your opinion? game#2095 i'm tempted to just close it
21:15 ShadowBot https://github.com/minetest/minetest_game/issues/2095 -- Snowblock: propagate light like snow slab and ice by paramat
21:15 proller joined #minetest-dev
21:38 Gael-de-Sailly paramat: I've some questions about the potential mapgen presets feature
21:39 Gael-de-Sailly I originally wanted to create a GUI for creating/editing mapgen presets
21:40 Gael-de-Sailly but I'm wondering where the files could be stored
21:40 rubenwardy client, probably
21:40 rubenwardy if they're modifiable
21:40 rubenwardy builtin otherwise
21:40 Gael-de-Sailly yeah but I'm not sure it deserves a dedicated directory in the client dir
21:41 Gael-de-Sailly my idea was builtin for default ones, and a new dir for custom ones
21:43 Gael-de-Sailly (next to "mods", "clientmods", etc.)
21:43 twoelk will custom games or mods be able to use the GUI?
21:43 Gael-de-Sailly it would be on the mainmenu
21:44 Gael-de-Sailly on world creation
21:45 Gael-de-Sailly you're talking about Lua mapgens?
21:45 twoelk yeah
21:45 Gael-de-Sailly not trivial, because Lua mapgens are not considered as mapgens by the core
21:47 twoelk guess the lua mapgens would have to provide some sort of info which settings can be tweaked
21:48 twoelk and on worldcreation mt would have to check if any enabled mod offers such info
21:48 Gael-de-Sailly yes, I'll think about that
21:48 Gael-de-Sailly but it's not my first concern for now
21:49 paramat ugh not for lua mapgens
21:49 paramat lua mapgen mods can provide their own settings options code
21:49 twoelk hm tweakable mods in the main menu before worldcreation - sounds like fun ;-P
21:51 Gael-de-Sailly when will 0.5 be released?
21:53 paramat files for mapgen presets? seems like builtin is the place
21:53 * twoelk muses of being able to provide some coordinates for mt-meru from within mt just before world creation or even when starting an allready existing world
21:53 paramat not sure, months away
21:54 Gael-de-Sailly I heard about April 15 or like, but may be about something else
21:54 paramat twoelk that can and should be done by the mod itself, a mod can add settings to 'advanced settings'
21:55 paramat nooo april 15th is 0.4.17
21:55 Gael-de-Sailly ok
21:57 * twoelk needs to investigate which mods actually add to the advanced settings
21:57 paramat not many do
21:57 paramat MTG does
21:57 twoelk aand goodnight :-D
21:57 Gael-de-Sailly builtin is the place for mapgen presets, but if I want the user to be able to create/edit them, there must be in a new dir on client
21:58 twoelk left #minetest-dev
21:59 Gael-de-Sailly i guess the settingtypes file is particularly tedious to fill for modders, however can't be made simpler
22:14 paramat i don't see a need for users to create or edit the presets, they can configure mapgens already using mods
22:16 paramat settingtypes isn't tedious to use, it's simple, it's just a feature many don't know about or haven't discovered yet
22:17 rubenwardy It's not user friendly for stuff like map configs
22:18 rubenwardy People just want to have a slidder for water height, hilliness, resource scarcity and such
22:18 rubenwardy And not give a shit about noise
22:19 paramat yes i know, that's why this feature is such a good idea
22:21 paramat i was talking generally about settingtypes, not referring to noises, and in the context of settings for lua mapgens which is not what this feature is for
22:23 paramat wil test #7212 and if ok will merge later, trivial
22:23 ShadowBot https://github.com/minetest/minetest/issues/7212 -- Mgcarpathian: Fix spawn level calculation by paramat
22:24 Gael-de-Sailly I was answering to two separate discussions, maybe I was confusing
22:25 Gael-de-Sailly my project is not about usage of settingtypes by mods
22:32 paramat yes i know :]
22:45 paramat 7212 tests ok, will merge after travis
23:08 paramat merging 7212
23:11 paramat done, back to 80
23:12 [k00l]shamoanjac joined #minetest-dev
23:13 longerstaff13-m joined #minetest-dev
23:14 [k00l]shamoanjac why does ServerThread::run() return a nullptr?
23:14 srifqi left #minetest-dev
23:48 proller joined #minetest-dev

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