Time Nick Message 17:48 rubenwardy Has it been decided against a builds and builds help section? 22:16 hmmmm proller, are you around? 22:16 proller moo 22:16 hmmmm hey i'm gonna try to get some stuff done and i never did finish what I started from before 22:17 hmmmm how would you feel about separating the getHumidity/getHeat into the part where the values are computed and where they're assigned to the block and updated 22:17 hmmmm and the computational part of it will go in biome.cpp 22:18 hmmmm previously, I tried putting it into environment.cpp and it just doesn't work out there... keep in mind i'm trying to come up with the best possible design, not merely something that 'works' 22:18 proller good, if it works 22:19 proller biome-defined calculation can be better 22:19 hmmmm well, even though it'd go into biome.cpp, it won't be directly related to biomes (at this point anyway) 22:19 hmmmm the built-in biomes need work anyway. 22:20 proller its idea for future 22:20 hmmmm ya ya 22:48 proller i want to merge ton of my pulls 22:51 hmmmm the last one, what does sqlite3 default to? 1 or 2? 22:51 hmmmm oh nevermind, it is full 22:52 hmmmm i just can't read 8) 22:53 hmmmm you can make that sqlite3_exec line neater by separating (std::string("PRAGMA synchronous = ") + itos(g_settings->getU16("sqlite_synchronous"))).c_str() 22:54 hmmmm turn that into std::string querystr = std::string("PRAGMA synchronous = ") + itos(g_settings->getU16("sqlite_synchronous")); then replace that huge thing with just querystr.c_str() 22:54 proller ok 22:54 hmmmm seriously, lines cannot be over 90 columns 22:54 hmmmm it's NOT difficult to meet that requirement 22:55 hmmmm actually the rest of that source file doesn't look like it obeys the 90-column-hard-limit rule 22:56 hmmmm i guess there's something that needs to be cleaned up sometime soon 22:58 proller 90 is small 8( 22:59 proller for 80-90 tab must be 2 chars 22:59 Exio4 not really 23:00 Exio4 it could be 8 chars and you'll be still fine 23:00 hmmmm all of my code is at most 80 columns, and all of it is definitely below 90 23:00 hmmmm i don't find that difficult 23:00 proller my fixed 23:00 Exio4 you can just use newlines and don't over-complicate the algorithm :P 23:01 proller don't over-complicate the algorithm - imposible 23:01 proller you cant do good thing without complicate 23:01 hmmmm erm 23:01 hmmmm what he means is to not have functions like f(g(x)) if they make the line too clong 23:01 hmmmm s/clong/long/ 23:02 hmmmm just break it up into y = g(x); f(y); 23:02 proller its not problem, but what with lot of "for () {if () { ...... 23:03 Exio4 you should rethink it a bit or try to split the problem into multiple small ones 23:03 proller splitting to lot of useless functions is bad 23:03 Exio4 why? 23:03 hmmmm there's a happy medium between a lot of useless functions, and one big 140 column line 23:03 proller its less readable 23:04 Exio4 hmmmm: obviously, you shouldn't overuse it either 23:04 proller and no sense to make function if it called from one place 23:04 proller usually ir requires lots of enviroment data 23:04 Exio4 it makes the code easy to mantain in a future 23:05 kahrl there are functions in minetest that are called from 0 places 8) 23:05 proller no. 23:05 proller sometimes you must pass 10+ params to it 23:05 Exio4 proller: one big function of 120 lines or 5 functions of 20 lines each 23:05 lanxu Don't worry about the style at this point. Just do it! :P 23:05 Exio4 then those "params" should part of the private data of the class? 23:05 kahrl proller: then maybe put them in a struct or class 23:05 Exio4 should be * 23:06 proller Exio4, if they make one thing - one function better 23:06 Exio4 lets merge all the code of the server into one function 23:06 Exio4 it is "one thing" too 23:07 Exio4 but yeah, this is useless instead of coding 23:07 proller you java programmer? 23:08 lanxu there is about ~100k lines in minetest (c++ and h). The main() would be awesome ;D 23:08 Exio4 haha 23:08 Exio4 proller: C and lover of the FP 23:09 Exio4 just separate the procedure that gets deep-nested into small functions that make the code readable 23:11 proller its theory 23:15 Exio4 make it shine in practice 23:17 lanxu Isn't 80 character hard limit more common than 90? 23:17 Exio4 it is a "soft limit", if needs some extra chars, it can go "up to" 90 23:17 Exio4 s/"//g 23:18 kahrl I use a three tier soft limit 23:18 lanxu It is important than I can read the code from my 30 years old terminal with 80 character limitation ;D 23:18 kahrl usually I code with tab size 8 and try to stay under 80 columns 23:18 kahrl if that doesn't work I change to tab size 4 23:18 kahrl if I still can't do it I try to stay under 90 columns with tab size 4 23:20 * proller use 160 limit 23:20 lanxu I actually don't worry about the limit at all, but I can detect that something is wrong with my code if it goes over 120... 23:21 Exio4 i'll use a 318 chars limit 23:21 kahrl proller: ok, but use wide characters that take up 2 columns each ;) 23:21 Exio4 (what i can fit on my screen) 23:21 lanxu "Nice, 6 nested loops! exactly what I wanted!" 23:22 Exio4 you missed the "hmm, I think I need other pair of nested loops there" 23:22 lanxu haha 23:23 kahrl sadly we don't have code like this: http://thedailywtf.com/Articles/Python-Charmer.aspx 23:23 Exio4 "thedailywtf" 23:24 Exio4 haha 23:24 Exio4 Jakob continues, "I can only hope this language doesn't have a goto statement..."