| Age | Commit message (Collapse) | Author |
|
Four comments still referred to the old project name 'perc'. Updated
Build, Run, Install, and Uninstall doc comments to correctly reference
'gt'. Also clarified Install/Uninstall to mention GOBIN precedence
over GOPATH/bin, matching the actual implementation.
|
|
- Task 31: Refactor repl tests to remove dependency on package-level singletons
- Task 41: Introduce Calculator interface to decouple REPL from RPN engine
- Task 61: Implement persistent variable store with Save/Load methods
- Task 71: Add stack inspection (peek) command to REPL
- Task 81: Expand constants library with additional mathematical constants
- Task a1: Add session logging flag (--log) to gt CLI
- Task 91: Integrate reverse history search (Ctrl+R) using readline
This commit includes:
- New: internal/repl/calculator.go - Calculator interface for RPN decoupling
- New: internal/repl/completer.go - AutoCompleteAdapter for readline
- Modified: internal/repl/repl.go - Uses readline instead of go-prompt
- Modified: internal/rpn/variables.go - Added Save/Load for persistent state
- Modified: internal/rpn/rpn_state.go - Added Stack() method
- Modified: internal/rpn/constants.go - Added more mathematical constants
- Modified: internal/repl/commands.go - Added 'stack' command
- Modified: internal/repl/completer_test.go - Updated for readline API
- Modified: internal/repl/repl_test.go - Updated for Calculator interface
- Modified: internal/repl/concurrent_test.go - Updated for Calculator interface
- Modified: internal/repl/handlers.go - Updated for Calculator interface
- Modified: internal/rpn/variables_test.go - Added Save/Load tests
- Modified: internal/rpn/constants_test.go - Added new constant tests
- Modified: cmd/gt/main.go - Added --log flag support
- Modified: Magefile.go - Symmetrized Install/Uninstall logic
- Deleted: internal/repl/prompt.go - Replaced by readline integration
- Added: STORY.md - Project history documentation
|
|
- Added Lint target: runs golangci-lint for code quality checks
- Added Release target: builds and packages releases (requires goreleaser)
Also fixed errcheck linting issue:
- Check error return from o.vars.SetVariable in AssignVariable
All mage targets work: build, run, test, testRPN, rpn, install, lint, release, repl, uninstall
|
|
- Added 'SPDX-License-Identifier: MIT' and 'Copyright (c) 2026 Paul Buetow' headers
- Files updated: 24 .go files across cmd/gt/, internal/calculator/, internal/repl/, internal/rpn/
The MIT license from LICENSE file is reflected in all source files.
|
|
- Error wrapping improvements across multiple files
- Thread-safe singleton initialization using sync.Once
- Proper error handling for file close operations
- Removed speculative complexity in history management
- Fixed operator interface design
Audit report: COMPLETE_AUDIT_REPORT.md
|
|
- Add comprehensive unit tests for REPL package
- Add completer logic tests to cover edge cases
- Integrate RPN as fallback in calculator.Parse()
- Add ParseRPN function to calculator package
- Add tests for RPN fallthrough path
The changes bring overall test coverage from ~70% to 81.9%.
|
|
- Added mg import (via magefile/mage/sh)
- Added binaryName constant
- Added project descriptions for build targets
- Added proper Install target with go install
- Added Uninstall target to remove the binary
- Added getGOPATH helper function
|
|
- Add TestRPN() mage target to run only RPN tests
- Useful for quick RPN-specific testing
|
|
- Add REPL mode with vi keybindings
- Add built-in commands (help, clear, quit/exit)
- Add mage repl target
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Amp-Thread-ID: https://ampcode.com/threads/T-e4f4a959-8cc6-4ac0-b6fb-2779867e8b2a
Co-authored-by: Amp <amp@ampcode.com>
|