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

chore: Fix unconstrained function example #6391

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jtriley-eth
Copy link
Contributor

@jtriley-eth jtriley-eth commented Oct 29, 2024

Description

This both fixes syntax errors and updates the unconstrained function example in the docs.

Summary

  • fixes parenthesis mismatch
  • replaces u72 with u64, as of noirc version 0.36.0+60c770f5f2594eea31ac75c852980edefa40d9eb
  • updates compiler output to noirc version 0.36.0+60c770f5f2594eea31ac75c852980edefa40d9eb
  • removes outdated optimization example

Additional Context

This block appears to come from a Discord post from July 2023, the u72 data type is rejected by the compiler as of this PR, so this was replaced with a u64. This of course changes the compiler output, but there was originally three steps of optimization: simple example, earlier cast, and unconstrained. The middle step, casting earlier, does not appear to reduce the number of ACIR opcodes anymore, I assume because of compiler optimization improvements, so this middle step was removed and wording was changed to accommodate this.

Also, can we remove the Discord link? If a reader is not in the Noir Discord server, the link leads to a blank page and offers no intuitive means to join the Discord server. If this is a means to drive Discord traffic, I would consider a link to join the server there rather than only in the page footer.

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 29, 2024
@jtriley-eth jtriley-eth changed the title Fix unconstrained function example chore: Fix unconstrained function example Oct 29, 2024
Copy link
Contributor

github-actions bot commented Oct 29, 2024

Copy link
Contributor

FYI @noir-lang/developerrelations on Noir doc changes.

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

Successfully merging this pull request may close these issues.

1 participant