hyperfiddle / hyperfiddle/rcf

Equality is not symmetric?

Open
#51 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Clojure
Stars
301
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hiya I found when testing out Missionary that ordering appears to matter when evaluating tasks:

(def task (m/sp 1 2 3))

(tests
  (m/? task) := 3
  nil := (m/? task))

Both these assertions pass ^

It seems like one of them should fail because in normal equality if a = b is true and b = a is also true

I don't believe Missionary should be side-effecting in this case

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the supplied Missionary reproduction using m/sp, m/? and tests, then trace how the test macro compares the two sides. Confirm why both assertions pass and whether evaluation is being repeated or reordered. Done means the contradictory equality assertions no longer both pass and task evaluation has no unintended side effects.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.