Skip to content

About

Official documentation for the Scarp Programming Language.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Scarp Documentation

Custom documentation engine: Scarp Docs now builds from the Scarp-owned TypeScript generator, with bilingual HTML, local search, responsive layout and offline-browser tests. See architecture and migration gates and Issue #70. The published site uses no VitePress/Vue package. Historical navigation evidence is preserved as inert TypeScript data for conformance tests; obsolete framework source is removed from the active tree. No stable release is implied.

Official TypeScript-generated documentation for the experimental Scarp Programming Language.

Website (English): https://scarp-lang.github.io/scarp-docs/

हिन्दी दस्तावेज़: https://scarp-lang.github.io/scarp-docs/hi/

Compiler: https://github.com/scarp-lang/scarp

Latest published compiler: v0.0.6-alpha.20, November 24, 2026, source b1a9347f93540fdf95b0ddecba4adc55a3b4bb98. Exact decimal literals, persistent tuple updates, numeric tuple ordering, lowercase project manifests and experimental Rust host native functions are published. English release · हिन्दी रिलीज़ · Current reference. For binaries use the official downloads hub; there is no general native compiler CLI.

Supported documentation policy: The public site now recommends only the latest published Scarp prerelease, via Official Downloads, the current English guide, हिन्दी वर्तमान गाइड, and the current compiler reference. Older compiler pages are retired from public search, navigation and sitemap, and return noindex migration notices. Their tagged evidence remains in this repository for test reproducibility, not recommended installation.

Retired compiler release history (preserved for audit, not for new installations)

Earlier compiler alpha.15: v0.0.6-alpha.15, November 19, 2026, source a21b7b6d942bd1ca9abbbbb522f92f9c8e21e281. English · हिन्दी · Rust host guide.

Earlier published compiler alpha.14: v0.0.6-alpha.14, November 18, 2026, exact source 43627b74af5fccccc5e233e98207413983ebafc1. Clearer nested pattern diagnostics, live Rust editor-cache quotas and checked ELF64 integer kernels (Rust host API only) are covered in English release, हिन्दी रिलीज़, Rust host guide and हिन्दी Rust API guide. No general native compiler CLI is shipped.

Earlier compiler alpha.13: v0.0.6-alpha.13, November 17, 2026, source e755fda37cdaeed29434e848cb5dd41f2f2e7eb2. Historical revision-aware caches, editor workspace generations and Option/Result reuse remain pinned in English release and हिन्दी रिलीज़.

Earlier published compiler alpha.12: v0.0.6-alpha.12, November 16, 2026, source a1f9c2fc1c6bc8f3e04878d30d658bb38fab441d. Includes typed records, variants, checked patterns, Option/Result, immutable lists/maps and the tested task board. English · हिन्दी.

Historical alpha.11 compiler: v0.0.6-alpha.11, November 15, 2026, pinned source 79b57395957f47e1270ee542a856c844b82386de. Its English release and Hindi release preserve exact base-10 Decimal, explicit rounding and interactive typed input.

Historical alpha.10 compiler: v0.0.6-alpha.10, November 14, 2026, pinned source 44fcd0f77ccb92648cdb1fc7632495c506c87cb3. English and Hindi preserve interactive prompts, fixed arrays, expanded BigInt and exact stdout fixtures.

Previous published compiler: v0.0.6-alpha.5, November 9, 2026, tagged source 205e92f166f186c3905e5880d41c31717b697b8e. The English release guide and हिन्दी विवरण document deterministic Top-P, centered Pearson correlation and a bounded Rust-only ELF64 object-generation step. No general native scarp compile command or stable release is implied.

Earlier published compiler: v0.0.6-alpha.4, November 8, 2026, tagged source f04be0758cbce405ddcdb229699b0ff83c09d207. Its English release notes and हिन्दी विवरण cover sampled calculus, cosine similarity, and the earlier restricted ELF64 object API. The older v0.0.6-alpha.2 release introduced optional Rust embedding caches.

