Skip to content

Commit 7a81863

Browse files
authored
Refactor CLAUDE.md for clarity and consistency
Updated section headings and added details about FIFO caches and lazy initialization procedures.
1 parent 3b5e6d6 commit 7a81863

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

CLAUDE.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,21 +164,27 @@ Each resource source file has a similar structure:
164164
- Embedded procedures should have explicit `bind`
165165
- Must be marked `readonly`
166166

167-
6. **Lazy initialisation procedure**
167+
6. **Initialisation of any FIFO caches**
168+
- Definition of cache capacity parameters and loading of parameter overrides from global context
169+
- Definition of a generator procedure and a cardinality function
170+
- Executing the `fifocache` resource to return a named "FIFO cache object"
171+
172+
7. **Lazy initialisation procedure**
168173
- Data that must be computed (expensive) and is deferred until first execution
169174
- First run derives and stores values (in global VM); subsequent runs load cached values
170175
- Embedded procedures do not require `bind` (propagates from outer procedure)
171176

172-
7. **Main procedure**
177+
8. **Main procedure**
173178
- Exported by the resource and called on demand
174179
- Uses immediate references to static data
175180
- Calls lazy initialisation procedure
181+
- Makes use of any named FIFO caches by executing their `fetch` method
176182
- Bind the main procedure whilst inhibiting binding of non-standard operators defined on some RIPs, i.e. `barcode`
177183

178-
8. **Resource definition**
184+
9. **Resource definition**
179185
- Define the main procedure as a resource
180186

181-
9. **Allocation mode restore**
187+
10. **Allocation mode restore**
182188
- Return to previous defaults
183189

184190

@@ -434,6 +440,9 @@ Encoders create a common dictionary structure expected by their renderer:
434440
/pixs [...] % 30x29 hexagon grid values
435441
/opt options
436442
>>
443+
444+
Callers can access the intermediate dictionary by setting the `dontdraw` options with `enabledontdraw` set in global context.
445+
437446
```
438447

439448

@@ -519,7 +528,7 @@ Read configuration from (optional) global context with a default:
519528
```
520529

521530

522-
**Module-Level Caching with fifocache**
531+
**Module-Level Caching with FIFO caches**
523532

524533
For expensive computations that benefit from caching across invocations (e.g.,
525534
generation of Reed-Solomon polynomial coefficients), use the `fifocache`
@@ -992,4 +1001,3 @@ Some PLRM terminology is a source of confusion. As a result of the following com
9921001
- `b` is also an "object" that refers to the same VM storage as `a`
9931002

9941003
The terminology differs from many languages where the array itself would be referred to as an object and a and b would be referred to as names or references.
995-

0 commit comments

Comments
 (0)