-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create testing code for the Nock and Noun module #87
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It seems to be already set to 98 according to the elixir forums: https://elixirforum.com/t/why-does-the-elixir-formatter-default-to-98-characters/45063 however it is good to set it, so that we may tweak it in the future if need be
Moving it to 78, makes sure the line does not exceed 80 characters long. Included in this commit is the result of `mix format`, which shows how this change affects the codebase
Nock is a universal function on the noun data structure (atomic nonnegative integers, and cons cells of nouns). We include a naive implementation of the spec here.
The hint noun is an arbitrary noun, even if this is where names go in real hints.
Some of these lack the context of the Nock spec sub-operators, but on the whole it's a useful quick reference.
The hint is put into a cell with the real result before it is discarded. I don't want to deviate from the literal spec in naive_nock.
Having gone back and forth on whether this or all conses explicit is more readable, I tentatively think this, despite its asymmetry, is mostly better. Nock 6 uses an as-pattern, and is less improved.
By default Dialyzer does not accept improper lists to pass the dialyzer test. However we may want to use them for Nock code, so we shall disable them until further notice
…ag' and 'anoma/mariari/set-project-line-length' into 'ray/nock-jets'
Very simple - arithmetic, with jet hints.
note: does not pass to recursive calls; those are still jetted! use dec of a huge number to test that jetting works at all. this will be replaced with a jet-testing mode in the final branch
c046809
to
64f1f9e
Compare
We test: 1. Nock 2. Noun 3. Noun.Format further we write some custom hoon functions that compile to nock using our standard library, making sure that nock evaluation works as expected. The Noun tests mainly test inserting and indexing
64f1f9e
to
6c77aae
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We test:
further we write some custom hoon functions that compile to nock using our standard library, making sure that nock evaluation works as expected.
The Noun tests mainly test inserting and indexing