Minetest logo

IRC log for #minetest-dev, 2018-12-09

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

All times shown according to UTC.

Time Nick Message
01:33 sys4 joined #minetest-dev
01:57 ANAND joined #minetest-dev
03:19 Unarelith joined #minetest-dev
03:28 Unarelith joined #minetest-dev
04:41 paramat joined #minetest-dev
04:46 paramat celeron55 i have a PR that somewhat sorts out CSM for MT 5.0.0 by disabling client-provided CSM until server-sent CSM is completed, but it's likely to be controversial. i'm wondering if you might approve it? https://github.com/minetest/minetest/pull/7949
04:54 Player-2 joined #minetest-dev
08:06 Foz joined #minetest-dev
09:19 Krock joined #minetest-dev
09:20 ClockGen joined #minetest-dev
09:25 Beton joined #minetest-dev
09:25 ClockGen nerzhul: I've managed to write a build process for fdroid, minetest compiles with NDKs r16b and r17b, but now I'm facing another problem: it crashes on startup. I checked logcat and it actually segfaults with null pointer dereference, I've checked the code and I thought it was fixed by this commit? https://github.com/minetest/minetest/commit/119aa5c91977ce5381e399e21eabf390e5cb5f5e
09:25 ClockGen It's one of commits between 0.4.17 and 0.4.17.1
10:03 ANAND joined #minetest-dev
10:37 nerzhul ClockGen why you don't have it in your tree
10:37 nerzhul paramat, remember c55 is the original dev but it's a consensus, and i really think a 1 year old message can be invalid :)
10:38 nerzhul just stop that please, VanessaE which was one of the -1 1 year ago said it's not the best but it's quite good
10:38 nerzhul Krock looking
10:38 nerzhul paramat: remember this battle was one of the reason of my afk
10:59 ClockGen nerzhul: I do have it, I even compared the code manually
11:00 ClockGen But for some reason it still happens
11:07 Gael-de-Sailly joined #minetest-dev
11:12 Fixer joined #minetest-dev
11:17 fwhcat joined #minetest-dev
12:45 Mensious joined #minetest-dev
13:03 Krock nerzhul: push_back missing near https://github.com/minetest/minetest/pull/7939/files#diff-2e8891f210fadde431f8a10c08a228edR77
13:03 nerzhul oops i did this only on server side
13:03 nerzhul ty
13:04 Lunatrius joined #minetest-dev
13:04 Krock np. I see the compilers are yet not happy with it
13:05 Krock will merge #7947 in 10 minutes
13:05 ShadowBot https://github.com/minetest/minetest/issues/7947 -- Update minetest.conf.example and run updatepo.sh by SmallJoker
13:06 * Krock quickly changes the author back to get impressive contributor stats
13:06 nerzhul yes it's memory problems in the unittests because the lifetime is different than in code due to our historical lifetime on these objects
13:08 calcul0n joined #minetest-dev
13:14 Wuzzy joined #minetest-dev
13:14 Wuzzy Please someone review my eat sound patch: https://github.com/minetest/minetest/issues/7788#issuecomment-429656014
13:15 ANAND lol Krock :P
13:15 Krock merging...
13:16 Krock no what
13:17 nerzhul ?
13:17 ANAND :O
13:17 Krock fixed the commit. for some reason squashing assigned it to my account
13:19 ANAND You really did change back the author, didn't ya? ;)
13:21 Krock yes sure. the stats would shoot through the roof otherwise
13:22 nerzhul Krock i'm pretty sure you want to be the first commitor, behind c55 :p
13:22 Krock yes sure. maybe I should re-structure the repository now
13:23 ANAND Would someone be able to take a look at #7891?
13:23 ShadowBot https://github.com/minetest/minetest/issues/7891 -- Fix ContentDB packages timing out by using download_file instead by rubenwardy
13:24 nerzhul Krock: are you for a FF this day ?
13:24 nerzhul it seem your didn't answered on https://github.com/orgs/minetest/teams/engine/discussions/17 :)
13:24 Krock nerzhul: what does FF mean in this context?
13:24 nerzhul not firefox :p
13:25 Krock https://github.com/orgs/minetest/teams/engine/discussions/17/comments/4
13:25 nerzhul erf; ... i need to clear my glasses i missed the earlier comments :p
13:25 Krock well, it's nearly no answer but I'd like to see a feature freeze
13:25 nerzhul yeah, i was afraid about the changelog since august
13:26 nerzhul it seems you, sfan5, ruben (except a little content db fix which requires re-handling one feature), and me are okay
13:26 nerzhul paramat seems okay or neutral i don't really understand :p
13:27 nerzhul nore, sofar lhofhansl are absent
13:27 nerzhul Shadowninja too
13:27 nerzhul Ezhh doesn't vote
13:30 nerzhul then we have +1 (4), unk (1), afk (5), nc (1)
13:43 DI3HARD139 joined #minetest-dev
13:43 Wuzzy Krock: ???
13:43 Wuzzy this link does not work: https://github.com/orgs/minetest/teams/engine/discussions/17?from_comment=4#discussion-17-comment-4
13:44 Krock Wuzzy: these page are restricted to core devs
13:44 Wuzzy wow, secret link
13:44 Krock or rather those people who are inside the "Engine" group of the Minetest team
13:44 Wuzzy GitHub says error 404 :O
13:45 Wuzzy GitHub lied to me!! haha
13:45 Wuzzy should be error 403
13:45 Wuzzy the error has an error :D
13:53 Andrey01 joined #minetest-dev
13:55 Andrey01 joined #minetest-dev
13:56 Unarelith joined #minetest-dev
13:59 Andrey001 joined #minetest-dev
14:01 Andrey01 joined #minetest-dev
14:06 Wuzzy hello. i have recently worked on making builtin translatable
14:06 Wuzzy https://github.com/minetest/minetest/pull/7955
14:06 Wuzzy its WIP and a couple things need to resolved
14:06 Wuzzy opinions are welcome
14:07 Wuzzy feel free to discuss it right here in IRC
14:15 Krock good idea
14:20 Wuzzy "idea"?
14:20 Wuzzy translating stuff is kind of obvious thing to do :D
14:21 Krock yes, but yet it wasn't done in builtin
14:22 Krock having the translation files too would be great...
14:22 Andrey01 joined #minetest-dev
14:22 Krock doesn't intllib have a tool to collect the strings?
14:23 Wuzzy intllib has nothing to do with that
14:23 Wuzzy and no, we dont have any scripts to collect the strings. sad but true
14:23 Wuzzy at least not in our repo
14:24 Andrey01 hi devs, i want to ask what decision did you make for #7930 ?
14:24 ShadowBot https://github.com/minetest/minetest/issues/7930 -- Support for Mesh Animations in Mesh Nodes
14:24 Wuzzy Krock: well, there is a script *somewhere*, hold on a minute
14:24 Wuzzy just not merged into master
14:25 Krock ah, the one from nore/Ekdohibs
14:25 Andrey01 are you going to add this support in 5.0.0?
14:25 nore ehm yes I recall that one
14:25 nore it was never merged, was it?
14:25 Wuzzy no
14:25 Krock yes, sadly.
14:26 Wuzzy what i totally cannot understand
14:26 Wuzzy its critically important for translators
14:26 rubenwardy Andrey01: if there's no open pr, then it won't be added in 5
14:26 nore still toying with the idea of writing a mo parser and using mo instead of our own format
14:26 Krock #6325
14:26 Wuzzy YES YES YES
14:26 ShadowBot https://github.com/minetest/minetest/issues/6325 -- Add scripts to find and update translations. by Ekdohibs
14:26 nore not trivial though...
14:26 Wuzzy i hate the .tr format
14:26 Wuzzy Gettext solves many problems
14:26 nore Wuzzy: to be honest, I hate it too
14:26 Andrey01 rubenwardy: this pr is opened now
14:27 Wuzzy why was it chosen? laziness? too hard? :)
14:27 Krock gettext also creates many problems which is why we have this workaround
14:27 Wuzzy wait what??
14:27 nore gettext has problems
14:27 Wuzzy thats news to me
14:27 Krock Wuzzy: did you seriously miss the whole discussion about this?
14:27 nore like, not having an API for what we want to do
14:27 nore so we would need to parse the gettext files ourselves...
14:27 Krock it does not allow dynamically loading/unloading translations and requires an app-hard-reset
14:27 Wuzzy oh riiight. your use case...
14:28 nore and tr are easier to parse than mo :/
14:28 Krock https://github.com/minetest-mods/intllib/blob/master/gettext.lua
14:28 nore Wuzzy: well, if there just was an API to parse mo files, I wouldn't have hesitated one second about what to do
14:29 Krock *cough* link
14:29 Wuzzy :D
14:29 nore I asked the question long before I implemented it and no-one ever found one...
14:29 Andrey01 rubenwardy: why did you not close it if it won`t be added in 5.0.0?
14:29 Krock there's no C++ implementation but that one from inttlib in Lua
14:30 nore yeah
14:31 nore and that one isn't suitable as-is for client-side translations
14:31 nore https://github.com/minetest-mods/intllib/blob/master/gettext.lua#L110 this would be client executing server-sent code
14:31 Wuzzy uh-oh
14:31 Andrey01 so will #7930 be added in 5.0.0? What decision ??
14:31 ShadowBot https://github.com/minetest/minetest/issues/7930 -- Support for Mesh Animations in Mesh Nodes
14:32 nore shouldn't matter with a proper C++ implementation: but it means writing a parser for these expressions
14:32 nore and it doesn't matter for intllib as well: it is all server-side executed code, so no security holes
14:33 Wuzzy nore: Krock: Aaahh!! I found the translation updating scripts!! https://github.com/minetest/minetest/pull/6325
14:33 Wuzzy *someone* has killed the PR for unknown reasons :O
14:33 nore should *probably* be okay even with untrusted translations server-side, I think the worst you can do is an infinite loop
14:33 Krock Wuzzy: scroll up. It's the line below your "<Wuzzy> YES YES YES"
14:35 nore anyway, it's complicated in any case...
14:35 Krock nore: it doesn't look that insecure. better than nothing for the moment
14:35 nore Krock: yes of course :)
14:35 Wuzzy Krock: so the PR was killed for incomplete documentation? All that needs to be done is to write the docs, then it's good?
14:36 Krock Wuzzy: please read the GitHub discussion again. It was closed due to long inactivity by the developer
14:36 nore oh
14:36 nore https://github.com/cbeck88/spirit-po
14:36 nore however: depends on boost...
14:36 Krock just seen that too.. but that means such parsers exist
14:37 Wuzzy Krock: so what do you mean with "possibly also a mod where this can be tested?"
14:37 nore this one seems quite recent but interesting
14:37 Wuzzy i think you can't just add a mod into the source tree
14:38 Wuzzy never in the history of minetest has a mod been bundled with Minetest
14:38 DI3HARD139 joined #minetest-dev
14:38 Krock Wuzzy: at this point client translations were very new. Some kind of testing instructions would be very helpful
14:38 Wuzzy so you mean just some example code in a README?
14:39 Krock no, sample code in the PR description as it's done with other script PRs
14:39 nore <Wuzzy> never in the history of minetest has a mod been bundled with Minetest <-- well, there are lots in the minimal/ game
14:39 Krock ^  that too
14:39 Wuzzy standalone mod*
14:39 Krock however, minimal needs some cleanups and the most recent PR is probably dead by now
14:41 nore oh https://www.gnu.org/software/gettext/manual/html_node/libgettextpo.html
14:42 nore so maybe we could get away with only gettext...
14:42 Wuzzy yay
14:42 nore well, "libgettextpo" isn't exactly gettext but close enough
14:42 nore and doesn't depend on boost
14:42 Wuzzy double-yay
14:42 Krock well yes, it's a C library
14:44 nore I wonder how much work it would be to use that instead
14:44 nore probably not that much, given most of the infrastructure for the code is there (assuming we don't deal with pluralforms for now)
14:52 Krock does that mean you've got some time to work on it? :D
14:57 p_gimeno Wuzzy: FYI, in Lua, constant strings need no parentheses around the function call if they are the only arg, e.g. S"string" is the same as S("string"). Also, a common choice for aliasing gettext is _ which would make _"string" be the translation of "string".
14:57 nore ehm, not sure :/
14:58 Wuzzy but that's not according to coding style guide afaik
14:58 Wuzzy also S() has been popularzied by intllib, this convention should be kept
14:58 p_gimeno I think the convenience for translations would merit an exception
14:59 Wuzzy i will only change the coding style on core dev request. are you are core dev?
14:59 p_gimeno no, but it's worth discussing, to avoid further clobbering of the code
15:00 Wuzzy ok fine
15:00 Wuzzy parenthesis can go away indeed
15:00 Wuzzy but i am still not happy with S → _ change
15:00 nore one problem is that this won't work for translations with one argument
15:01 Wuzzy heh
15:01 nore (like what minetest.translate currently does)
15:01 Wuzzy ok then better keep the parenthesis otherwise its inconsistent
15:02 Wuzzy eeeeh. i just noticed the code quality of the locale update scripts isnt very good
15:02 Wuzzy i found a bug
15:02 Wuzzy the script fails when theres an equals sign in the string
15:02 nore what happens?
15:03 nore if it replaces the '=' by '@=', that is normal
15:04 Wuzzy no
15:04 Wuzzy i mean thats not what it does
15:04 nore okay
15:04 Wuzzy the script only collects half of the string, the rest is missing
15:04 nore so this is a bug indeed :)
15:04 nore wat
15:04 Wuzzy everything after the equals sign is gone
15:04 nore hmmm
15:05 Wuzzy why do you claim you made the script when it was Ekdohibs?
15:06 nore because I am Ekdohibs ‽
15:07 Wuzzy ok
15:07 Wuzzy nore's secret identity has been finally revealed :D
15:08 nore lol that was never secret :)
15:08 Wuzzy thats what you WANT us to believe... *x files music plays*
15:08 nore I'm even credited as both in https://www.minetest.net/credits/ :p
15:10 rubenwardy _ is used by underscore already
15:10 rubenwardy And stress
15:11 Wuzzy ?
15:12 Wuzzy nore: my first attempt of a documentation: https://ptpb.pw/TR8k
15:12 rubenwardy Underscore is a Lua library, stress is a mineteet library
15:13 rubenwardy Thinking about it, _ would be overwritten by Lua values when marked as not important
15:13 nore Wuzzy: oh, good
15:13 nore well, if you want to take the PR over and add the documentation, please feel free to do so :)
15:13 Wuzzy well then just let's keep using S like we have always done
15:13 nore yeah, S is good
15:14 Wuzzy nore: i guess this means you are also unwilling to fix the bug
15:14 nore Wuzzy: I looked at the code and I don't even understand why there is a bug
15:14 Wuzzy oh
15:14 nore it should be a simple string.gsub...
15:15 Wuzzy i am stupid ... hold on a minute
15:15 nore hm?
15:15 Wuzzy has nothing to do with equals sign...
15:16 Wuzzy it fails for something like this (Lua code):
15:16 Wuzzy S("This is the [minimal] \"Minimal Development Test\" game. Use [minetest_game] for the real thing."     )
15:16 Wuzzy there's a hiccup at the \"
15:16 Wuzzy ahhh right. because the script believes its the end of the string, i gues
15:16 Wuzzy so it will only collect...
15:16 Wuzzy This is the [minimal] \
15:17 nore hm
15:17 nore yeah, lua string parsing is not obvious to do right
15:18 nore well, that's an additional reason to move to gettext I guess?
15:18 Wuzzy obviously the " needs to be escaped, thats not unique to lua :D
15:18 Wuzzy of course! :D
15:18 nore heh
15:18 Wuzzy in Hedgewars we also have just a dumbed-down string parser for collecting Lua strings
15:18 p_gimeno s/\\"/\\x22/g
15:19 Wuzzy We only recognize strings within "
15:19 Wuzzy but we support \"
15:19 Wuzzy so strings in ' or even [[ ... ]] are ignored
15:19 nore hmmm yeah
15:19 Wuzzy in docs we wrote 'only use " when you call the locale function'
15:20 Wuzzy makes things easier for devs :D
15:20 nore well if you can fix that pattern "([^"]*)", please do :)
15:20 nore hehe ^^
15:21 Wuzzy well it gets painful if you want to support [[ .. ]], [=[ .. ]=], [==[ .. ]==] etc
15:21 Wuzzy lua strings are a bit crazy
15:24 nore yeah
15:28 p_gimeno could I take a look? I added support for them (and comments) in a Lua syntax highlighter written in Lua
15:29 Wuzzy cool
15:29 Wuzzy here you go: https://github.com/minetest/minetest/pull/6325
15:29 Wuzzy findtext.lua line 123
15:31 p_gimeno thanks
15:32 Wuzzy its good enough for a start if you just fix \"
15:36 p_gimeno how well does it deal with strings within comments?
15:37 p_gimeno looks like it doesn't deal with them at all, from a cursory look
15:39 p_gimeno I'd need a specification. What is it doing about get_translator?
15:40 Wuzzy specification?
15:40 Wuzzy ask nore :)
15:41 nore it looks for calls of the form local S = minetest.get_translator("context")
15:41 nore then tries to find calls like S("string to translate")
15:41 p_gimeno ahh, ok
15:55 p_gimeno well, parsing comments and strings is not too difficult, but parsing locals and function calls is much trickier. It would be best to standardize to one function call without parentheses, with always the same name (single character), and perform argument replacement in a separate function. Example: F(S"string @1 @2", arg1, arg2)
15:56 p_gimeno F() doesn't need to be standardized, but S() would, according to this proposal.
15:57 p_gimeno Otherwise, Lua scope rules come into play, e.g. local S = minetest.get_translator("context") do local S = function() end; S("blah") end. That's a royal pain to track.
15:58 Wuzzy i am all for standardization
15:58 Wuzzy S() is luckily pretty standard anyway
15:59 p_gimeno If the tool only has to search for S<lua_string>, that's much simpler.
16:00 Wuzzy i like to keep parenthesis tho
16:01 proller joined #minetest-dev
16:02 Krock doesn't S() also accept multiple parameters?
16:05 p_gimeno I'm suggesting separation into two functions, one to handle translation and the other to handle parameters
16:06 Wuzzy :(
16:06 Wuzzy bad idea
16:09 nerzhul p_gimero bad
16:11 p_gimeno sigh... ok
16:13 Wuzzy you only need to care about the first parameter, however :)
16:14 p_gimeno with this structure and these limitations, I think it's best to replace \" as I suggested earlier
16:23 Wuzzy yeah
16:24 Wuzzy p_gimeno: wait, you mean s/\\"/\\x22/g ?
16:24 Wuzzy nooooo
16:24 Wuzzy that would look horrible
16:24 Wuzzy its reasonable to expect that \" works
16:24 p_gimeno definitely yes, but that would be done internally within findtext.lua
16:25 p_gimeno I'm working on that already
16:25 Wuzzy great
16:25 Wuzzy sorry i misunderstood. phew
16:28 Mensious joined #minetest-dev
16:28 p_gimeno Lua escapes need to be handled too, once the strings are parsed
16:55 p_gimeno my challenge is that this is handled correctly: S('bar baz "this" \'that\' foobar')  print("this is in a string S(") x=0 print(") still text")
17:03 Gael-de-Sailly joined #minetest-dev
17:05 Wuzzy try to care about "" first and ignore '' strings
17:07 p_gimeno I'm almost there anyway
17:21 fwhcat joined #minetest-dev
17:32 Tmanyo joined #minetest-dev
17:32 p_gimeno phase 1 complete: https://notabug.org/pgimeno/minetest/commit/d69937544317bf7eef4faae1f1022558441048e0
17:35 Wuzzy nice
17:40 p_gimeno I think the function I'm writing should also add @ quotes. How are @ themselves quoted? By doubling them?
17:40 Wuzzy yes
17:41 Wuzzy p_gimeno: i think this is already handled in nore's code
17:42 p_gimeno where?
17:42 p_gimeno anyway, I'm going through the string to remove \ escapes, so I could as well handle it there as I go, and remove another function
17:47 p_gimeno oh crap, PUC Lua 5.1 doesn't accept \x
17:47 Wuzzy haha. oh. nore actually didnt handle @@ :D
17:47 nore no, it shouldn't be handled
17:47 Wuzzy oops
17:48 nore it needs to stay in the translation file
17:48 Wuzzy ah, right
17:48 nore well and in the string to translate
17:48 nore (so that it isn't mistaken for things like "@1")
17:48 p_gimeno nore: um what? so if I write S("This is blah@=3"), that goes as is?
17:49 Wuzzy yes
17:49 nore p_gimeno: yes
17:49 Wuzzy i now understood the logic
17:49 nore but you are the one to blame here
17:49 nore because @ should be escaped in your string
17:49 Wuzzy i had a brainfart
17:49 nore :)
17:50 Fixer joined #minetest-dev
17:50 nore if you want "This is blah=3" you should write it as such (the tool will add the @), if you want "This is blah@=3" you should write "This is blah@@=3"
17:50 p_gimeno ahh
17:51 nore And the tool will write "This is blah@@@=3 = ...."
17:51 p_gimeno understood, thanks
17:51 nore you're welcome :)
18:47 fwhcat joined #minetest-dev
18:53 p_gimeno finished: https://notabug.org/pgimeno/minetest/src/translation-toolchain/util/findtext.lua
18:54 fwhcat joined #minetest-dev
18:54 p_gimeno eep, bug found
19:00 p_gimeno and fixed
19:19 p_gimeno another bug found
19:31 sys4 joined #minetest-dev
19:40 fwhcat joined #minetest-dev
19:41 p_gimeno done
20:05 Jordach joined #minetest-dev
20:12 reductum joined #minetest-dev
20:43 ClockGen joined #minetest-dev
20:52 Gael-de-Sailly joined #minetest-dev
21:08 proller joined #minetest-dev
21:18 clavi joined #minetest-dev
22:00 Miner_48er joined #minetest-dev
22:06 nerzhul_ joined #minetest-dev
22:12 Tmanyo joined #minetest-dev
22:24 Lavos joined #minetest-dev
23:13 Tmanyo joined #minetest-dev

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