A classic getter with a predicate needs For each + break today. The item goes out to the right, the test hangs below, and its result has to wire back to the left into break. It works but the wires cross the node.
Goal
A block of two nodes, like Houdini's for-each blocks:
Find: inputs exec, list; outputs item, index.
Match: input match (bool); outputs found, item, index, not found.
Any data graph between them is the test, so everything flows left to right.
Inserting Find brings its Match along in one undo step.
The editor draws a frame behind the block.
Decision
Which Match belongs to which Find follows from the wiring only (the Match whose test reads that Find's item/index). Nothing is stored, so copy, paste and undo need no own code. Unpaired or ambiguous nodes get a warning.
Follow-up in the same round: splitting struct outputs into field pins (separate issue).
A classic getter with a predicate needs `For each` + `break` today. The item goes out to the right, the test hangs below, and its result has to wire back to the left into `break`. It works but the wires cross the node.
## Goal
A block of two nodes, like Houdini's for-each blocks:
- **`Find`**: inputs `exec`, `list`; outputs `item`, `index`.
- **`Match`**: input `match` (bool); outputs `found`, `item`, `index`, `not found`.
- Any data graph between them is the test, so everything flows left to right.
- Inserting `Find` brings its `Match` along in one undo step.
- The editor draws a frame behind the block.
## Decision
Which `Match` belongs to which `Find` follows from the wiring only (the `Match` whose test reads that `Find`'s `item`/`index`). Nothing is stored, so copy, paste and undo need no own code. Unpaired or ambiguous nodes get a warning.
Follow-up in the same round: splitting struct outputs into field pins (separate issue).
Find (exec, list → item, index) and Match (match → found, item, index, not found). The first true match continues at found; no hit or an empty list continues at not found with an empty item and index -1.
The pair follows from the wiring only. Unpaired or ambiguous nodes show a warning; at run time the flow ends at an unpaired Find and the console says so.
Inserting Find places its Match 480 px to the right, one undo step.
A quiet frame is drawn behind Find, Match and the test nodes; literals from outside stay outside.
The test consists of data nodes only, like break of For each.
Tests: ./check.sh 184 files, 2694 tests, CHECK EXIT 0. e2e 1-6: 272 checks passed. New find-match.test.ts (12 tests), e2e 6z-v (3 checks, real mouse). Counter-checks in unit and browser all fail as expected.
Done in 2aaca01, wiki: *Behaviors* (Find … Match).
- `Find` (exec, list → item, index) and `Match` (match → found, item, index, not found). The first true `match` continues at `found`; no hit or an empty list continues at `not found` with an empty item and index -1.
- The pair follows from the wiring only. Unpaired or ambiguous nodes show a warning; at run time the flow ends at an unpaired `Find` and the console says so.
- Inserting `Find` places its `Match` 480 px to the right, one undo step.
- A quiet frame is drawn behind `Find`, `Match` and the test nodes; literals from outside stay outside.
- The test consists of data nodes only, like `break` of `For each`.
Tests: `./check.sh` 184 files, 2694 tests, CHECK EXIT 0. e2e 1-6: 272 checks passed. New `find-match.test.ts` (12 tests), e2e 6z-v (3 checks, real mouse). Counter-checks in unit and browser all fail as expected.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A classic getter with a predicate needs
For each+breaktoday. The item goes out to the right, the test hangs below, and its result has to wire back to the left intobreak. It works but the wires cross the node.Goal
A block of two nodes, like Houdini's for-each blocks:
Find: inputsexec,list; outputsitem,index.Match: inputmatch(bool); outputsfound,item,index,not found.Findbrings itsMatchalong in one undo step.Decision
Which
Matchbelongs to whichFindfollows from the wiring only (theMatchwhose test reads thatFind'sitem/index). Nothing is stored, so copy, paste and undo need no own code. Unpaired or ambiguous nodes get a warning.Follow-up in the same round: splitting struct outputs into field pins (separate issue).
Done in
2aaca01, wiki: Behaviors (Find … Match).Find(exec, list → item, index) andMatch(match → found, item, index, not found). The first truematchcontinues atfound; no hit or an empty list continues atnot foundwith an empty item and index -1.Findand the console says so.Findplaces itsMatch480 px to the right, one undo step.Find,Matchand the test nodes; literals from outside stay outside.breakofFor each.Tests:
./check.sh184 files, 2694 tests, CHECK EXIT 0. e2e 1-6: 272 checks passed. Newfind-match.test.ts(12 tests), e2e 6z-v (3 checks, real mouse). Counter-checks in unit and browser all fail as expected.