H++ (Hinglish Plus Plus) 🚀
Socho Hindi mein, code karo duniya mein!
H++ ek interpreter-based programming language hai jisme Hinglish aur English keywords dono milte hain. Indian developers ke liye banai gayi, jisse aap apni bhasha mein soch kar code likh sakein.
What is H++?
H++ ek friendly language hai jo:
- Hindi-style syntax provide karti hai
.hppfiles seedha run karti hai- string interpolation
${...}support karti hai - classes, functions, loops, aur error handling offer karti hai
- built-in modules
Ganit,Faail,Samay,Jaaldeti hai
Installation
pip install hplusplus
hpp --version
Local development:
pip install -e .
hpp examples/hello.hpp
Quick Start
examples/hello.hpp:
shuru karo {
bol("Namaste duniya!")
}
Run:
hpp examples/hello.hpp
Syntax Guide
Variables
rakho naam = "Aashu"
pakka PI = 3.14
rakho: variablepakka: constant
bol("Namaste!")
bol("Naam: ${naam}")
If / Else
agar (umar >= 18) {
bol("Adult")
} warna {
bol("Minor")
}
Loops
chakkar (rakho i = 1; i <= 5; i++) {
bol(i)
}
jabtak (n < 3) {
bol(n)
n = n + 1
}
Functions
kaam jodo(a, b) {
wapas a + b
}
bol(jodo(2, 3))
Classes
parivaar Student {
banao(naam) {
yeh.naam = naam
}
hello() {
wapas "Namaste " + yeh.naam
}
}
rakho s = naya Student("Aashu")
bol(s.hello())
Error Handling
koshish karo {
phenko "Kuch galat hua"
} pakdo (e) {
bol("Pakda: ${e}")
}
String Interpolation
rakho naam = "Aashu"
rakho umar = 21
bol("Mera naam ${naam} hai aur umar ${umar} saal")
List Methods
rakho nums = [3, 1, 4]
nums.jodo(9)
bol(nums.lambai)
nums.sajaao()
bol(nums.milaao(", "))
Common list methods: jodo, hatao, chhano, badlo, dhundho, milaao, sajaao, ulta_karo, hai_andar, lambai.
String Methods
rakho msg = " Namaste H++ "
bol(msg.saaf_karo())
bol(msg.BADA_KARO())
bol(msg.chhota_karo())
Common string methods: lambai, BADA_KARO, chhota_karo, saaf_karo, kaat_do, hai_andar, kahan_hai, badal_do, shuru_hota_hai, khatam_hota_hai.
Modules
Modules are available globally without import.
bol(Ganit.sqrt(16))
bol(Ganit.PI)
Faail.likho("demo.txt", "Namaste")
bol(Faail.padho("demo.txt"))
rakho abhi = Samay.abhi()
bol(abhi.sundar())
bol(Jaal.JSON.parse("{\"a\": 1}").a)
Available modules:
Ganit: math utilitiesFaail: file utilitiesSamay: date/time utilitiesJaal: HTTP and JSON utilities
Examples
1. FizzBuzz
shuru karo {
chakkar (rakho i = 1; i <= 30; i++) {
agar (i / 15 == Ganit.podha(i / 15)) {
bol("FizzBuzz")
} warna agar (i / 3 == Ganit.podha(i / 3)) {
bol("Fizz")
} warna agar (i / 5 == Ganit.podha(i / 5)) {
bol("Buzz")
} warna {
bol(i)
}
}
}
2. File Read / Write
shuru karo {
Faail.likho("note.txt", "Namaste H++")
Faail.jodo("note.txt", "\nDusri line")
rakho content = Faail.padho("note.txt")
bol(content)
Faail.mitao("note.txt")
}
3. Class Example
parivaar BankAccount {
banao(owner, balance) {
yeh.owner = owner
yeh.balance = balance
}
jama(amount) {
yeh.balance = yeh.balance + amount
wapas yeh.balance
}
}
shuru karo {
rakho acc = naya BankAccount("Aashu", 1000)
bol("Balance: ${acc.jama(500)}")
}
VS Code Extension
Local install:
cd vscode-hpp
npm install -g @vscode/vsce
vsce package
code --install-extension hplusplus-1.0.0.vsix
Contributing
- Fork the repository.
- Create a branch.
- Add examples, fixes, or docs.
- Open a pull request.
License
MIT License
After installing, .hpp files get syntax highlighting, snippets, bracket behavior, and comment toggling.
Contributing
Contributions welcome hain. Aap:
- Bugs report kar sakte ho
- Examples add kar sakte ho
- Parser/interpreter features improve kar sakte ho
- VS Code extension polish kar sakte ho
Development loop:
pip install -e .
python main.py examples/hello.hpp
python main.py examples/classes.hpp
python main.py examples/ganit_test.hpp
License
MIT
Metadata
Release files for hinglish-plus-plus 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hinglish_plus_plus-1.0.0.tar.gz | 21.9 kB | Without provenance | Details for hinglish_plus_plus-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hinglish_plus_plus-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for hinglish_plus_plus-1.0.0-py3-none-any.whl |
Total release size: 46.4 kB
Release files / hinglish_plus_plus-1.0.0.tar.gz
| Download URL | hinglish_plus_plus-1.0.0.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e121c1eabd08824d18d4246ca7ee6fd4607a2bfda86637874e293b14d565f497
|
|
BLAKE2b-256 checksum How to use checksums |
da314fa06ba1f9dcf8b195c13d409e76f3889232fb95708e51b2be8dcff19653
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / hinglish_plus_plus-1.0.0-py3-none-any.whl
| Download URL | hinglish_plus_plus-1.0.0-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b48971d542e77b2986b99d3828a16e837692acf48b3567d9a85f2f39fec8b04
|
|
BLAKE2b-256 checksum How to use checksums |
51812d86dd5c013abe5e79b5a3d8c8bf7849105da04c8f46b089c0c2d75200bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for hinglish-plus-plus 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.