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

Support Anoma stdlib curry function #3097

Merged
merged 7 commits into from
Oct 11, 2024
Merged

Support Anoma stdlib curry function #3097

merged 7 commits into from
Oct 11, 2024

Conversation

paulcadman
Copy link
Collaborator

@paulcadman paulcadman commented Oct 10, 2024

This PR adds support for the Anoma node stdlib function to the nockma backend.

https://developers.urbit.org/reference/hoon/stdlib/2n#cury

This PR also changes the arguments placeholder value when compiling functions and closures to make it a tuple of length equal to the function/closure arity.

To use curry, the function argument's placeholder argument tuple must have length equal to the function airty.

For example if we are compiling a function with arity 2, the compiled nock function should have the form:

[compiled-code [0 0] env]

Without this the stdlib curry function will not work
The nockma curry function is small. There's no performance benefit in
implementing it directly in the evaluator
@paulcadman paulcadman marked this pull request as ready for review October 11, 2024 07:51
@paulcadman paulcadman self-assigned this Oct 11, 2024
@paulcadman paulcadman added this to the 0.6.7 milestone Oct 11, 2024
@lukaszcz lukaszcz merged commit c499d0d into main Oct 11, 2024
4 checks passed
@lukaszcz lukaszcz deleted the nockma-curry branch October 11, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants