Skip to content

docs: fix English docs inconsistencies#620

Merged
t0k0sh1 merged 2 commits into
v0.0.6from
docs/fix-english-docs-inconsistencies
Apr 3, 2026
Merged

docs: fix English docs inconsistencies#620
t0k0sh1 merged 2 commits into
v0.0.6from
docs/fix-english-docs-inconsistencies

Conversation

@t0k0sh1

@t0k0sh1 t0k0sh1 commented Apr 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix // operator description: table said "always int" but // returns float when either operand is float
  • Fix ** operator: always returns float (print() displays integer-valued floats without .0, which was misleading)
  • Update recvreceive in docs index table to match renamed API
  • Add missing -c flag to stdin execution examples in README.md and project reference
  • Update here-document example to use ry -c <<'RY'

Addresses review comments from #619.

Test plan

  • Verified // and ** behavior with type annotations (x: int = 7.0 // 2 → type error confirms float return)
  • Documentation-only changes, no code impact

- Fix `//` operator table: "int for int operands, float if either is float" → "always int" (matches actual behavior)
- Fix `**` operator comments: remove "(float)" annotation (returns int for int operands)
- Update `recv` → `receive` in docs/README.md network reference table
- Add `-c` flag to stdin examples in README.md and docs/reference/project.md
- Update here-document example to use `ry -c <<'RY'`
@coderabbitai

coderabbitai Bot commented Apr 3, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Documentation edits: added the -c flag to stdin execution examples, changed TCP wording from “send/recv/close” to “send/receive/close”, and clarified floor-division (//) now yields int only for two int operands, otherwise yields float.

Changes

Cohort / File(s) Summary
Stdin execution examples
README.md, docs/reference/project.md
Added -c to usage examples that run code from stdin and here-documents (e.g., `echo ''
Reference docs wording
docs/README.md
Replaced TCP socket phrasing send/recv/close with send/receive/close.
Operator semantics
docs/tutorial/03-operators.md
Clarified floor-division //: returns int only when both operands are int; returns float if either operand is float. Updated example outputs accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through lines of README and guides,
Found a missing -c where the stdin hides,
I nudged floor-division to behave just right,
And changed one TCP phrase with a gentle bite,
Hooray — the docs now gleam in rabbit-light! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: fix English docs inconsistencies' accurately summarizes the primary change—fixing multiple documentation inconsistencies across README and reference docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/fix-english-docs-inconsistencies

Comment @coderabbitai help to get the list of available commands and usage tips.

@t0k0sh1 t0k0sh1 marked this pull request as ready for review April 3, 2026 07:32
Copilot AI review requested due to automatic review settings April 3, 2026 07:32
@t0k0sh1 t0k0sh1 mentioned this pull request Apr 3, 2026
2 tasks

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Documentation updates to correct inconsistencies in the English docs around operator semantics and CLI usage examples (stdin execution), and to align docs with a renamed networking API.

Changes:

  • Corrected stdin execution examples to use ry -c (including here-doc usage).
  • Updated // and ** operator documentation to reflect actual runtime behavior.
  • Aligned networking docs index wording from recv to receive.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
README.md Updates stdin execution examples to use ry -c, including here-doc form
docs/tutorial/03-operators.md Fixes operator semantics descriptions/examples (notably // and **)
docs/reference/project.md Updates CLI overview stdin example to ry -c
docs/README.md Renames recv to receive in the docs index table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/tutorial/03-operators.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/tutorial/03-operators.md`:
- Around line 187-188: Update the documentation for the exponentiation operator
(`**`) to reflect the actual codegen behavior: note that `**` currently promotes
integer operands to f64 and emits a call to `pow`, so the result type is
float/f64 (not int for int operands). Change the example and explanatory text
around `**` (the "produces int for int operands" claim and the `print(2 ** 3)`
comment) to indicate the f64 result and mention the codegen behavior referring
to `pow`/f64 promotion.
- Line 17: The docs incorrectly state that the floor-division operator `//` is
"always int"; update the sentence describing `//` so it reflects the actual
behavior of the implementation: `//` returns an integer only when both operands
are integers, otherwise it returns a float (f64) when either operand is a float.
Edit the line showing `//` in the operators doc to mention the conditional
return type (int when both operands are int, float/f64 otherwise) and adjust the
example or explanation accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 97115c8b-df1b-4b1f-8bd9-0fb2ca1ebf24

📥 Commits

Reviewing files that changed from the base of the PR and between 3303c34 and 389b09e.

📒 Files selected for processing (4)
  • README.md
  • docs/README.md
  • docs/reference/project.md
  • docs/tutorial/03-operators.md

Comment thread docs/tutorial/03-operators.md Outdated
Comment thread docs/tutorial/03-operators.md Outdated
- `//` returns float when either operand is float (not always int)
- `**` always returns float (print displays without .0 for integer values)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/tutorial/03-operators.md`:
- Line 17: Update the PR description and any associated commit message to
accurately reflect the implemented behavior of the `//` operator: it returns an
int only when both operands are ints and returns a float when either operand is
a float (e.g., `7.0 // 2` → `3.0`), and ensure the PR title/summary, description
body, and changelog entry match this corrected behavior so reviewers and history
are consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b15453fe-820e-4bcc-b22f-58e2cad0a701

📥 Commits

Reviewing files that changed from the base of the PR and between 389b09e and 8211a3e.

📒 Files selected for processing (1)
  • docs/tutorial/03-operators.md

Comment thread docs/tutorial/03-operators.md
@t0k0sh1 t0k0sh1 merged commit e188de9 into v0.0.6 Apr 3, 2026
6 checks passed
@t0k0sh1 t0k0sh1 deleted the docs/fix-english-docs-inconsistencies branch April 3, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants