Minetest logo

IRC log for #minetest-dev, 2013-01-22

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

All times shown according to UTC.

Time Nick Message
02:46 Vogarth joined #minetest-dev
02:47 Vogarth Hello, having build errors with GIT code - /opt/local/include/curl/curlrules.h:143: error: size of array ‘__curl_rule_01__’ is negative
02:48 Vogarth client.cpp:50
02:50 Vogarth hm. strange, that's just an include curl.h. nevermind - will check check further.
02:53 Vogarth what should CUSTOM_XDG_APPS_DIR be set to?
02:55 Vogarth left #minetest-dev
03:24 Vogarth joined #minetest-dev
03:26 Vogarth Hello, trying to get minetest running on a Mac, latest GIT version finally builds - but on running, window opens, black canvas, and a infinite loop of "Could not load texture: ". On ctrl-C, it spits out Error opening configuration file for writing: "/../minetest.conf"
03:27 Vogarth Any clues as to what might be the problem?
03:28 hmmmm how late is the latest git version
03:28 hmmmm did you compile with -DRUN_IN_PLACE=1?
03:29 Vogarth Yes, and -DCUSTOM_XDG_APPS_DIR="~/.minetest"
03:29 hmmmm not sure what exactly CUSTOM_XDG_APPS_DIR should be
03:29 hmmmm but anyway
03:29 Vogarth running it out of bin directory. games is in ../games, but it can't seem to find games dir.
03:29 hmmmm try running it out of the directory above bin
03:29 hmmmm err
03:29 Vogarth just a sec.
03:30 Vogarth Same problem.
03:30 Vogarth Also, can't create new word - no games found.
03:30 hmmmm first go into porting.cpp and tell me if line 337 says " OS X"
03:31 hmmmm or rather i should say, if /*  OS X  */ is around there
03:31 Vogarth yes, seems to be in a comment.
03:32 hmmmm how about around line 217
03:32 Vogarth yep. there too.
03:32 hmmmm okay
03:33 Vogarth I've been working to get this to compile for a few days now, finally today someone cleaned up genmap and it finally links.
03:33 Vogarth Did have to build curl with universial from macports.
03:34 Vogarth it now runs, but not quite works.
03:34 hmmmm can you do me a huge favor?  on the line right after pathRemoveFile(buf, '/'); in that section of code add in printf(" -- path: %s\n", buf);, compile, and run it again
03:34 hmmmm then show me the output it says in the terminal window that starts with " -- path: "
03:38 Vogarth it never did. How is it getting __APPLE__ defined?
03:40 hmmmm i.. i don't know
03:40 hmmmm so you mean to say that "WARNING: Relative path not properly supported on this platform" prints out when you run it?
03:41 Vogarth oh, found it - just after bin/mine test - ....
03:41 Vogarth -- path:
03:41 Vogarth Irrlicht Engine version 1.8.0
03:41 Vogarth it went by so fast it wasn't on screen.
03:41 hmmmm well that would explain it
03:42 Vogarth no, I'll send the entire first block of text...
03:42 hmmmm do you mind if i have you try out a couple things?
03:42 Vogarth #####
03:42 Vogarth -- path:
03:42 Vogarth Irrlicht Engine version 1.8.0
03:42 Vogarth Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386
03:42 Vogarth Using renderer: OpenGL 2.1
03:42 Vogarth NVIDIA GeForce GT 330M OpenGL Engine: NVIDIA Corporation
03:42 Vogarth OpenGL driver version is 1.2 or better.
03:42 Vogarth GLSL version: 1.2
03:42 Vogarth Could not load font because the file does not exist:
03:42 Vogarth 19:40:39: ERROR[main]: WARNING: Font file was not found. Using default font.
03:42 Vogarth Could not load texture:
03:42 Vogarth ######
03:42 hmmmm dyude
03:42 hmmmm dude
03:42 hmmmm that's okay
03:42 hmmmm please
03:42 Vogarth don't mind.
03:42 hmmmm mmmm.
03:43 Vogarth Funny - darwin kernel should be 10.6.8.
03:43 Vogarth then texture line repeats endlessly.
03:44 hmmmm okay
03:44 hmmmm i'm going to need you to add something in that printf
03:45 hmmmm change it to printf(" -- path: %s, %d\n", buf, len);
03:46 Vogarth len = 1024
03:47 hmmmm what does it say when you run grep BUFSIZ /usr/include/stdio.h?
03:48 Vogarth also 1024.
03:48 hmmmm okay
03:49 hmmmm weird
03:49 Vogarth do you have a mac dev system?
03:49 hmmmm i do not.
03:49 Vogarth Are you around SF?
03:49 hmmmm no
03:51 hmmmm hmmmmmmmmmmmmmmmmmmmm..
03:51 hmmmm alright
03:51 Vogarth I need to go soon, but I'll check back here later this evening, and over the next few days. Happy to work with group to get mac platform working.
03:51 hmmmm remove all of the code starting from /* OS X */ to /* FreeBSD */
03:51 hmmmm and run it from ./bin
03:53 Vogarth ok. now says WARNING: Relative path not properly supported on this platform
03:53 hmmmm that's okay for now until i figure out what's wrong
03:54 Vogarth Same texture loop
03:54 hmmmm you are running it in bin right?
03:54 Vogarth yep.
03:54 hmmmm well that's not right
03:54 Vogarth found updateConfigFile(): Error opening configuration file for reading: "../../minetest.conf"
03:54 Vogarth in debug.txt.
03:55 Vogarth ah.
03:55 Vogarth minetest with SER_FMT_VER_HIGHEST=25, VER=0.4.4-d1 BUILD_TYPE=Release RUN_IN_PLACE=1 USE_GETTEXT=0 USE_SOUND=1 STATIC_SHAREDIR=/usr/local/share/minetest
03:55 hmmmm oh, yeah, that would cause the problem
03:55 hmmmm ..:/
03:55 Vogarth There is no /usr/local/share.
03:56 Vogarth What goes in there? /usr/local/share/minetest/games??
03:56 hmmmm STATIC_SHAREDIR shouldn't even be set
03:56 hmmmm no idea why you are setting it
03:56 Vogarth never set it myself.
03:56 hmmmm it should not be set
03:56 hmmmm try unsetting it
03:58 Vogarth do you recomend "cmake -DSTATIC_SHAREDIR " or ???
03:58 hmmmm you should simply run cmake -DRUN_IN_PLACE=1 .
03:59 Vogarth RUN_IN_PLACE was set, but STATIC_SHAREDIR seems to live in porting.cpp and config.h.
03:59 Vogarth also cmake_config.h
04:00 hmmmm uhh
04:00 Vogarth This is all stock from cmake . -DRUN_IN_PLACE=1 -DCUSTOM_XDG_APPS_DIR="~/.minetest"
04:00 hmmmm set STATIC_SHAREDIR to .
04:00 hmmmm in src/cmake_config.h
04:00 hmmmm "."
04:00 Vogarth with many library adjustments to get around build issues.
04:00 Vogarth ok.
04:00 hmmmm that will definitely fix the problem
04:01 hmmmm but yes, maybe sometime tomorrow when you have time to, i'd definitely like to work with you more so I can find out why _NSGetExecutablePath is failing but not setting *bufsize to anything
04:02 Vogarth sure, I'd like to have someone in the dev group fold in some changes I'm making to get it to build properly on mac.
04:03 Vogarth still not working, do you want mac section re-added?
04:03 hmmmm no
04:03 hmmmm not yet
04:03 Vogarth just a sec,
04:04 Vogarth does make in src not push to bin, but make in minetest root will?
04:04 hmmmm yes
04:04 hmmmm you need to run make in the minetest root directory
04:05 Vogarth still finding STATIC_SHAREDIR=/usr/local/share/minetest in debug.txt.
04:06 Vogarth #define CMAKE_STATIC_SHAREDIR "."
04:06 hmmmm are you sure you set CMAKE_STATIC_SHAREDIR to "." in src/cmake_config.h??
04:06 hmmmm okay
04:06 Vogarth set in cmake_config.h. yep - sure.
04:06 Vogarth something somewhere else redefined it.
04:06 hmmmm are you sure your binaries aren't out of date?
04:07 Vogarth yes, sure it rebuilt. I'll poke around later, i'll be around.
04:07 hmmmm okay, sounds good
04:07 Vogarth Always hmmmm?
04:07 hmmmm ?
04:07 Vogarth on #minetest-dev
04:07 hmmmm yes
04:08 Vogarth not many vogarths. Thanks for the help!
04:08 hmmmm np
04:08 Vogarth left #minetest-dev
04:09 hmmmm well that's not right.. was the Mac OS X documentation lying?  why on earth would _NSGetExecutablePath fail?  there's nothing for it to fail about aside from an insufficiently sized buffer
04:09 hmmmm also you should be using MAX_PATH, not BUFSIZ, but that's not the problem here
05:10 VanessaE oh my
05:10 VanessaE build error with minetest
05:10 VanessaE first time I ran into this one.
05:11 VanessaE http://pastebin.com/L9362tSA
05:11 VanessaE (from git fetched about 1 minute ago)
05:12 VanessaE wait, that's the wrong section
05:13 VanessaE there's the right one:  http://pastebin.com/BUiyjqRf
05:13 VanessaE looks like part of an actual patch file got inserted into the source code
05:13 VanessaE (judging by the other errors that follow it)
05:15 VanessaE haha, not quite, the offending section of code:
05:15 VanessaE http://pastebin.com/c5MfMAih
05:15 VanessaE somehow I doubt this is valid C++
05:15 VanessaE :)
05:41 hmmmm what source file is that in?
05:41 VanessaE hm, I guess you can ignore this.  Something must have gone wrong when I tried to git pull or sapier's thread priority patch must have confused something.  Re-cloned and it builds fine now.
05:41 hmmmm ah that's good
05:43 sfan5 "Security isn't a goal of minetest as I have learned." #435
07:07 hmmmm wow i hit a wall
07:07 hmmmm it turns out that what i want to do with the mapgen names and so on is really hard in C++
07:08 hmmmm i have something like this  http://ideone.com/PcWkDk but i want something cleaner
07:08 hmmmm if only i had a virtual static function
07:10 Vogarth joined #minetest-dev
07:11 Vogarth Hello, I'm trying to get minetest working on mac, have it compiled, but it endlessly prints "Could not load texture:"
07:12 Vogarth was able to set STATIC_SHAREDIR to "."
07:13 Vogarth running bin/minetest from the source root dir.
07:14 hmmmm no no run it from within the bin directory
07:14 Vogarth same behavior.
07:14 Vogarth hello hmmmm again.
07:15 hmmmm i have no idea what's going on with your build there
07:15 Vogarth I tried --verbose ... Searching worlds ... in ..worlds:  0 found.
07:16 Vogarth there is no ../worlds directory.
07:17 Vogarth on cntl-C, skipped writing of ../../minetest.conf because content wouldn't be modified
07:17 hmmmm look in debug.txt for path_share and path_user
07:17 hmmmm let's see what those paths are
07:18 Vogarth both set to ..
07:18 hmmmm and the current working directory is, at the moment, the minetest root directory
07:18 Vogarth setting STATIC_SHAREDIR didn't trigger rebuild of src, did a make clean btw.
07:19 hmmmm okay, delete debug.log
07:19 Vogarth current working dir would be bin under root.
07:19 Vogarth delete.txt?
07:19 hmmmm delete.txt??
07:19 Vogarth to delete?
07:19 hmmmm debug.txt rather
07:19 Vogarth yep
07:19 Vogarth start minetest again.
07:20 hmmmm yep
07:20 hmmmm now what's path_share?
07:20 Vogarth still set to ".."
07:20 hmmmm if that's the case and you're in bin, then .. is the minetest root
07:21 hmmmm which means you wouldn't be having that problem
07:21 Vogarth as written in debug.txt.
07:21 Vogarth yes, what textures are trying to be read unsuccessfully?
07:22 Vogarth and why ../../minetest.conf
07:22 hmmmm textures/base/pack/stuff here
07:22 hmmmm are you missing the textures directory?
07:22 hmmmm or any other subdirectory
07:24 Vogarth looks like a few png in base/pack, all just has a textures_here.txt file.
07:24 hmmmm that's good then...
07:25 hmmmm i have a feeling like this is a case of PEBKAC
07:25 Vogarth there's fontlucida and fontdejavusansmono.png, are these the fonts it's searching for?
07:25 hmmmm those are two of them
07:26 hmmmm there should be those, menubg.png, menulogo.png, smoke_puff.png, sunrisebg.png, unknown_block.png, unknown_item.png, and unknown_object.png
07:26 Vogarth the problem is always the case of PEBKAC, computers always just do what they are told.
07:26 Vogarth My understanding though is that Mac hasn't worked in a long time.
07:27 Vogarth This might be the first time everything is built 64-bit.
07:27 hmmmm there's no reason why it wouldn't work
07:27 hmmmm let's re-cover all of our bases
07:27 Vogarth In theory - theory and reality are the same.
07:27 hmmmm right now with that bit of code for OS X removed you should be getting "warning unsupported platform"
07:27 hmmmm and you are running minetest with the CWD in the bin directory
07:28 hmmmm your textures are indeed present
07:28 hmmmm and you compiled with RUN_IN_PLACE=1, and STATIC_SHAREDIR=.
07:28 hmmmm right to all of that?
07:28 hmmmm s/right/yes/
07:28 Vogarth In reality - they are quite different. -
07:28 Vogarth yes, correct.
07:28 Vogarth not getting warning unsupported platform.
07:29 Vogarth do get WARNING: Relative path not properly supported on this platform now.
07:29 hmmmm yeah that i meant
07:29 Vogarth then all correct.
07:29 hmmmm i'm sorry i have no idea at all
07:29 hmmmm any bit of reason says that should work
07:29 Vogarth can we get it to tell us where it's trying to load font from?
07:30 Vogarth somewhere around "Could not load font because the file does not exist:"
07:31 hmmmm should be porting::path_user + DIR_DELIM + "textures" + DIR_DELIM + "base" + DIR_DELIM + "pack"
07:31 hmmmm which in your case would be ../textures/base/pack
07:31 hmmmm as expected
07:31 hmmmm and if you were in bin, that would be exactly the correct path
07:32 Vogarth Ah!
07:32 hmmmm say, do you have the correct permissions on the textures?
07:32 hmmmm ah what
07:32 Vogarth Can we get it to tell us exactly what the path is - case sensitive!
07:33 Vogarth I'm running on a Mac with a case sensitive filesystem.
07:33 Oblivion1500 joined #minetest-dev
07:33 hmmmm all other platforms minetest runs on save for windows are case sensitive as well
07:33 hmmmm it can't be the problem
07:34 hmmmm i bet it's a permissions problem
07:34 hmmmm check the permissions of those textures
07:34 Vogarth ok, permissions are read by everyone.
07:34 Vogarth As a user I' have no problem viewing their content.
07:34 Vogarth owned by root, but it fails run as root also.
07:35 hmmmm i'm sorry i'm out of ideas
07:35 hmmmm well
07:36 hmmmm yeah
07:36 hmmmm there is no way this is a minetest problem
07:36 Vogarth Where is "Could not load texture" coming from?
07:36 hmmmm *shrug* somewhere
07:36 Vogarth content_cao.cpp
07:37 hmmmm if you're thinking it's not loading the image correctly, then that means irrlicht would be broken on mac os x
07:38 Vogarth I don't know how well irrlicht works, but when it says "could not load texture - it's supposed to also say what texture.
07:38 Vogarth Here's the line...
07:38 Vogarth errorstream<<"GenericCAO::updateTextures(): Could not load texture "<<texturestring<<std::endl;
07:38 hmmmm it's also supposed to say GenericCAO::updateTextures() too
07:39 hmmmm that code is for in-game stuff.  you're way off
07:39 Vogarth three lines above theres this gem...
07:39 Vogarth if(texturestring == "")
07:39 Vogarth continue; // Empty texture string means don't modify that material
07:39 Vogarth it looks empty, but it doesn't act empty.
07:39 hmmmm how about you just set texture_path in minetest.conf for now
07:39 Vogarth ok.
07:40 hmmmm texture_path=/your/full/path/to/minetest/textures
07:41 Vogarth same behavior. What does "address =" do?
07:42 hmmmm for the remote server
07:42 hmmmm if setting texture_path doesn't work, you're either trolling me or you have a real big problem
07:43 Vogarth not trolling, but still doesn't work.
07:48 Vogarth well, setting texture_path in srcroot/minetest.conf, then changing settings in gui, writes a copy with new other settings in ../../minetest.conf. It's reading the file, but still no textures.
07:50 Vogarth So - games = 0, textures = 0, minetest.conf kind of works - the gui comes up but crashes on certain events, and can't start a game.
07:50 hmmmm i'm sorry i give up
07:51 Vogarth this is the GIT version synced a few hours ago. the release version won't even compile - some problem with linking two functions from genmap.cpp which do seem to be used (but can't be seen by map.cpp).
07:51 hmmmm genmap..?
07:51 hmmmm don't you mean mapgen.cpp?
07:51 Vogarth Is there a easy way to check irrlicht is functional?
07:52 Vogarth mapgen.cpp, correct.
07:52 hmmmm probably not
07:53 Vogarth the example makefiles don't seem to link properly in irrlicht.
07:53 hmmmm it sounds like you have a really broken setup.... nothing works for you
07:54 hmmmm uh
07:54 hmmmm did you use make or gmake for irrlicht?
07:54 Vogarth I build other programs all the time, bzflag, mame, stella, my own stuff, iPhone apps, glut and opengl apps.
07:55 Vogarth nether - was following mac recipe - uses xcodebuild -project MacOSX.xcodeprog.
07:55 Vogarth instructions from ## From http://irrlicht3d.org/wiki/index.php?n=Main.InstallingIrrlicht
07:55 Vogarth not a big fan, but it does say its successful.
07:56 Vogarth now I'm not so sure.
07:57 Vogarth It had a few issues on Lion - required some opengl patches to compile. SnowLeopard seemed ok.
07:57 Vogarth Let me try all this under lion. I'll get back to you.
08:02 hmmmm okay
08:09 Vogarth irrlicht says build succeeded, minetest next.
08:12 Vogarth this is same git sync from a few hours ago, without the osx section edit from earlier. Different complier (xcode 4.5 tools version)
08:14 Vogarth nope, different behavior though - Irrlicht Engine version 1.8.0
08:14 Vogarth Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64
08:14 Vogarth No doublebuffering available.
08:14 Vogarth Segmentation fault: 11
08:16 Vogarth this is in a vm, but no window ever launches. I can try a current git sync.
08:19 Vogarth building off latest git now.
08:25 Vogarth btw, setting STATIC_SHAREDIR from cmake doesn't seem to push into cmake_config.h. doing it manually.
08:26 Vogarth should I pull out OSX block in porting.cpp?
08:31 Vogarth No luck, same problem.
08:37 SiegeWizard joined #minetest-dev
08:40 Vogarth looks like the OSX porting block does more harm than good- with it it thinks that path_share = @¿_<FF>^?/..
09:59 rsiska joined #minetest-dev
11:02 SiegeWizard left #minetest-dev
12:45 darkrose joined #minetest-dev
12:45 darkrose joined #minetest-dev
13:10 sfan5 thexyz: i still  can't cross-compile
13:11 sfan5 http://bpaste.net/show/QfcQwWD5JtbACSeyDBUx/
13:46 darkrose joined #minetest-dev
13:46 darkrose joined #minetest-dev
13:50 celeron55 sfan5: that's code by hmmmm
13:52 sfan5 yeah, but thexyz said he fixed the problem
13:53 sfan5 i compiled minetest with clang and now: unknown opcode
13:53 thexyz i fixed the other problem
13:54 thexyz that was related to windows.h/winsock2.h mess
13:54 sfan5 oh...ok
14:18 Taoki joined #minetest-dev
14:35 PilzAdam joined #minetest-dev
15:33 doserj joined #minetest-dev
15:41 doserj PilzAdam: https://github.com/celeron55/minetest/pull/436
15:41 doserj did you encounter other issues with it (besides warning messages)?
15:44 PilzAdam the "Enable All" button doesnt work anymore
15:44 PilzAdam (only for Add-Ons, still works for modpacks)
15:45 doserj ah
15:51 doserj ok, fixed that.
15:51 doserj btw, i have a one-line fix for the "delete server" crash. should i include that?
15:52 doserj (he was comparing an unsigned to -1)
15:52 PilzAdam what "delete server crash"?
15:52 doserj delete from the server browser when no server is selected
15:53 PilzAdam do it in a seperate commit
15:53 PilzAdam only 1 feature/fix per commit
15:54 doserj same pull request/branch, though?
15:54 PilzAdam yea
15:56 hmmmm joined #minetest-dev
15:58 doserj pushed: https://github.com/celeron55/minetest/pull/436 should i squash my first two commits into one?
15:59 PilzAdam seperate the fix and the improved behaviour
16:02 PilzAdam doserj, empty modpacks are still handled like mods
16:05 doserj Hmm. yes. How should they be handled? like other modpacks (making enable all/disable all no-ops)?
16:05 doserj or like "Add-Ons" now by disabling the buttons?
16:06 PilzAdam handle them like other modpacks
16:19 doserj hm, that actually requires a new flag in ModSpec. Currently, the code only checks for emptiness of modpack_content to decide if something is a modpack or not.
16:30 Calinou joined #minetest-dev
16:36 doserj like this? https://github.com/celeron55/minetest/pull/436
16:38 doserj or i can squash the two improvements (empty modpacks and no mods at all) into one commit
16:39 PilzAdam yea, squash them together
16:43 doserj done.
16:43 rubenwardy joined #minetest-dev
16:45 PilzAdam commit messages should start with a capital letter
16:48 Progers joined #minetest-dev
16:48 Progers Hi
16:48 doserj done
16:51 PilzAdam doserj, "load_mod_ = false" is added to world.mt and old mods are not removed when saving the config
16:52 PilzAdam (I removed all mods and then opened "Configure" and saved)
16:53 PilzAdam it seems like no mod that is missing but configured is removed when saving the setting
16:56 doserj but you still got the warning message, right?
16:56 PilzAdam yep
17:10 doserj ah yes. Settings:updateConfigFile doesn't check for that. it only ever adds to the settings.
17:13 markveidemanis joined #minetest-dev
17:15 markveidemanis left #minetest-dev
17:24 Progers Installing MinGw taking long time :D
17:26 sfan5 are you using a package manager like apt-get,yum or pacman
17:26 sfan5 ?
17:28 Progers On windows 7
17:29 Progers Not Linux
17:36 RealBadAngel Good to merge — The Travis build passed (Details)
17:36 RealBadAngel whats that?
17:38 doserj travis is basically a build bot that integrates into github and checks commits if they break builds or not
17:39 PilzAdam we already have a PilzAdam who builds every single pull request
17:40 doserj :)
17:41 sfan5 :D
17:42 RealBadAngel lol
17:42 RealBadAngel i guess PilzAdam you had a very busy day yesterday then ;)
17:43 PilzAdam indeed ;-)
17:45 RealBadAngel im testin now my own patch to update treegen, some new features and speed optimization
17:47 doserj PilzAdam: hah, Settings:updateConfigFile actually does remove settings, but only if some other value has changed...
17:50 RealBadAngel PilzAdam, btw some of the trees with new features look way different. remember you said pine is similar to other trees? take a look at this then: http://realbadangel.pl/pines.png
18:08 doserj PilzAdam: https://github.com/celeron55/minetest/pull/436 now contains a fix for removing settings. I can't reproduce the "load_mod_ = true" issue. I'll be back in about 1/2h.
18:22 thexyz celeron55: I set up weblate instance for minetest http://translate.minetest.ru/projects/minetest/core/, now can you give https://github.com/minetest commit access?
18:40 hmmmm rgggggg
18:40 hmmmm ot
18:41 hmmmm it's like every change i make to the mapgenparams stuff, i have to change the order in which things are created in server's ctor
18:46 PilzAdam https://github.com/PilzAdam/minetest/commit/9ca95a15477595cf8db0ca4a3f1d8483d469d51c
18:46 PilzAdam any comments?
18:46 hmmmm ahh i was going to do that
18:47 hmmmm well
18:47 hmmmm IMO the problem isn't completely being slow, but rather all the machinery behind a setNode() call
18:49 PilzAdam it is faster than looping through x,y and z in Lua
18:49 hmmmm my idea was to get a VoxelManipulator and write to that, then blit it back directly to the environment in the same manner as the mapgen in finishBlockMake
18:49 PilzAdam and it seems like the Lua method causes some lighting glitches, set_node_area() doesnt do that
18:49 hmmmm well if you want fast i suggest you change for (X, Y, Z to for (Z, Y, X
18:50 PilzAdam why is that faster?
18:50 hmmmm because of cache locality
18:50 hmmmm the next element to be read in the array is 4 bytes over
18:51 hmmmm not 40000000
18:51 hmmmm so it doesn't need to jump around anywhere near as much
18:51 VanessaE hmmmm:  unrelated question when you have a second.
18:51 hmmmm what's up.
18:52 PilzAdam wow, no its only 1 sec. for 100000 nodes
18:53 VanessaE I was experimenting with disabling default trees and found that I have to comment out two separate calls:  mapgen.cpp line 2262  and mapgen_v6.cpp line 1367
18:53 PilzAdam *now
18:53 VanessaE is there a reason why it's being called twice?
18:54 hmmmm yes, because the one in mapgen.cpp line 2262 is commented out
18:54 hmmmm see #if 0 //BIG COMMENT
18:55 hmmmm (also i am aware of the tree spawning code itself being duplicated, i need to fix that but i need to fix the last hack that was committed yesterday faster)
18:55 VanessaE strange.  I better re-check what I did then
18:57 VanessaE no, it isn't.
18:57 hmmmm ??
18:57 VanessaE hrm
18:57 VanessaE wait
18:58 PilzAdam it is
18:58 VanessaE no, I don't see any conditional that would disable that call, and it's not commented out in current git (just re-cloned to check)\
18:58 PilzAdam look at the syntax highlighting of GitHub
18:58 PilzAdam https://github.com/celeron55/minetest/blob/master/src/mapgen.cpp#L2262 and https://github.com/celeron55/minetest/blob/master/src/mapgen.cpp#L2645
18:58 PilzAdam both grey
18:59 hmmmm yeah your editor might not highlight "#if 0"s as comments
18:59 hmmmm everything after line 218 is non-functioning code
18:59 Calinou I don't have a "show public" button in multiplayer and I crash when clicking "delete" in latest git..
19:00 VanessaE something ain't right then..
19:02 PilzAdam Calinou, there already is a fix for this crash pull-requested
19:03 VanessaE hmmmm: hrm, odd.  I must have been thinking wrong then.  it is indeed enough to comment it out of mapgen_v6.cpp
19:03 hmmmm ya
19:03 VanessaE guess I just aimed at the wrong file :D
19:03 hmmmm oh boy i see a bug in the random seed generation code
19:03 hmmmm two problems in fact
19:04 hmmmm i'll snatch that one up later
19:06 VanessaE anyway if you're curious, RBA and I were discussing adding a Lua hook to allow a mod to disable the default trees (for example so that moretrees doesn't have to alias them to air, which would of course be slower than just not calling the make_tree() code to begin with\
19:06 VanessaE damn my typing sucks today.
19:07 hmmmm you can already disable trees
19:07 VanessaE from a mod?  without re-aliasing the mapgen aliases?>
19:07 hmmmm no, it has to be put in minetest.conf
19:07 VanessaE right
19:07 VanessaE we want to do this from a mod.
19:08 hmmmm it just strikes me as hacky
19:08 VanessaE well, programatically, the right way to disable them is to just not execute the make_tree() call, no?
19:08 sfan5 hmmmm: http://bpaste.net/show/QfcQwWD5JtbACSeyDBUx/
19:09 sfan5 ^ celeron55 said your code caused that
19:09 hmmmm yes
19:09 Calinou PilzAdam: however, on my netbook the "show public" option appears
19:09 Calinou weird
19:09 PilzAdam do you have curl enabled?
19:09 sfan5 Calinou: compile with curl
19:10 hmmmm sfan, was that a mingw build?
19:10 sfan5 yes
19:10 hmmmm ahhhh
19:10 hmmmm hrmmmm
19:10 PilzAdam hmmmm, sfan5, I get the same error
19:10 Calinou is it enabled by default?
19:10 sfan5 IIRC no
19:10 Calinou k
19:10 sfan5 use -DENABLE_CURL=!
19:10 PilzAdam Calinou, it is disabled when you havent installed curl IIRC
19:10 sfan5 *1
19:10 PilzAdam (like gettext)
19:11 hmmmm okay i'm thinking..
19:11 VanessaE sfan5: is that a way of saying "enable it NOW!!" ?
19:11 sfan5 do it faster ;)
19:11 VanessaE ;)
19:11 hmmmm i simply don't understand what this error means   /home/stefan/mt-build/build/c55/celeron55-minetest-33be32f/src/settings.h:583: error: there are no arguments to ‘strtok_s’ that depend on a template parameter, so a declaration of ‘strtok_s’ must be available
19:11 hmmmm strtok_s is undeclared evidently
19:11 sfan5 VanessaE: it forces cmake to enable it, if its not found cmake fails
19:12 VanessaE sfan5: you missed my joke I guess :)
19:12 rubenwardy1 joined #minetest-dev
19:12 sfan5 VanessaE: no, i didn't but i thought an explanation would be nice ;)
19:12 hmmmm sfan5, can you try changing _WIN32 on line 42 of porting.h to _MSC_VER?
19:12 VanessaE heh
19:13 sfan5 could you please ask pilzadam, my (current) computer is so slow
19:13 PilzAdam testing...
19:18 * sfan5 just noticed that he has more than 2000 posts
19:23 PilzAdam hmmmm, http://bpaste.net/show/LxzVUpZkx2azVmyHN2HX/
19:23 hmmmm what
19:23 hmmmm no strtok_s, no strtok_r
19:23 hmmmm what does it want off of me, my soul?
19:24 sfan5 yeah
19:24 hmmmm http://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg02406.html
19:25 hmmmm hrmmmm
19:25 hmmmm but there it's simply not linking
19:25 hmmmm here it's not present in the headers at all
19:25 iqualfragile joined #minetest-dev
19:27 hmmmm this is stupid, they don't support strtok_r because "it's an optional part of POSIX and we don't support pthreads, so we won't include strtok_r"
19:28 sfan5 wait... since when is thexyz a forum admin?
19:28 PilzAdam since, ever?
19:28 sfan5 no?
19:30 sfan5 i guess this topic is going to the trash http://forum.minetest.net/viewtopic.php?id=4539
19:32 doserj sfan5: since he hosts the forum?
19:33 sfan5 he hosts the forum?
19:33 sfan5 i didn't know that
19:33 doserj since maybe a week, yes. celeron55 was feed up with the downtimes
19:34 hmmmm alright here's what we're going to do
19:35 hmmmm at line 58 in porting.h, add this
19:35 hmmmm #ifdef G_OS_WIN32
19:35 hmmmm #define strtok_r(s,d,p) strtok(s,d)
19:35 hmmmm #endif
19:35 sfan5 G_OS_WIN32? where does that come from?
19:35 PilzAdam should I leave this _MSC_VER at line 42 or switch back to _WIN32?
19:35 hmmmm leave _MSC_VER
19:35 hmmmm G_OS_WIN32 is something that MingW defines i think
19:36 sfan5 "i think"
19:36 hmmmm strtok() is thread-safe here because it's linked with MSVCRT, where all CRT functions are guaranteed to be thread-safe
19:36 PilzAdam nope, doesnt work
19:36 hmmmm ah no
19:37 hmmmm not G_OS_WIN32, hold on let me look better
19:37 doserj G_OS_WIN32 is gnome i think
19:38 hmmmm yeah
19:38 hmmmm uhhhh....
19:38 hmmmm #if defined(_WIN32) && defined(__GNUC__) ?
19:38 hmmmm try that
19:38 sfan5 gnome on windows?
19:38 hmmmm yeah nevermind that
19:39 PilzAdam seems to work
19:39 hmmmm it's the first thing i saw and i thought it was a predefined macro for MingW
19:39 hmmmm anyway this combination should work reliably, because i don't know of any other Windows compiler that would have __GNUC__ defined
19:39 PilzAdam I get a bazillion of warnings
19:39 hmmmm if someone could find a definitive answer as to what can be used to identify a MingW build, that'd be great
19:40 hmmmm let's see 'me
19:40 hmmmm 'em*
19:41 doserj is cygwin still alive?
19:41 hmmmm yes but it sucks in comparison to SUA
19:42 sfan5 seems like it's alive
19:42 PilzAdam build done; uploading
19:43 doserj __MINGW32__ should be set on mingw?
19:44 sfan5 PilzAdam: coudl you give me a patch of the changes hmmmm told you
19:44 sfan5 *could
19:45 doserj hmmmm: http://sourceforge.net/p/predef/wiki/Compilers/
19:45 hmmmm alright
19:45 hmmmm thanks doser
19:46 hmmmm we change #if defined(_WIN32) && defined(__GNUC__)   to  #ifdef __MINGW32__
19:46 PilzAdam sfan5, https://gist.github.com/4597790
19:47 PilzAdam anyone here can test this win build? http://ompldr.org/vaDZqZQ/celeron55-minetest-33be32f.zip
19:47 hmmmm i still can't get over how stupid mingw is
19:51 * sfan5 is trying to build right now
19:54 sfan5 :/
19:55 hmmmm oooh what now
19:55 sfan5 http://bpaste.net/show/f2OKDh6XZkPPBpKJYgEH/
19:55 sfan5 usleep function is missing
19:56 hmmmm oh, of course, right.
19:58 hmmmm change it to this  http://ideone.com/74TyM3
20:01 sfan5 ...
20:03 hmmmm what?
20:04 sfan5 that didn't do anything
20:06 hmmmm you're right
20:06 sfan5 _MSC_VER is not defined, but we are using windows.the problem is that the linux definitions don't work on win
20:06 hmmmm man this is something that i need to actually sit down and play with until it gets right
20:07 hmmmm alright this should definitely work  http://ideone.com/InwlCh
20:08 hmmmm and yes i know _MSC_VER isn't defined, it's something that's defined for MSVC only and not MingW
20:08 hmmmm which is why i am using it
20:10 sfan5 ALIGNOF not defined
20:10 hmmmm WHSGJKDFHIO
20:11 hmmmm RRRRRG
20:11 hmmmm alright alright let me think of something better, i'm putting 100% attention toward this now
20:12 sfan5 no,non,non,non,nontrhh
20:12 sfan5 ht
20:12 sfan5 i got it working
20:12 sfan5 #define ALIGNOF(x) __alignof(x)
20:12 sfan5 that works for mingw too
20:12 hmmmm it does?  that's really good to know
20:16 hmmmm http://ideone.com/0GF2U1  alright that's the final version
20:16 hmmmm this would be a lot less infuriating if my mouse didn't do this double clicking crap
20:20 sfan5 hmmmm: this is what i got https://gist.github.com/4598039
20:21 hmmmm use the most recent one
20:23 sfan5 the one you posted won't work
20:23 sfan5 it doesn't define the correct ALGINOF
20:25 hmmmm OGF2U1?
20:26 hmmmm i intend for it to define __alignof__(x) on MingW
20:26 hmmmm since __alignof__(x) is the GCC variant, and MingW is GCC
20:26 hmmmm so __alignof__(x) doesn't work on MingW, but __alignof(x) does?
20:28 sfan5 __alignof(x) defenitly works, i don't know about __alginof__(x)
20:28 sfan5 *definetly
20:29 hmmmm then why did you say [03:23 PM] <sfan5> it doesn't define the correct ALGINOF ?
20:29 sfan5 if __alginof works i assumend that __alginof__ doesn't work
20:30 hmmmm that might not be the case for MingW
20:30 hmmmm maybe GCC works with both
20:30 sfan5 yah
20:30 sfan5 *yeah
20:31 rubenwardy left #minetest-dev
20:32 hmmmm it's really inconvenient to have all these compatibility problems and not be able to test them on all platforms
20:33 hmmmm i don't really forsee any big platform-dependent additions in the near future though
20:39 sfan5 hmmmm: i get tons of "settings.h:740: warning: unused variable ‘fmtpos’"
20:40 hmmmm ah yes...
20:40 hmmmm i can't really do anything about that right now
20:40 hmmmm what i'm going to do is write my own version of strtok_r() for platforms that don't have it *cough mingw*
20:40 hmmmm and then put that in there
20:41 hmmmm the #define strtok_r strtok thing is just so it compiles for now, i trust that nobody in the next day or so is going to add strtok() calls interposed with getStruct calls
20:44 VanessaE ok, the API is, as usual, as vague as a dense fog..  minetest.node_dig(pos, node, digger)   <--- digger is "userdata".  How do I get the digger's username from it?
20:45 sfan5 maybe :get_player_name()
20:45 VanessaE tried that.  attempt to call global 'get_player_name' (a nil value)
20:46 VanessaE (and player: is not the right class or whatever, either)
20:46 VanessaE wait, think I figured it out.
20:47 VanessaE yup, got it.  digger:get_player_name()
20:51 sfan5 thats what i meant
20:58 hmmmm damn how do you even break this up into two lines  std::map<std::string, MapgenFactory<Mapgen, MapgenParams> *>::const_iterator iter = mglist.find(mgstr);
20:58 hmmmm the type itself is over 80 chars
22:11 VanessaE regarding this new right-click-to-open thing with doors..  How do I determine if the user's version of minetest uses this feature e.g. with its default doors?
22:14 VanessaE and why am I asking these questions in the wrong channel?  Sorry about that.

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