Earlier published compiler: v0.0.6-alpha.1, November 5, 2026, source commit aa329a22cf2bf92d2c9814a26ff9c8b67a72e6e8. Read the English release guide and हिन्दी release guide. The symbol navigation and CLI reference, हिन्दी symbols guide, RMS tutorial and हिन्दी RMS पाठ document features actually published in alpha.6. The docs pin tagged compiler examples/JSON fixtures, track release drift and run the tagged CLI in CI. Native .srp compilation and LSP integrations remain unavailable.

Find documentation in your language: Search and navigation · हिन्दी में खोजें. The Scarp-owned local search offers Hindi labels, accessible keyboard hints and a translated no-results state; English remains unchanged. Search is client-side and does not depend on an external hosted search provider.

Start learning in order: English: seven-stage learning path · हिन्दी: सात चरणों में Scarp. The recommended download is the latest published compiler; historical examples retain exact release-specific provenance, without a guarantee of universal compatibility.

Install the latest published compiler: Official Scarp Downloads · English · हिन्दी. Permanent platform links target the newest published release; verify its corresponding SHA-256 before extracting.

Automated accessibility auditing: The extracted offline site is checked with pinned local axe-core in 10 bilingual light/dark/search/mobile states; CI attaches per-state WCAG A/AA findings on failures. Manual screen-reader verification remains separately tracked in Issue #65.

Real browser checks: The browser-offline CI job runs a pinned Chromium browser against the extracted offline archive, checking keyboard navigation and search focus return, translated page switching, dark/light preference, reduced motion, mobile layout and both English/Hindi Command Finder flows. See npm run test:browser-offline and maintainer guidance.

Read the bilingual site offline: English offline download instructions · हिन्दी offline documentation. A tested GitHub Actions artifact contains reproducible bundled docs, a Node.js loopback server and SHA-256 checksums. Offline docs are not compiler releases.

Choose version-correct CLI commands: Interactive English Command Finder · हिन्दी CLI Command Finder. Eleven common tasks across nineteen pinned compiler prereleases, with explicit unavailable states and a copy button; no server API or installed-binary access is required.

Verify your running Scarp compiler and host: English diagnose --json guide · हिन्दी diagnose --json मार्गदर्शिका. Covers the tagged alpha.6 capability JSON and the distinction between interpreter execution and unsupported native binaries.

Inspect parser output without execution: English AST debugging guide · हिन्दी AST debugging पाठ. Based on the released alpha.6 compiler's actual parser CLI; successful AST output is experimental human-readable debug text, not a stable JSON API.

Start with a complete alpha.6 project: English beginner lab · हिन्दी शुरुआती मार्गदर्शिका. Create a project with Scarp.project, add a verified source module, statically inspect definitions/references, and run the exact tagged entrypoint. The project fixtures are tested with the published compiler in CI.

Older published interpreter notes and compatibility fixtures (retired)

Historical published compiler: v0.0.5-alpha.5, November 4, 2026, source 2eeed0aa52ccb59523307841ad8ffbd83f8911a8. The English release guide, हिन्दी release guide, new CLI and हिन्दी CLI cover published project module inspection and the experimental C11 Rust embedding-only API. Historical alpha.5 installations: English · हिन्दी. The C11 backend limits and हिन्दी C11 विवरण explicitly reject false native compile CLI claims. New CI executes an exact tagged alpha.5 Rust compiler and compares release-pinned source, output and file-vs-project JSON inventories.

Previous published prerelease: v0.0.5-alpha.4, November 3, 2026. The new English project quickstart and हिन्दी project guide reproduce the real create / verify DIRECTORY / launch workflow. The English release details and हिन्दी विवरण cover manifest safety, version bounds, and source provenance. Dedicated CI builds the tagged alpha.4 Rust interpreter and exercises project lifecycle and failure behavior.

Historical v0.0.5-alpha.3: The historical English CLI reference and हिन्दी CLI संदर्भ document the released Scarp-first commands with a compiler-backed check. Historical alpha.1 CLI is retained for older scripts.

Previous published prerelease: v0.0.5-alpha.2, November 2, 2026. Alpha.2 release examples (English) and हिन्दी संस्करण. The 11-program core documentation baseline remains intentionally pinned to v0.0.5-alpha.1; a separate twelve-program alpha.2 conformance suite checks newly published features across the release guide and verified collections and classification tutorial, both translated into Hindi.

