Minetest logo

IRC log for #minetest-hub, 2019-04-16

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

All times shown according to UTC.

Time Nick Message
00:02 kaeza joined #minetest-hub
00:38 kaeza punbb :D
01:51 kaeza joined #minetest-hub
02:02 ssieb joined #minetest-hub
02:14 Ruslan1 joined #minetest-hub
04:04 scr267 joined #minetest-hub
04:11 ShadowNinja joined #minetest-hub
04:15 BakerPrime joined #minetest-hub
04:16 VanessaE joined #minetest-hub
04:16 VanessaE joined #minetest-hub
04:16 VanessaE joined #minetest-hub
04:17 scr267 joined #minetest-hub
04:17 ShadowBot joined #minetest-hub
05:36 VanessaE joined #minetest-hub
05:36 VanessaE joined #minetest-hub
05:36 VanessaE joined #minetest-hub
06:32 CWz joined #minetest-hub
07:41 kaeza joined #minetest-hub
08:11 TommyTreasure joined #minetest-hub
08:11 TommyTreasure joined #minetest-hub
08:29 Megaf joined #minetest-hub
09:02 kaeza joined #minetest-hub
09:29 Rafi59 joined #minetest-hub
09:59 calcul0n_ joined #minetest-hub
10:06 kaeza joined #minetest-hub
10:07 CWz joined #minetest-hub
10:49 VanessaE so..
10:49 VanessaE since I'm on sqlite3 for the player backend.....
10:50 VanessaE I've since found a good workaround for the one reason I had to edit a player file (to manually reset a player's homedecor wardrobe skin)
10:50 VanessaE but, what if I need to examine, erase, or modify a player's inventory?
10:51 VanessaE what do I do in that case?  is there a good mod to manage such things?
10:55 ANAND VanessaE: https://sqlitebrowser.org/ ;)
10:56 ANAND Bc sqlite3 isn't exposed to our Lua API yet
11:10 VanessaE well
11:10 VanessaE I don't mean database-level access in-game
11:11 VanessaE more like if there's some mod that can say list the player's inventory, delete one or more items, using the usual API calls
11:11 VanessaE stuff like that
11:18 Fixer joined #minetest-hub
12:39 Calinou joined #minetest-hub
12:50 CWz joined #minetest-hub
12:52 scr267 joined #minetest-hub
12:54 CWz joined #minetest-hub
13:04 ANAND Ah ok
13:04 ANAND Thought you were talking about offline players :)
13:04 T^4im joined #minetest-hub
13:43 T4im joined #minetest-hub
14:03 IhrFussel joined #minetest-hub
14:04 IhrFussel Hi guys^^ -> modstorage:get_int(somename) ... if somename doesn't exist in the storage will it return "" or nil? I know it returns "" for strings at least
14:04 Ganome317 joined #minetest-hub
14:08 IhrFussel Or it could return '0' ... I don't find info on the behavior of the different storage methods
14:09 VanessaE that on'
14:09 VanessaE klfjdkjhjfhd
14:09 VanessaE that one's another good candidate for using a proper database backend, if it doesn't alreayd
14:09 VanessaE I have thousands of files created by that damned thing
14:10 IhrFussel VanessaE, do you know what get_int() returns in the case of 'non-existent'?
14:10 VanessaE idk
14:13 IhrFussel Or I wonder if I can set something via set_int() and later retrieve it via get_string()
14:17 ANAND get_int returns 0 if non-existent
14:18 ANAND get_string returns ""
14:18 IhrFussel So set_int(somename,0) deletes the value from the storage then?
14:19 ANAND Use set_string(somename, "") to delete a key
14:19 ANAND The docs only mention passing "" to delete a key
14:19 ANAND See https://github.com/minetest/minetest/blob/38b94f248ad2473b8c49e9832215071e8a79944f/doc/lua_api.txt#L5053
14:22 craigger joined #minetest-hub
14:24 craigger joined #minetest-hub
14:29 IhrFussel I hope modstorage is significantly faster than reading txt files with values
14:30 IhrFussel And thanks ANAND
14:32 ANAND Yw :)
14:34 VanessaE so what's the difference between modstorage and that annoying datastorage mod?
14:34 VanessaE does anything even use the latter anymore?
14:34 IhrFussel How do I loop through the whole mod storage? Is it just key,value in pairs(modstorage:to_table()) ?
14:36 ANAND IhrFussel: Since mod storage uses plain text files behind the scenes, you'll only get rid of the additional Lua->C++ overhead by using it, which might not have a noticeable increase in speed in most cases.
14:36 ANAND And yes, that's probably the best (and only) way to iterate over mod storage
14:43 aerozoic joined #minetest-hub
14:47 IhrFussel I thought the whole mod storage data stays in-memory the whole time and just gets flushed to the file on server map save interval
14:48 IhrFussel Like player attributes/player meta
15:09 IhrFussel I get 'attempt to compare number with nil' so something is not correct about 'for key, value in pairs(modstorage:to_table()) do if tonumber(value) > 100 then blah end end
15:12 rubenwardy value is not a number
15:12 rubenwardy ie: maybe it's something like "asnbas"
15:14 IhrFussel Then how do I get the number I store?
15:14 IhrFussel I store via set_string(playername,number)
15:14 rubenwardy you t
15:14 rubenwardy try doing print(value)
15:19 IhrFussel key is 'fields'
15:22 IhrFussel to_table() — returns nil or {fields = {...}, inventory = {list1 = {}, ...}}
15:22 IhrFussel Why so complicated?
15:24 bwarden joined #minetest-hub
15:25 bwarden joined #minetest-hub
15:25 IhrFussel HUH? fields = {  saya3561 = "328",
15:26 tenplus1 joined #minetest-hub
15:26 IhrFussel How do I iterate through every field 'table' now??
15:26 tenplus1 Hi folks :)
15:26 bwarden joined #minetest-hub
15:26 tenplus1 o/ bwarden
15:27 IhrFussel Hi tenplus1 ... can you help iterating through modstorage?
15:27 tenplus1 hi fussel, explain please ?
15:27 IhrFussel for key, value in pairs(modstore:to_table()) do print(key) end << key is just 'fields'
15:28 IhrFussel 'value' is nil
15:28 rubenwardy IhrFussel: because node meta data can contain both fields and inventories
15:28 tenplus1 hey ruben
15:28 IhrFussel Why did you not remove the node meta stuff from modstorage? That is useless
15:28 tenplus1 is something wrong with one of my mods ? what's with the modstorage
15:29 rubenwardy Mod storage uses the meta API
15:29 rubenwardy same as item meta, node meta, and player meta
15:29 rubenwardy it's consistent
15:30 tenplus1 o.O
15:30 IhrFussel I just need a way to loop through the whole modstorage data with 2 vars one for each player name and one for the value associated with the playername
15:30 rubenwardy for key, value in pairs(modstore:to_table().fields)
15:30 rubenwardy also, you should use player meta if the data isn't needed when the player is offline
15:31 IhrFussel It is needed at all times...part of a ranking system
15:31 rubenwardy also, be aware that :to_table() is much slower than       minetest.deserialize(meta:get("singlekey"))
15:32 rubenwardy with the only backend available
15:32 rubenwardy if an SQLite backend is added for mod storage, then using separate keys could be better
15:34 tenplus1 bbl
15:34 tenplus1 left #minetest-hub
15:34 IhrFussel Are we talking in terms of ms difference?
15:34 IhrFussel Or rather µs
15:36 rubenwardy for ContentDB, the difference is in seconds
15:36 rubenwardy although, actually that may have been because of other problems
15:36 rubenwardy don't think I reserved the size of the vector
15:41 rubenwardy well, "seconds" -> 0.5 secs maybe
15:47 sofar seems having an in-game sqlite api would be neat by now
15:47 sofar as an alternative to mod_storage
15:49 rubenwardy yeah
15:50 rubenwardy mod_storage and meta are key-value stores - they don't work well with lists or list of structs
15:51 rubenwardy local records = minetest.get_record_store("mydb")  -- mod local like mod storage
15:51 rubenwardy records:insert({ a = "a", b = "b" })
15:51 rubenwardy records:find_all({ a = "a" })
15:51 rubenwardy etc
15:51 rubenwardy not sure how to do schema
15:52 rubenwardy exposing SQLite directly could be a bad idea:
15:52 rubenwardy - not portable between sqlite / postgresql / etc
15:52 rubenwardy - may not be secure
15:52 rubenwardy record stores should probably not be in the CSM api
15:53 rubenwardy hmmm
15:55 sofar portability wouldn't be a problem if it was just sqlite3
15:55 rubenwardy yeah, that gets rid of #1
15:55 ShadowBot https://github.com/minetest/minetest/issues/1 -- GlowStone code by anonymousAwesome
15:55 rubenwardy >:(
15:55 rubenwardy /me kicks ShadowBot
15:55 rubenwardy oops
15:56 rubenwardy plus, it would probably be faster to use SQLite directly than PostgreSQL with a limited makeshift ORM
15:57 sofar I don't think we want to expose all of lsqlite3 anyway
16:12 IhrFussel Can any of you tell me why this custom function 'spairs' from here https://stackoverflow.com/a/15706820 lists the highest value as last value when I call it with 'for k,v in spairs(HighScore, function(t,a,b) return t[b] < t[a] end) do print(k,v) end' ?
16:12 * Sokomine tries to sneak a created-at and last-modified-by-a-player-at-timestamp into the database
16:13 IhrFussel All other values are sorted from highest to lowest but the most high value comes last for some reason
16:23 clavi joined #minetest-hub
16:25 clavi joined #minetest-hub
16:32 Ruslan1 joined #minetest-hub
16:36 tenplus1 joined #minetest-hub
16:36 tenplus1 back :P
16:42 xerox123 welcome back
16:42 tenplus1 hi xerox
16:42 xerox123 hello
16:43 tenplus1 what's new today ? :P
16:43 xerox123 nothing much, bored af as usual
16:44 tenplus1 aww, come onto Xanadu server and look around :) check out a few builds :D
16:47 sofar do some puzzle boxes on ITB
16:47 tenplus1 hi sofar :)
16:47 sofar o/
16:47 tenplus1 still no joy with clearlinux :(
16:47 sofar gheghe, I wish I had time and can help you through it
16:47 sofar crazy busy though atm
16:47 sofar did you try the live beta image?
16:48 sofar or the installer?
16:48 tenplus1 that's ok... currently testing kubuntu 19.04 pre-release
16:48 tenplus1 yep, tried all images and nothing boots
16:48 sofar UEFI or plain BIOS?
16:48 sofar also, what HW?
16:49 tenplus1 acer apire r3700 with nvidia ion v.2, atom 1.8 ht, 4gb ddr3
16:49 sofar euh
16:49 sofar wow yeah that's an interesting piece of HW
16:49 sofar is it even 64bit?
16:49 tenplus1 yup
16:49 sofar well, atom, but, does it have a 64bit UEFI ?
16:49 tenplus1 no uefi at all
16:50 sofar I think that's your problem
16:50 tenplus1 so clear linux requires this ?
16:50 sofar it gets a lot more complicated without UEFI
16:50 tenplus1 bummer, will stick with kubuntu for now then...
16:50 tenplus1 thanks dude
16:50 sofar we have special images for non-UEFI atm
16:52 tenplus1 ohhh, never saw those, will recheck site
16:52 sofar they're labelled `legacy` but I don't vouch for their quality :)
16:53 sofar you probably want to try: https://cdn.download.clearlinux.org/current/clear-28880-installer.iso.xz
16:54 sofar if that doesn't work just wait and I'll let you know when we have something that might work in your case :)
16:54 tenplus1 downloading now, thx
16:56 IhrFussel to_table() returns the values as STRINGS correct? Cause even though I store them as INTs a function that gets passed the modstore:to_table().fields complains about comparing number to string
16:56 sofar the gfx will be challenging though, we only have the OSS drivers, and given that it's the ION, I'm not even sure we support it atm
16:57 tenplus1 <fingers crossed> cause the 5.0 kernel has a few issues at the moment with xorg detection
17:14 Fixer spammer, please kill it with fire https://forum.minetest.net/memberlist.php?mode=viewprofile&amp;u=24774&amp;sid=eec405f9f89d3b507edbf3372046e8a0
17:14 tenplus1 erk
17:14 tenplus1 o/ fixer
17:14 Fixer \\\o
17:14 tenplus1 I hate spammer accounts on forum
17:39 _Xenon joined #minetest-hub
17:53 tenplus1 left #minetest-hub
17:54 kaeza joined #minetest-hub
18:37 kaeza joined #minetest-hub
19:00 kaeza joined #minetest-hub
19:24 ssieb joined #minetest-hub
23:03 kaeza joined #minetest-hub
23:16 benrob0329 joined #minetest-hub
23:32 Emerald2 Wow tenplus1 has an interesting computer. XD
23:34 Ruslan1 joined #minetest-hub

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