feat: migrate file extension from .as to .affine for GitHub Linguist …#25
Merged
Merged
Conversation
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
36cfcd0 to
3c0e4ff
Compare
This was referenced May 28, 2026
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.
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.
…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:
https://claude.ai/code/session_015S2ndRbwuJPpjkv54BpVDw