Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ opam install . --deps-only --yes --with-test

A representative core action is the Swift FFI RPC `dispatch` / `send`, which optimistic-captures a journal block (see `shared/test/logseq_chat/rpc_test.ml` and `dune build @shared/native/runtest`).

- Avoid O(n²) `List` patterns such as `List.concat` and repeated `List.append` on large sequences; when the project already depends on the `rrbvec` package, use `Rrbvec` vectors instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the complexity claim for List.concat

For a large list of lists, a single List.concat traverses each element once and is linear in the total input/output size; it does not have the quadratic behavior of repeatedly appending an ever-growing accumulator. Labeling List.concat itself as an O(n²) pattern directs future contributors to replace an appropriate standard-library operation with unnecessary vector conversions or dependencies. Limit this guidance to repeated/nested append patterns that actually retraverse accumulated data.

Useful? React with 👍 / 👎.


### iOS / Android

On a Mac, follow `README.md`: open `apple/Project.xcworkspace`, run the `LogseqChat App` scheme. Native core builds (`scripts/build-mobile-ios-*.sh`, `scripts/build-android-native.sh`) expect an `ocaml-demo` checkout via `LOGSEQ_CHAT_OCAML_DEMO_ROOT` (defaults to a machine-local path). Do not start Android emulators or Maestro from Cloud Agent unless that stack is explicitly in scope.
Loading