Linea Language Wiki
v4.14.3
Complete reference documentation for the Linea programming language
← Main Site
/
Wiki
Quick Navigation
Variables
Loops
Functions
Pointers
Arrays
SQL/SQLite
Hash/Security
Git
Web/Framework
OOPS
Language Spec
Media/CV/Camera
Operators
ML/AI
Full Guide
Basics
Variables & Type Annotations
Complete guide to the @ syntax and variable declarations
Data Types
int, float, str, bool, arrays, matrices, tensors
Literals & Constants
How to write integer, float, string, and array literals
Control Flow
Loop Structures
for loops with ~ syntax, while loops, break/continue
Conditionals
if/else/elif statements and ternary expressions
Pattern Matching
match expressions, guards, and exhaustiveness checking
Functions
Function Basics
Declaration, parameters, return types, recursion
Advanced Functions
Generics, decorators (@gpu, @async, @inference)
Lambdas & Macros
Inline lambdas and Rust-style macro_rules declarations
Memory & Pointers
Pointers & References
ptr datatype, &, *, pointer arithmetic
Advanced Pointer Operations
Pointer arrays, function pointers, safety
Collections
Arrays & Vectors
Array syntax, dynamic vectors, indexing, slicing
Matrices & Tensors
2D and N-dimensional operations, reshaping, broadcasting
Strings
String literals, concatenation, formatting, operations
Operators
Arithmetic Operators
+, -, *, /, %, ** (power), modulo operations
Logical Operators
and, or, not logical operations
Comparison Operators
==, !=, <, >, <=, >=
Range Operator
~ operator, ranges with steps, dynamic ranges
Machine Learning
ML Fundamentals
Tensors, matrices, basic ML operations
Neural Network Layers
Dense, Conv2D, Activation functions
Model Training
Training loops, optimizers, backpropagation, loss functions
Inference & @inference Mode
Gradient-free inference, @inference decorator
Model Formats
GGUF support plus ONNX/PTH/MLX loaders and examples
Advanced Topics
GPU Computation
@gpu decorator, compute modes, device selection (dGPU > iGPU > CPU)
Asynchronous Programming
@async decorator, futures, concurrency patterns
Module System
import, module paths, namespacing, scoping
OOPS: class + obj
Simple class/object model with Constructor, this/super, and strict var-vs-obj type rules
System Programming
Filesystem, environment, process execution, timing, threads
Git Library
Simple wrappers for status, branch, log, add, commit, push, pull
Web Server + Framework
HTTP serving primitives and Django-like project tooling
GUI Toolkit (Compiled Runtime)
Build native windows with gui::window and gui::buttonWindow
Error Handling
Error types, exception handling, try-catch
Language Specification
Formal grammar, typing rules, imports, and diagnostics behavior
I/O & Standard Library
Input & Output
display, input, formatted output
CSV Library
CSV reading, writing, parsing
HTTP Library
HTTP requests, responses, API integration
SQL/SQLite Library
Safe SQLite queries, parameter binding, secure DB locking
Password & Security Library
Password hashing, verification, CLI/GUI masked prompts
Hash & Security Utilities
SHA-256/SHA-512/MD5, tokens, random bytes, constant-time compares
DB, File I/O, and Low-Level
`db` alias, `fileio` operations, and bit/byte primitives
Fun & UUID Libraries
Randomized helpers and UUID generation utilities
Blockchain + GPU + Memory
Proof-of-work, GPU vendor/iGPU detection, and low/mid-level memory APIs
Media + CV + Camera
Video/audio/image APIs, OpenCV-like helpers, and camera access primitives
Switch + Ternary + Conditionals
switch/case/default, ternary operator, and one-line conditional syntax
Best Practices
Common Patterns
Design patterns, idioms, common solutions
Performance Tips
Optimization, profiling, best practices for speed