Time |
Nick |
Message |
04:51 |
|
calculon joined #minetest-dev |
05:00 |
|
MTDiscord joined #minetest-dev |
05:19 |
|
MTDiscord joined #minetest-dev |
08:22 |
|
calcul0n joined #minetest-dev |
08:37 |
|
YuGiOhJCJ joined #minetest-dev |
09:09 |
sfan5 |
anyone know whether we can tell luachekc to throw an error if someone uses a ; in code? |
09:25 |
Mantar |
don't think so, semicolons are valid in lua despite being optional |
09:27 |
Mantar |
page 1 of PIL says "a semicolon may optionally follow any statement" |
09:30 |
sfan5 |
point is that they're pointless and should not appear in our codebase |
09:34 |
sfan5 |
huh turns out luacheck is unmaintained since 5 years |
09:38 |
MTDiscord |
<.niklp> lunarmodules luacheck is maintained https://github.com/lunarmodules/luacheck (it's on luarocks too) |
09:39 |
MTDiscord |
<rollerozxa> the original luacheck author passed away, lunarmodules forked it |
09:51 |
sfan5 |
I see |
09:51 |
Mantar |
eh, they don't have any code function, that's not the same thing as being pointless, or else we'd need to get rid of comments. semicolons can sometimes make things more readable |
09:51 |
sfan5 |
google only found the original one |
09:52 |
Mantar |
but hey, I get you, style decisions have to be made for a project |
10:10 |
|
MTDiscord joined #minetest-dev |
10:14 |
rubenwardy |
I don't think I've ever found a case where semicolons were needed, except for code golfing |
10:52 |
celeron55 |
semicolon is functionally equivalent to a newline, right? |
10:55 |
celeron55 |
and lua doesn't really require newlines in silly places. for that reason, there is no need for semicolons |
10:55 |
celeron55 |
the only exception is if you're given a single line editor and you need to fit your program on that line |
11:04 |
|
appguru joined #minetest-dev |
11:14 |
|
appguru joined #minetest-dev |
11:35 |
MTDiscord |
<luatic> Semicolons in Lua are very rarely "required" as a statement separator due to an ambiguity in Lua's grammar: "f(...) <newline> (expr)(...)" (and variations like "_ = f <newline> (expr)(...)" or "return f <newline> (expr)(...)" could be parsed as either "f(...); (expr)(...)" or "f(...)(expr)(...)". This happens very rarely though (think once in 10kloc). Besides that, semicolons are just a style decision. |
11:38 |
MTDiscord |
<luatic> I don't think Luacheck should become a style checker, though; it's a linter which happens to catch egregious style mistakes. We should adopt a Lua formatter (I recommend StyLua) to check & apply style. |
12:53 |
|
appguru joined #minetest-dev |
15:15 |
|
appguru joined #minetest-dev |
15:23 |
|
appguru joined #minetest-dev |
16:05 |
|
LandarVargan joined #minetest-dev |
16:10 |
|
appguru joined #minetest-dev |
17:58 |
|
celeron55 joined #minetest-dev |
18:28 |
|
appguru joined #minetest-dev |
22:06 |
sfan5 |
@appguru have you tried debugging the irrlicht segfault in a 20.04 container/vm? |
22:16 |
MTDiscord |
<luatic> sfan5: not yet, i'll try to look into it over the weekend |
23:32 |
|
panwolfram joined #minetest-dev |