Minetest logo

IRC log for #minetest-dev, 2013-08-17

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

All times shown according to UTC.

Time Nick Message
00:07 AllegedlyDead joined #minetest-dev
00:45 VanessaE joined #minetest-dev
02:11 kaeza joined #minetest-dev
02:17 VanessaE joined #minetest-dev
02:17 proller liquids: next level: https://github.com/proller/minetest/compare/liquid63
02:18 proller smoooth 63-levels liquid support
02:18 proller with some visual fixes
03:41 Neological joined #minetest-dev
04:14 Miner_48er joined #minetest-dev
05:27 tango_ joined #minetest-dev
05:33 vals_ joined #minetest-dev
07:17 Calinou joined #minetest-dev
08:10 darkrose joined #minetest-dev
08:10 darkrose joined #minetest-dev
08:10 thexyz wtf is BKVL?
08:12 thexyz oh, found it
08:14 thexyz I think we don't have it in tree yet
08:15 thexyz is google's protobuf this bad?
08:36 Anchakor joined #minetest-dev
09:21 smoke_fumus joined #minetest-dev
09:49 Ritchie joined #minetest-dev
10:25 Taoki joined #minetest-dev
10:40 PilzAdam joined #minetest-dev
10:41 Taoki joined #minetest-dev
10:55 Calinou joined #minetest-dev
11:21 PilzAdam I rebased the translation for main menu: https://github.com/PilzAdam/minetest/commits/gettext
11:22 PilzAdam I think we should merge that now to not get more conflicts with new changes to the menu
11:22 PilzAdam when thexyz has pushed the current weblate commits then we can also run updatepo.sh so we can finally start translating the menu
11:31 nore joined #minetest-dev
11:35 kahrl PilzAdam, +1 to merge it
11:36 kahrl there might be some minor problems like with gettext("Are you sure you want to delete ") .. mod.name .. "?;]"
11:36 kahrl that grammar structure might not work in all languages
11:36 kahrl but those problem can be fixed when they are found
11:36 kahrl +s
11:41 PilzAdam should " gettext("Are you sure you want to delete ") .. mod.name .. "?;]" be changed now?
11:41 kahrl dunno, is there a good way to deal with it?
11:43 kahrl (for example Armenian doesn't use the question mark "?")
11:44 PilzAdam what about: gettext("Are you sure you want to delete \"") .. mod.name .. gettext("\"?") .. ";]"
11:44 kahrl doesn't the weblate translator then see "? as the original text and doesn't know what to do with it?
11:45 PilzAdam it always links the code where it is used, so people can see how to translate it
11:46 kahrl ah, fair enough
11:46 PilzAdam bbl
11:48 kahrl it's harder when there are two or more variable strings in a sentence, as some grammars might permute them
11:49 Exio4 wouldn't be possible to make a "Are you sure you want to delete %modname?" and then translate it?
11:50 Exio4 (that is parsing the result of gettext
11:50 Exio4 ) :P
11:51 kahrl yeah that's what is usually done, or even $1 $2 $3
12:00 Jordach joined #minetest-dev
12:32 PilzAdam something like gettext("Are you sure you want to delete \"%s\"?", mod.name) is not possible since it would insert the name first and then call gettext() in the engine on it
12:42 kahrl couldn't it look it up first and the insert parameters?
12:42 kahrl then
12:42 kaeza joined #minetest-dev
12:42 PilzAdam that would mean we need to implement this insertion for whole formspecs
12:43 PilzAdam since Lua has to pass the formspec as a whole to the engine, and then the engine picks the parts that can be translated and passes them to gettext
12:44 kahrl hrm
12:44 PilzAdam we could just add a gettext() call to the menu API
12:45 kahrl that would actually be cleaner because mainmenu translations don't creep into the actual game
12:48 PilzAdam I guess someone needs to go through all the formspec stuff in the engine and revert the wgettext() calls
12:49 PilzAdam or should they stay there for the in-game formspecs?
12:49 kahrl oh they are already in?
12:50 PilzAdam yea, the gettext() calls inside Lua are just for util/updatepo.sh
12:50 kahrl I know, I just thought your patch was the first to add the calls to guiFormSpecMenu.cpp and that that was enough
12:50 kahrl apparently not
12:52 kahrl oh heh, I suggested replacing some of these with wstrgettext
12:52 kahrl probably should have remembered
12:54 EdB joined #minetest-dev
13:01 PilzAdam where would I add the gettext() API call?
13:01 PilzAdam in l_mainmenu.cpp?
13:02 kahrl idea: engine.gettext(text) in l_mainmenu.cpp, fgettext(text, ...) implemented in lua which calls engine.gettext(text), inserts parameters and calls formspec_escape
13:09 PilzAdam does xgettext work with fgettext()?
13:11 kahrl just add a -kfgettext parameter
13:11 PilzAdam ah, ok
13:11 PilzAdam it works!
13:12 PilzAdam should fgettext() go into mainmenu.lua or misc_helpers.lua?
13:13 Neological joined #minetest-dev
13:14 kahrl misc_helpers.lua I guess
13:14 Neological joined #minetest-dev
13:18 PilzAdam engine.formspec_escape() is missing in doc/menu_lua_api.txt
13:20 Neological joined #minetest-dev
13:27 kahrl how did you make the parameter specification in fgettext?
13:27 PilzAdam function fgettext(text, ...)
13:27 PilzAdam return engine.formspec_escape(string.format(engine.gettext(text), ...))
13:27 PilzAdam end
13:28 kahrl ah
13:28 kahrl I don't think string.format is that useful here
13:29 kahrl because as I said the parameters can be permuted in the translated string, and I don't think string.format can do that
13:30 kahrl maybe something like this? https://gist.github.com/kahrl/6256856
13:36 PilzAdam attempt to index global 'arg' (a nil value)
13:37 kahrl oh fuck
13:38 kahrl luajit >:-(
13:38 kaeza kahrl, store '...' into a table
13:38 kahrl lua is hard, let's go shopping... er fixing docs! https://gist.github.com/kahrl/6256901
13:39 kahrl kaeza: what does that do to trailing nils?
13:39 kaeza I guess it ignores that
13:40 kaeza Lua does not distinguish between 'no value' and 'nil', at least from the Lua side
13:40 kahrl which is why the minetest.env code in deprecated.lua breaks mobf
13:44 kahrl local arg = {n=select('#',...),...}
13:44 kahrl would that do the trick?
13:45 kaeza actually, just 'local arg = { ... }' at the start of function
13:46 PilzAdam yea, what kaeza said works
13:46 kahrl oh, well I guess in this case it doesn't matter if it ignores trailing nils
13:46 kaeza or well, nope
13:46 kaeza and use #arg instead of arg.n
13:46 PilzAdam yea
13:47 PilzAdam https://github.com/PilzAdam/minetest/commit/b898d9f949cfb1579e5ca66d64f7694580543d47
13:48 kahrl then it doesn't go into the conditional at all if all args are nil
13:49 PilzAdam it doesnt need to
13:50 kahrl does this work? https://gist.github.com/kahrl/6256947
13:50 kahrl PilzAdam: if it doesn't, the "$1" etc. stay
13:50 PilzAdam the version in the commit works fine, work #... 0, 1 and 2
13:50 PilzAdam s/work/for
13:51 kahrl no, trying passing 1 or more nils
13:51 kahrl try*
13:51 PilzAdam hm?
13:51 PilzAdam why would I pass nil to it?
13:52 kahrl because some function you're calling fails for some reason?
13:52 kahrl or because some variable is nil?
13:53 nore joined #minetest-dev
13:53 PilzAdam fgettext("$1 A world named \"$2\" already exists", nil, worldname) works fine with the version in the commit
13:54 kahrl not if worldname==nil
13:54 nore any thoughts on this: https://github.com/minetest/minetest/pull/874 ?
13:54 PilzAdam oh yes
13:55 PilzAdam your version works in this case
13:56 kahrl http://www.luafaq.org/#T1.23 mentions that code as a "common pattern"
13:57 PilzAdam https://github.com/PilzAdam/minetest/commit/18c073337ca67c390f67e42450de85ab7745a252
14:00 kahrl https://github.com/PilzAdam/minetest/commit/18c073337ca67c390f67e42450de85ab7745a252#L4R183 should be $1,$2
14:00 PilzAdam whooops
14:00 kahrl everything else looks good
14:01 nore kahrl, PilzAdam: what do you think about a callback on formspec close?
14:01 kahrl nore, nothing at the moment ;)
14:01 PilzAdam I push that to master then
14:01 nore #874 does it
14:01 nore and it looks like it is needed since a long time
14:01 kahrl PilzAdam, yep
14:01 nore this avoids hacky code
14:02 kahrl nore: what are some uses for it?
14:02 nore for example, that https://github.com/PilzAdam/MiniTest/pull/14
14:03 nore + when one does want to re-load a formspec every time something changed
14:03 nore but it cannot detect if formspec was closed
14:03 nore etc
14:04 nore the crafting mod of BlockMen has something similar too
14:04 nore detecting if yaw or pitch changed to know if the formspec was closed
14:04 PilzAdam yea, its needed by many mods
14:05 kahrl the reloading the formspec thing could be annoying on laggy servers
14:05 kahrl you close the formspec, but the server doesn't know yet, so decides to show you an updated formspec, which reopens it
14:06 nore you are true, but this is not the only use
14:06 kahrl maybe a parameter in show_formspec would be better for that
14:06 nore and for now, it is even worse since if you don't move, the formspec will be re-opened
14:07 nore kahrl: that would control what?
14:07 kahrl only show the formspec if a formspec with the same name is currently open
14:07 nore good idea... but I don't know how this could be done, though
14:08 nore is there a way to detect whether a formspec is open?
14:08 kahrl this could be used in addition to the on_formspec_close callback to inform the server to stop bothering to update
14:08 nore and to get its name if it is?
14:08 kahrl nore: on the client, yes
14:08 nore kahrl, yes, but the server would send the updated formspec nevertheless?
14:09 nore and how do you get that?
14:09 kahrl until it gets the close notification
14:09 nore + it would need a protocol change, no?
14:09 kahrl dunno, something to do with FormspecSource
14:10 kahrl doesn't necessarily need a protocol version change
14:10 nore about on_formspec_close, it is in fact on_formspec_receive_fields
14:10 kahrl of course some fields would get added to the protocol
14:10 nore if fields["quit"] then...
14:11 kahrl that breaks formspec that have a field called "quit" :P
14:11 nore if formspecs have a field named quit, it is about quitting, no?
14:11 nore but I can call it R76GUZAI7 to be sure nobody used that name ;)
14:11 PilzAdam no, its about giving 20 mese
14:12 PilzAdam so each time you hit Esc you get 20 mese :-)
14:12 nore good!
14:13 nore kahrl: there is still one problem, if one wants the formspec not to be closed when pressing return
14:13 nore how do we do that?
14:13 nore an additional parameter?
14:15 nore or do we disable return-to-quit completely?
14:16 PilzAdam its useful for signs
14:17 nore you can press Esc, but yes, it is useful
14:17 nore so, what do we do?
14:17 Zeitgeist_ joined #minetest-dev
14:17 kahrl just don't press return?
14:18 nore but what if you want return to send data (for example, see my forth_computer mod, you press return as you would do on a normal computer)?
14:19 nore if you have a button "Press Return", it isn't logical
14:20 PilzAdam kahrl, in UI there is a serach field, and when you press return the formspec closes
14:20 PilzAdam thats very annoying
14:21 PilzAdam I would say dont close the formspec when there is a size[] element
14:21 PilzAdam so signs or similiar things that only have a field[] element would still close on return
14:24 kahrl I'd say "if there's an autogenerated Proceed button"
14:24 PilzAdam thats the same
14:24 kahrl well, almost
14:24 kahrl if (m_fields.size() && mydata.bp_set != 2)
14:25 kahrl then close formspec on return
14:26 kahrl (bp_set == 2 means there is a size[] element)
14:27 kahrl though maybe some custom formspecs want the close-on-return behaviour?
14:27 nore that+the formspec close would be merged?
14:27 nore kahrl: then we need a parameter
14:28 nore perhaps the best would be a config[] formspec element
14:28 nore so no protocol change, can be used if node metadata too
14:29 kahrl or maybe a "default button" as some GUI toolkits have
14:29 kahrl if there is one, pressing return submits using the default button
14:29 kahrl and "Proceed" counts as a default button
14:30 nore well, I reckon the config[] element is the best
14:30 nore to do, because it can easily be changed
14:30 nore and there will never be protocol change
14:31 nore and you can do whatever you want with it
14:31 kahrl hey some optimism is never bad ;)
14:32 nore something like config[close_on_return:false;open_only_if_already_open:true]
14:32 nore etc
14:35 kahrl I'd say why not
14:36 kahrl though with , instead of : so that formspec_escape works
14:52 Neological joined #minetest-dev
15:18 Calinou joined #minetest-dev
15:48 loggingbot_ joined #minetest-dev
15:48 Topic for #minetest-dev is now Minetest core development and maintenance. Chit-chat goes to #minetest. Consider this instead of /msg celeron55. http://irc.minetest.ru/minetest-dev/ http://dev.minetest.net/
15:48 thexyz joined #minetest-dev
15:52 rubenwardy joined #minetest-dev
16:13 hmmmm joined #minetest-dev
16:45 progers joined #minetest-dev
16:46 nore thexyz: I have a suggestion for minetest-stress
16:46 PilzAdam nore, modding does not belong in this channel
16:46 nore since it was an API, I thought it would go there, sorry
16:48 diemartin joined #minetest-dev
17:03 celeron55 and "library" equaled "API" since web 2.0
17:21 Zeitgeist_ joined #minetest-dev
17:23 PilzAdam I guess this can be merged: https://github.com/minetest/minetest/pull/865
17:33 Tesseract Comments on #862?
17:34 PilzAdam Tesseract, why do you write "bind_address = 0.0.0.0 " in minetest.conf.example when the default setting is ""?
17:36 Tesseract PilzAdam: It is an example. I don't think all of the options in minetest.conf.example are the same as the defaults.
17:40 Zeitgeist_ joined #minetest-dev
17:49 Zeitgeist_ joined #minetest-dev
17:56 Calinou joined #minetest-dev
18:03 Zeitgeist_ joined #minetest-dev
18:06 Miner_48er joined #minetest-dev
18:13 Zeitgeist_ joined #minetest-dev
18:20 ch98 joined #minetest-dev
18:35 smoke_fumus joined #minetest-dev
19:09 ch98 joined #minetest-dev
19:34 Weedy_lappy joined #minetest-dev
19:37 Weedy_la1py joined #minetest-dev
19:38 Weedy joined #minetest-dev
19:39 Weedy joined #minetest-dev
19:41 Weedy_lappy joined #minetest-dev
19:48 Weedy joined #minetest-dev
19:50 Weedy_la1py joined #minetest-dev
19:52 Weedy_lappy joined #minetest-dev
19:54 Weedy joined #minetest-dev
19:54 Weedy joined #minetest-dev
19:56 Weedy joined #minetest-dev
19:58 Tesseract The Minetest github organization should have a logo.
20:09 Weedy_lappy joined #minetest-dev
20:11 sapier joined #minetest-dev
20:11 sapier hello, pa why did you rename gettext to fgettext?
20:11 Weedy_la1py joined #minetest-dev
20:11 VanessaE guys, can we settle the number of items issue soon?
20:12 PilzAdam sapier, it was kahrl's suggestion, its because it formats the string too
20:12 sapier ahhh :-) good idea ... and what is the lua api function for?
20:13 sapier oh ... for partial strings
20:13 sapier good idea
20:13 Weedy joined #minetest-dev
20:13 sapier oh no
20:14 sapier you did remove the gettext support from formspec menu???? for gods sake WHY?
20:14 Weedy_lappy joined #minetest-dev
20:14 PilzAdam what?
20:15 sapier the old version I suggested did i18n purely in core
20:15 sapier the new version does lua -> core -> lua ->core
20:16 PilzAdam the old version doesnt support something like "foo $1 bar"
20:16 sapier I know so you really think adding forced overhead to all cases is better than using a special variant for some cases?
20:18 sapier yes the new version is simple as of code size  but it's a lot of overhead too
20:18 sapier but forget about it ... I guess I never will understand how ppl set priorities for mt
20:22 Weedy joined #minetest-dev
20:22 ch98 joined #minetest-dev
20:23 Weedy_la1py joined #minetest-dev
20:24 troller joined #minetest-dev
20:25 Weedy_la2py joined #minetest-dev
20:28 Weedy joined #minetest-dev
20:28 Weedy joined #minetest-dev
20:31 Weedy_lappy joined #minetest-dev
20:34 Weedy_la1py joined #minetest-dev
20:37 Weedy joined #minetest-dev
20:39 Weedy_lappy joined #minetest-dev
20:39 Weedy_lappy joined #minetest-dev
20:41 Weedy_la1py joined #minetest-dev
20:42 EdB joined #minetest-dev
20:44 Weedy_la2py joined #minetest-dev
20:46 Weedy_lappy joined #minetest-dev
20:59 Weedy_la1py joined #minetest-dev
20:59 troller next liquids improvement - now number of levels configurable https://github.com/proller/minetest/compare/liquid63#files_bucket
21:00 Weedy_la2py joined #minetest-dev
21:02 Weedy_lappy joined #minetest-dev
21:03 troller now is possible to make 2-4 levels liquid, and its will be FAST floowing, flooding anf filling, but not smooth
21:13 kaeza joined #minetest-dev
21:26 Weedy_la1py joined #minetest-dev
21:28 Weedy_la2py joined #minetest-dev
21:29 ch98 joined #minetest-dev
21:29 Weedy_lappy joined #minetest-dev
21:29 Weedy_lappy joined #minetest-dev
21:31 Weedy_la1py joined #minetest-dev
21:32 Tesseract troller: Heard of git rebase? There are a few different commits there and a whole lot of merges of upstream. I suggest "git remote add upstream https://github.com/minetest/minetest.git && git checkout master && git pull upstream master && git checkout -b configurable_liquid_levels" Then cherry-pich the correct commit and push the branch.
21:33 Weedy_la2py joined #minetest-dev
21:36 NakedFury joined #minetest-dev
21:36 Weedy_lappy joined #minetest-dev
21:39 Weedy joined #minetest-dev
21:39 Weedy joined #minetest-dev
21:41 Weedy_la1py joined #minetest-dev
21:43 proller joined #minetest-dev
21:44 Weedy_lappy joined #minetest-dev
21:48 Weedy joined #minetest-dev
21:48 Weedy joined #minetest-dev
21:50 Weedy_lappy joined #minetest-dev
21:52 Weedy_la1py joined #minetest-dev
21:55 Weedy joined #minetest-dev
21:55 Weedy joined #minetest-dev
22:05 diemartin joined #minetest-dev
22:11 proller again world/players is lost after crush, all files 0 size
22:24 Tesseract proller: http://irc.minetest.ru/minetest-dev/2013-08-17#i_3269682
22:26 proller i prefer create new branch and merge --squash old
22:26 PilzAdam so you prefer pull requests with 150+ commits?
22:26 proller but no sense to rebase-merge before commit approve
22:26 proller in diff all ok
22:27 proller but now i try to rebase..
22:42 proller https://github.com/proller/minetest/compare/master...liquid63
22:42 proller now better
22:45 proller one small step to make sand, gravel, ... flows as liquid - to prevent make pillars from it
22:47 Tesseract Liquids still need to draw the bottom face.
22:47 proller flowing fixed in ^^
22:48 proller source looks ok now
22:48 proller when falling
22:49 Weedy_lappy joined #minetest-dev
22:52 Ritchie joined #minetest-dev
23:47 kahrl sapier, I don't like premature optimization in not performance relevant code
23:47 kahrl or did you actually measure it to have a visible overhead?
23:54 kahrl sapier, by the way it doesn't search and replace $1 and such if only one argument is passed

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