Skip to content

trem-maker/uai

Repository files navigation

Uai

Uai is a compiled, safe, and modern programming language, still in development.

It is designed to combine simple and readable code, concurrency safe by design, high performance, native compilation, explicit typing, as well as messages and threads as fundamental language features.


Project Status

Uai is in an experimental and early stage. Currently, there is no complete runtime, no stable standard library, and no finalized package system. The syntax is constantly changing, and there are no stability guarantees.

What exists today is, basically, the experimental language core and the compiler under development.


What exists vs. What is conceptual

What exists

  • Nothing (totally development)

What is conceptual (In development)

  • Thread system.
  • Messaging system.
  • Concurrency model via lock operation queue.
  • Standard Library design (std).
  • Memory consistency rules.
  • Package ecosystem.
  • Module system.

Basic Types

  • Integer
  • Float
  • String
  • Boolean
  • Precision_Decimal
  • Table (Experimental native type)

Syntax Examples

First Program

learn std.io;

io.println("Uai");

Output: Uai

Variables

All variables have explicit types:

def String cafe = "coffee";
def Integer pao_de_queijo = 10;
def Float temperatura = 36.5;
def Boolean quente = true;

Functions

def Integer add(Integer a, Integer b) {
    return a + b;
}

Threads and Messages (Experimental)

msg coffee_ready;

def Thread thread = Thread.new({
    thread.wait(3, "s");
    call coffe_ready;
});

receive coffee_ready {
    io.println("Coffee is ready");
}

# ATTENTION! The message can be called before the 'receive' definition.

Implementations (Traits/Interfaces)

implementation Chaos for String {
    ovr mag show(Output o) {
        fatal("it's on fire bro");
    }
}

learn Chaos;


Trem (Orchestrator)

Trem is the command-line tool for managing projects:

  • trem new <project_name>
  • trem build
  • trem run
  • trem test

Language Goals

Uai explores safe concurrency, native data structures such as Table, explicit typing, compilation via LLVM, and a controlled execution model.

Important Note: Everything is subject to change. Uai is still under active development and is purely experimental.

About

Uai is a compiled programming language focused on speed, security, parallelism, and messaging that runs on LLVM and is currently under development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors