Linea

The AI-First Compiled Programming Language

High-performance systems language with native GPU acceleration, advanced AI reasoning algorithms (ARL-Tangram), and comprehensive ML/AI capabilities. Compile to standalone executables with Rust-level performance.

Core Features

Compiled & Fast

Compile directly to optimized machine code with automatic thread detection for parallel builds. Produces single, dependency-free executables (~1.3MB) with Rust-level performance.

GPU Acceleration

WGPU-based hardware acceleration with automatic device detection: dGPU → iGPU → CPU. Support for NVIDIA, AMD, Intel GPUs.

Native ML/AI

Pure Linea machine learning libraries for training and inference. Neural networks, optimizers, loss functions built-in. No external dependencies.

ARL-Tangram Algorithm

Advanced reasoning with adaptive compositional learning. Interpret complex patterns through semantic component decomposition and multi-layer attention.

Memory Safety

Memory safety by design. No null pointers, no buffer overflows. Ownership-based memory management without garbage collection.

Rich Libraries

HTTP client, CSV/Excel processing, graphics visualization, markdown support, data preprocessing, and more. Everything you need out of the box.

Extensible Module System

Keep reusable `.ln` modules in `libs/` and import them directly in projects with a simple, consistent module workflow.

Systems Primitives

Build system-level tools with native file I/O, env variables, process execution, timing, and thread-aware runtime helpers.

Easy OOPS

First-class classes and objects with beginner-friendly syntax: obj x @ ClassName = Constructor(...), plus simple this/super usage.

Quick Start

1. Install Linea

git clone https://github.com/gauthamnair2005/Linea.git cd Linea ./install.sh

2. Create Your First Program

// hello.ln func main() -> any { var x @ int = 42 display "Hello, Linea! Answer: " + x return 0 }

3. Compile & Run

linea compile hello.ln ./hello

4. Use a Local Module

import greeter greeter::hello("Linea")

5. Use System Operations

import system system::mkdir("tmp") system::writeText("tmp/a.txt", "hello") var out = system::exec("echo", ["Linea"]) display out[1] system::removeDir("tmp")

6. Read User Input (Built-in)

var name @ str = input("Enter your name: ") display "Hello, " + name

7. Train a Neural Network

import ml import datasets func main() -> any { var data = datasets::load_csv("data.csv") var model = ml::Sequential([ ml::Dense(10, 32), ml::ReLU(), ml::Dense(32, 2) ]) var optimizer = ml::Adam(0.001) for epoch from 0~50 { var loss = model.train_step(data::X, data::y, optimizer) display "Epoch " + epoch + ": " + loss } return 0 }

Standard Library

AI/ML Modules

  • arl - Adaptive Reasoning Layer
  • ml - Neural networks & optimizers
  • compute - GPU tensor operations
  • datasets - Data loading & preprocessing

Data & System Modules

  • csv - CSV file I/O
  • excel - Excel automation
  • http - REST API client
  • graphics - Data visualization
  • db - Secure SQLite alias

Utility Modules

  • markdown - Markdown parsing
  • hash/security - Hashing + token/password helpers
  • fileio/lowlevel - Explicit files + bit/byte primitives
  • webserver/framework - HTTP + Django-like tooling
  • blockchain/gpu_tools/memory - PoW, GPU vendor tools, memory handles
  • video/audio/image - Media probing, tone generation, and image transforms
  • opencv/camera - OpenCV-like CV helpers and camera device/snapshot APIs
  • math - Mathematical functions
  • dsa - Core sorting/searching/array algorithms
  • strings - String manipulation
  • utils - General utilities

v4.14.3 Highlights

40%
Faster GPU Ops
25×
Faster Attention
30%
Less Memory
6+
New Syntax Features

Compiled GUI Runtime Upgrade

Linea v4.14.3 adds stronger compiler reliability and DX: parser diagnostics now provide clearer expected-vs-found messages with hints, import validation fails early for missing modules and unknown selective-import symbols, and CLI success/failure output now uses bold green/red styling for clearer feedback.

New Language Features

Documentation

Language Guide

Learn Linea syntax, type system, control flow, and advanced features.

Read Guide →

Complete Wiki

Comprehensive reference for every Linea language feature with examples for each syntax element.

Explore Wiki →

ARL-Tangram Algorithm

Understand the adaptive reasoning architecture with detailed explanations and examples.

Learn Algorithm →

GitHub Repository

Access source code, examples, and contribute to the project.

View Repo →

Release Notes

Check out what's new in each version and the roadmap for future releases.

View Releases →

Why Choose Linea

Performance First

Compiled language with zero-cost abstractions. Get Rust-level performance with Python-like syntax.

AI/ML Native

Built from the ground up for machine learning. GPU acceleration included, no external ML frameworks needed.

Production Ready

Memory safe, type safe, and designed for production systems. Deploy with confidence.

Easy to Learn

Clean, expressive syntax inspired by Python. Comprehensive documentation and examples included.

Truly Independent

Compile to standalone executables. No runtime, no dependencies, no Linea installation required.

Future Proof

Active development with regular releases. Planned features: macros, constraints, distributed training.