Catalog PyPI
PACKAGE EXPLORERView in registry

adesha

PyPI

A Sanskrit programming language — from Pāṇini to silicon.

devanagarieducationinterpreterpaniniprogramming-languagesanskrit
Versions collected1
Direct dependencies0From release 0.1.0
Last observed20 Oct, 19:26 UTC

README

Version 0.1.0 documentation

Ādeśa (आदेश)

A Sanskrit programming language — from Pāṇini to silicon.

Ādeśa ("command") is a small interpreted language whose keywords are real Sanskrit imperatives, written in the pure-ASCII Harvard-Kyoto convention so they type on any keyboard. When you write vada you are writing वद — the loṭ lakāra imperative "Speak!" — and the machine obeys.

$ python adesha.py
Ādeśa shell (Harvard-Kyoto) — type 'samApti' to quit.
>> vada namaste lokAH
namaste lokAH
>> punaH tri vada punarukti
punarukti
punarukti
punarukti

punaH tri — "again, three times." Numbers can be Sanskrit words (eka, dvi, tri, … aSTottarazata = 108) or digits; both work everywhere.

Why Sanskrit?

Not decoration — lineage. Pāṇini's Aṣṭādhyāyī (~500 BCE) is a formal generative grammar of ~4,000 ordered rewrite rules with meta-rules and context-sensitive transformations — structurally the same device as the BNF notation that defines modern programming languages (computer scientists sometimes call it the Pāṇini–Backus form). Piṅgala's Chandaḥśāstra (~200 BCE) encoded poetic meter as sequences of light (laghu) and heavy (guru) syllables — a binary notation, two millennia early. Sanskrit is arguably the only human language that was formally specified, the way programming languages are. Ādeśa is built on that inheritance: Sanskrit structure and vocabulary — never a claim that the machine "understands" Sanskrit meaning.

The language in one screen

# lesson0_final.adesha — my first program
sthApaya nama rAma          # "establish!"  — set a variable
vada namaste nama           # "speak!"      — print (namaste rAma)

yadi nama == rAma           # "if"
    vada sAdhu              # blocks end with iti ("thus")
anyathA                     # "otherwise"
    vada anyat
iti

vidhi ghata n               # "procedure"  — define a function
    yadi n <= eka
        dehi 1              # "give!"      — return a value
    iti
    dehi n * ghata(n - 1)
iti
gaNaya ghata(paJca)         # "compute!"   — 120 (recursion works)

samUha s                    # "collection" — make a list
yojaya s Adi                # "join!"      — append
vada s[eka]                 # 1-based indexing: eka is the first element

mudrA nama                  # "seal!"      — 108-bit integrity fingerprint

Booleans are satya/asatya. Logic is ca/vA/na (and/or/not). Errors speak both languages with a numbered doSa code, a line number, and a did-you-mean:

>> vad namaste
doSa-001: ajYAta Adeza 'vad' (did you mean: vada?) — unknown command 'vad' (did you mean: vada?)

Every keyword is registered in three spellings: Harvard-Kyoto canonical (sthApaya), lowercase (sthapaya), and Devanagari (स्थापय).

Sealed scripts

adesha seal file.adesha stamps a script with its own fingerprint footer; adesha parIkSA file.adesha later answers siddha (intact, exit 0) or bhraSTa (tampered, exit 1). Like a wax seal on a letter — tamper-evident homework, lesson files, and documents.

Two layers, honestly labeled

Ādeśa is a two-layer stack:

  • adesha/ — the high-level language (this repo, fully self-contained, Python stdlib only).
  • aos_asm.py — a low-level layer whose FOLD/lane operations mirror a private RNS chip design (the A0S project). It runs here on a software model. The chip-true lane_residue() in this repo was verified against the chip's RTL by co-simulation: 1,000/1,000 randomized inputs agree bit-for-bit across the built-in mirror, the verified golden model, and the Verilog core under Icarus Verilog — see tests/reports/c2_parity_report.md. The chip design itself is not in this repo, and nothing here requires it.

Two different numbers, two different jobs: mudrA is a 108-bit software integrity fingerprint (mod M107); the chip lane residue (mod 12289) reflects Harvard-Kyoto prosodic weight and is deliberately not an integrity primitive.

Try it

git clone https://github.com/ayushbhoi08-lab/adesha.git
cd adesha
python adesha.py                       # REPL
python adesha.py examples/zloka_mudra.adesha   # seal a Bhagavad Gītā verse
python adesha.py --trace run examples/function.adesha  # watch it execute
python -m pytest tests -q              # the test suite

The browser playground (Pyodide, zero install) lives in playground/ — serve it with python -m http.server from that folder, or open it directly at https://ayushbhoi08-lab.github.io/adesha/.

New to programming? Start with Lesson Zero — five steps that teach one programming concept and one real Sanskrit grammar note at a time.

Status

Active, early, and honest about it. The language core (tokenizer, expression parser, blocks, functions with recursion, lists, dual-language errors, seal/verify CLI) is complete and tested. On the roadmap: a sandhi-based macro layer (Pāṇini's own mechanism as a language feature), an aṣṭa-dik turtle for teaching, and offline Sanskrit voice commands. This project makes no claims of natural-language understanding, translation, or NLP.

License

Apache-2.0

Downloads & popularity

1downloads
1-day window · source-reported counts19 Oct 2026
73.50
2026-07-22: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-07-22–2026-07-222026-07-23: 4 · observed 2026-10-20T19:58:31.5692898Z · period 2026-07-23–2026-07-232026-07-25: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-07-25–2026-07-252026-07-26: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-07-26–2026-07-262026-07-27: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-07-27–2026-07-272026-08-01: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-02–2026-08-022026-08-03: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-03–2026-08-032026-08-06: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-06–2026-08-062026-08-09: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-09–2026-08-092026-08-13: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-13–2026-08-132026-08-14: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-14–2026-08-142026-08-17: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-17–2026-08-172026-08-20: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-20–2026-08-202026-08-23: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-23–2026-08-232026-08-24: 7 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-24–2026-08-242026-08-28: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-28–2026-08-282026-08-31: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-08-31–2026-08-312026-09-01: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-01–2026-09-012026-09-07: 5 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-07–2026-09-072026-09-09: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-09–2026-09-092026-09-12: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-12–2026-09-122026-09-14: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-14–2026-09-142026-09-16: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-16–2026-09-162026-09-19: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-19–2026-09-192026-09-24: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-24–2026-09-242026-09-26: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-26–2026-09-262026-09-27: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-27–2026-09-272026-09-28: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-28–2026-09-282026-09-29: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-29–2026-09-292026-09-30: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-09-30–2026-09-302026-10-01: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-01–2026-10-012026-10-02: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-02–2026-10-022026-10-06: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-06–2026-10-062026-10-08: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-08–2026-10-082026-10-09: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-09–2026-10-092026-10-10: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-10–2026-10-102026-10-11: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-11–2026-10-112026-10-13: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-13–2026-10-132026-10-17: 3 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-17–2026-10-172026-10-18: 2 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-18–2026-10-182026-10-19: 1 · observed 2026-10-20T19:58:31.5692898Z · period 2026-10-19–2026-10-19
22 Jul19 Oct

pypistats · 42 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-19 – 2026-10-1912026-10-20T19:58:31.5692898Z
2026-10-18 – 2026-10-1822026-10-20T19:58:31.5692898Z
2026-10-17 – 2026-10-1732026-10-20T19:58:31.5692898Z
2026-10-13 – 2026-10-1322026-10-20T19:58:31.5692898Z
2026-10-11 – 2026-10-1132026-10-20T19:58:31.5692898Z
2026-10-10 – 2026-10-1012026-10-20T19:58:31.5692898Z
2026-10-09 – 2026-10-0912026-10-20T19:58:31.5692898Z
2026-10-08 – 2026-10-0822026-10-20T19:58:31.5692898Z
2026-10-06 – 2026-10-0632026-10-20T19:58:31.5692898Z
2026-10-02 – 2026-10-0212026-10-20T19:58:31.5692898Z
2026-10-01 – 2026-10-0112026-10-20T19:58:31.5692898Z
2026-09-30 – 2026-09-3022026-10-20T19:58:31.5692898Z
2026-09-29 – 2026-09-2912026-10-20T19:58:31.5692898Z
2026-09-28 – 2026-09-2822026-10-20T19:58:31.5692898Z
2026-09-27 – 2026-09-2722026-10-20T19:58:31.5692898Z
2026-09-26 – 2026-09-2612026-10-20T19:58:31.5692898Z
2026-09-24 – 2026-09-2422026-10-20T19:58:31.5692898Z
2026-09-19 – 2026-09-1922026-10-20T19:58:31.5692898Z
2026-09-16 – 2026-09-1622026-10-20T19:58:31.5692898Z
2026-09-14 – 2026-09-1412026-10-20T19:58:31.5692898Z
2026-09-12 – 2026-09-1232026-10-20T19:58:31.5692898Z
2026-09-09 – 2026-09-0912026-10-20T19:58:31.5692898Z
2026-09-07 – 2026-09-0752026-10-20T19:58:31.5692898Z
2026-09-01 – 2026-09-0122026-10-20T19:58:31.5692898Z
2026-08-31 – 2026-08-3132026-10-20T19:58:31.5692898Z
2026-08-28 – 2026-08-2812026-10-20T19:58:31.5692898Z
2026-08-24 – 2026-08-2472026-10-20T19:58:31.5692898Z
2026-08-23 – 2026-08-2332026-10-20T19:58:31.5692898Z
2026-08-20 – 2026-08-2012026-10-20T19:58:31.5692898Z
2026-08-17 – 2026-08-1722026-10-20T19:58:31.5692898Z
2026-08-14 – 2026-08-1432026-10-20T19:58:31.5692898Z
2026-08-13 – 2026-08-1322026-10-20T19:58:31.5692898Z
2026-08-09 – 2026-08-0912026-10-20T19:58:31.5692898Z
2026-08-06 – 2026-08-0632026-10-20T19:58:31.5692898Z
2026-08-03 – 2026-08-0332026-10-20T19:58:31.5692898Z
2026-08-02 – 2026-08-0212026-10-20T19:58:31.5692898Z
2026-08-01 – 2026-08-0112026-10-20T19:58:31.5692898Z
2026-07-27 – 2026-07-2722026-10-20T19:58:31.5692898Z
2026-07-26 – 2026-07-2612026-10-20T19:58:31.5692898Z
2026-07-25 – 2026-07-2512026-10-20T19:58:31.5692898Z
2026-07-23 – 2026-07-2342026-10-20T19:58:31.5692898Z
2026-07-22 – 2026-07-2222026-10-20T19:58:31.5692898Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.05 Jul 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ayushbhoi08-lab/adesha

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2277debedfdd87a404ff845101d8cce3c7a5b95a58bbf96caf23ad3cd564a34f