Flower pot fixes #2731

Merged
cora merged 1 commits from flowerpot-fixes into master 2022-10-08 22:43:21 +02:00
Member
  • More accurate selection and collision box
  • Remove check for minetest.features.use_texture_alpha_string_modes
  • Use new vectors
  • Add some basic type annotations to API functions
- More accurate selection and collision box - Remove check for `minetest.features.use_texture_alpha_string_modes` - Use new vectors - Add some basic type annotations to API functions
AFCMS added the
nodes
code quality
labels 2022-10-08 17:21:18 +02:00
Member

What format are the type annotations?

What format are the type annotations?
Author
Member

What format are the type annotations?

https://github.com/sumneko/lua-language-server

Using the folowing headers:

https://github.com/AFCMS/minetest_vscode_lua

Even if you don't use a compatible editor, it gives an easy comprension of function params.

> What format are the type annotations? https://github.com/sumneko/lua-language-server Using the folowing headers: https://github.com/AFCMS/minetest_vscode_lua Even if you don't use a compatible editor, it gives an easy comprension of function params.
Contributor

Even if you don't use a compatible editor, it gives an easy comprension of function params.

So what if the next person adds their own format to make it compatible with their editor?

I'm generally not a fan of this stuff tbh. and tend to remove it when I work on something. I just do not see the big benefit and it does have some cost (particularly everyone in the future has to deal with it in some way) our files are already so full of often quite useless comments.

I mean it's fine if you do it for stuff you're working on i guess (if it stays at just the 1 line per function) but please don't expect anyone else to accomodate your IDE.

> Even if you don't use a compatible editor, it gives an easy comprension of function params. So what if the next person adds their own format to make it compatible with *their* editor? I'm generally not a fan of this stuff tbh. and tend to remove it when I work on something. I just do not see the big benefit and it does have some cost (particularly everyone in the future has to deal with it in some way) our files are already so full of often quite useless comments. I mean it's fine if you do it for stuff you're working on i guess (if it stays at just the 1 line per function) but please don't expect anyone else to accomodate your IDE.
Author
Member

Even if you don't use a compatible editor, it gives an easy comprension of function params.

So what if the next person adds their own format to make it compatible with their editor?

There are practically no competitors.

EmmyLua/derivated (which I use and which have a decent editor support) and LuaDoc, which have no editor support and allow much less complex types

I mean it's fine if you do it for stuff you're working on i guess (if it stays at just the 1 line per function) but please don't expect anyone else to accomodate your IDE.

It support VSCode, NeoVIM, command line, etc

> > Even if you don't use a compatible editor, it gives an easy comprension of function params. > > So what if the next person adds their own format to make it compatible with *their* editor? There are practically no competitors. EmmyLua/derivated (which I use and which have a decent editor support) and LuaDoc, which have no editor support and allow much less complex types > I mean it's fine if you do it for stuff you're working on i guess (if it stays at just the 1 line per function) but please don't expect anyone else to accomodate your IDE. It support VSCode, NeoVIM, command line, etc
AFCMS force-pushed flowerpot-fixes from 7e861585e5 to 5719637ee7 2022-10-08 18:31:45 +02:00 Compare
Contributor

Well there is one "competitor" that seems to be used A LOT: not doing any of this ^^

I mean idk what an ide even makes of this – ultimately the question is does it save you more time than it costs to add and maintain this stuff?

I would say in my humble programming experience this stuff has cost me a lot more time than it ever saved.

The thing about these "helpful" features like e.g. autocompletion is that you forget things - and quickly - and then when you least expect it you're stranded with nano and a slow internet connection so you cant even quickly look something up which you would have memorized if it hadn't been for your super IDE ^^

Well there is one "competitor" that seems to be used A LOT: not doing any of this ^^ I mean idk what an ide even makes of this – ultimately the question is does it save you more time than it costs to add and maintain this stuff? I would say in my humble programming experience this stuff has cost me a lot more time than it ever saved. The thing about these "helpful" features like e.g. autocompletion is that you forget things - and quickly - and then when you least expect it you're stranded with nano and a slow internet connection so you cant even quickly look something up which you would have memorized if it hadn't been for your super IDE ^^
cora approved these changes 2022-10-08 22:41:02 +02:00
cora left a comment
Contributor

looks way nicer now

looks way nicer now
Contributor

try to make the reformatting stuff separate commits next time though. That makes it a lot easier for people in the future to understand changes that were made.

try to make the reformatting stuff separate commits next time though. That makes it a lot easier for people in the future to understand changes that were made.
cora merged commit 0c4edbc4ac into master 2022-10-08 22:43:21 +02:00
cora deleted branch flowerpot-fixes 2022-10-08 22:43:26 +02:00
Author
Member

Well there is one "competitor" that seems to be used A LOT: not doing any of this ^^

I mean idk what an ide even makes of this – ultimately the question is does it save you more time than it costs to add and maintain this stuff?

image
image
image

I personally use it a lot, and it REALLY helps me.

With a super simple header like what I added to mcl_title, it is much less error prone.

But with a real API header file with documentation and classes it gets really really helpful:

image

I would say in my humble programming experience this stuff has cost me a lot more time than it ever saved.

Once you learned the basic way these anotations works, you spend very little time adding basic one like I did in mcl_title (it takes me no more than 30s/function for these ones, and often much less)

The thing about these "helpful" features like e.g. autocompletion is that you forget things - and quickly - and then when you least expect it you're stranded with nano and a slow internet connection so you cant even quickly look something up which you would have memorized if it hadn't been for your super IDE ^^

I simply not develop without good tools. The worst editor I used for minetest development was Notepad++ on windows, but it still had a way to add functions to autocomplete (was just string completion, but at least help you not using undefined functions).

> Well there is one "competitor" that seems to be used A LOT: not doing any of this ^^ > > I mean idk what an ide even makes of this – ultimately the question is does it save you more time than it costs to add and maintain this stuff? ![image](/attachments/fbb12aca-d337-4cd3-8a59-3eacf4ede1b0) ![image](/attachments/63cc2cc4-c0c5-40d9-939e-d5a6f6ede2de) ![image](/attachments/0d6a7bd9-0c10-422d-b37f-fbc5078a9428) I personally use it a lot, and it REALLY helps me. With a super simple header like what I added to mcl_title, it is much less error prone. But with a real API header file with documentation and classes it gets really really helpful: ![image](/attachments/8a46207b-e54b-4527-a677-dd2171309c9b) > I would say in my humble programming experience this stuff has cost me a lot more time than it ever saved. Once you learned the basic way these anotations works, you spend very little time adding basic one like I did in mcl_title (it takes me no more than 30s/function for these ones, and often much less) > The thing about these "helpful" features like e.g. autocompletion is that you forget things - and quickly - and then when you least expect it you're stranded with nano and a slow internet connection so you cant even quickly look something up which you would have memorized if it hadn't been for your super IDE ^^ I simply not develop without good tools. The worst editor I used for minetest development was Notepad++ on windows, but it still had a way to add functions to autocomplete (was just string completion, but at least help you not using undefined functions).
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#2731
No description provided.