A Devanagari-first, Sanskrit-native programming language
कारक॥
Sanskrit should not merely change the spelling of code. It should change the shape of computation.
कर्ता कर्मणि क्रियां करोति। नियमः फलं ददाति। प्रमाणेन व्याख्यायते॥
त्रीणि तत्त्वानि · three ideas
The calling convention comes from grammar॥
Pāṇini catalogued the six कारक — the semantic roles a noun can play in an action — about 2,400 years before W3C PROV rediscovered agent/activity/entity. Karaka makes those roles the calling convention, and three things follow. Each panel below is live: edit it, run it.
षट् कारकाणिRoles, not positions
In a conventional language, transfer(a, b, 500) trusts your memory of the signature. Here the ablative अपादानम् (from) and dative सम्प्रदानम् (to) are checked at the call site, forever. You cannot swap the arguments without lying about the roles.
कर्ता agent · कर्म object · करणम् instrument · सम्प्रदानम् recipient · अपादानम् source · अधिकरणम् locus
नियमः प्रमाणं चDecisions carry their evidence
A नियमः does not return a boolean. It returns अनुमतम् (permitted), निषिद्धम् (forbidden), or अनिश्चितम् (indeterminate), and accumulates प्रमाणम् — evidence — on the way. Policy code stops reinventing this per project; XACML's permit/deny/indeterminate falls out of the grammar.
अभिलेखःThe audit log is structural
Because no meaningful action can run without stating its roles, the execution trace already knows who acted, on what, under which rule, with what evidence. Run this one and watch the अभिलेख write itself in, line by line, indented by call depth — the scribe at work.
अनुवर्णनम् · transliteration
No Devanagari keyboard? Type Latin॥
The editor, the playground, and the CLI all ship an ITRANS-style input method: type a word in Latin, press space, and it becomes Devanagari. Try it — kartaa becomes कर्ता.
आरम्भः · getting started
The same core, everywhere॥
One Rust core runs the CLI, the REPL, and this site's WebAssembly playground. Pass --अभिलेख and any program explains itself. Prefer to stay in the browser? यात्रा आरभ्यताम् — start the tour.
$ cargo install --path crates/karaka-cli
$ karaka run program.karaka
$ karaka run program.karaka --अभिलेख # with the audit trace
$ karaka repl