Minetest logo

IRC log for #minetest-dev, 2014-07-31

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

All times shown according to UTC.

Time Nick Message
00:03 khonkhortisan joined #minetest-dev
00:45 harrison joined #minetest-dev
00:49 harrison joined #minetest-dev
00:57 Guest67987 joined #minetest-dev
01:17 Zeno` joined #minetest-dev
01:27 casimir joined #minetest-dev
01:44 zat joined #minetest-dev
02:28 fu-fu joined #minetest-dev
02:36 VanessaE is there some way to disable generation of default ores from within an ordinary mod?
02:46 fu-fu Would I  be right in guessing that if I want to preserve variables, I've got to make a file and save them their?
03:20 Zeno` preserve values of variables between runs?
03:28 fu-fu Yeah, like an entityies target.
03:29 Zeno` yeah a file would be best. Please don't put the file in the mod directory :p (remember that many people run multiple servers)
03:32 fu-fu Heh, alright. Is there a consistant way to redefine the same  entity too? (Like a Entity ID number or something I can check?)
03:39 asl joined #minetest-dev
03:41 fu-fu Zeno`: Can I bother you to tell me how path.size is getting it's value on line 701 in https://github.com/minetest/minetest/​blob/c4359ff65cd8e4e754442b9f2ef7051a​8eaa4241/src/script/lua_api/l_env.cpp ?
03:44 Zeno` what do you mean? It's calling a member function of std::vector
03:44 Zeno` size() is a standard function
03:44 Zeno` i.e. refer to line 698,699
03:45 Zeno` Are you sure you're interested in the C++ ?
03:46 Zeno` I'm not sure of the "correct" way to get the length of a table in Lua (that function returns a Lua table)
03:46 fu-fu Well, I was more-so looking to see if it made sense to someone who knew more of C++, as to me I see path.size() == ?!? but path[4] or simmilar making more sense.
03:47 Zeno` path.size() returns the number of "elements" in that vectors
03:49 fu-fu Yeah, that's what I'd think to.. and with that the if seems redundent no?
03:50 Zeno` It's not really redundant. If there are no elements you wouldn't want to create an empty table on the Lua stack (I don't think)
03:51 fu-fu Yeah, but you'd do a big check earlyer on, instead of setting the algorithm and then buggering off to do nothing no?
03:51 fu-fu (Which, btw, does nothing at all. :/ )
03:52 fu-fu ((Unless I'm wrong, which case, point it out.))
03:53 Zeno` No, I think you're probably right
03:55 fu-fu Woo, I feel so skilled with my extreamly basic C++ knowedge. If I knew more I'd try do it. I'll make note of it, and if I get better at C++ I'll try.
03:56 fu-fu (The function just seems to return nil.)
03:57 Zeno` it returns 1 if the path.size() is  > 0   (the 1 is the number of objects pushed onto the Lua stack; in that case a table)
03:57 Zeno` a better way to look at the 1 is "1 return values have been given to Lua"
03:59 fu-fu ? Line 713 or one of the lua-line thingys?
04:01 Zeno` line 713
04:02 Zeno` 1 means that there is 1 value returned. if it was 2, 2 values returned. 0, 0 values returned, etc
04:03 fu-fu return 1; just returns the value "1/true/allgood" to whatever calls it, no?
04:04 fu-fu Maybe that's how the rest of the codebase works..? I don't know, this is my first look really.
04:04 Zeno` in C or C++ that would generally be the case, but remember that the function you're looking at is part of the Lua VM
04:05 Zeno` and Lua wants/needs the number of items added to the stack (aka the number of values "returned" to Lua) to be returned by the C++
04:05 fu-fu I see. So it tells the Lua VM "One value", and it's always one value, as it's always just the one table.
04:05 Zeno` correct
04:05 fu-fu Ahh.
04:05 Zeno` although that particular function can return 0 as well
04:05 Zeno` i.e. it /may/ return no table at all if path.size() == 0
04:06 fu-fu Can it..? wouldn't that cause an error?
04:06 Zeno` Back in Lua you would have to check that the value was actually returned; i.e. make sure the function didn't return nil (which will happen if the C++ side of things returns 0)
04:07 fu-fu (Somewhere else that is, as it seems particular about the argument count already.)
04:07 Zeno` If the C++ returns 0, then Lua "sees" the function as returning nil
04:08 fu-fu I just tested it, it crashes before it gets to that return 0 code.
04:08 Zeno` ?
04:08 Zeno` can you paste the test case?
04:09 Zeno` at codepad or something (not in the channel heh)
04:09 fu-fu I just threw minetest.find_path() in a mod. (The only  way it would get a path.size !> 0 is to have no arguments.)
04:10 fu-fu or... no?
04:11 Zeno` not sure, I'd have to study the code. But at a cursory glance, get_Path() may return 0 if no path can be found using the chosen algorithm
04:11 Zeno` it's probably a rare edge-case
04:11 Zeno` I don't think you can just leave out Lua arguments like that when the function expects arguments
04:12 fu-fu Yeah, I think it's more C++ wanting set number of arguments.. but.. that just makes me think that if statment is even more redudent.
04:14 fu-fu Idk, It  just returns nil, and the algithims don't seem to set anything (or really  be checked, "pangus" works..) I'ma guess it's not really implmented right now.
04:14 Zeno` I'm not sure I'm following now :)
04:14 Zeno` quite possibly
04:15 fu-fu I think it's just C/C++'s thing, can't have function(parm1,parm2) and not give it parm2.
04:16 Zeno` It's not a C++ thing really
04:16 fu-fu Oh?
04:16 Zeno` its the interfacing between Lua and C++
04:17 Zeno` actually it's more of a Lua thing if the C++ side is written correctly (and that function in the C++ is)
04:18 Zeno` It's kind of tricky at first... you need to get your head around that the C++ is using a "stack" from the Lua VM
04:18 Zeno` But you seem to be doing ok :)
04:18 Zeno` bbiab
04:19 Zeno` Can you write a test case demonstrating "Idk, It  just returns nil, and the algithims don't seem to set anything (or really  be checked, "pangus" works..) I'ma guess it's not really implmented right now."
04:20 Zeno` By test case I mean an uncomplicated and simple (as possible) Lua script that demonstrates what you're describing
04:20 fu-fu Ahh, yes I can.
04:20 Zeno` I will bbiab.. have to go to the shops
04:20 fu-fu Alright, I'll probably be sleeping when you get back, but I'll post a link.
05:06 fu-fu joined #minetest-dev
05:09 fu-fu Zeno`: http://pastebin.com/U6NMS9rX
05:13 fu-fu Zeno`: And one with all the test-cases of the 4 vectors. http://pastebin.com/JagnEnuC
05:13 fu-fu erm 5.
05:14 fu-fu Anyways, I'ma goto bed now, enjoy.
05:20 PenguinDad joined #minetest-dev
05:41 Hunterz joined #minetest-dev
06:04 werwerwer joined #minetest-dev
06:07 AnotherBrick joined #minetest-dev
06:12 AnotherBrick joined #minetest-dev
06:16 grrk-bzzt joined #minetest-dev
06:38 AnotherBrick joined #minetest-dev
06:43 grrk-bzzt joined #minetest-dev
06:43 grrk-bzzt joined #minetest-dev
06:45 grrk-bzzt joined #minetest-dev
06:47 sebastia joined #minetest-dev
06:53 AnotherBrick joined #minetest-dev
07:08 werwerwer joined #minetest-dev
07:23 AnotherBrick joined #minetest-dev
08:03 Kalista joined #minetest-dev
08:42 vifino joined #minetest-dev
08:43 Calinou joined #minetest-dev
08:47 Krock joined #minetest-dev
08:48 kalist4 joined #minetest-dev
08:59 Kalista joined #minetest-dev
09:53 AnotherBrick joined #minetest-dev
10:08 AnotherBrick joined #minetest-dev
10:31 casimir joined #minetest-dev
10:44 restcoser joined #minetest-dev
11:15 proller joined #minetest-dev
11:15 Jordach joined #minetest-dev
11:18 ImQ009 joined #minetest-dev
11:23 AnotherBrick joined #minetest-dev
11:49 RealBadAngel http://i.imgur.com/uMzaqOn.png https://www.youtube.com/watch?v=v52f-1YsSAM
11:49 RealBadAngel how do you like the shader?
11:51 CheapSeth joined #minetest-dev
11:58 CheapSeth left #minetest-dev
12:01 Amaz RBA It looks awesome!
12:35 fu-fu joined #minetest-dev
12:40 Megaf joined #minetest-dev
12:55 harrison joined #minetest-dev
13:13 nore_ joined #minetest-dev
13:14 harrison_ joined #minetest-dev
13:17 VargaD joined #minetest-dev
13:17 ^v joined #minetest-dev
13:17 VanessaE joined #minetest-dev
13:23 kahrl joined #minetest-dev
13:23 AnotherBrick joined #minetest-dev
13:31 Taoki[laptop] joined #minetest-dev
13:33 Taoki[laptop] joined #minetest-dev
13:47 smoke_fumus joined #minetest-dev
13:55 Amaz joined #minetest-dev
14:02 hmmmm joined #minetest-dev
14:27 Krock joined #minetest-dev
14:30 Calinou joined #minetest-dev
14:52 NakedFury joined #minetest-dev
15:16 Calinou joined #minetest-dev
15:17 celeron55 joined #minetest-dev
15:31 harrison joined #minetest-dev
15:34 harrison joined #minetest-dev
16:15 Hunterz joined #minetest-dev
16:19 SoniEx2 joined #minetest-dev
16:22 darkrose joined #minetest-dev
16:23 AnotherBrick joined #minetest-dev
16:24 PilzAdam joined #minetest-dev
16:33 Exio joined #minetest-dev
16:44 init joined #minetest-dev
16:52 cg72 joined #minetest-dev
17:07 SoniEx2 joined #minetest-dev
17:15 Exio joined #minetest-dev
17:18 cg72 does someone have a secon im trying to make a pull request but my gitbub isnt liking it
17:20 grrk-bzzt joined #minetest-dev
17:26 sfan5 whats wrong?
17:28 cg72 trying to do a pull request for minetest_game but it says "There isn't anything to compare." but i can see its different, god github hates me
17:29 Jordach you sure you pushed?
17:29 cg72 im looking at it now on my github
17:29 cg72 https://github.com/crazyginger72/minetest_game
17:30 sfan5 https://github.com/crazyginger72/minetes​t_game/compare/minetest:master...master
17:30 sfan5 doesn't that link work?
17:31 cg72 that link worked but through the page didnt for me wtf
17:33 cg72 the site sends me to master@{1day}
17:34 Krock cg72, reset to the original minetest_game by downloading it from upstream and pulling it on your repo. after this, create a new branch and make your changes in there
17:34 sfan5 Krock: that is not the issue
17:35 Krock well, it works after that
17:36 cg72 works on sfan5's link
17:36 PenguinDad joined #minetest-dev
17:37 cg72 https://github.com/minetest/minetest_game/pull/296
17:37 cg72 thanks sfan5 :D
17:37 * sfan5 meows
17:37 cg72 lol
17:38 cg72 hope i can actually be usefull to you guys for once
17:47 rubenwardy joined #minetest-dev
18:07 rmilan joined #minetest-dev
18:12 Exio joined #minetest-dev
18:37 rubenwardy joined #minetest-dev
19:12 init joined #minetest-dev
19:33 cg72 left #minetest-dev
19:35 Exio joined #minetest-dev
20:07 grrk-bzzt joined #minetest-dev
20:07 grrk-bzzt joined #minetest-dev
20:15 zat joined #minetest-dev
20:30 smoke_fumus joined #minetest-dev
21:04 ImQ009 joined #minetest-dev
21:09 werwerwer joined #minetest-dev
21:13 proller joined #minetest-dev
21:29 AnotherBrick joined #minetest-dev
21:31 Miner_48er joined #minetest-dev
21:42 ImQ009 joined #minetest-dev
21:44 fu-fu joined #minetest-dev
21:46 Exio joined #minetest-dev
21:46 fu-fu test
21:48 Krock tset
21:50 werwerwer joined #minetest-dev
21:52 nore_ joined #minetest-dev
22:10 grrk-bzzt joined #minetest-dev
22:28 nore_ joined #minetest-dev
22:36 Eater4 joined #minetest-dev
22:47 Exio4 joined #minetest-dev
23:04 nore_ sfan5: thoughts about adding a setting to minetest_game that would disable default oregen?
23:11 VanessaE something like minetest.enable_oregen = false (defaults to true if not expressly set to false) seems fair to me.
23:11 VanessaE (or just s/minetest\.//)
23:49 Exio joined #minetest-dev
23:54 VanessaE another way we thought of was having something like "preloads.txt".  items listed would be loaded *after* the current mod.  e.g. a mod could write "default" in this file, forcing itself to load *before* default does.  same format as depends.txt (with opt-preload ? support, for example)

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