THE PRACTICAL SCARP HANDBOOK
Learn Scarp.
One real program at a time.
From your first line of code to numerical computing. Every lesson has its own page with real Scarp source, verified output, English and Hindi explanations, and a practice question.
// My first Scarp program
print("Hello from Scarp!");
Hello from Scarp!YOUR LEARNING JOURNEY
Pick up where you left off
Saved only in this browser. No account or tracking.
0 of 52 completed
FIND A TOPIC
Find your next example
Search English/Hindi lessons and real Scarp source. Filter by chapter.
Press / to focus search. Press Esc in the search box to clear both filters.
Share this search ↗Browse the chapters below. Instant search is available with JavaScript.
LEARNING PATH
Explore by chapter
Six structured chapters: read real code, answer bilingual checkpoints, then solve a coding lab.
Scarp basics
Start with the basics before tackling functions and modules.
3 self-checks · प्रश्न Explore chapter CHAPTER 02 · 4 LESSONSControl flow
Conditions are booleans; a branch body has its own scope. Loops also support break and continue.
3 self-checks · प्रश्न Explore chapter CHAPTER 03 · 4 LESSONSFunctions
Learn the current compiler's typed function declaration syntax: funcra. Function parameters and return types are explicit. A pure funcra cannot perform effects such as output.
3 self-checks · प्रश्न Explore chapter CHAPTER 04 · 12 LESSONSNumeric collections and types
Scope: the current compiler offers specialised numeric vectors, integer collections and matrix/tile operations, not a general-purpose list/map/set library.
3 self-checks · प्रश्न Explore chapter CHAPTER 05 · 5 LESSONSModules and explicit imports
Modules let a lesson separate a public API from implementation details.
3 self-checks · प्रश्न Explore chapter CHAPTER 06 · 11 LESSONSFoundations for AI-oriented programs
Scarp has early numerical primitives useful for AI-related calculations. These exercises do not claim full AI frameworks, autodiff, GPU acceleration, model training systems or agent tooling.
3 self-checks · प्रश्न Explore chapterNOW SUPPORTED IN ALPHA.4
Go beyond a single file.
Learn how the real Scarp compiler creates a project, validates its manifest without running code and launches its declared entrypoint.
Build your first project →scarp create hello-world
scarp verify hello-world
scarp launch hello-worldREPRODUCIBLE BY DESIGN
Real code. Exact output.
Every example is checked with the official compiler. This site displays examples but does not execute code inside your browser.
Target: Scarp v0.0.6-alpha.3 (prerelease) · pinned commit ceff07d9014f