Minetest logo

IRC log for #minetest-dev, 2014-12-21

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

All times shown according to UTC.

Time Nick Message
00:12 mint joined #minetest-dev
00:12 luizrpgluiz joined #minetest-dev
00:13 luizrpgluiz hi
00:17 Ritchie joined #minetest-dev
01:11 n4x joined #minetest-dev
01:11 kaeza joined #minetest-dev
01:37 Megaf joined #minetest-dev
01:49 mrtux joined #minetest-dev
02:05 electrodude512 joined #minetest-dev
02:08 luizrpgluiz left #minetest-dev
02:10 DFeniks joined #minetest-dev
02:27 n4x joined #minetest-dev
02:29 exio4 joined #minetest-dev
03:06 electrodude512 joined #minetest-dev
03:49 exio4 joined #minetest-dev
04:15 n4x joined #minetest-dev
04:19 Sokomine_ joined #minetest-dev
04:23 Zeno` joined #minetest-dev
04:45 MinerDad joined #minetest-dev
05:09 exio4 joined #minetest-dev
05:09 Guest38419 joined #minetest-dev
05:47 paramat joined #minetest-dev
05:56 paramat now that a default biome has been added to builtin, 'clear registered biomes' must be added to any mod that registers biomes, to avoid the builtin biome merging into the mod's biomes. i will announce this in the news thread
05:59 hmmmm well
05:59 hmmmm shouldn't they be doing that anyway?
05:59 paramat yes
05:59 hmmmm they have no idea if another mod was installed that registers biomes
05:59 hmmmm do you agree with that behavior, though?
06:00 paramat yes it's fine
06:00 hmmmm should mods overwrite eachother's biomes, so effectively the one that has the most dependencies always wins?
06:00 paramat yes
06:01 hmmmm initially i just wanted to add the biome to minetest_game and minimal but that would have almost the same effect
06:02 hmmmm i wish people would just stuff it and accept that they need to do a little legwork to get a good, playable minetest setup
06:02 paramat its nice to have some grass, but prepare for the new whiny comments
06:02 hmmmm i know
06:02 hmmmm so much whine
06:03 hmmmm i'm not a whine drinker
06:03 hmmmm :\
06:04 hmmmm so I realized there's no good way to have a userdata object act like a plain old table
06:04 paramat but then, i have to remind myself a player may be a 10 year old, you can never tell over the internet, so i try to be tolerant
06:04 hmmmm the idea was to have something like
06:04 hmmmm local vm = VoxelArea(nmin, nmax)
06:04 hmmmm vm.emerged_min
06:04 hmmmm etc.
06:05 hmmmm to do that though i'd have to handle __index
06:05 hmmmm which means it'd be the same lua->C->lua transition as it would if i were to just write vm:get_emerged_area()
06:05 paramat ah this is for setting minp maxp without reading the map?
06:05 hmmmm yeah
06:06 hmmmm i've been struggling to dynamically set fields in a piece of userdata
06:06 hmmmm it's not worth it though
06:08 paramat not worth it for that feature alone certainly
06:08 sol_invictus joined #minetest-dev
06:09 paramat this news thread should stay up for a while https://forum.minetest.net/vi​ewtopic.php?f=18&t=10621 lots of useful info.
06:09 hmmmm you know what's interesting that i don't actually know the answer to
06:09 hmmmm someone made a mega TNT mod right after i came out with luavoxelmanip
06:10 hmmmm and their explosion attempted to carve chunks into blocks that weren't generated yet
06:10 hmmmm but it failed for whatever reason
06:10 hmmmm what's supposed to happen is that the block gets created with content_ignore, filled up with air, and then when the map generator goes to generate, it doesn't generate on top of the air
06:12 hmmmm i'd like to get that working
06:12 paramat their explosion extended beyond the shell of mapblocks around the mapchunk?
06:13 hmmmm there is no concept of a chunk outside of map generation
06:13 hmmmm this carving happens in the server thread
06:13 hmmmm the mapgen is supposed to ignore the air that already exists.. even if this did work as intended, there'd be another problem
06:14 hmmmm it would generate biomes on top of the stone of the non-existing areas
06:14 twoelk|2 joined #minetest-dev
06:16 paramat mmm .. guess i don't understand, seems expected for an overly-large lua LVM explosion to fail outside the shell
06:16 paramat sorry
06:17 paramat oops
06:17 paramat TNT isnt on-gen
06:17 paramat guess it used the non-mapgen LVM
06:21 MinerDad joined #minetest-dev
06:21 paramat a reason why i find IRC chat so difficult is i often need minutes or hours to reread and understand what was written. this is why email is easier for me
06:23 paramat instant communication by text is certainly the most difficut way to communicate
06:26 hmmmm really?
06:27 hmmmm i've been a huge proponent of having an mt mailing list
06:27 hmmmm nobody else likes those though
06:27 paramat yes really, for me anyway
06:27 paramat forum sort of replaces email
06:28 paramat i would be described as having 'aspergers syndrome'
06:29 hmmmm self-diagnosed?
06:29 paramat yep so far
06:30 paramat thats why modding is perfect for me =)
06:30 paramat i have talents but outside those i can be exceedingly thick lol
06:31 Guest38419 joined #minetest-dev
06:32 exio4 joined #minetest-dev
06:49 hmmmm you know
06:50 hmmmm you're probably not a sperg at all
06:50 hmmmm the threshhold for weird is weirder than you might think
06:50 paramat hehe
06:50 hmmmm in any case, i think a good interface for this would be like:
06:51 hmmmm local emin, emax = vm:get_blank_area(nmin, nmax)
06:51 hmmmm errm... local data, emin, emax =
06:52 hmmmm data will be a table with all the elements preallocated and content_ignore'd out
06:52 hmmmm nah
06:53 hmmmm yeah
06:53 paramat i now see the mystery of the TNT behaviour, understood
06:54 hmmmm local vm = VoxelManip(nmin, nmax) == VoxelManip(nmin, nmax, false) == combines object creation and read_from_map all at once
06:54 hmmmm and then if the third parameter is true, then it doesn't read from map and instead just allocates a blank piece of data
06:55 hmmmm regardless, you get either your blank buffer or buffer with map read in with vm:get_data() like usual
06:55 hmmmm i have to get this right otherwise we'll be stuck with a crappy interface in the name of reverse compatibility
06:57 hmmmm also i'm going to add a convenience function, vm:commit(data)  that does all steps of setting data/writing to map/updating map/updating liquids
06:57 paramat ah nice
06:58 hmmmm local vm = VoxelManip(nmin, nmax, true); local data = vm:get_data()  <do loop here>; vm:commit(data);
06:58 hmmmm comments?
06:59 paramat both ideas seem good at the moment
07:00 Zeno` That would solve an issue I have where I have to read from the map just to set it all blank
07:00 paramat sometimes i like to write it all out to omit something that isn't needed, such as update liquids
07:01 hmmmm maybe I could have a helper in builtin that'll create your VoxelArea for you
07:02 Zeno` yes
07:02 hmmmm i see mods that use LuaVoxelManip and they all have a lot of boilerplate code
07:04 paramat personally i usually copypaste all the stuff that would be in vm:commit so can't get overly excited about it, it would shorten code though
07:05 hmmmm long code is messy code
07:05 Zeno` There doesn't seem to be a way to use the voxel manipulator in a way that doesn't care what the map is currently like though (although maybe there is and I just don't know it)
07:06 Zeno` e.g. commit doesn't know where to put the data and I can't see a way to set the area without getting it from the map (which of course populates the array with the map data that is totally ignored in my abandoned mod)
07:10 hmmmm that's the whole point of this feature
07:10 Zeno` I thought so, which is why I keep saying I like it :)
07:21 paramat mgv5 https://cdn.mediacru.sh/k/kveCYIY4lrHS.png
07:23 paramat this screenshot made me realise a good characteristic of v5: flat buildable areas and epic mountains in close proximity
07:24 paramat viewing mountains is more impressive when seen over a flat area
07:26 paramat this is why v7 needs tuning, more verticality, flat areas and mountains in closer proximity
07:27 paramat if v7 is trashed at least players can transfer to v5 easily
07:33 Zeno` https://forum.minetest.net/viewtopic.ph​p?f=18&amp;t=10621&amp;p=165334#p165320 please?
07:33 Zeno` err, can you fix it please?
07:34 Zeno` It makes it sound like minetest is trying to force people to use a permissive license
07:39 paramat oops
07:39 paramat will do
07:42 Zeno` :)
07:43 paramat i'm crazy
07:43 Zeno` why?
07:44 Zeno` I don't think you're crazy
07:48 paramat just joking i do crazy things sometimes
07:56 exio4 joined #minetest-dev
08:02 kilbith joined #minetest-dev
08:04 paramat left #minetest-dev
08:08 MinerDad joined #minetest-dev
08:09 hmmmm yeah paramat, you can probably tell i tried that by composing 3d noise and 2d noise
08:10 Calinou joined #minetest-dev
08:16 Hunterz joined #minetest-dev
08:24 DuDraig joined #minetest-dev
08:32 nore joined #minetest-dev
08:37 Guest38419 joined #minetest-dev
08:40 selat joined #minetest-dev
08:48 Krock joined #minetest-dev
08:54 DuDraig joined #minetest-dev
08:58 CraigyDavi joined #minetest-dev
09:22 exio4 joined #minetest-dev
09:24 Guest38419 joined #minetest-dev
09:41 jin_xi joined #minetest-dev
09:59 jin_xi oh wow, another vote for a mailing list! yes please!
10:11 prol joined #minetest-dev
10:17 ImQ009 joined #minetest-dev
10:36 roniz joined #minetest-dev
10:47 VargaD joined #minetest-dev
10:52 exio4 joined #minetest-dev
10:53 Guest38419 joined #minetest-dev
10:58 prol joined #minetest-dev
10:58 Zeno` joined #minetest-dev
11:02 Zeno` oh
11:02 Zeno` I meant to see which unit test was failing when I was doing the Windows stuff :(
11:10 MinerDad joined #minetest-dev
11:14 casimir joined #minetest-dev
11:21 gravgun joined #minetest-dev
11:30 Zeno` joined #minetest-dev
11:31 Zeno` https://github.com/minetest/minete​st/blob/master/src/test.cpp#L2180      <--- Makes finding the source of which unit test failed using --info or debug_level=3 impossible
11:33 Zeno` Anyway, after removing that line, this is what's failing on my Windows build: http://codepad.org/p9mGczvu
12:11 kahrl Zeno`: can you uncomment the verbosestream line at test.cpp:298 and rerun?
12:12 kahrl wtf is up with the comment at line 276 and 277, btw
12:12 kahrl "2 = returns false on windows, false elsewhere"??
12:13 kahrl I must've been really drunk when I wrote that
12:13 Zeno` kahrl, I'm back in Linux now :(
12:13 kahrl oh
12:14 Zeno` When I upgrade to f20 I'll fix wine etc
12:14 Zeno` it's kind of broken atm so I have to physically reboot
12:14 Zeno` and VM doesn't work so well on my computer for some reason
12:20 GrimKriegor joined #minetest-dev
12:21 exio4 joined #minetest-dev
12:22 Guest38419 joined #minetest-dev
12:30 rubenwardy joined #minetest-dev
13:08 T4im joined #minetest-dev
13:12 kilbith joined #minetest-dev
13:15 Guest75583 joined #minetest-dev
13:33 rubenwardy joined #minetest-dev
13:46 Guest38419 joined #minetest-dev
13:46 nore joined #minetest-dev
14:13 hmmmm joined #minetest-dev
14:14 MinerDad joined #minetest-dev
14:26 proller joined #minetest-dev
14:34 roniz joined #minetest-dev
14:36 kilbith joined #minetest-dev
14:37 casimir joined #minetest-dev
14:44 prol joined #minetest-dev
14:58 petrusd987 joined #minetest-dev
15:08 exio4 joined #minetest-dev
15:08 n4x joined #minetest-dev
15:20 MinetestForFun joined #minetest-dev
15:27 Calinou joined #minetest-dev
15:34 luizrpgluiz joined #minetest-dev
15:39 Zeno` #2000
15:39 ShadowBot https://github.com/minetest/minetest/issues/2000 -- Large increase in performance by Zeno-
15:40 luizrpgluiz I'm glad I have not abandoned the development of minetest
15:40 Calinou issue 2000!
15:41 Calinou how much more FPS, Zeno`?
15:41 Calinou did you test by starting the game at least twice, before and after changing the code?
15:41 Calinou (to reduce the margin of error)
15:43 Zeno` I tested about 20 times
15:44 Zeno` it's a horrible patch
15:44 Calinou ah
15:44 Zeno` but about 10 fps more
15:44 Calinou that's cool
15:45 Zeno` depends on what your FPS was before I guess
15:45 Zeno` about a 5% speed increase
15:45 Wayward_One is this *another* speed increase i hear??
15:47 luizrpgluiz but the frames per second depends on the hardware configuration and operating system also
15:47 Zeno` the 5% increase is ignore fps
15:48 Zeno` which is why I was hesitant in giving a number for fps increase
15:48 luizrpgluiz I for one game in the minetest Linux Lubuntu and performance on Linux is much better compared to Windows
15:48 Zeno` too many variables
15:49 Zeno` i get way more than 10fps more
15:49 Zeno` but it depends on the user's computer
15:51 luizrpgluiz Zenp`: yes, 10 frames per second is very good for those on a simple computer also
15:51 Wayward_One cd ..
15:52 luizrpgluiz my computer is a simple notebook, and next year I will buy my new computer that will be better than my notebook
15:52 Wayward_One oops, wrong window >.<
15:55 gravgun #2000, heh so that's why POD structs are awesome kids
15:55 ShadowBot https://github.com/minetest/minetest/issues/2000 -- Large increase in performance by Zeno-
15:55 gravgun No useless ctor crap when you don't want it
15:58 Calinou POD, ctor?
15:58 luizrpgluiz gravgun: you also are a developer or you are design?
15:59 gravgun What do you mean by "design"? Code design?
16:00 gravgun Calinou: POD = "Plain Old Data", id est C structs. "ctor" is short for "constructor"
16:00 Amaz joined #minetest-dev
16:01 Zeno` The problem, really, is the only ctor there has a bunch of default values; if they're going to be overwritten immediately 40% (or more) of the function is doing something utterly useless
16:03 kahrl is this with or without optimization?
16:03 Zeno` -O3
16:04 kahrl if an optimizing compiler doesn't optimize this stuff away... what a sad state C++ compilers are in
16:04 Zeno` I only profile using -O3
16:04 Zeno` how can it?
16:04 Taoki joined #minetest-dev
16:05 kahrl by seeing it will be overwritten a few lines later
16:05 Zeno` the "default" ctor initialises values because MapNode(content_t content = CONTENT_AIR, u8 a_param1=0, u8 a_param2=0) is effectively the default ctor
16:05 gravgun kahrl: it is unlikely a compiler can optimize that, because construct-time initialization is done privately, i.e. one does not know which members are to be set or not
16:05 kahrl gravgun: the constructor is defined in the header file
16:06 kahrl in particular, it's inline
16:06 gravgun Inlined is another deal tho :/
16:07 kahrl I guess the voxel area calculations in the loop below are too confusing for the compiler
16:09 Zeno` new has to call the default ctor
16:09 Zeno` it says so in the standard
16:10 kahrl of course
16:10 Zeno` and the default ctor in this case sets something that is not needed
16:10 kahrl but there is also the as-if rule
16:11 hmmmm #2000?
16:11 Zeno` no, no, the ctor is setting param1
16:11 ShadowBot https://github.com/minetest/minetest/issues/2000 -- Large increase in performance by Zeno-
16:11 Zeno` when there is no need to
16:11 hmmmm reading... kahrl said exactly what I would've said
16:12 Zeno` sorry, param0
16:12 Zeno` param0(content)
16:12 Zeno` how can the compiler possibly know it should not set that to CONTENT_AIR?
16:12 hmmmm MapNode was always POD
16:13 Zeno` the problem is that MapNode(content_t content = CONTENT_AIR, u8 a_param1=0, u8 a_param2=0)  *is* the default constructor because default values are given for all parameters
16:14 Zeno` without refactoring and checking about 20000 lines of code then... it's hard to avoid that being called
16:14 gravgun hmmmm: it have a user-defined constructor AFAIK
16:14 gravgun so it's not POD
16:14 hmmmm definitely false
16:14 gravgun default constructor*
16:14 hmmmm this is not-C++11 by the way
16:14 Zeno` no, this is c++98
16:14 hmmmm things are POD definitely when they have virtual members
16:15 gravgun C++11 or not MapNode() resolves MapNode(content_t content = CONTENT_AIR, u8 a_param1=0, u8 a_param2=0)
16:15 kahrl grep -R MapNode .|wc -l
16:15 kahrl 452
16:15 kahrl not *that* much
16:15 hmmmm you're right
16:15 gravgun noooo that's nothin' ;)
16:15 hmmmm I thought it was just no user-defined copy ctor
16:15 hmmmm damn
16:15 gravgun no POD can have any other constructor
16:15 gravgun just must not have user-defined default one
16:16 gravgun or user-defined dereference operators
16:16 hmmmm wait
16:16 hmmmm no user-defined copy assignment operator, no user-defined DEstructor, and no non-static data members that are not themselves POD
16:17 hmmmm ahhh
16:17 kahrl looking over those 452 lines, I don't see many that could potentially rely on the default value being CONTENT_AIR
16:17 gravgun "no POD can have any other constructor" oops, actually not
16:17 hmmmm a type isn't considered an aggregate if it has at least one user-declared constructor, private or protected data, base class or virtual functions
16:17 kahrl most call the constructor with at least 1 argument or immediately assign something else
16:18 hmmmm type_traits has is_pod
16:18 Krock joined #minetest-dev
16:19 gravgun And as MT isn't C++11, no constructors are therefore allowed to make a struct POD.
16:19 hmmmm yup... no matter how you look at it, according to the C++98 standard, MapNode is actually POD
16:20 hmmmm non-POD i mean
16:20 hmmmm if it were C++11 it would be POD
16:20 gravgun heh
16:20 gravgun Confusion \o/
16:20 hmmmm man that sucks
16:20 gravgun C++11 is awesome, but C++'s memory and ctor/dtor model is still a huge mess
16:21 gravgun (xvalues my beloved)
16:21 hmmmm soo this sorta begs the question...
16:21 hmmmm is it worth removing MapNode ctors
16:21 Zeno` if removing them is a better option and someone wants to spend the time doing it, then of course
16:22 Zeno` time doing it + testing it *
16:23 kahrl well... that would for example make a lot of mapgen code much uglier
16:23 kahrl stuff like MapNode n_dirt(c_dirt), n_gravel(c_gravel);
16:24 hmmmm speed > pretty
16:24 gravgun C++11 has struct brace-init *smirk*
16:25 gravgun mai constructors? i haz no constructorz! i haz braces!
16:25 gravgun but C++11 isn't an option here
16:25 kahrl how about changing the default value from CONTENT_AIR to 0?
16:26 hmmmm i would prefer for the default value to be CONTENT_IGNORE
16:27 kahrl but with 0, when you do new MapNode[1337] just needs to set everything to zero
16:27 kahrl must faster than any other value
16:27 kahrl the compiler just*
16:28 gravgun I know very few about MT's structure, but what advantages does CONTENT_IGNORE confer?
16:28 gravgun over having CONTENT_AIR as default value (0)?
16:28 n4x joined #minetest-dev
16:28 kahrl well, it would allow the loop in MapBlock::reallocate() to be removed
16:29 kahrl CONTENT_IGNORE I mean
16:29 kahrl gravgun: CONTENT_AIR is actually 126
16:29 hmmmm it doesn't hide a mistake if somebody doesn't set content
16:30 hmmmm so I don't get it
16:30 hmmmm if I'm understanding this correctly, a type could be classified as being POD under C++98 if you can do brace initialization
16:30 hmmmm e.g. MapNode foobar[] = {MapNode()};
16:31 Zeno` does POD vs. non-POD even matter since everything is being "initialised" via memcpy() anyway?
16:31 hmmmm i would prefer if it didn't do any initialization at all
16:31 Zeno` CONTENT_AIR is 126 I think
16:32 Zeno` oh, kahrl already said that :)
16:33 kahrl 0 used to be CONTENT_STONE in 0.3
16:35 kahrl Zeno`: is memcpy() on a non-POD even legal?
16:35 Zeno` kahrl, I'm not sure. But it's happening in the current code already
16:36 gravgun kahrl: I doubt it might be undefined behaviour
16:36 gravgun not on the call itself of couse
16:36 gravgun but on copied object access
16:36 gravgun course*
16:37 kilbith joined #minetest-dev
17:05 sapier joined #minetest-dev
17:19 MinerDad joined #minetest-dev
17:27 FR^2 joined #minetest-dev
17:38 casimir joined #minetest-dev
17:42 Calinou joined #minetest-dev
17:44 kaeza joined #minetest-dev
17:46 exio4 joined #minetest-dev
17:46 exio4_ joined #minetest-dev
18:19 thoughtjigs joined #minetest-dev
18:21 gravgun joined #minetest-dev
18:21 thoughtjigs on github what is the sapier fork of minetest used for?
18:23 jin_xi its just how github works i think, you basically need to have a fork to submit pull requests
18:27 thoughtjigs thanks
18:54 prol joined #minetest-dev
19:04 n4x joined #minetest-dev
19:07 shadowzone joined #minetest-dev
19:27 casimir joined #minetest-dev
19:38 Wayward_One joined #minetest-dev
19:39 proll joined #minetest-dev
19:47 prol joined #minetest-dev
19:48 Taoki joined #minetest-dev
19:56 proll joined #minetest-dev
19:58 RealBadAngel joined #minetest-dev
20:04 prol joined #minetest-dev
20:06 roniz joined #minetest-dev
20:13 proll joined #minetest-dev
20:35 exio4 joined #minetest-dev
20:35 n4x joined #minetest-dev
20:39 Taoki joined #minetest-dev
20:46 paramat joined #minetest-dev
20:47 y joined #minetest-dev
20:50 MichaelRpdx joined #minetest-dev
20:54 proll joined #minetest-dev
20:57 MinerDad joined #minetest-dev
21:05 PilzAdam joined #minetest-dev
21:24 PilzAdam I'm going to merge this typo fix in a few minutes: https://github.com/minetest/minetest_game/pull/381
21:26 y joined #minetest-dev
21:29 shadowzone joined #minetest-dev
21:30 Selah joined #minetest-dev
21:33 shadowzone joined #minetest-dev
21:33 Selah joined #minetest-dev
21:36 exio4 joined #minetest-dev
21:59 MinerDad joined #minetest-dev
22:27 luizrpgluiz joined #minetest-dev
22:42 luizrpgluiz hi
22:51 hmmmm yeah, that's not legal
22:51 hmmmm to copy non-POD types we need to use std::copy
22:51 hmmmm i think the smarter idea here would be to change MapNode to POD
22:54 y joined #minetest-dev
22:54 exio4 joined #minetest-dev
23:07 kaeza joined #minetest-dev
23:11 paramat hmmmm https://github.com/minetest/minetest/pull/2001 can the positional noiseparam format in .conf include lacunarity and flags?
23:41 luizrpgluiz paramat: because you do not create Version 8 map generator in the new version of minetest, the 0.5.0?
23:43 paramat i would like to code v8 or v9, we'll see
23:47 luizrpgluiz :D
23:48 roniz joined #minetest-dev
23:52 shadowzone joined #minetest-dev

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