Historical alpha.4 installation: The English platform installation guide and हिन्दी इंस्टॉलेशन मार्गदर्शिका remain pinned to v0.0.5-alpha.4, while fresh installs should use the dedicated alpha.6 installer. They give exact official Windows x64, Linux x64 and macOS Apple Silicon archive/checksum links, OS-native SHA-256 verification, correct nested extraction paths, and tagged source-build commands. TypeScript checks (npm run check:alpha4-installation and npm run test:alpha4-installation) guard the bilingual release identity, commands and checksum workflow; historical alpha.1 file tutorials retain their version-specific scope.

Migrating from alpha.3 to alpha.4: The English file-to-project migration guide and हिन्दी माइग्रेशन मार्गदर्शिका distinguish retained single-file commands from new project-directory commands. Exact command examples, published release identities, directory overwrite safety, versioned manifests and bilingual parity are guarded by npm run check:alpha4-migration and npm run test:alpha4-migration. Compiler execution is independently tested by the tagged alpha.4 conformance CI job.

Historical alpha.4 CLI reference: Scarp compiler alpha.4 (English) and हिन्दी CLI मार्गदर्शिका document published alpha.4 create, verify DIRECTORY and launch commands, alongside supported file commands, budgets, JSON error formats and availability limitations. Documentation CI exercises the tagged compiler and prevents unpublished command claims; the alpha.3 CLI reference remains historically pinned.

Documentation prerelease process: The docs source uses a separate docs-v* tag namespace to avoid confusion with compiler tags. The first official docs version, docs-v0.1.0-alpha.1, is explicitly prerelease-only, based on compiler v0.0.5-alpha.4. Release metadata and release notes are guarded by npm run check:docs-prerelease and npm run test:docs-prerelease. A GitHub workflow publishes this docs tag only after all Documentation CI jobs pass on a push to main; it never marks the release stable. The original docs-v0.2.0-alpha.1 label was corrected to keep the first prerelease in the 0.1.0 series.

License: MIT

Development

Use Node.js 20.19+ and npm. The production website is generated by the Scarp-owned TypeScript static site engine in scripts/scarp-site/, not VitePress/Vue. Historical conformance uses a framework-independent TypeScript evidence snapshot. TypeScript 6.0.x and tsx run the build and validation scripts. The historical docs-v0.1.0-alpha.1 release notes describe the then-existing VitePress site and are not the current implementation.

npm install
npm run docs:dev       # Scarp-owned TypeScript development server
npm run typecheck      # strict TypeScript checks
npm run check:tooling  # TypeScript-only authored tooling
npm run check:alpha8   # historical published compiler and project fixtures
npm run check:alpha9   # historical BigInt, JSON-v2 and bilingual docs
npm run check:i18n     # bilingual pages and code-block parity
npm run check          # full local checks and production build
npm run docs:build     # compile the static site for GitHub Pages
npm run docs:preview   # preview generated output

Markdown content lives under docs/; the independent route contract, renderer, local search and browser code live under scripts/scarp-site/. GitHub Pages uses /scarp-docs/ as its base route. The project retains separately pinned historical compiler fixtures and docs prerelease gates; publishing docs does not publish a compiler or stable release.

For new contributors, the English glossary and हिन्दी शब्दावली explain Scarp terminology before the language reference.

Pages are under docs/ and are written in Markdown. Navigation, theme behavior, code rendering and canonical /scarp-docs/ routes are implemented in scripts/scarp-site/; scripts/lib/current-publication.ts defines the current-only page inventory.

Published feature status

The English published-feature matrix and हिन्दी फीचर स्थिति distinguish the main alpha.1 reference baseline from all 12 alpha.2 and 4 alpha.3 release-backed examples. A TypeScript manifest checker prevents either locale from silently changing the version, compiler commit, example source, or evidence count. Run npm run check:release-status and npm run test:release-status before changing release status claims. These checks supplement—not replace—the tagged compiler execution jobs.

Verified typed declarations and numeric conversions

