Rampyaaryan

India's First Hinglish Programming Language

v3.5.2 Pure C99 Cross-Platform 220+ Functions Rampyaaryan License

Write code in the language you think in. No Python. No Node.js. No dependencies. Just one native binary.

likho "🙏 Namaste Duniya!"

maano naam = poocho("Aapka naam: ")
likho "Swagat hai, " + naam + " ji!"

kaam factorial(n) {
    agar n <= 1 { wapas do 1 }
    wapas do n * factorial(n - 1)
}

likho format("10! = {}", factorial(10))

Download

All downloads & portable binaries →


Features

Pure C (C99)

Compiles to a single native binary. Zero runtime dependencies. Blazing fast.

Hinglish Syntax

Keywords in Hindi-English — maano, likho, agar, kaam. Think in Hindi, code in Hindi.

Bytecode VM

Stack-based virtual machine with 44 opcodes. Pratt parser compiles source to efficient bytecode.

Garbage Collector

Tri-color mark-sweep GC with automatic heap management. No manual memory management.

Closures & First-Class Functions

Full lexical scoping with upvalue capture. Pass functions as arguments.

Dynamic Lists

Built-in arrays with 23 operations: sort, slice, search, statistics, flatten, chunk, rotate.

Dictionaries / Maps

Key-value {key: value} syntax with 9 map functions for data modeling.

Rich String Library

27 string functions: split, join, format, replace, trim, title_case, pad, and more.

Math & Science

37 functions: trigonometry, logarithms, factorial, prime checking, Fibonacci, random ops.

Higher-Order Functions

naksha (map), chhaano (filter), ikkatha (reduce), zip, enumerate, and more.

File I/O

Read, write, append files. Check file existence. Build real applications.

Interactive REPL

Multiline editing, syntax colors, command history, helpful error messages in Hinglish.


Quick Start

Prerequisites: A C compiler (GCC, Clang, or MSVC). That's it.
# Clone the repository
git clone https://github.com/Rampyaaryans/rampyaaryan.git
cd rampyaaryan

# Build (pick one)
make                                # GNU Make
gcc -O2 -o rampyaaryan src/*.c -lm  # Direct GCC

# Run a program
./rampyaaryan examples/01_namaste_duniya.ram

# Or start the REPL
./rampyaaryan
Tip: Check the Getting Started page for platform-specific instructions (Windows, Linux, macOS).

What You Can Build

# A mini student database using maps and lists
maano students = []

kaam add_student(naam, marks, city) {
    maano s = {"naam": naam, "marks": marks, "city": city}
    joodo(students, s)
}

add_student("Arjun", 92, "Delhi")
add_student("Priya", 88, "Mumbai")
add_student("Rahul", 95, "Pune")

# Filter toppers using higher-order functions
kaam is_topper(s) { wapas do s["marks"] >= 90 }
maano toppers = chhaano(students, is_topper)
likho format("Toppers: {}", toppers)

Documentation


Architecture

Rampyaaryan Compilation & Execution Pipeline — Source Code → Lexer → Compiler → VM → Output
ComponentTechnology
LanguagePure C (C99 standard)
ParserPratt parser (precedence climbing)
VMStack-based bytecode virtual machine
GCTri-color mark-sweep garbage collector
HashingFNV-1a, open-addressing hash table
StringsInterned for O(1) comparison

Keyword Quick Reference

RampyaaryanEnglishUsage
maanolet / varVariable declaration
likhoprintOutput to console
poochoinputRead from user
agarifCondition
warna agarelse ifElse-if branch
warnaelseElse branch
jab takwhileWhile loop
harforFor loop
kaamfunctionFunction definition
wapas doreturnReturn value
rukobreakBreak loop
aglacontinueSkip iteration
sachtrueBoolean true
jhoothfalseBoolean false
khalinullNull value
aurandLogical AND
yaorLogical OR
nahinotLogical NOT

145 Built-in Functions at a Glance

Type Conversion & Checking 16

prakar sankhya shabd purn dashmlav bool_val kya_sankhya kya_shabd kya_suchi kya_kaam kya_bool kya_khali kya_purn kya_map typeof_val print_type

Strings 27

lambai bade_akshar chhote_akshar title_case capitalize swapcase kato dhundho badlo todo jodo_shabd saaf center pad_left pad_right shuru_se ant_se dohrao akshar ascii_code ascii_se format gino kya_ank kya_akshar kya_alnum kya_space

Lists 23

joodo nikalo kram ulta suchi range_ shamil index_of katao pahla aakhri milao daalo anokha jod ausat sabse_bada sabse_chhota flatten tukda ghuma copy_suchi khali_karo

Math & Science 37

abs_val gol upar neeche sqrt_val power_val bada chhota sin_val cos_val tan_val log_val PI E gcd lcm factorial kya_prime fib hypot_val random_int and more…

Higher-Order 7

naksha chhaano ikkatha sab koi jodi_banao ginati_banao

Maps / Dicts 9

shabdkosh chabi mulya jodi map_hai map_get map_hatao map_milao map_lambai

View Full API Reference →


Project Structure

rampyaaryan/
├── src/
│   ├── common.h         — Common includes & config
│   ├── memory.h/c       — Memory allocator & GC
│   ├── value.h/c        — Value types (number, bool, null, obj)
│   ├── object.h/c       — Heap objects (string, function, list, map)
│   ├── table.h/c        — Hash table implementation
│   ├── chunk.h/c        — Bytecode chunks
│   ├── lexer.h/c        — Tokenizer (Hinglish keywords)
│   ├── compiler.h/c     — Pratt parser + bytecode emitter
│   ├── vm.h/c           — Virtual Machine
│   ├── native.h/c       — Built-in functions (145)
│   ├── debug.h/c        — Bytecode disassembler
│   ├── ascii_art.h/c    — Terminal animations
│   └── main.c           — CLI entry point & REPL
├── examples/            — 20 example .ram programs
├── docs/                — Documentation website
├── Makefile             — GNU Make build
├── CMakeLists.txt       — CMake build
├── LICENSE              — Rampyaaryan License
└── README.md            — Project overview