Logo Dark Logo Luma Documentation ver. 0.2.0 Downloads Blog About
CTRL K
    GitHub
    CTRL K
      • Luma Blog
        • Introducing Luma - A Lightweight, Modern Language for Practical Programming
        • Luma Update: What We’ve Achieved in Days - and What’s Cooking!
        • Luma List API: First Official Design Approved!
        • File API: First Edition - Simple, Powerful, Luma-style
        • Installing Luma - What’s Coming Soon
        • Back to the Drawing Board: Strengthening the Foundations of Luma
        • Breaking the Lambda Curse: Refactoring Our Compiler the Right Way
        • Rebuilding the Parser: Why We Changed and What It Enables
        • Luma Progress Update: Smarter Compiler, Type-Safe Lists, and a Vision for Extensibility
        • Luma Development Update - Building Strength in the Core
        • Strengthening Luma with Logical Foundations
        • Building Confidence in Luma: From Errors to Insight
        • Building Confidence in Luma: Smarter Types, Expressions, and a Playground to Try It Out
        • Introducing Functions in Luma: Expression Power, Clarity, and Higher-Order Elegance
        • Structs Arrive in Luma - Phase 1 is Here Elegance
        • Structs in Luma: What’s Possible Today and What’s Coming Next
        • Traits Arrive in Luma - A Big Step Forward
        • Luma Begins a New Chapter: Introducing Modules & Imports
        • Imports, Modules, and a Lesson We Had to Learn the Hard Way
        • Letting Ideas Cook: Rethinking File Handling in Luma
        • When File Handling Finally Felt Right in Luma
        • The First Complete Shape of File Handling in Luma
        • When self Stopped Getting in the Way
        • Command-Line Programs, Without the Ceremony
        • Luma Web Server: Building Web Applications Made Simple
        • JSON Without the Boilerplate: Luma Learns to Speak Data
        • Dates and Times That Speak Human
        • Your First Real App: A REST API in 80 Lines of Luma
        • Thinking About Databases: How Should Luma Talk to MySQL?
        • Binary Buffers Arrive: Luma Learns to Speak in Bytes
        • Crypto Arrives: Hashing, HMAC, and the Primitives That Unlock Everything
        • TCP Lands: Luma Opens a Socket to the World
        • Luma Talks to Databases: The Full Stack Lands
        • What Building a CSV Module Taught Us About Our Own Language
        • Error Handling Lands in Luma: No Try/Catch, Just .or()
        • Closures and Anonymous Functions: The Glue That Holds Luma Together
        • Pattern Matching Arrives in Luma: Match Your Way to Cleaner Code
        • Two Weeks That Changed Everything: A Luma Progress Report
        • Randomness Without the Setup: Luma Gets random.int(), random.float(), and random.bool()
        • UUIDs Land in Luma: Generate, Validate, No Dependencies
        • HTTP Client Lands: Luma Talks to the Web
        • SQLite Driver Under Development: Pure Luma Reads SQLite Files
        • When Two Modules Collide: How Luma Learned Namespace Isolation
        • Pub Values: How Luma Learned to Export More Than Functions
        • Leaving Go Behind: Luma Is Getting Its Own Compiler
        • Two Ways to Run: Luma Will Be Both Interpreted and Compiled
        • It Works: Luma Now Has Its Own Compiler
        • From 0.1.0 to 0.2.0: What Changed in the Language
        • luma doc: The Manual Lives Inside the Compiler
        • Luma and AI: Friendly to Machines, Beautiful for People
        • When ChatGPT Met Luma: An Experiment in AI-Friendly Programming
        • Luma 0.2.0 Is Here: Our First Public Release
        • When Google AI Met Luma: Building a Real-World Geopolitical Monitor Without a Tutorial
      • About
      • Documentation
        • Getting started
          • Install and first program
          • The luma command
          • Editors
        • Language basics
          • Basics
          • Comments
          • Types
          • Variables
          • Operators
          • Interpolated strings
          • Optional values
          • Converting types
        • Text and collections
          • Working with text
          • Lists
          • Maps
          • Sets
        • Control flow
          • if / else
          • match
          • Walk loops
          • While loops
          • Error handling
          • defer
        • Functions and types
          • Functions
          • Objects
          • Traits
          • Imports and mods
        • Programs
          • Reading input
          • Command-line flags
          • Environment variables
          • Files
          • Running commands
          • Dates and times
          • Random numbers
          • Testing
          • Several things at once
          • Memory
        • Data
          • JSON
          • Binary data
          • Hashes and encodings
          • Unique IDs
          • HTML documents
          • Tables of data
          • Zip archives
          • Protocol buffers
        • Web and network
          • Web requests
          • Web servers
          • TCP connections
          • gRPC
        • Databases
          • Databases
          • Writing a driver
        • AI
          • Claude
          • Other models
          • Running a model yourself
          • MCP
          • Vectors and search
          • Model files
        • Reference
          • Built-in functions
          • Errors
          • Limitations
        • FAQ & Troubleshooting
          • FAQ
          • Common errors
          • Gotchas
          • Coming from other languages
        • Contributing
          • Reporting problems
          • Writing mods
          • Roadmap
        • Licensing & Philosophy
          • Philosophy
          • Long-term vision
          • License
      • Downloads
      • More
      • About
      • Luma Playground
      • Getting started
        • Install and first program
        • The luma command
        • Editors
      • Language basics
        • Basics
        • Comments
        • Types
        • Variables
        • Operators
        • Interpolated strings
        • Optional values
        • Converting types
      • Text and collections
        • Working with text
        • Lists
        • Maps
        • Sets
      • Control flow
        • if / else
        • match
        • Walk loops
        • While loops
        • Error handling
        • defer
      • Functions and types
        • Functions
        • Objects
        • Traits
        • Imports and mods
      • Programs
        • Reading input
        • Command-line flags
        • Environment variables
        • Files
        • Running commands
        • Dates and times
        • Random numbers
        • Testing
        • Several things at once
        • Memory
      • Data
        • JSON
        • Binary data
        • Hashes and encodings
        • Unique IDs
        • HTML documents
        • Tables of data
        • Zip archives
        • Protocol buffers
      • Web and network
        • Web requests
        • Web servers
        • TCP connections
        • gRPC
      • Databases
        • Databases
        • Writing a driver
      • AI
        • Claude
        • Other models
        • Running a model yourself
        • MCP
        • Vectors and search
        • Model files
      • Reference
        • Built-in functions
        • Errors
        • Limitations
      • FAQ & Troubleshooting
        • FAQ
        • Common errors
        • Gotchas
        • Coming from other languages
      • Contributing
        • Reporting problems
        • Writing mods
        • Roadmap
      • Licensing & Philosophy
        • Philosophy
        • Long-term vision
        • License
      • More
      • About
      • Luma Playground
      • Light

      • Dark

      • System

      Documentation
      Programs

      Programs

      What a program needs around it: input, flags, files, time, tests and more.

      Reading input
      prompt("Your name: ")
      Command-line flags
      flag("port", 8080), –port=9000
      Environment variables
      env.get("PORT", 8080), env.set, .env files with env.load
      Files
      file("notes.txt").read(), write, add, exists, delete, size, open (a handle: read(at, n), write(at, data), locks)
      Running commands
      shell("ls -la"), shell(["git", "status"]): their output as a str
      Dates and times
      date, time, datetime, d.days(3), a.until(b).days()
      Random numbers
      random.int(1, 6), random.float(), random.pick, random.shuffle, random.seed
      Testing
      assert total == 42, fn test_…() in hello_test.luma, luma test
      Several things at once
      wait(ids, fetch) calls a function for every element at the same time; wait(2) pauses
      Memory
      freed automatically when no longer used, free(x), -memcheck
      Luma
      Friendly to machines, beautiful for people.
      Made in Estonia
      © 2026 Luma