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

Fix reduction order in Nock spec #14

Merged
merged 1 commit into from Sep 24, 2013
Merged

Fix reduction order in Nock spec #14

merged 1 commit into from Sep 24, 2013

Conversation

ghost
Copy link

@ghost ghost commented Sep 24, 2013

The way one is supposed to use the Nock spec is by repeatedly going through the reduction rules from top to bottom, and applying the first rule that matches. Some rules (for 10 and +) appear to be in the wrong order: a more general rule is above a more specific rule, making the latter unreachable. It looks like this kind of issue has been around since Nock 8K.

To illustrate, I've modified the 5K spec. Perhaps that's heretical, though! Let me know if I should have proposed a 4K spec, or done something else.

The way one is supposed to use the Nock spec is by repeatedly going
through the reduction rules from top to bottom, and applying the first
rule that matches. Some rules appeared to be in the wrong order: a more
general rule was above a more specific rule, making the latter
unreachable.
cgyarvin added a commit that referenced this pull request Sep 24, 2013
@cgyarvin cgyarvin merged commit 6a56562 into urbit:master Sep 24, 2013
@cgyarvin
Copy link
Contributor

No, you're right. It's funny how many obvious errors one can make in a
page of code.

I view cosmetic changes as actually reverting to the original, correct
version. :-) Now, changing the semantics, that would be difficult at this
point...

On Tue, Sep 24, 2013 at 4:53 AM, Aaron Beckerman
notifications@github.comwrote:

The way one is supposed to use the Nock spec is by repeatedly going
through the reduction rules from top to bottom, and applying the first rule
that matches. Some rules (for 10 and +) appear to be in the wrong order:
a more general rule is above a more specific rule, making the latter
unreachable. It looks like this kind of issue has been around since Nock 8K.

To illustrate, I've modified the 5K spec. Perhaps that's heretical,
though! Let me know if I should have proposed a 4K spec, or done something

else.

You can merge this Pull Request by running

git pull https://github.com/ab9/urbit fix_nock_reduction_order

Or view, comment on, or merge it at:

urbit/urbit#14
Commit Summary

  • Fix reduction order in Nock spec

File Changes

Patch Links:

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

Successfully merging this pull request may close these issues.

None yet

1 participant