Skip to content

Latest commit

 

History

History
87 lines (63 loc) · 1.33 KB

File metadata and controls

87 lines (63 loc) · 1.33 KB

OmiLang Logo

Omi Programming Language

An interpreted programming language built with Python

Fork of GlowLang

Documentation · Discussions · VS Code Extension


Quick Start

Requires Python >= 3.11

git clone https://github.com/OmiLang/Omi.git
cd Omi
python shell.py

Run a file:

OmiShell >>> run example.omi

or

python shell.py run example.omi

Hello World

print("Hello, World!")
println("Hello, World!")
output("Hello,", "World!")

Example

func<int> factorial(n<int>):
  if n <= 1: return 1
  return n * factorial(n - 1)
end

// Factorial from 1 to 6
for i = 1 to 6:
  println(factorial(i))
end
@import "omi:system" as sys
@set sys.username as user

func<void> greet(name<string>):
  println("Hello, " + name + "!")
  return
end

var<string> name = user

greet(name)