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

higher level bindings #2

Open
3 of 5 tasks
pietroppeter opened this issue Nov 14, 2022 · 1 comment
Open
3 of 5 tasks

higher level bindings #2

pietroppeter opened this issue Nov 14, 2022 · 1 comment

Comments

@pietroppeter
Copy link
Owner

pietroppeter commented Nov 14, 2022

we could definitely improve bindings with some higher level stuff:

  • add templated for setup:, draw: that avoid the need to write the {.exportc.} pragma
  • find a way to avoid using PNumber
    • added a converter: converter toFloat(n: int): float = float(n) + exporting lenientops + PNumber = float
  • use cstring in all procs (the ones with string are probably broken) but export a string version for all variables that are cstring (such as key, so that we do not need to convert it)
  • use enums for all the cstring constants? not sure if it helps that much... when porting it is useful to have the same syntax that you find in p5js.
  • ...
@pietroppeter
Copy link
Owner Author

or remember there is drawim and work with that! https://github.com/GabrielLasso/drawim

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

1 participant