Time Nick Message 05:57 nore any thoughts on #966? 13:08 nore PilzAdam, what do you think of #966 now? 13:08 nore https://gist.github.com/Novatux/7179966 <-- to test it 13:37 troller hmmmm, weather fix after your moving - https://github.com/proller/minetest/commit/dda672d03988b8c8581ed80b0d1b8eca1fec2014 16:17 VanessaE will someone PLEASE FIX THE FUCKING vector math lib so that it asserts properly? 16:17 PilzAdam what doesnt work? 16:18 VanessaE [10-27 21:55] oy... there's a bug in builtin/vector.lua 16:18 VanessaE [10-27 21:56] yeah, vector.new(0,0,0) will cause that assertion error instead of returning {x=0,y=0,z=0} 16:18 VanessaE [10-27 21:56] You'd only notice it with relative vectors, or really close to 0,0,0 16:18 VanessaE this is what cayuses the assert() fail on my servers. 16:18 VanessaE causes* 16:20 PilzAdam what Lua version do you use? 16:20 VanessaE I expect other functions in the lib have the same issue. 16:20 VanessaE LuaJIT, so I guess 5.1 16:20 VanessaE (2.0.2 or some such) 16:20 PilzAdam assert(0); local a = 0; assert(a) <- this does not crash 16:20 VanessaE it does for me and for cy1 16:20 VanessaE in the vector lib I mean 16:20 PilzAdam thats weird 16:21 VanessaE and I've been having these untraceable crashes for weeks now 16:21 PilzAdam print(_VERSION) 16:21 PilzAdam ^ can you check your Lua version? 16:21 VanessaE I just told you, it's LuaJIT. 16:22 VanessaE (frok git, last commit was two days ago, 8944e27762712679e50962598ed1be8dc1fbe7be) 16:22 VanessaE from* 16:22 VanessaE idk what cy1 uses, he didn't say. 16:23 PilzAdam btw, why do we do assert(v) instead of assert(v.x and v.y and v.z), ShadowNinja? 16:24 nore PilzAdam, what do you think of the new version of #966? 16:26 thexyz aaaand since we're talking about lua what's the reason behind https://github.com/minetest/minetest/blob/master/builtin/misc_helpers.lua#L107 16:27 thexyz instead of something like math.sqrt(x * x + y * y) 16:28 thexyz ShadowNinja: plz 16:29 thexyz and maybe it should actually do something like math.sqrt(x * x + y * y + (z or 0) * (z or 0)) 16:29 PilzAdam thexyz, http://en.wikipedia.org/wiki/Hypot#Motivation_and_usage 16:30 thexyz oh, I see 16:31 PilzAdam it was kahrl's idea IIRC 16:31 thexyz that's smart 16:31 nore so, what about https://github.com/minetest/minetest/pull/966 ? 16:31 PilzAdam nore, have you found solutions to all the problems I mentioned? 16:32 nore yes, try it now 16:32 ShadowNinja PilzAdam: That wouldn't work, we need assert(type(v) == "table" and v.x and v.y and v.z) which will be a little slower, although it would ensure the function suceeded. 16:32 nore even craft preview is changed 16:32 PilzAdam how did you solve it? 16:32 nore I added another registration function, to get craft prediction 16:32 PilzAdam ShadowNinja, right 16:32 nore and it changes craft preview as well 16:32 thexyz shouldn't we do something similar for three coordinates instead of calling it two times? 16:33 ShadowNinja PilzAdam:Do you think I should add that? 16:33 PilzAdam yes 16:34 PilzAdam nore, so the client has to wait for the server now instead of just stacking up the result? 16:34 nore it was already like that (the client already had to wait) 16:35 nore proof: the craft preview code was in server.cpp 16:35 PilzAdam the client currently only waits for the result once, but the stacking happens without waiting for the server 16:35 PilzAdam or did I miss something? 16:35 nore well, now if the craft preview does not change, it is like before 16:35 nore if for the same recipe, the output changes, there it has to wait 16:36 nore no, the stacking waits for the server too 16:36 PilzAdam oh, youre right 16:37 nore PilzAdam, to test: https://gist.github.com/Novatux/7179966 16:37 nore first one: put a stack of steel ingots in the center of the craft grid 16:37 nore second one: put stone in the center of the craft grid, and a stone axe above it 16:38 PilzAdam of course I wont use your code to test it 16:38 PilzAdam its more likely to find bugs when I write something else 16:39 nore well, you can look at the code to see how it works 16:40 PilzAdam I think this should be redesigned a bit: the engine should call a Lua function to get the craft result, and on_craft shouldnt be allowed to change the output 16:40 PilzAdam this way clients always show the correct output item 16:41 nore well, but if you want a random result each time 16:42 nore and don't want the players to know what they will get 16:42 nore i.e. I want something to give a random number of wood, between 2 end 5 16:42 PilzAdam then you create a "random item" as the result and catch the placement in on_move or so 16:42 nore if the user knows, he will try again and again until having 5 16:42 PilzAdam hmm 16:43 nore no, you can't do that 16:43 nore with the current way, I show wood as craft preview 16:43 nore and then I give a random number of it when it is crafted 16:43 nore or, it allows secret recipes 16:44 nore -> you make an invisible item as output, and if the player clicks it, give the output 16:44 VanessaE player crafts a steel door, and they might get a bonus gift of a locked chest when they commit to the craft 16:47 PilzAdam nore, does the client show the result of craft_predict? 16:47 nore yes 16:47 nore (that was the hardest part to do) 17:00 nore PilzAdam, so, does it work? 17:05 VanessaE so what's going to be with the vector lib? 17:28 nore PilzAdam, so, what do you think of it now? 17:46 ShadowNinja PilzAdam: Comments? http://ix.io/8MK 18:08 nore PilzAdam, so, what do you think of #966 now? 18:08 VanessaE ShadowNinja: http://ix.io/8MK seems reasonable to me. 20:22 sapier https://github.com/minetest/minetest/pull/971 please test this one I almost got crazy when trying to fix all variants that may happen 20:23 sapier and guys next one someone else is up to fixing microsoft compatibility 20:24 PilzAdam sapier, you are the only person I have ever seen that doesnt put a space after commas in function parameter lists 20:24 sapier yea bad habit sorry 20:25 sapier I'm gonna fix it ... but believe me if that was the only problem I'd have that shit finished days ago 20:26 sapier any other coding style comments? 20:27 celeron55 wtf is this 8D 20:27 sapier yeah wtf is right comment for this crap ;) 20:28 celeron55 init_gettext() that restarts the whole process 20:28 PilzAdam I like that you fixed the warnings in irrUString.h 20:28 sapier exactly that's the only way to make msvc compiled minetest use the updated LANGUAGE environment variable 20:29 sapier for localization multiple different effects happen 20:30 sapier first thing is gettext is using something to decide what language to return 20:30 thexyz did you figure out what exactly it uses? 20:30 sapier after lots of test it seams this decision is only made once on load of dll ... no chance to make a change later (at least for msvc builds) 20:30 sapier -seams +seems 20:30 sapier second thing is character encoding 20:31 sapier you can change the character encoding in msvc build by using setlocale BUT this only works for windows named locales 20:31 sapier thats what the lookup table is or 20:31 sapier for 20:32 thexyz is there a full list somewhere? 20:32 thexyz so that we can dump it into a huge file and forget about it forever 20:32 sapier actually yes ... about 180 entrys not counting variants and charset variations ;-) 20:33 thexyz well, I don't really feel like adding a new if every time user asks us to add a new locale 20:33 sapier I'm not even sure this is gonna work on winxp 20:34 thexyz well it's deprecated anyway 20:34 sapier I tried linux mingw msvc using system default, environment, minetest.conf 20:34 sapier where minetest.conf overrides everything else while environment only overrides system default 20:35 thexyz I think a good idea would be to declare some macro, i.e. SHITTYLOCALE("fr", "French") and have a huge file shittylocales.something which we will include 20:35 thexyz (if the only option is to have a full list of locales, of course) 20:36 sapier if someone has an idea to do this better I'd be glad 20:37 thexyz well I have none except for the suggestion of having all locales listed, not just ones we have translations for 20:37 sapier btw due to gpl reasons we can't even fix the gettext update issue. If I understood correctly you're not allowed to distibute gettext dlls' built with current msvc 20:38 thexyz why? 20:39 sapier they mentioned something about msvc binary parts linked into dll and a gpl incompatibility of microsofts permissions for those parts 20:40 thexyz oh wow 20:40 sapier I didn't completely understand but considering strange behaviour of that dll I'd not be surprised if they'd had to include some system specific things to dll to get it work 20:40 celeron55 i would guess winapi has a way to list all of those needed locale names 20:40 sapier yea .. list microsoft language id and name ;-) 20:41 celeron55 http://msdn.microsoft.com/en-us/library/windows/desktop/dd319091%28v=vs.85%29.aspx 20:42 celeron55 the code could just linearly find what it needs using EnumSystemLocalesEx 20:42 sapier interesting they mention the short locale name there 20:42 celeron55 this is terrible but i guess better than a static list inside minetest 20:42 sapier so at least in vista they did still recognize those names 20:43 sapier ok they use - instead of _ but converting this shouldn't be that hard 20:44 sapier but guys took me 1 week to figure that crazy stuff out :-) I'm for merging and fix later if someone really cares 20:45 celeron55 you should write an entry for TDWTF 8) 20:46 sapier whats TDWTF? :-) 20:46 celeron55 (well probably not; they don't do stuff like this really) 20:46 celeron55 http://thedailywtf.com/ 20:48 sapier :-) 20:48 sapier if clang has other localization issues someone else has to fix it ;-P 20:48 celeron55 i completely hate it how microsoft basically abandoned their native API and hacked .NET on top of it 20:49 celeron55 they're going to fail hard some day when their foundations break into pieces that nobody can fix 8) 20:49 sapier I never did program for windows so I can't really say anything about it .. I only used qt on windows 20:50 sapier but still someone should test my pull request on other windows compilers e.g. msvc 2010 20:50 sapier I'd not be surprised if other things would happen 20:55 celeron55 what i think is that you probably shouldn't jump so straight into doing but think first 20:55 celeron55 with the same effort maybe gettext could've had thrown away and something less crappy put into use instead 20:56 celeron55 hacking a program to work with a hacky library on a broken OS is just terrible 20:58 sapier1 sorry connection lost ... I tried to find a replacement for gettext but haven't found a single one 20:59 kahrl maybe we could code our own? it can't be that hard to be honest 20:59 sapier1 and gettext works fine for mingw 20:59 sapier1 it's just msvc that causes issues 21:01 sapier1 I don't think it's hard it's just some work to do it correct and performant 21:01 celeron55 it's not like we even need correct or performant 21:01 celeron55 8D 21:03 sapier1 maybe but I don't feel good in replacing a lib working just fine just because some creepy microsoft compiler that not even has to be used 21:03 sapier1 directx is working on mingw too 21:04 celeron55 directx on mingw is definitely good; we've never had that before 21:05 sapier1 why not? it's no problem at all? 21:05 sapier1 you don't even have to do something special? 21:06 celeron55 nobody has bothered to build irrlicht by themselves 21:06 sapier1 I see :-) irrlicht was one of those packages that did almost instantly build 21:07 celeron55 (for windows, that is) 21:07 sapier1 I think I'm gonna publish my build instructions in wiki 21:07 sapier1 on linux I don't have to build libs to match my compiler ;-) 21:09 sapier1 could someone allowed to plz add a "build instructions" page to "Dev Docs" ? 21:13 celeron55 doing that 21:14 celeron55 aactually 21:14 sapier1 hmm it's at core right? 21:14 celeron55 there is already a "compiling minetest" page 21:15 celeron55 it's under "Core" 21:15 sapier1 ok I obviously wouldn't expect it there but I'm gonna use it 21:16 celeron55 it's a bit odd... but it doesn't fit under "dev docs" either 21:16 sapier1 true 21:16 celeron55 well i'll fix this in a certain way 21:16 sapier1 I guess I need to update my docs they don't really match the style used there 21:18 celeron55 is it good now? 21:18 sapier1 I dodn't use a fixed directory structure but set the paths in cmake-gui ... that's a lot of work once but you're free to place your libs where they build 21:18 sapier1 Instructions? what about "howtos"? ;-) 21:18 celeron55 well dunno; it's good enough 21:19 sapier1 ok :-) I'm fine with it 21:19 celeron55 i think maybe you shouldn't edit the existing page 21:19 celeron55 let's add a second page with a windows build done in your way? 21:20 celeron55 we need a title for that 21:20 sapier1 I intended to add a link on top at first stage, my doc isn't finished right now but could be helpfull for others 21:21 celeron55 if you just append stuff to the existing page, that's obviously fine so in that case go ahead 21:22 celeron55 i think it's important to have the simplest way to build on windows documented and to not horribly mangle it in pieces within a document about building the whole universe 21:23 sapier1 my way isn't simplest but by now it's most clean way to do it 21:29 sapier1 http://dev.minetest.net/Build_Win32_minetest_including_all_required_libraries my instructions those are my personal notices they may not be complete so comments are welcome