hydroflow icon indicating copy to clipboard operation
hydroflow copied to clipboard

docs: Hydro language docs

Open jhellerstein opened this issue 10 months ago • 7 comments

  • [ ] We need a doc with legal Hydro operators.
    • [ ] Generate a landing page in the Hydro docs for Streams, Singletons and Optionals
    • [ ] Update each method for those with Rust docs
  • [ ] Reorganize concepts vs docs to make Hydro docs more navigable

jhellerstein avatar Jan 07 '25 17:01 jhellerstein

I think the way we should think about this is not as "operators" or a "grammar". It's just a Rust API, the same as tokio or Rust iterators (in particular, the "operators" available vary wildly based on type context). So I don't think it's particularly feasible to auto-gen a page with all the operators, instead we should flesh out the Rustdoc and point to https://hydro.run/rustdoc/hydro_lang/stream/struct.Stream. And also have human-written doc pages for the different collections type to provide more conceptual intuition.

shadaj avatar Jan 07 '25 19:01 shadaj

I'm fine not calling it a grammar, you're right. But I absolutely think we should have a single page in the docs for all the hydro operators (the API). I refer to the DFIR operators doc all the time.

On Tue, Jan 7, 2025 at 11:32 AM Shadaj Laddad @.***> wrote:

I think the way we should think about this is not as "operators" or a "grammar". It's just a Rust API, the same as tokio or Rust iterators (in particular, the "operators" available vary wildly based on type context). So I don't think it's particularly feasible to auto-gen a page with all the operators, instead we should flesh out the Rustdoc and point to https://hydro.run/rustdoc/hydro_lang/stream/struct.Stream. And also have human-written doc pages for the different collections type to provide more conceptual intuition.

— Reply to this email directly, view it on GitHub https://github.com/hydro-project/hydro/issues/1633#issuecomment-2576074891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC54QKQNKRUIPT732JWEXD2JQTURAVCNFSM6AAAAABUYD3NMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZWGA3TIOBZGE . You are receiving this because you were assigned.Message ID: @.***>

jhellerstein avatar Jan 07 '25 20:01 jhellerstein

I think the tricky difference is unlike DFIR we have streams vs singletons vs optionals which use independent sets of operators. Also unlike DFIR we can use standard Rust tooling for documenting APIs, so I'd prefer to avoid redundancy and instead have a shortcut to this on the website.

shadaj avatar Jan 07 '25 20:01 shadaj

So the key entry points are the following?

  • https://hydro.run/rustdoc/hydro_lang/stream/struct.Stream
  • https://hydro.run/rustdoc/hydro_lang/singleton/struct.Singleton
  • https://hydro.run/rustdoc/hydro_lang/optional/struct.Optional

We need a landing page for those and then rustdocs for the operators.

jhellerstein avatar Jan 07 '25 21:01 jhellerstein

I agree that it would be nice to have a concise index linking to those three pages and listing/linking all the corresponding methods

MingweiSamuel avatar Jan 29 '25 17:01 MingweiSamuel

Can change the "Dataflow Programming" section to be called "API" or reference or some sort of summary, and then give it a dropdown with external links to the Stream/Singleton/Optional Image

MingweiSamuel avatar Mar 20 '25 16:03 MingweiSamuel

Maybe right now concepts and docs are interleaved in a confusing way

MingweiSamuel avatar Mar 20 '25 16:03 MingweiSamuel