The bilingual alpha.2 typed-binding lesson and हिन्दी पाठ walk through two full tagged programs. Source, stdout, release identity, code-fence parity and CLI availability are checked with npm run check:typed-bindings and npm run test:typed-bindings. The original alpha.1 language-reference pages retain their version-specific evidence; alpha.2 features are not silently backported into that baseline.

Compiler-backed Unicode text guide

The English Unicode guide and हिन्दी Unicode पाठ teach alpha.2 Unicode scalar queries and alpha.3 string creation using two complete published programs. npm run check:unicode-text and npm run test:unicode-text ensure the source, output, pinned compiler versions, CLI commands and bilingual examples remain synchronized. Release-specific CI independently executes both tagged compiler examples.

Verified bitwise operators and signed 64-bit semantics

The English bitwise guide and हिन्दी bitwise पाठ explain published alpha.2 integer masks, shifts, remainder and radix literals. They reproduce one complete release example plus two exact failure fixtures (E0046 and E0006). New TypeScript checks (npm run check:bitwise, npm run test:bitwise) enforce bilingual evidence and tagged Git blob provenance; the alpha.2 compiler job additionally runs npm run test:bitwise-alpha2 -- /path/to/scarp to verify failure exit codes, empty stdout and stderr byte-for-byte.

Verified modules, public APIs and static inspection

The English modules and visibility guide and हिन्दी module guide connect a three-file alpha.1 source graph with alpha.2 public/private metadata, JSON inspection, and exact E0041/E0039 failure diagnostics. The TypeScript-only npm run check:modules-guide and npm run test:modules-guide commands validate the full source and stdout/stderr fixtures, release markers, commands, and translation parity. npm run test:module-inspection-alpha2 -- /absolute/path/to/scarp runs a tagged alpha.2 compiler to confirm inspection does not execute program output, verifies private visibility in text/JSON metadata and rejects invalid import graphs with empty stdout.

TypeScript-first architecture

All project-maintained executable tooling under scripts/ uses .ts files: navigation validation, Hindi parity, pinned compiler evidence, fixture checks, compiler smoke tests, and tooling rules. TypeScript is checked in CI with strict tsc, including the standalone generator, browser modules and validators. This is a TypeScript-first application, not a claim that the whole repository can be 100% TS files: documentation stays in Markdown, CSS remains for presentation, and .srp fixtures remain actual Scarp source. No authored .js/.mjs tooling is required.

Source-of-truth policy

The compiler repository is scarp-lang/scarp (not scarp-lang/scarp-lang). Core language-reference facts are checked against compiler source, executable tests and published documentation for v0.0.5-alpha.1. Release-scoped alpha.2 and alpha.3 pages have separate compiler-pinned evidence and verification. Each technical page links to the corresponding compiler reference. Status distinctions are described in Feature status.

A syntax proposal is not evidence that a feature ships. A future feature should remain marked planned until verified in a published compiler version. Documentation examples should be copied from or checked against compiler fixtures whenever possible.

The translation guard compares actual fenced-code blocks, including repeated snippets, in the original English order. Hindi pages may contain additional explanation, but no original example may be silently changed or dropped. The parser itself has standalone TypeScript unit tests.

Published alpha.2 diagnostic regression tests

Six deliberately failing programs, including exact stderr snapshots and supporting module source, are pinned separately in conformance/alpha2-errors-manifest.json (14 upstream Git blobs). The English repair tutorial and हिन्दी त्रुटि गाइड reproduce complete source/stderr examples. TypeScript check:alpha2-errors validates their provenance; the alpha.2 compiler CI runs check and run on each fixture, verifying that they fail as published. These six negative cases are not included in the twelve successful alpha.2 programs.

Alpha.1-to-alpha.2 executable upgrade gate

A separate TypeScript test, npm run test:alpha2-backcompat -- /path/to/alpha2/scarp, builds on the existing manifests to run all 11 unchanged alpha.1 programs against the published alpha.2 interpreter, checking silent check, byte-exact run output and a tokens smoke test. The GitHub Actions alpha2-conformance job executes this gate using the exact tagged alpha.2 commit. Its English migration-readiness guide and हिन्दी अपग्रेड गाइड explain the scope and limitations. This does not automatically repin the whole main reference or guarantee arbitrary backwards compatibility.

