Skip to content

Commit 2b42f30

Browse files
committed
Update README: remove line numbers, restructure repo overview
- Remove fragile line number references from bindings section - Split 'What else is in the repo' into Bindings and Examples subsections - Add details about each binding file's contents - Make descriptions more scannable
1 parent 535892d commit 2b42f30

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Conceptually, its type is:
8787

8888
- `reduce : collection<k, v> -> reducer<v, a> -> collection<k, a>`
8989

90-
On the Skip side (see `bindings/SkipruntimeCore.res:80` and `bindings/SkipruntimeCore.res:332`), thats exposed as:
90+
On the Skip side (see `bindings/SkipruntimeCore.res`), that's exposed as:
9191

9292
- `EagerCollection.reduce : (~params=?, collection<'k, 'v>, reducer<'v, 'a>) -> collection<'k, 'a>`
9393
- where a reducer is built as `Reducer.make(~initial, ~add, ~remove=?)`
@@ -179,11 +179,19 @@ npm run build && node examples/LiveHarness.res.js
179179
```
180180

181181
## What else is in the repo
182-
- **Bindings**: `bindings/Skipruntime*.res` plus `bindings/SkipruntimeCoreHelpers.mjs` (class constructors, enums, SSE helpers including `subscribeSSE` for streaming updates).
183-
- **`examples/Example.res`**: Tiny binding smoke (LoadStatus, error ctor, mapper/reducer wiring) without starting the runtime.
184-
- **`examples/NotifierExample.res`**: Demonstrates notifier callbacks receiving collection updates and watermarks without wiring a full service.
185-
- **`examples/LiveHarness.res` + `LiveHarnessService.*`**: Demonstrates `map` and `reduce` semantics with `numbers`, `doubled`, and `sum` resources. Includes a client-side O(1) accumulator that subscribes to SSE to receive updates—showing how to layer efficient aggregates on top of reactive data.
186-
- **`examples/LiveService.*`**: The minimal reactive service definition used by `LiveClient.res` (typed in TS, emitted as JS). Service files are TS for class-heavy definitions and type checks; compiled JS is used at runtime.
182+
183+
### Bindings (`bindings/`)
184+
- **`SkipruntimeCore.res`**: Core types, collections (`EagerCollection`, `LazyCollection`), operators (`map`, `reduce`, `mapReduce`), `Mapper`/`Reducer`/`LazyCompute` factories, notifiers, service instances.
185+
- **`SkipruntimeHelpers.res`**: HTTP broker (`SkipServiceBroker`), built-in reducers (`Sum`, `Min`, `Max`, `Count`), external service helpers (`PolledExternalService`, `SkipExternalService`), leader-follower topology (`asLeader`, `asFollower`).
186+
- **`SkipruntimeServer.res`**: `runService` to start HTTP/SSE servers.
187+
- **`SkipruntimeCoreHelpers.mjs`**: JS helpers for class constructors, enums, and SSE utilities (`subscribeSSE` for streaming).
188+
189+
### Examples (`examples/`)
190+
- **`LiveClient.res`**: Main demo—starts a service, reads/updates via HTTP, subscribes via SSE.
191+
- **`LiveHarness.res` + `LiveHarnessService.ts`**: Demonstrates `map` and `reduce` semantics. Includes `ClientSum`, a client-side O(1) accumulator that subscribes to SSE.
192+
- **`Example.res`**: Binding smoke test—`LoadStatus`, errors, mapper/reducer wiring—without starting the runtime.
193+
- **`NotifierExample.res`**: Demonstrates notifier callbacks receiving collection updates and watermarks.
194+
- **`LiveService.ts`**: Minimal service definition for `LiveClient` (echo resource mirroring input).
187195

188196
## The bottom line
189197

0 commit comments

Comments
 (0)