Skip to content

latenightai/Hixa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hixa Logo

A Modern Educational Programming Language with Bilingual Support

stars stars stars

πŸš€ Features

  • 🌍 Bilingual Support: Use English or Assamese keywords
  • πŸ“š Educational Focus: Designed for learning programming concepts
  • πŸ”§ Rich Standard Library: 50+ built-in functions with bilingual names
  • ⚑ Simple Syntax: C-like syntax with modern conveniences
  • πŸ–₯️ Cross-platform: Runs on any system with Python 3.8+
  • πŸ› οΈ CLI Tools: Command-line interface with REPL support

πŸ“¦ Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Quick Install

# Clone the repository
git clone https://github.com/hixa-lang/hixa.git
cd hixa

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .

Verify Installation

hixa --version

πŸš€ Quick Start

Your First Hixa Program

Create a file named hello.hx:

// Hello World in Hixa
kam main() {
    print_kora("Hello, World!");
    print_kora("Welcome to Hixa!");
}

Run it:

hixa run hello.hx

Basic Syntax Examples

Variables and Functions

// Variable declaration with Assamese keywords
dhora name = "Hixa";
dhora version = 1.0;

// Function definition
kam greet_kora(person) {
    print_kora("Hello, ");
    print_kora(person);
    print_kora("!");
}

kam main() {
    greet_kora(name);
}

Control Flow

kam check_number(num) {
    jodi (num > 0) {
        print_kora("Positive number");
    } nohole jodi (num < 0) {
        print_kora("Negative number");
    } nohole {
        print_kora("Zero");
    }
}

Loops

kam count() {
    dhora i = 1;
    jetialoike (i <= 5); {
        print_kora(i);
        i = i + 1;
    }
}

πŸ“š Language Features

Bilingual Keywords

English Assamese Description
fn kam Function declaration
let dhora Variable declaration
if jodi Conditional statement
else nohole Alternative condition
while jetialoike Loop statement
return ghurai_diya Return value
true hosa Boolean true
false misa Boolean false
print print_kora Print function

Data Types

  • Numbers: 42, 3.14, -10
  • Strings: "Hello", 'World'
  • Booleans: hosa (true), misa (false)
  • Arrays: [1, 2, 3, 4, 5]
  • Null: nai

Standard Library Functions

Input/Output

print_kora("Hello");           // Print to console
dhora input = input_lou("Enter name: ");  // Get user input

String Operations

dhora text = "Hello World";
dhora upper = upper_kora(text);    // "HELLO WORLD"
dhora lower = lower_kora(text);    // "hello world"
dhora length = length_kora(text);  // 11

Math Functions

dhora sqrt_val = sqrt_kora(16);    // 4.0
dhora power = pow_kora(2, 8);      // 256
dhora abs_val = abs_kora(-42);     // 42

Array Operations

dhora numbers = [3, 1, 4, 1, 5];
sort_kora(numbers);                // Sort in place
dhora sum_val = sum_kora(numbers); // Sum of elements
dhora avg_val = average_kora(numbers); // Average

πŸ› οΈ Command Line Interface

# Run a program
hixa run program.hx

# Check syntax without running
hixa check program.hx

# Start interactive REPL
hixa repl

# Show version
hixa --version

πŸ“– Examples

Calculator

kam add_kora(x, y) {
    ghurai_diya (x + y);
}

kam subtract_kora(x, y) {
    ghurai_diya (x - y);
}

kam main() {
    print_kora("Calculator Test:");
    print_kora("10 + 5 = ");
    print_kora(add_kora(10, 5));
    print_kora("10 - 5 = ");
    print_kora(subtract_kora(10, 5));
}

πŸ“š Documentation

For comprehensive documentation, see:

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

# Install development dependencies
pip install -e ".[dev]"

# Run tests
python run_tests.py

# Format code
black src/
isort src/

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 What's New?

  • v1.0.0: Initial release with bilingual keyword support
  • Rich standard library with 50+ functions
  • Command-line interface with REPL
  • Comprehensive documentation
  • Educational examples and tutorials

πŸ“ž Support


Made with ❀️ for the programming education community

About

Development Repository for Hixa Language and Interperter.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •