Minetest logo

IRC log for #minetest-dev, 2015-03-15

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

All times shown according to UTC.

Time Nick Message
00:15 chchjesus joined #minetest-dev
00:20 paramat joined #minetest-dev
00:47 est31 ok https://play.google.com/store/apps/details?id=net.minetest.minetest is up again
00:47 est31 weird...
00:51 est31 but it should be fixed
00:51 est31 it only shows up when searching for "Minete"
00:51 est31 after all thats its "title"
00:53 est31 ~tell nrzkt can you fix the app's title? its only "Minete".
00:53 ShadowBot est31: O.K.
01:03 paramat hmmmm the schematic issue is here https://github.com/minetest/minetest/issues/2481 a few months ago i also had the 'invalid schematic file' error when trying to place a schematic saved using worldedit. back later
01:03 paramat left #minetest-dev
02:05 WarrTab Any interest in getting MT into f-droid?
02:07 hmmmm paramat: the bug is clearly part of builtin
02:07 est31 WarrTab, yes there is, however I'm waiting for authorisation of c55
02:07 hmmmm why
02:07 est31 I dunno
02:08 hmmmm you don't need it.  celeron isn't an active part of this project and hasn't been for several years.
02:08 hmmmm what could he possibly have to object about it
02:08 est31 most of the code is his
02:09 hmmmm wrt function pointers in C++... yes, perfectly fine.  preferable, even
02:09 est31 ok, I'm giving it a try (app store).
02:09 hmmmm don't understand the irrational hate
02:09 hmmmm virtual function callbacks are basically masking the same exact mechanism with ugly multiple inheritance and OOO (object oriented overhead)
02:10 hmmmm you can make the same functionality take 5x as many lines of code as it would be passing a simple function pointer instead
02:12 hmmmm paramat: erm, no it's not, my mistake.  didn't see the "invalid schematic file" part :-P...  it looks like your .mts file somehow got corrupted, would be prudent to attach it as part of the issue report
02:56 Zeno` joined #minetest-dev
03:18 werwerwer joined #minetest-dev
03:41 * Zeno` wonders how much less efficient 083c8c73 makes the network code
03:42 Zeno` with the adding copying of objects
03:42 Zeno` added*
04:01 paramat joined #minetest-dev
04:02 paramat thanks hmmmmm. will push #2487 very soon
04:02 ShadowBot https://github.com/minetest/minetest/issues/2487 -- mg_decoration: Raise highest allowed deco top to max edge of voxelmanip by paramat
04:10 est31 joined #minetest-dev
04:14 paramat now pushing
04:22 cib0 joined #minetest-dev
04:24 paramat done!
04:56 chchjesus joined #minetest-dev
05:22 hmmmm Zeno`, ?
05:22 hmmmm where does it copy objects
05:23 Zeno` when pushing them onto the queue
05:24 hmmmm that is not good
05:24 Zeno` Before they were allocated and just the pointer to them was finally pushed onto the queue
05:25 Zeno` and the object deleted after it was popped off and processed
05:25 hmmmm but it was messier having to keep track of NetworkPacket allocations
05:25 hmmmm I think it might be a good idea to keep the copying of NetworkPackets, but make the structure itself lightweight
05:26 hmmmm actually nevermind that wouldn't work because we don't use c++11 yet
05:26 hmmmm not having move ctors makes this messy
05:28 Zeno` yeah
05:29 Zeno` it's cleaner this way but there was no need to "keep track of" the NetworkPacket allocations because so long as they were sent (via Send()) they would be deleted
05:29 Zeno` I know the new way makes sense, I just wonder how much impact it has
05:29 Zeno` maybe it's nothing significant, I dunno
05:29 hmmmm both ways make sense for different reasons
05:30 hmmmm at first I thought the first way *didn't* make sense because I missed the part where it got enqueued
05:30 Zeno` I had the reverse confusion, heh
05:30 Zeno` I was wondering how the pointer of the queue remained valid (before I looked at how it was enqueued)
05:31 Zeno` pointer on*
05:32 hmmmm https://github.com/minetest/minetest/commit/083c8c734e8af037d8ad3a1a35475a5d4756572c#diff-ad60d65b34e16a3319296bb5d683acd6R1456
05:32 hmmmm don't tell me that SendMovement is actually sent every single time there's movement
05:33 hmmmm does it actually NEED to read 5000 entries from the config each time
05:33 hmmmm this is a candidate for caching
05:35 Zeno` yikes
05:35 hmmmm hmm
05:35 hmmmm Zeno`:  I can't seem to actually find the part where it copies it into the queue... I'd assume this would need to be modified in this commit, no?
05:36 Zeno` no it wasn't modified in this commit because Send() still takes a pointer to the packet
05:37 hmmmm where is it then?
05:38 kahrl SendMovement is only called in response to INIT2
05:38 Zeno` connection.cpp line 2842 is where it finally ends up
05:38 hmmmm that's an awfully misleading name
05:38 kahrl yeah
05:39 hmmmm hmm wait, isn't that sapier's original code?
05:39 Zeno` server.cpp is the actual Send() function (line 1448)
05:42 Zeno` maybe. I stopped looking at it (I mainly looked at it because I wondered why the pointers were not becoming dangling)
05:44 Zeno` maybe it's a reference counted object; I'd have to look again
05:45 Zeno` hmm. seems it was always copied even in the original version
05:46 Zeno` oldForgePacket()? I wonder what that means heh
05:48 hmmmm me too
05:48 hmmmm so wait
05:49 hmmmm is oldForgePacket sapier's or nerzhuel
05:49 hmmmm oh, nevermind
05:49 hmmmm i thought that was part of Connection
06:10 nore joined #minetest-dev
06:21 paramat left #minetest-dev
06:22 Zeno` http://gafferongames.com/networking-for-game-programmers/udp-vs-tcp/    <--- interesting
06:23 Zeno` Even though I've read similar before it's good to see that the view is still current/valid in 2015
06:29 hmmmm yeah, I hope nerzhuel doesn't still think he's going to switch the network to TCP...
06:32 Zeno` I dunno. Haven't heard any mention of it apart from at the beginning
07:01 Fritigern joined #minetest-dev
07:39 Hunterz joined #minetest-dev
07:49 Lunatrius joined #minetest-dev
08:00 neoascetic joined #minetest-dev
08:03 Krock joined #minetest-dev
08:06 OldCoder joined #minetest-dev
08:09 est31 #2491 doesn't compile for some reason, but I don't know why
08:09 ShadowBot https://github.com/minetest/minetest/issues/2491 -- Finer progress bar updates when initializing nodes by est31
08:12 est31 hmmmm, I didn't use function pointers after all, because the only use case you can use them with < c++11 doesn't fit for me. c++11 isn't viable though, as debian 7 isn't released yet.
08:12 hmmmm ???
08:12 hmmmm what do you mean
08:13 hmmmm aww man, think about separation of concerns
08:13 hmmmm why does updateTextures need a handle to the device and guienv
08:14 est31 to call the update method
08:14 hmmmm why can't you pass the update method along
08:14 est31 because it will need the parameters too
08:15 hmmmm yeah but they can be abstracted away from updateTextures
08:15 est31 I'm not sure whether they are the same which the client class has
08:15 hmmmm so what's wrong with this:
08:15 hmmmm virtual void updateTextures(IGameDef *gamedef, void (*progress_callback)(void *), void *progress_callback_args)=0;
08:16 est31 hmmmm, that sounds reasonable
08:16 hmmmm struct TextureUpdateArgs { IrrlichtDevice *device; gui::IGUIEnvironment *guienv; };
08:16 hmmmm TextureUpdateArgs args;
08:17 hmmmm args.device = device;  args.guienv = guienv;
08:17 est31 yes, I'll need two additional params to the pointer, but mostly it looks good.
08:17 hmmmm okay
08:17 hmmmm in fact maybe you don't even need to define a struct for that
08:17 hmmmm just make it a void **
08:18 hmmmm then pass along void *callback_args = {device, guienv, NULL};
08:18 hmmmm erm, void *callback_args[];
08:18 neoascetic what system requirements for the Android app?
08:18 est31 neoascetic, --> #minetest
08:18 hmmmm see you shouldn't even technically need NULL there even
08:19 est31 yes seems so, I always know the length
08:19 hmmmm because using callback arguments is basically done by an agreement between the one passing the callback and the callback itself
08:19 hmmmm there are lots of very bad, overcomplicated solutions to this problem
08:19 hmmmm in C++11 there are lambdas and other functional things that are used as closures
08:20 hmmmm when we adopt C++11.... the functional features is one thing I'd like to avoid entirely
08:20 hmmmm s/is/are/
08:21 hmmmm without C++11, you can have something like what Google did in their base chromium library and all these gay Closures and Callbacks<> which is a few thousands of lines of extremely confusing template code to accomplish what I accomplished in 5 lines of code
08:22 hmmmm don't ever fall into this trap of making some trivial mechanism overly complicated because you're convinced it needs to be done The C++ Way(tm)
08:27 kilbith joined #minetest-dev
08:35 Calinou joined #minetest-dev
08:41 neoascetic joined #minetest-dev
08:46 nrzkt joined #minetest-dev
08:47 nrzkt est31: done sorry :)
08:47 est31 np :)
08:47 nrzkt application is now valid on play store, please increase the download number, the reviews, etc :p
08:47 nrzkt and don't hesitate to add comments :p
08:48 nrzkt the first download stats will be available tomorrow or in 2 days
08:48 est31 is it valid?
08:48 Krock *downloads*
08:48 nrzkt the state is published on playstore now, since the last update (i don't modify many things)
08:49 est31 ah this must be "google update": not all users see the same version
08:50 neoascetic nrzkt I've add 5 stars, but cannot run it :D
08:50 neoascetic how to debug? there is no debug.txt
08:51 Krock hmm.. where's it? I can't find it on the app store :/
08:51 Krock maybe too less downloads to get noticed
08:51 est31 Krock, search for "Minete" :D
08:51 nore https://play.google.com/store/apps/details?id=net.minetest.minetest
08:51 Krock found!
08:52 est31 neoascetic, either the problem is so severe it doesn't even populate that directory, or it doesn't populate that directory, but some other
08:52 est31 neoascetic, can you inspect catlog?
08:52 neoascetic Mac developer program costs $99/year. F*king Apple
08:54 neoascetic est31 there is the only Minetest directory, and it is empty
08:55 neoascetic probably RAM issue
08:55 est31 neoascetic, can you run catlog on that device?
08:55 Krock Minete keeps crashing when I try to open t :(
08:55 neoascetic 383Mb free of 645
08:55 est31 https://play.google.com/store/apps/details?id=com.nolanlawson.logcat
08:55 neoascetic Oh, seems like same problem as mine
08:55 nrzkt sorry german, was a typo fix yesterday when fixing the deleted app :s
08:56 nrzkt with logcat we can know what is the problem Krock
08:57 neoascetic so, should I search for minetest in catlog?
08:58 est31 yes
08:58 neoascetic E: unable to read bindir
08:59 est31 neoascetic, do you have more info?
09:00 nore joined #minetest-dev
09:01 Krock unknown permission android.permission. READ_EXTERNAL_STORAGE
09:01 Krock .. in package net.minetest.minetest
09:03 nrzkt oh ? what is your android version ?
09:04 Krock 1min. I re-tried and now I get another error: unable to read bindir
09:04 nrzkt hmmmm: the oldForgePacket is here for compat, because we need a SharedBuffer in the queue, not a NetworkPacket, it's not sapier's work but mine
09:04 kilbith he's not here
09:04 Krock it also can't find the sharedir
09:04 kilbith use ~tell
09:04 nrzkt oops :p
09:04 Krock use memo
09:05 nrzkt ~tell hmmmm the oldForgePacket is here for compat, because we need a SharedBuffer in the queue, not a NetworkPacket, it's not sapier's work but mine
09:05 ShadowBot nrzkt: O.K.
09:06 celeron55_ nrzkt: where is that apk available outside of google play?
09:06 Calinou celeron55_, see the news post
09:06 celeron55_ ok
09:06 Calinou https://forum.minetest.net/viewtopic.php?f=18&amp;t=11483
09:06 Calinou https://github.com/minetest/minetest/releases/download/0.4.12/Minetest-0.4.12.7-android.apk
09:07 neoascetic here my log: https://gist.github.com/neoascetic/47d5eb88b61dc2e25b4d
09:07 nrzkt ~tell Zeno` our reliability process create a TCP stack over UDP. I want to use a native TCP for reliable packets, and after, add a UDP socket for non reliable packets. This permit to handle connections efficiently with the reliability and the connection state and UDP for unreliable packets, natively
09:07 ShadowBot nrzkt: O.K.
09:08 Calinou I like the hybrid TCP + UDP idea, but you will have to make a notice about it
09:08 Calinou so that people hosting servers forward both TCP and UDP
09:08 Krock neoascetic, I'm getting +/- the same
09:08 neoascetic yep
09:09 celeron55_ https://metacrane.com/ff/33667/20150315110836.png
09:09 celeron55_ this happens for me
09:09 nrzkt Calinou: right, but it's not time to tell admins to do it because stack isn't finished yet, i need to finish it but i have so many things to do :p. The TCP part is finished except for big  packets which  need a special socket handling
09:10 est31 That bug celeron55_ ? Zeno should have fixed it.
09:10 nrzkt celeron55_ i think we must use current master instead of stable 0.4, many android fixes have been added. I only release stable-0.4 to keep our release process correct but i got bugs too
09:10 est31 ah yes the fix was added > 0.4.12
09:10 nrzkt est31: i also have the bug, but not in master. If you find the commit i cherry pick into stable-0.4 and release a new apk
09:11 celeron55_ well in this situation we probably have to use a custom version
09:11 est31 nrzkt, celeron55_  https://github.com/minetest/minetest/commit/5698e2baf8008b11706a4bbc4d62c8b584703834
09:11 nrzkt ok, i cherry pick and test the apk. If okay celeron55_ can i release 0.4.12.10 on play store ?
09:12 est31 I'm not sure perhaps this is needed too :https://github.com/minetest/minetest/commit/aefe80769bc515e0ddbfc734d41de396aca1259c
09:12 celeron55_ i think the version should be something that clearly indicates it's an android-only version
09:13 celeron55_ i'd go for 0.4.12.a1 or something :P
09:13 nrzkt android build doesn't use the tags if i can remember
09:13 est31 it does
09:14 nrzkt celeron55 why not. I look at this
09:14 est31 but if it fails it replaces the version with "gUnknown" -- which is bad as thats used then instead of "0.4.12".
09:15 Krock I've seen MagiChet on the appstore (with desktop browser) and that version has the gUnknown problem
09:17 est31 sfan5 has found out about it
09:20 fz72 joined #minetest-dev
09:22 Zeno` joined #minetest-dev
09:23 nrzkt est31: i picked the 2 commits into stable-0.4, will now test it, if it fix i push the stable-0.4 branch and then try to fix this versioning status
09:26 nrzkt thanks est31: that's good. I can now look at the version problem
09:27 nrzkt xD for gUnknown
09:27 nrzkt grep -R gUnkn ../..
09:27 nrzkt ../../build/android/Makefile:export GITHASH=gUnknown;
09:27 est31 It just shouldnt do anything
09:28 nrzkt simple: android uses gUnknown , and only android :). Then i replace gUnknown with Android, that's better, no ? :)
09:28 nrzkt then the version will be 0.
09:28 Zeno` est31: #include <IAnimatedMesh.h> doesn't fix the problem (#2491)?
09:28 nrzkt 0.4.12-Android
09:28 est31 nrzkt, the problem is it will only print "Android"
09:29 est31 GITHASH also contains the 0.4.12
09:29 est31 thats why setting it that way doesnt work at all
09:29 Zeno` actually you probably don't need to do that; just forward declare it and make sure IAnimatedMesh.h is in the appropriate .cpp files where/if necessary
09:29 nrzkt oh, really ? i verify this
09:29 est31 Zeno`, I'll do it as hmmm suggested
09:29 est31 with func pointers
09:29 Zeno` est31, what did hmmm suggest?
09:29 est31 and no needless inclusions
09:30 Zeno` a fwd decl is not an include :P
09:30 nore_ joined #minetest-dev
09:31 fz72 nrzkt: did you cherry pick the fix of Zeno` for fgettext?
09:31 nrzkt hmmmm githash is properly shown in my released in fact. It's a problem with other builds
09:31 nore_ left #minetest-dev
09:31 nrzkt fz72: yes
09:32 nrzkt but the version is only the tag there, i don't see 0.4.12
09:32 est31 still nrzkt this logic makes the makefile stuff unneccessary:  https://github.com/minetest/minetest/blob/587167e940228e52e5df5e4b5ecb7b5ff1ea1a7b/src/version.cpp#L29
09:32 Zeno` est31, it's actually a (compile-)bug that really should be fixed despite the approach you finally take
09:33 est31 Zeno`, so you mean its unrelated?
09:33 Zeno` est31, not totally unrelated but I've seen the same "bug" (if it can be called a bug) in other PRs before
09:33 Zeno` I'll fix it after your final solution if you like
09:34 Calinou joined #minetest-dev
09:34 est31 ok Zeno`, thanks
09:37 Zeno` I suspect it's down to different irrlicht versions and a file move or something. I'll see if your PR compiles for me
09:37 est31 even if its still WIP
09:37 Zeno` *shrug* can't hurt
09:42 Calinou joined #minetest-dev
09:48 nrzkt ok, i will push a version fix for Android in stable-0.4. The VERSION_STRING is now: $(git-tag)-(git-commit)-Android
09:50 est31 I don't know but isn't an android branch better for this?
09:50 est31 what are opinions on this?
09:50 est31 & then use tags for "releases".
09:50 nrzkt no
09:51 nrzkt we don't have hands for this. I do this because we need to have a proper Android release because we have many and many users on it. But the code remains the same
09:52 nrzkt i think we could backport some useful fixes for Android or 0.4 into stable-0.4 branch but maintain another branch is too hard. Look at dev-0.5, i was the dev to maintain it. If we are more maybe it's useful but not there
09:52 O_o_ joined #minetest-dev
09:52 est31 with installed version mostly being controlled by us, we can have a separate release schedule, with shorter cycles (but only stability fixes between versions).
09:53 nrzkt stable-0.4
09:53 O_o_ left #minetest-dev
09:53 nrzkt :)
09:53 est31 ok perhaps stable-0.4 does exactly that.
09:54 DarkRoses joined #minetest-dev
09:54 est31 but still would be better to have a stable branch that will work after 0.5 release too.
09:54 neoascetic stable-0.5?
09:54 nrzkt stable-0.4 will not be removed.
09:54 nrzkt yes stable-0.5 i think, our tree is divergent between stable-0.4 and master
09:55 est31 but then you would need to change the branch in order to update.
09:55 nrzkt but at 0.5 release we must keep master and stable-0.5 in sync
09:56 nrzkt okay, i publish APK v 10 to google play store, it's working properly. Calinou are you there ?
09:56 Calinou yes
09:56 est31 I'm just asking because f-droid has an automatic version detection system: it gets the versions from the git tags. also it would benefit from your maintaining nrzkt if you tag your pushes to play store.
09:56 nrzkt i will publish a new release on github
09:57 est31 thats enough nrzkt :)
09:57 est31 is neoascetic's and Krock's problem fixed, too?
09:57 nrzkt est31: i understand, but i think don't automate a use commits could be better atm because the release process is not very very clear :s
09:58 nrzkt the permission problem ? they don't give me their android version
09:58 est31 no, something else
09:58 est31 https://gist.github.com/neoascetic/47d5eb88b61dc2e25b4d
09:59 est31 "10:58:15: ERROR[main]: Unable to read bindir"
09:59 nrzkt Calinou: please change the 0.4.12.7 links to 0.4.12.10 please
09:59 Krock nrzkt, I said it's not the error, it was a warning
09:59 Calinou changed
10:00 nrzkt i'll look at this after, but i need your android version to look at the dev documentation about permission. I suspect something between android versions
10:00 est31 Zeno`, PR updated
10:02 est31 Krock, can you do uname -a on that android?
10:02 Krock est31, ehm what? I have no idea how to open something like a console
10:04 Zeno` est31 I think you can't (have to look at proc/something from memory)
10:04 neoascetic joined #minetest-dev
10:04 nrzkt you can view your android version into settings
10:04 nrzkt uname -a will return the kernel, i'm not interest with the kernel but Android :p
10:05 DarkRoses left #minetest-dev
10:05 est31 oh zeno can be right, busybox is required...
10:06 est31 I'm just wondering whether it could be linux < 2.2
10:06 Krock kernal 2.6.35.7 android version 2.3.6
10:07 neoascetic When app will be updated in play store?
10:07 nrzkt in a few hours :p
10:07 nrzkt the APK is published, now google must validate it
10:07 neoascetic okay
10:07 est31 This is where the error is triggered. https://github.com/minetest/minetest/blob/9da99efca226c377d3bc2914561edffd812a9c1a/src/porting.cpp#L479
10:11 nrzkt this proc is available on my Android 4.2.2
10:11 est31 yes its available since linux 2.2
10:11 est31 man sais that
10:11 est31 even before its available
10:11 est31 just no real symlink
10:14 nrzkt then Krock, the right problem you get is normal... if i remember the right was added in android 4.x
10:15 nrzkt note: i will backport the makefile changes to master in a few minutes
10:16 nrzkt est31 #2490 ok ?
10:16 ShadowBot https://github.com/minetest/minetest/issues/2490 -- Update and complete German translation and fix mistakes (second try) by Wuzzy2
10:17 est31 nrzkt, https://github.com/minetest/minetest/commit/0429ec4cfde636dd8dda3d1a0dcf6e175c821196#commitcomment-10202147
10:18 nrzkt right i don't know why i let this :p
10:18 nrzkt i fix the backport, not the stable-0.4, only at next release of android if needed
10:19 Zeno` what is BUFSIZ?
10:19 Zeno` I wish I didn't look
10:20 est31 lol :D
10:21 est31 Zeno`, http://dev.minetest.net/Code_style_guidelines#Function_declarations
10:21 est31 "Indention for follow up lines is exactly one tab."
10:24 Zeno` est31, but not for function prototypes
10:24 Zeno` lol
10:24 Zeno` well, that used to be the rule anyway... maybe it's changed
10:24 ImQ009 joined #minetest-dev
10:25 Zeno` https://github.com/minetest/minetest/blob/9da99efca226c377d3bc2914561edffd812a9c1a/src/porting.cpp#L474   <--- I'm surprised that this has never caused a stack overflow
10:25 Zeno` est31, even if it's not the rule it makes the code prototype clearer (especially since it's a fn ptr)
10:26 Zeno` oh wait... they're not rules; just guidelines :)
10:29 est31 ok, adding two tabs
10:29 Zeno` only if you see what I mean...
10:29 est31 its just                                          we are talking abut
10:29 Zeno` it just seems clearer to me (especially in that case)
10:29 Zeno` that specific case*
10:30 est31 you mean it can be confused with \tprivate:\n\t\tvoid?
10:31 fz72 joined #minetest-dev
10:31 Zeno` I mean just scanning the code really quickly that line 402 looks like another function prototype that has been indented improperly
10:31 est31 ah also github's tab width exactly matches "virtual "
10:31 Zeno` yes
10:31 est31 it isn't constant
10:31 est31 so I might do the identation with spaces...
10:31 Zeno` I know, but I'm talking about scanning not correctness
10:32 est31 two tabs wont help, what if somebody sets their editor to half width=
10:32 Zeno` true
10:33 est31 e.g. this is what my editor shows: http://pbrd.co/1BkR33a
10:34 Calinou joined #minetest-dev
10:35 Zeno` est31, wanna see something even weirder? http://codepad.org/8Io3RamE
10:36 Zeno` (and yes that's compliant with the standard)
10:36 est31 (void) just means that its empty
10:36 Zeno` nothing related of course... just something of interest
10:36 est31 wasn't even some ancient C version that required this?
10:36 Zeno` well it's ok with c89
10:37 Zeno` In c  blah() and blah(void)  are quite different --- not sure about C++
10:38 est31 Zeno`, better?
10:38 SopaXorzTaker joined #minetest-dev
10:38 Zeno` if the void is not there the function /may/ have arguments (that you can retrieve using va_ functions)
10:38 Zeno` hmm?
10:38 est31 see PR
10:38 Zeno` oh, the PR.. stop remaining on-topic
10:38 Zeno` lol, /me looks
10:39 est31 now its mixed spaces and tabs in order to guaranteed break from normal reading.
10:39 est31 except people set their tab width to 0
10:40 Zeno` seems ok to me
10:41 est31 some benchmarks: dreambuilder loading requires 20 seconds in that textureupdate method
10:41 est31 0.2 of those are spent drawing
10:41 est31 100 times
10:42 est31 minimal test spends 140 ms in that method
10:42 est31 and spends indistinguishably nothing in the method
10:42 est31 after all, only one frame is drawn
10:42 neoascetic btw why only windows and android binaries present in release?
10:42 est31 (usually around 20% for some reason)
10:43 est31 neoascetic, linux has package managers.
10:43 neoascetic okay, same for OSX then...
10:43 est31 and spends indistinguishably nothing for **drawing**
10:44 * est31 continues reading the wuzzy translation PR
10:46 Zeno` performance isn't a huge issue in this part of the code
10:47 est31 its just important that the gui gets updated
10:47 Zeno` yes
10:47 est31 android even asks you whether to kill the app because it doesnt react
10:47 est31 when you touch it while loading
10:48 neoascetic > There are no Android builds yet, we'll add them soonâ„¢. in release 0.4.12 notes on github. I guess this is not true atm :)
10:48 kahrl Zeno`, is it really compliant to pass a function pointer returning void when a function pointer returning void* is expected?
10:48 * kahrl is confused
10:48 est31 kahrl, this is the OT stuff?
10:48 kahrl oh, yes
10:49 Zeno` kahrl, it's not returning a void *
10:49 Zeno` the function is the pointer
10:50 Zeno` (right-to left associativity) and yeah it's compliant although I've never really seen anyone use that form of the prototype in real life
10:51 kahrl I'm pretty sure void *(void) expands to void *(*)(void) which is a pointer to function returning void*
10:51 kahrl you probably want void (*callback)(void)
10:51 Zeno` kahrl, that is equivalent
10:52 Zeno` we had a very interesting discussion about this very topic on ##c one night
10:53 kahrl http://codepad.org/FLJdf9NP
10:53 Zeno` no, no
10:53 Zeno` that's in a different context... it must be in the parameter list
10:53 Zeno` only in the parameter list is it equivalnet
10:54 kahrl I never heard of such a thing
10:54 Zeno` neither had most people on ##c
10:54 ElectionLibre joined #minetest-dev
10:54 Zeno` I think the only one who had was pragma
10:55 Zeno` Zhivago at first said it was wrong as well but then changed his mind
10:55 kahrl AFAIK functions get promoted to function pointers in argument lists, which makes void *callback(void) equivalent to void *(*callback)(void)
10:55 kahrl gcc complains about your code: http://codepad.org/SP5OQOS2
10:55 Zeno` I wish I'd kept the log and my bookmarks
10:56 est31 nrzkt, commented on #2490
10:56 ShadowBot https://github.com/minetest/minetest/issues/2490 -- Update and complete German translation and fix mistakes (second try) by Wuzzy2
10:56 nrzkt Thanks est31
10:58 kilbith sfan5: you can ban ElectionLibre plz ? he's impersonating ppl on several channels
10:58 ElectronLibre joined #minetest-dev
10:59 est31 This ElectionLibre 97e4d023@gateway/web/cgi-irc/kiwiirc.com/ip.151.228.208.35
10:59 est31 not the one who joined right now.
10:59 est31 thats ElectionLibre :)
11:00 ElectronLibre ^ The one with the webgate adress is KittenHelper.
11:00 ElectionLibre left #minetest-dev
11:00 est31 nrzkt, if you have time to review #2491?
11:00 ShadowBot https://github.com/minetest/minetest/issues/2491 -- Finer progress bar updates when initializing nodes by est31
11:01 nrzkt what is the change in fact ?
11:01 nrzkt i didn't test it, which bar ? at loading ?
11:01 est31 at joining yes
11:01 est31 right now, its not even updating.
11:03 nrzkt i think having a constructor could be nice
11:03 est31 ?
11:03 nrzkt TextureUpdateArgs tu_args(device, guienv, getTimeMS() ... );
11:04 est31 if you know a compact way.
11:04 est31 but I dont want to add a huge constructor thats used precisely one time
11:04 nrzkt i see
11:06 nrzkt seems good but not familiar with those void* :p
11:06 Zeno` they're fine
11:06 nrzkt then if they are fine let me a second
11:07 nrzkt please fix whitespaces
11:08 est31 lol Zeno` demanded them that way.
11:08 nrzkt git am is not happy
11:08 est31 "mixed whitespace"?
11:09 nrzkt http://pastie.org/10027506
11:09 Zeno` I suggested 2 tabs :P
11:10 est31 two tabs then to satisfy git?
11:11 nrzkt space before tab in indent said git
11:11 est31 ha! with two tabs, my editor has the issue.
11:11 nrzkt i like the feature, except that :p
11:15 est31 Zeno`, what about new way?
11:15 est31 (nrzkt, too)
11:17 sfan5 kilbith: which channels?
11:18 est31 sfan5, #minetest-dev, I think they are already banned from #minetest
11:19 sfan5 est31: they are already muted here
11:19 kilbith sfan5: here and #minetest-fr
11:20 sfan5 i can't do anything in #minetest-fr
11:20 kilbith already banned in that channel
11:20 Zeno` well, it's not an argument it's a parameter
11:20 Zeno` heh
11:20 Zeno` (since we're being pedantic)
11:22 est31 wow Zeno` you are a compiler?
11:22 Zeno` nah. But just one real nitpick... void (*progress_callback)(void *, u32 progress, u32 max_progress) ... the first parameter is not named but the rest are
11:23 Zeno` I think they should all be named
11:23 Zeno` why is it void* anyway? For future expansion?
11:24 est31 Zeno`, to not require any type stuff from the caller
11:24 Zeno` I don't really see why it cannot be TextureUpdateArgs *
11:24 est31 I dont even know whether client.cpp is included there
11:24 Zeno` hmm
11:24 est31 I would also need to make it non-local too
11:24 Zeno` ok, so it's for forward-compatibility?
11:25 est31 its for decoupledness
11:25 Zeno` ok, that's a fair enough argument I guess
11:25 Zeno` *shrug*
11:25 Zeno` I will merge. Can another dev agree or disagree please?
11:26 est31 but I'll fix the names if you want
11:26 Zeno` yeah maybe give it a name
11:26 Zeno` user_data is probably more "traditional" that "args"
11:27 Zeno` s/that/than
11:27 est31 I'm using args elsewhere too
11:27 est31 and thats a real nitpick isnt it?
11:27 Zeno` yep, leave it as args then and just add the name to the prototype
11:27 Zeno` yeah it was real
11:29 nrzkt est31, tell me when everything is good :p
11:29 est31 Zeno`, nrzkt should be now :)
11:29 Zeno` I could nitpick more if you like :)
11:30 Zeno` but anyway, I'll merge if another dev agrees
11:33 Zeno` s/if/when
11:33 Zeno` haha
11:34 est31 in the meantime, you could have a look at #2482 too.
11:34 ShadowBot https://github.com/minetest/minetest/issues/2482 -- Fix bug that disabled game-based minetest.conf default setting by est31
11:34 Zeno` for reference, there are casts that are not required
11:34 est31 in which PR?
11:34 Zeno` e.g. u16 cur_percent = ceil(progress / (float) max_progress * 100.);  should simply be   u16 cur_percent = ceil(progress / max_progress * 100.0);
11:35 neoascetic Could one more core developer review #2471 please?
11:35 ShadowBot https://github.com/minetest/minetest/issues/2471 -- Standalone bundle for OSX (w/ dependencies!) by neoascetic
11:35 cib0 joined #minetest-dev
11:36 Zeno` ceil() requires a double and the expression you are evaluating casts the result to a float and then the call to ceil casts it back to double  (any compiler will fix that though)
11:39 est31 I'm not casting to u16?
11:41 Zeno` in the assignment you're "effectively" casting, I was talking about the type of the result of the expression passed to ceil (which you cast to float when it's already of type double but ceil() wants a double)
11:41 est31 ah
11:41 Zeno` 100.0 <--- double
11:42 sfan5 100.0f <--- float
11:42 Zeno` but why do that when ceil wants a double? :)
11:42 Zeno` it's going to be reinterpreted anyway (back to double)
11:43 est31 ok fixing that too
11:43 Zeno` if you like... it's kind of just a nitpick as I said
11:43 Zeno` I will merge in 10 minutes if nobody disagrees
11:44 est31 Zeno`, btw how is the rule, "one double makes everything double?"
11:44 est31 and "one cast casts everything"?
11:46 Krock Looks like everyone else had something else to do, it was quite easy to fix that bug #2493
11:46 ShadowBot https://github.com/minetest/minetest/issues/2493 -- Connect rails with connect_to_raillike again by SmallJoker
11:49 Zeno` est31, type promotion
11:49 sfan5 uhh
11:49 sfan5 nrzkt: https://github.com/minetest/minetest/commit/2bc0165652ec9244081f7c0db28c8d9c81b5d308
11:49 sfan5 nrzkt: why?
11:50 iqualfragile joined #minetest-dev
11:50 est31 nrzkt released a custom android version with backported fixes
11:50 sfan5 thats not what i mean
11:51 nrzkt sfan5 why on what ?
11:51 est31 to not confuse it with "real" version, he added the "-Android".
11:51 sfan5 i was about to ask about that
11:51 nrzkt you talk about the -Android suffix ?
11:51 sfan5 yes
11:52 nrzkt because i fixed the gUnknown version, celeron55 suggest to add a thing to know it's an android build, then i add this suffix to build
11:52 nrzkt then know version is 0.4.12-<commit>-Android
11:52 sfan5 we know that it's android by the arch anyway
11:52 nrzkt if i play on my raspberry pi it's not android :)
11:53 est31 Zeno`, http://pastie.org/10027544
11:53 est31 this version works
11:53 est31 somehow I couldn't remove the casts
11:53 sfan5 this complicated things a bit
11:53 nrzkt why ?
11:54 sfan5 because there are two ways android versions will appear
11:54 sfan5 1st Minetest/0.4.12-commit-Android armv7 and 2nd Minetest/0.4.11 armv7
11:55 nrzkt with older official builds the version was only commit :s
11:56 Zeno` est31, that's just precedence :)
11:57 sfan5 3 ways then
11:57 Zeno` leave it as it is if you like, but ceil(100.0 * progress / max_progress) would work fine
11:57 sfan5 "Minetest/0.4.12-commit-Android armv7l" or "Minetest/0.4.11 armv7" or "Minetest/commit armv7" or "Minetest/gUnknown armv7"
11:57 sfan5 actually 4
11:58 est31 its staying that way.
11:58 est31 :P
11:58 sfan5 nrzkt: also you didn't fix gUnknown
11:58 nrzkt i don't know where does 0.4.11 comes from, it's not the makefile way . Only commit exissts in the logs ?
11:58 sfan5 nrzkt: gUnknown only happens when it doesn't find a .git directory
11:59 est31 or git isnt installed?
11:59 sfan5 nrzkt: currently if it doesn't find git it will look like "Minetest/--Android"
11:59 nrzkt the official build is done by myself and will contain the githash
11:59 sfan5 which isn't much better than gUnknown
11:59 leat joined #minetest-dev
11:59 Zeno` also, 72 + (u16) ((18 / (float) 100) * targs->last_percent));  is better written as  72 + (u16) (18.0f / 100) * targs->last_percent);  IMHO :p
11:59 leat joined #minetest-dev
12:00 Zeno` but... merging now
12:00 est31 Zeno`, see latest version
12:00 sfan5 x.x.x.x - - [15/Mar/2015:11:59:58 +0000] "GET /list HTTP/1.1" 200 112176 "-" "Minetest/0.4.10 (Linux/3.4.5 armv7l)" "-"
12:00 sfan5 ^ nrzkt, there are enough of these
12:00 sfan5 some third party clients
12:00 nrzkt i can re-add gUnknown if you want sfan5
12:01 sfan5 no
12:01 sfan5 you don't need to re-add anything
12:01 sfan5 with that commit gUnknown because --Android
12:01 nrzkt --Android will be non git builds
12:01 sfan5 yes
12:01 sfan5 gUnknown was non git builds too
12:02 nrzkt then we could add the stats for those unofficials. Now we have a pattern for our official builds. I will have google play store stats in few days and if F-Droid and Amazon Store will be supported you will have more stats :)
12:02 sfan5 what I suggest is: don't set the CMAKE_VERSION_GITHASH at all when it isn't found
12:03 nrzkt then the version will be only 0.4.12
12:03 sfan5 or set it to STR(VERSION_MAJOR)"."STR(VERSION_MINOR)"."STR(VERSION_PATCH)"-Android"
12:04 sfan5 even 0.4.12 would be more useful than --Android
12:04 nrzkt i'll look at this idea in a few minutes
12:05 est31 good idea: <sfan5> or set it to STR(VERSION_MAJOR)"."STR(VERSION_MINOR)"."STR(VERSION_PATCH)"-Android"
12:06 sfan5 nrzkt: https://play.google.com/store/apps/details?id=net.minetest.minetest is called "Minete"
12:06 sfan5 at least for me
12:06 est31 german problem
12:07 nrzkt yes, it will be fixed when 0.4.12.10 will be available
12:07 sfan5 also the icon is still not very high-res
12:07 nrzkt typo fix when republishing the app because google delete it because someone report it as spam...
12:07 nrzkt if you get a 512x512 proper i'll change it
12:10 nrzkt can somes look at minetest_game, sfan5, many pr are waiting for approval :(
12:11 fz72 Any Core Dev wants to review #2382?
12:11 ShadowBot https://github.com/minetest/minetest/issues/2382 -- Remap Mouse and Key Buttons by fz72
12:15 sfan5 nrzkt: here's a 512x512 http://meow.minetest.net/i/33b96e7e749ab565.png
12:16 nrzkt thank, i updated the playstore
12:16 Krock sfan5, meow lies to me, it tells me /i/ could not be found!
12:17 sfan5 Krock: directory listing is disabled
12:17 Krock too bad
12:29 neoascetic joined #minetest-dev
12:34 ModsNOW joined #minetest-dev
12:37 rubenwardy joined #minetest-dev
12:58 nrzkt Okay guys, 0.4.12.10 is online on Play Store
12:58 nrzkt please update your clients :). Also the german fix may be there
12:59 nrzkt this will fix the problem with translations :)
13:01 Krock is it still Minete?
13:04 Krock Repaired #2480
13:04 ShadowBot https://github.com/minetest/minetest/issues/2480 -- Add mg spflags in dlg create world by srifqi
13:04 Krock [needs testing]
13:04 nrzkt Krock, can you verify on the playstore, it's fixed but after the apk update maybe not now
13:05 sfan5 nrzkt: it says "Minetest" for me
13:05 nrzkt thanks sfan5
13:08 rubenwardy joined #minetest-dev
13:46 VargaD joined #minetest-dev
13:46 Zeno` joined #minetest-dev
13:55 MinetestForFun joined #minetest-dev
13:57 nrzkt what about adding a message at login for outdated clients and integrate this in core or minetest_game ?
13:58 nrzkt we check if client < server and send him a message
13:58 nrzkt this could be good :)
14:02 cib0 joined #minetest-dev
14:02 est31 joined #minetest-dev
14:05 DarkRoses joined #minetest-dev
14:14 Zeno` DarkRoses, stop pretending you're someone you're not
14:14 DarkRoses left #minetest-dev
14:14 Zeno` social engineering so blatantly obvious will not work here
14:15 est31 FYI Zeno` that user is quieted on this channel.
14:15 est31 I'm still for a ban
14:15 Zeno` good :)
14:15 Zeno` I'd ban as well
14:20 Zeno` hmm
14:20 Zeno` seems they have logged into my server with similar names to my known players as well
14:20 * Zeno` adjusts iptables
14:21 est31 on my server they logged in as admin, using social engineering attack
14:21 Zeno` yikes
14:23 Zeno` iptables -A INPUT -s 151.228.208.35 -j DROP   that should fix it
14:30 fz72 Zeno`: I don't see any progress on #2382
14:30 ShadowBot https://github.com/minetest/minetest/issues/2382 -- Remap Mouse and Key Buttons by fz72
14:35 fz72 Sorry, I have not seen your comment.
14:39 Zeno` fz72, I really don't like the setting and reading of those... are they necessary?
14:39 nrzkt sfan5, calls to masterservers are done with HTTP ?
14:39 sfan5 nrzkt: yes
14:41 MinetestForFun joined #minetest-dev
14:41 fz72 Zeno`: I don't know another way. That's the same as for normal buttons. Why you don't like them?
14:41 nrzkt can we have a new call please, i need to ask the master server what is last minetest version
14:41 nrzkt #2442
14:41 ShadowBot https://github.com/minetest/minetest/issues/2442 -- Notifications of new engine versions.
14:42 nrzkt i need 0 4 and 12
14:42 sfan5 just extend https://github.com/minetest/master-server
14:42 est31 I think we solve this problem using other methods.
14:43 est31 we should solve*
14:43 nrzkt est31, what is your idea ? master server is a good server to point this :)
14:43 est31 make people use officially supported minetest
14:43 nrzkt i don't talk about android
14:43 est31 afaik play store auto-updates
14:43 est31 so you talk about windows?
14:43 nrzkt android problem must be solved by server admins
14:43 nrzkt yes, windows for example
14:44 est31 because mac os and linux have own package repositories
14:44 nrzkt add a masterserver test on windows (minimally on windows) which add a notification on the main menu when an update is available
14:44 Zeno` KeyList is a std::list
14:44 est31 why do our own updater?
14:44 nrzkt not an updater, i want a notification
14:44 Zeno` those string values/lookups are not exactly efficient
14:44 nrzkt we need the information
14:45 fz72 ok, then it isn't good for all key buttons.
14:46 est31 my idea would be to encourage use of the chocolatey repo.
14:46 Zeno` yeah it's no good for any key settings
14:46 est31 but that feature should be disabled by default, and only enabled for official release builds for windows and mac.
14:46 nrzkt nobody use chocolatey, and there are many windows 7 without it
14:46 sfan5 est31: that will confuse the ordinary windows user
14:46 sfan5 and <nrzkt> nobody use chocolatey, and there are many windows 7 without it
14:47 Zeno` what other key settings currently use that approach?
14:47 est31 having to download zip and extract it too.
14:47 fz72 What do you mean?
14:47 nrzkt i use it because i'm a good user, but which windows user, which is a minetest play uses chocolatey ? 1/50k ?
14:47 Zeno` I mean does the current code do a string search in a list for each key?
14:48 Calinou Atom used to use Chocolatey for the Windows installs
14:48 Calinou keep it up-to-date, it's something useful
14:48 nrzkt we can keep it updated, but we don't forget the classic windows way: barbarian way
14:48 nrzkt and a notification on masterserver could be good :p
14:48 fz72 I don't know.
14:48 Calinou we should have an .exe installer preferably
14:49 Calinou alongside with the .zip (which is portable)
14:49 Calinou make it using NSIS or InnoSetup
14:49 Calinou rubenwardy had a prototype of it
14:49 kilbith kaeza too
14:49 nrzkt +1 for InnoSetup :)
14:49 est31 barbarian way good description
14:49 fz72 Zeno`: I must go, but I will think about it.
14:50 est31 ok I agree now, having old installer is better.
14:50 rubenwardy joined #minetest-dev
14:50 est31 there are no convenient ways how to package chocolatey apps into installers
14:51 nrzkt we need to handle all distribution paths, old paths included :p
14:55 rubenwardy https://gist.github.com/rubenwardy/5397343
14:55 rubenwardy ^ Outdated inno setup script for Minetest
14:56 rubenwardy I stopped using Windows and so stopped making InnoSetup installers
14:58 rubenwardy We can't rely on repositories telling uses of new versions, as they may not be updated.
14:59 Calinou we could eventually get portable GNU/Linux builds too
14:59 Calinou build them using Ubuntu 12.04 32 bit + 64-bit, should run nearly everywhere
15:01 est31 rubenwardy, then thats a problem with the repository, but we shouldnt reinvent the wheel
15:01 Zeno` I would not run on my distro :(
15:01 Zeno` it's unlikely anyway
15:02 rubenwardy No it's the problem with the person that put the package there and then didn't maintain it
15:02 Calinou Zeno`, Arch users can use the AUR anyway
15:02 Calinou I'm not sure if 12.04 builds would run into Fedora
15:11 nrzkt on arch the extra version is correct
15:11 nrzkt we don't need the AUR
15:17 SopaXorzTaker joined #minetest-dev
15:21 sfan5 <Calinou> build them using Ubuntu 12.04 32 bit + 64-bit, should run nearly everywhere
15:21 sfan5 or...
15:21 sfan5 just built (almost) completly static binaries
15:23 est31 xdg-app?
15:23 est31 I guess its too early for that
15:23 est31 no X support
15:23 est31 (not that I suggest that they add, but that wayland gets adopted)
15:44 Hunterz1 joined #minetest-dev
15:48 iqualfragile joined #minetest-dev
15:55 fz72 joined #minetest-dev
15:59 hmmmm joined #minetest-dev
16:02 cib0 joined #minetest-dev
16:05 iqualfragile joined #minetest-dev
16:06 hmmmm guys,
16:06 hmmmm I really am not too picky about coding style, just as long as it approximates something like the offical style
16:06 hmmmm but please make your own code consistent
16:07 hmmmm it sort of makes me upset when I see people switching between Type* and Type * within the same declaration
16:08 * est31 ducks
16:08 est31 those idents were zeno's wish btw.
16:08 est31 also agree to them.
16:09 est31 reason: the "void"s can be confused with wrongly idented methods.
16:09 hmmmm in any case, switching topics to NetworkPacket buffer copies...
16:11 hmmmm I think it would make more sense if SharedBuffer were extended to take a vector<u8>, or maybe switch the queueing system to accept NetworkPackets, or something
16:12 hmmmm that way we could have the internal std::vector become allocated on ctor, deleted on dtor, but ownership is 'taken' from it once it gets enqueued
16:13 hmmmm NetworkPacket::NetworkPacket(...) { buf = new std::vector<u8>(blah blah blah);  }  then in Send:  m_con.send(pkt.buf); pkt.buf = NULL; ...  then in NetworkPacket::~NetworkPacket() { delete buf; }
16:14 hmmmm that way if somehow enqueueing fails, the result is cleaned up, otherwise the delete is deferred to the cleanup handler after the data has been pending on the queue and actually sent, and there are zero copies involved
16:19 nrzkt hmmmm yes it's on the road but not pushed, i need to rewrite session manager and queue manager for the new protocol and this will be added there
16:20 nore joined #minetest-dev
16:20 Zeno` huh
16:20 Zeno` what idents?
16:21 hmmmm https://github.com/minetest/minetest/commit/e4f7c92cff0badd6c40b47bd90b1fc1b35456a1a#diff-34f48ad91ac6c202ac60b0348ae90e30R1566  ?
16:21 hmmmm double indented
16:21 Zeno` I never suggested that
16:21 Zeno` I missed it when looking, I will admit
16:22 hmmmm well they are indents..
16:22 Zeno` but I never suggested they be added
16:22 hmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
16:22 Zeno` where did I suggest that there should be 2 indents in that function? :P
16:23 hmmmm hey i didn't read any of the backlog from last night after i went to sleep.
16:25 Zeno` all I suggested was that the parameters of a function prototype should be indented especially because second parameter (which was the first line on the "continuation") was a function pointer
16:25 est31 two idents would break it when you set your ident width to 4 chars, one ident would break at 8 chars, so...
16:25 est31 then I tried mixed spaces+tabs solution
16:25 est31 git am of nerzhul complained
16:25 Zeno` est31, the code hmmmm is pointing to has nothing to do with my "wish" :)
16:26 est31 aw
16:26 est31 umm yes thats my fault
16:27 est31 completely.
16:28 est31 I copied it and didnt fix identation: an explanation, but no excuse.
16:28 est31 (from its earlier place, which was around here: https://github.com/minetest/minetest/commit/e4f7c92cff0badd6c40b47bd90b1fc1b35456a1a#diff-70868aa6d6b96c0c1623c761500d23c4R920 )
16:29 Zeno` well, I merged it. But, hey... shit happens
16:29 hmmmm heh
16:29 hmmmm hey at least it's not as bad as that one commit to one of the mainmenu scripts
16:30 est31 umm which one
16:30 est31 mine?
16:30 hmmmm "wha... how does minetest run with this blatantly invalid code... oh, THAT's the closing indentation
16:30 Zeno` lol
16:30 Zeno` yep
16:32 est31 so whats the accepted * style?
16:32 Zeno` against the name
16:33 hmmmm i always liked void *foobar better
16:33 Zeno` const char *s and not const char* s
16:33 hmmmm void* foobar seems to be more commonly used in academic settings
16:33 Zeno` hmmmm, and it leads to errors
16:33 hmmmm because CS professors want to make it clear that the pointer is a part of the type
16:33 hmmmm right
16:33 est31 k void *foobar matches my gut feeling.
16:33 hmmmm cause look at char *foo, *bar
16:33 hmmmm what would that be
16:34 Zeno` e.g.   void* ptr1, ptr2;
16:34 hmmmm yup
16:34 Krock Could someone pleasespend a minute to look at the bugfix #2493
16:34 ShadowBot https://github.com/minetest/minetest/issues/2493 -- Connect rails with connect_to_raillike again by SmallJoker
16:35 hmmmm nodedef->get(n_plus_z_plus_y
16:35 hmmmm that's repeated 3 times in the same block of code
16:36 hmmmm also that seems like a rather egregious error you fixed... did the person who wrote that not bother testing their shit before they committed it?
16:37 Krock BlockMen with commit https://github.com/minetest/minetest/commit/b65c7ab
16:37 hmmmm in any case... that code is very repetitive
16:37 Krock I know but what would you suggest?
16:37 hmmmm one of the golden rules is to not repeat yourself
16:37 hmmmm oh, i don't know, a loop?
16:39 hmmmm if you look the only thing differing throughout that block of code is the position being checked.. v3s16 offsets[] = {v3s16(x - 1, y, z), v3s16(x+1, y, z), ...};  for (size_t i = 0; i != ARRLEN(offsets); i++) { ...
16:40 Amaz joined #minetest-dev
16:40 hmmmm i honestly feel as if that entire function is a train wreck though
16:41 hmmmm at least break up each case into a separate function..
16:54 Krock I think I found a way
16:55 est31 also review for bugfix PR #2482 would be nice
16:55 ShadowBot https://github.com/minetest/minetest/issues/2482 -- Fix bug that disabled game-based minetest.conf default setting by est31
17:14 ShadowNinja est31: I got the partial require working, but this is what it took to get there: http://pastebin.ubuntu.com/10604980/
17:14 ShadowNinja Is it worth that huge ugly mess?  Should I re-implement require manually instead (I'd be copying substantial portions of loadlib.c)?
17:15 ShadowNinja I had to read the Lua source to find that magic _LOADED value that I need to override.
17:15 * est31 reads.
17:17 ShadowNinja package.loaded is read from debug.getregistry()._LOADED, but package.loaders/searchers is read from _ENV.loaders/searchers
17:17 ShadowNinja _ENV is set to package, instead of the globals table.
17:18 est31 lol
17:19 est31 what would be the major advantage in re-implementing? right now its ugly (can't really judge, haven't understood it yet), but only 40 lines
17:24 est31 *yess* minetest builds
17:24 est31 (for f-droid)
17:29 nrzkt good news
17:29 nrzkt have you look at the release documentation on dev.minetest.net, we updated it yesterday for android
17:35 hmmmm glah h
17:35 iqualfragile joined #minetest-dev
17:35 Krock hmmmm, https://github.com/SmallJoker/minetest/commit/419a14e
17:35 hmmmm everybody's dipping their fingers into the mapgen param settings pool
17:35 hmmmm and making it messy
17:36 hmmmm Krock:  awesome
17:36 Krock :D
17:36 hmmmm see now that's what i'm talking about
17:37 Krock but I'm not sure about pointers and such things.. could you please check if you find any possiblememory leak?
17:37 hmmmm there can't be any memory leak...
17:37 hmmmm you didn't modify anything with pointers in fact
17:38 hmmmm I suppose the real question to ask is:  does it work?  have you tested it?
17:38 Krock compiling right now
17:38 hmmmm I think I need to find a final solution to the mapgen params issue
17:38 Krock the people should use the per-world specific file
17:39 hmmmm where we explicitly load each of the overrides right there in the same function
17:39 hmmmm instead of being scattered throughout execution
17:39 hmmmm so unless I'm mistaken, the current precedence order is still:
17:39 Krock it works! double-smile
17:39 MinetestForFun joined #minetest-dev
17:40 ShadowNinja est31: Re-implementing would be less hacky and a big faster, although it would take more code.  That's not all though, the env and _LOADED also have to be set on security init, and both source tables have to be copied properly.
17:40 hmmmm hardcoded defaults -> global minetest.conf -> game minetest.conf -> map_meta.txt -> lua mod override
17:49 MinetestForFun joined #minetest-dev
17:54 leat joined #minetest-dev
17:55 est31 f-droid merge request sent: https://gitlab.com/fdroid/fdroiddata/merge_requests/639
17:56 est31 gtg btw, but I'll read the log with your comments.
18:05 nrzkt VanessaE ?
18:06 VanessaE hm?
18:07 nrzkt i found an thing to modify for your death bug on non enable_damage, at connection
18:07 nrzkt We don't send playerhp, but we can, i tested it, and also if the player is dead, tell the client is dead, which partially solve the death bug for those clients by reconnecting. Now i need to fix it live, without reconnect
18:08 ImQ009 joined #minetest-dev
18:08 nrzkt i push the modification to the repository now
18:09 nrzkt it was pushed
18:10 VanessaE sounds ok
18:11 ShadowNinja sfan5: If build-cleanup O.K. now?  I'd like to get it merged soon since it gets broken fairly easily.
18:11 ShadowNinja Is*
18:12 ShadowNinja sfan5: I removed that line from the man page like Zeno siggested and removed SOVERSION.
18:13 ShadowNinja (And rebased it)
18:18 VanessaE ShadowNinja: did you sort out the crashing problem with player_textures trying to access non-existent files?
18:18 ShadowNinja VanessaE: Nope.
18:18 VanessaE I think you're gonna wanna fix that :P
18:18 ShadowNinja I even tried gdb with "catch throw", but it didn't catch it.
18:19 ShadowNinja VanessaE: That was with security, not build-cleanup.
18:19 VanessaE ah
18:19 VanessaE conflated the two
18:22 ShadowNinja ERROR[main]: ServerError: Attempt to access external file .../mods/player_textures/textures/player_singleplayer.png with mod security on.
18:23 ShadowNinja Weird.
18:23 VanessaE so it can't resolve that the relative path really points to the mod's own dir.
18:23 ShadowNinja Oh...
18:24 ShadowNinja Path restrictions won't work after init time.
18:24 ShadowNinja There's not really a good way to fix that.
18:25 VanessaE which means there may be a crappy way.
18:25 ShadowNinja You'll just have to add player_textures as a trusted mod.
18:25 VanessaE no
18:25 VanessaE that's the wrong way to go about it
18:25 VanessaE there needs to be a proper way to test if a file exists
18:26 ShadowNinja The alternative involves something like local x = minetest.request_proof_of_modname() and then using that in later calls.
18:26 VanessaE (even if that means ficing the mod, that's fine too)
18:26 ShadowNinja Where x would be a userdata object.
18:26 VanessaE fixing*
18:26 VanessaE wat
18:26 VanessaE this is doing a direct modname request with a simple string
18:27 ShadowNinja VanessaE: The issue isn't existence, it's that the engine doesn't know what mod made an API call after init time.
18:27 VanessaE why should an extra call be needed here?
18:28 ShadowNinja And there's no easy way to fix that, because if the engine calls mod a and mod a calls mod b and b calls the engine, what made the request?
18:28 VanessaE well mods reading other mods' folders shouldn't be an issue
18:28 ShadowNinja VanessaE: player_testures can be fixed by listing the dir on startup and then consulting the table later.
18:28 VanessaE (ergo, the file open operation being performed here shouldn't even be routed through security calls, it's just a read op)
18:29 ShadowNinja This also fixes the "random color for texture when the texture's been added but the server hasn't been restarted" bug.
18:29 ShadowNinja But I'll have to add something like LuaFileSystem's dir() to the engine.
18:30 VanessaE that's a horrible way to do it
18:30 hmmmm joined #minetest-dev
18:30 VanessaE read a while dir and search it?
18:30 VanessaE that's nuts
18:30 VanessaE let the filesystem do its job
18:30 VanessaE whole*
18:31 ShadowNinja VanessaE: That's not how Minetest works though, it loads all textures on startup and has no support for dynamically adding tetures, so this actually fixes a bug and works better.  And it's faster.
18:31 VanessaE so?
18:31 VanessaE it breaks userspace
18:31 VanessaE (so to speak)
18:32 VanessaE I can fix the mod (or pilzadam can since its his, whatever) - but fixing it with incredibly hacky workarounds like that is just, no.
18:32 VanessaE there has to be a better way
18:32 ShadowNinja VanessaE: The mod dir is considered read-only, so if you need to access something there you can do it at startup.
18:33 ShadowNinja (read-only because it might be somewhere like /usr/share)
18:33 VanessaE then how are you gonna handle a mod searching and reading its own files in realtime?
18:33 VanessaE I've run across one or two mods that do that, though which ones they were doesn't come to mind right now
18:34 ShadowNinja VanessaE: I'm not, I can't without ugly hacks, but as I just pointed out it's not needed.
18:34 ShadowNinja VanessaE: If you need to read something in the mod dir you can open it at startup.  If you need to write something use the world dir.
18:34 VanessaE nono
18:35 VanessaE in *realtime*
18:35 VanessaE not startup
18:35 ShadowNinja VanessaE: Add it to trusted_mods until the owner fixes their mod or caches the file object.
18:35 VanessaE *headdesk*
18:36 VanessaE "VanessaE:  fire a shotgun through your firewall and wait for the mod owner to make all those little holes unnecessary."
18:38 ShadowNinja VanessaE: You prefer no firewall at all?
18:38 VanessaE of course not
18:38 VanessaE but if you're gonna erect a firewall, it's a bad idea to tell the user to start poking lots of holes through it
18:38 VanessaE (or the modder in this case)
18:39 VanessaE "This function will only work if the user adds the mod to their secure_trusted_mods setting or has mod security disabled."
18:39 VanessaE this is where you fail, honestly.
18:39 VanessaE users barely even know how to download a mod to install it in the first placd
18:39 VanessaE place*
18:40 VanessaE (the "firewall" analogy is somewhat ironic here, since these are the same users that generally are able to figure out their firewall software)
18:49 ShadowNinja VanessaE: Here's a fixed version, the solid-color texture bug is fixed and it works with security (although it needs to be trusted for LFS): http://sprunge.us/dKXa
18:50 VanessaE ShadowNinja: yeah, see that's just ugly
18:50 ShadowNinja If you just want it to work with security just add the first line and prepend "i." to the io.open call.
18:50 VanessaE and still, "trusted". FAIL.
18:51 est31 joined #minetest-dev
18:51 ShadowNinja VanessaE: If I add something like lfs.dir it won't need to be trusted.
18:51 VanessaE mmmh
18:51 VanessaE that's still a nasty workaround
18:51 est agree
18:52 est also agree to http://irc.minetest.ru/minetest-dev/2015-03-15#i_4187809
18:52 ShadowNinja VanessaE: Oh well, it's what we've got.
18:53 * VanessaE grumbles
18:53 VanessaE you're breaking a mod's ability to read its own files
18:53 * est gives the problem a closer look.
18:53 VanessaE (without using hacky workarounds)
18:53 ShadowNinja VanessaE: Only after init time.
18:54 ShadowNinja And, as a said, the mod dir is to be considered read-only, so you can easily pre-load anything you need.
18:55 sfan5 because preloading 2GB although you probably only need 12MB is totally good
18:55 VanessaE sfan5: THANK YOU.
18:55 sfan5 (I'm not saying a mod that needs 2GB of data exits, but it's possible)
18:55 VanessaE that's an argument I wanted to make, but I couldn't find the words
18:55 ShadowNinja sfan5: All you need is the file handle, you don't need to file:read("*all").
18:56 sfan5 what if I have like 8k files?
18:57 sfan5 you don't give someone a mod api only to say "no, you can't do that, bla bla bla, security." for every useful function a modder tries to call
18:57 ShadowNinja sfan5: Use the insecure env if you really need it, but that number of files is highly questionable.
18:57 VanessaE in this case, I have 238 filenames that would have to be loaded into that cache
18:57 sfan5 ShadowNinja: you can't know what a modder might need for what reasons
18:58 ShadowNinja sfan5: I could add an API to work around this, but it won't work natively due to design restrictions in the API.
18:58 ShadowNinja Security that won't work for a few mods is better than no security IMO.
18:59 ShadowNinja (Although that's an option with the enable_security setting.
18:59 sfan5 security that limits the potential of mods is the worst security
18:59 ShadowNinja )
18:59 VanessaE between all my servers, there are 11,944 unique accounts (so obviously not everyone has a skin)
18:59 ShadowNinja sfan5: Security isn't security if it doesn't inpose some limits.
18:59 ShadowNinja (like no rm -rf /
19:00 VanessaE security that limits the user or gets in his/her way is security they will bypass in the worst, easiest way possible also
19:00 sfan5 "you can't open files at runtime" is not a reasonable limit
19:00 VanessaE (which in minetest's case would probably equate to not updating past 0.4.12)
19:00 ShadowNinja sfan5: You can't open files >in the mod dir at runtime<.
19:01 ShadowNinja world dir is fine any time.
19:01 sfan5 that doesn't make it reasonable
19:01 ShadowNinja sfan5: And you have an idea for how to fix this?
19:01 sfan5 not impose that restriction?
19:02 ShadowNinja sfan5: This was tested with dreambuilder, only one mod failed because of this restriction.
19:02 ShadowNinja And my local worlds work.
19:02 sfan5 "works for me"
19:02 ShadowNinja So this is not something that many mods will need.
19:02 sfan5 "no mods break right now"
19:03 ElectronLibre joined #minetest-dev
19:03 sfan5 those sound like some good argument for limiting the potential of future mods
19:03 sfan5 +s
19:03 ShadowNinja sfan5: Ugh, just tell me what you think about build-cleanup.
19:03 sfan5 link?
19:05 ShadowNinja https://github.com/minetest/minetest/pull/2402
19:06 sfan5 "Backtick format is deprecated "
19:06 sfan5 i'd like a source for that
19:06 sfan5 "because it's harder to read" doesn't sounds like a reasonable reason to deprecate something
19:07 Calinou we use $() now
19:08 VanessaE "When  the  old-style  backquote form of substitution is used,"  <-- bash man page
19:08 sfan5 is that in the style guidelines?
19:08 VanessaE the man page doesn't call it "deprecated" but generally, it is.
19:09 ShadowNinja sfan5: Readability is the whole point of code style.
19:09 sfan5 so it's actually deprecated, ok
19:09 sfan5 but when did we decide that we don't want to use ``
19:09 sfan5 ?
19:11 VanessaE apparently it's because the $() method is POSIX while the `` method is not.
19:11 VanessaE that's about all I can find to explain it, aside from readability
19:12 VanessaE (I mean, why it's deprecated, not why it's necessarily in minetest code style)
19:12 ShadowNinja VanessaE: Both are posix, but $() is prefered because it's more visible/readable and it can be nested easily.
19:14 VanessaE hm, no surprise then if some websites get that wrong
19:14 VanessaE still you're right that $() is easier to read.
19:20 est what if we made it the other way?
19:20 est allow untrusted <-> untrusted reads
19:20 est between all mods
19:21 est and a mod that needs privacy can request it at load time
19:21 est it then gets a function that can be used to read/write inside
19:21 sfan5 it's not about privacy
19:21 sfan5 it#
19:21 sfan5 it's about security
19:22 est so why is it bad when untrusted mod A can modify untrusted mod B?
19:22 est "privacy" was just a catchy term
19:23 devmarth est, (assuming youre est31 :P), do i include just the sdk folder or a folder inside of it like /platforms/ or /tools/?
19:23 est --> #minetest
19:35 est the only case that can be dangerous is when somebody is adding a new mod to the list of trusted mods.
19:35 est and that has been "tainted" before by a malicious one
19:40 sfan5 ShadowNinja: see my comments on #2402
19:40 ShadowBot https://github.com/minetest/minetest/issues/2402 -- Clean up and tweak build system by ShadowNinja
19:41 sfan5 ShadowNinja: what was the error message with freetype and clang on travis?
19:43 Krock Successfully tested #2493 are there any other things I should change or are there devs who can give me a +1? :)
19:43 ShadowBot https://github.com/minetest/minetest/issues/2493 -- Connect rails with connect_to_raillike again by SmallJoker
19:44 iqualfragile_ joined #minetest-dev
19:58 est sfan5, https://travis-ci.org/est31/minetest/builds/53354328
20:00 ShadowNinja sfan5: Replied to most of them, I'm working on security ATM though so it will be a little while before a get to fixing them.
20:01 est ShadowNinja, I'm no NTFS expert but seen this: http://superuser.com/questions/364057/why-is-ntfs-case-sensitive
20:02 iqualfragile joined #minetest-dev
20:02 ElectronLibre joined #minetest-dev
20:04 ShadowNinja est: Bah.
20:05 est whatever, ShadowNinja, what are your plans for security?
20:05 ShadowNinja est: "git merge"
20:14 ShadowNinja est, VanessaE: I found the source of that catch(...) issue: LuaJIT apparently probagates errors in a way that gcc catches as an exception.  Lua's setjmp/longjmp seems to bypass it.
20:15 ShadowNinja I just removed the catch(...) block since it can't do anything usefull with an exception like that anyways.
20:24 rdococ joined #minetest-dev
20:26 MinetestForFun joined #minetest-dev
20:45 fz72 joined #minetest-dev
20:54 est ShadowNinja, disabling reading/writing in other mod's directories has no security benefit at all except the small one I outlined
20:55 est and even that can be coped with when we let request_secure_environment() behave like request_exclusive_access()
20:56 est (where request_exclusive_access() returns methods to open and modify files inside the mod's dir, disabling access to the mod's dir from the "normal" environment)
20:57 est and ofc. request_secure_environment() should only behave like that, when its failing
20:57 est still load order issues...
20:57 est hmm
20:58 est btw I'm ok if that gets added later on
20:58 est most important thing is to get it into master first
20:59 est but should be added before the next release
21:00 est bye.
21:01 Jordach joined #minetest-dev
21:15 cib0 joined #minetest-dev
21:35 VanessaE What's gonna be with these G*d damned "ghost" entities?
21:38 VanessaE come ON already
21:38 VanessaE enough delaying!
21:38 VanessaE my creative server has become nearly unplayable because of this
21:39 VanessaE what the fuck is the hold-up?
21:44 * VanessaE is pissed off now.
22:03 VanessaE ~tell nrzkt your attempt to stop the death loop with a send-HP packet does not work in practice.
22:03 ShadowBot VanessaE: O.K.
22:04 VanessaE furthermore, why is ANY change to HP being allowed on the server when damage is disabled?
22:08 T4im joined #minetest-dev
22:27 iqualfragile joined #minetest-dev
22:43 iqualfragile_ joined #minetest-dev
22:57 iqualfragile joined #minetest-dev
23:04 JeDaYoshi joined #minetest-dev

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