docs(hydro_lang): restructure reference docs around sliced blocks and mutable singleton references#3018
Conversation
Deploying hydro with
|
| Latest commit: |
bfe9115
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://219d8ba3.hydroflow.pages.dev |
| Branch Preview URL: | https://sandbox-8ea7aeba-3bae-48f6-b.hydroflow.pages.dev |
… mutable singleton references
Reorganize the "Core Framework" reference docs into a new hierarchy and
rewrite content to reflect current Hydro APIs (`sliced!` blocks,
`by_ref`/`by_mut` reference handles, `BoundedValue` keyed singletons)
instead of the legacy `.tick()`-era APIs.
New structure under `docs/docs/hydro/reference/`:
- `introduction/`: Introduction (keeps `/docs/hydro/reference/` URL via
slug), new "Live Collections" concept page (placed first, as the most
core concept), and "Dataflow Programming" (refreshed to emphasize that
Hydro looks like analytics frameworks but models request/response
services)
- `correctness/` ("Safety and Correctness"): section index; "Bounded and
Unbounded Types" rewritten to decouple boundedness from ticks (Bounded =
complete, contents immediately available; unbounded→bounded conversion
via `sliced!` hooks); "Eventual Determinism" trimmed to the semantic
model, with the guarantee correctly scoped to safe APIs ("Hydro's type
system is focused on eventual determinism"); new flagship
"Non-Determinism and `nondet!`" page covering guard mechanics,
locally-resolved vs forwarded guards, multiple `NonDet` parameters as
independently observable forms of non-determinism (Paxos example),
proof-style comment guidance, `nondet_` naming and `# Non-Determinism`
rustdoc conventions, simulator tie-in, and user-defined-function caveats
- `streaming-data/` ("Streaming Data"): section index (request/response
framing); "Streams" (refreshed); "Keyed Streams" (hidden doctest
harnesses migrated to `sliced!`); new "Keyed Singletons" page focused on
the `BoundedValue` variant (one immutable value per request key;
`first()`, `fold_early_stop`, map-based request→response, slicing as a
batch of new entries), with a boundedness table covering all five bound
variants (including MonotonicValue/MonotonicKeys, and Unbounded keys
being added *and removed*) and a new request/response animation
- `state-management/` ("State Management"): new section index laying out
the state philosophy (declarative aggregations → sliced+`by_ref` reads →
`use::state`+`by_mut` for multi-input imperative state); "Singletons and
Optionals" written from placeholder; new "Keyed State" page (Unbounded
`KeyedSingleton`, per-key aggregations, join/lookup patterns); "Slice
Blocks" refreshed (leads with the `by_ref` snapshot-reading idiom); new
"Slice Hooks" reference (`use` / `use::atomic` / `use::state` /
`use::state_null` semantics per collection type, guarantees, unslicing);
new "References and Mutations" page (`by_ref`/`by_mut` handles,
boundedness requirement, code-order access groups, multi-input
shared-state pattern)
- `atomic-collections.mdx`: "Atomic Collections" promoted to a top-level
doc, de-tick-ified wording, modern sim test API in examples
Also update all internal links (`learn/`, `dfir/`, `locations/`),
regenerate category files and sidebar positions, update hydro.run doc
URLs in `hydro_lang` rustdoc comments to the new paths, and align the
single-counter tutorial's eventual-determinism phrasing with the
reference docs.
Validation: full docusaurus build passes (no broken links); all mdtest
doctests pass (62 passing, remainder intentionally no_run/ignore); no
legacy APIs (`.tick()`/`.batch(&tick)`/`.snapshot(&tick)`/`.all_ticks()`/
`.latest()`) appear in any visible example code.
Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #3018
7a11e99 to
c195ac6
Compare
|
under streaming data we have "streams, keyed streams, keyed singletons", then under the next section, state management, it starts with "singletons". Something feels wrong about that order |
So the tricky part is keyed singletons can be used in both "stream mode" ( |
… mutable singleton references
Reorganize the "Core Framework" reference docs into a new hierarchy and
rewrite content to reflect current Hydro APIs (`sliced!` blocks,
`by_ref`/`by_mut` reference handles, `BoundedValue` keyed singletons)
instead of the legacy `.tick()`-era APIs.
New structure under `docs/docs/hydro/reference/`:
- `introduction/`: Introduction (keeps `/docs/hydro/reference/` URL via
slug), new "Live Collections" concept page (placed first, as the most
core concept), and "Dataflow Programming" (refreshed to emphasize that
Hydro looks like analytics frameworks but models request/response
services)
- `correctness/` ("Safety and Correctness"): section index; "Bounded and
Unbounded Types" rewritten to decouple boundedness from ticks (Bounded =
complete, contents immediately available; unbounded→bounded conversion
via `sliced!` hooks); "Eventual Determinism" trimmed to the semantic
model, with the guarantee correctly scoped to safe APIs ("Hydro's type
system is focused on eventual determinism"); new flagship
"Non-Determinism and `nondet!`" page covering guard mechanics,
locally-resolved vs forwarded guards, multiple `NonDet` parameters as
independently observable forms of non-determinism (Paxos example),
proof-style comment guidance, `nondet_` naming and `# Non-Determinism`
rustdoc conventions, simulator tie-in, and user-defined-function caveats
- `streaming-data/` ("Streaming Data"): section index (request/response
framing); "Streams" (refreshed); "Keyed Streams" (hidden doctest
harnesses migrated to `sliced!`); new "Keyed Singletons" page focused on
the `BoundedValue` variant (one immutable value per request key;
`first()`, `fold_early_stop`, map-based request→response, slicing as a
batch of new entries), with a boundedness table covering all five bound
variants (including MonotonicValue/MonotonicKeys, and Unbounded keys
being added *and removed*) and a new request/response animation
- `state-management/` ("State Management"): new section index laying out
the state philosophy (declarative aggregations → sliced+`by_ref` reads →
`use::state`+`by_mut` for multi-input imperative state); "Singletons and
Optionals" written from placeholder; new "Keyed State" page (Unbounded
`KeyedSingleton`, per-key aggregations, join/lookup patterns); "Slice
Blocks" refreshed (leads with the `by_ref` snapshot-reading idiom); new
"Slice Hooks" reference (`use` / `use::atomic` / `use::state` /
`use::state_null` semantics per collection type, guarantees, unslicing);
new "References and Mutations" page (`by_ref`/`by_mut` handles,
boundedness requirement, code-order access groups, multi-input
shared-state pattern)
- `atomic-collections.mdx`: "Atomic Collections" promoted to a top-level
doc, de-tick-ified wording, modern sim test API in examples
Also update all internal links (`learn/`, `dfir/`, `locations/`),
regenerate category files and sidebar positions, update hydro.run doc
URLs in `hydro_lang` rustdoc comments to the new paths, and align the
single-counter tutorial's eventual-determinism phrasing with the
reference docs.
Validation: full docusaurus build passes (no broken links); all mdtest
doctests pass (62 passing, remainder intentionally no_run/ignore); no
legacy APIs (`.tick()`/`.batch(&tick)`/`.snapshot(&tick)`/`.all_ticks()`/
`.latest()`) appear in any visible example code.
Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #3018
c195ac6 to
de3da64
Compare
… mutable singleton references
Reorganize the "Core Framework" reference docs into a new hierarchy and
rewrite content to reflect current Hydro APIs (`sliced!` blocks,
`by_ref`/`by_mut` reference handles, `BoundedValue` keyed singletons)
instead of the legacy `.tick()`-era APIs.
New structure under `docs/docs/hydro/reference/`:
- `introduction/`: Introduction (keeps `/docs/hydro/reference/` URL via
slug), new "Live Collections" concept page (placed first, as the most
core concept), and "Dataflow Programming" (refreshed to emphasize that
Hydro looks like analytics frameworks but models request/response
services)
- `correctness/` ("Safety and Correctness"): section index; "Bounded and
Unbounded Types" rewritten to decouple boundedness from ticks (Bounded =
complete, contents immediately available; unbounded→bounded conversion
via `sliced!` hooks); "Eventual Determinism" trimmed to the semantic
model, with the guarantee correctly scoped to safe APIs ("Hydro's type
system is focused on eventual determinism"); new flagship
"Non-Determinism and `nondet!`" page covering guard mechanics,
locally-resolved vs forwarded guards, multiple `NonDet` parameters as
independently observable forms of non-determinism (Paxos example),
proof-style comment guidance, `nondet_` naming and `# Non-Determinism`
rustdoc conventions, simulator tie-in, and user-defined-function caveats
- `streaming-data/` ("Streaming Data"): section index (request/response
framing); "Streams" (refreshed); "Keyed Streams" (hidden doctest
harnesses migrated to `sliced!`); new "Keyed Singletons" page focused on
the `BoundedValue` variant (one immutable value per request key;
`first()`, `fold_early_stop`, map-based request→response, slicing as a
batch of new entries), with a boundedness table covering all five bound
variants (including MonotonicValue/MonotonicKeys, and Unbounded keys
being added *and removed*) and a new request/response animation
- `state-management/` ("State Management"): new section index laying out
the state philosophy (declarative aggregations → sliced+`by_ref` reads →
`use::state`+`by_mut` for multi-input imperative state); "Singletons and
Optionals" written from placeholder; new "Keyed State" page (Unbounded
`KeyedSingleton`, per-key aggregations, join/lookup patterns); "Slice
Blocks" refreshed (leads with the `by_ref` snapshot-reading idiom); new
"Slice Hooks" reference (`use` / `use::atomic` / `use::state` /
`use::state_null` semantics per collection type, guarantees, unslicing);
new "References and Mutations" page (`by_ref`/`by_mut` handles,
boundedness requirement, code-order access groups, multi-input
shared-state pattern)
- `atomic-collections.mdx`: "Atomic Collections" promoted to a top-level
doc, de-tick-ified wording, modern sim test API in examples
Also update all internal links (`learn/`, `dfir/`, `locations/`),
regenerate category files and sidebar positions, update hydro.run doc
URLs in `hydro_lang` rustdoc comments to the new paths, and align the
single-counter tutorial's eventual-determinism phrasing with the
reference docs.
Validation: full docusaurus build passes (no broken links); all mdtest
doctests pass (62 passing, remainder intentionally no_run/ignore); no
legacy APIs (`.tick()`/`.batch(&tick)`/`.snapshot(&tick)`/`.all_ticks()`/
`.latest()`) appear in any visible example code.
Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #3018
de3da64 to
e5f4fbf
Compare
I renamed that page to |
… mutable singleton references
Reorganize the "Core Framework" reference docs into a new hierarchy and
rewrite content to reflect current Hydro APIs (`sliced!` blocks,
`by_ref`/`by_mut` reference handles, `BoundedValue` keyed singletons)
instead of the legacy `.tick()`-era APIs.
New structure under `docs/docs/hydro/reference/`:
- `introduction/`: Introduction (keeps `/docs/hydro/reference/` URL via
slug), new "Live Collections" concept page (placed first, as the most
core concept), and "Dataflow Programming" (refreshed to emphasize that
Hydro looks like analytics frameworks but models request/response
services)
- `correctness/` ("Safety and Correctness"): section index; "Bounded and
Unbounded Types" rewritten to decouple boundedness from ticks (Bounded =
complete, contents immediately available; unbounded→bounded conversion
via `sliced!` hooks); "Eventual Determinism" trimmed to the semantic
model, with the guarantee correctly scoped to safe APIs ("Hydro's type
system is focused on eventual determinism"); new flagship
"Non-Determinism and `nondet!`" page covering guard mechanics,
locally-resolved vs forwarded guards, multiple `NonDet` parameters as
independently observable forms of non-determinism (Paxos example),
proof-style comment guidance, `nondet_` naming and `# Non-Determinism`
rustdoc conventions, simulator tie-in, and user-defined-function caveats
- `streaming-data/` ("Streaming Data"): section index (request/response
framing); "Streams" (refreshed); "Keyed Streams" (hidden doctest
harnesses migrated to `sliced!`); new "Keyed Singletons" page focused on
the `BoundedValue` variant (one immutable value per request key;
`first()`, `fold_early_stop`, map-based request→response, slicing as a
batch of new entries), with a boundedness table covering all five bound
variants (including MonotonicValue/MonotonicKeys, and Unbounded keys
being added *and removed*) and a new request/response animation
- `state-management/` ("State Management"): new section index laying out
the state philosophy (declarative aggregations → sliced+`by_ref` reads →
`use::state`+`by_mut` for multi-input imperative state); "Singletons and
Optionals" written from placeholder; new "Keyed State" page (Unbounded
`KeyedSingleton`, per-key aggregations, join/lookup patterns); "Slice
Blocks" refreshed (leads with the `by_ref` snapshot-reading idiom); new
"Slice Hooks" reference (`use` / `use::atomic` / `use::state` /
`use::state_null` semantics per collection type, guarantees, unslicing);
new "References and Mutations" page (`by_ref`/`by_mut` handles,
boundedness requirement, code-order access groups, multi-input
shared-state pattern)
- `atomic-collections.mdx`: "Atomic Collections" promoted to a top-level
doc, de-tick-ified wording, modern sim test API in examples
Also update all internal links (`learn/`, `dfir/`, `locations/`),
regenerate category files and sidebar positions, update hydro.run doc
URLs in `hydro_lang` rustdoc comments to the new paths, and align the
single-counter tutorial's eventual-determinism phrasing with the
reference docs.
Validation: full docusaurus build passes (no broken links); all mdtest
doctests pass (62 passing, remainder intentionally no_run/ignore); no
legacy APIs (`.tick()`/`.batch(&tick)`/`.snapshot(&tick)`/`.all_ticks()`/
`.latest()`) appear in any visible example code.
Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #3018
e5f4fbf to
19b05f1
Compare
… mutable singleton references
Reorganize the "Core Framework" reference docs into a new hierarchy and
rewrite content to reflect current Hydro APIs (`sliced!` blocks,
`by_ref`/`by_mut` reference handles, `BoundedValue` keyed singletons)
instead of the legacy `.tick()`-era APIs.
New structure under `docs/docs/hydro/reference/`:
- `introduction/`: Introduction (keeps `/docs/hydro/reference/` URL via
slug), new "Live Collections" concept page (placed first, as the most
core concept), and "Dataflow Programming" (refreshed to emphasize that
Hydro looks like analytics frameworks but models request/response
services)
- `correctness/` ("Safety and Correctness"): section index; "Bounded and
Unbounded Types" rewritten to decouple boundedness from ticks (Bounded =
complete, contents immediately available; unbounded→bounded conversion
via `sliced!` hooks); "Eventual Determinism" trimmed to the semantic
model, with the guarantee correctly scoped to safe APIs ("Hydro's type
system is focused on eventual determinism"); new flagship
"Non-Determinism and `nondet!`" page covering guard mechanics,
locally-resolved vs forwarded guards, multiple `NonDet` parameters as
independently observable forms of non-determinism (Paxos example),
proof-style comment guidance, `nondet_` naming and `# Non-Determinism`
rustdoc conventions, simulator tie-in, and user-defined-function caveats
- `streaming-data/` ("Streaming Data"): section index (request/response
framing); "Streams" (refreshed); "Keyed Streams" (hidden doctest
harnesses migrated to `sliced!`); new "Keyed Singletons" page focused on
the `BoundedValue` variant (one immutable value per request key;
`first()`, `fold_early_stop`, map-based request→response, slicing as a
batch of new entries), with a boundedness table covering all five bound
variants (including MonotonicValue/MonotonicKeys, and Unbounded keys
being added *and removed*) and a new request/response animation
- `state-management/` ("State Management"): new section index laying out
the state philosophy (declarative aggregations → sliced+`by_ref` reads →
`use::state`+`by_mut` for multi-input imperative state); "Singletons and
Optionals" written from placeholder; new "Keyed State" page (Unbounded
`KeyedSingleton`, per-key aggregations, join/lookup patterns); "Slice
Blocks" refreshed (leads with the `by_ref` snapshot-reading idiom); new
"Slice Hooks" reference (`use` / `use::atomic` / `use::state` /
`use::state_null` semantics per collection type, guarantees, unslicing);
new "References and Mutations" page (`by_ref`/`by_mut` handles,
boundedness requirement, code-order access groups, multi-input
shared-state pattern)
- `atomic-collections.mdx`: "Atomic Collections" promoted to a top-level
doc, de-tick-ified wording, modern sim test API in examples
Also update all internal links (`learn/`, `dfir/`, `locations/`),
regenerate category files and sidebar positions, update hydro.run doc
URLs in `hydro_lang` rustdoc comments to the new paths, and align the
single-counter tutorial's eventual-determinism phrasing with the
reference docs.
Validation: full docusaurus build passes (no broken links); all mdtest
doctests pass (62 passing, remainder intentionally no_run/ignore); no
legacy APIs (`.tick()`/`.batch(&tick)`/`.snapshot(&tick)`/`.all_ticks()`/
`.latest()`) appear in any visible example code.
Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #3018
19b05f1 to
bfe9115
Compare
Reorganize the "Core Framework" reference docs into a new hierarchy and
rewrite content to reflect current Hydro APIs (
sliced!blocks,by_ref/by_mutreference handles,BoundedValuekeyed singletons)instead of the legacy
.tick()-era APIs.New structure under
docs/docs/hydro/reference/:introduction/: Introduction (keeps/docs/hydro/reference/URL viaslug), new "Live Collections" concept page (placed first, as the most
core concept), and "Dataflow Programming" (refreshed to emphasize that
Hydro looks like analytics frameworks but models request/response
services)
correctness/("Safety and Correctness"): section index; "Bounded andUnbounded Types" rewritten to decouple boundedness from ticks (Bounded =
complete, contents immediately available; unbounded→bounded conversion
via
sliced!hooks); "Eventual Determinism" trimmed to the semanticmodel; new flagship "Non-Determinism and
nondet!" page covering guardmechanics, locally-resolved vs forwarded guards, multiple
NonDetparameters as independently observable forms of non-determinism (Paxos
example), proof-style comment guidance,
nondet_naming and# Non-Determinismrustdoc conventions, simulator tie-in, anduser-defined-function caveats
streaming-data/("Streaming Data"): section index (request/responseframing); "Streams" (refreshed); "Keyed Streams" (hidden doctest
harnesses migrated to
sliced!); new "Keyed Singletons" page focused onthe
BoundedValuevariant (one immutable value per request key;first(),fold_early_stop, map-based request→response, slicing as abatch of new entries) with a new request/response animation
state-management/("State Management"): new section index laying outthe state philosophy (declarative aggregations → sliced+
by_refreads →use::state+by_mutfor multi-input imperative state); "Singletons andOptionals" written from placeholder; new "Keyed State" page (Unbounded
KeyedSingleton, per-key aggregations, join/lookup patterns); "SliceBlocks" refreshed (leads with the
by_refsnapshot-reading idiom); new"Slice Hooks" reference (
use/use::atomic/use::state/use::state_nullsemantics per collection type, guarantees, unslicing);new "References and Mutations" page (
by_ref/by_muthandles,boundedness requirement, code-order access groups, multi-input
shared-state pattern)
atomic-collections.mdx: "Atomic Collections" promoted to a top-leveldoc, de-tick-ified wording, modern sim test API in examples
Also update all internal links (
learn/,dfir/,locations/),regenerate category files and sidebar positions, and update hydro.run doc
URLs in
hydro_langrustdoc comments to the new paths.Validation: full docusaurus build passes (no broken links); all mdtest
doctests pass (62 passing, remainder intentionally no_run/ignore); no
legacy APIs (
.tick()/.batch(&tick)/.snapshot(&tick)/.all_ticks()/.latest()) appear in any visible example code.Co-authored-by: Infinity 🤖 infinity@hydro.run