Historical alpha.3 release evidence

Historical published prerelease: v0.0.5-alpha.3, November 2, 2026 (source commit 7715c28df09c7703b39e14fddb963275b25df476). The English guide and हिन्दी संस्करण include four complete published compiler programs, a supporting module and a structured diagnostic example. conformance/alpha3-manifest.json pins 11 exact upstream Git blobs. Use npm run check:alpha3 for source/text provenance and npm run test:alpha3 -- /path/to/alpha3/scarp to verify exec, static verify, legacy run, module/AST inspection and offline JSON diagnostics. The CI job uses the exact published release commit. The main documentation baseline is still alpha.1 and retains separate alpha.2 evidence.

Earlier published compiler release tracks

The core reference, status matrix and existing 11 compiler examples remain pinned to v0.0.5-alpha.1 until a comprehensive and separately reviewed update migrates those pages. Scarp v0.0.5-alpha.2 is now publicly released, with an independent evidence manifest at conformance/alpha2-manifest.json (twelve newer programs, 28 exact upstream Git blobs, including imported source modules and a JSON snapshot). scripts/check-alpha2.ts verifies the English/Hindi release guides, collection tutorials and the multi-file constants/JSON walkthrough, fixture provenance and optional byte-for-byte checkout comparison. A distinct alpha2-conformance GitHub Actions job checks out the exact alpha.2 release source e4db8e191cd7ea623123cae7348450ca6c95b170, builds the tagged Rust interpreter and executes the twelve programs plus full text/JSON module inspection and diagnostic explanation checks. This separation prevents newer compiler behavior from being silently claimed as an alpha.1 feature.

Compiler-backed tutorial evidence

The verified classification and probabilities tutorial and हिन्दी वर्गीकरण ट्यूटोरियल cover three additional compiler cases: class scores, cross-entropy and one-hot targets. The verified tiles tutorial and हिन्दी टाइल ट्यूटोरियल provide the published matrix-forward compiler fixture alongside diagnostics and shape guidance. The verified functions tutorial, loops tutorial, output tutorial, numerical vectors tutorial, and three-file source modules walkthrough all have matching Hindi editions, including हिन्दी फ़ंक्शन ट्यूटोरियल, हिन्दी लूप ट्यूटोरियल, हिन्दी आउटपुट ट्यूटोरियल, हिन्दी वैक्टर ट्यूटोरियल, and हिन्दी मॉड्यूल ट्यूटोरियल. All examples reproduce source/output pairs from the pinned released interpreter. data/tutorial-evidence.json explicitly maps tutorial pages to the pinned conformance/manifest.json cases. scripts/check-tutorial-evidence.ts requires all 11 pinned examples to be covered exactly once and rejects missing, modified, misplaced or reordered examples in either language, including the two imported .srp source files needed by the module demo. Supporting files must exist in the pinned compiler fixture manifest. scripts/test-tutorial-evidence.ts regression-tests the matcher, including CLI command fences between a complete program and its expected stdout. npm run check:tutorial-evidence requires no network or Rust toolchain; actual program execution is still covered separately by the compiler-conformance GitHub Actions job.

The output program intentionally emits no newline after the final word: the Markdown output fence demonstrates visible text but does not encode this byte detail; the compiler-conformance job verifies actual stdout including trailing newline behavior. Tutorial evidence checks compare normalized visible fence contents; they are not substitutes for executing the compiler.

The TypeScript fixture-statistics gate (npm run check:coverage-statistics) reads the fixture manifest and detects stale English/Hindi claims about executable examples and mirrored source files. Its standalone unit tests (npm run test:coverage-statistics) also reject missing or duplicated claims. These are checked in PR CI and before Pages deployment.

The TypeScript snippet-policy gate checks all runnable scarp and shell Markdown fences for known legacy declarations and unavailable CLI commands. Historical syntax in prose and text fences is allowed; this is a narrow syntax smoke test, not a full compiler/parser replacement. The conformance job remains responsible for actually running the pinned source and verifying stdout.

