Skip to content

mealet/hiw-lang

Repository files navigation

Release | Quick Start | Installation | Documentation | Editors Support | License

A simple compiling language written in Rust

👾 | Quick Start

Steps to start writing on hiw-lang:

  1. Install language (see in Installation)
  2. Create file with .hiw extension
  3. Write your first program:
// example.hiw

// Hello World program
print("Hello World!");

// Creating variables
a = 1;
b = 2;
c = a + b;

str1 = "Hello, ";
str2 = "World!";
print(str1 + str2);

// If/Else constructions
a = 1;
if a < 5 {
  print("less");
} else {
  print("bigger");
};

// Create functions
define foo(x) {
  print(x);
};

a = 2;

foo(1);
foo(a);

// Use functions on variables too!

a.foo();

// Use dynamic arrays
arr = [1, "string", true];

// Use cycles
a = 0;
while a < 5 {
  print(a);
  a = a + 1;
};

for i in 10 {
    print(i);
};
  1. Compile and run it:
hiw example.hiw
  1. Compile it to binary file:
hiw example.hiw output
./output

💾 | Installation

🟠 | Linux

  1. Open your terminal.
  2. Paste auto-install script:
curl -s https://raw.githubusercontent.com/mealet/hiw-lang/master/hiw-lang-install.sh | sh
  1. Restart the terminal and type hiw command. You'll see instructions about using compiler.
  2. Write code!

🟢 | Windows

  1. Install Rust from official site
  2. Download hiw from latest release and unpack it anywhere.
  3. Add directory where you unpacked release to PATH
  4. Restart the terminal and type hiw command. You'll see instructions about using compiler.
  5. Write code!

😞 | Uninstall

🟠 | Linux

  1. Open your terminal
  2. Paste this command:
curl -s https://raw.githubusercontent.com/mealet/hiw-lang/master/uninstall.sh | sh
  1. Restart terminal

🟢 | Windows

  1. Delete unpacked hiw folder with all binaries inside.

📒 | Editors Support

Editors which supports hiw-lang syntax:

🎈 | License

Project licensed under the BSD-3 License -> License File