v1.0.0
NEW LANGUAGE

Levish Programming Language

A modern, AI-native programming language designed for simplicity, performance, and seamless AI integration. Created by the LevishCoders team.

v1.0.0 Released 2024 • Open Source • MIT License

Why Levish?

AI-Native

Built-in AI/ML functions like ai.predict(), ai.classify(), ai.generate() — no imports needed.

Lightning Fast

Compiled to optimized code with minimal overhead. Benchmarks show 3x faster than Python for common operations.

Clean Syntax

Minimalist, readable syntax inspired by the best of Python, JavaScript, and Go. Easy to learn in hours.

Type Safe

Strong static typing with inference — catch errors at compile time while writing less boilerplate.

Interoperable

Seamlessly call JavaScript, Python, and C libraries. Import any npm or pip package directly.

Async/Await

First-class concurrency support with async/await, channels, and goroutine-like lightweight threads.

Built-in HTTP

Native HTTP client and server — build APIs and fetch data without external dependencies.

Package Manager

Built-in package manager lpm with thousands of community packages ready to use.

Levish Syntax Guide

Variables

// Mutable variables
let name = "LevishCoders"
let age = 25
let pi = 3.14159

// Constants
const MAX_SIZE = 100
const VERSION = "1.0.0"

// Type inference
let items = [1, 2, 3, 4, 5]
let user = { name: "John", age: 30 }

Functions

// Basic function
func greet(name) {
    print("Hello, {name}!")
}

// Return values
func add(a, b) {
    return a + b
}

// Arrow functions
let double = |x| x * 2
let sum = |a, b| a + b

Control Flow

// If/Else
if score >= 90 {
    print("Excellent!")
} else if score >= 70 {
    print("Good")
} else {
    print("Keep trying")
}

// For loop
for i in range(10) {
    print("Count: {i}")
}

// While loop
while condition {
    // do something
}

AI Integration

// Predictions
let trend = ai.predict("market", data)
print("Market trend: {trend}")

// Classification
let mood = ai.classify("I love coding!")
print("Sentiment: {mood}")

// Text generation
let story = ai.generate("Write a haiku")
print(story)

// Summarization
let brief = ai.summarize(longText)

Async / HTTP

// Async function
async func fetchData(url) {
    let res = await http.get(url)
    let data = json.parse(res)
    return data
}

// HTTP server
func main() {
    let server = http.createServer(8080)
    server.get("/", |req, res| {
        res.send("Hello from Levish!")
    })
    server.listen()
}

Classes & OOP

// Class definition
class Animal {
    let name
    let sound

    func new(name, sound) {
        self.name = name
        self.sound = sound
    }

    func speak() {
        print("{self.name}: {self.sound}!")
    }
}

let dog = new Animal("Rex", "Woof")
dog.speak()  // Rex: Woof!

Try Levish Online

Write and run Levish code right in your browser

Output
Click "Run Code" to execute...

Community Examples

Web Scraper @sarah_dev
async func scrape(url) {
    let html = await http.get(url)
    let title = html.match("(.*)")
    print("Page title: {title}")
}

scrape("https://example.com")
Fibonacci Generator @code_ninja
func fibonacci(n) {
    if n <= 1 { return n }
    return fibonacci(n - 1) + fibonacci(n - 2)
}

for i in range(10) {
    print("fib({i}) = {fibonacci(i)}")
}
Stock Price Analyzer @trader_joe
async func analyzeStock(symbol) {
    let data = await http.get(
        "https://api.stocks.com/{symbol}"
    )
    let prices = json.parse(data)
    let trend = ai.predict("price", prices)
    print("{symbol}: {trend}")
}

analyzeStock("AAPL")

Ready to Start Coding in Levish?

Join thousands of developers building the future with our AI-native programming language.