- Korean keywords के साथ लिखा जाने वाला static type वाला compiled language है, जो LLVM IR के माध्यम से native binary बनाता है
- Rust में implement किया गया compiler और interpreter दोनों देता है, और
hgl CLI के जरिए build·run·REPL·LSP features को support करता है
hamsu, manyak, banbok, byeonsu जैसे सभी keywords Korean में हैं, और variable names व function names भी Korean में define किए जा सकते हैं
- file I/O, JSON, HTTP, regex, date/time, system calls जैसी practical features built-in हैं, और 18 examples शामिल हैं
- Hangul की वैज्ञानिक संरचना और सांस्कृतिक प्रसार को programming language में लागू करके, Korean सीखने और coding को जोड़ने की नई कोशिश के रूप में ध्यान खींचता है
Han भाषा का अवलोकन
- Han एक Korean keywords के साथ लिखा जाने वाला static type compiled language है, जो LLVM IR के जरिए native binary बनाता है
- इसमें Rust में लिखा गया compiler toolchain और tree-walking interpreter शामिल है
hgl कमांड से interpreter चलाना, build करना, REPL और LSP server चलाना संभव है
- सभी keywords Korean में हैं, उदाहरण:
hamsu, manyak, banbok, byeonsu, chulryeok आदि
- Hangul की वैज्ञानिक लिपि संरचना को programming language में लागू करके, भाषाई सुंदरता और तकनीकी सटीकता के संयोजन को लक्ष्य बनाया गया है
मुख्य फीचर्स
- Korean keywords और identifiers support: variable names, function names, struct names आदि Korean में लिखे जा सकते हैं
- Static type system:
jeongsu, silsu, munjayeol, bul, eopseum के 5 basic types देता है
- Compile और interpreter modes: LLVM IR → clang → binary generation या immediate execution
- REPL और LSP server:
hgl repl, hgl lsp कमांड से interactive execution और code completion support
- Built-in features
- arrays, structs, closures, pattern matching, exception handling, generics
- file I/O, JSON, HTTP, regex, date/time, system calls
- format strings, hash maps, built-in math functions
- 18 example programs शामिल: Hello World, HTTP API calls आदि
इंस्टॉलेशन और निष्पादन
- ज़रूरी dependencies: Rust(1.70+), clang
- installation steps
- VS Code extension उपलब्ध: syntax highlighting और LSP support
- CLI commands
hgl interpret <file.hgl> — interpreter चलाएँ
hgl build <file.hgl> — native binary compile करें
hgl run <file.hgl> — compile करने के बाद तुरंत चलाएँ
hgl repl — interactive mode
hgl lsp — LSP server चलाएँ
मौजूदा implementation स्थिति
- पूरी तरह काम करने वाले features
- data types, control flow, functions, strings, arrays, hash maps, structs, error handling, type checking
- JSON, HTTP, regex, date/time, system, file I/O, math functions, modules, generics
- आंशिक रूप से implemented features
hgl build में closures·strings·array methods के लिए code generation अभी अधूरा है
- अभी implement न किए गए features
- Null safety (
Option type नहीं है), async/parallel processing, garbage collection, tail recursion optimization
Hangul और programming
- Hangul एक ऐसी वैज्ञानिक लिपि प्रणाली है जो ध्वन्यात्मक संरचना को दृश्य रूप में व्यक्त करती है, जिसे King Sejong ने 1443 में बनाया था
- Han, Hangul की इसी संरचनात्मक स्पष्टता को code grammar में दर्शाता है
- दुनिया भर में 1.6 करोड़ से अधिक लोग Korean सीख रहे हैं, और Han coding के माध्यम से Korean सीखने का साधन देता है
- उदाहरण keywords
hamsu(function), manyak(if), banbok(for), banhwan(return), byeonsu(variable), chulryeok(print) आदि
डिज़ाइन और संरचना
- Rust-आधारित compiler pipeline
- Lexer → Parser → AST → Interpreter / CodeGen → LLVM IR → clang → Binary
- Project structure
src/ — core compiler और interpreter code
editors/vscode/ — VS Code extension
examples/, spec/, tests/ शामिल
- डिज़ाइन choices के कारण
- LLVM C API की जगह text-based IR generation से build को सरल बनाया गया
- interpreter तेज़ execution के लिए, compiler performance-केंद्रित
- Rust का pattern matching और memory safety language implementation के लिए उपयुक्त है
टेस्ट और लाइसेंस
cargo test से 46 tests (41 unit, 5 integration) चलाए जा सकते हैं
- MIT license के तहत जारी किया गया है
सांस्कृतिक महत्व
- Han एक प्रयोगात्मक language है जो Hangul की सुंदरता और programming की सटीकता को जोड़ती है
- यह Korean learners और developers दोनों के लिए भाषा और code की सीमाएँ मिटाने वाला नया दृष्टिकोण प्रस्तुत करता है
अभी कोई टिप्पणी नहीं है.