Skip to content

feat: self-host compositional math helpers - #30

Merged
vycdev merged 2 commits into
vycdev:mainfrom
vycdev2:feat/math-stdlib-helpers
Aug 3, 2026
Merged

feat: self-host compositional math helpers#30
vycdev merged 2 commits into
vycdev:mainfrom
vycdev2:feat/math-stdlib-helpers

Conversation

@vycdev2

@vycdev2 vycdev2 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • implement math.is_even, math.is_odd, math.sign, math.to_radians, and math.to_degrees as exported compiler-shipped .jett functions
  • remove the five dedicated typechecker signatures and interpreter dispatch arms while retaining math.mod and math.pi as primitive kernels
  • cover negative and zero parity cases, assert query signatures resolve to stdlib/math.jett, and rename generic fixtures that previously occupied the now compiler-owned math namespace

Verification

  • cargo test -q -p jett_driver math_ — passed: 1 unit test and 13 matching fixture tests
  • cargo fmt --check — passed
  • cargo build — passed
  • cargo test -q — passed: full workspace suite
  • git diff --check — passed

Risk

  • Low: the source implementations preserve the existing signatures and arithmetic, the namespace fixture renames are test-only, and focused plus full workspace tests pass.

Closes #28

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

@vycdev vycdev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The implementation and regression coverage look good, but this closes #28 without recording the completed extraction in the project docs. AGENTS.md requires docs/design.md and docs/architecture.md to stay aligned with stdlib changes, and after PR #29 the progress rows will still describe this work as merely “tracked by #28.” Please update the relevant progress/design documentation to say which math helpers are now source-defined in stdlib/math.jett and which remain primitive Rust kernels.

@vycdev2
vycdev2 force-pushed the feat/math-stdlib-helpers branch from 34e1db5 to a67ebb7 Compare July 31, 2026 03:07
@vycdev2

vycdev2 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the stdlib documentation feedback. docs/design.md, docs/architecture.md, and docs/progress.md now identify is_even, is_odd, sign, to_radians, and to_degrees as source-defined in stdlib/math.jett; math.mod, math.pi, and the other currently supported math builtins are documented as retained Rust-backed kernels/operations.

Rebased the topic branch onto current upstream/main so the progress updates include the tracking documentation from PR #29.

Verification: cargo fmt --check, cargo test -q -p jett_driver math_, cargo build, cargo test -q, and git diff --check all passed. Head: a67ebb7.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

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.

enhancement: self-host compositional math helpers in stdlib

2 participants