Skip to content

feat: migrate file extension from .as to .affine for GitHub Linguist …#25

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/explore-repo-language-3QNs5
Apr 17, 2026
Merged

feat: migrate file extension from .as to .affine for GitHub Linguist …#25
hyperpolymath merged 1 commit into
mainfrom
claude/explore-repo-language-3QNs5

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

…recognition

The .as extension conflicts with ActionScript in GitHub Linguist, causing all AffineScript source files to be misclassified as ActionScript/JavaScript. This migration to .affine resolves the conflict and enables proper language detection.

Changes:

  • Rename all 153 .as source files to .affine across conformance/, examples/, stdlib/, test/, and tests/ directories
  • Add linguist-language=AffineScript directive to .gitattributes for .affine
  • Update tree-sitter grammar file-types from "as" to "affine"
  • Update VSCode extension to register .affine instead of .as
  • Update all documentation references (28+ files) to use .affine
  • Update test fixture references in test_e2e.ml

https://claude.ai/code/session_015S2ndRbwuJPpjkv54BpVDw

@hyperpolymath
Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

@hyperpolymath hyperpolymath force-pushed the claude/explore-repo-language-3QNs5 branch from 36cfcd0 to 3c0e4ff Compare April 17, 2026 00:49
@hyperpolymath hyperpolymath merged commit 5d79e9e into main Apr 17, 2026
22 of 27 checks passed
@hyperpolymath hyperpolymath deleted the claude/explore-repo-language-3QNs5 branch April 17, 2026 21:07
hyperpolymath pushed a commit that referenced this pull request May 30, 2026
Adds stdlib/encoding.affine — to_hex / from_hex / to_hex_padded /
hex_digit / hex_value: lowercase, non-negative, 32-bit hexadecimal
conversion built on the string-primitive layer (len / string_sub /
string_find / ++) plus integer bit-ops. Integer / is deliberately
avoided — it lowers to floating-point division on the Deno-ESM backend,
so nibble math uses & and >> instead.

Verified locally with a bootstrapped toolchain: the codegen-deno runner
compiles tests/codegen-deno/encoding_smoke.affine under --deno-esm and
the harness round-trips under Node; full suite green, no regressions.

Base64 (the other half of stdlib #25) is deferred pending a Bytes type
(#30). Bumps the #25 roadmap row to partial.
hyperpolymath pushed a commit that referenced this pull request May 30, 2026
…verage

Adds RFC 4648 base64 to stdlib/encoding.affine: to_base64 / to_base64_url
/ from_base64 / from_base64_url, byte-oriented via the string_char_code_at
/ string_from_char_code primitives. As in the hex half, group/remainder
math uses bit-ops (no integer / — it lowers to float division on
Deno-ESM, see #478). Verified: tests/codegen-deno/encoding_smoke compiles
under --deno-esm and the harness round-trips the RFC 4648 §10 vectors
under Node; full suite green.
hyperpolymath pushed a commit that referenced this pull request May 30, 2026
…itives

Adds two byte-oriented String<->Int builtins underpinning the base64
codec in stdlib/encoding.affine (#25). Wired across all four layers,
consistently:
  - resolve.ml      seed_builtins (name resolution)
  - typecheck.ml    register_builtins: String->Int->Int / Int->String
  - interp.ml       runtime impls (out-of-bounds read -> -1; from masks &0xff)
  - codegen_deno.ml __as_strCharCodeAt / __as_strFromCharCode + builtin map

Unlike string_get/int_to_char (Char-typed, ASCII-clamped on the
interpreter), these go String<->Int directly so a byte 0..255 round-trips
identically on the interpreter and Deno-ESM backends. This is the
compiler support the base64 half of the prior commit depends on.

Verified: dune build green; tests/codegen-deno/encoding_smoke round-trips
the RFC 4648 vectors under Node; full codegen-deno suite green.
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.

1 participant