Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous native function descriptions #876

Open
ypiguet-epfl opened this issue May 17, 2018 · 4 comments
Open

Ambiguous native function descriptions #876

ypiguet-epfl opened this issue May 17, 2018 · 4 comments

Comments

@ypiguet-epfl
Copy link
Collaborator

In the function descriptions in aseba/native.c, the role of arguments isn't always stated clearly. For instance for math.add, the description reads adds src1 and src2 to dest, element by element while the element-wise sum of src1 and src2 is stored into dest, not added to dest.

Suggestion: revise all native function descriptions, and store them in programming documentation, neither in the vm nor elsewhere in the robot firmware.

@mbonani
Copy link
Member

mbonani commented May 17, 2018

The description in the vm are small reminder to have them dynamically listed. A more detail description is in the help of the asebastudio. It is also now in https://github.com/aseba-community/aseba/blob/master/docs/en/aseba-std-natives.rst that could be included in helps of different programms.
I agree that the vm description is perhaps ambiguous but it has to be short.

@mbonani
Copy link
Member

mbonani commented Jun 4, 2018

I just read the function description display in studio. I just found math.add that is not crystal clear:
"adds src1 and src2 to dest, element by element" -> probably the function should been have called math.sum.
There is two possibilities:

  • we change the name to math.sum, but it could break users code
  • we change only the description to "adds src1 and src2, store to dest, element by element"

@stephanemagnenat
Copy link
Member

Sum is a bad name here because it is commonly assumed to mean "sum all elements together". What about: "adds src1 and src2, write to dest, element by element"

@mbonani
Copy link
Member

mbonani commented Jun 4, 2018

for me it's ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants