Conversation
There was a problem hiding this comment.
Pull request overview
Adds an interactive REPL mode to the Decimo CLI so decimo with no arguments (and TTY stdin) launches an interactive calculator session, aligning CLI UX with tools like bc. The PR also updates related CLI docs/changelog and refines benchmark comparison logic.
Changes:
- Launch REPL when no expression/file is provided and stdin is a TTY; add REPL implementation, prompt writer, and line-reading helper.
- Update CLI docs/changelog to describe REPL mode and revise the CLI benchmark script to compare full-precision digits (with a guard digit).
- Normalize various docstrings to use single-backtick inline code formatting.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/decimo/errors.mojo | Docstring inline-code formatting updates. |
| src/decimo/bigint/bigint.mojo | Docstring inline-code formatting update. |
| src/decimo/bigfloat/mpfr_wrapper.mojo | Docstring inline-code formatting updates. |
| src/decimo/bigdecimal/bigdecimal.mojo | Docstring inline-code formatting updates. |
| src/cli/main.mojo | Switch no-args TTY behavior to REPL launch; keeps other modes intact. |
| src/cli/calculator/tokenizer.mojo | Docstring inline-code formatting update. |
| src/cli/calculator/repl.mojo | New REPL implementation (read/eval/print loop, banner, exit handling, caret diagnostics). |
| src/cli/calculator/io.mojo | Add read_line() helper for REPL input (getchar-based). |
| src/cli/calculator/display.mojo | Add write_prompt() to print a styled prompt to stderr. |
| src/cli/calculator/init.mojo | Export new REPL/prompt/line-reading APIs. |
| docs/plans/cli_calculator.md | Update roadmap/design notes to reflect REPL-first approach (no subcommands). |
| docs/changelog.md | Add changelog entry for interactive REPL feature. |
| benches/cli/bench_cli.sh | Revise correctness comparison to full-precision matching and split bc/python counters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds an interactive REPL mode to the Decimo CLI so
decimowith no arguments (and TTY stdin) launches an interactive calculator session, aligning CLI UX with tools likebc. The PR also updates related CLI docs/changelog and refines benchmark comparison logic.Changes: