Minetest logo

IRC log for #minetest-dev, 2013-12-14

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

All times shown according to UTC.

Time Nick Message
00:30 kahrl ShadowNinja: why would you want arrays to be 0-indexed?
00:32 Miner_48er joined #minetest-dev
00:37 werwerwer joined #minetest-dev
00:39 ShadowNinja kahrl: So that write_json({[0]=true}) works.
00:40 VanessaE holy good G*d damn
00:40 VanessaE I just yanked down the ENTIRE 35-some MB remote media for my server in like 10 seconds or something
00:41 VanessaE thanks to kahrl's httpfetch commit that just went in
00:41 ShadowNinja VanessaE: Never underestimate Minetest's slowness. :-D
00:43 VanessaE indeed not :)
00:44 VanessaE well maybe it was 20 seconds, but still
00:44 * VanessaE just tested it again to be sure :)\
00:53 sapier joined #minetest-dev
00:56 sapier ShadowNinja no using 0 indexed things in lua isn't ok, it's completely nonsense as any other lua internal lua datastructure uses 1 based indexing. Adding some things with 0 index will result in confusion and bugs.
01:00 sapier And for what reason do we need a third serialization way? Does this one provide anything that isn't done by marshalling or serialize? And no don't even try to tell json is more readable. That's only some peoples opinion. JSON doesn't even try to be human readable.
01:30 sapier imho there's no reason to have json in scriptapi and only one to have it in menuapi. It was added to menuapi to switch server and modstore data handling completely to lua ... but obviously it's unfinished business, there's not even anyone working at it. IMHO we should remove that useless parse_json. It can be readded once the someone really did implement those parts.
01:31 sapier but I don't assume that'll ever happen. Someone removed color keys promising to add color defines too ... that never happened
01:33 sapier left #minetest-dev
01:51 ShadowNinja This doesn't force you to use zero-based indexes, but it reads and writes those properly.
01:54 ShadowNinja We could convert from the indexing methods, but Lua doesn't disallow zero-based arrays, it just uses one-based ones by default. You only have to prepend "[0]=" to an array to make it zero-based.
02:02 us|0gb ShadowNinja: As much as I prefer indexing from zero, doing so in Lua leads to unexpected behavior. I forget all what it does, but I think it makes the # operator and the ipairs() and pairs() functions iterate incorrectly.
02:03 us|0gb Oops, poor sentence structure. It makes # work incorrectly, but it still doesn't make # iterate.
03:09 ShadowNinja Yes, # returns the highest integer key.  And ipairs starts at 1. But you CAN use zero-based arrays. And IMO the indexes between, eg, Python and Lua should remain the same when serialized/deserialized.
03:36 NakedFury joined #minetest-dev
04:13 thexyz_ joined #minetest-dev
05:57 kaeza joined #minetest-dev
06:05 OldCoder joined #minetest-dev
06:40 eeew joined #minetest-dev
06:46 hmmmm oh i know how we can get rid of cave shadows
06:47 hmmmm when writing cave air to boundary blocks, don't replace air that has a nonzero light param
07:40 us`0gb joined #minetest-dev
08:15 darkrose joined #minetest-dev
09:12 * VanessaE looks at celeron55
09:12 VanessaE is that you on creative?
09:13 celeron55 just testing something
09:13 VanessaE ok
09:13 celeron55 altough i really weren't there because it didn't load (not even close, lol) in that time
09:13 VanessaE just making sure, I see you on there so rarely I can't ever be sure it's really you :P
09:16 VanessaE update your minetest :P :)
09:17 VanessaE kahrl's update made the media fetch lightning fast now, so long as you have cURL
09:59 sapier joined #minetest-dev
10:01 Calinou joined #minetest-dev
10:04 sapier ShadowNinja: it's not a matter if 0 index can be done in lua, it's a matter about programming style. Usually you should programm in a way that is easy to understand and REDUCES risk of false assumptions. Adding some 0 indexed array to a language that nowhere else uses 0 indexes does doe exactly opposit. And yet you didn't answer my second question, is there anything that json style serialization is superior to thoses serializations we a
10:30 Akien joined #minetest-dev
10:45 us^0gb joined #minetest-dev
10:50 sapier https://github.com/minetest/minetest/pull/1036 is now rebased and ready for merge can someone test it an agree to it
10:50 thexyz le epic bugz https://github.com/minetest/minetest/issues/1052
10:51 sapier stack recursion :-) funny
10:52 thexyz I think we should just add "depth" there and limit it to some sane value?
10:53 sapier that sounds like a workaround to me why not cleanup sign texts?
10:53 thexyz what do you mean?
10:54 thexyz ah well, shouldn't it escape them instead?
10:54 sapier that's what I meant with cleaning
10:56 thexyz that sounded like sanitizing, not escaping
10:59 thexyz does this support escaping?
10:59 sapier sorry may have been a missleading wording
10:59 sapier as far as I know not on purpose
11:00 VanessaE does that affect all formspecs that take text entry, or just default signs?
11:01 sapier I guess the text sign is the only one to have text on it ... but of course any formspec, transfering it's text back to scriptapi, may cause that bug
11:02 thexyz well then the hack I suggested would be easier to implement
11:03 sapier I don't like doing a hack that needs to be supported forever ;-)
11:03 sapier I'll have a look how to fix it in a sane way maybe it isn't that much to be done
11:04 sapier argh .... that damn stack is too much for eclipse
11:04 thexyz well, yeah
11:05 sapier ok maybe I shouldn't limit java that much ... but using gdb directly is faster for the moment
11:06 thexyz but to think about it, how many recursion levels does it need?
11:06 thexyz anyone ever using more than one?
11:06 sapier there's no sane reason to add lua variables to that text, you don't see them in game
11:06 VanessaE better to not assume...
11:07 thexyz on the other hand, why is it recursive in the first place
11:07 sapier that's the main question ... guess I can't give eclipse enough memory to hanle this .... 70k recursion depth ... and I haven't reached bottom yet
11:07 thexyz ^ default may contain variable references such as '${text}' which
11:07 thexyz will fill the value from the metadata value 'text'
11:08 thexyz why do you even run it?
11:08 thexyz my point: it shouldn't be recursive
11:08 sapier that's wrong thexyz if you have a look at the singn core will show "${text}" not the evaluated value
11:09 sapier for the sign a $ will only have an effect if you edit the sign again
11:09 thexyz I don't understand you, we're talking about formspecs here
11:09 sapier sorry but how should formspecs ever support $?
11:10 thexyz https://gist.github.com/xyzz/cd045291ebff30293b90
11:10 thexyz whoops
11:10 thexyz a wrong line got there
11:10 thexyz https://gist.github.com/xyzz/75af395c06b6389895f7/raw/6a16a1a386653609324361d0f94094ecb8df73d9/gistfile1.txt
11:11 sapier what the hell? did that feature ever work?
11:12 sapier btw it's not formspec just nodemetadata
11:12 thexyz that's written by darkrose so I should ask her perhaps? : why is resolveString recursive
11:13 thexyz sapier: I think nothing else uses this
11:13 sapier I don't even understand how this is supposed to work?
11:13 sapier what's the usecase for it?
11:13 darkrose signs were
11:14 thexyz what's the usecase for what?
11:14 darkrose info text and text were both set and being used
11:14 sapier but there's shown ${text} on that sign
11:14 thexyz darkrose: why's that recursive instead of https://gist.github.com/xyzz/75af395c06b6389895f7/raw/6a16a1a386653609324361d0f94094ecb8df73d9/gistfile1.txt
11:14 sapier so at least for showing it doesn't work
11:14 john_minetest joined #minetest-dev
11:16 darkrose it's because there was crazy shit like infotext = ${formtext} , formtext = ${text}
11:16 darkrose or something equally ridiculous
11:16 sapier wow stack depth is 150k for that case
11:16 thexyz ah, so there was a use case
11:16 thexyz well then we can't just deprecate it because compatibility!
11:17 thexyz so someone will either have to add a depth param or something like that
11:17 sapier ok despite of that compatibility thing what was that one supposed to do?
11:17 darkrose in any case, it was always meant to eventually be replaced with something that actually supported multiple inline variables "${foo} ${bar}"
11:17 darkrose which it currently doesn't
11:18 thexyz we should also get TCP in then
11:18 sapier was that one meant to show the content of the variable as sign text?
11:18 thexyz sapier: did you read the docs?
11:19 thexyz wait, I even quoted it
11:19 sapier you did?
11:19 thexyz ${var} fetches var from metadata and displays it; useful in formspecs
11:20 sapier ok so it didn't work exactly that way by now too
11:20 Jordach joined #minetest-dev
11:21 sapier what about making "text" a reserved word for variables?
11:22 sapier no I'm for removing it doesn't even work for any variable by now
11:23 thexyz what? how does this solve the problem?
11:23 sapier if there's no evaluation done no recursion can happen
11:24 sapier and there ain't any other forspec element supporting ${} notation
11:24 thexyz why make `text` a reserved world and not `loltext` then? what if someone used `loltext`? will you make `loltext` a reserved word too?
11:24 thexyz what?
11:24 sapier ${var} doesn't cause a recursion
11:24 thexyz I honestly don't understand :(
11:25 thexyz what you mean
11:25 thexyz ${var} could cause recursion too if it's written into metadata field "var"
11:25 thexyz and then displayed
11:25 thexyz in formspec
11:25 thexyz and then you could have stuff like var → ${var2}; var2 → ${var}
11:25 sapier ok if var contains ${var} again ... ok ok you're right
11:26 sapier but still what is it good for?
11:26 sapier it's only evaluate if you edit the sign again and not evaluated if you point at it
11:26 kahrl indeed. var... what is it good for? :P
11:27 sapier so we should at least evaluate it on setting of text better at each case where it's read
11:28 darkrose sanitise user inputs, like a database
11:29 thexyz that's a solution assuming that we want to support those recursive fields; do we?
11:29 kahrl actually the_game calls meta->getString("infotext") which calls resolveString on the result
11:29 kahrl I think the only reason it doesn't replace ${text} is because there's some more stuff around "${text}" in infotext
11:30 sapier maybe but it's not resolved if you point at a sign
11:30 kahrl I just said why
11:30 thexyz meta:set_string("infotext", '"'..fields.text..'"')
11:30 sapier :-) already typed it sorry
11:30 thexyz right
11:34 sapier what about a text based aproach to break recursion?
11:35 Tangocmp joined #minetest-dev
11:35 zweipktfkt left #minetest-dev
11:41 sapier lol can someone explain to me why resolveString uses resolveString uppon a value actually resolveStringed by getString? :-)
11:42 thexyz that's another question
11:43 sapier I don't think that was meant to work that way
11:43 zweipktfkt joined #minetest-dev
11:44 zweipktfkt left #minetest-dev
11:44 thexyz it doesn't matter
11:44 sapier https://gist.github.com/anonymous/7958248 what do you think about this way of solving the recursion
11:45 sapier it does matter for my aproach
11:45 sapier because I'd have to add the check in both functions
11:45 thexyz well, apparently you missed some of my messages
11:45 thexyz [15:25:53] <thexyz> and then you could have stuff like var → ${var2}; var2 → ${var}
11:45 thexyz just fucking remove the recursion and be done with it
11:46 sapier you can always break it on purpose
11:46 sapier this way we keep as much comfort as possible
11:46 thexyz that
11:46 thexyz meh
11:46 thexyz my point is that we don't need recursive string resolving
11:47 thexyz weren't you the one pro-security guy?
11:47 thexyz stack overflow on client is a security bug, no?
11:47 thexyz or you were the pro-privacy one, I don't remember already
11:47 sapier I wonder why it's always wrong if I do support keeping compatibility ;-)
11:48 thexyz you do support client getting crashes
11:48 sapier but ok if you support removing the recursive resolving I'm with you
11:48 sapier the more simple the better
11:49 kaeza joined #minetest-dev
11:50 sapier thexyz ... guess mt-community aversion of security starts to influence my way of patching mt
11:50 thexyz security or privacy?
11:50 thexyz or you don't care and interchange those at times
11:50 sapier hope my privacy concerns haven't been touched by now
11:51 sapier https://gist.github.com/sapier/7958308 without recursion it's this one
11:54 thexyz sapier: yes, i've already posted that in the issue discussion and here
11:54 sapier lol :-)
11:55 sapier ok then merge it
11:56 sapier but it doesn't fix the missing resolution on showing it does it?
11:58 thexyz what?
12:00 thexyz what about the compatibility?
12:00 nore joined #minetest-dev
12:02 Zeitgeist_ joined #minetest-dev
12:06 sapier :-) what's "compatibility"? I vaguely remember I knew a word that sounded similar, but didn't seem to be important to know it ;-P
12:07 VanessaE I think the word you wanted was "combustibility"
12:07 VanessaE :)
12:54 specing Does anyone here run a tiling window manager?
12:54 specing Minetest is flickering intensively while loading stuff
13:21 EvergreenTree joined #minetest-dev
13:26 Gethiox2 joined #minetest-dev
13:32 specing john_minetest: yes
13:37 thexyz this option was removed
13:37 thexyz please ask questions in #minetest
13:43 thexyz please read the /topic of this channel
13:43 thexyz I'm fine with random stuff happening here but users shouldn't really expect an answer
13:45 specing Can you make a #minetest-askdevs channel? The #minetest ones is cluttered with random chatter and I've never gotten an answer in it.
13:51 thexyz then I guess no one knows answer to your problem
13:52 sapier btw if everyone would just ask his questions here we might be forced to switch to a private channel for developmen ... we don't want to do that
13:54 celeron55 that's the exact reason why asking random question isn't allowed here
13:54 celeron55 it does get out of hand
13:55 iqualfragile joined #minetest-dev
13:55 celeron55 +s
13:55 specing thexyz: Then I guess there is no problem if I escalate that question to the devs?
13:56 celeron55 but there won't be a third channel, because people don't like to join that many channels
13:56 thexyz specing: I guess; just don't expect to get any answer
13:56 specing so those can stay in #minetest and clutter that
13:56 zat joined #minetest-dev
13:57 hmmmm joined #minetest-dev
13:57 celeron55 specing: an answer to your question: nobody runs a tiling window manager, and minetest flickers in multiple places independently of that
13:58 specing Ah okay. I was recently watching a friend load it on his windows laptop and it didn't flicker.
13:58 celeron55 it depends on multiple things, including things in irrlicht that we have no control over
13:58 sapier yes I was just posting https://github.com/minetest/minetest/pull/1036 for you to test ;-)
13:59 OldCoder joined #minetest-dev
13:59 sapier if this works for you john_minetest we can remove SimpleThread closing that cleanup issue
14:01 sapier it replaces all internal SimpleThread usages by direct JThread usage. No downloading textures is threaded too as well as generating map
14:02 sapier and loading mapblocks
14:03 sapier but there shouldn't be any (noticable) change as it's a cleanup only
14:20 PilzAdam joined #minetest-dev
14:32 smoke_fumus joined #minetest-dev
14:47 Akien joined #minetest-dev
14:47 PilzAdam ShadowBot, sqlite rollback breaks creating worlds with minetestserver
14:47 PilzAdam * ShadowNinja
14:48 PilzAdam you can reproduce it by running minetestserver with no available worlds; it should create a new world called "world" then
14:50 hmmmm hmm
14:50 PilzAdam oh, it also fails when creating a new world with the --world commandline param
14:50 hmmmm PilzAdam, did that fix for forcing mapgen v7 via lua work?
14:50 PilzAdam hmmmm, which fix?
14:51 PilzAdam ShadowNinja, log: https://gist.github.com/PilzAdam/7960115
14:51 hmmmm remember your pilztest or whatever kept crashing when you set v7 via set_mapgen_params?
14:51 PilzAdam yes
14:51 hmmmm I fixed that about a week ago
14:51 hmmmm and I never asked you if it worked or not
14:52 hmmmm also sapier, https://github.com/minetest/minetest/commit/c3708b456e90bccf19e7c82c54a93c8cb7c8896c
14:52 PilzAdam hmmmm, it still fails
14:52 hmmmm I'll add an example of how to use it to minetest_game through adding chests in dungeons or something
14:52 hmmmm but right now you can use that for mob spawning
14:53 PilzAdam https://gist.github.com/PilzAdam/7960148
14:53 hmmmm just make sure you remember to check if y < 0
14:53 hmmmm crashing in getContainerPos?
14:53 hmmmm chunksize is 0
14:53 hmmmm is that new, or is that related to map_meta.txt not getting created?
14:54 sapier thanks hmmmm I'm gonna add suport for this in adv_spawning, just not right now I'm tracking down a quite strange threading bug within mt core
14:54 hmmmm alright
14:54 PilzAdam hmmmm, its the same crash
14:54 PilzAdam map_meta.txt is not there
14:55 hmmmm can I have your mod so I can test this?
14:56 PilzAdam https://github.com/PilzAdam/nodetopia/blob/master/mods/base/mapgen.lua#L23
14:56 PilzAdam its actually a game and not a mod
14:56 hmmmm what's the point of the seed = params.seed?
14:57 hmmmm if you don't want to modify that mapgen param, just don't set it
14:57 PilzAdam doesnt really matter
14:59 hmmmm also are you really sure about using mapgen v7 for your game?
14:59 hmmmm it's really volatile
15:00 PilzAdam isnt it a good testcase for v7?
15:00 hmmmm hmm
15:00 hmmmm well this isn't good
15:00 PilzAdam its not that Im going to release that game sometime soon
15:00 hmmmm i don't get a crash, instead the map just doesn't generate
15:01 hmmmm john_minetest, I don't know what your error is but if you haven't updated since last week you should
15:02 hmmmm because I just fixed the indev cave crashing
15:02 hmmmm then update
15:02 hmmmm okay then, I guess it's not the same erro
15:02 hmmmm do you have more information about that crash..?
15:03 PilzAdam hmmmm, do you need any more info? I have to go in a few minutes
15:04 hmmmm PilzAdam, I don't
15:04 hmmmm I just find it odd that I don't get a crash
15:04 hmmmm hmm
15:04 hmmmm ahhhhhhhhhhhhhhhhh
15:05 hmmmm it's 0 for you but it's some crazy high value for me
15:05 hmmmm so it tries to generate the entire map all at once
15:07 hmmmm wonder if I should rangelim chunksize and throw an error message for values out of range so people know that there's something wrong
15:08 hmmmm I'm sure there's some moron out there who sets chunksize = 50000 and expects stuff to work
15:18 sapier funny what silly bugs get hidden by some sleep
15:19 sapier e.g. mutexed queue did always use 10ms timeout even if you did specify 0
15:19 hmmmm and that 10ms timeout is actually 15-16ms in most cases
15:20 sapier true
15:20 hmmmm sleeping for 0ms just makes the thread yield for most platforms
15:20 hmmmm are you sure that's what you want?
15:20 sapier I'm replacing sleep by semaphore right now ... so 0 ms will be 0 ms (+ some computational overhead)
15:21 celeron55 hmm, i probably should do some testing of and streamlining command-line server stuff
15:21 sapier two ways to fix the issues. Set 10ms to be minimal timeout or fix the locations where it's called with 0, but 0 isn't really meant
15:22 celeron55 if sqlite rollback fails for that, then probbably other regressions and problems have crept in too
15:22 sapier I'd not be surprised by this celeron55 commandline isn't used that often by developers
15:24 celeron55 it really should be reglarly tested
15:24 hmmmm ahhhhaa
15:24 hmmmm I delete mgparams because I figured nobody else uses it past init, but servermap still has a pointer to it
15:24 sapier testing commandline may be scriptable
15:24 celeron55 john_minetest: if you feel like testing stuff, try doing server stuff on the command line; remove all worlds first and stuff like that
15:25 sapier does servermap need it?
15:25 hmmmm yes
15:25 hmmmm I wouldn'tve designed it so crappily if it didn't
15:25 sapier then you can't delete it of course ;-)
15:25 celeron55 (and see if something doesn't work nicely)
15:25 hmmmm I make initMapgens return a new pointer to mgparams and set that
15:26 sapier john_minetest: all commandline parameters supported by minetest
15:26 celeron55 john_minetest: just imagine yourself being a new server admin and see what goes wrong
15:27 hmmmm hmm
15:28 hmmmm the best way to fix this is to rip out all map_meta.txt related-crap out of ServerMap and give ServerMap the parameters that it actually needs later on when all mapgen parameters have been resolved
15:28 hmmmm the layout of everything was designed in a time when the only parameter was the map seed, and it could only be set in two places, not 8
15:28 Taoki joined #minetest-dev
15:28 celeron55 john_minetest: well okay; sounds like nothing is horribly wrong at least
15:29 hmmmm if there's an actual bug with mapgen indev I'd need more information about it to do anything
15:29 sapier seems shader queue works by pure chance for now ... it passes a bool value as timeout to mutex queue ... no idea why compiler doesn't even do a warning for this
15:29 hmmmm but I will remind you that I'm not responsible for indev at all
15:30 sapier ok actually RequestQueue does pass the bool value
15:32 hmmmm hrmm, I could do a 2 liner fix, or change the structure of ServerMap to handle mapgen params elegantly once and for all
15:37 rubenwardy joined #minetest-dev
15:54 sapier does anyone have suggestions how to fix the allover broken queue processing?
15:55 sapier atm minetest does "if(!empty) then fetch_element(timeout 10ms)"
15:55 sapier that's only gonna work as long one consumer is there
16:11 harrison harrison should never be capitalized
16:13 harrison attn john_minetest
16:19 iqualfragile https://github.com/minetest/minetest/issues/1053
16:34 Calinou joined #minetest-dev
16:41 webguy joined #minetest-dev
16:47 webguy left #minetest-dev
17:01 NakedFury joined #minetest-dev
17:29 sapier john_minetest: https://github.com/minetest/minetest/pull/1054 should be tested too
17:32 zat1 joined #minetest-dev
17:34 us{0gb joined #minetest-dev
17:43 sapier no problem it's not time critical
17:50 sapier is there any reason to prepare shaders and textures in main thread?
17:55 djdduty joined #minetest-dev
18:01 djdduty_ joined #minetest-dev
18:03 damiel joined #minetest-dev
18:03 damiel joined #minetest-dev
18:04 john_cephalopoda joined #minetest-dev
18:05 ecube joined #minetest-dev
18:06 NakedFury joined #minetest-dev
18:06 salamanderrake joined #minetest-dev
18:09 NakedFury joined #minetest-dev
18:12 NakedFury joined #minetest-dev
18:14 PilzAdam joined #minetest-dev
18:16 Guest25368 joined #minetest-dev
18:25 Akien joined #minetest-dev
18:29 john_minetest joined #minetest-dev
18:29 Calinou joined #minetest-dev
18:35 Calinou joined #minetest-dev
18:41 ShadowNinja sapier: Is gettimeofday available on Windows?
18:42 PilzAdam /home/adam/Minetest/minetest/src/client.cpp:58:20: warning: 'std::string getMediaCacheDir()' defined but not used [-Wunused-function]
18:43 sapier It's not used on windows ShadowNinja
18:44 sapier why is media cache dir not used?
18:45 bas080 joined #minetest-dev
18:47 sapier any comments abaout splitting server.cpp to multiple files?
18:47 sapier especialy about moving command processing to separate functions
18:48 PilzAdam #1050 seems ok to me
18:48 ShadowBot https://github.com/minetest/minetest/issues/1050
18:49 PilzAdam should we leave 255 as default value?
18:50 sapier imho latest shadow is a little bit to hard but that's a matter of taste
18:51 PilzAdam 255 is for blind people ;-)
18:51 sapier short "I'd prefere 128"
18:52 PilzAdam I would prefere 128 too
18:52 sapier guess blockmen preferes 128 too he wouln't have added that feature if not
18:52 PilzAdam should we ask thexyz since he added the shadows?
18:53 ShadowNinja I tweaked this(moved two pieces of code to one place and fixed trailing whitespace). Does it seem good? https://github.com/minetest/minetest_game/pull/221
19:01 ShadowNinja PilzAdam, sapier: *poke*
19:02 cmme joined #minetest-dev
19:02 cmme how is time of day calculated?
19:04 PilzAdam ShadowNinja, seems good
19:04 ShadowNinja cmme: What do you mean? It's just incremented by time_speed every second, or something like that.
19:06 cmme ShadowNinja: I got the bug where the time of day goes way too fast to reproduce
19:06 cmme (sfan5 here btw)
19:08 cmme this one: https://github.com/minetest/minetest/issues/143
19:14 ShadowNinja cmme: Hmmm, /set time_speed 50 does nothing?
19:14 Weedy_lappy joined #minetest-dev
19:14 cmme no
19:14 Weedy_lappy joined #minetest-dev
19:15 ShadowNinja Line shortening: http://ix.io/9mJ Anyone to appreve?
19:18 sapier user ...
19:19 ShadowNinja sapier: Hmmm?
19:20 sapier you do call user: again without checking it for nil, if you do things like that in functions that do it whenever they use "user" before verify it isn't necessary and remove it there too ... or check it first
19:20 ShadowNinja What do you think of a function like minetest.override_item("default:stone", {light_source=5})
19:21 ShadowNinja sapier: Yes, placing is valud, although its rather odd to place a bucket rather than the source.
19:21 ShadowNinja +with a nil placer
19:21 sapier then remove the nil check at the other locations too
19:21 rubenwardy In builtin lua scripts, right, ShadowNinja?
19:21 Exio4 cmme: /set time_speed 0?
19:22 sapier it's quite insane to have a function beeing inconsistent within 100 lines
19:23 ShadowNinja rubenwardy: Yes, that would be a builtin function.
19:23 sapier what is that function supposed to do ShadowNinja
19:23 ShadowNinja I included a user check. (You can't place without a user)
19:23 Exio4 add "light_source=5" to default:stone
19:23 sapier are you sure that a entity is unable to place another entity?
19:24 ShadowNinja sapier: Allow you to override previously defined nodes, to do something like ^. (although that obviously isn't what it's usually used for)
19:24 sapier someone thought it'd not be possible to punch something without a puncher, but that's absolutely possible
19:25 ShadowNinja sapier: You can call any function with any arguments that you like. But if you call it incorrectly there isn't really anything that can be done.
19:25 sapier I'm not sure if this really is that helpfull, overriding nodes may cause undefined behaviour
19:25 ShadowNinja sapier: Many mods use a more ugly version of this because it's the only way.
19:25 sapier placing something by noone isn't a exotic case
19:26 ShadowNinja sapier: Yes, I know.
19:26 ShadowNinja I added that tweak to my line shortening. Approval?
19:26 sapier modders doing things wrong isn't a good reason for making doing things wrong even more easy ;-)
19:27 sapier maybe we should try to find a safe way doing it
19:27 ShadowNinja sapier: So, can you approve my tweaks?
19:27 sapier e.g. if multiple mods override same node last one will win ... you can't predict who will be last
19:28 ShadowNinja sapier: Exactly, this method would only override the fields specified, not the whole node as some mods do.
19:28 sapier 221 doesn't contain nil check yet
19:28 jin_xi joined #minetest-dev
19:28 ShadowNinja ...
19:29 ShadowNinja sapier: I just added it locally and am waiting for approval.
19:29 sapier line shortening is fine merge it
19:29 sapier if you added user ~= nil check at those three locations it's used merge it
19:30 ShadowNinja I added "if not user or <protected> then return end"
19:30 sapier no
19:31 sapier this way it'll prevent placing by non user things
19:31 cmme Exio4, doesn't help
19:32 ShadowNinja sapier: Yes, we can't check protection without a user.
19:32 sapier then we need to find a way to do so, the way you do it now will result in non user placers generally beeing unable to place anyting
19:33 sapier even if there isn't any protection
19:34 ShadowNinja Yes, but you shouldn't be placing buckets in a mod, you should be placing sources directly.
19:34 sapier you shouldn't do a lot of things
19:34 ShadowNinja Another option is "user and user:get_player_name() or ''"
19:35 sapier guess that wouldn't stop placing at non protected areas (hopefully protection is implemented correct)
19:36 sapier if protection can handle "" this might be working solution
19:36 ShadowNinja Maybe I should note that "" is a valid player name and should be handled as hasOwner().
19:37 sapier "" is a valid playername? really?
19:37 Exio4 cmme: 32bit or 64bit?
19:37 ShadowNinja But AFAIK only my mod uses the protection API, and it will work with it.
19:37 cmme Exio4, 32
19:37 ShadowNinja sapier: No, I mean it is a valid value to pass in the name field of is_protected.
19:39 Exio4 hm
19:39 Exio4 i don't have a 32bit VM for testing
19:39 Exio4 but in my 64bit setups i wasn't able to reproduce the bug :(
19:39 sapier oh yes of course could be helpfull to comment what "" is good for
19:40 ShadowNinja sapier: Alright, so good to push like that?
19:40 sapier yes merge it
19:41 Taoki If anyone's doing GIT pushes, please add my colored fog too. RBA hasn't had the time to look at it yet, and really... it's all good as is!
19:41 PilzAdam Taoki, I still dont like it
19:42 Taoki Surely more likable than the current static fog
19:43 sapier can you post a link to your pull request taoki?
19:44 Taoki It will also be improved when RBA adds texture gradients for sky, which will also adapt this
19:44 Taoki Sure, hold on
19:45 Taoki sapier: https://github.com/minetest/minetest/pull/799 And lots of screenshots in the last posts of this thread: https://forum.minetest.net/viewtopic.php?id=6375
19:45 sapier ShadowNinja:  I just discovered my irc client supports tab completion and now you add a bot breaking that comfort feature again ;-)
19:45 PilzAdam it looks nice in the screenshot, but its weird in-game
19:45 Taoki BTW. proller merged it into his own minetest fork.
19:45 Taoki I find it even nicer in-game ^^
19:46 sapier guess fog colour isn't direction dependent?
19:46 Taoki I also reduced the intensity of the blend soon after the effect was said to be too strong, so it's even better now than at first
19:46 Taoki sapier: Not yet, my patch does that
19:46 Taoki During sunrise / sunset, and adds beautiful foll sky coloring
19:46 Taoki **full
19:47 sapier I'll have a look at it once I completed preparations for server.cpp split ... I really hate 5.5k files
19:47 Taoki http://i43.tinypic.com/oh8vgk.png ---- http://i41.tinypic.com/2r7otxu.png
19:48 Taoki sapier: Ok, thanks. Hope you can come to a decision... code's waiting for 6 months. Many approve of it too
19:48 Taoki Also, it's a very simple an deasy to tune formula. Can always be changed and adapted without effort
19:48 ShadowNinja sapier: Hah. >:-) Get a client that tabs to the client that most recently spoke maybe. :-)
19:50 PilzAdam ShadowNinja, that doesnt work always
19:50 PilzAdam Taoki, many approves and many "no"s too
19:50 kaeza many "no"s for personal non-technical reasons *
19:51 PilzAdam well, the approves are for personal non-technical reasons too
19:51 Calinou joined #minetest-dev
19:51 sapier if you wan't to avoid the personal things make it configurable
19:52 sapier e.g. add a "colored fog" setting
19:52 Taoki I don't know if for something this simple a setting makes sense\
19:53 Taoki Mainly since it's not something that should actually bother anyone. Even if some thing it could be done better (which it can, changes to the sky and sky colors are planned)
19:53 Taoki **think
19:53 sapier obviously it's a taste dependent thing ;-)
19:53 ShadowNinja Heh, diffs of diffs can be confusing. Does this look good? https://gist.github.com/ShadowNinja/7953481
19:53 Taoki Yeah
19:54 ImQ009 joined #minetest-dev
19:54 PilzAdam Taoki, well, then improve it so that it doestn bother people anymore
19:54 sapier You didn't give a single reason for adding a third serialization method by now ShadowNinja
19:54 Taoki Anyway, I'd be surprised if anyone really thinks they're worse than the current fog, even if the colors or blending aren't perfect either. The world looks pretty... dead with the current simple fog
19:55 Taoki PilzAdam: I improved it a lot last time. Don't think anyone else finds it bothering with the current settings any more
19:57 ShadowNinja sapier: AFAIK this is only a second. And it compliments parse_json and allows you to generate and use more portable tata. (Most languages have a way to parse json, most don't have a(easy) way to parse Lua code)
19:57 sapier minetest.serialize and marshall
19:57 ShadowNinja data*
19:57 sapier marshall is required for function serialization
19:58 ShadowNinja sapier: Is marshal private to the mainmenu?  Is it Lua-specific?
19:58 sapier and why not add xml serialization ... next maybe xls ... doc .. docx .. odt
19:58 sapier no it isn't mainmenu specific
19:59 sapier it'll have to be available to scriptapi too once async is added there
19:59 ShadowNinja sapier: Because that adds a lot of dependencies and is harder and less supported. And marshal isn't documented in enther doc file, so it's currently private and only for internal use.
19:59 sapier don't get me wrong if we have anything we need json writing it's no question to add it ... but not for sake of supporting json writing too
20:00 sapier json isn't even a readable settings format
20:00 * ShadowNinja disagrees, although Lua syntax is better. But this isn't for settings.
20:01 sapier then what's lua export for? a feature that has no usecase isn't worth beeing added
20:01 sapier -lua export + json export
20:02 ShadowNinja Writing data to streams that can be read by other programs.
20:03 sapier that'd require an official way to exchange data with minetest do you intend to writ this way?
20:04 ShadowNinja I see no need for an official way to exchange data with mods. But JSON is a good way to do it.
20:05 sapier you keep telling general things but don't tell any actual usecase
20:07 sapier and exchanging data in a text format isn't a good idea for big data so this is limited to small amounts of data anyway
20:08 sapier but there are more core developers in here is someone else available having any opinion to this topic?
20:11 PilzAdam Im gonna merge #1050 with a default of 128 now
20:11 ShadowBot https://github.com/minetest/minetest/issues/1050
20:22 Taoki I was wondering: Is there a way to further improve fluid physics? With and without finite liquids. Asking because I when I go on a public server where a lot of stuff was built, I see really messy fluids. More like blue lines and blocks floating around pointlessly, holes in water, etc. Fluid never arranging itself properly
20:23 Taoki In some cases of course, in others it flows well
20:23 Taoki Holes in water are one problem. Sometimes caused by fluid not filling a gap it seems
20:29 VanessaE um..wut?  http://pastebin.ubuntu.com/6574420/
20:30 sapier I assume nf_conntrack is not caused by minetest? If it is congratulations you've been hacked
20:31 VanessaE ignore that first line
20:31 VanessaE copy&paste excess.
20:31 sapier ok :-)
20:32 sapier reproducable?
20:32 VanessaE I would have to say so given that this is roughly two days' worth of uptime shown there.
20:33 Taoki Oh... I can also confirm the daytime cycle bug mentioned earlier. A day or night lasts for about 10 minutes for me. Clearly faster than normal
20:33 VanessaE (and that I saw half a dozen unexplained, un-logged restarts of one of my servers, perhaps the least-used one of the bunch, in my backscroll from while I was afk)
20:33 sapier ok so this isn't a single error but some segfaults
20:34 VanessaE segfaults and whatever the hell a trap divide error is (divide-by-zero?)
20:34 Exio4 Taoki: the daytime cycle bug is like /set time_speed 7000 or some insane high value
20:34 sapier first guess is division by zero
20:34 Taoki Exio4: Normally I use /set time 6000 to get the sun to sunrise
20:35 Exio4 /time 6000, not /set time 6000
20:35 PilzAdam Taoki, no, you use /time 6000
20:35 VanessaE ^^^ those kinds of divide-by-zero has surely gotta be in the engine, not in Lua, or it would throw a proper Lua error, no?
20:35 Taoki Ah wait, I misread. Yeah
20:35 Exio4 if the whole day-night cycle lasts less than a minute, it is the bug in that issue
20:36 Exio4 if not, you are good
20:36 sapier luajit? maybe not
20:36 sapier I know a lot of cases where a lua error results in instant game crash
20:36 VanessaE regarding the daytime cycle bug:  if you reduce the value to slow down the clock, you sometimes cannot increase it again without a restart - or at least that used to be the case.
20:36 VanessaE that ^^^^ btw is dmesg output
20:37 john_minetest left #minetest-dev
20:38 sapier if you had a binary with debug information we coul have a look at that the faulting address(es) it seems to be constant
20:43 kaeza joined #minetest-dev
21:00 Akien joined #minetest-dev
21:05 sapier1 joined #minetest-dev
21:06 daswort joined #minetest-dev
21:18 Akien joined #minetest-dev
21:36 Warr10241 joined #minetest-dev
21:49 sapier https://github.com/minetest/minetest/pull/1056 any comments to this one?
21:52 thexyz sapier: I think we should also delete those #if 0/#if 1 blocks
21:53 thexyz don't understand their point, maybe someone could explain?
21:53 sapier ok
21:53 sapier I'm always for deleting unused things :-)
21:56 thexyz also could someone explain why does RealInputHandler https://github.com/minetest/minetest/blob/master/src/main.cpp#L376 have virtual members?
21:56 sapier I did not see that goto in there ....
21:57 thexyz what?
21:58 sapier I didn't see anything in server.cpp :-)
21:59 thexyz ah, well, how else would you break out of two-depth for?
21:59 sapier ok removed all dead code
21:59 sapier I didn't see anything ;-)
22:00 sapier that damn server.cpp is still 3k+ files
22:00 sapier ok it was 5.5k+ lines before
22:01 thexyz there's also some commented code but I guess that's not much
22:01 PilzAdam sapier, if you already break all pull requests you can also just run astyle on it
22:01 sapier there's a todo within that comment I guess we should find out what this was about prior removing it
22:02 sapier prior running astyle I demand full definition of coding style
22:02 VanessaE oh G*d this lag has gotta stop, or there has gotta be a way to make clients less sensitive to it! :(
22:02 sapier I don't want to use astyle defaults for everything undefined
22:02 ShadowNinja sapier: The astyle conf I wrote defines it.
22:03 thexyz ShadowNinja: any code sample?
22:03 thexyz really interested
22:03 thexyz also I guess you can add style check to our travis build?
22:03 sapier which most likely wont match to my default eclipse style configuration nor any other ide's preconfiguration ... this is true for all styles of course
22:03 thexyz so that pull requests which don't follow it get build failure
22:04 ShadowNinja thexyz: rollback.cpp is run through it.
22:04 PilzAdam ShadowNinja, where is your config?
22:04 thexyz oh wow that's awful
22:04 ShadowNinja http://ix.io/9mO
22:04 sapier so we use "if() {" and "for() {" notation now?
22:05 thexyz no way, wtf is that?
22:05 ShadowNinja "if () {"
22:05 thexyz std::string loc                = row.location;
22:05 thexyz std::string locType        = loc.substr(0, loc.find(":"));
22:05 thexyz really? why spaces?
22:05 sapier now that I got used to writing if () \n{
22:06 PilzAdam sapier, hmmmm would say that newline before a { is a "celeron thing"
22:06 ShadowNinja thexyz: Users have differen't tab widths, you need spaces to keep it cpncistent.
22:06 ShadowNinja consistent*
22:07 thexyz ShadowNinja: wat?
22:07 sapier I don't care whos thing this is I got forced to write it this way many times and now you tell me switch again? ... write that FULL style definition and make it rule to rely on
22:07 PilzAdam ShadowNinja, eh, the line thexyz posted uses tabs not spaces
22:07 thexyz ShadowNinja: I don't understand why is there a random bunch of spaces in the middle of the line
22:07 sapier ShadowNinja: users have different fonts to you don't have a chance to keep it consistent
22:07 thexyz also, what's that style called?
22:07 thexyz or did you make it yourself or what?
22:07 ShadowNinja PilzAdam: Oh, that should be changed. thexyz: Alignment, it looks nice.
22:08 thexyz shit man
22:08 thexyz let me send you a screenshot if you fail to understand
22:08 ShadowNinja thexyz: It's the Linux kernel coding style.
22:08 thexyz but linux kernel is in C
22:09 PilzAdam ShadowNinja, t0
22:09 PilzAdam vb
22:09 PilzAdam kh
22:09 PilzAdam uz
22:09 PilzAdam ztzzrTUt
22:09 ShadowNinja Yes, exactly. Minetest is in C and C++, which share syntax.
22:09 PilzAdam vh
22:09 thexyz ShadowNinja: yes, no
22:09 ShadowNinja ?
22:09 thexyz ShadowNinja: what's aligned here: http://i.imgur.com/yWQA5fh.png
22:09 thexyz I fail to understand how can a language without classes share syntax with a language with classes
22:09 thexyz esp. since you have class methods formatted differently than functions
22:10 ShadowNinja thexyz: That should use spaces, fix it if you want.
22:10 thexyz (when defined inside a class)
22:10 sapier it's not using spaces in there thexyz
22:10 thexyz ah, I understand
22:10 sapier if this passed astyle astyle is broken
22:10 thexyz we're mixing tabs with spaces and other shit
22:10 ShadowNinja thexyz: Classes == C structs.
22:11 thexyz ^ top lel
22:11 thexyz while assuming tabs are constant width
22:11 PilzAdam oh, I should lock the screen when my brother is in the same room and I walk away...
22:11 ShadowNinja Heh.
22:12 sapier ShadowNinja: did astyle accept those tabs in there?
22:12 thexyz https://github.com/minetest/minetest/blob/master/src/rollback.cpp#L951 function () { https://github.com/minetest/minetest/blob/master/src/rollback.cpp#L84 function ()\n {
22:12 ShadowNinja sapier: Seems so.
22:12 thexyz could you explain that?
22:12 PilzAdam "tab=8"?
22:13 ShadowNinja thexyz: One's in a class.
22:13 sapier pilzadam I already mentioned that one ;-)
22:14 ShadowNinja PilzAdam: Yes, that's the tab width that it assumes for code that uses tabs for alignment.
22:14 PilzAdam in some old code style guideline we said that tabs are 4 spaces
22:14 sapier actually I guess this is used for spaces on two line function parameter alignment
22:14 PilzAdam also whats up with line 511 & 512 in rollback.cpp?
22:15 sapier two tabs a 8 spaces?
22:15 PilzAdam that looks weird
22:15 sapier true
22:15 PilzAdam just 2 tabs would be ok
22:16 ShadowNinja That's supposed to have braces...
22:16 sapier I don't like spaces for follow up parameter alignment at all ... of course tabs break too but less likely
22:17 thexyz ShadowNinja: so we have linebreaks for stuff in a class but not for functions outside of a class?
22:17 thexyz ShadowNinja: is there anyone else using C style for C++ code?
22:18 thexyz where's celeron with his "utter nonsense" when we need him
22:18 ShadowNinja thexyz: The reverse, but I'm not sure if the in-class newlines are defined.
22:18 PilzAdam "Invalid option file options: max-code-length=90"
22:18 thexyz ah, right
22:18 ShadowNinja PilzAdam: Update your astyle.
22:19 PilzAdam its the version in the ubuntu repos
22:19 thexyz how about actually using C++ style?
22:19 thexyz if so you want for whatever reason
22:19 ShadowNinja thexyz: What C++ style?
22:19 PilzAdam "Artistic Style Version 2.01" what do you have?
22:20 ShadowNinja C style mostly applies to C++ too.
22:20 thexyz ShadowNinja: some C++ style, I'm not sure about what are there out
22:20 ShadowNinja PilzAdam: It's one .1 out of date...
22:20 ShadowNinja 2.03.
22:21 thexyz ShadowNinja: it doesn't
22:21 thexyz C++ is mostly C
22:21 thexyz there, I said it
22:22 thexyz or, rather than that, C is mostly C++?
22:22 thexyz anyway, while we're talking about some random crap: how do you think android controls should behave?
22:23 sapier that's a good question ;-)
22:23 ShadowNinja Check the MC controls. :-D
22:24 ShadowNinja I've used MCPE, and the controlls were good.
22:25 thexyz alright, I planned to do something similar
22:25 thexyz but the problem is that MT's got rightclick
22:26 sapier isn't there any other button to use?
22:27 PilzAdam ShadowNinja, I get this when running astyle with your conf on rollback.cpp https://gist.github.com/PilzAdam/7965780
22:27 PilzAdam thats not good
22:27 thexyz adding buttons is a bad solution since android port shouldn't use the crosshair in the first place
22:27 sapier maybe we should write a n900 edition it's got 43 buttons
22:28 sapier + touchscreen
22:28 sapier my laptop uses multitouch detechtion on touchpad for rightclick
22:28 Taoki VanessaE: I noticed your server has doors with open / close sounds. If those sounds are freely licensed, can you link me to them please? I'm planning to make a patch to minetest_game and add more sounds by default, doors being one thing
22:29 sapier once you adopted to this it's quite usable
22:29 Taoki If they're CC, they would do nicely for minetest_game
22:31 thexyz I guess I'll go with doubleclick
22:32 ShadowNinja PilzAdam: Yes, I intentionally altered the SQL statements to be more readable.
22:33 PilzAdam it replaces tabs by 8 spaces each
22:33 sapier I like taokis colored fog
22:34 ShadowNinja PilzAdam: It aligns the string with the ( of the function.
22:35 PilzAdam ShadowNinja, is there a way to tell it to just use 2 tabs?
22:35 proller my astyle config for minetest -  astyle --style=attach --indent=tab --keep-one-line-blocks --keep-one-line-statements --indent-classes --pad-oper *.cpp *.h
22:36 ShadowNinja PilzAdam: Maybe, but I don't know of it.
22:39 PilzAdam proller, why does that use 2 spaces to indent classes?
22:39 sapier ok guy this style issue started for server.cpp split I don't asume we can define a style everyone accepts in half an our
22:39 PilzAdam *tabs
22:39 proller maybe remove  --indent-classes
22:40 proller here must be accepted only one style in astyle config format
22:40 proller for me - very bad idea to split server.cpp with code change in one commit
22:41 sapier I did not do any code change
22:41 ImQ009 joined #minetest-dev
22:41 proller and remove unused bad too
22:41 PilzAdam proller, your config has the same issue as ShadowNinja's
22:41 proller best way - one commit for split only, and other for cleanup
22:42 sapier no not bad we have a version control tool if there's any code lost we need you can find it there
22:42 proller PilzAdam, astyle is stupid. but best for c[++]
22:43 proller sapier, this tool cant automatically merge splits like your
22:43 sapier it's two commits right now
22:43 sapier so it can be done
22:44 PilzAdam so I guess that means no astyle for now
22:45 sapier to use astyle we first need to define precisely what style minetest is supposed to use
22:45 PilzAdam sapier, the style will be defined by astyle then
22:45 sapier thats crap
22:46 PilzAdam why?
22:46 sapier next version of astyle will use different defaults then we need to switch everything again
22:46 PilzAdam we dont use defaults
22:46 sapier if you don't use defaults you can write that style down too
22:46 blaaaaargh joined #minetest-dev
22:47 PilzAdam what?
22:48 sapier if you don't use default you specify something, whatever something is can be written as minetest style definition
22:48 PilzAdam http://ix.io/9mO like this?
22:49 sapier no in a way you know what to do ;-)
22:49 sapier style=linux ... you don't use default ... yes
22:51 proller max-code-length=90 whyyyyy?
22:52 proller why not 140?
22:52 sapier because 80 isn't enough for lots of ppl
22:52 PilzAdam and 140 doesnt fit into my editor
22:53 sapier not everyone has a 24" display proller
22:54 proller i have 160 on my 15" old notebok
22:54 PilzAdam I dont maximize my editor
22:55 sapier 140 lines don't fit in eclipse with all usefull windows around
22:55 PilzAdam sapier, read the manpage of astyle if you want your guideline
22:56 sapier it's you wanting to define a guideline either define it in way people can follow it or live with noone complying to it
23:00 proller 193 cols in editor...
23:00 sapier proller no
23:02 thexyz PilzAdam: wat
23:02 thexyz that's your problem
23:02 thexyz and i print code on my toilet roll and only 80 characters fit so let it be
23:02 sapier 90% of all lines are way below 80 lines just to have that single long line on screen you waste space on screen that can be used way better. e.g. for outline debugging variables file selector ...
23:03 thexyz why the hell don't you maximize your editor and why is that our problem?
23:04 Miner_48er joined #minetest-dev
23:05 sapier of course you don't care about code readability ... forgot about that ... and noone else will ever have to fix bugs in your unreadable code
23:06 sapier I don't care if it's 80 85 90 or 95 but 140 is crap it's way beyond typical line length
23:07 sapier any code that needs that much code in a single line is broken by design
23:11 celeron55 i don't understand why someone wouldn't edit code on two columns
23:12 celeron55 seeing the same file on two positions at the same time is something i couldn't code without
23:12 harrison because Man stands at the apex of his two legs atop all Creation?
23:12 PilzAdam thexyz, I dont want the editor to block the whole screen
23:12 PilzAdam feel free to buy me a second monitor
23:13 sapier second monitor doesn't help pa
23:13 celeron55 and doing that requires a maximum line width of around 80 on most screens (on a desktop screen i have two source file columns and then even more stuff on the side)
23:13 sapier you've got a limited angel of view
23:13 thexyz oh well
23:13 thexyz anyway, I guess that's our most important problem for now so I'll just stop talking here and wasting time instead of, well, coding stuffs
23:14 sapier ;-) true coding style isn't as bad to need immediate action
23:14 celeron55 if anyone intends to code stuff, then code stuff; it's not like anyone is against it
23:16 PilzAdam .... I cant find an option to say it should use 2 tabs when breaking lines
23:16 celeron55 astyle can't do that? that's pretty poor
23:17 thexyz the problem is that because of those people things won't get merged as fast as they could be
23:17 PilzAdam yes, its all about speed here
23:18 sapier no it's about testing ... only one really intensively testing things is john_minetest ... we have more coders than testers can handle
23:18 thexyz anyway, what was the reason someone suggested to have *that* uniform code style?
23:19 sapier server.cpp split
23:19 sapier https://github.com/minetest/minetest/pull/1056
23:19 Taoki Oh, BTW. I figured out a way in which we can (theoretically) do proper hardware lighting in Minetest :)
23:19 Taoki Bt using deferred lighting
23:20 Taoki Really need to bring it to RBA when he's back
23:20 PilzAdam thexyz, the problem with switching to a uniform code style is that we will break pull reuqests; if a split like this already does this then we can also just start using the uniform code style
23:21 sapier yes but we can't define a precise code style on the fly
23:21 Taoki The idea is: You would do a render pass without any lighting and shading (just the textured geometry at full brightness). Then, you would do a black & white render pass with the geometry affected by param1, where fully white is sunlight and fully black is no lighting. Then you do the normal hardware lighting pass. You multiply the light pass with the param1 grayscale pass, and boom... you have mas
23:21 Taoki ... masked lighting :)
23:22 Taoki And of course, the result applied over the normal textured geometry pass
23:22 thexyz PilzAdam: I know the problem with it, I don't know what's the *reason* to do it
23:22 sapier I don't understand much about 3d graphic but wouldn't that make 3 renderings instead of 1?
23:22 Taoki The "param1 light map" can such be used to cut the influence of hardware lights, keeping sunlight from shining in caves and such
23:23 PilzAdam thexyz, so you dont see why we need a uniform codestyle?
23:23 Taoki sapier: Deferred rendering does that, and uses multiple passes
23:23 celeron55 i have never been and neither am i now an advocate of formatting tools
23:23 Taoki Obviously it can be slower in some senses.
23:23 sapier PilzAdam I think it'd be nice to have it but I don't think we NEED it
23:24 sapier taoki is it possible to do a proof of concept implementation for this one?
23:24 Taoki http://en.wikipedia.org/wiki/Deferred_lighting Good description. See example images to the right also
23:24 Taoki sapier: That link shows images of what I mean exactly
23:24 thexyz PilzAdam: I don't see any reason to use THAT uniform codestyle
23:25 thexyz like, using tools to force it, etc
23:25 Taoki And I don't know how to do it myself sadly.
23:25 thexyz that's not python
23:25 thexyz there's no pep8
23:25 Taoki Will need to talk to RBA about it, see if multiple render passes can be done in Irrlicht easily
23:25 PilzAdam well, the benefit of tools is that we can just run it on the current code; otherwise someone has to go through it manually
23:25 PilzAdam also automatic cheks etc.
23:26 sapier problem with automated tool is you have to do it once for everything
23:26 thexyz hm.. that's true
23:26 thexyz but then we'll need a style for everyone to agree on which is impossible
23:27 PilzAdam we had it many times in the past that core devs had to manually correct code style in pull reuqests; tools would speed the procces up
23:27 PilzAdam thexyz, we just need a majority to agree
23:27 thexyz that probably was because it was terribly broken
23:28 thexyz majority of who?
23:28 PilzAdam core devs?
23:28 sapier relative? absolute? 2/3 majority?
23:28 thexyz or people who actually code stuff? like kahrl, hmmmm and sapier
23:32 * Taoki codes stuff too. But more rarely... due to lack of knowledge and also not knowing when something I do will be accepted or not
23:33 sapier I didn't want to start a useless discussion about coding style if that's the only way to split server.cpp just forget about it
23:37 Taoki What categories and for what reason is server.cpp being split?
23:37 kahrl meh, at this point I don't care about where braces go
23:37 sapier processing of received messages and by topic (at least for topics that are big enough)
23:38 sapier basicaly particle spawning hud and remote client
23:38 Taoki Ok. That makes some sense, so I'm tempted to think the idea is good
23:39 sapier I thought about spliting message sending too but might result in moving everything resulting in a file as big as before

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