Official website

Quick search

Search pages in English or हिंदी. Detailed language reference is in Scarp Docs.

Top 6 website pages

Learn Scarp · Getting started

Your first Scarp program.

Start Scarp with version-specific interpreter commands, verified examples, and links to the official English and Hindi guides.

Scarp is an experimental interpreter. Start by choosing a matching release, rather than mixing commands from different prereleases. The latest reviewed published release is v0.0.6-alpha.3. The older v0.0.5-alpha.1 version remains the baseline for the homepage examples and some documentation.

01 · Get the interpreter

  1. Download the v0.0.6-alpha.3 archive for Windows x64, Linux x64 GNU or Apple Silicon macOS.
  2. Download its .sha256 file, compare the digest with the published checksum and extract the archive only after verification succeeds.
  3. Open a terminal in the extracted folder and confirm the version:
    Terminal
    scarp version
    Run the local executable as ./scarp on Linux/macOS or .\\scarp.exe on Windows PowerShell if it is not in your PATH. The commands below use scarp for readability.

Keep the archive's bundled files together. The published package is an interpreter, not an installer or a native-code compiler. Building from source is also possible using the exact published Rust source.

02 · Write and run hello.srp

Save a UTF-8 text file named hello.srp in the current folder:

hello.srp
print("Hello from Scarp!");

With v0.0.6-alpha.3, statically check the source and then execute it:

Terminal · published alpha.6
scarp verify hello.srp
scarp exec hello.srp

Expected output when executed:

stdout
Hello from Scarp!

verify checks source without executing normal runtime statements; exec runs the interpreter. A successful static check does not guarantee that runtime operations will succeed.

03 · Create an offline project

Starting with alpha.4, Scarp can create a small project with an explicit Scarp.project manifest. Choose a destination that does not already exist:

Terminal · published alpha.6
scarp create hello-world
scarp verify hello-world
scarp launch hello-world

Project verification is static; launch executes the declared entrypoint. No package registry, dependency resolution, installer, or native executable is produced. See the release-pinned project workflow.

04 · Explore alpha.6-only tools

v0.0.6-alpha.3 adds opt-in, read-only symbol and reference indexes. These commands type-check source without executing ordinary statements; they are not an integrated language server:

Terminal · alpha.6
scarp inspect symbols --json hello.srp
scarp inspect references --json hello.srp

The same release adds rms(vector) for finite, nonempty numerical vectors. This example is separately tested in website CI against the published alpha.6 interpreter:

rms.srp · alpha.6 only
print(rms([2.0, -2.0]));
Expected stdout
2.0

See the exact tested fixture scope and symbol-index reference. Do not run alpha.6-only examples with the older alpha.1 interpreter.

05 · Rank scores in alpha.6.3

The published v0.0.6-alpha.3 interpreter also supports pure topk, topk_values, softmax_temp and logsoftmax_temp numerical built-ins. Tie scores keep earlier input indices first; temperature must be a positive finite float. No random sampling or GPU runtime is included.

topk.srp · published alpha.6.3
bind scores = [1.0, 5.0, 5.0, -2.0, 3.0];
print(topk(scores, 3));
print(topk_values(scores, 3));
Expected stdout
[integer: 1, 2, 4]
[5.0, 5.0, 3.0]

This follows the exact alpha.6.3 release examples. Read the published-only fixture evidence before assuming code works on an older compiler.

Using the older website example baseline?

The featured homepage examples are pinned to v0.0.5-alpha.1. Under that older interpreter, use these historical commands instead:

Terminal · historical alpha.1
scarp run hello.srp
scarp check hello.srp

Legacy check can evaluate selected program paths while suppressing output. It is not equivalent to the later static-only verify. Consult the version-by-version migration guide.

Choose what to learn next

GoalOfficial resource
First Scarp programFirst-program guide
Language syntaxLanguage overview
Typed functionsFunction reference
Numerical foundationsNumerics guide
Multiple source filesSource modules
हिंदी में सीखेंहिंदी दस्तावेज़

The documentation website may use an older compiler baseline: read each guide's version notes before copying its commands into the latest prerelease.