A future version is not promoted automatically: change the pinned baseline only after reviewing a published release, updating the fixtures, and re-running compiler conformance.

Bilingual SEO and production quality gates

The TypeScript SEO helper scripts/scarp-site/seo.ts generates canonical URLs and reciprocal hreflang (en, hi, x-default) entries for each English/Hindi page. CI validates both the helpers and generated HTML after building the Scarp-owned engine. This catches wrong base paths, mismatched language metadata, missing output pages and incorrect Open Graph URLs rather than relying on source-text checks alone. A deployment is blocked when any source page is missing from the compiled site.

Deployment

CI validates links/content and builds the Scarp-owned TypeScript engine on pull requests. The Pages workflow runs on changes to main and on manual dispatch. In Settings → Pages, set Source to GitHub Actions. It publishes docs/.scarp/dist using GitHub's official Pages actions. The site is served from /scarp-docs/ rather than /.

Contributing

See CONTRIBUTING.md. Please propose focused changes backed by compiler implementation or tests.

Official community channels

The community page lists Scarp's GitHub, X, Facebook, LinkedIn, YouTube, Instagram, Threads, Bluesky, DEV and Reddit profiles, plus the public contact address and maintainer-provided Discord channel links. Navigation icons link to official destinations. Use maintainer-provided or independently confirmed project URLs; never link personal developer profiles as Scarp accounts.

Discord channels: #welcome and #language-development. These are channel deep links, not public server invitation URLs. Visitors may need to join the Discord server and obtain access before opening them.

Compiler-backed conformance checks

The conformance/ directory contains 11 pinned source/output pairs copied from the released Scarp compiler examples. To verify fixture integrity locally (does not require Rust):

npm run check:fixtures
npm run check:alpha2 # validate twelve alpha.2 examples across three bilingual page pairs
npm run check:tutorial-evidence # match bilingual tutorial code + stdout against published fixtures
npm run test:tutorial-evidence # unit-test source/output pairing and drift detection

To execute them, build the exact published Scarp source commit afe8b5380c9d6c4774162e51c6c9bc8b90901671 (tag v0.0.5-alpha.1), then run:

npm run test:compiler -- /absolute/path/to/scarp

On GitHub Actions, the Documentation CI workflow checks out that commit independently, first byte-compares all fixtures to the tagged compiler examples, builds the Rust interpreter offline, and finally compares actual output byte-for-byte. This is deliberately separate from Markdown/static-site validation, which does not prove a language snippet executes.

हिन्दी अनुवाद

Scarp Docs के language selector से English/Hindi बदलें। सभी documentation sections का Hindi संस्करण docs/hi/ में है। यह self-hosted, reviewed Markdown content है; external translation API की आवश्यकता नहीं। नई compiler सुविधाओं के साथ दोनों भाषाओं के pages अपडेट करें।

Reliable TypeScript deployment indicator

scripts/scarp-site/pages-api.ts implements the public GitHub Actions API parser, a bounded request timeout, validated success-count data, and English/Hindi labels. Unit tests are offline: npm run test:pages-api. The TypeScript browser indicator offers an accessible retry button, reports rate limiting without inventing a number, and always links to GitHub Actions. This is a public read-only counter; no user data or API token is sent to any additional service.

Support development

The Scarp documentation remains publicly available. If you find it useful, you can support the Scarp ecosystem on GitHub Sponsors. Sponsorship is voluntary and does not restrict access to tutorials or reference material.

GitHub Pages deployment history

Deploy official documentation

See live successful deployment count and the Hindi deployment view. The count comes from the public GitHub Actions API with a graceful fallback; it is not hardcoded. \nCurrent alpha.5 conformance: English/Hindi Top-P and Pearson examples are copied byte-for-byte from the published tag into conformance/alpha6-five/ and independently checked using their Git blob identities. Run npm run check:alpha6-five && npm run test:alpha6-five; the dedicated CI job runs the exact tagged compiler against both programs and compares stdout.\n

About

Official documentation for the Scarp Programming Language.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages