PaniniVM — A Natural Programming Language Built on Sanskrit Grammar

56 views
Skip to first unread message

Kaushal Kumar Singh

unread,
Aug 29, 2026, 4:54:33 PMAug 29
to sanskrit-programmers

Namaste,

I’m Kaushal, and I have been developing PaniniVM, an open-source natural programming language where morphologically segmented Sanskrit can be written and executed as source code.

Rather than simply replacing programming keywords with Sanskrit words, PaniniVM attempts to make Sanskrit grammar itself part of the programming model. Dhātus express operations, while kārakas, vibhaktis and morphological relationships help determine how values participate in those operations.

For example:

द्वि + अम् त्रि + अम् च युज् + णिच् + लोट् + सिप् ।

The system analyzes the Sanskrit grammatical structure, resolves the corresponding operation and arguments, and executes it.

The language currently includes features such as arithmetic and collections, conditions, repetition, reusable Sanskrit kriyās/functions, state and result binding, multi-file programs, and compilation to JVM bytecode.

Underneath the programming language is a computational Pāṇinian grammar engine. One aspect I am currently refining is the derivation trace: instead of showing only sūtras that modify a form, the engine can expose rules that become applicable during the derivation and how rule interactions determine which ones ultimately operate. My goal is to make this reasoning clearer as:

Matched → Considered → Blocked/Superseded → Applied → Result

I believe this creates an interesting intersection between Sanskrit grammar, programming-language design, computational linguistics and Sanskrit education.

The project is open source, and I would greatly appreciate your feedback, criticism, or suggestions.

PaniniVM:
https://panini.cc/

GitHub:
https://github.com/kaushalbx/PaniniVM

ANTLR Sanskrit grammar:
https://github.com/kaushalbx/PaniniVM/tree/master/parser/src/main/antlr/dev/panini/vyakaranam

Article — Natural Programming Language with Sanskrit Grammar:
https://medium.com/@kaushalbx/p%C4%81%E1%B9%87inivm-building-a-natural-programming-language-with-sanskrit-grammar-aa82b855074c

Technical article — Pāṇinian Grammar as an Executable Engine:
https://medium.com/@kaushalbx/building-p%C4%81%E1%B9%87inivm-compiling-2-500-year-old-paninian-grammar-into-an-executable-kotlin-engine-5a6bb8de20fb

Reddit discussion:
https://www.reddit.com/r/Compilers/comments/1vqm8c9/can_sanskrit_work_as_a_natural_programming/

I would be very interested to hear your thoughts on this approach and would be happy to discuss the project in more detail.

Regards,
Kaushal
PaniniVM
https://panini.cc/

हरिः व्योम

unread,
Aug 29, 2026, 8:28:41 PMAug 29
to sanskrit-p...@googlegroups.com
This is excellent. Thanks for sharing. I need to learn a lot about this project. I was thinking something like must be created.




--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sanskrit-programmers/06b80c0c-916f-4793-a908-cba3d0ee551en%40googlegroups.com.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Aug 30, 2026, 1:12:36 AMAug 30
to sanskrit-p...@googlegroups.com


On Sun, 30 Aug 2026 at 02:24, Kaushal Kumar Singh <kaus...@gmail.com> wrote:


PaniniVM:
https://panini.cc/


getting a blank page here.

Kaushal Kumar Singh

unread,
Aug 30, 2026, 1:18:00 AMAug 30
to sanskrit-p...@googlegroups.com
Are you using older device ? If so try again or try on other devices.

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.

Anunad Singh

unread,
Aug 30, 2026, 2:02:49 AMAug 30
to sanskrit-p...@googlegroups.com
But I could find and try most of the tools (Firefox browser, not quite updated).



Kaushal Kumar Singh

unread,
Aug 30, 2026, 4:15:12 AMAug 30
to sanskrit-p...@googlegroups.com
The website works on wasm and those browser who does not support wasm javascript fallback is there.
Please share the error.


विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Aug 30, 2026, 5:39:30 AMAug 30
to sanskrit-p...@googlegroups.com
Chrome Version 149.0.7827.155 (Official Build) (64-bit)
originWasmWebApp.js:2 Uncaught RuntimeException: Exception while trying to handle coroutine exception
    at kotlin.createJsError (https://panini.cc/originWasmWebApp.js:2:314130)
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[1846]:0x20a458
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[1969]:0x20c212
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[1965]:0x20c15c
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2528]:0x2242ac
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2527]:0x22427f
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2460]:0x2220e3
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2596]:0x225c91
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2620]:0x226e7a
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2619]:0x226bd7
    Suppressed: kotlin.js.JsException: Cannot read properties of undefined (reading 'getParameter')
    TypeError: Cannot read properties of undefined (reading 'getParameter')
        at ot (https://panini.cc/originWasmWebApp.js:2:103985)
        at https://panini.cc/6e23e5428398b92da386.wasm:wasm-function[10689]:0x41421c
        at https://panini.cc/6e23e5428398b92da386.wasm:wasm-function[389]:0x1c734
        at Dr (https://panini.cc/originWasmWebApp.js:2:249683)
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[8824]:0x32f26e
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[8834]:0x32ff14
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2807]:0x22f0e4
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2800]:0x22ecc3
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2801]:0x22ed46
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2806]:0x22ef50
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.BroadcastFrameClock@1203833204, androidx.compose.runtime.LaunchedEffectImpl@1870875702, StandaloneCoroutine{Cancelling}@716690687, FlushCoroutineDispatcher@1284450976]
    DiagnosticCoroutineContextException: [androidx.compose.runtime.BroadcastFrameClock@1203833204, androidx.compose.runtime.LaunchedEffectImpl@1870875702, StandaloneCoroutine{Cancelling}@716690687, FlushCoroutineDispatcher@1284450976]
        at kotlin.createJsError (https://panini.cc/originWasmWebApp.js:2:314130)
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[1846]:0x20a458
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[1847]:0x20a497
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[1968]:0x20c1e4
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[1964]:0x20c12b
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[3013]:0x2371cf
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2527]:0x224282
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2460]:0x2220e3
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2596]:0x225c91
        at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2620]:0x226e7a
Caused by: kotlin.js.JsException: Cannot read properties of undefined (reading 'getParameter')
TypeError: Cannot read properties of undefined (reading 'getParameter')
    at ot (https://panini.cc/originWasmWebApp.js:2:103985)
    at https://panini.cc/6e23e5428398b92da386.wasm:wasm-function[10689]:0x41421c
    at https://panini.cc/6e23e5428398b92da386.wasm:wasm-function[389]:0x1c734
    at Dr (https://panini.cc/originWasmWebApp.js:2:249683)
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[8824]:0x32f26e
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[8834]:0x32ff14
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2807]:0x22f0e4
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2800]:0x22ecc3
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2801]:0x22ed46
    at https://panini.cc/bc13b1ea5d02e69d35e1.wasm:wasm-function[2806]:0x22ef50




--
--
Vishvas /विश्वासः

Kaushal Kumar Singh

unread,
Aug 30, 2026, 6:06:17 AMAug 30
to sanskrit-p...@googlegroups.com
This seems to be a Kotlin Multiplatform/WebAssembly (Wasm) compatibility issue with the web version, likely related to the browser or its WebGL/Wasm support. I’m working on improving compatibility.

In the meantime, I also have an Android version of Panini available for closed testing on Google Play.

Could you share the email address associated with your Google Play account? I can add you to the closed-testing group so you can install and try the Android app:


Thanks for reporting the issue!

Reply all
Reply to author
Forward
0 new messages